/**
 * OKIDOKEY/AOSORA Design System
 * Codename: "Quantum Void"
 *
 * A unified design language for Admin & Customer portals
 * featuring deep space aesthetics with luminous data visualization
 */

/* ============================================
   SECTION 1: CSS CUSTOM PROPERTIES (TOKENS)
   ============================================ */

:root {
    /* ─────────────────────────────────────────
       COLOR SYSTEM
       ───────────────────────────────────────── */

    /* Void Depths - Background Hierarchy */
    --void-abyss: #050508;
    --void-deep: #0a0a12;
    --void-mid: #0f0f1a;
    --void-surface: #151522;
    --void-elevated: #1a1a2e;
    --void-floating: #22223a;
    --void-overlay: #2a2a48;

    /* Luminous Accents - Primary */
    --lum-violet: #7c3aed;
    --lum-violet-bright: #8b5cf6;
    --lum-violet-dim: #6d28d9;
    --lum-violet-glow: rgba(124, 58, 237, 0.4);
    --lum-violet-subtle: rgba(124, 58, 237, 0.15);

    /* Luminous Accents - Secondary */
    --lum-cyan: #06b6d4;
    --lum-cyan-bright: #22d3ee;
    --lum-cyan-dim: #0891b2;
    --lum-cyan-glow: rgba(6, 182, 212, 0.4);
    --lum-cyan-subtle: rgba(6, 182, 212, 0.15);

    /* Luminous Accents - Tertiary */
    --lum-magenta: #ec4899;
    --lum-magenta-glow: rgba(236, 72, 153, 0.4);

    /* Semantic Colors */
    --sem-success: #10b981;
    --sem-success-glow: rgba(16, 185, 129, 0.4);
    --sem-success-subtle: rgba(16, 185, 129, 0.15);

    --sem-warning: #f59e0b;
    --sem-warning-glow: rgba(245, 158, 11, 0.4);
    --sem-warning-subtle: rgba(245, 158, 11, 0.15);

    --sem-danger: #ef4444;
    --sem-danger-glow: rgba(239, 68, 68, 0.4);
    --sem-danger-subtle: rgba(239, 68, 68, 0.15);

    --sem-info: #3b82f6;
    --sem-info-glow: rgba(59, 130, 246, 0.4);
    --sem-info-subtle: rgba(59, 130, 246, 0.15);

    /* Text Hierarchy */
    --text-radiant: #ffffff;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-muted: #475569;
    --text-ghost: #334155;

    /* Gradients */
    --grad-aurora: linear-gradient(135deg, #7c3aed 0%, #a855f7 35%, #06b6d4 100%);
    --grad-aurora-subtle: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
    --grad-violet-vertical: linear-gradient(180deg, rgba(124, 58, 237, 0.15) 0%, transparent 100%);
    --grad-void-radial: radial-gradient(ellipse at center, var(--void-surface) 0%, var(--void-deep) 100%);
    --grad-glow-violet: radial-gradient(circle, var(--lum-violet-glow) 0%, transparent 70%);
    --grad-glow-cyan: radial-gradient(circle, var(--lum-cyan-glow) 0%, transparent 70%);

    /* Borders */
    --border-subtle: rgba(148, 163, 184, 0.08);
    --border-default: rgba(148, 163, 184, 0.12);
    --border-accent: rgba(124, 58, 237, 0.3);
    --border-focus: rgba(124, 58, 237, 0.5);

    /* ─────────────────────────────────────────
       TYPOGRAPHY SYSTEM
       ───────────────────────────────────────── */

    --font-display: 'DM Sans', 'Noto Sans JP', system-ui, sans-serif;
    --font-body: 'DM Sans', 'Noto Sans JP', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    /* Font Sizes - Fluid Scale */
    --text-xs: clamp(0.65rem, 0.6rem + 0.25vw, 0.75rem);
    --text-sm: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-base: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);
    --text-lg: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-xl: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
    --text-2xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-3xl: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
    --text-4xl: clamp(1.875rem, 1.5rem + 1.5vw, 2.25rem);
    --text-5xl: clamp(2.25rem, 1.75rem + 2vw, 3rem);

    /* Font Weights */
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-black: 800;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Letter Spacing */
    --tracking-tighter: -0.03em;
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* ─────────────────────────────────────────
       SPACING & SIZING
       ───────────────────────────────────────── */

    --space-0: 0;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */

    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-3xl: 24px;
    --radius-full: 9999px;

    /* ─────────────────────────────────────────
       SHADOWS & EFFECTS
       ───────────────────────────────────────── */

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.7);

    --shadow-glow-sm: 0 0 12px var(--lum-violet-glow);
    --shadow-glow-md: 0 0 24px var(--lum-violet-glow);
    --shadow-glow-lg: 0 0 40px var(--lum-violet-glow);

    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.05);

    /* Blur */
    --blur-sm: 4px;
    --blur-md: 8px;
    --blur-lg: 16px;
    --blur-xl: 24px;

    /* ─────────────────────────────────────────
       ANIMATION & TRANSITIONS
       ───────────────────────────────────────── */

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-bounce: cubic-bezier(0.68, -0.6, 0.32, 1.6);

    --duration-instant: 75ms;
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;

    /* ─────────────────────────────────────────
       LAYOUT
       ───────────────────────────────────────── */

    --sidebar-width: 280px;
    --sidebar-collapsed: 72px;
    --header-height: 72px;
    --modal-max-width: 900px;
    --content-max-width: 1400px;

    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-popover: 60;
    --z-tooltip: 70;
    --z-notification: 80;
}

/* ============================================
   SECTION 2: BASE RESET & TYPOGRAPHY
   ============================================ */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background: var(--void-deep);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-radiant);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* Gradient text utility */
.text-gradient {
    background: var(--grad-aurora);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Monospace text */
.text-mono {
    font-family: var(--font-mono);
}

/* Links */
a {
    color: var(--lum-cyan);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--lum-cyan-bright);
}

/* Selection */
::selection {
    background: var(--lum-violet);
    color: var(--text-radiant);
}

/* Focus outline */
:focus-visible {
    outline: 2px solid var(--lum-violet);
    outline-offset: 2px;
}

/* ============================================
   SECTION 3: AMBIENT BACKGROUNDS
   ============================================ */

/* Animated aurora background */
.bg-aurora {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-aurora::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background:
        radial-gradient(ellipse 600px 400px at 20% 30%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 500px 300px at 80% 70%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 300px 200px at 70% 20%, rgba(236, 72, 153, 0.06) 0%, transparent 50%);
    animation: aurora-drift 25s ease-in-out infinite;
    filter: blur(60px);
}

.bg-aurora::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background:
        radial-gradient(ellipse 400px 300px at 60% 40%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 350px 250px at 30% 60%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    animation: aurora-drift-alt 30s ease-in-out infinite;
    filter: blur(80px);
}

@keyframes aurora-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(3%, 2%) rotate(3deg) scale(1.02); }
    50% { transform: translate(-2%, 4%) rotate(-2deg) scale(0.98); }
    75% { transform: translate(-4%, -2%) rotate(2deg) scale(1.01); }
}

@keyframes aurora-drift-alt {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-3%, 3%) rotate(-4deg); }
    66% { transform: translate(3%, -2%) rotate(3deg); }
}

/* Grid pattern overlay */
.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.025;
    background-image:
        linear-gradient(var(--text-secondary) 1px, transparent 1px),
        linear-gradient(90deg, var(--text-secondary) 1px, transparent 1px);
    background-size: 64px 64px;
}

/* Noise texture overlay */
.bg-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================
   SECTION 4: LAYOUT COMPONENTS
   ============================================ */

/* App Container */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--void-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: var(--z-fixed);
    transition: width var(--duration-slow) var(--ease-out);
}

.sidebar-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--grad-aurora);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-black);
    color: var(--text-radiant);
    box-shadow: var(--shadow-glow-md);
}

.sidebar-logo-text {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
    color: var(--text-radiant);
}

.sidebar-logo-sub {
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    margin-top: 2px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: var(--space-5) var(--space-4);
    overflow-y: auto;
}

.nav-section {
    margin-bottom: var(--space-6);
}

.nav-section-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    padding: 0 var(--space-3);
    margin-bottom: var(--space-3);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
    margin-bottom: var(--space-1);
    position: relative;
}

.nav-item:hover {
    background: var(--void-elevated);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--grad-aurora-subtle);
    color: var(--text-radiant);
    border: 1px solid var(--border-accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--grad-aurora);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--lum-violet);
    color: var(--text-radiant);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-full);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) var(--space-8);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(var(--blur-lg));
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.page-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
}

.page-title span {
    background: var(--grad-aurora);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2);
    background: var(--void-elevated);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.user-profile:hover {
    background: var(--void-floating);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--grad-aurora);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    color: var(--text-radiant);
}

.user-info {
    text-align: left;
}

.user-name {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

.user-role {
    font-size: var(--text-xs);
    color: var(--lum-cyan);
    font-weight: var(--weight-medium);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: var(--space-8);
}

/* ============================================
   SECTION 5: CARDS & CONTAINERS
   ============================================ */

.card {
    background: var(--void-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--grad-violet-vertical);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--text-radiant);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-subtle);
    background: var(--void-elevated);
}

/* Stat Cards */
.stat-card {
    background: var(--void-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-aurora);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

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

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

.stat-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-bottom: var(--space-2);
}

.stat-value {
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    color: var(--text-radiant);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-none);
    margin-bottom: var(--space-2);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
}

.stat-change.positive {
    color: var(--sem-success);
}

.stat-change.negative {
    color: var(--sem-danger);
}

/* ============================================
   SECTION 6: BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-none);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--ease-out);
}

.btn:hover::before {
    transform: translateX(100%);
}

/* Primary Button */
.btn-primary {
    background: var(--grad-aurora);
    color: var(--text-radiant);
    box-shadow: var(--shadow-sm), var(--shadow-glow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow-md);
}

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

/* Secondary Button */
.btn-secondary {
    background: var(--void-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--void-floating);
    border-color: var(--border-accent);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
    background: var(--void-elevated);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}

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

/* Danger Button */
.btn-danger {
    background: var(--sem-danger-subtle);
    color: var(--sem-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
}

.btn-block {
    width: 100%;
}

/* ============================================
   SECTION 7: FORM ELEMENTS
   ============================================ */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--void-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-primary);
    transition: all var(--duration-fast) var(--ease-out);
}

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

.form-input:hover {
    border-color: var(--border-accent);
}

.form-input:focus {
    outline: none;
    border-color: var(--lum-violet);
    box-shadow: 0 0 0 3px var(--lum-violet-subtle);
    background: var(--void-floating);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Search Input */
.search-input {
    position: relative;
}

.search-input input {
    padding-left: calc(var(--space-4) + 24px);
}

.search-input::before {
    content: '🔍';
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-base);
    opacity: 0.5;
}

/* Select */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: calc(var(--space-4) + 24px);
}

/* Checkbox */
.form-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-sm);
    cursor: pointer;
    appearance: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.form-checkbox:checked {
    background: var(--lum-violet);
    border-color: var(--lum-violet);
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5L4.5 8.5L11 1.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================
   SECTION 8: BADGES & STATUS
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
}

/* Package Badges */
.badge-free {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-secondary);
}

.badge-starter {
    background: var(--lum-cyan-subtle);
    color: var(--lum-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-pro {
    background: var(--lum-violet-subtle);
    color: var(--lum-violet);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.badge-enterprise {
    background: var(--grad-aurora-subtle);
    color: var(--text-radiant);
    border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
}

.status-active {
    background: var(--sem-success-subtle);
    color: var(--sem-success);
}

.status-active::before {
    background: var(--sem-success);
    box-shadow: 0 0 8px var(--sem-success);
}

.status-trialing {
    background: var(--sem-warning-subtle);
    color: var(--sem-warning);
}

.status-trialing::before {
    background: var(--sem-warning);
}

.status-cancelled {
    background: var(--sem-danger-subtle);
    color: var(--sem-danger);
}

.status-cancelled::before {
    background: var(--sem-danger);
}

.status-suspended {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-secondary);
}

.status-suspended::before {
    background: var(--text-secondary);
}

/* ============================================
   SECTION 9: DATA TABLES
   ============================================ */

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

.data-table th {
    text-align: left;
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--void-elevated);
}

.data-table th:first-child {
    padding-left: var(--space-6);
}

.data-table td {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-sm);
    vertical-align: middle;
}

.data-table td:first-child {
    padding-left: var(--space-6);
}

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

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

.data-table tbody tr:hover {
    background: rgba(124, 58, 237, 0.04);
}

/* User Cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-cell-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: var(--grad-aurora);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.user-cell-info {
    min-width: 0;
}

.user-cell-name {
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-cell-email {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-subtle);
}

.pagination-info {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.page-btn:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--lum-violet);
    border-color: var(--lum-violet);
    color: var(--text-radiant);
}

/* ============================================
   SECTION 10: MODALS
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

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

.modal {
    width: 100%;
    max-width: var(--modal-max-width);
    max-height: 90vh;
    background: var(--void-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-2xl), var(--shadow-glow-lg);
    transform: scale(0.95) translateY(20px);
    transition: transform var(--duration-normal) var(--ease-spring);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) var(--space-8);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--grad-violet-vertical);
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--void-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: var(--text-lg);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.modal-close:hover {
    background: var(--void-floating);
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-8);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) var(--space-8);
    border-top: 1px solid var(--border-subtle);
    background: var(--void-elevated);
}

/* ============================================
   SECTION 11: TABS
   ============================================ */

.tabs-container {
    border-bottom: 1px solid var(--border-subtle);
}

.tabs {
    display: flex;
    padding: 0 var(--space-8);
    gap: var(--space-1);
    overflow-x: auto;
}

.tab {
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: all var(--duration-fast) var(--ease-out);
}

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

.tab.active {
    color: var(--lum-violet);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-aurora);
    border-radius: 2px 2px 0 0;
}

.tab-content {
    padding: var(--space-8);
    overflow-y: auto;
    max-height: calc(90vh - 380px);
}

.tab-content[hidden] {
    display: none;
}

/* ============================================
   SECTION 12: PROGRESS BARS
   ============================================ */

.progress {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar.normal {
    background: linear-gradient(90deg, var(--lum-cyan-dim), var(--lum-cyan-bright));
}

.progress-bar.warning {
    background: linear-gradient(90deg, var(--sem-warning), #fbbf24);
}

.progress-bar.danger {
    background: linear-gradient(90deg, var(--sem-danger), #f87171);
}

/* Usage Card */
.usage-card {
    background: var(--void-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.usage-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}

.usage-icon {
    width: 32px;
    height: 32px;
    background: var(--void-elevated);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
}

.usage-percent {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.usage-percent.normal {
    background: var(--lum-cyan-subtle);
    color: var(--lum-cyan);
}

.usage-percent.warning {
    background: var(--sem-warning-subtle);
    color: var(--sem-warning);
}

.usage-percent.danger {
    background: var(--sem-danger-subtle);
    color: var(--sem-danger);
}

.usage-stats {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-3);
    font-size: var(--text-sm);
}

.usage-current {
    font-family: var(--font-mono);
    font-weight: var(--weight-semibold);
}

.usage-limit {
    color: var(--text-muted);
}

/* ============================================
   SECTION 13: ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.alert-info {
    background: var(--sem-info-subtle);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--sem-info);
}

.alert-success {
    background: var(--sem-success-subtle);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--sem-success);
}

.alert-warning {
    background: var(--sem-warning-subtle);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--sem-warning);
}

.alert-danger {
    background: var(--sem-danger-subtle);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--sem-danger);
}

/* ============================================
   SECTION 14: GRIDS & UTILITIES
   ============================================ */

.grid {
    display: grid;
    gap: var(--space-5);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Spacing utilities */
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

/* Text utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ============================================
   SECTION 15: GOOGLE OAUTH BUTTON
   ============================================ */

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-4) var(--space-6);
    background: var(--text-radiant);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: #1f2937;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-google:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   SECTION 16: LOGIN PAGE SPECIFIC
   ============================================ */

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

.login-brand-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-12);
    background: var(--void-surface);
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-aurora-subtle);
    opacity: 0.5;
}

.login-form-panel {
    width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-12);
    background: var(--void-deep);
    position: relative;
}

.login-logo-large {
    width: 80px;
    height: 80px;
    background: var(--grad-aurora);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    color: var(--text-radiant);
    box-shadow: var(--shadow-glow-lg);
    margin-bottom: var(--space-6);
}

.login-brand-title {
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
}

.login-brand-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    max-width: 400px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    position: relative;
    z-index: 1;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.login-feature-icon {
    width: 40px;
    height: 40px;
    background: var(--lum-violet-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
}

.login-feature-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

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

@media (max-width: 1024px) {
    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        width: 100%;
    }
}

/* ============================================
   SECTION 17: ANIMATIONS
   ============================================ */

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

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fadeIn { animation: fadeIn var(--duration-normal) var(--ease-out); }
.animate-slideUp { animation: slideUp var(--duration-normal) var(--ease-out); }
.animate-slideDown { animation: slideDown var(--duration-normal) var(--ease-out); }
.animate-scaleIn { animation: scaleIn var(--duration-normal) var(--ease-spring); }
.animate-pulse { animation: pulse 2s var(--ease-in-out) infinite; }

/* Stagger delays */
.delay-1 { animation-delay: 50ms; }
.delay-2 { animation-delay: 100ms; }
.delay-3 { animation-delay: 150ms; }
.delay-4 { animation-delay: 200ms; }
.delay-5 { animation-delay: 250ms; }
