/**
 * Современные стили для админ-панели
 * Версия: 2.2
 * Дата: 02.11.2025
 */

:root {
    --admin-primary: #6366f1;
    --admin-primary-hover: #4f46e5;
    --admin-primary-light: #eef2ff;
    --admin-secondary: #8b5cf6;
    --admin-success: #10b981;
    --admin-success-light: #d1fae5;
    --admin-danger: #ef4444;
    --admin-danger-light: #fee2e2;
    --admin-warning: #f59e0b;
    --admin-warning-light: #fef3c7;
    --admin-info: #3b82f6;
    --admin-dark: #1f2937;
    --admin-light-bg: #f9fafb;
    --admin-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --admin-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --admin-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --admin-container-max: 1400px;
}

/* Body & Layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--admin-dark);
}

/* Unified Container */
.container,
.container-fluid {
    max-width: var(--admin-container-max);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Page Header Improvements */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h1 i {
    color: var(--admin-primary);
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--admin-card-shadow);
    transition: var(--admin-transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--admin-primary);
}

.navbar-brand:hover {
    color: var(--admin-primary-hover);
}

/* Cards */
.card {
    border: none;
    box-shadow: var(--admin-card-shadow);
    border-radius: 1rem;
    transition: var(--admin-transition);
    background: white;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--admin-card-shadow-hover);
    transform: translateY(-4px);
}

.card-header {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    color: white;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

/* Webstore Card (для списка магазинов) */
.webstore-card {
    border: none;
    border-radius: 1rem;
    padding: 24px;
    margin-bottom: 20px;
    transition: var(--admin-transition);
    background: white;
    box-shadow: var(--admin-card-shadow);
    position: relative;
    overflow: hidden;
}

.webstore-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--admin-primary), var(--admin-secondary));
}

.webstore-card:hover {
    box-shadow: var(--admin-card-shadow-hover);
    transform: translateY(-4px);
}

/* Status Badges */
.webstore-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.webstore-status.active {
    background: #d1fae5;
    color: #065f46;
}

.webstore-status.draft {
    background: #fef3c7;
    color: #92400e;
}

.webstore-status.suspended {
    background: #fee2e2;
    color: #991b1b;
}

/* Stats Card */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--admin-card-shadow);
    animation: fadeInUp 0.6s ease-out;
}

.empty-state i {
    font-size: 5rem;
    color: var(--admin-primary);
    margin-bottom: 24px;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-state h3 {
    color: var(--admin-dark);
    margin-bottom: 12px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 24px;
}

/* Plan Badges */
.plan-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-free {
    background: #f3f4f6;
    color: #6b7280;
}

.plan-business {
    background: #dbeafe;
    color: #1e40af;
}

.plan-pro {
    background: #fce7f3;
    color: #9f1239;
}

/* Buttons */
.btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: var(--admin-transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    letter-spacing: 0.025em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--admin-success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--admin-warning) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--admin-danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--admin-info) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-outline-secondary {
    border: 1px solid #e5e7eb;
    color: var(--admin-dark);
    background: white;
}

.btn-outline-secondary:hover {
    background: var(--admin-light-bg);
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

.btn-sm {
    min-height: 36px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    min-height: 52px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-dark);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: var(--admin-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--admin-dark);
    margin-bottom: 0.5rem;
}

/* Tables */
.table {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
}

.table thead th {
    background: var(--admin-light-bg);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:hover {
    background: var(--admin-light-bg);
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .webstore-card {
        padding: 16px;
    }

    .stats-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .empty-state {
        padding: 40px 20px;
    }

    .empty-state i {
        font-size: 3rem;
    }
}

@media (max-width: 576px) {
    .webstore-card h4 {
        font-size: 1.125rem;
    }

    .stats-card .row {
        gap: 1rem;
    }

    .stat-item {
        padding: 0.5rem 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Utilities */
.text-muted {
    color: #6b7280 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.shadow-sm {
    box-shadow: var(--admin-card-shadow) !important;
}

.shadow {
    box-shadow: var(--admin-card-shadow-hover) !important;
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    border-top-color: var(--admin-primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Settings Page */
.settings-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.settings-section h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--admin-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-box {
    background: var(--admin-light-bg);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

/* Badge Preview */
.badge-preview-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.badge-preview-box {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
}

.badge-preview-box h5 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #374151;
}

/* Position Grid */
.position-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.position-option {
    position: relative;
    cursor: pointer;
}

.position-option input[type="radio"] {
    display: none;
}

.position-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: var(--admin-transition);
    position: relative;
    background: var(--admin-light-bg);
    min-height: 100px;
}

.position-option input[type="radio"]:checked+.position-card {
    border-color: var(--admin-primary);
    background: #eef2ff;
}

.position-card .preview-badge {
    position: absolute;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.position-card.top-left .preview-badge {
    top: 8px;
    left: 8px;
}

.position-card.top-right .preview-badge {
    top: 8px;
    right: 8px;
}

.position-card.bottom-left .preview-badge {
    bottom: 8px;
    left: 8px;
}

.position-card.bottom-right .preview-badge {
    bottom: 8px;
    right: 8px;
}

.position-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Responsive для settings */
@media (max-width: 768px) {
    .settings-container {
        padding: 15px;
    }

    .settings-section {
        padding: 20px;
    }

    .badge-preview-container {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Create/Edit Forms */
.create-form-container {
    max-width: 700px;
    margin: 0 auto;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.form-section h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--admin-dark);
    font-weight: 600;
}

.slug-preview {
    background: #f3f4f6;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #6b7280;
    margin-top: 8px;
    font-size: 0.875rem;
}

.slug-preview .domain {
    color: var(--admin-primary);
    font-weight: 600;
}

/* Plan Cards */
.plan-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: var(--admin-transition);
    background: white;
    cursor: pointer;
}

.plan-card.selected {
    border-color: var(--admin-primary);
    background: #f0f9ff;
}

.plan-card:hover {
    border-color: var(--admin-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.plan-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-primary);
    margin: 12px 0;
}

.plan-features {
    text-align: left;
    margin-top: 16px;
    list-style: none;
    padding: 0;
}

.plan-features li {
    padding: 4px 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.plan-features li i {
    color: var(--admin-success);
    margin-right: 8px;
}

@media (max-width: 768px) {
    .create-form-container {
        padding: 15px;
    }

    .form-section {
        padding: 20px;
    }

    .plan-price {
        font-size: 1.5rem;
    }
}

/* Products Page */
.products-container {
    max-width: 1400px;
    margin: 0 auto;
}

.products-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.products-section h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--admin-dark);
    font-weight: 600;
}

.product-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: var(--admin-transition);
    background: white;
    height: 100%;
}

.product-card:hover {
    box-shadow: var(--admin-card-shadow-hover);
    transform: translateY(-2px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.product-card .title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .brand {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.product-card .price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--admin-primary);
    margin-bottom: 12px;
}

.product-card .price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--admin-primary);
    margin-bottom: 12px;
}

/* Product Badges */
.badge-visible {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.badge-hidden {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.markup-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

/* Categories in Modal */
.main-category {
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: var(--admin-transition);
    cursor: pointer;
}

.main-category:hover {
    background: #f0f0f0;
}

.subcategory {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: var(--admin-transition);
    cursor: pointer;
}

.subcategory:hover {
    background: #e9ecef;
}

/* Orders Page */
.orders-container {
    max-width: var(--admin-container-max);
    margin: 0 auto;
}

.order-card {
    background: white;
    border: none;
    border-radius: 1rem;
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--admin-transition);
    box-shadow: var(--admin-card-shadow);
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--admin-primary), var(--admin-secondary));
}

.order-card:hover {
    box-shadow: var(--admin-card-shadow-hover);
    transform: translateX(4px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-id {
    font-weight: 600;
    color: var(--admin-dark);
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.order-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.order-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.875rem;
    color: #6c757d;
}

.info-value {
    font-size: 1rem;
    color: var(--admin-dark);
    font-weight: 500;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--admin-dark);
}

.status-new {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #cfe2ff;
    color: #084298;
}

.status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.status-shipped {
    background: #d1e7dd;
    color: #0f5132;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Order Sections */
.order-section {
    background: var(--admin-light-bg);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--admin-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-address {
    color: var(--admin-dark);
    margin: 0;
    line-height: 1.6;
}

.order-comment {
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
    font-style: italic;
}

/* Order Items */
.order-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 16px;
    align-items: center;
    transition: var(--admin-transition);
    border: 1px solid #e5e7eb;
}

.order-item:hover {
    box-shadow: var(--admin-card-shadow);
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--admin-light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    color: #d1d5db;
    font-size: 1.5rem;
}

.item-info {
    flex: 1;
}

.item-title {
    font-weight: 600;
    color: var(--admin-dark);
    margin-bottom: 4px;
    font-size: 0.9375rem;
}

.item-brand {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 2px;
}

.item-article {
    font-size: 0.75rem;
    color: #9ca3af;
}

.item-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.quantity-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.quantity-value {
    font-weight: 600;
    color: var(--admin-dark);
    font-size: 1rem;
}

.item-price {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-single {
    font-size: 0.8125rem;
    color: #6b7280;
}

.price-total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--admin-primary);
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 2px solid #e5e7eb;
    font-size: 1.125rem;
    font-weight: 600;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--admin-success);
}

@media (max-width: 768px) {

    .products-container,
    .orders-container {
        padding: 15px;
    }

    .product-card img {
        height: 150px;
    }

    .order-info {
        grid-template-columns: 1fr;
    }

    .order-item {
        grid-template-columns: 50px 1fr;
        gap: 12px;
    }

    .item-quantity,
    .item-price {
        grid-column: 2;
        margin-top: 8px;
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Categories Page */
.categories-container {
    max-width: 1000px;
    margin: 0 auto;
}

.category-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--admin-transition);
}

.category-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 1.5rem;
    margin-right: 16px;
    color: var(--admin-primary);
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-meta {
    font-size: 0.8125rem;
    color: #6b7280;
}

.category-meta {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Category Tree (categories_v2) */
.category-tree {
    list-style: none;
    padding-left: 0;
}

.category-tree>.category-item {
    background: white;
    border: 2px solid var(--admin-primary);
    box-shadow: var(--admin-card-shadow);
    position: relative;
}

.category-tree>.category-item::before {
    content: '📁';
    position: absolute;
    left: -40px;
    font-size: 1.5rem;
}

.category-tree .category-children {
    list-style: none;
    padding-left: 60px;
    margin-top: 12px;
    position: relative;
}

.category-tree .category-children::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--admin-primary), var(--admin-primary-light));
}

.category-tree .category-children .category-item {
    border-left: 4px solid var(--admin-info);
    background: var(--admin-light-bg);
    margin-bottom: 8px;
    position: relative;
}

.category-tree .category-children .category-item::before {
    content: '└─ 📄';
    position: absolute;
    left: -56px;
    color: var(--admin-info);
    font-weight: bold;
}

.badge-nav {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: 600;
    margin-left: 8px;
}

.badge-sidebar {
    background: #dbeafe;
    color: #1e40af;
}

.badge-header {
    background: #fef3c7;
    color: #92400e;
}

/* Menu Builder */
.menu-container {
    max-width: 1200px;
    margin: 0 auto;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: move;
    transition: var(--admin-transition);
}

.menu-item:hover {
    border-color: var(--admin-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.menu-item.dragging {
    opacity: 0.5;
}

.menu-item .drag-handle {
    color: #9ca3af;
    cursor: grab;
    font-size: 1.2rem;
}

.menu-item .drag-handle:active {
    cursor: grabbing;
}

.menu-item .item-info {
    flex: 1;
}

.menu-item .item-title {
    font-weight: 600;
    margin: 0;
}

.menu-item .item-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.menu-item .type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.type-badge.category {
    background: #dbeafe;
    color: #1e40af;
}

.type-badge.page {
    background: #d1fae5;
    color: #065f46;
}

.type-badge.url {
    background: #fce7f3;
    color: #9f1239;
}

.menu-item.hidden {
    opacity: 0.5;
}

.menu-children {
    margin-left: 48px;
    margin-top: 12px;
    padding-left: 20px;
    border-left: 3px solid var(--admin-primary);
    position: relative;
}

.menu-children::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--admin-primary), var(--admin-primary-light));
}

.menu-children .menu-item {
    background: var(--admin-light-bg);
    border-left: 4px solid var(--admin-primary);
}

.menu-children .menu-item::before {
    content: '└─';
    position: absolute;
    left: -44px;
    color: var(--admin-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.add-item-form {
    background: var(--admin-light-bg);
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

/* Drop zones for nesting */
.menu-item.drag-over-top {
    border-top: 3px solid var(--admin-success);
}

.menu-item.drag-over-bottom {
    border-bottom: 3px solid var(--admin-success);
}

.menu-item.drag-over-nested {
    background: var(--admin-primary-light);
    border-left: 4px solid var(--admin-primary);
}

/* Category checkboxes hover effects */
#categoriesCheckboxes .form-check {
    transition: all 0.2s ease;
}

#categoriesCheckboxes .form-check:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#categoriesCheckboxes .subcategory:hover {
    background: rgba(23, 162, 184, 0.15) !important;
}

/* Menu item dragging state */
.menu-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

@media (max-width: 768px) {

    .categories-container,
    .menu-container {
        padding: 15px;
    }
}