﻿ /* Dashboard Layout */
    .admin-dashboard {
        display: flex;
        min-height: 100vh;
        background: var(--gray-100);
    }

    /* Sidebar */
    .admin-sidebar {
        width: 260px;
        background: var(--gradient-primary);
        display: flex;
        flex-direction: column;
        position: fixed;
        height: 100vh;
        z-index: 100;
        transition: transform 0.3s ease;
    }

    .admin-sidebar.collapsed {
        transform: translateX(260px);
    }

    .sidebar-header {
        padding: 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .sidebar-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        color: white;
    }

    .logo-text {
        display: flex;
        flex-direction: column;
    }

    .logo-title {
        font-family: var(--font-display);
        font-weight: 700;
        font-size: 1rem;
    }

    .logo-subtitle {
        font-size: 0.75rem;
        opacity: 0.7;
    }

    .sidebar-nav {
        flex: 1;
        padding: 1rem 0;
        overflow-y: auto;
    }

    .sidebar-nav .nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0.875rem 1.5rem;
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        transition: all 0.3s ease;
        border-right: 3px solid transparent;
    }

    .sidebar-nav .nav-item:hover,
    .sidebar-nav .nav-item.active {
        background: rgba(255,255,255,0.1);
        color: white;
        border-right-color: var(--accent);
    }

    .sidebar-nav .nav-item i {
        width: 20px;
        text-align: center;
    }

    .sidebar-footer {
        padding: 1rem 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .sidebar-footer .nav-item.logout:hover {
        background: rgba(239, 68, 68, 0.2);
        border-right-color: var(--danger);
    }

    /* Main Content */
    .admin-main {
        flex: 1;
        margin-right: 260px;
        display: flex;
        flex-direction: column;
        transition: margin 0.3s ease;
    }

    .admin-main.expanded {
        margin-right: 0;
    }

    /* Top Bar */
    .admin-topbar {
        background: white;
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        box-shadow: var(--shadow-sm);
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .sidebar-toggle {
        background: var(--gray-100);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: var(--radius);
        cursor: pointer;
        display: none;
    }

    .topbar-search {
        flex: 1;
        max-width: 400px;
        position: relative;
    }

    .topbar-search i {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray-400);
    }

    .topbar-search input {
        width: 100%;
        padding: 0.625rem 2.5rem 0.625rem 1rem;
        border: 2px solid var(--gray-200);
        border-radius: var(--radius-full);
        transition: all 0.3s ease;
    }

    .topbar-search input:focus {
        border-color: var(--accent);
        outline: none;
    }

    .topbar-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .notification-btn {
        position: relative;
        background: var(--gray-100);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-full);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .notification-btn:hover {
        background: var(--gray-200);
    }

    .notification-badge {
        position: absolute;
        top: -2px;
        left: -2px;
        background: var(--danger);
        color: white;
        font-size: 0.65rem;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .user-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--gray-100);
        border: none;
        padding: 0.5rem 1rem;
        border-radius: var(--radius-full);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .user-btn:hover {
        background: var(--gray-200);
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        background: var(--gradient-accent);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
    }

    .user-name {
        font-weight: 600;
        color: var(--gray-700);
    }

    /* Content Area */
    .admin-content {
        padding: 1.5rem;
        flex: 1;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .page-header h1 {
        font-family: var(--font-display);
        font-size: 1.75rem;
        font-weight: 800;
        color: var(--gray-900);
        margin-bottom: 0.25rem;
    }

    .page-header p {
        color: var(--gray-500);
        margin: 0;
    }

    /* Stats Grid */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .stat-card {
        background: white;
        border-radius: var(--radius-lg);
        padding: 1.25rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        box-shadow: var(--shadow-sm);
        transition: all 0.3s ease;
    }

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

    .stat-card .stat-icon {
        width: 50px;
        height: 50px;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
    }

    .stat-card.primary .stat-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent); }
    .stat-card.success .stat-icon { background: rgba(34, 197, 94, 0.15); color: var(--success); }
    .stat-card.warning .stat-icon { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
    .stat-card.info .stat-icon { background: rgba(59, 130, 246, 0.15); color: var(--info); }

    .stat-card .stat-details {
        display: flex;
        flex-direction: column;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--gray-900);
    }

    .stat-card .stat-label {
        font-size: 0.85rem;
        color: var(--gray-500);
    }

    /* Content Card */
    .content-card {
        background: white;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .card-header {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--gray-200);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .card-header h3 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--gray-800);
        margin: 0;
    }

    .btn-link {
        color: var(--accent);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.875rem;
    }

    .btn-link:hover {
        text-decoration: underline;
    }

    .card-body {
        padding: 1.25rem;
    }

    /* Tab Panels */
    .tab-panel {
        display: none;
    }

    .tab-panel.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Filters Bar */
    .filters-bar {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
        align-items: center;
    }

    .filter-group {
        min-width: 150px;
    }

    .filter-group.search-group {
        flex: 1;
        min-width: 200px;
        max-width: 300px;
        position: relative;
    }

    .filter-group.search-group i {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray-400);
    }

    .filter-group.search-group input {
        padding-right: 2.5rem;
    }

    .btn-add {
        background: var(--gradient-accent);
        color: white;
        border: none;
        padding: 0.625rem 1.25rem;
        border-radius: var(--radius);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-right: auto;
    }

    .btn-add:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
    }

    /* Admin Table */
    .admin-table {
        width: 100%;
        border-collapse: collapse;
    }

    .admin-table th {
        background: var(--gray-50);
        padding: 0.875rem 1rem;
        text-align: right;
        font-weight: 600;
        color: var(--gray-600);
        font-size: 0.85rem;
        border-bottom: 2px solid var(--gray-200);
    }

    .admin-table td {
        padding: 1rem;
        border-bottom: 1px solid var(--gray-100);
        vertical-align: middle;
    }

    .admin-table tr:hover {
        background: var(--gray-50);
    }

    .table-image {
        width: 55px;
        height: 55px;
        border-radius: var(--radius);
        overflow: hidden;
        background: var(--gray-200);
    }

    .table-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product-name {
        font-weight: 600;
        color: var(--gray-900);
    }

    .product-desc {
        font-size: 0.8rem;
        color: var(--gray-500);
    }

    .category-badge {
        background: var(--gray-100);
        padding: 0.25rem 0.75rem;
        border-radius: var(--radius-full);
        font-size: 0.8rem;
        font-weight: 500;
        color: var(--gray-600);
    }

    .price-value {
        font-weight: 700;
        color: var(--accent);
    }

    .status-badge {
        padding: 0.3rem 0.75rem;
        border-radius: var(--radius-full);
        font-size: 0.8rem;
        font-weight: 600;
    }

    .status-badge.active {
        background: rgba(34, 197, 94, 0.15);
        color: var(--success);
    }

    .status-badge.inactive {
        background: rgba(148, 163, 184, 0.2);
        color: var(--gray-500);
    }

    .table-actions {
        display: flex;
        gap: 0.5rem;
    }

    .table-actions .action-btn {
        width: 34px;
        height: 34px;
        border-radius: var(--radius);
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .table-actions .action-btn.edit {
        background: rgba(59, 130, 246, 0.1);
        color: var(--info);
    }

    .table-actions .action-btn.edit:hover {
        background: var(--info);
        color: white;
    }

    .table-actions .action-btn.delete {
        background: rgba(239, 68, 68, 0.1);
        color: var(--danger);
    }

    .table-actions .action-btn.delete:hover {
        background: var(--danger);
        color: white;
    }

    /* Form Styles */
    .product-form .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .form-column {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-label {
        font-weight: 600;
        color: var(--gray-700);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .form-label i {
        color: var(--accent);
        font-size: 0.9rem;
    }

    .required {
        color: var(--danger);
    }

    .form-hint {
        font-size: 0.8rem;
        color: var(--gray-500);
        display: flex;
        align-items: center;
        gap: 0.35rem;
        margin-top: 0.25rem;
    }

    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    /* Image Upload */
    .image-upload-area {
        border: 2px dashed var(--gray-300);
        border-radius: var(--radius-lg);
        min-height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        background: var(--gray-50);
        position: relative;
        overflow: hidden;
    }

    .image-upload-area:hover {
        border-color: var(--accent);
        background: rgba(16, 185, 129, 0.05);
    }

    .image-upload-area.has-image {
        border-style: solid;
        border-color: var(--accent);
    }

    .upload-placeholder {
        text-align: center;
        padding: 2rem;
    }

    .upload-placeholder i {
        font-size: 3rem;
        color: var(--gray-400);
        margin-bottom: 0.75rem;
    }

    .upload-placeholder p {
        color: var(--gray-600);
        font-weight: 500;
        margin: 0;
    }

    .upload-placeholder span {
        font-size: 0.8rem;
        color: var(--gray-400);
    }

    .upload-preview {
        width: 100%;
        height: 100%;
        position: relative;
    }

    .upload-preview img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .remove-image {
        position: absolute;
        top: 10px;
        left: 10px;
        background: var(--danger);
        color: white;
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .remove-image:hover {
        transform: scale(1.1);
    }

    /* Toggle Switch */
    .toggle-switch {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .toggle-switch input {
        display: none;
    }

    .toggle-slider {
        width: 50px;
        height: 26px;
        background: var(--gray-300);
        border-radius: var(--radius-full);
        position: relative;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .toggle-slider::before {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        background: white;
        border-radius: 50%;
        top: 3px;
        right: 3px;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-sm);
    }

    .toggle-switch input:checked + .toggle-slider {
        background: var(--accent);
    }

    .toggle-switch input:checked + .toggle-slider::before {
        right: 27px;
    }

    .toggle-label {
        font-weight: 500;
        color: var(--gray-700);
    }

    /* Preview Card */
    .preview-card {
        background: var(--gray-50);
        border-radius: var(--radius-lg);
        padding: 1rem;
        border: 1px solid var(--gray-200);
    }

    .preview-card h5 {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--gray-600);
        margin-bottom: 1rem;
    }

    .preview-content {
        background: white;
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .preview-image {
        height: 120px;
        background: var(--gray-200);
    }

    .preview-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .preview-info {
        padding: 0.75rem;
    }

    .preview-category {
        font-size: 0.7rem;
        color: var(--accent);
        font-weight: 600;
        text-transform: uppercase;
    }

    .preview-info h6 {
        font-size: 0.9rem;
        font-weight: 700;
        margin: 0.25rem 0;
        color: var(--gray-900);
    }

    .preview-price {
        font-weight: 700;
        color: var(--accent);
    }

    /* Form Actions */
    .form-actions {
        display: flex;
        justify-content: flex-end;
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--gray-200);
    }

    .btn-cancel {
        background: var(--gray-100);
        color: var(--gray-600);
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: var(--radius);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-cancel:hover {
        background: var(--gray-200);
    }

    .btn-submit {
        background: var(--gradient-accent);
        color: white;
        border: none;
        padding: 0.75rem 2rem;
        border-radius: var(--radius);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
    }

    .btn-submit.editing {
        background: var(--info);
    }

    /* Categories Grid */
    .categories-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .category-card {
        background: white;
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        box-shadow: var(--shadow-sm);
        transition: all 0.3s ease;
    }

    .category-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

    .category-icon {
        width: 55px;
        height: 55px;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
    }

    .category-info h4 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--gray-900);
        margin: 0 0 0.25rem;
    }

    .category-count {
        font-size: 0.85rem;
        color: var(--gray-500);
    }

    /* Settings */
    .settings-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .btn-save {
        background: var(--gradient-primary);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: var(--radius);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-save:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .info-list {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .info-item {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--gray-100);
    }

    .info-item:last-child {
        border-bottom: none;
    }

    .info-label {
        color: var(--gray-500);
    }

    .info-value {
        font-weight: 600;
        color: var(--gray-900);
    }

    /* Recent Items */
    .recent-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem;
        border-radius: var(--radius);
        transition: background 0.3s ease;
    }

    .recent-item:hover {
        background: var(--gray-50);
    }

    .recent-item img {
        width: 45px;
        height: 45px;
        border-radius: var(--radius);
        object-fit: cover;
    }

    .recent-info {
        flex: 1;
    }

    .recent-name {
        display: block;
        font-weight: 600;
        color: var(--gray-900);
        font-size: 0.9rem;
    }

    .recent-price {
        font-size: 0.8rem;
        color: var(--accent);
        font-weight: 600;
    }

    .recent-category {
        font-size: 0.75rem;
        color: var(--gray-500);
        background: var(--gray-100);
        padding: 0.2rem 0.6rem;
        border-radius: var(--radius-full);
    }

    /* Empty State */
    .empty-state {
        text-align: center;
        padding: 3rem;
    }

    .empty-state i {
        font-size: 4rem;
        color: var(--gray-300);
        margin-bottom: 1rem;
    }

    .empty-state h4 {
        color: var(--gray-700);
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        color: var(--gray-500);
        margin-bottom: 1.5rem;
    }

    /* Modal */
    .modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(4px);
    }

    .modal-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .modal-box {
        background: white;
        border-radius: var(--radius-xl);
        padding: 2rem;
        max-width: 400px;
        width: 90%;
        text-align: center;
        transform: scale(0.9);
        transition: transform 0.3s ease;
    }

    .modal-overlay.show .modal-box {
        transform: scale(1);
    }

    .modal-icon {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        margin: 0 auto 1rem;
    }

    .modal-icon.danger {
        background: rgba(239, 68, 68, 0.15);
        color: var(--danger);
    }

    .modal-box h3 {
        font-family: var(--font-display);
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .modal-box p {
        color: var(--gray-500);
        margin-bottom: 1.5rem;
    }

    .modal-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
    }

    .btn-danger {
        background: var(--danger);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: var(--radius);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-danger:hover {
        background: #dc2626;
    }

    /* Responsive */
    @media (max-width: 1200px) {
        .stats-grid { grid-template-columns: repeat(2, 1fr); }
        .categories-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 992px) {
        .admin-sidebar {
            transform: translateX(260px);
        }
        .admin-sidebar.show {
            transform: translateX(0);
        }
        .admin-main {
            margin-right: 0;
        }
        .sidebar-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .product-form .form-grid {
            grid-template-columns: 1fr;
        }
        .settings-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 768px) {
        .stats-grid { grid-template-columns: 1fr; }
        .categories-grid { grid-template-columns: 1fr; }
        .filters-bar { flex-direction: column; }
        .filter-group { width: 100%; }
        .btn-add { width: 100%; margin: 0; }
        .form-row { grid-template-columns: 1fr; }
    }