:root {
    --primary: #c5a880;
    --primary-hover: #b3956d;
    --primary-light: rgba(197, 168, 128, 0.1);
    --secondary: #1e293b;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.03);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 16px -6px rgba(15, 23, 42, 0.03);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.sidebar-header p {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 0;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-size: 14px;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.03);
    border-left-color: var(--primary);
}

.sidebar-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    text-align: center;
    color: var(--text-muted);
}

/* Main Area Layout */
.main-wrapper {
    margin-left: 260px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Admin Navbar */
.admin-navbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
}

.navbar-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.navbar-btn {
    padding: 8px 16px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.navbar-btn:hover {
    background-color: var(--border-color);
}

/* Main Content Container */
.admin-container {
    padding: 40px;
    flex-grow: 1;
}

/* Dashboard Summary Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.stat-card-details h3 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card-details .value {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
}

.icon-primary {
    background-color: rgba(197, 168, 128, 0.15);
    color: var(--primary);
}

.icon-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

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

.icon-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* Data Tables */
.data-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 40px;
}

.data-card-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-card-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
}

.btn-add {
    padding: 10px 18px;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-add:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 16px 30px;
    background-color: var(--bg-light);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 16px 30px;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.thumbnail {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
}

.btn-action.edit {
    color: var(--primary);
}

.btn-action.edit:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.btn-action.delete {
    color: var(--error);
}

.btn-action.delete:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

.btn-action.view {
    color: var(--secondary);
}

.btn-action.view:hover {
    background-color: rgba(30, 41, 59, 0.1);
    border-color: var(--secondary);
}

/* Admin Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-info {
    background-color: rgba(197, 168, 128, 0.15);
    color: var(--primary);
}

/* Form Styles */
.form-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.image-preview-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.image-preview {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.btn-submit {
    padding: 12px 24px;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

.btn-cancel {
    padding: 12px 24px;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

.btn-cancel:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Login styling overrides */
.login-body {
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px;
    color: #ffffff;
}

.login-card h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 25px;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 1px;
}

.login-card .form-control {
    background-color: rgba(15, 23, 42, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.login-card label {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Admin Dashboard */
@media (max-width: 768px) {
    .sidebar {
        left: -260px;
        width: 260px;
        transition: left 0.3s ease-in-out;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .admin-navbar {
        padding: 16px 20px;
        display: flex;
        align-items: center;
    }
    
    .admin-container {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Show mobile hamburger toggle */
    .admin-mobile-toggle {
        display: flex !important;
    }
    
    /* Sidebar Backdrop overlay */
    .admin-sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        z-index: 95;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
    
    .admin-sidebar-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Hide avatar/name on narrow screens to prevent overlap */
    .navbar-user .user-info {
        display: none !important;
    }
}

/* Premium Table and General Card Styles */
.table-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.table-card:hover {
    box-shadow: var(--shadow-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    padding: 14px 20px;
    background-color: var(--bg-light);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tr:hover {
    background-color: rgba(197, 168, 128, 0.02);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Action button icons styling */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 13px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.action-btn.btn-edit {
    color: var(--primary);
}

.action-btn.btn-edit:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-hover);
}

.action-btn.btn-delete {
    color: var(--error);
}

.action-btn.btn-delete:hover {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: var(--error);
}

/* Badge modifiers */
.badge-error {
    background-color: var(--error);
    color: #ffffff;
    font-weight: 700;
}

