/* ============================================================
   QR Dashboard — Luxury Tech Minimalist Design System
   Dark Mode | Glassmorphism 2.0 | Muted Palette | Depth
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
    color-scheme: dark;

    /* Core palette — Charcoal & Pure Black */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #161616;

    /* Glassmorphism 2.0 — Refined */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.055);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.10);
    --glass-blur: blur(24px);
    --glass-bevel: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.3);

    /* Muted Accent Colors — Zero Neon */
    --accent-purple: #6b5b95;
    --accent-purple-light: #8677a9;
    --accent-blue: #5b7ea1;
    --accent-blue-muted: #4a6d8c;
    --accent-green: #5a8a7a;
    --accent-green-muted: #4d7a6b;
    --accent-gold: #b89947;
    --accent-gold-light: #c9a954;
    --accent-gold-dark: #9a803b;
    --accent-red: #a35050;
    --accent-amber: #a3854a;

    /* Gradients — Subtle, Desaturated */
    --gradient-primary: linear-gradient(135deg, #6b5b95, #5b7ea1);
    --gradient-primary-hover: linear-gradient(135deg, #7a6ba5, #6b8eb1);
    --gradient-gold: linear-gradient(135deg, #b89947, #c9a954);
    --gradient-success: linear-gradient(135deg, #5a8a7a, #6a9a8a);
    --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(107, 91, 149, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(91, 126, 161, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(90, 138, 122, 0.02) 0%, transparent 50%);

    /* Text */
    --text-primary: #f0f0f0;
    --text-secondary: rgba(240, 240, 240, 0.55);
    --text-tertiary: rgba(240, 240, 240, 0.30);
    --text-accent: #8677a9;

    /* Shadows — Depth over Color */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.65);
    --shadow-3d-purple: 0 4px 14px rgba(107, 91, 149, 0.2), 0 1px 3px rgba(0,0,0,0.3);
    --shadow-3d-gold: 0 4px 14px rgba(184, 153, 71, 0.2), 0 1px 3px rgba(0,0,0,0.3);

    /* Sizing */
    --sidebar-width: 260px;
    --header-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --tabbar-height: 64px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-blue-muted);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input,
select,
textarea {
    font-family: inherit;
    outline: none;
}

/* ============================================================
   DIALOG NATIVE FIXES
   ============================================================ */
dialog {
    max-height: 90vh;
    max-width: 95vw;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image: var(--gradient-mesh);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(107, 91, 149, 0.015) 60deg,
            transparent 120deg,
            rgba(91, 126, 161, 0.015) 180deg,
            transparent 240deg,
            rgba(90, 138, 122, 0.015) 300deg,
            transparent 360deg);
    animation: rotateBg 40s linear infinite;
}

@keyframes rotateBg {
    to {
        transform: rotate(360deg);
    }
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: rgba(22, 22, 22, 0.65);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--glass-bevel);
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-3d-purple);
}

.login-logo .logo-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

/* 3D Avatar for Login */
.login-avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-avatar-3d {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(107, 91, 149, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(107, 91, 149, 0.08);
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(107, 91, 149, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

/* PC: Purple glow on focus */
.form-group input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(107, 91, 149, 0.12);
}

.form-group input:user-invalid {
    border-color: var(--accent-red);
}

.login-error {
    display: none;
    padding: 0.75rem 1rem;
    background: rgba(163, 80, 80, 0.1);
    border: 1px solid rgba(163, 80, 80, 0.2);
    border-radius: var(--radius-md);
    color: #d4a0a0;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.login-error.visible {
    display: block;
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-6px);
    }
    75% {
        transform: translateX(6px);
    }
}

/* ── Primary Button (PC: Muted Purple 3D Relief) ── */
.btn-primary {
    width: 100%;
    padding: 0.8125rem 1.5rem;
    background: var(--accent-purple);
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    position: relative;
    overflow: hidden;
    /* 3D Relief Effect */
    box-shadow: 0 4px 12px rgba(107, 91, 149, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.12),
                inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(107, 91, 149, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15),
                inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    background: var(--accent-purple-light);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(107, 91, 149, 0.2),
                inset 0 2px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
}

.btn-primary.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Social Login Icons */
.social-login {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.social-login-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 2px 6px rgba(0,0,0,0.2);
    overflow: hidden;
}

.social-login-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
}

.social-login-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.social-login-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* ============================================================
   DASHBOARD LAYOUT — Bento Box Grid
   ============================================================ */

.dashboard-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* ── Sidebar — Neutral Grey ── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-3d-purple);
}

.sidebar-brand .brand-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.sidebar-brand .brand-text h2 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.sidebar-brand .brand-text span {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 0.75rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6875rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    margin-bottom: 2px;
    border: 1px solid transparent;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.nav-item:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.nav-item:hover svg {
    opacity: 0.8;
}

.nav-item.active {
    background: rgba(107, 91, 149, 0.1);
    color: var(--accent-purple-light);
    border-color: rgba(107, 91, 149, 0.15);
}

.nav-item.active svg {
    opacity: 1;
    color: var(--accent-purple-light);
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--glass-border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-details .name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-details .email {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    background: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.btn-logout svg {
    width: 18px;
    height: 18px;
    opacity: 0.5;
}

.btn-logout:hover {
    background: rgba(163, 80, 80, 0.08);
    color: #d4a0a0;
    border-color: rgba(163, 80, 80, 0.12);
}

/* ── Mobile sidebar toggle ── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
}

.sidebar-toggle svg {
    width: 22px;
    height: 22px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 90;
}

/* ── Main Content ── */
.main-content {
    grid-column: 2;
    padding: 2rem 2.5rem;
    background: var(--bg-primary);
    background-image: var(--gradient-mesh);
    min-height: 100vh;
}

/* ── Page Header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--accent-purple);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-3d-purple);
}

.btn-create svg {
    width: 18px;
    height: 18px;
}

.btn-create:hover {
    transform: translateY(-1px);
    background: var(--accent-purple-light);
}

.btn-create:active {
    transform: translateY(0);
}

/* ============================================================
   STAT CARDS — Neutral Grey, Subtle Depth
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.god-stat-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.god-stat-card:hover {
    transform: translateY(-3px);
}

.god-stat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.god-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.god-stat-icon svg {
    width: 24px;
    height: 24px;
}

.god-stat-label {
    font-size: 1rem;
    font-weight: 600;
}

.god-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.stat-card {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(145deg, rgba(50, 50, 50, 0.25), rgba(15, 15, 15, 0.65));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.3), rgba(20, 20, 20, 0.7));
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.stat-card-icon svg {
    width: 22px;
    height: 22px;
}

/* Colored Glassmorphism Gradients for Stat Cards */
.stats-grid .stat-card:nth-child(1) {
    background: linear-gradient(145deg, rgba(40, 50, 60, 0.6), rgba(15, 15, 15, 0.85));
}
.stats-grid .stat-card:nth-child(1) .stat-card-icon {
    background: rgba(91, 126, 161, 0.15);
    color: var(--accent-blue-muted);
}

.stats-grid .stat-card:nth-child(2) {
    background: linear-gradient(145deg, rgba(40, 60, 50, 0.6), rgba(15, 15, 15, 0.85));
}
.stats-grid .stat-card:nth-child(2) .stat-card-icon {
    background: rgba(90, 138, 122, 0.15);
    color: var(--accent-green);
}

.stats-grid .stat-card:nth-child(3) {
    background: linear-gradient(145deg, rgba(60, 55, 40, 0.6), rgba(15, 15, 15, 0.85));
}
.stats-grid .stat-card:nth-child(3) .stat-card-icon {
    background: rgba(184, 153, 71, 0.15);
    color: var(--accent-gold);
}

.stats-grid .stat-card:nth-child(4) {
    background: linear-gradient(145deg, rgba(50, 40, 60, 0.6), rgba(15, 15, 15, 0.85));
}
.stats-grid .stat-card:nth-child(4) .stat-card-icon {
    background: rgba(107, 91, 149, 0.15);
    color: var(--accent-purple-light);
}

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

/* ============================================================
   CARDS — Neutral Dark Grey Boxes
   ============================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm), var(--glass-bevel);
    transition: border-color var(--transition-fast);
}

.card:hover {
    border-color: var(--glass-border-hover);
}

/* ============================================================
   CHART SECTIONS — Sober Muted
   ============================================================ */

.charts-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.charts-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.chart-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast);
    box-shadow: var(--shadow-sm), var(--glass-bevel);
}

.chart-card:hover {
    border-color: var(--glass-border-hover);
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.chart-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-card-header .badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    background: rgba(107, 91, 149, 0.1);
    color: var(--accent-purple-light);
    font-weight: 500;
}

.chart-container {
    position: relative;
    width: 100%;
}

.chart-container.area-chart {
    height: 280px;
}

.chart-container.doughnut-chart {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    margin-top: 0.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================
   LINKS TABLE — Clean Neutral
   ============================================================ */

.table-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-wrapper {
    overflow-x: auto;
}

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

.data-table thead th {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--glass-bg-hover);
}

.data-table tbody td {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

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

.link-title {
    font-weight: 600;
    color: var(--text-primary);
}

.link-code {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(107, 91, 149, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--accent-purple-light);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-weight: 500;
}

.link-url {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.status-badge.active {
    background: rgba(90, 138, 122, 0.12);
    color: #7aaa9a;
}

.status-badge.active::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(90, 138, 122, 0.3);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 4px rgba(90, 138, 122, 0);
    }
}

.status-badge.inactive {
    background: rgba(163, 80, 80, 0.1);
    color: #c99999;
}

.status-badge.inactive::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-red);
}

.scan-count {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Action buttons */
.action-btns {
    display: flex;
    gap: 0.375rem;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.btn-icon:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

.btn-icon.btn-copy:hover {
    color: var(--accent-blue);
    border-color: rgba(91, 126, 161, 0.2);
}

.btn-icon.btn-edit:hover {
    color: var(--accent-gold);
    border-color: rgba(184, 153, 71, 0.2);
}

.btn-icon.btn-delete:hover {
    color: var(--accent-red);
    border-color: rgba(163, 80, 80, 0.2);
}

.table-empty {
    padding: 3rem;
    text-align: center;
    color: var(--text-tertiary);
}

.table-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* ============================================================
   RECENT ACTIVITY
   ============================================================ */

.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-item:first-child {
    padding-top: 0;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-blue);
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    gap: 0.75rem;
    margin-top: 0.125rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   MODAL (Native <dialog>) — Refined Glassmorphism
   ============================================================ */

.modal {
    margin: auto;
    max-width: 520px;
    width: 95vw;
    padding: 0;
    background: rgba(16, 16, 16, 0.85);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: var(--shadow-xl), var(--glass-bevel);
    color: var(--text-primary);
    overflow: visible;
}

/* Subtle muted glow behind the modal */
.modal::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(107, 91, 149, 0.25), rgba(91, 126, 161, 0.25));
    z-index: -1;
    filter: blur(20px);
    border-radius: 26px;
    opacity: 0.2;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal-box {
    position: relative;
    z-index: 1;
    background: transparent;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.btn-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.btn-close:hover {
    background: rgba(163, 80, 80, 0.12);
    color: var(--accent-red);
    border-color: rgba(163, 80, 80, 0.2);
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.btn-secondary {
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   MODAL TABS
   ============================================================ */
.modal-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.modal-tabs::-webkit-scrollbar {
    height: 4px;
}

.modal-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.modal-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.modal-tab.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-color: var(--glass-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Biolink Rows inside Modal */
.bio-link-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.bio-link-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.bio-link-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bio-link-inputs .form-input {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
}

.bio-link-row .btn-delete {
    width: 44px;
    height: 44px;
    background: rgba(163, 80, 80, 0.08);
    color: var(--accent-red);
    border: 1px solid transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bio-link-row .btn-delete:hover {
    background: rgba(163, 80, 80, 0.15);
    border-color: rgba(163, 80, 80, 0.2);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    color: var(--text-primary);
    animation: slideInRight 0.3s ease-out;
    min-width: 280px;
}

.toast.success {
    border-left: 3px solid var(--accent-green);
}

.toast.error {
    border-left: 3px solid var(--accent-red);
}

.toast.info {
    border-left: 3px solid var(--accent-blue);
}

.toast.hiding {
    animation: slideOutRight 0.25s ease-in forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--accent-green);
}

.toast.error .toast-icon {
    color: var(--accent-red);
}

.toast.info .toast-icon {
    color: var(--accent-blue);
}

/* ============================================================
   COUNTRY FLAGS
   ============================================================ */

.country-flag {
    font-size: 1.125rem;
    margin-right: 0.375rem;
}

/* ============================================================
   AVATAR EDIT & LOCATIONS LIST
   ============================================================ */

.avatar-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    color: white;
}

.user-avatar:hover .avatar-edit-overlay {
    opacity: 1;
}

.location-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background var(--transition-fast);
}

.location-item:hover {
    background: var(--glass-bg-hover);
}

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

.location-info {
    display: flex;
    flex-direction: column;
}

.location-city {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.location-region {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.location-count {
    background: rgba(107, 91, 149, 0.1);
    color: var(--accent-purple-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */

.day-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.day-toggle input[type="checkbox"] {
    display: none;
}

.day-toggle span {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.day-toggle input[type="checkbox"]:checked + span {
    background: rgba(107, 91, 149, 0.15);
    border-color: var(--accent-purple);
    color: #fff;
}

.day-toggle:hover span {
    background: rgba(255,255,255,0.06);
}

.day-toggle input[type="checkbox"]:checked:hover + span {
    background: rgba(107, 91, 149, 0.2);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
}
input:checked + .slider:before {
    transform: translateX(20px);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-tertiary);
}

.empty-icon svg {
    color: var(--text-tertiary);
    opacity: 0.3;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-weight: 600;
}

.empty-state p {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Segmented Control (Mode Toggle) */
.mode-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: var(--shadow-3d-purple);
}

/* Color Pickers */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 0.5rem 1rem;
}

.color-picker-wrapper input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    padding: 0;
}
.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 50%;
}
.color-picker-hex {
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Social Network Inputs */
.social-inputs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .social-inputs-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.social-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}
.social-input-wrapper:focus-within {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.03);
}
.social-icon-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid rgba(255,255,255,0.04);
    color: var(--text-secondary);
}
.social-icon-label svg {
    width: 20px;
    height: 20px;
}
.social-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0 1rem;
    color: var(--text-primary);
    height: 48px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}
.social-input-wrapper input::placeholder {
    color: rgba(255,255,255,0.15);
}

/* Brand Colors on Focus (muted) */
.social-input-wrapper.ig:focus-within .social-icon-label { color: #c0506a; }
.social-input-wrapper.tiktok:focus-within .social-icon-label { color: #cc4060; }
.social-input-wrapper.yt:focus-within .social-icon-label { color: #cc3030; }
.social-input-wrapper.twitch:focus-within .social-icon-label { color: #7a5acc; }
.social-input-wrapper.pinterest:focus-within .social-icon-label { color: #b8301e; }
.social-input-wrapper.spotify:focus-within .social-icon-label { color: #1a9946; }
.social-input-wrapper.linkedin:focus-within .social-icon-label { color: #1a6090; }
.social-input-wrapper.snapchat:focus-within .social-icon-label { color: #cccc00; }

/* Enhanced Select */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238677a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    background-color: rgba(10, 10, 10, 0.8) !important;
    border: 1px solid rgba(107, 91, 149, 0.2) !important;
    color: var(--text-primary) !important;
    padding-right: 2.5rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

select.form-input:hover {
    border-color: rgba(107, 91, 149, 0.35) !important;
}

select.form-input:focus {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 0 3px rgba(107, 91, 149, 0.12) !important;
    outline: none;
}

select.form-input option {
    background-color: #111111;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 12px;
}

/* Generic Responsive Grids */
.responsive-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) {
    .responsive-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form Inputs (Dashboard context) */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(107, 91, 149, 0.12);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(107, 91, 149, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* ============================================================
   RESPONSIVE — Desktop
   ============================================================ */

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

@media (max-width: 992px) {
    .charts-row-double {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   RESPONSIVE — Mobile (768px and below)
   Adapts to: Pure black background, gold accents, Tab Bar
   ============================================================ */

@media (max-width: 768px) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #0a0a0a;
        --bg-card: #111111;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
        padding-bottom: var(--tabbar-height);
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay.visible {
        display: block;
    }

    .main-content {
        grid-column: 1;
        padding: 1.25rem;
        padding-top: calc(var(--header-height) + 0.5rem);
        padding-bottom: calc(var(--tabbar-height) + 1rem);
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 1.375rem;
    }

    /* Mobile: Gold accent for inputs */
    .form-group input:focus,
    .form-input:focus {
        border-color: var(--accent-gold);
        box-shadow: 0 0 0 3px rgba(184, 153, 71, 0.12);
    }

    /* Mobile: Gold primary button */
    .login-page .btn-primary {
        background: var(--accent-gold);
        box-shadow: 0 4px 12px rgba(184, 153, 71, 0.25),
                    inset 0 1px 0 rgba(255, 255, 255, 0.15),
                    inset 0 -2px 0 rgba(0, 0, 0, 0.15);
    }

    .login-page .btn-primary:hover {
        background: var(--accent-gold-light);
        box-shadow: 0 6px 18px rgba(184, 153, 71, 0.3),
                    inset 0 1px 0 rgba(255, 255, 255, 0.18),
                    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    }

    /* Mobile: Gold input outlines for login */
    .login-page .form-group input {
        border-color: rgba(184, 153, 71, 0.15);
    }

    .login-page .form-group input:focus {
        border-color: var(--accent-gold);
        box-shadow: 0 0 0 3px rgba(184, 153, 71, 0.12);
    }

    /* Mobile: Switch to geometric avatar */
    .login-avatar-3d.mobile-geo {
        display: block;
    }
    .login-avatar-3d.desktop-bust {
        display: none;
    }

    /* Mobile Table to Card Layout */
    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tbody tr {
        margin-bottom: 1rem;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-md);
        padding: 0.5rem;
    }

    .data-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        padding: 0.75rem;
        text-align: right;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-tertiary);
        text-transform: uppercase;
        margin-right: 1rem;
    }

    .data-table tbody td:last-child {
        border-bottom: none;
        justify-content: flex-end;
    }

    .link-url {
        max-width: 150px;
    }

    /* Login footer link color for mobile */
    .login-footer a {
        color: var(--accent-gold) !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-panels-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Improve login card padding for smaller screens */
    .login-card {
        padding: 1.5rem;
    }

    .main-content {
        padding: 1rem;
        padding-top: calc(var(--header-height) + 0.5rem);
        padding-bottom: calc(var(--tabbar-height) + 1rem);
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 0.625rem 0.75rem;
    }
}

/* Desktop: Show bust avatar, hide geometric */
@media (min-width: 769px) {
    .login-avatar-3d.mobile-geo {
        display: none;
    }
    .login-avatar-3d.desktop-bust {
        display: block;
    }
}

/* ============================================================
   MOBILE TAB BAR — Bottom Navigation
   ============================================================ */

.mobile-tabbar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--tabbar-height);
        background: var(--bg-secondary);
        border-top: 1px solid var(--glass-border);
        z-index: 200;
        align-items: center;
        justify-content: space-around;
        padding: 0 0.5rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    .tabbar-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.5rem;
        color: var(--text-tertiary);
        font-size: 0.625rem;
        font-weight: 500;
        letter-spacing: 0.02em;
        background: none;
        border: none;
        cursor: pointer;
        transition: color var(--transition-fast);
        min-width: 56px;
    }

    .tabbar-item svg {
        width: 22px;
        height: 22px;
        stroke-width: 1.5;
    }

    .tabbar-item.active {
        color: var(--accent-gold);
    }

    .tabbar-item:hover {
        color: var(--text-secondary);
    }
}

/* ============================================================
   UTILITY ANIMATIONS
   ============================================================ */

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

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

.stagger-1 {
    animation-delay: 0.05s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.15s;
}

.stagger-4 {
    animation-delay: 0.2s;
}

.stagger-5 {
    animation-delay: 0.25s;
}

.stagger-6 {
    animation-delay: 0.3s;
}

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

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}