/* ===================================================
   GOMATE — Admin Panel Mobile Stylesheet
   Ultra-Premium Dark Glassmorphic Mobile UI
   Matching MRDU Ride / GOMATE Campus Design System
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Backgrounds */
    --bg-darkest: #030712;
    --bg-main: #0a0f1d;
    --bg-surface: #11192e;
    --bg-surface-glass: rgba(17, 25, 46, 0.85);
    --bg-card: #18233d;
    --bg-card-hover: #1f2d4e;
    --bg-input: #0e1528;
    
    /* Vibrant Accent Colors */
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.4);
    
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.3);
    
    --accent-amber: #f59e0b;
    --accent-amber-glow: rgba(245, 158, 11, 0.25);
    
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.3);
    
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.3);

    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders & Outlines */
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-highlight: rgba(99, 102, 241, 0.4);
    --border-focus: #6366f1;

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Layout Dimensions */
    --nav-height: 68px;
    --header-height: 64px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.25);
}

/* ===== Global Resets & Base Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

input, select, textarea {
    user-select: auto;
}

body {
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
}

/* ===== Mobile App Container Frame ===== */
#app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-main);
    overflow: hidden;
    position: relative;
    /* KEY: flex column — all children stack & fill correctly */
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 80px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,0.06);
}

@media (min-width: 500px) {
    #app-container {
        height: min(94vh, 900px);
        border-radius: 36px;
        border: 3px solid #1e293b;
    }
}

/* ===== Admin Main View =====
   Rendered by default with live real-time spinner so navbar & header
   appear instantly on entry without any flicker or delay. */
#admin-main-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

/* ===== Access Denied Screen ===== */
#access-denied-view {
    display: none;           /* JS will set to flex */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 28px;
    height: 100%;
}

/* ===== Sticky Mobile Header ===== */
.mobile-header {
    height: var(--header-height);
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-back {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.btn-back:active {
    transform: scale(0.92);
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
}

.header-title-block h1 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    font-size: 11px;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulseDot 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulseDot {
    0%, 100% { opacity: 0.5; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.35); box-shadow: 0 0 14px var(--accent-green); }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-header-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.btn-header-action:hover {
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.btn-header-action:active {
    transform: scale(0.92);
    color: #fff;
    background: var(--bg-card-hover);
}

/* ===== Scrollable Mobile Content =====
   flex:1 + min-height:0 = this area grows to fill all space between
   the sticky header and the fixed nav bar, and scrolls internally. */
.mobile-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* nav height + FAB lift (28px) + breathing room + safe area */
    padding: 14px 13px calc(var(--nav-height) + 52px + env(safe-area-inset-bottom, 0px));
}

.mobile-content::-webkit-scrollbar { width: 2px; }
.mobile-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.10);
    border-radius: 2px;
}

/* ===== KPI Metrics 2x2 Grid ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    background-image: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
}

.kpi-card:active {
    transform: translateY(1px) scale(0.98);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-color, var(--primary));
    box-shadow: 0 0 10px var(--card-color, var(--primary));
}

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.kpi-icon {
    font-size: 20px;
    color: var(--card-color, var(--primary-light));
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: var(--radius-xs);
}

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.kpi-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Search & Filter Toolbar ===== */
.search-container {
    position: relative;
    margin-bottom: 12px;
}

.search-container i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 19px;
    transition: color 0.2s;
}

.search-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px 12px 44px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--primary-light);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-input:focus + i,
.search-container:focus-within i {
    color: var(--primary-light);
}

/* Filter Chips Slider */
.filter-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 14px;
    scrollbar-width: none;
}
.filter-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.filter-chip:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-chip.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #818cf8;
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.filter-chip:active {
    transform: scale(0.94);
}

/* Results Header Bar */
.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.results-bar strong {
    color: var(--text-primary);
    font-weight: 700;
}

.sort-pill-select {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-pill-select:focus {
    border-color: var(--primary-light);
}

/* ===== User Mobile Cards List ===== */
.user-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
    background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
}

.user-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.user-card.blocked-card {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
    background-image: linear-gradient(160deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0) 100%);
}

.user-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

.user-name-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.user-display-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.status-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: var(--accent-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.status-badge.blocked {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #f87171;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.user-email-line {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    font-weight: 500;
}

.user-meta-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.meta-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 11px;
}

.meta-chip.highlight {
    color: var(--primary-light);
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 700;
}

.meta-chip.rides {
    color: var(--secondary);
    border-color: rgba(6, 182, 212, 0.35);
    background: rgba(6, 182, 212, 0.1);
    font-weight: 700;
}

.uid-tap-row {
    background: var(--bg-input);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.uid-tap-row:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.uid-tap-row:active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    transform: scale(0.98);
}

/* Card Action Buttons Grid */
.card-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 8px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-card-action:active {
    transform: scale(0.94);
}

.btn-action-view {
    background: var(--bg-card);
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.btn-action-view:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-action-pdf {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--primary-light);
}

.btn-action-pdf:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-action-block {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.btn-action-block:hover {
    background: var(--accent-amber);
    color: #111;
    border-color: var(--accent-amber);
}

.btn-action-unblock {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.btn-action-unblock:hover {
    background: var(--accent-green);
    color: #fff;
    border-color: var(--accent-green);
}

.btn-action-delete {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.btn-action-delete:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}

/* ===== Empty Box View ===== */
.empty-box {
    padding: 56px 16px;
    text-align: center;
    color: var(--text-muted);
}

.empty-box i {
    font-size: 46px;
    margin-bottom: 10px;
    opacity: 0.6;
    color: var(--primary-light);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* ===== Bottom Mobile Navigation Bar — Constantly Fixed at Bottom ===== */
#mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
    background: rgba(11, 17, 35, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px env(safe-area-inset-bottom, 0px);
    z-index: 500;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.6);
    /* Subtle gradient separator */
    background-image: linear-gradient(to top, rgba(79,70,229,0.06) 0%, transparent 100%);
    overflow: visible;
}

@media (min-width: 500px) {
    #mobile-bottom-nav {
        position: absolute;
        bottom: 0;
        left: 0;
        transform: none;
        border-bottom-left-radius: 34px;
        border-bottom-right-radius: 34px;
    }
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 72px;
    letter-spacing: 0.02em;
}

.nav-btn i {
    font-size: 24px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn.active,
.nav-btn:hover {
    color: var(--primary-light);
}

.nav-btn.active i {
    transform: scale(1.12);
    filter: drop-shadow(0 0 6px rgba(129,140,248,0.6));
}

.nav-btn:active {
    transform: scale(0.9);
}

/* Elevated Center FAB — lifts smoothly above nav bar */
.nav-fab-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-26px);
    margin-top: 0;
    line-height: 0;
    flex-shrink: 0;
}

.nav-fab-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7c3aed 0%, #4f46e5 50%, #3730a3 100%);
    /* Thick border matches bg so the notch arc looks clean */
    border: 4px solid #090e1c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow:
        0 0 0 1px rgba(129,140,248,0.3),
        0 8px 24px rgba(79,70,229,0.55),
        0 2px 6px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fabPulse 3s infinite ease-in-out;
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(129,140,248,0.3), 0 8px 24px rgba(79,70,229,0.55), 0 2px 6px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 0 5px rgba(129,140,248,0.12), 0 10px 30px rgba(79,70,229,0.7), 0 2px 6px rgba(0,0,0,0.5); }
}

.nav-fab-btn:hover {
    transform: scale(1.07) translateY(-2px);
    animation: none;
    box-shadow: 0 0 0 5px rgba(129,140,248,0.18), 0 14px 32px rgba(79,70,229,0.7);
}

.nav-fab-btn:active {
    transform: scale(0.91);
    animation: none;
    box-shadow: 0 2px 10px rgba(79,70,229,0.4);
}

/* ===== Bottom Sheets / Modals ===== */
.mobile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mobile-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-sheet {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-bottom: none;
    border-radius: 30px 30px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.85);
}

.mobile-modal-overlay.active .mobile-sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 12px auto 6px;
}

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

.sheet-header h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sheet-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.sheet-close:hover {
    color: var(--text-primary);
}

.sheet-body {
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.sheet-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    background: var(--bg-main);
}

/* Form Controls in Bottom Sheet */
.m-form-group {
    margin-bottom: 15px;
}

.m-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.m-form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
}

.m-form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.m-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-full {
    flex: 1;
    padding: 13px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-full:active {
    transform: scale(0.96);
}

.btn-primary-m {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    color: #fff;
    box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-primary-m:hover {
    box-shadow: 0 8px 22px var(--primary-glow);
}

.btn-secondary-m {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary-m:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-m {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-red-glow);
}

/* ===== Mobile Toast Alert ===== */
#mobile-toast {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    background: rgba(24, 35, 61, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(79, 70, 229, 0.25);
    z-index: 10000;
    transform: translateY(-90px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

#mobile-toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ===== Access Denied Screen ===== */
.access-denied-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 24px;
    height: 100%;
}

.access-lock-icon {
    width: 80px;
    height: 80px;
    border-radius: 26px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 22px;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.25);
    animation: lockPulse 2s infinite ease-in-out;
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
