/* ============================================================
   CUSTOMER FRONTEND — Premium Design System
   ============================================================ */

/* --- Design Tokens --- */
:root {
    /* Brand */
    --c-indigo:       #6366f1;
    --c-indigo-dark:  #4f46e5;
    --c-indigo-light: #a5b4fc;
    --c-violet:       #8b5cf6;
    --c-amber:        #f59e0b;
    --c-amber-dark:   #d97706;

    /* Neutral */
    --c-bg:           #f4f3ff;   /* very light lavender */
    --c-surface:      #ffffff;
    --c-border:       #e8e7f0;
    --c-text:         #1e1b4b;   /* deep indigo-black */
    --c-muted:        #6b7280;

    /* Gradients */
    --grad-brand:     linear-gradient(135deg, #6366f1, #8b5cf6);
    --grad-amber:     linear-gradient(135deg, #f59e0b, #ef4444);
    --grad-dark:      linear-gradient(135deg, #1e1b4b, #312e81);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(99,102,241,0.08), 0 4px 8px rgba(99,102,241,0.06);
    --shadow-md: 0 4px 16px rgba(99,102,241,0.12), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(99,102,241,0.18), 0 4px 12px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 48px rgba(99,102,241,0.22), 0 8px 20px rgba(0,0,0,0.1);

    /* Other */
    --glass-bg:       rgba(255,255,255,0.75);
    --glass-border:   rgba(255,255,255,0.5);
    --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Legacy compat (used by admin + misc) */
    --primary-color:    #6366f1;
    --primary-light:    #8b5cf6;
    --secondary-color:  #6366f1;
    --accent-color:     #f59e0b;
    --bg-color:         #f4f3ff;
    --text-color:       #1e1b4b;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    background: var(--c-bg);
    background-image:
        radial-gradient(at 10% 0%,  rgba(99,102,241,0.07) 0, transparent 55%),
        radial-gradient(at 90% 100%, rgba(139,92,246,0.06) 0, transparent 55%);
    background-attachment: fixed;
    color: var(--c-text);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- App Container --- */
.app-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    padding-bottom: 96px;
}
.app-container.no-nav { padding-bottom: 0 !important; }

/* --- App Header (Sticky Top Bar) --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(99,102,241,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(99,102,241,0.08);
}
.app-header .brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.app-header .brand span {
    background: var(--grad-amber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Points Badge */
.points-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(239,68,68,0.08));
    border: 1px solid rgba(245,158,11,0.25);
    color: #d97706;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
}
.points-badge i { color: #f59e0b; }

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 480px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 8px;
    box-shadow: 0 8px 32px rgba(99,102,241,0.18), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 1000;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.6);
}
.nav-item {
    text-decoration: none;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    transition: var(--transition);
    padding: 6px 8px;
    border-radius: 18px;
    position: relative;
}
.nav-item i {
    font-size: 19px;
    transition: var(--transition);
}
.nav-item.active {
    color: var(--c-indigo);
    background: rgba(99,102,241,0.1);
}
.nav-item.active i {
    transform: scale(1.15);
    color: var(--c-indigo);
}

/* --- Glassmorphism Card --- */
.glass-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

/* --- Primary Button --- */
.btn-primary {
    background: var(--grad-brand);
    border: none;
    border-radius: 14px;
    padding: 13px 26px;
    font-weight: 700;
    font-size: 15px;
    color: #fff !important;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(99,102,241,0.35);
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: 0.2s;
}
.btn-primary:hover::after { background: rgba(255,255,255,0.08); }
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.45);
    color: #fff !important;
}
.btn-primary:active { transform: scale(0.97); }

/* Outline Primary */
.btn-outline-primary {
    border: 2px solid var(--c-indigo);
    color: var(--c-indigo) !important;
    border-radius: 14px;
    padding: 11px 24px;
    font-weight: 600;
    background: transparent;
    transition: var(--transition);
}
.btn-outline-primary:hover {
    background: var(--c-indigo);
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
    transform: translateY(-1px);
}

/* --- Form Controls --- */
.form-control, .form-select {
    border-radius: 14px;
    padding: 13px 16px;
    border: 1.5px solid #e5e4f0;
    background: #faf9ff;
    font-size: 14px;
    font-family: inherit;
    color: var(--c-text);
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    background: #fff;
    border-color: var(--c-indigo);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
    outline: none;
}
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--c-muted);
    margin-bottom: 6px;
}
.input-group .form-control { border-radius: 0 14px 14px 0; }
.input-group .input-group-text {
    border-radius: 14px 0 0 14px;
    border: 1.5px solid #e5e4f0;
    border-right: none;
    background: #faf9ff;
}

/* --- Auth Screens --- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 20px;
    background:
        linear-gradient(135deg, rgba(30,27,75,0.92) 0%, rgba(99,102,241,0.85) 60%, rgba(139,92,246,0.8) 100%),
        url('https://images.unsplash.com/photo-1620799139834-6b8f844fbe61?auto=format&fit=crop&w=800&q=80') center/cover no-repeat;
    position: relative;
}
.auth-content { position: relative; z-index: 1; }
.auth-title {
    color: #fff;
    font-weight: 800;
    font-size: 26px;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.auth-subtitle {
    color: rgba(255,255,255,0.75);
    margin-bottom: 24px;
    font-size: 14px;
}

/* Auth Card (inside auth-wrapper) */
.auth-wrapper .glass-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    padding: 32px 28px;
}
.auth-wrapper .form-control,
.auth-wrapper .form-select {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}
.auth-wrapper .form-control::placeholder { color: rgba(255,255,255,0.55); }
.auth-wrapper .form-control:focus {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.1);
}
.auth-wrapper .input-group-text {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.25);
}
.auth-wrapper .input-group-text i { color: rgba(255,255,255,0.7); }
.auth-wrapper .btn-primary {
    background: rgba(255,255,255,0.95);
    color: var(--c-indigo) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.auth-wrapper .btn-primary:hover {
    background: #fff;
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
    color: var(--c-indigo-dark) !important;
}

/* --- Hero Banner --- */
.hero-banner {
    margin: 16px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: var(--grad-brand);
    box-shadow: var(--shadow-xl);
    min-height: 185px;
}
.hero-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.25;
    mix-blend-mode: overlay;
    position: absolute; inset: 0;
}
.hero-content {
    position: absolute;
    top: 50%;
    left: 24px;
    right: 24px;
    transform: translateY(-50%);
    color: #fff;
    z-index: 2;
}
.hero-content h3 {
    font-weight: 800;
    margin: 0 0 6px;
    font-size: 24px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    line-height: 1.2;
}
.hero-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* --- Category Scroll --- */
.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 4px 20px 8px;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 72px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 10px 0 4px;
    transition: var(--transition);
}
.category-icon {
    width: 60px; height: 60px;
    border-radius: 18px;
    background: #fff;
    border: 1.5px solid #e8e7f0;
    display: flex; align-items: center; justify-content: center;
    margin: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    font-size: 22px;
    color: var(--c-muted);
}
.category-item.active .category-icon {
    background: var(--grad-brand);
    color: #fff;
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.35);
}
.category-item:not(.active):hover .category-icon {
    border-color: var(--c-indigo-light);
    color: var(--c-indigo);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.category-item span {
    font-size: 12px;
    font-weight: 500;
    color: var(--c-muted);
    text-align: center;
    line-height: 1.2;
}
.category-item.active span {
    color: var(--c-indigo-dark);
    font-weight: 700;
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 16px;
    padding: 16px 20px 8px;
}
.product-card {
    background: var(--c-surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(99,102,241,0.06);
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99,102,241,0.15);
}
.product-card:active { transform: scale(0.97); }

.product-img {
    height: 170px;
    background: linear-gradient(135deg, #f0efff, #ede9fe);
    position: relative;
    overflow: hidden;
}
.product-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-img img { transform: scale(1.06); }

.like-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(255,255,255,0.92);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #d1d5db;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}
.like-btn:hover { color: #ef4444; transform: scale(1.1); }

/* Price badge on image */
.product-img .price-badge {
    position: absolute;
    bottom: 10px; left: 10px;
    background: rgba(99,102,241,0.9);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.product-info { padding: 12px 14px 14px; }
.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--c-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.3;
}
.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.product-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--c-indigo);
    line-height: 1;
}
.product-price span {
    font-size: 11px;
    color: var(--c-muted);
    font-weight: 400;
}

/* Stock badge */
.stock-badge {
    font-size: 10px;
    font-weight: 600;
    background: rgba(16,185,129,0.12);
    color: #059669;
    padding: 2px 7px;
    border-radius: 6px;
}
.stock-badge.low { background: rgba(245,158,11,0.12); color: #d97706; }
.stock-badge.out { background: rgba(239,68,68,0.12); color: #dc2626; }

/* --- Section Headers --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 14px;
}
.section-header h5 {
    font-weight: 700;
    color: var(--c-text);
    margin: 0;
    font-size: 17px;
    letter-spacing: -0.2px;
}
.section-header a {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-indigo);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.section-header a:hover { color: var(--c-indigo-dark); }

/* --- Profile Card --- */
.profile-avatar {
    width: 72px; height: 72px;
    border-radius: 22px;
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(99,102,241,0.3);
    letter-spacing: -1px;
}
.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
    color: var(--c-indigo);
    border: 1px solid rgba(99,102,241,0.2);
}
.profile-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--c-muted);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 16px;
}

/* --- Cart Empty State --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
    text-align: center;
}
.empty-state-icon {
    width: 100px; height: 100px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.08));
    display: flex; align-items: center; justify-content: center;
    font-size: 42px;
    color: var(--c-indigo);
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(99,102,241,0.15);
}
.empty-state h5 {
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 8px;
    font-size: 18px;
}
.empty-state p {
    color: var(--c-muted);
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 240px;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease forwards; }

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

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, #ede9fe 25%, #ddd6fe 50%, #ede9fe 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.6s infinite ease-in-out;
    border-radius: 16px;
}
@keyframes skeletonPulse {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Search Bar Modern --- */
.search-bar-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    border: 1.5px solid #e5e4f0;
    padding: 10px 16px;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.search-bar-wrap:focus-within {
    border-color: var(--c-indigo);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.search-bar-wrap i { color: var(--c-muted); font-size: 15px; }
.search-bar-wrap input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--c-text);
    flex: 1;
    outline: none;
    padding: 0;
}
.search-bar-wrap input::placeholder { color: #b0aec0; }

/* Filter toggle btn */
.btn-filter {
    width: 46px; height: 46px;
    border-radius: 14px;
    border: 1.5px solid #e5e4f0;
    background: #fff;
    color: var(--c-indigo);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.btn-filter:hover {
    background: var(--c-indigo);
    color: #fff;
    border-color: var(--c-indigo);
}

/* --- Icon Picker (Admin) --- */
.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    border: 1.5px solid var(--c-border);
    border-radius: 14px;
    padding: 10px;
    background: #faf9ff;
    scrollbar-width: thin;
    scrollbar-color: #c4b5fd transparent;
}
.icon-picker-grid::-webkit-scrollbar { width: 4px; }
.icon-picker-grid::-webkit-scrollbar-track { background: transparent; }
.icon-picker-grid::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 4px; }

.icon-picker-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--c-muted);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1.5px solid transparent;
}
.icon-picker-item:hover {
    background: rgba(99,102,241,0.1);
    color: var(--c-indigo);
    border-color: rgba(99,102,241,0.2);
}
.icon-picker-item.selected {
    background: var(--grad-brand);
    color: #fff;
    border-color: transparent;
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(99,102,241,0.3);
}

.icon-picker-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(99,102,241,0.06);
    border-radius: 14px;
    border: 1.5px solid rgba(99,102,241,0.15);
    margin-bottom: 10px;
}
.icon-picker-preview-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--grad-brand);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.icon-picker-search {
    background: #fff;
    border: 1.5px solid #e5e4f0;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--c-text);
    width: 100%;
    outline: none;
    transition: var(--transition);
    margin-bottom: 8px;
}
.icon-picker-search:focus {
    border-color: var(--c-indigo);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}


/* ============================================================
   ADMIN PANEL — Modern Design System v2
   ============================================================ */

/* --- CSS Variables (Admin) --- */
:root {
    --admin-sidebar-w: 260px;
    --admin-topbar-h: 70px;
    --admin-mobile-topbar-h: 60px;
    --admin-bg: #f0f4ff;
    --admin-surface: #ffffff;
    --admin-border: #e8edf5;
    --admin-text: #1e293b;
    --admin-muted: #64748b;
    --admin-accent: #3b82f6;
    --admin-accent-soft: rgba(59,130,246,0.1);
    --admin-success: #10b981;
    --admin-danger: #ef4444;
    --admin-warning: #f59e0b;
    --admin-sidebar-bg1: #0f172a;
    --admin-sidebar-bg2: #1e293b;
}

/* --- Admin Wrapper --- */
.admin-wrapper {
    background: var(--admin-bg);
}

/* ---- SIDEBAR ---- */
.admin-sidebar {
    background: linear-gradient(180deg, var(--admin-sidebar-bg1) 0%, var(--admin-sidebar-bg2) 100%) !important;
    transition: var(--transition);
    box-shadow: 4px 0 30px rgba(0,0,0,0.15);
    border-right: 1px solid rgba(255,255,255,0.04);
    overflow-y: auto;
    scrollbar-width: none;
}
.admin-sidebar::-webkit-scrollbar { display: none; }

.admin-sidebar .brand {
    letter-spacing: -0.5px;
}
.admin-sidebar .brand span {
    color: var(--admin-accent);
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar section label */
.admin-sidebar .nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #475569;
    padding: 0 20px;
    margin: 16px 0 8px;
}

.admin-sidebar .nav-link {
    color: #94a3b8 !important;
    padding: 11px 16px;
    border-radius: 10px;
    margin: 2px 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    text-decoration: none;
}
.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #475569;
    transition: var(--transition);
    flex-shrink: 0;
}
.admin-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0 !important;
}
.admin-sidebar .nav-link:hover i { color: #93c5fd; }

.admin-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(59,130,246,0.2), rgba(59,130,246,0.08));
    color: #fff !important;
    box-shadow: inset 3px 0 0 var(--admin-accent);
    border-radius: 10px;
}
.admin-sidebar .nav-link.active i { color: var(--admin-accent); }

/* Active left indicator */
.admin-sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--admin-accent);
    border-radius: 0 4px 4px 0;
}

/* ---- TOPBAR (Desktop) ---- */
.admin-topbar {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--admin-border), 0 4px 20px rgba(0,0,0,0.04);
    padding: 0 28px;
    height: var(--admin-topbar-h);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--admin-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-topbar .search-box input {
    background: #f1f5f9;
    border: 1.5px solid transparent;
    transition: var(--transition);
    font-size: 14px;
}
.admin-topbar .search-box input:focus {
    background: #fff;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

/* ---- MOBILE TOPBAR FIX ---- */
/* Fixes content being hidden behind fixed mobile topbar */
.admin-main > div:last-child {
    padding-top: calc(var(--admin-mobile-topbar-h) + 16px) !important;
}
@media (min-width: 768px) {
    .admin-main > div:last-child {
        padding-top: 28px !important;
    }
}

/* ---- MAIN CONTENT AREA ---- */
.admin-main {
    background: var(--admin-bg) !important;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- PAGE HEADER ---- */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}
.admin-page-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--admin-text);
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}
.admin-page-header p {
    color: var(--admin-muted);
    margin: 0;
    font-size: 14px;
}

/* ---- CARDS ---- */
.admin-card {
    background: var(--admin-surface);
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}
.admin-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

/* ---- WIDGET / METRIC CARDS ---- */
.widget-card {
    position: relative;
    overflow: hidden;
    color: #fff;
    border: none !important;
    border-radius: 18px !important;
    padding: 22px 24px !important;
}
.widget-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
}
.widget-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: 20px;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.widget-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 30px -6px rgba(0,0,0,0.25) !important;
}
.admin-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

/* ---- TABLE ---- */
.admin-table {
    margin: 0;
}
.admin-table thead th {
    font-weight: 600;
    color: var(--admin-muted);
    border: none;
    border-bottom: 1px solid var(--admin-border);
    padding: 13px 16px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    background: #f8fafc;
    white-space: nowrap;
}
.admin-table thead th:first-child { border-radius: 0; }
.admin-table tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    color: var(--admin-text);
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td {
    background: #f8fbff;
}

/* ---- UNIFORM ACTION BUTTONS (Table) ---- */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
}
.btn-action i { font-size: 11px; }

.btn-action-view {
    color: var(--admin-accent);
    border-color: rgba(59,130,246,0.3);
    background: rgba(59,130,246,0.06);
}
.btn-action-view:hover {
    background: var(--admin-accent);
    color: #fff;
    border-color: var(--admin-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(59,130,246,0.3);
}

.btn-action-edit {
    color: #f59e0b;
    border-color: rgba(245,158,11,0.3);
    background: rgba(245,158,11,0.06);
}
.btn-action-edit:hover {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(245,158,11,0.3);
}

.btn-action-delete {
    color: var(--admin-danger);
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.06);
}
.btn-action-delete:hover {
    background: var(--admin-danger);
    color: #fff;
    border-color: var(--admin-danger);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(239,68,68,0.3);
}

.btn-action-success {
    color: var(--admin-success);
    border-color: rgba(16,185,129,0.3);
    background: rgba(16,185,129,0.06);
}
.btn-action-success:hover {
    background: var(--admin-success);
    color: #fff;
    border-color: var(--admin-success);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16,185,129,0.3);
}

/* Action button group */
.btn-action-group {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

/* ---- BADGE CHIPS ---- */
.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.badge-chip-success { background: rgba(16,185,129,0.12); color: #059669; }
.badge-chip-danger  { background: rgba(239,68,68,0.12);  color: #dc2626; }
.badge-chip-warning { background: rgba(245,158,11,0.12); color: #d97706; }
.badge-chip-info    { background: rgba(59,130,246,0.12); color: #2563eb; }
.badge-chip-neutral { background: rgba(100,116,139,0.12);color: #475569; }
.badge-chip i { font-size: 9px; }

/* ---- ADD BUTTON (Page Header) ---- */
.btn-admin-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(59,130,246,0.3);
    text-decoration: none;
}
.btn-admin-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59,130,246,0.4);
    color: #fff;
}
.btn-admin-add i { font-size: 13px; }

/* ---- MODAL POLISH ---- */
.modal-content {
    border-radius: 18px !important;
    border: 1px solid var(--admin-border) !important;
    box-shadow: 0 25px 60px -12px rgba(0,0,0,0.25) !important;
}
.modal-header {
    padding: 20px 24px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.modal-body { padding: 20px 24px !important; }
.modal-footer {
    padding: 16px 24px 20px !important;
    border-top: 1px solid #f1f5f9 !important;
}
.modal-title {
    font-weight: 700 !important;
    color: var(--admin-text);
    font-size: 16px !important;
}

/* ---- RESPONSIVE TABLE WRAPPER ---- */
.admin-card.p-0 .table-responsive {
    border-radius: 0 0 16px 16px;
}

/* ---- PAGINATION STRIP ---- */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--admin-border);
    background: #fafcff;
    border-radius: 0 0 16px 16px;
}
.admin-pagination .page-info {
    font-size: 13px;
    color: var(--admin-muted);
    font-weight: 500;
}
.btn-page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-muted);
    background: var(--admin-surface);
    border: 1.5px solid var(--admin-border);
    cursor: pointer;
    transition: var(--transition);
}
.btn-page:hover:not(:disabled) {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
    background: var(--admin-accent-soft);
}
.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---- EMPTY STATE ---- */
.admin-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--admin-muted);
}
.admin-empty-state i {
    font-size: 48px;
    opacity: 0.2;
    display: block;
    margin-bottom: 16px;
}
.admin-empty-state p { font-size: 14px; margin: 0; }

/* ---- STATS SHIMMER LOADING ---- */
@keyframes adminShimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.admin-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 400px 100%;
    animation: adminShimmer 1.5s infinite linear;
    border-radius: 6px;
    display: inline-block;
    min-width: 60px;
    height: 1em;
}

/* ---- Responsive Admin ---- */
@media (max-width: 767.98px) {
    .admin-topbar { display: none !important; }
    .admin-card { border-radius: 14px; padding: 16px; }
    .widget-card { padding: 18px !important; }
    .admin-table thead th, .admin-table tbody td { padding: 10px 12px; }
    .btn-action span { display: none; } /* Icon-only on mobile */
    .btn-action { padding: 6px 8px; }
    .admin-page-header { flex-direction: column; }
    .admin-page-header .btn-admin-add { align-self: flex-start; }
}
