/* ============================================
   RockiConnect+ Admin Dashboard
   Hynex-Inspired Premium Dark Design
   v3.0 — Full Polish & Animations
   ============================================ */

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

/* ── Design Tokens ── */
:root {
    --bg-primary: #060B14;
    --bg-secondary: #0C1220;
    --bg-card: #0F1628;
    --bg-card-hover: #131B30;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-elevated: #121A2E;

    --text-primary: #E8ECF4;
    --text-secondary: #7E89A3;
    --text-muted: #4A5568;
    --btn-text-color: #ffffff;
    --primary-color: #E8431E;

    --accent-blue: #E8431E;
    --accent-cyan: #E8431E;
    --accent-purple: #A78BFA;
    --accent-green: #34D399;
    --accent-orange: #FBBF24;
    --accent-red: #F87171;

    --gradient-primary: linear-gradient(135deg, #E8431E 0%, #C73518 100%);
    --gradient-cool: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-login: linear-gradient(160deg, #060B14 0%, #0C1525 50%, #060B14 100%);
    --gradient-card-glow: linear-gradient(135deg, rgba(232, 67, 30, 0.08), rgba(232, 67, 30, 0.04));

    --border-color: rgba(232, 67, 30, 0.06);
    --border-color-hover: rgba(232, 67, 30, 0.14);
    --border-light: rgba(255, 255, 255, 0.03);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(232, 67, 30, 0.08);
    --shadow-card-hover: 0 8px 32px rgba(232, 67, 30, 0.06), 0 0 0 1px rgba(232, 67, 30, 0.1);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    --icon-filter: brightness(0) invert(1) opacity(0.45);
    --icon-filter-active: brightness(0) invert(1) opacity(0.85);

    --sidebar-width: 260px;
    --sidebar-collapsed: 68px;

    --font-body: 'Plus Jakarta Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Light Theme ── */
[data-theme="light"] {
    --bg-primary: #F0F2F7;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F7F8FC;
    --bg-glass: rgba(0, 0, 0, 0.02);
    --bg-elevated: #F7F8FC;

    --text-primary: #1A1F36;
    --text-secondary: #6B7394;
    --text-muted: #9CA3C0;

    --border-color: rgba(0, 0, 0, 0.06);
    --border-color-hover: rgba(232, 67, 30, 0.2);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(232, 67, 30, 0.06);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
    --gradient-card-glow: none;

    --icon-filter: brightness(0) opacity(0.45);
    --icon-filter-active: brightness(0) opacity(0.8);
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.55;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ============================================
   ANIMATIONS — Staggered Entrance
   ============================================ */

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

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(232, 67, 30, 0.05); }
    50% { box-shadow: 0 0 30px rgba(232, 67, 30, 0.12); }
}

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

/* ============================================
   LOGIN SCREEN
   ============================================ */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .login-screen { background: var(--bg-primary); }

.login-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(232, 67, 30, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 67, 30, 0.02) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, black 20%, transparent 100%);
    animation: fadeInScale 1.5s ease-out;
}

[data-theme="light"] .login-bg-grid {
    background-image:
        linear-gradient(rgba(232, 67, 30, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 67, 30, 0.03) 1px, transparent 1px);
}

.login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    will-change: transform;
}

.login-bg-orb--blue {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(232, 67, 30, 0.12), transparent 70%);
    top: -12%; right: -8%;
    animation: orbFloat1 22s ease-in-out infinite;
}

.login-bg-orb--purple {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1), transparent 70%);
    bottom: -10%; left: -6%;
    animation: orbFloat2 26s ease-in-out infinite;
}

.login-bg-orb--cyan {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(232, 67, 30, 0.08), transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 25px) scale(1.06); }
    66% { transform: translate(15px, -15px) scale(0.94); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(25px, -30px) scale(1.08); }
    66% { transform: translate(-15px, 15px) scale(0.92); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -55%) scale(1.12); }
}

[data-theme="light"] .login-bg-orb { display: none; }

.login-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    z-index: 2;
}

.login-container > * {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.login-logo-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -60%);
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(232, 67, 30, 0.15), transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
    animation: breathe 4s ease-in-out infinite;
}

.logo-icon {
    width: 72px; height: 72px;
    margin-bottom: 16px;
    position: relative;
    animation: logoPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 20px rgba(232, 67, 30, 0.25));
}

@keyframes logoPulse {
    0%, 100% { transform: translateY(0); filter: drop-shadow(0 4px 20px rgba(232, 67, 30, 0.25)); }
    50% { transform: translateY(-5px); filter: drop-shadow(0 10px 30px rgba(232, 67, 30, 0.4)); }
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.login-logo h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.login-divider span:not(.login-divider-text) {
    flex: 1; height: 1px;
    background: var(--border-color);
}

.login-divider-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.login-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(232, 67, 30, 0.03);
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

[data-theme="light"] .login-form { box-shadow: var(--shadow-md); }

.input-group { margin-bottom: 20px; }

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-fast);
}

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

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(232, 67, 30, 0.1), 0 0 20px rgba(232, 67, 30, 0.05);
    background: var(--bg-secondary);
}

.input-toggle-pw {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.input-toggle-pw:hover { background: var(--bg-glass); color: var(--text-secondary); }

[data-theme="light"] .input-toggle-pw:hover { background: rgba(0,0,0,0.04); }

.login-submit-btn {
    margin-top: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.login-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2.5s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.login-submit-btn:hover::before { opacity: 1; }

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 67, 30, 0.25);
}

.error-text {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(248, 113, 113, 0.06);
    border: 1px solid rgba(248, 113, 113, 0.12);
    border-radius: var(--radius-sm);
    color: var(--accent-red);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}

[data-theme="light"] .error-text { background: rgba(248, 113, 113, 0.04); }

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(232, 67, 30, 0.2);
}

.btn-primary img, .btn-primary .themed-icon {
    filter: brightness(0) invert(1) !important;
    opacity: 1 !important;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(232, 67, 30, 0.3);
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--border-color-hover);
}

[data-theme="light"] .btn-secondary { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .btn-secondary:hover { background: rgba(0,0,0,0.04); }

.btn-ghost { background: transparent; color: var(--text-secondary); }

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

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

.btn-danger { background: var(--accent-red); color: white; }
.btn-danger:hover { background: #E55A5A; transform: translateY(-1px); }
.btn-full { width: 100%; }

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

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

.btn-icon img, .btn-ghost img, .sidebar-footer img, .themed-icon {
    width: 20px; height: 20px;
    object-fit: contain;
    filter: var(--icon-filter);
    transition: all var(--transition-fast);
}

.btn-icon:hover img, .btn-ghost:hover img, .sidebar-footer:hover img, .themed-icon:hover {
    filter: var(--icon-filter-active);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard { display: flex; min-height: 100vh; }

/* ── Sidebar — Hynex Style ── */
.sidebar {
    width: var(--sidebar-collapsed);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar:hover {
    width: var(--sidebar-width);
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .sidebar { background: #FFFFFF; border-right-color: rgba(0,0,0,0.05); }
[data-theme="light"] .sidebar:hover { box-shadow: 4px 0 16px rgba(0,0,0,0.06); }

.sidebar .nav-item span,
.sidebar .logo-text,
.sidebar .sidebar-footer .btn-ghost span {
    opacity: 0; width: 0;
    overflow: hidden; white-space: nowrap;
    transition: opacity 0.15s ease 0.08s, width 0.15s ease;
}

.sidebar:hover .nav-item span,
.sidebar:hover .logo-text,
.sidebar:hover .sidebar-footer .btn-ghost span {
    opacity: 1; width: auto;
}

.sidebar-header {
    padding: 18px 14px;
    border-bottom: 1px solid var(--border-color);
    min-height: 68px;
    display: flex;
    align-items: center;
}

[data-theme="light"] .sidebar-header { border-bottom-color: rgba(0,0,0,0.05); }

.logo-small {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.logo-small-emoji {
    width: 34px; height: 34px;
    min-width: 34px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(232, 67, 30, 0.2));
}

.logo-text {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.logo-text span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Nav Items — Hynex Filled-Pill Active */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 67, 30, 0.04) transparent;
}

[data-theme="light"] .sidebar-nav { scrollbar-color: rgba(0,0,0,0.05) transparent; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: all var(--transition-fast);
    font-size: 13.5px;
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    background: rgba(232, 67, 30, 0.04);
    color: var(--text-primary);
}

[data-theme="light"] .nav-item:hover { background: rgba(232, 67, 30, 0.06); }

/* Active = Filled Teal Pill (Hynex style) */
.nav-item.active {
    background: rgba(232, 67, 30, 0.1);
    color: var(--accent-cyan);
    font-weight: 600;
    border: 1px solid rgba(232, 67, 30, 0.12);
}

[data-theme="light"] .nav-item.active {
    background: rgba(232, 67, 30, 0.1);
    border-color: rgba(232, 67, 30, 0.2);
    color: #E8431E;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--accent-cyan);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px rgba(232, 67, 30, 0.4);
}

[data-theme="light"] .nav-item.active::before {
    background: #E8431E;
    box-shadow: 0 0 6px rgba(232, 67, 30, 0.3);
}

.nav-item svg, .nav-item img {
    width: 20px; height: 20px;
    min-width: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-item img {
    filter: var(--icon-filter);
    transition: all var(--transition-fast);
}

.nav-item:hover img { filter: var(--icon-filter-active); }

.nav-item.active img {
    filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(1800%) hue-rotate(8deg) brightness(95%) contrast(92%);
}

[data-theme="light"] .nav-item.active img {
    filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(1800%) hue-rotate(8deg) brightness(95%) contrast(92%);
}

.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid var(--border-color);
}

[data-theme="light"] .sidebar-footer { border-top-color: rgba(0,0,0,0.05); }

.sidebar-footer .btn-ghost {
    width: 100%;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    justify-content: flex-start;
    gap: 12px;
    font-size: 13px;
}

.sidebar-footer .btn-ghost:hover {
    background: rgba(248, 113, 113, 0.06);
    color: var(--accent-red);
}

[data-theme="light"] .sidebar-footer .btn-ghost:hover { background: rgba(248, 113, 113, 0.04); }

/* ── Main Content ── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-collapsed);
    min-height: 100vh;
    min-width: 0;
    overflow: hidden;
    background: var(--bg-primary);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: rgba(6, 11, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 50;
}

[data-theme="light"] .main-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.menu-toggle { display: none; margin-right: 14px; }

.user-profile {
    width: 38px; height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(232, 67, 30, 0.15);
    margin-left: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-profile:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(232, 67, 30, 0.2);
}

.user-profile img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(6, 11, 20, 0.6);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0; visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.active { opacity: 1; visibility: visible; }

.header-title h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.header-title p {
    font-size: 13px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

[data-theme="light"] .status-indicator { background: rgba(0,0,0,0.02); }

.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-red);
}

.status-dot.online {
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(52, 211, 153, 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 16px rgba(52, 211, 153, 0.3); }
}

.content-wrapper {
    padding: 24px 28px;
    min-width: 0;
    overflow: hidden;
}

/* ============================================
   SECTIONS & CARDS — Hynex Style
   ============================================ */

.section { display: none; }

.section.active {
    display: block;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Stats Grid — Animated Entrance ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* Gradient glow border on top */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Subtle inner glow */
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card-glow);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}

.stat-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover::after { opacity: 1; }

[data-theme="light"] .stat-card { box-shadow: var(--shadow-sm); }
[data-theme="light"] .stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-icon svg, .stat-icon img {
    width: 22px; height: 22px;
    object-fit: contain;
}

.stat-icon img { filter: var(--icon-filter-active); }

.stat-icon.blue { background: rgba(232, 67, 30, 0.1); color: var(--accent-cyan); }
.stat-icon.green { background: rgba(52, 211, 153, 0.1); color: var(--accent-green); }
.stat-icon.purple { background: rgba(167, 139, 250, 0.1); color: var(--accent-purple); }
.stat-icon.orange { background: rgba(251, 191, 36, 0.1); color: var(--accent-orange); }

.stat-info { display: flex; flex-direction: column; gap: 2px; }

.stat-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Card Grid — Staggered Entrance ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-normal);
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
    position: relative;
}

.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card-glow);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}

.card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.card:hover::after { opacity: 1; }

[data-theme="light"] .card { box-shadow: var(--shadow-sm); }
[data-theme="light"] .card:hover { box-shadow: var(--shadow-md); }

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

[data-theme="light"] .card-header { border-bottom-color: rgba(0,0,0,0.04); }

.card-header h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.1px;
}

.card-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.card-body {
    padding: 20px;
    min-width: 0;
    overflow: hidden;
}

.card-header-stacked {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    gap: 8px;
}

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

.fleet-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 100px;
    background: rgba(232, 67, 30, 0.1);
    color: var(--accent-cyan);
}

.card-toolbar { display: flex; align-items: center; gap: 6px; width: 100%; }
.toolbar-search { flex: 1 1 auto; width: auto !important; min-width: 120px; max-width: 320px; }
.toolbar-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; flex-wrap: wrap; }
.btn-compact { padding: 6px 10px; font-size: 11px; gap: 4px; }
.btn-compact img, .btn-compact svg { width: 14px; height: 14px; }
.btn-icon-only { padding: 6px 8px; }
.btn-icon-only img, .btn-icon-only svg { width: 16px; height: 16px; }

/* ── Search Input — Hynex Rounded Style ── */
.search-input {
    padding: 9px 16px;
    font-size: 13px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-primary);
    width: 200px;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(232, 67, 30, 0.08);
}

[data-theme="light"] .search-input { background: rgba(0,0,0,0.02); }
[data-theme="light"] .search-input:focus { background: white; }

/* ── Badges — Pill Style ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge.green { background: rgba(52, 211, 153, 0.12); color: var(--accent-green); }
.badge.red { background: rgba(248, 113, 113, 0.12); color: var(--accent-red); }
.badge.orange { background: rgba(251, 191, 36, 0.12); color: var(--accent-orange); }

[data-theme="light"] .badge.green { background: rgba(52, 211, 153, 0.08); }
[data-theme="light"] .badge.red { background: rgba(248, 113, 113, 0.08); }
[data-theme="light"] .badge.orange { background: rgba(251, 191, 36, 0.08); }

/* ── Status List ── */
.status-list { display: flex; flex-direction: column; gap: 0; }

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.status-item:last-child { border-bottom: none; }
.status-item:hover { padding-left: 4px; }

.status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(52, 211, 153, 0.12);
    color: var(--accent-green);
}

.status-badge.off, .status-badge.inactive {
    background: var(--bg-glass);
    color: var(--text-muted);
}

.status-badge.warning {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-orange);
}

/* ── Quick Actions ── */
.quick-actions { display: flex; flex-direction: column; gap: 10px; }

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: var(--bg-elevated);
    border-color: rgba(232, 67, 30, 0.12);
    transform: translateX(4px);
    box-shadow: 0 0 20px rgba(232, 67, 30, 0.03);
}

[data-theme="light"] .action-btn { background: rgba(0,0,0,0.01); }
[data-theme="light"] .action-btn:hover { background: rgba(232, 67, 30, 0.04); }

/* ============================================
   TOGGLE SWITCHES
   ============================================ */

.toggle-grid { display: grid; gap: 12px; }

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.toggle-item:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-elevated);
}

[data-theme="light"] .toggle-item { background: rgba(0,0,0,0.01); border-color: rgba(0,0,0,0.05); }
[data-theme="light"] .toggle-item:hover { border-color: rgba(232, 67, 30, 0.15); }

.toggle-item.highlight {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(232, 67, 30, 0.1);
    animation: highlightPulse 0.5s ease-out;
}

@keyframes highlightPulse {
    0% { transform: scale(1.01); box-shadow: 0 0 0 6px rgba(232, 67, 30, 0.15); }
    100% { transform: scale(1); box-shadow: 0 0 0 3px rgba(232, 67, 30, 0.1); }
}

.toggle-item.big {
    padding: 20px;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.04), rgba(251, 191, 36, 0.04));
    border-color: rgba(251, 191, 36, 0.15);
}

.toggle-info { display: flex; flex-direction: column; gap: 3px; }
.toggle-label { font-size: 14px; font-weight: 600; }
.toggle-desc { font-size: 12px; color: var(--text-muted); }

.toggle {
    position: relative;
    display: inline-block;
    width: 48px; height: 26px;
    flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    transition: all var(--transition-fast);
}

[data-theme="light"] .toggle-slider { background: rgba(0,0,0,0.1); }

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.toggle input:checked + .toggle-slider {
    background: var(--gradient-primary);
    box-shadow: 0 0 12px rgba(232, 67, 30, 0.2);
}

.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

.toggle.big { width: 60px; height: 32px; }
.toggle.big .toggle-slider::before { height: 26px; width: 26px; }
.toggle.big input:checked + .toggle-slider::before { transform: translateX(28px); }

/* ============================================
   FORMS
   ============================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(232, 67, 30, 0.08);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

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

.preview-box {
    padding: 16px;
    background: var(--bg-glass);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    margin: 16px 0;
}

.preview-box h4 { font-size: 15px; margin-bottom: 6px; }
.preview-box p { font-size: 13px; color: var(--text-secondary); }

/* ============================================
   TABLES
   ============================================ */

.table-container {
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    width: 100%;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 67, 30, 0.04) transparent;
}

[data-theme="light"] .table-container { scrollbar-color: rgba(0,0,0,0.05) transparent; }

.section, .scooter-subtab-content, #scootersListContainer {
    min-width: 0; max-width: 100%; overflow: hidden;
}

.table-container::after {
    content: '';
    position: sticky;
    right: 0; top: 0; bottom: 0;
    width: 32px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--bg-card));
    opacity: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 12px;
}

.data-table th, .data-table td {
    padding: 5px 5px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.data-table td:last-child, .data-table th:last-child {
    max-width: none; overflow: visible;
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: var(--bg-secondary);
    position: sticky; top: 0; z-index: 2;
}

.data-table thead tr { box-shadow: 0 1px 0 0 var(--border-color); }

.sortable-th { cursor: pointer; user-select: none; transition: color 0.15s; }
.sortable-th:hover { color: var(--accent-cyan); }
.sort-icon::after { content: '⇅'; opacity: 0.3; font-size: 11px; margin-left: 4px; }
.sort-icon.asc::after { content: '▲'; opacity: 0.8; color: var(--accent-cyan); }
.sort-icon.desc::after { content: '▼'; opacity: 0.8; color: var(--accent-cyan); }

.data-table tbody tr:nth-child(even) { background: rgba(232, 67, 30, 0.01); }
[data-theme="light"] .data-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.01); }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: rgba(232, 67, 30, 0.03); }
[data-theme="light"] .data-table tbody tr:hover { background: rgba(232, 67, 30, 0.04); }
.data-table tbody td { color: var(--text-secondary); font-weight: 400; }

.data-table .loading-cell {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.table-actions { display: flex; gap: 3px; flex-wrap: nowrap; }

.table-btn {
    padding: 5px 9px;
    font-size: 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

[data-theme="light"] .table-btn { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .table-btn:hover { background: rgba(0,0,0,0.04); }

.table-btn img { filter: var(--icon-filter); transition: all var(--transition-fast); }
.table-btn:hover img { filter: var(--icon-filter-active); }

.table-btn.danger:hover {
    background: rgba(248, 113, 113, 0.08);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.table-btn.warning { color: var(--accent-orange); border-color: rgba(251, 191, 36, 0.2); }
.table-btn.warning:hover { background: rgba(251, 191, 36, 0.08); }

/* ============================================
   TOASTS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    min-width: 320px; max-width: 400px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    backdrop-filter: blur(12px);
}

[data-theme="light"] .toast { background: rgba(255,255,255,0.95); box-shadow: var(--shadow-md); }

.toast.removing { animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) both; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(30px) scale(0.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(30px) scale(0.96); }
}

.toast::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 2px; width: 100%;
    transform-origin: left;
    animation: toastProgress 4s linear both;
}

@keyframes toastProgress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.toast.success { border-left: 3px solid var(--accent-green); }
.toast.success::after { background: var(--accent-green); opacity: 0.5; }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.error::after { background: var(--accent-red); opacity: 0.5; }
.toast.warning { border-left: 3px solid var(--accent-orange); }
.toast.warning::after { background: var(--accent-orange); opacity: 0.5; }
.toast.info { border-left: 3px solid var(--accent-cyan); }
.toast.info::after { background: var(--accent-cyan); opacity: 0.5; }

[data-theme="light"] .toast.success { background: linear-gradient(135deg, rgba(52,211,153,0.04), rgba(255,255,255,0.95) 60%); }
[data-theme="light"] .toast.error { background: linear-gradient(135deg, rgba(248,113,113,0.04), rgba(255,255,255,0.95) 60%); }
[data-theme="light"] .toast.warning { background: linear-gradient(135deg, rgba(251,191,36,0.04), rgba(255,255,255,0.95) 60%); }
[data-theme="light"] .toast.info { background: linear-gradient(135deg, rgba(92,225,230,0.04), rgba(255,255,255,0.95) 60%); }

.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.toast-message { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

.toast-close {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    padding: 4px; border-radius: 6px;
    transition: all 0.15s; flex-shrink: 0;
}

.toast-close:hover { color: var(--text-primary); background: var(--bg-glass); }
[data-theme="light"] .toast-close:hover { background: rgba(0,0,0,0.04); }

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 24px; overflow-y: hidden;
}

.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(6, 11, 20, 0.7);
    backdrop-filter: blur(6px);
    animation: fadeInScale 0.2s ease-out;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 0;
    max-width: 640px; width: 100%;
    max-height: 85vh;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(232, 67, 30, 0.03);
    animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="light"] .modal-content { box-shadow: 0 16px 48px rgba(0,0,0,0.12); }

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }

.modal-content p { font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.6; }

.modal-body {
    padding: 24px;
    overflow-y: auto; flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 67, 30, 0.04) transparent;
}

[data-theme="light"] .modal-body { scrollbar-color: rgba(0,0,0,0.05) transparent; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: flex-end; gap: 8px;
    flex-shrink: 0;
}

.btn-close {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    background: var(--bg-glass);
    border: 1px solid transparent;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.btn-close:hover {
    background: rgba(248, 113, 113, 0.06);
    border-color: rgba(248, 113, 113, 0.12);
    color: var(--accent-red);
}

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

.code-font { font-family: var(--font-mono); font-size: 13px; }

/* ============================================
   UTILITIES
   ============================================ */

.hidden { display: none !important; }

.loading-spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

[data-theme="light"] .loading-spinner { border-color: rgba(0,0,0,0.05); border-top-color: var(--accent-cyan); }

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

.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 48px 24px; text-align: center;
    color: var(--text-muted); gap: 10px;
}

.empty-state svg { width: 44px; height: 44px; opacity: 0.2; margin-bottom: 4px; }
.empty-state p { font-size: 14px; max-width: 260px; line-height: 1.5; }

:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent-cyan); outline-offset: 2px;
}

:focus:not(:focus-visible) { outline: none; }

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

/* ============================================
   RESPONSIVE — ≤1440px
   ============================================ */

@media (max-width: 1440px) {
    .content-wrapper { padding: 20px 24px; }
    .stats-grid { gap: 12px; }
    .card-grid { gap: 16px; }
    .stat-card { padding: 16px; }
    .card-header { padding: 14px 18px; }
    .card-body { padding: 18px; }
    .stat-value { font-size: 22px; }
    .main-header { padding: 14px 24px; }
    .toggle-item { padding: 12px 14px; }
    .toggle-label { font-size: 13px; }
    .toggle-desc { font-size: 11px; }
    .modal-content { max-width: 580px; }
    .modal-body { padding: 20px; }
    .modal-footer { padding: 14px 20px; }
    .form-grid { gap: 16px; }
    .data-table th, .data-table td { padding: 4px 4px; font-size: 11px; }
    .data-table th { font-size: 9px; }
    .sales-drop-zone { padding: 28px 20px; }
}

/* ============================================
   RESPONSIVE — ≤1280px
   ============================================ */

@media (max-width: 1280px) {
    .content-wrapper { padding: 16px 20px; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
    .card-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
    .stat-card { padding: 14px; gap: 12px; }
    .stat-icon { width: 42px; height: 42px; }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 11px; }
    .main-header { padding: 12px 20px; }
    .header-title h2 { font-size: 18px; }
    .card-header h3 { font-size: 13px; }
    .card-body { padding: 14px; }
    .toggle-item { padding: 10px 12px; }
    .modal-content { max-width: 520px; max-height: 80vh; }
    .sales-stats-grid { gap: 10px; }
    .sales-stats-grid .stat-card { padding: 14px; gap: 10px; }
    .sales-stats-grid .stat-icon { width: 40px; height: 40px; }
    .sales-stats-grid .stat-value { font-size: 20px; }
    .sales-drop-zone { padding: 16px 12px; }
}

/* ============================================
   RESPONSIVE — ≤768px (Mobile)
   ============================================ */

@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 6px 0 32px rgba(0, 0, 0, 0.4);
    }

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

    .sidebar.sidebar-open {
        transform: translateX(0);
        width: var(--sidebar-width) !important;
    }

    .sidebar.sidebar-open .nav-item span,
    .sidebar.sidebar-open .logo-text,
    .sidebar.sidebar-open .sidebar-footer .btn-ghost span {
        opacity: 1; width: auto; display: inline;
    }

    .sidebar-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
    .main-content { margin-left: 0; width: 100%; }
    .main-header { padding: 12px 16px; }
    .header-title h2 { font-size: 17px; }
    .header-title p { display: none; }
    .status-indicator span:last-child { display: none; }
    .status-indicator { padding: 6px; }
    .content-wrapper { padding: 12px; }
    .stats-grid, .card-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { padding: 14px; }

    .card-header {
        flex-direction: column; align-items: flex-start;
        padding: 12px 14px; gap: 8px;
    }

    .card-header h3 { font-size: 13px; }
    .header-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
    .header-actions .search-input { width: 100%; order: -1; border-radius: var(--radius-sm); }
    .header-actions .btn span { display: none; }
    .header-actions .btn { padding: 7px 9px; min-width: 34px; justify-content: center; }
    .card-body { padding: 12px; }

    .table-container {
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md); border: 1px solid var(--border-color);
    }

    .data-table th, .data-table td { padding: 8px 10px; white-space: nowrap; font-size: 12px; }
    .data-table th:nth-child(4), .data-table td:nth-child(4),
    .data-table th:nth-child(5), .data-table td:nth-child(5) { display: none; }

    .modal { padding: 0; align-items: flex-end; }

    .modal-content {
        max-width: 100%; width: 100%; max-height: 92vh;
        border-radius: 20px 20px 0 0;
        animation: mobileSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

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

    .modal-header, .modal-footer { padding: 12px 16px; }
    .modal-body { padding: 16px; }
    .btn { padding: 8px 14px; font-size: 12px; }
    .global-search-container { display: none; }
    .search-input { width: 100%; max-width: 100%; }

    .scooter-subtabs {
        width: 100%; overflow-x: auto;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }

    .scooter-subtabs::-webkit-scrollbar { display: none; }
    .scooter-subtab { flex: 1; justify-content: center; padding: 8px 12px; font-size: 12px; min-width: 0; }
    .scooter-subtab svg { display: none; }
    .sales-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .sales-stats-grid .stat-card { padding: 12px; gap: 8px; }
    .sales-stats-grid .stat-icon { width: 36px; height: 36px; }
    .sales-stats-grid .stat-value { font-size: 18px; }
    .filter-bar { padding: 10px; gap: 6px; }
    .filter-bar-label { width: 100%; }
    .filter-select { min-width: 0 !important; flex: 1 1 calc(50% - 3px); }
    .filter-date-group { flex: 1 1 calc(50% - 3px); }
    .filter-date-input { width: 100%; }
    .filter-clear-btn { width: 100%; text-align: center; margin-left: 0; }
    .map-container { height: 380px; border-radius: var(--radius-md); }
    .map-mode-filter { top: 8px; right: 8px; }
    .map-mode-btn { padding: 6px 10px; font-size: 11px; }
    .map-mode-btn span:not(.map-mode-count) { display: none; }
    .map-legend { bottom: 8px; right: 8px; padding: 8px 10px; font-size: 11px; }
    .sales-drop-zone { padding: 20px 14px; }
    .sales-preview-header { flex-direction: column; }
    .pagination-container { gap: 4px; }
    .pagination-container .btn, .pagination-container button { min-width: 30px; height: 30px; padding: 0 5px; font-size: 11px; }
    .sold-detail-topbar { padding: 12px 14px; }
    .sold-detail-body { padding: 14px; }
    .consent-content { flex-direction: column; text-align: center; padding: 14px; }
    .consent-actions { flex-direction: row; width: 100%; }
    .consent-actions .btn { flex: 1; }
    .legal-footer { margin-left: 0; padding: 10px 14px; }
}

/* ============================================
   RESPONSIVE — ≤480px
   ============================================ */

@media (max-width: 480px) {
    .content-wrapper { padding: 8px; }
    .card-body { padding: 10px; }
    .card-header { padding: 10px 12px; }
    .header-actions .btn { padding: 6px 7px; font-size: 11px; }
    .stats-grid, .card-grid { gap: 8px; }
    .stat-card { padding: 12px; }
    .scooter-subtab { padding: 6px 8px; font-size: 11px; }
    .subtab-count { min-width: 16px; height: 16px; font-size: 10px; }
    .sales-stats-grid { grid-template-columns: 1fr; }
    .filter-select { flex: 1 1 100%; }
    .filter-date-group { flex: 1 1 100%; }
    .map-container { height: 280px; }
    .data-table th, .data-table td { padding: 6px 8px; font-size: 11px; }
    .btn { padding: 6px 10px; font-size: 11px; }
    .main-header { padding: 8px 10px; }
    .header-title h2 { font-size: 15px; }
}

/* ============================================
   GLOBAL SEARCH — Rounded Hynex Style
   ============================================ */

.global-search-container { position: relative; }

.global-search-wrapper {
    display: flex; align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 8px 16px;
    transition: all var(--transition-fast);
    min-width: 280px;
}

[data-theme="light"] .global-search-wrapper { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.06); }

.global-search-wrapper:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(232, 67, 30, 0.08), 0 0 20px rgba(232, 67, 30, 0.04);
    background: var(--bg-elevated);
}

[data-theme="light"] .global-search-wrapper:focus-within { background: white; }

.search-icon { color: var(--text-muted); flex-shrink: 0; }

.global-search-input {
    flex: 1; background: transparent;
    border: none; color: var(--text-primary);
    font-size: 13px; outline: none; min-width: 0;
}

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

.search-shortcut {
    display: inline-flex;
    padding: 2px 8px; font-size: 10px;
    font-weight: 600; color: var(--text-muted);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 6px; flex-shrink: 0;
    font-family: var(--font-mono);
}

.search-results {
    position: absolute; top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px; overflow-y: auto;
    z-index: 200;
    animation: fadeInUp 0.2s ease-out;
}

.search-result-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
    font-size: 13px; color: var(--text-secondary);
}

.search-result-item:hover { background: rgba(232, 67, 30, 0.03); color: var(--text-primary); }
.search-result-item:last-child { border-bottom: none; }

.search-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 28px 16px; color: var(--text-muted); gap: 8px;
}

.search-empty svg { opacity: 0.2; }
.search-empty p { font-size: 13px; }

/* ============================================
   REFRESH INDICATOR & ODOMETER
   ============================================ */

.refresh-indicator {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px; color: var(--text-secondary);
    margin-bottom: 14px;
    transition: all var(--transition-fast);
}

.refresh-indicator:hover { background: var(--bg-elevated); border-color: var(--border-color-hover); }
.refresh-indicator .status-dot { animation: pulse 2s infinite; }
.refresh-indicator span:last-child { margin-left: auto; }

@keyframes odometerPulse {
    0% { background-color: transparent; }
    50% { background-color: rgba(52, 211, 153, 0.06); }
    100% { background-color: transparent; }
}

.odometer-updated { animation: odometerPulse 1s ease-out; }
.odometer-cell { cursor: help; }

.odometer-value {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    background: rgba(167, 139, 250, 0.08);
    border-radius: 100px;
    font-weight: 600; color: var(--accent-purple); font-size: 12px;
}

[data-theme="light"] .odometer-value { background: rgba(167, 139, 250, 0.1); }

/* Lock status */
.btn-icon.status-locked {
    background: rgba(248, 113, 113, 0.1) !important;
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.12);
}

.btn-icon.status-locked img {
    filter: invert(38%) sepia(93%) saturate(1648%) hue-rotate(336deg) brightness(98%) contrast(96%) !important;
}

.btn-icon.status-unlocked {
    background: rgba(232, 67, 30, 0.1) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px rgba(232, 67, 30, 0.12);
}

.btn-icon.status-unlocked img {
    filter: invert(66%) sepia(59%) saturate(4787%) hue-rotate(159deg) brightness(101%) contrast(105%) !important;
}

/* Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    transition: 0.3s; border-radius: 22px;
}

.slider:before {
    position: absolute; content: "";
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background: var(--text-secondary);
    transition: 0.3s; border-radius: 50%;
}

input:checked + .slider { background: var(--accent-cyan); border-color: var(--accent-cyan); }
input:checked + .slider:before { transform: translateX(22px); background: white; }

/* ============================================
   MAP STYLES
   ============================================ */

.map-legend {
    position: absolute; bottom: 20px; right: 20px;
    background: var(--bg-card);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(8px);
    display: flex; flex-direction: column; gap: 6px;
    box-shadow: var(--shadow-md);
    font-size: 12px; color: var(--text-secondary);
}

.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--text-primary); }

.dot-indicator { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-indicator.green { background: var(--accent-green); box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
.dot-indicator.red { background: var(--accent-red); box-shadow: 0 0 6px rgba(248, 113, 113, 0.4); }
.dot-indicator.grey { background: var(--text-muted); }
.dot-indicator.orange { background: #FFA500; box-shadow: 0 0 6px rgba(255, 165, 0, 0.4); }
.dot-indicator.purple { background: #8B5CF6; box-shadow: 0 0 6px rgba(139, 92, 246, 0.4); }

.custom-div-icon, .leaflet-scooter-marker, .leaflet-phone-marker { background: transparent !important; border: none !important; }

.marker-pin {
    width: 28px; height: 28px;
    border-radius: 50% 50% 50% 0;
    background: var(--accent-cyan);
    position: absolute;
    transform: rotate(-45deg);
    left: 50%; top: 50%;
    margin: -14px 0 0 -14px;
    animation: bounce 0.5s ease-out;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.marker-pin::after {
    content: '';
    width: 12px; height: 12px;
    margin: 3px 0 0 -1px;
    background: rgba(255, 255, 255, 0.85);
    position: absolute; border-radius: 50%;
    transform: rotate(45deg);
}

.marker-pin.online { background: var(--accent-green); }
.marker-pin.locked { background: var(--accent-red); }
.marker-pin.offline { background: #64748b; }
.marker-pin i { transform: rotate(45deg); color: white; z-index: 2; font-size: 11px; }

.marker-pin.online { animation: markerPulse 2s infinite; }

@keyframes markerPulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.marker-phone { transition: transform 0.2s ease; }
.marker-phone:hover { transform: scale(1.15) !important; }
.marker-phone.active { animation: markerPulse 2s infinite; }
.marker-phone.inactive { opacity: 0.7; }

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm) !important;
}

.leaflet-popup-content { margin: 10px !important; line-height: 1.5; }
.popup-header { font-weight: 700; margin-bottom: 4px; border-bottom: 1px solid var(--border-color); padding-bottom: 4px; }
.popup-row { font-size: 12px; color: var(--text-secondary); display: flex; justify-content: space-between; gap: 12px; }

/* ============================================
   CNDP COMPLIANCE
   ============================================ */

.consent-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 10000;
    background: var(--bg-secondary);
    border-top: 1px solid var(--accent-cyan);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.3);
    animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.consent-content { max-width: 1100px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; gap: 18px; }

.consent-icon {
    flex-shrink: 0; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(232, 67, 30, 0.08);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
}

.consent-text { flex: 1; }
.consent-text h4 { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.consent-text p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.consent-text a { color: var(--accent-cyan); text-decoration: underline; }
.consent-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.consent-actions .btn { white-space: nowrap; font-size: 13px; padding: 9px 18px; }

.legal-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 10px 28px;
    margin-left: var(--sidebar-collapsed);
    transition: margin-left 0.3s ease;
}

.legal-footer-content {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; flex-wrap: wrap;
    font-size: 11px; color: var(--text-muted);
}

.legal-footer-content a { color: var(--accent-cyan); text-decoration: none; cursor: pointer; }
.legal-footer-content a:hover { text-decoration: underline; }
.legal-separator { opacity: 0.3; }

@media (max-width: 768px) {
    .legal-footer { margin-left: 0; padding: 10px 14px; }
}

/* CIN Masking */
.cin-masked {
    display: inline-flex; align-items: center; gap: 6px;
    cursor: pointer; padding: 2px 8px;
    border-radius: 6px;
    background: rgba(232, 67, 30, 0.04);
    border: 1px solid rgba(232, 67, 30, 0.1);
    transition: all var(--transition-fast);
    font-family: monospace; font-size: 12px;
}

.cin-masked:hover { background: rgba(232, 67, 30, 0.08); border-color: rgba(232, 67, 30, 0.2); }
.cin-masked .cin-reveal-icon { width: 14px; height: 14px; opacity: 0.5; transition: opacity var(--transition-fast); }
.cin-masked:hover .cin-reveal-icon { opacity: 1; }
.cin-revealed { background: rgba(251, 191, 36, 0.04); border-color: rgba(251, 191, 36, 0.12); }

.cin-image-blurred { filter: blur(8px); transition: filter 0.3s ease; cursor: pointer; position: relative; }
.cin-image-blurred:hover { filter: blur(4px); }
.cin-image-revealed { filter: none !important; }

.cin-image-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    color: white; font-size: 12px; font-weight: 600;
    cursor: pointer; backdrop-filter: blur(2px);
    transition: all var(--transition-fast);
}

.cin-image-overlay:hover { background: rgba(0, 0, 0, 0.5); }
.cin-image-overlay.hidden { display: none; }

.privacy-lang-btn.active {
    background: var(--gradient-primary) !important;
    color: white !important; border-color: transparent !important;
}

.audit-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; color: var(--accent-orange);
    padding: 2px 6px;
    background: rgba(251, 191, 36, 0.06);
    border-radius: 4px; margin-left: 6px;
}

/* ============================================
   SCOOTER SUB-TABS
   ============================================ */

.scooter-subtabs {
    display: flex; gap: 4px; padding: 4px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    width: fit-content;
}

.scooter-subtab {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 20px;
    border: none; background: transparent;
    color: var(--text-secondary);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 4px);
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.scooter-subtab:hover:not(.active) { background: var(--bg-elevated); color: var(--text-primary); }

.scooter-subtab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(232, 67, 30, 0.25);
}

.scooter-subtab.active svg { stroke: white; }

.subtab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px;
    padding: 0 6px; border-radius: 100px;
    font-size: 11px; font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
}

.scooter-subtab:not(.active) .subtab-count { background: var(--bg-glass); color: var(--text-muted); }
.scooter-subtab-content { display: none; }

.scooter-subtab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* ============================================
   SALES INVENTORY
   ============================================ */

.sales-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px; margin-bottom: 20px;
}

.sales-stats-grid .stat-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.25s ease;
}

.sales-stats-grid .stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.sales-stats-grid .stat-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); flex-shrink: 0;
}

.sales-stats-grid .stat-icon.blue { background: rgba(232, 67, 30, 0.08); color: var(--accent-cyan); }
.sales-stats-grid .stat-icon.green { background: rgba(52, 211, 153, 0.08); color: var(--accent-green); }
.sales-stats-grid .stat-icon.orange { background: rgba(251, 191, 36, 0.08); color: var(--accent-orange); }

.sales-stats-grid .stat-info { display: flex; flex-direction: column; gap: 2px; }
.sales-stats-grid .stat-value { font-size: 22px; font-weight: 800; line-height: 1; }
.sales-stats-grid .stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.sales-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 20px; text-align: center;
    cursor: pointer; transition: all 0.3s ease;
    background: var(--bg-glass);
    position: relative; overflow: hidden;
}

.sales-drop-zone::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(92,225,230,0.02), rgba(14,165,233,0.02));
    opacity: 0; transition: opacity 0.3s ease;
}

.sales-drop-zone:hover, .sales-drop-zone.drag-active {
    border-color: var(--accent-cyan);
    background: rgba(232, 67, 30, 0.02);
}

.sales-drop-zone:hover::before, .sales-drop-zone.drag-active::before { opacity: 1; }

.sales-drop-zone.drag-active {
    transform: scale(1.005);
    box-shadow: 0 0 0 3px rgba(232, 67, 30, 0.08);
}

/* Filter Bar */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 6px;
    align-items: center; margin-bottom: 10px;
    padding: 8px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: border-color 0.15s ease;
}

.filter-bar:hover { border-color: var(--border-color-hover); }
[data-theme="light"] .filter-bar { background: rgba(0,0,0,0.01); }

.filter-bar-label {
    font-size: 10px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-right: 2px; user-select: none;
}

.filter-select {
    padding: 5px 24px 5px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card); color: var(--text-primary);
    font-size: 11px; font-weight: 500;
    cursor: pointer; flex: 1 1 0; max-width: 150px;
    transition: all 0.15s ease; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.filter-select:hover { border-color: var(--accent-cyan); }
.filter-select:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 2px rgba(232, 67, 30, 0.08); outline: none; }
[data-theme="light"] .filter-select { background: white; }

.filter-date-group { display: flex; align-items: center; gap: 4px; }
.filter-date-label { font-size: 10px; color: var(--text-muted); white-space: nowrap; font-weight: 500; }

.filter-date-input {
    padding: 5px 8px; border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card); color: var(--text-primary);
    font-size: 11px; cursor: pointer;
    transition: border-color 0.15s ease;
}

.filter-date-input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 2px rgba(232, 67, 30, 0.08); outline: none; }
[data-theme="light"] .filter-date-input { background: white; }

.filter-clear-btn {
    padding: 5px 10px; border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent; color: var(--text-muted);
    font-size: 10px; font-weight: 500;
    cursor: pointer; margin-left: auto;
    transition: all 0.15s ease; white-space: nowrap;
}

.filter-clear-btn:hover {
    color: var(--accent-red);
    border-color: rgba(248, 113, 113, 0.2);
    background: rgba(248, 113, 113, 0.04);
}

/* Map Container */
.map-container {
    position: relative; height: 550px; width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-container > div { width: 100%; height: 100%; }

.map-mode-filter {
    position: absolute; top: 12px; right: 12px;
    z-index: 1000; display: flex; gap: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.map-mode-btn {
    padding: 7px 14px; font-size: 12px; font-weight: 600;
    border: none; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-card); color: var(--text-secondary);
    transition: all 0.2s ease;
}

.map-mode-btn.active { background: var(--gradient-primary); color: white; }

.map-mode-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 7px; border-radius: 100px; font-size: 10px;
}

.map-mode-btn:not(.active) .map-mode-count { background: rgba(255, 255, 255, 0.04); }

/* Pagination */
.pagination-container {
    margin-top: 14px; display: flex;
    align-items: center; justify-content: center;
    gap: 4px; flex-wrap: wrap;
}

.pagination-container .btn, .pagination-container button {
    min-width: 34px; height: 34px;
    padding: 0 8px; font-size: 12px; border-radius: 8px;
}

.scooter-desc-text { margin-bottom: 14px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.scooter-desc-text .refresh-indicator { float: right; font-size: 11px; }

/* Sales Badges */
.sales-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 100px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}

.sales-badge.sold { background: rgba(148, 163, 184, 0.1); color: #94a3b8; }
.sales-badge.registered { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.sales-badge.claimed { background: rgba(251, 191, 36, 0.1); color: #fbbf24; }
.sales-badge.insured { background: rgba(52, 211, 153, 0.1); color: #34d399; }

.sales-color-dot {
    display: inline-block; width: 11px; height: 11px;
    border-radius: 50%; vertical-align: middle;
    margin-right: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .sales-color-dot { border-color: rgba(0,0,0,0.06); }

.sales-preview-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; margin-bottom: 14px;
}

.sales-preview-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

.sales-preview-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 100px;
    font-size: 11px; font-weight: 600;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.sales-preview-pill.green { background: rgba(52, 211, 153, 0.06); border-color: rgba(52, 211, 153, 0.2); color: #34d399; }
.sales-preview-pill.orange { background: rgba(251, 191, 36, 0.06); border-color: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.sales-preview-pill.red { background: rgba(248, 113, 113, 0.06); border-color: rgba(248, 113, 113, 0.2); color: #f87171; }

.sales-spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ============================================
   SOLD DETAIL SCREEN
   ============================================ */

.sold-detail-screen {
    position: fixed; inset: 0; z-index: 10000;
    background: var(--bg-primary);
    display: flex; flex-direction: column;
    animation: soldScreenSlideIn 0.3s ease-out;
}

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

.sold-detail-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary); flex-shrink: 0;
}

.sold-detail-back {
    display: flex; align-items: center; gap: 6px;
    background: none; border: none;
    color: var(--accent-cyan);
    font-size: 13px; font-weight: 600;
    cursor: pointer; padding: 6px 10px;
    border-radius: 8px; transition: background 0.15s;
}

.sold-detail-back:hover { background: rgba(232, 67, 30, 0.06); }

.sold-detail-topbar-title { font-size: 14px; font-weight: 700; }

.sold-detail-content {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 14px;
    max-width: 860px; margin: 0 auto; width: 100%;
}

.sold-detail-hero {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 18px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.sold-detail-hero-model { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 2px; }
.sold-detail-hero-sn { font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 6px; }
.sold-detail-hero-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.sold-detail-hero-sep { opacity: 0.3; font-size: 14px; }

.sold-detail-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

.sold-detail-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.25s ease;
}

.sold-detail-card:hover { border-color: var(--border-color-hover); box-shadow: var(--shadow-glow); }

.sold-detail-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.sold-detail-card-header h4 { font-size: 13px; font-weight: 700; margin: 0; flex: 1; }

.sold-detail-card-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.sold-detail-card-icon.sale { background: rgba(92,225,230,0.06); color: var(--accent-cyan); }
.sold-detail-card-icon.ble { background: rgba(167,139,250,0.06); color: #a78bfa; }
.sold-detail-card-icon.owner { background: rgba(52,211,153,0.06); color: #34d399; }
.sold-detail-card-icon.insurance { background: rgba(251,191,36,0.06); color: #fbbf24; }
.sold-detail-card-icon.rides { background: rgba(236,72,153,0.06); color: #ec4899; }

.sold-detail-card-body { padding: 8px 16px 12px; }

.sold-detail-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 0; font-size: 12px;
    border-bottom: 1px solid rgba(232, 67, 30, 0.03);
}

.sold-detail-row:last-child { border-bottom: none; }
.sold-detail-row span:first-child { color: var(--text-muted); font-weight: 500; }
.sold-detail-row span:last-child, .sold-detail-row strong { color: var(--text-primary); font-weight: 600; }

.sold-detail-row code {
    font-family: var(--font-mono); font-size: 11px;
    background: rgba(232, 67, 30, 0.04);
    padding: 2px 6px; border-radius: 4px;
}

.sold-detail-ride-count {
    font-size: 10px; font-weight: 600;
    color: var(--text-muted);
    background: rgba(232, 67, 30, 0.04);
    padding: 2px 8px; border-radius: 16px;
}

.sold-detail-ride-count:empty { display: none; }

.sold-ride-table { width: 100%; border-collapse: collapse; font-size: 12px; }

.sold-ride-table thead th {
    text-align: left; font-weight: 600;
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-muted);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(232, 67, 30, 0.01);
}

.sold-ride-table tbody tr { border-bottom: 1px solid rgba(232, 67, 30, 0.03); transition: background 0.1s; }
.sold-ride-table tbody tr:hover { background: rgba(232, 67, 30, 0.02); }
.sold-ride-table tbody tr:last-child { border-bottom: none; }
.sold-ride-table tbody td { padding: 8px 12px; color: var(--text-primary); font-weight: 500; }
.sold-ride-row { cursor: pointer; }
.sold-ride-row:hover { background: rgba(232, 67, 30, 0.03) !important; }

.sold-ride-row td:last-child { position: relative; padding-right: 24px; }
.sold-ride-row td:last-child::after {
    content: ''; position: absolute;
    right: 8px; top: 50%;
    width: 5px; height: 5px;
    border-right: 1.5px solid var(--text-muted);
    border-bottom: 1.5px solid var(--text-muted);
    transform: translateY(-50%) rotate(-45deg);
    opacity: 0.3;
}

.sold-ride-date { font-weight: 600; }
.sold-ride-time { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

.sold-detail-empty {
    text-align: center; padding: 36px 16px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}

.sold-detail-empty p { margin: 0 0 4px; font-size: 13px; font-weight: 600; opacity: 0.7; }
.sold-detail-empty-sub { font-size: 12px !important; font-weight: 400 !important; color: var(--text-muted) !important; opacity: 0.6; }

/* ============================================
   TABLE ACTIONS & PAGINATION
   ============================================ */

.table-actions { display: flex; gap: 3px; align-items: center; flex-wrap: nowrap; }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-secondary);
    cursor: pointer; transition: all 0.15s ease;
    padding: 0; font-size: 12px;
}

.btn-icon img, .btn-icon svg { width: 13px; height: 13px; object-fit: contain; filter: var(--icon-filter); }

.btn-icon:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-icon.warning:hover {
    background: rgba(248, 113, 113, 0.06);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.table-pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    gap: 10px; flex-wrap: wrap;
}

.pagination-info { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.pagination-controls { display: flex; align-items: center; gap: 3px; }

.pagination-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 30px; padding: 0 6px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-elevated);
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff; pointer-events: none;
    box-shadow: 0 2px 6px rgba(232, 67, 30, 0.2);
}

.pagination-btn.nav { padding: 0 5px; }
.pagination-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pagination-dots { font-size: 11px; color: var(--text-muted); padding: 0 2px; user-select: none; }

@media (max-width: 600px) {
    .table-pagination { justify-content: center; padding: 8px 10px; }
    .pagination-info { display: none; }
    .pagination-btn { min-width: 28px; height: 28px; font-size: 11px; }
}

/* ============================================
   MISSING CLASSES (All Tabs)
   ============================================ */

.moderation-filter-tabs { display: flex; gap: 4px; }

.moderation-tab {
    padding: 6px 14px !important; font-size: 12px !important;
    font-weight: 600 !important; border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    transition: all 0.15s ease !important;
}

.moderation-tab.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(232, 67, 30, 0.2);
}

.moderation-tab:not(.active):hover {
    background: var(--bg-elevated) !important;
    border-color: var(--text-muted) !important;
}

.model-form-scroll, .scooter-form-scroll {
    flex: 1; overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 67, 30, 0.04) transparent;
}

.form-select {
    width: 100%; padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px; font-family: inherit;
    cursor: pointer; appearance: none;
    transition: all var(--transition-fast);
}

.form-select:focus {
    outline: none; border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(232, 67, 30, 0.08);
}

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }
.modal-container, .modal-overlay { }
.maintenance-toggle { display: flex; align-items: center; gap: 12px; padding: 14px 0; }

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 20px; text-align: center;
    cursor: pointer; transition: all 0.25s ease;
    background: var(--bg-glass);
}

.upload-area:hover {
    border-color: var(--accent-cyan);
    background: rgba(232, 67, 30, 0.02);
    box-shadow: 0 0 20px rgba(232, 67, 30, 0.03);
}

.file-list, .link-list { display: flex; flex-direction: column; gap: 8px; }
.dynamic-list { display: flex; flex-direction: column; gap: 8px; }

.location-body { display: flex; flex-direction: column; gap: 16px; }

.map-placeholder {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 20px;
    background: var(--bg-glass);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-align: center; min-height: 200px;
}

.map-pin { margin-bottom: 8px; }

.notif-lang-fields { display: flex; flex-direction: column; gap: 16px; }
.notif-lang-tab { }

.audience-opt {
    display: flex; align-items: center;
    gap: 8px; padding: 8px 14px;
    cursor: pointer; font-size: 13px;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.audience-opt:hover { background: rgba(232, 67, 30, 0.03); }
.audience-checkbox { accent-color: var(--accent-cyan); width: 15px; height: 15px; }

.tab-access-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.tab-access-item:last-child { border-bottom: none; }
.tab-access-cb { accent-color: var(--accent-cyan); width: 16px; height: 16px; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.round { border-radius: 50%; }
.btn-small { padding: 5px 10px; font-size: 11px; }