/* KIGA Panel - Modern Glassmorphism with Dark/Light Mode */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ===== DARK MODE (Premium Gold) ===== */
:root,
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --glass-bg: rgba(25, 25, 25, 0.85);
    --glass-border: rgba(255, 215, 0, 0.15); /* Gold Border */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    
    /* Golden accents */
    --accent-blue: #ffd700; /* Main Gold */
    --accent-blue-hover: #e6c200; /* Darker Gold */
    --accent-purple: #ffb700; /* Orange-Gold */
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-pink: #d946ef;
    --accent-orange: #f59e0b;
    
    --sidebar-hover: rgba(255, 215, 0, 0.08);
    --input-bg: rgba(0, 0, 0, 0.4);
    --table-hover: rgba(255, 215, 0, 0.04);
    --modal-bg: rgba(0,0,0,0.85);
    --shadow-color: rgba(255, 215, 0, 0.05);
    --card-bg: rgba(30, 30, 30, 0.6);
    --theme-icon: '☀️';
}

/* ===== LIGHT MODE ===== */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    --accent-blue: #ca8a04; /* Dark Gold for Light Mode */
    --accent-blue-hover: #a16207;
    --accent-purple: #b45309;
    --accent-green: #059669;
    --accent-red: #dc2626;
    --accent-pink: #db2777;
    --accent-orange: #d97706;
    
    --sidebar-hover: rgba(0, 0, 0, 0.04);
    --input-bg: rgba(255, 255, 255, 0.9);
    --table-hover: rgba(0, 0, 0, 0.02);
    --modal-bg: rgba(0,0,0,0.5);
    --shadow-color: rgba(0,0,0,0.05);
    --card-bg: rgba(255,255,255,0.8);
    --theme-icon: '🌙';
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', 'Outfit', sans-serif;
}

html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(251, 191, 36, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.12) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px var(--shadow-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.nav-brand img.site-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.theme-toggle:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: scale(1.05);
}

.theme-toggle-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Vazirmatn', 'Outfit', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #121212; /* Dark text for better contrast on gold */
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.35);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .btn-glass {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-glass:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #f97316);
    color: white;
}

/* ===== AUTH PAGES ===== */
.auth-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem 2rem;
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
    font-family: 'Vazirmatn', 'Outfit', sans-serif;
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .form-control {
    border-color: rgba(0,0,0,0.15);
}

.auth-card .btn {
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
}

.auth-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--accent-blue);
    text-decoration: none;
}

/* ===== DASHBOARD ===== */
.dashboard-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 2rem 5%;
    flex: 1;
}

.sidebar {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 90px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--sidebar-hover);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-blue);
    border-right: 3px solid var(--accent-blue);
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

/* ===== TABLE ===== */
.data-table-container {
    padding: 1rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.9rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover td {
    background: var(--table-hover);
}

/* ===== FLASH MESSAGES ===== */
.flashes {
    list-style: none;
}

.flash {
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flash::before { content: 'ℹ️'; }

.flash.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}
.flash.error::before { content: '❌'; }

.flash.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}
.flash.success::before { content: '✅'; }

.flash.warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}
.flash.warning::before { content: '⚠️'; }

/* ===== MODAL ===== */
.kiga-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--modal-bg);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.kiga-modal-overlay.active {
    display: flex;
}

.kiga-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .kiga-modal {
    background: #ffffff;
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blue { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.badge-green { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-red { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-yellow { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-gray { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.badge-purple { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 0.5rem 1rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 30px var(--shadow-color);
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.4rem 0.3rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.bottom-nav-item:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.bottom-nav-item.active {
    color: var(--accent-blue);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
}

.sidebar-backdrop, .sidebar-close-btn, .nav-close-btn { display: none; }

/* ===== MOBILE NAVBAR HAMBURGER ===== */
.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: 1fr !important;
        padding: 0.5rem;
        margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
    .sidebar {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        max-height: 100vh;
        z-index: 1050;
        background: var(--bg-secondary);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 2rem 1.5rem;
        box-shadow: -5px 0 30px rgba(0,0,0,0.5);
        overflow-y: auto;
        border-radius: 0;
    }
    .sidebar.open {
        right: 0;
    }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 1040;
        backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .sidebar-backdrop.open {
        display: block;
        opacity: 1;
    }
    .sidebar-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        position: absolute;
        top: 1rem;
        left: 1rem;
        border-radius: 10px;
        background: rgba(239, 68, 68, 0.15);
        color: var(--accent-red);
        cursor: pointer;
        font-size: 1.2rem;
    }
    .bottom-nav {
        display: block;
    }
    .main-content {
        padding: 0;
    }
    .glass-panel {
        padding: 1rem;
        border-radius: 15px;
    }
    h1 {
        font-size: 1.6rem !important;
    }
    h2 {
        font-size: 1.4rem !important;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .dashboard-header .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Fix inline grids on mobile */
    div[style*="grid-template-columns: 1fr 2fr"],
    div[style*="grid-template-columns: 1fr 1fr"],
    .checkout-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin grid-2 fix */
    .grid-2 {
        grid-template-columns: 1fr !important;
    }

    /* Profile header stack on mobile */
    .profile-header-bg {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
        padding: 1.5rem !important;
    }

    .profile-avatar-container {
        width: 90px !important;
        height: 90px !important;
    }

    /* Touch-friendly date reveal */
    .hover-reveal-date .actual-date {
        display: inline !important;
    }
    .hover-reveal-date .hidden-date {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Collapse navbar on tablets and phones */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-secondary);
        z-index: 2000;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        padding: 2rem;
    }

    .nav-links.mobile-open {
        display: flex !important;
    }

    .nav-links a {
        margin-left: 0;
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
        width: 100%;
        text-align: center;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--glass-border);
    }

    .nav-links span {
        margin-left: 0 !important;
        font-size: 1rem !important;
    }

    .nav-links .btn {
        width: 80%;
        max-width: 300px;
    }

    .nav-close-btn {
        position: absolute;
        top: 1.5rem;
        left: 1.5rem;
        background: rgba(239, 68, 68, 0.15);
        border: none;
        color: var(--accent-red);
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.3rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 0.8rem 1rem;
        margin: 0.5rem !important;
    }
    .nav-brand {
        font-size: 1.2rem;
    }
    .nav-brand img.site-logo {
        height: 28px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .glass-panel {
        padding: 0.8rem;
        border-radius: 14px;
    }
    .form-group { width: 100%; }
    .btn { padding: 0.8rem 1.2rem; font-size: 0.85rem; }
    
    /* Tables on mobile */
    .data-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.8rem;
        padding: 0 0.8rem;
    }
    table {
        min-width: 500px;
    }

    /* Flex stacking for form rows */
    .form-row {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    /* Income grid stack */
    .income-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 400px) {
    .navbar {
        padding: 0.6rem 0.8rem;
    }
    .nav-brand {
        font-size: 1rem;
        gap: 0.3rem;
    }
    .nav-brand span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .bottom-nav-item {
        font-size: 0.6rem;
        padding: 0.3rem 0.2rem;
    }
    .bottom-nav-item i {
        font-size: 1rem;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .glass-panel {
        padding: 0.7rem;
    }
}

/* ===================================================================
   ADMIN TOPBAR — Sticky header for all admin pages
   =================================================================== */

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 2px 20px var(--shadow-color);
    gap: 1rem;
}

[data-theme="dark"] .admin-topbar {
    background: rgba(18, 18, 18, 0.92);
    border-bottom-color: rgba(255, 215, 0, 0.1);
}

[data-theme="light"] .admin-topbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Brand */
.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.admin-topbar-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #121212;
    font-size: 1rem;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.admin-topbar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.admin-topbar-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
}

.admin-topbar-badge {
    font-size: 10px;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* Actions area */
.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Generic icon button */
.admin-topbar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-topbar-btn:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.25);
    color: var(--accent-blue);
    transform: scale(1.05);
}

[data-theme="light"] .admin-topbar-btn {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .admin-topbar-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Separator */
.admin-topbar-sep {
    width: 1px;
    height: 28px;
    background: var(--glass-border);
    margin: 0 4px;
}

/* Admin user info badge */
.admin-user-info {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 5px 12px 5px 8px;
}

.admin-user-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,183,0,0.15));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.admin-user-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.admin-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
}

.admin-user-role {
    font-size: 10px;
    color: var(--accent-blue);
    font-weight: 500;
    white-space: nowrap;
}

/* Logout button */
.admin-topbar-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 9px;
    color: rgba(239, 68, 68, 0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Vazirmatn', 'Outfit', sans-serif;
}

.admin-topbar-logout:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* When admin topbar is present, push dashboard down */
.admin-topbar + main .dashboard-container {
    padding-top: 1.5rem;
}

.admin-topbar ~ main .sidebar {
    top: calc(60px + 90px);
}

/* ===== Responsive: hide user details on small screens ===== */
@media (max-width: 768px) {
    .admin-topbar {
        padding: 0 1rem;
        height: 54px;
    }
    .admin-topbar-brand-text {
        display: none;
    }
    .admin-user-details {
        display: none;
    }
    .admin-user-info {
        padding: 5px 8px;
    }
    .admin-topbar-logout span {
        display: none;
    }
    .admin-topbar-logout {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .admin-user-info {
        display: none;
    }
    .admin-topbar-sep {
        display: none;
    }
}


