/* ==========================================================
   FORGE FITNESS — ADMIN PANEL
   Design: Apple-inspired glass refraction · Capsule design
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg:          #000000;
    --bg-1:        #0a0a0a;
    --bg-2:        #111111;
    --bg-3:        #161616;
    --bg-hover:    #1c1c1c;
    --text-1:      #ededed;
    --text-2:      #888888;
    --text-3:      #555555;
    --border-1:    #1f1f1f;
    --border-2:    #2e2e2e;
    --border-3:    #3d3d3d;
    --accent:      #ffffff;
    --success:     #3eca7b;
    --warning:     #f5a623;
    --danger:      #ff4444;
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-capsule: 100px;

    /* Spacing Design Tokens */
    --space-xs: 4px;   /* Tight element grouping (labels to icons) */
    --space-sm: 8px;   /* Internal component padding (default stack spacing) */
    --space-md: 16px;  /* Rows, smaller container internal padding */
    --space-lg: 20px;  /* Standard paragraph spacing, grid gap mobile */
    --space-xl: 32px;  /* Section sub-groupings, modal margins */
    --space-xxl: 60px; /* Web layout macro margins */

    /* ==========================================================
       APPLE HIG TYPOGRAPHY SYSTEM: SF FAMILY & NEW YORK
       ========================================================== */
    /* 1. SF Pro (System font for iOS, iPadOS, macOS and tvOS) */
    --font-sf-pro: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font: var(--font-sf-pro);

    /* 2. SF Compact (WatchOS system font, optimized for small sizes & narrow columns) */
    --font-sf-compact: "SF Compact Display", "SF Compact Text", "SF Compact", "SF Pro", -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    --font-compact: var(--font-sf-compact);

    /* 3. SF Mono (Used in Xcode, enables alignment between rows and columns of text) */
    --font-sf-mono: "SF Mono", "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --font-mono: var(--font-sf-mono);

    /* 4. New York (Apple reading face at small sizes & graphic display face at large sizes) */
    --font-new-york: "New York", -apple-system-ui-serif, ui-serif, Charter, Georgia, "Times New Roman", serif;
    --font-serif: var(--font-new-york);
    --font-ny: var(--font-new-york);

    /* 5. Multilingual SF Typography Suite (Arabic, Armenian, Georgian, Hebrew) */
    --font-sf-arabic: "SF Arabic", var(--font-sf-pro);
    --font-sf-armenian: "SF Armenian", var(--font-sf-pro);
    --font-sf-georgian: "SF Georgian", var(--font-sf-pro);
    --font-sf-hebrew: "SF Hebrew", var(--font-sf-pro);
    --font-multilingual: "SF Arabic", "SF Armenian", "SF Georgian", "SF Hebrew", var(--font-sf-pro);

    /* Apple HIG Optical Tracking (Letter-Spacing per size category) */
    --tracking-display:      -0.022em; /* Display / Large Titles (>32px) */
    --tracking-title-1:      -0.016em; /* Title 1 (24px - 32px) */
    --tracking-title-2:      -0.012em; /* Title 2 (19px - 24px) */
    --tracking-title-3:      -0.008em; /* Title 3 (16px - 19px) */
    --tracking-headline:     -0.005em; /* Headline / Semibold (14px - 16px) */
    --tracking-body:         -0.002em; /* Regular Body Text (13px - 15px) */
    --tracking-callout:       0em;     /* Callouts / Form inputs (12px - 14px) */
    --tracking-subheadline:   0em;     /* Subheadlines (12px - 13px) */
    --tracking-footnote:      0.012em; /* Footnotes & helper captions (11px - 12px) */
    --tracking-caption-1:     0.024em; /* Small labels & timestamps (10px - 11px) */
    --tracking-caption-2:     0.050em; /* Micro Uppercase / Pill badges (8px - 10px) */
    --tracking-mono:          0.020em; /* SF Mono tabular alignment */
    --ease: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --ease-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Apple glass variables */
    --glass-bg: rgba(10, 10, 10, 0.55);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --glass-blur: blur(40px) saturate(180%);

    /* Apple System Palette */
    --apple-bg: #000000;
    --apple-card: #1C1C1E;
    --apple-card-hover: #2C2C2E;
    --apple-modal: #2C2C2E;

    /* Apple Materials for Dark Mode */
    --apple-glass-bg: rgba(28, 28, 30, 0.7);      /* Muted semi-transparent plate */
    --apple-glass-bright: rgba(255, 255, 255, 0.08); /* High-shine glass plate */
    --apple-glass-border: rgba(255, 255, 255, 0.12); /* Clean reflection highlight */
    --apple-blur: blur(20px) saturate(190%);        /* Deep iOS-style structural blur */
    --glass-bar: rgba(20, 20, 22, 0.85);
    --header-height: 88px;
    --tabbar-height: 76px;
    --spacing-unit: 16px;
    
    /* ==========================================================
       APPLE HIG COLOR TYPES & SEMANTIC TYPOGRAPHY
       ========================================================== */
    --color-label-primary:    #F5F5F7;
    --color-label-secondary:  #8E8E93;
    --color-label-tertiary:   #636366;
    --color-label-quaternary: #48484A;

    --color-bg-base:          #000000;
    --color-bg-secondary:     #1C1C1E;
    --color-bg-tertiary:      #2C2C2E;
    --color-bg-grouped:       #161618;

    --color-separator:        #38383A;
    --color-separator-opaque: #545458;

    /* ==========================================================
       APPLE SYSTEM ACCENTS (DYNAMIC COLOR PALETTE)
       ========================================================== */
    --accent-blue:            #0A84FF;
    --accent-blue-rgb:        10, 132, 255;
    --accent-emerald:         #30D158;
    --accent-emerald-rgb:     48, 209, 88;
    --accent-purple:          #BF5AF2;
    --accent-purple-rgb:      191, 90, 242;
    --accent-orange:          #FF9F0A;
    --accent-orange-rgb:      255, 159, 10;
    --accent-cyan:            #64D2FF;
    --accent-cyan-rgb:        100, 210, 255;
    --accent-pink:            #FF375F;
    --accent-pink-rgb:        255, 55, 95;

    /* Active Dynamic System Accent (Defaults to Electric Blue) */
    --accent-current:         var(--accent-blue);
    --accent-current-rgb:     var(--accent-blue-rgb);

    /* ==========================================================
       DEPTH MATRIX (Z-AXIS SPATIAL ELEVATION TOKENS)
       ========================================================== */
    --depth-shadow-recessed:  inset 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    --depth-shadow-base:      0 4px 20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --depth-shadow-raised:    0 16px 44px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.12);
    --depth-shadow-lifted:    0 24px 64px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(255, 255, 255, 0.18);
    --depth-shadow-modal:     0 36px 100px rgba(0, 0, 0, 0.96), 0 0 0 1px rgba(255, 255, 255, 0.15);

    /* ==========================================================
       MOTION PHYSICS & TIMING CURVES (APPLE HIG DESIGNED)
       - Entrances: Ease-Out (Decelerates into view)
       - Exits: Ease-In (Accelerates away from view)
       - Interface: Physical Spring with slight overshoot
       - Strict: ZERO linear transitions
       ========================================================== */
    --ease-entrance:          cubic-bezier(0.16, 1, 0.3, 1);       /* Deceleration / Ease-Out */
    --ease-exit:              cubic-bezier(0.4, 0, 1, 1);           /* Acceleration / Ease-In */
    --ease-spring:            cubic-bezier(0.34, 1.28, 0.64, 1);   /* Interface spring with slight overshoot */
    --ease-spring-subtle:     cubic-bezier(0.34, 1.15, 0.64, 1);   /* Micro-spring slight overshoot */
    --ease-spring-snappy:     cubic-bezier(0.175, 0.885, 0.32, 1.2); /* Snappy spring */
    --motion-entrance:        cubic-bezier(0.16, 1, 0.3, 1);
    --motion-exit:            cubic-bezier(0.4, 0, 1, 1);
    --motion-spring:          cubic-bezier(0.34, 1.28, 0.64, 1);
    --motion-smooth:          cubic-bezier(0.16, 1, 0.3, 1);
    --motion-fluid:           cubic-bezier(0.25, 1, 0.5, 1);
    --motion-stiff:           cubic-bezier(0.6, -0.28, 0.735, 0.045);
    --motion-veil:            cubic-bezier(0.33, 1, 0.68, 1);
    --motion-bounce:          cubic-bezier(0.34, 1.3, 0.64, 1);
    
    /* Text */
    --apple-text-primary: #F5F5F7;
    --apple-text-secondary: #8E8E93;
    
    /* Interactive Elements */
    --apple-btn-white: #FFFFFF;
    --apple-btn-white-hover: #E5E5EA;
    --apple-btn-delete: #FF453A;
    --apple-btn-delete-hover: #FF3B30;
    
    /* Structure */
    --apple-border: #38383A;
    --apple-radius: 12px; /* Apple's standard squircle base border radius */
}

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

/* ==========================================================
   LAYOUT ARCHITECTURE & RESPONSIVE CONTAINER SYSTEM
   Built on Flexbox (1D), CSS Grid (2D), & Adaptive Sizing Tokens
   ========================================================== */

/* 1. Modern Layout Engines */
.flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

/* CSS Grid (2D) */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .grid-2col, .grid-3col, .grid-4col {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* 2. Sizing & Centering Techniques */
/* Margin Auto */
.container-auto {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-lg);
}

/* Flexbox Absolute Center */
.center-flex-viewport {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.center-flex {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CSS Grid Center */
.center-grid {
    display: grid;
    place-items: center;
}

/* 3. Advanced & Relative Positioning */
.pos-relative {
    position: relative;
}

.pos-absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pos-badge {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    z-index: 10;
}

.pos-sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

/* 4. Responsive & Adaptive Constraints */
.container-constrained {
    width: 100%;
    max-width: clamp(320px, 94vw, 1360px);
    margin-inline: auto;
    padding-inline: clamp(var(--space-md), 3vw, var(--space-xl));
}

.fluid-card-pad {
    padding: clamp(var(--space-md), 2.5vw, var(--space-xl));
}

.fluid-gap {
    gap: clamp(var(--space-sm), 2vw, var(--space-lg));
}

/* ==========================================================
   HIGH-PERFORMANCE MOTION & ANIMATION SYSTEM
   GPU-Accelerated Transitions, Keyframe Engines & Compositing
   ========================================================== */

/* 1. Hardware Acceleration (Compositor Layer Only) */
.gpu-layer {
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 2. Motion Curves */
:root {
    --ease-spring: cubic-bezier(0.34, 1.28, 0.64, 1); /* Interface: spring with slight overshoot */
    --ease-spring-subtle: cubic-bezier(0.34, 1.15, 0.64, 1);
    --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);   /* Entrances: ease out */
    --ease-exit: cubic-bezier(0.4, 0, 1, 1);           /* Exits: ease in */
    --ease-glide: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
    --dur-instant: 120ms;
    --dur-snappy: 220ms;
    --dur-natural: 360ms;
    --dur-deliberate: 550ms;
}

/* Micro-interaction transition defaults */
.interactive-hover {
    transition: transform var(--dur-snappy) var(--ease-spring),
                opacity var(--dur-snappy) var(--ease-entrance),
                box-shadow var(--dur-snappy) var(--ease-spring) !important;
    will-change: transform;
}

.interactive-hover:hover {
    transform: translateY(-2px) scale(1.015);
}

.interactive-hover:active {
    transform: translateY(0) scale(0.97);
    transition: transform var(--dur-instant) var(--ease-entrance) !important;
}

/* Keyframe Entrances (Only animating transform & opacity for 0 jank) */
@keyframes motionFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes motionSlideUp {
    from {
        opacity: 0;
        transform: translate3d(0, 16px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes motionScaleIn {
    from {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes motionPulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(122, 155, 255, 0);
    }
    50% {
        box-shadow: 0 0 20px 4px rgba(122, 155, 255, 0.25);
    }
}

.animate-fade-in {
    animation: motionFadeIn var(--dur-natural) var(--ease-entrance) forwards;
}

.animate-slide-up {
    animation: motionSlideUp var(--dur-natural) var(--ease-entrance) forwards;
}

.animate-scale-in {
    animation: motionScaleIn var(--dur-natural) var(--ease-entrance) forwards;
}

/* Scroll-Driven Native Animations (Progressive Enhancement) */
@supports (animation-timeline: scroll()) {
    .scroll-fade-reveal {
        animation: motionSlideUp var(--ease-entrance) both;
        animation-timeline: view();
        animation-range: entry 10% cover 30%;
    }
}

/* ==========================================================
   DYNAMIC SYSTEM ACCENTS & THEMATIC OVERRIDES
   ========================================================== */
:root[data-accent="emerald"] {
    --accent-current: var(--accent-emerald);
    --accent-current-rgb: var(--accent-emerald-rgb);
    --lg-fill: var(--accent-emerald);
    --lg-on: var(--accent-emerald);
}
:root[data-accent="purple"] {
    --accent-current: var(--accent-purple);
    --accent-current-rgb: var(--accent-purple-rgb);
    --lg-fill: var(--accent-purple);
    --lg-on: var(--accent-purple);
}
:root[data-accent="orange"] {
    --accent-current: var(--accent-orange);
    --accent-current-rgb: var(--accent-orange-rgb);
    --lg-fill: var(--accent-orange);
    --lg-on: var(--accent-orange);
}
:root[data-accent="cyan"] {
    --accent-current: var(--accent-cyan);
    --accent-current-rgb: var(--accent-cyan-rgb);
    --lg-fill: var(--accent-cyan);
    --lg-on: var(--accent-cyan);
}
:root[data-accent="pink"] {
    --accent-current: var(--accent-pink);
    --accent-current-rgb: var(--accent-pink-rgb);
    --lg-fill: var(--accent-pink);
    --lg-on: var(--accent-pink);
}
:root[data-accent="blue"] {
    --accent-current: var(--accent-blue);
    --accent-current-rgb: var(--accent-blue-rgb);
    --lg-fill: var(--accent-blue);
    --lg-on: var(--accent-blue);
}

/* Apple System Accent Palette Switcher Dots */
.accent-dot-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    transition: transform 0.22s var(--motion-spring), box-shadow 0.22s ease, border-color 0.2s ease;
    outline: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.accent-dot-btn:hover {
    transform: scale(1.18);
    box-shadow: 0 0 12px var(--accent-color);
}

.accent-dot-btn:active {
    transform: scale(0.92);
}

.accent-dot-btn.active {
    border-color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 0 14px var(--accent-color);
}

.accent-dot-btn.active::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background-color: #ffffff;
    opacity: 0.88;
}

/* ==========================================================
   DEPTH MATRIX & 3D INTERACTIVE PERSPECTIVE TILT
   ========================================================== */
.depth-recessed {
    box-shadow: var(--depth-shadow-recessed) !important;
    background: var(--color-bg-grouped) !important;
}
.depth-base {
    box-shadow: var(--depth-shadow-base) !important;
}
.depth-raised {
    box-shadow: var(--depth-shadow-raised) !important;
}
.depth-lifted {
    box-shadow: var(--depth-shadow-lifted) !important;
}
.depth-modal {
    box-shadow: var(--depth-shadow-modal) !important;
}

/* 3D Depth Card with Interactive Specular Light Flare */
.depth-card,
.apple-glass-card[data-depth-tilt] {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.35s var(--motion-smooth), box-shadow 0.35s var(--motion-smooth), border-color 0.25s ease;
    will-change: transform;
}

.depth-card::before,
.apple-glass-card[data-depth-tilt]::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        circle 380px at var(--tilt-glare-x, 50%) var(--tilt-glare-y, 50%),
        rgba(255, 255, 255, var(--tilt-glare-opacity, 0)),
        rgba(255, 255, 255, calc(var(--tilt-glare-opacity, 0) * 0.35)) 35%,
        transparent 75%
    );
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.depth-card:hover,
.apple-glass-card[data-depth-tilt]:hover {
    box-shadow: var(--depth-shadow-raised);
    border-color: rgba(255, 255, 255, 0.16);
}

.depth-card.is-tilting,
.apple-glass-card[data-depth-tilt].is-tilting {
    transition: box-shadow 0.1s ease;
}

/* ==========================================================
   SEMANTIC COLOR TYPE UTILITIES
   ========================================================== */
.text-label-primary   { color: var(--color-label-primary) !important; }
.text-label-secondary { color: var(--color-label-secondary) !important; }
.text-label-tertiary  { color: var(--color-label-tertiary) !important; }
.text-accent          { color: var(--accent-current) !important; }

/* ==========================================================
   MOTION UTILITY CLASSES
   ========================================================== */
.motion-spring {
    transition: transform 0.4s var(--motion-spring) !important;
}
.motion-spring:hover {
    transform: scale(1.025);
}
.motion-spring:active {
    transform: scale(0.96) !important;
}

.motion-bounce {
    transition: transform 0.6s var(--motion-bounce) !important;
}

.motion-lift {
    transition: transform 0.25s var(--motion-smooth), box-shadow 0.25s var(--motion-smooth) !important;
}
.motion-lift:hover {
    transform: translateY(-3px) translateZ(10px);
    box-shadow: var(--depth-shadow-raised) !important;
}
.motion-lift:active {
    transform: translateY(0) scale(0.98);
}

/* ==========================================================
   TACTILE ERRORS & SPATIAL FRICTION (THE SHAKING FORM)
   Horizontal wobble simulating an object hitting a solid wall
   ========================================================== */
@keyframes appleShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.ux-invalid-action {
  animation: appleShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

/* ==========================================================
   APPLE UX ACCESSIBILITY & SIZING PRINCIPLES
   ========================================================== */
/* The 44px Minimum Touch Target Rule */
.touch-target-44,
.apple-btn,
.btn-primary-white,
.btn-destructive-delete,
.liquid-tab-bar .status-btn {
  min-height: 44px;
}

/* Snappy Mechanical Click Rebound */
.active-depress:active,
.stat-card:active,
.capsule-nav:active {
  transform: scale(0.97) !important;
}

/* Zero Blur Artifacting: High Contrast Text Safeguard */
p, label, span, .text-muted {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
    height: 100%;
    min-height: 100vh;
    background: #000;
    color: var(--text-1);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before { display: none !important; }

#webgl-waves-bg, .animated-wave-banner { display: none !important; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }

/* ==========================================================
   APPLE GLASS REFRACTION SYSTEM
   Uses backdrop-filter + layered gradient overlays to
   simulate light bending through frosted glass surfaces
   ========================================================== */

/* Core glass capsule — the primary glass treatment */
.glass-capsule {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px var(--glass-highlight) inset,
        0 8px 40px rgba(0,0,0,0.4),
        0 1px 0 rgba(255,255,255,0.04) inset;
    position: relative;
    overflow: hidden;
}

/* Subtle refraction gradient overlay */
.glass-capsule::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 25% 0%, rgba(255,255,255,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 80% 100%, rgba(120,160,255,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

/* Small glass capsule — for badges, profile cards */
.glass-capsule-sm {
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 0 0 1px var(--glass-highlight) inset;
}

/* Glass card — stat cards, form containers */
.glass-capsule-card {
    background: rgba(15, 15, 20, 0.55);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.02) inset,
        0 10px 40px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-capsule-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05) inset,
        0 15px 50px rgba(0,0,0,0.6);
}

.glass-capsule-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.08) 50%, transparent 90%);
    pointer-events: none;
}

/* Glass button */
.glass-btn {
    background: var(--accent);
    color: #000;
    border: 1px solid var(--accent);
    border-radius: var(--r-capsule);
    position: relative;
    overflow: hidden;
}

.glass-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.glass-btn:hover::after {
    left: 120%;
}

/* Capsule button */
.capsule-btn {
    border-radius: var(--r-capsule) !important;
}

/* Capsule badge */
.capsule-badge {
    border-radius: var(--r-capsule) !important;
}

/* Capsule toast */
.capsule-toast {
    border-radius: var(--r-capsule) !important;
}

/* Glass sidebar */
.glass-sidebar {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid var(--glass-border) !important;
}

/* Capsule nav items */
.capsule-nav {
    border-radius: var(--r-capsule) !important;
}

/* ==========================================================
   LOADER — Pure CSS, cross-browser (no SVG stroke-dash)
   ========================================================== */
/* ==========================================
   LOADING OVERLAY & SPIN TRANSITIONS
   (THE GEOMETRIC PULSE LOADING ARCHITECTURE)
   ========================================== */
.apple-loader-veil {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85); /* Deep pitch black opacity overlay */
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999999; /* Higher priority layer above sticky navigation */
  transition: opacity 0.5s cubic-bezier(0.33, 1, 0.68, 1), 
              visibility 0.5s;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Elegant, thin hairline spin ring */
.spinner-ring {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #FFFFFF; /* Stark white single dynamic accent point */
  border-radius: 50%;
  /* Apple HIG stepped activity indicator — 12 discrete radial ticks, zero linear interpolation */
  animation: appleSpin 0.9s steps(12, end) infinite;
  margin: 0 auto 16px;
}

/* Calming typography breathing animation */
.loading-label {
  font-size: 13px;
  font-weight: 500;
  color: #8E8E93;
  letter-spacing: -0.1px;
  animation: labelPulse 1.6s ease-in-out infinite;
  text-align: center;
}

/* Keyframes */
@keyframes appleSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes labelPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Hiding class triggered via JS transition */
.apple-loader-veil.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Hide legacy SVG-based elements */
.stroke-loader-container,
.stroke-text__svg,
.stroke-loader-subtext { display: none !important; }

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: appleLoaderFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes appleLoaderFadeIn {
    0%   { opacity: 0; transform: translateY(18px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.loader-logo-mark {
    display: none !important;
}

.loader-brand {
    font-family: var(--font) !important;
    font-size: clamp(28px, 4.5vw, 44px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
    user-select: none !important;
    position: relative !important;
    background: linear-gradient(110deg, #52525b 15%, #ffffff 48%, #ffffff 52%, #52525b 85%) !important;
    background-size: 200% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    animation: appleTextShine 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite !important;
}

@keyframes appleTextShine {
    0%   { background-position: 180% 0; }
    100% { background-position: -20% 0; }
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 40px;
  aspect-ratio: 1;
  --loader-color: #ffffff;
  --c: linear-gradient(var(--loader-color, #000) 0 0);
  --m: radial-gradient(farthest-side, var(--loader-color, #000) 90%, #0000);
  background: var(--c), var(--m), var(--c);
  background-size: 16px 8px, 10px 10px; 
  background-repeat: no-repeat;
  margin: 24px auto 14px auto;
  display: block;
  animation: 
    l20-1 1s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95),
    l20-2 4s infinite steps(4, jump-end) -.4s;
}
@keyframes l20-1 {
  0%,10%   {background-position: calc(50% - 8px) 50%,50% -15px             ,calc(50% + 8px)   50%}
  33%      {background-position: -20px 50%          ,50%  50%              ,calc(100% + 20px) 50%}
  66%      {background-position: -20px 50%          ,50%  calc(100% + 15px),calc(100% + 20px) 50%}
  80%,100% {background-position: calc(50% - 8px)50% ,50%  calc(100% + 15px),calc(50% + 8px)   50%}
}
@keyframes l20-2 {
  0% ,24.99% {transform: rotate(0)}
  25%,49.99% {transform: rotate(90deg)}
  50%,74.99% {transform: rotate(180deg)}
  75%,100%   {transform: rotate(270deg)}
}

.loader-bar-track {
    width: 200px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    margin-top: 26px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: none !important;
}

.loader-bar-fill {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform-origin: left !important;
    transform: scaleX(0) !important;
    animation: appleBarLoad 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes appleBarLoad {
    0%   { transform: scaleX(0); }
    30%  { transform: scaleX(0.28); }
    70%  { transform: scaleX(0.78); }
    100% { transform: scaleX(1); }
}

.loader-sub {
    margin-top: 14px !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.28em !important;
    color: rgba(255, 255, 255, 0.42) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    opacity: 0;
    animation: appleSubFade 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards !important;
}

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

/* ==========================================================
   SERVER HEALTH CHECK OVERLAY
   ========================================================== */
.server-check-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loaderFadeIn 0.4s ease forwards;
}

.server-check-overlay.hidden {
    display: none !important;
}

.server-check-card {
    padding: 48px 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.server-check-brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-1);
    margin-bottom: 36px;
}

.server-check-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    margin-bottom: 28px;
}

.server-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid var(--border-1);
    border-radius: var(--r-capsule);
    transition: all 0.3s ease;
    opacity: 0.4;
}

.server-step.loading,
.server-step.done,
.server-step.fail {
    opacity: 1;
}

.server-step.done {
    border-color: rgba(62, 202, 123, 0.3);
    background: rgba(62, 202, 123, 0.05);
}

.server-step.fail {
    border-color: rgba(255, 68, 68, 0.3);
    background: rgba(255, 68, 68, 0.05);
}

.server-step-indicator {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.server-step-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-2);
    border-top-color: var(--text-1);
    border-radius: 50%;
    display: none;
    animation: serverSpin 0.9s steps(12, end) infinite;
}

.server-step.loading .server-step-spinner { display: block; }

.server-step-check,
.server-step-fail { display: none; }

.server-step.done .server-step-check {
    display: block;
    color: var(--success);
    animation: checkPop 0.3s ease;
}

.server-step.fail .server-step-fail {
    display: block;
    color: var(--danger);
    animation: checkPop 0.3s ease;
}

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

@keyframes checkPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.server-step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
}

.server-step.done .server-step-label { color: var(--text-1); }
.server-step.fail .server-step-label { color: var(--danger); }

.server-check-status {
    font-size: 0.82rem;
    color: var(--danger);
    min-height: 20px;
    margin-bottom: 12px;
}

#server-retry-btn {
    margin-top: 8px;
}

/* ==========================================================
   SCREEN STATES
   ========================================================== */
.hidden-screen { display: none !important; }
.active-screen { display: flex; }
.hidden        { display: none !important; }
.role-hidden   { display: none !important; }
.active        { display: block; }

h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; color: var(--text-1); }

/* ==========================================================
   BREADCRUMBS
   ========================================================== */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 20px;
    font-size: 0.76rem;
    font-weight: 500;
}

.breadcrumb-link {
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.14s ease;
}

.breadcrumb-link:hover {
    color: var(--text-1);
}

.breadcrumb-sep {
    color: var(--text-3);
    font-size: 0.82rem;
}

.breadcrumb-current {
    color: var(--text-2);
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
    background: var(--accent);
    color: #000;
    border: 1px solid var(--accent);
    padding: 9px 18px;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--ease);
    border-radius: var(--r-capsule);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: none !important;
    text-shadow: none !important;
    white-space: nowrap;
}
.btn:hover { background: #d4d4d4; border-color: #d4d4d4; }
.btn:active { background: #b0b0b0; border-color: #b0b0b0; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-2);
    color: var(--text-1);
}
.btn-outline:hover { background: var(--bg-2); border-color: var(--border-3); color: var(--text-1); box-shadow: none !important; }

.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: var(--danger);
}
.btn-danger-outline:hover { background: rgba(255,68,68,0.1); border-color: var(--danger); }

.btn-sm {
    padding: 7px 14px;
    font-size: 0.78rem;
    min-height: 36px;
    position: relative;
    touch-action: manipulation;
}
/* Apple HIG Hit Target Rule: 44pt x 44pt minimum touch boundary */
.btn-sm::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

/* ==========================================================
   LOGIN SCREEN
   ========================================================== */
#login-container {
    height: 100vh;
    width: 100vw;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    position: relative;
    overflow: hidden;
}

#login-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border-1) 1px, transparent 1px), linear-gradient(90deg, var(--border-1) 1px, transparent 1px);
    background-size: 72px 72px;
    background-position: center;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
    opacity: 0.45;
    pointer-events: none;
}

.login-card {
    padding: 42px 36px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: loaderFadeIn 0.5s ease forwards;
}

.login-card h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; position: relative; z-index: 2; }
.login-card p { color: var(--text-2); margin-bottom: 30px; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; position: relative; z-index: 2; }
.login-card form { position: relative; z-index: 2; }

/* ==========================================================
   FORM INPUTS
   ========================================================== */
.input-group { text-align: left; margin-bottom: 16px; }

.input-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.71rem;
    color: var(--text-2);
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border-1);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 0.88rem;
    border-radius: var(--r-capsule);
    transition: var(--ease);
}

.input-group textarea {
    border-radius: 16px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--border-3);
    background: var(--bg-1);
}

.input-group input::placeholder,
.input-group textarea::placeholder { color: var(--text-3); }

.input-group select option,
.date-filters select option { background: #111; color: var(--text-1); }

.error-text { color: var(--danger); margin-bottom: 14px; font-size: 0.82rem; min-height: 18px; font-weight: 500; }
.slug-hint { display: block; font-size: 0.72rem; color: var(--text-3); margin-top: 4px; }

/* ==========================================================
   DASHBOARD LAYOUT
   ========================================================== */
#dashboard-container {
    min-height: 100vh;
    display: flex;
    width: 100%;
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* ==========================================================
   SIDEBAR
   ========================================================== */
.sidebar {
    width: 240px;
    min-width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    overflow-y: auto;
    max-height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar .brand-container {
    padding: 0 16px 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar .brand {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .brand svg { color: var(--text-2); flex-shrink: 0; }

.sidebar .brand-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    background: var(--bg-2);
    color: var(--text-2);
    border: 1px solid var(--border-1);
    border-radius: var(--r-capsule);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 5px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 500;
    transition: var(--ease);
    border: 1px solid transparent;
}

.nav-links li a .nav-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.55;
    transition: var(--ease);
}

.nav-links li a:hover { background: rgba(255,255,255,0.04); color: var(--text-1); }
.nav-links li a:hover .nav-icon { opacity: 1; }

.nav-links li a.active {
    background: rgba(255,255,255,0.06);
    color: var(--text-1);
    font-weight: 600;
    border-color: var(--glass-border);
}
.nav-links li a.active .nav-icon { opacity: 1; }

.sidebar-footer {
    padding: 0 8px;
    margin-top: 16px;
    border-top: 1px solid var(--glass-border);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-profile-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--r-capsule);
    background: var(--bg-2);
    color: var(--text-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid var(--border-2);
    flex-shrink: 0;
}

.user-info { overflow: hidden; }

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

.user-role-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: var(--r-capsule);
    display: inline-block;
}
.user-role-badge.admin { background: var(--bg-2); color: var(--text-1); border: 1px solid var(--border-2); }
.user-role-badge.employee { background: rgba(62, 202, 123, 0.1); color: var(--success); border: 1px solid rgba(62, 202, 123, 0.2); }

#logout-btn { 
    width: 100%; 
    margin: 0; 
    padding: 10px 14px; 
    font-size: 0.8rem;
    min-height: 44px; /* Apple 44pt touch hit target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* ==========================================================
   CONTENT AREA
   ========================================================== */
.content-area {
    flex-grow: 1;
    padding: 32px 40px;
    overflow-y: auto;
    max-height: 100vh;
    background: transparent !important;
}

header { margin-bottom: 28px; }

header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-1);
}

header h2 svg { color: var(--text-2); flex-shrink: 0; opacity: 0.6; }

/* ==========================================================
   STATS GRID — Glass capsule metric cards
   ========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 28px 24px;
    transition: var(--ease);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { background: rgba(20,20,20,0.7); }

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-card h3 {
    color: var(--text-2);
    font-size: 0.76rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1.4;
}

.stat-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: var(--r-capsule);
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    flex-shrink: 0;
}

.stat-value {
    font-size: 2.4rem;
    font-family: var(--font);
    color: var(--text-1);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1.5px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 10px;
    font-weight: 500;
}

/* Stat card colored top accent lines */
.stat-card:nth-child(1)::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-card:nth-child(2)::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.stat-card:nth-child(3)::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.stat-card:nth-child(4)::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* ==========================================================
   FORM CONTAINERS
   ========================================================== */
.form-container {
    padding: 24px;
    margin-bottom: 24px;
}

.form-container h3 {
    margin-bottom: 18px;
    color: var(--text-1);
    font-size: 0.86rem;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-form .full-width { grid-column: 1 / -1; }

/* ==========================================================
   MEMBERSHIP CARDS
   ========================================================== */
.section-subtitle { margin-bottom: 14px; font-size: 0.86rem; font-weight: 600; color: var(--text-1); }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.data-card {
    padding: 20px;
    position: relative;
    transition: var(--ease);
}
.data-card:hover { background: rgba(20,20,20,0.7); }

.data-card h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 6px; }

.data-card .price {
    font-size: 1.5rem;
    font-family: var(--font);
    color: var(--text-1);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.data-card .slug { font-size: 0.73rem; color: var(--text-3); font-family: var(--font-mono); }
.data-card .tenure-text { font-size: 0.76rem; color: var(--text-2); margin-top: 4px; }

.delete-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--text-3);
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: var(--r-capsule);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ease);
    font-size: 0.8rem;
    border: 1px solid transparent;
}
.delete-icon:hover { color: var(--danger); background: rgba(255,68,68,0.08); border-color: rgba(255,68,68,0.22); }

/* ==========================================================
   FILTER BAR & SEARCH
   ========================================================== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 16px;
    border-radius: var(--r-capsule);
    border: 1px solid var(--glass-border);
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.search-box { position: relative; display: flex; align-items: center; }

.search-box input {
    padding: 8px 14px 8px 34px;
    background: var(--bg);
    border: 1px solid var(--border-1);
    color: var(--text-1);
    border-radius: var(--r-capsule);
    font-family: var(--font);
    width: 260px;
    transition: var(--ease);
    font-size: 0.83rem;
}

.search-box input:focus { border-color: var(--border-3); background: var(--bg-1); outline: none; }
.search-icon-svg { position: absolute; left: 10px; color: var(--text-3); pointer-events: none; }
.date-filters { display: flex; gap: 8px; align-items: center; }

.date-filters input,
.date-filters select {
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border-1);
    color: var(--text-1);
    border-radius: var(--r-capsule);
    font-family: var(--font);
    font-size: 0.81rem;
    transition: var(--ease);
}
.date-filters input:focus,
.date-filters select:focus { border-color: var(--border-3); outline: none; }
.date-filters select option { background: var(--bg-2); color: var(--text-1); }

/* ==========================================================
   DATA TABLES
   ========================================================== */
.table-container {
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.83rem;
    vertical-align: middle;
}

.data-table th {
    background: rgba(15, 15, 15, 0.6);
    color: var(--text-2);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
}

.data-table tbody tr { transition: var(--ease); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Status Badges — capsule shape */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--r-capsule);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-pill.active { background: rgba(62, 202, 123, 0.1); color: var(--success); border: 1px solid rgba(62, 202, 123, 0.2); }
.status-pill.action { background: rgba(245, 166, 35, 0.1); color: var(--warning); border: 1px solid rgba(245, 166, 35, 0.2); }
.status-pill.inactive { background: rgba(255, 68, 68, 0.08); color: var(--danger); border: 1px solid rgba(255, 68, 68, 0.18); }

.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; flex-shrink: 0; }

/* ==========================================================
   PERMISSIONS
   ========================================================== */
.permissions-container {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    margin-top: 12px;
}

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

.permissions-header h4 { font-size: 0.78rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.permissions-quick-actions { display: flex; gap: 6px; }

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
}

.permission-card {
    background: rgba(15,15,15,0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-capsule);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: var(--ease);
}
.permission-card:hover { border-color: var(--border-2); background: rgba(25,25,25,0.6); }

.permission-info { flex: 1; }
.permission-title { font-weight: 500; font-size: 0.85rem; color: var(--text-1); }
.permission-desc { font-size: 0.74rem; color: var(--text-2); margin-top: 3px; line-height: 1.4; }

/* Toggle Switch — capsule shape */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--r-capsule);
    transition: 0.14s ease;
}
.slider::before {
    content: '';
    position: absolute;
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background: var(--text-3);
    border-radius: var(--r-capsule);
    transition: 0.14s ease;
}

input:checked + .slider { background: var(--text-1); border-color: var(--text-1); }
input:checked + .slider::before { transform: translateX(16px); background: #000; }

.perm-count-badge {
    background: var(--bg-2);
    color: var(--text-1);
    border: 1px solid var(--border-1);
    padding: 2px 10px;
    border-radius: var(--r-capsule);
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.perm-pill-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }

.perm-mini-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: var(--r-capsule);
    background: var(--bg-2);
    color: var(--text-2);
    border: 1px solid var(--border-1);
    font-family: var(--font-mono);
}

.access-restricted-card {
    padding: 48px 28px;
    text-align: center;
    max-width: 480px;
    margin: 60px auto;
    border-color: rgba(255, 68, 68, 0.15) !important;
}
.access-restricted-card h3 { color: var(--danger); font-size: 1.05rem; margin-bottom: 10px; font-weight: 600; }
.access-restricted-card p { color: var(--text-2); font-size: 0.86rem; line-height: 1.6; }

/* ==========================================================
   ANALYTICS & ANALYTIC ENGINE
   ========================================================== */
.chart-container {
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: var(--glass-shadow);
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.analytics-filter-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.analytics-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-filter-group label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.capsule-select {
    background: rgba(20, 20, 20, 0.7);
    color: var(--text-1);
    border: 1px solid var(--glass-border);
    border-radius: 99px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: var(--ease);
}

.capsule-select:focus,
.capsule-select:hover {
    border-color: rgba(122, 155, 255, 0.4);
    background: rgba(30, 30, 30, 0.85);
}

.analytics-toggle-group {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 99px;
    padding: 3px;
    gap: 3px;
}

.analytics-toggle-group .btn {
    padding: 5px 14px;
    font-size: 0.76rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-2);
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analytics-toggle-group .btn:hover {
    color: #ffffff;
}

.analytics-toggle-group .btn.active {
    background: rgba(122, 155, 255, 0.22);
    color: #ffffff;
    border: 1px solid rgba(122, 155, 255, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.analytics-kpis {
    margin-bottom: 24px;
}

.chart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.2px;
    margin: 0;
}

.chart-badge {
    background: rgba(122, 155, 255, 0.12);
    color: #7a9bff;
    border: 1px solid rgba(122, 155, 255, 0.25);
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 99px;
}

.analytics-secondary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.secondary-chart {
    height: auto;
}

/* ==========================================================
   APPLE DESIGN SYSTEM BUTTONS & PHYSICAL RESISTANCE BLUEPRINT
   ========================================================== */
.apple-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 980px; /* Apple's iconic fully pill-shaped button standard */
  border: none;
  cursor: pointer;
  /* Apple's signature fluid timing curve for natural motion */
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), 
              background-color 0.2s ease,
              box-shadow 0.2s ease;
}

/* 1. THE LIGHT & SPRINGY BUTTON (White Action) */
.btn-primary-white,
.btn-springy {
  background-color: var(--apple-btn-white);
  color: var(--apple-bg); /* Deep black text for massive clarity */
}
.btn-primary-white:hover,
.btn-springy:hover {
  background-color: var(--apple-btn-white-hover);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}
.btn-primary-white:active,
.btn-springy:active {
  /* Easily gives way, sinks deep (4%), feels light and highly responsive */
  transform: scale(0.96); 
}

/* 2. THE STIFF & RESISTANT BUTTON (Red Delete) */
.btn-destructive-delete,
.btn-resistant {
  background-color: var(--apple-btn-delete);
  color: var(--apple-btn-white);
  /* Steeper timing curve makes it feel like it resists starting to move */
  transition: transform 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045), 
              background-color 0.2s ease,
              box-shadow 0.2s ease;
}
.btn-destructive-delete:hover,
.btn-resistant:hover {
  background-color: var(--apple-btn-delete-hover);
  box-shadow: 0 4px 18px rgba(255, 69, 58, 0.35);
}
.btn-destructive-delete:active,
.btn-resistant:active {
  /* Barely budges (only 1.5% depth). The brain interprets this lack of travel as physical stiffness or weight */
  transform: scale(0.985); 
}

/* ==========================================================
   THE APPLE GLASS TINT FORMULA (GLASSMORPHISM)
   ========================================================== */
.apple-glass-card {
  background: var(--apple-glass-bg);
  backdrop-filter: var(--apple-blur);
  -webkit-backdrop-filter: var(--apple-blur); /* Safari Support */
  border: 1px solid var(--apple-glass-border);
  border-radius: 16px;
  padding: 24px;
}

/* ==========================================================
   HIGH-FIDELITY TACTILE SLIDERS (APPLE LUXURY GROOVE)
   ========================================================== */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

.slider-container label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--apple-text-secondary);
  letter-spacing: 0.4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Reset baseline input styling */
.apple-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px; /* Ultra-thin, precision luxury groove */
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.15); /* Recessed track color */
  outline: none;
  transition: background 0.2s ease, transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hover state: Track slightly illuminates */
.apple-slider:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- THE SLIDER THUMB (THE KNOB) --- */
/* Chrome, Safari, Opera, and Edge */
.apple-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF; /* High-contrast solid white */
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.5), 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  cursor: grab;
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s;
}

/* Firefox Support */
.apple-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.5);
  cursor: grab;
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- PSYCHOLOGICAL RESISTANCE ON INTERACTION --- */
.apple-slider:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.2); /* Thumb expands slightly on grab, making it feel physically responsive */
  background: var(--apple-btn-white-hover);
}

.apple-slider:active {
  transform: scaleY(1.2); /* Track gets subtly taller, giving the user a wider target area */
}

/* ==========================================================
   MICRO-INTERACTION 1: DELETE BUTTON (BIN EATS "DELETE")
   With Stiff Physical Resistance & Scaled Depth
   ========================================================== */
.btn-bin-eater {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative;
    overflow: visible !important;
    padding: 7px 18px !important;
    cursor: pointer;
    border-radius: 980px !important;
    border: 1px solid rgba(255, 69, 58, 0.4) !important;
    background: rgba(255, 69, 58, 0.12) !important;
    color: #ffb4ab !important;
    /* Apple Stiff Resistance Timing Curve */
    transition: transform 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045), 
                background-color 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease !important;
}

.btn-bin-eater:hover {
    background: rgba(255, 69, 58, 0.22) !important;
    border-color: rgba(255, 69, 58, 0.8) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(255, 69, 58, 0.3);
}

.btn-bin-eater:active {
    /* Stiff resistance: barely budges (1.5% depth depression) */
    transform: scale(0.985) !important;
    background-color: var(--apple-btn-delete-hover) !important;
}

.bin-monster {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 17px;
    height: 20px;
    position: relative;
    transform-origin: bottom center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bin-lid-joint {
    display: block;
    width: 18px;
    height: 5px;
    transform-origin: 2px 4px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.bin-lid-svg {
    width: 18px;
    height: 5px;
    display: block;
}

.bin-can-base {
    display: block;
    width: 16px;
    height: 16px;
    margin-top: -1px;
    transform-origin: bottom center;
}

.bin-can-svg {
    width: 16px;
    height: 16px;
    display: block;
}

.bin-word {
    display: inline-flex;
    position: relative;
    font-weight: 700;
    letter-spacing: 0.5px;
    user-select: none;
}

.bin-word .char {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center center;
}

.btn-extra-label {
    font-size: 0.74rem;
    opacity: 0.85;
    font-weight: 600;
}

/* Bin Chomping & Letter Devouring Animation */
.btn-bin-eater:hover .bin-monster,
.btn-bin-eater.eating .bin-monster {
    animation: binChompWobble 0.75s ease infinite;
}

.btn-bin-eater:hover .bin-lid-joint,
.btn-bin-eater.eating .bin-lid-joint {
    animation: binLidChomp 0.75s ease infinite;
}

.btn-bin-eater:hover .bin-word .char,
.btn-bin-eater.eating .bin-word .char {
    animation: devourLetter 0.72s cubic-bezier(0.25, 1, 0.5, 1) infinite;
    animation-delay: calc(var(--i) * 0.08s);
}

@keyframes binLidChomp {
    0%, 100% { transform: rotate(-55deg) translate(-2px, -3px); }
    50% { transform: rotate(-20deg) translate(-1px, -1px); }
}

@keyframes binChompWobble {
    0%, 100% { transform: rotate(-8deg) scale(1.08); }
    50% { transform: rotate(-2deg) scale(1.15, 0.95); }
}

@keyframes devourLetter {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translate(-3px, -10px) scale(1.2) rotate(-15deg);
        opacity: 1;
        color: #ff6b6b;
    }
    60% {
        transform: translate(calc(-13px - (var(--i) * 5.5px)), -3px) scale(0.65) rotate(-45deg);
        opacity: 0.8;
    }
    85% {
        transform: translate(calc(-18px - (var(--i) * 6.5px)), 4px) scale(0.2) rotate(-75deg);
        opacity: 0.2;
    }
    100% {
        transform: translate(calc(-20px - (var(--i) * 7px)), 8px) scale(0) rotate(-90deg);
        opacity: 0;
    }
}

/* ==========================================================
   MICRO-INTERACTION 2: UPLOAD BUTTON (ARROW BECOMES WATER LEVEL)
   ========================================================== */
.btn-water-upload {
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    background: rgba(14, 165, 233, 0.1) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    color: #e0f2fe !important;
    border-radius: 99px !important;
    padding: 7px 18px !important;
    position: relative;
    overflow: hidden !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.btn-water-upload:hover {
    background: rgba(14, 165, 233, 0.2) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.3);
}

.water-arrow-vessel {
    width: 20px;
    height: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.water-arrow-svg {
    width: 20px;
    height: 20px;
    overflow: visible;
}

.water-reservoir-rect {
    transform-origin: bottom center;
    transform: translateY(80%);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.water-wave-layer {
    transform: translateY(80%);
    animation: liquidWaveSlosh 1.5s ease-in-out infinite alternate;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.water-spill-drop {
    opacity: 0;
    transform: scale(0);
    transform-origin: center center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Hover: Water fills to 45% */
.btn-water-upload:hover .water-reservoir-rect,
.btn-water-upload:hover .water-wave-layer {
    transform: translateY(45%);
}

/* Active / Uploading: Water level fills to 100% and bubbles */
.btn-water-upload:active .water-reservoir-rect,
.btn-water-upload.uploading .water-reservoir-rect,
.btn-water-upload:active .water-wave-layer,
.btn-water-upload.uploading .water-wave-layer {
    transform: translateY(0%);
}

.btn-water-upload:active .water-spill-drop,
.btn-water-upload.uploading .water-spill-drop {
    opacity: 1;
    transform: scale(1.4) translateY(-2px);
    animation: dropWaterPop 0.8s ease infinite alternate;
}

@keyframes liquidWaveSlosh {
    0% { transform: translateY(inherit) translateX(-6px); }
    100% { transform: translateY(inherit) translateX(6px); }
}

@keyframes dropWaterPop {
    0% { transform: scale(1) translateY(0); }
    100% { transform: scale(1.4) translateY(-3px); }
}

/* ==========================================================
   MICRO-INTERACTION 3: LIQUID GLASS TAB BAR WITH LIQUID DROP MARKER
   ========================================================== */
.liquid-tab-bar {
    display: inline-flex;
    align-items: center;
    position: relative;
    background: rgba(15, 18, 28, 0.7);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 100px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 20px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.liquid-tab-bar .status-btn {
    position: relative;
    z-index: 2;
    background: transparent !important;
    border: none !important;
    color: var(--text-2);
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    border-radius: 100px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.25s ease;
}

.liquid-tab-bar .status-btn.active {
    color: #ffffff !important;
}

/* Liquid Drop Marker that slides beneath active tab */
.liquid-marker {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: 100px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, width;
}

/* Liquid Drop Core with Apple liquid glass effect */
.liquid-drop-core {
    position: absolute;
    inset: 0;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(122, 155, 255, 0.35), rgba(79, 70, 229, 0.25));
    border: 1px solid rgba(122, 155, 255, 0.5);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7),
                inset 0 -1px 2px rgba(0, 0, 0, 0.5),
                0 4px 16px rgba(99, 102, 241, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.4s ease;
}

/* Liquid Glass Specular Sheen */
.liquid-glass-sheen {
    position: absolute;
    top: 2px;
    left: 12px;
    right: 12px;
    height: 40%;
    border-radius: 100px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    pointer-events: none;
}

/* Secondary trailing satellite droplet */
.liquid-satellite-drop {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7a9bff;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    opacity: 0;
    box-shadow: 0 0 8px #7a9bff;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Liquid Drop Morphing state when sliding */
.liquid-marker.morphing .liquid-drop-core {
    transform: scaleX(1.18) scaleY(0.85);
}

.liquid-marker.morphing .liquid-satellite-drop {
    opacity: 0.9;
    transform: scale(1.4) translateX(25px);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.dot-active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.dot-action {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.dot-inactive {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.status-count-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1px 7px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* ==========================================================
   TOAST — capsule shape
   Entrances: Ease-out (decelerating) | Exits: Ease-in (accelerating)
   ========================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    color: var(--text-1);
    padding: 11px 22px;
    z-index: 3000;
    /* Exit: Ease-in accelerating dismissal */
    transition: transform 220ms var(--ease-exit), opacity 180ms var(--ease-exit);
    transform: translateY(70px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    font-weight: 500;
    font-size: 0.83rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--r-capsule);
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    will-change: transform, opacity;
}
.toast.show {
    /* Entrance: Ease-out decelerating arrival */
    transition: transform 340ms var(--ease-entrance), opacity 280ms var(--ease-entrance);
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================
   MODALS — Apple HIG Glass Capsule Architecture
   Entrances: Ease-out | Exits: Ease-in
   ========================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-overlay:not(.hidden) {
    animation: modalBackdropEntrance 0.3s var(--ease-entrance) forwards;
}

.modal-overlay:not(.hidden) .modal-content {
    animation: modalContentEntrance 0.34s var(--ease-entrance) forwards;
}

.modal-overlay.modal-closing {
    animation: modalBackdropExit 0.2s var(--ease-exit) forwards !important;
}

.modal-overlay.modal-closing .modal-content {
    animation: modalContentExit 0.2s var(--ease-exit) forwards !important;
}

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

@keyframes modalContentEntrance {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

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

.modal-content {
    padding: 28px;
    width: 100%;
    max-width: 520px;
    color: var(--text-1);
    max-height: 90vh;
    overflow-y: auto;
    will-change: transform, opacity;
}
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: var(--text-1);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.modal-body { margin-bottom: 20px; }

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.info-grid p {
    color: var(--text-2);
    font-weight: 500;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.info-grid span { color: var(--text-1); font-size: 0.9rem; font-weight: 500; }

.modal-remarks-section { margin-top: 8px; }
.modal-remarks-section strong { font-size: 0.7rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }

.remarks-box {
    margin-top: 8px;
    padding: 12px 14px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-height: 56px;
    word-break: break-word;
    font-size: 0.84rem;
    color: var(--text-2);
    line-height: 1.5;
}

input[type="checkbox"] { width: 15px; height: 15px; border-radius: var(--r-capsule); cursor: pointer; accent-color: var(--text-1); }

/* Status Toggle Buttons — capsule */
.status-toggles {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-capsule);
    padding: 5px;
}

.status-toggles .status-btn {
    flex: 1;
    padding: 7px 12px;
    font-size: 0.74rem;
    background: transparent;
    border-color: transparent;
    color: var(--text-2);
}
.status-toggles .status-btn:hover { background: rgba(255,255,255,0.04); border-color: transparent; color: var(--text-1); }
.status-toggles .status-btn.active { background: var(--text-1); color: #000; border-color: var(--text-1); }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media screen and (max-width: 1024px) {
    .grid-form { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .content-area { padding: 24px 20px; }
}

@media screen and (max-width: 850px) {
    #dashboard-container { flex-direction: column; min-height: 100vh; }
    .sidebar { width: 100%; min-width: 100%; max-height: none; position: relative; padding: 14px; border-right: none; border-bottom: 1px solid var(--glass-border); }
    .sidebar .brand-container { padding: 0 0 12px; margin-bottom: 12px; text-align: center; }
    .sidebar .brand { justify-content: center; }
    .nav-links { flex-direction: row; flex-wrap: wrap; gap: 4px; justify-content: center; padding: 0; }
    .nav-links li a { padding: 7px 12px; font-size: 0.77rem; background: rgba(15,15,15,0.5); }
    .sidebar-footer { margin-top: 12px; flex-direction: row; justify-content: space-between; align-items: center; }
    #logout-btn { width: auto; }
    .content-area { padding: 18px 14px; max-height: none; }
    .filter-bar { flex-direction: column; align-items: stretch; border-radius: 16px; }
    .search-box input { width: 100%; }
    .date-filters { flex-direction: column; }
    .permissions-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 480px) {
    .login-card { padding: 28px 18px; margin: 16px; }
    .stat-value { font-size: 2rem; }
    .modal-content { padding: 20px 16px; }
    .data-table th, .data-table td { padding: 10px 10px; font-size: 0.77rem; }
    .server-check-card { padding: 32px 20px; }
    .server-step { padding: 10px 14px; }
}

/* ==========================================================
   MEMBER REGISTRATION STEPPER
   ========================================================== */

/* Outer shell — glass treatment */
.stepper-shell {
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
}

/* ── Step Indicator Bar ── */
.stepper-header {
    display: flex;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--glass-border);
    gap: 0;
    background: rgba(0,0,0,0.3);
}

.stp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    user-select: none;
}

.stp-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--border-2);
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.stp-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-3);
    transition: opacity 0.2s ease;
    line-height: 1;
}

/* Checkmark SVG — hidden by default */
.stp-check {
    position: absolute;
    inset: 0;
    width: 14px;
    height: 14px;
    margin: auto;
    color: #000;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
    stroke-width: 2.5;
}

/* Active state */
.stp-item.active .stp-circle {
    background: var(--text-1);
    border-color: var(--text-1);
}
.stp-item.active .stp-num { color: #000; }

/* Complete state */
.stp-item.complete .stp-circle {
    background: var(--text-1);
    border-color: var(--text-1);
}
.stp-item.complete .stp-num  { opacity: 0; }
.stp-item.complete .stp-check { opacity: 1; }

.stp-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-3);
    white-space: nowrap;
    transition: color 0.2s ease;
}

.stp-item.active   .stp-label { color: var(--text-1); font-weight: 600; }
.stp-item.complete .stp-label { color: var(--text-2); }

/* Connector line between steps */
.stp-connector {
    flex: 1;
    height: 1px;
    background: var(--border-1);
    margin: 0 12px;
    position: relative;
    overflow: hidden;
    min-width: 32px;
}

.stp-conn-fill {
    position: absolute;
    inset: 0 100% 0 0;
    background: var(--text-1);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stp-connector.complete .stp-conn-fill { right: 0%; }

/* ── Sliding Viewport ── */
.stepper-viewport {
    overflow: hidden;
    position: relative;
}

.stepper-track {
    display: flex;
    width: 300%;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.stepper-slide {
    width: calc(100% / 3);
    flex-shrink: 0;
    padding: 28px 28px 12px;
    box-sizing: border-box;
}

.stp-step-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    margin-bottom: 20px;
}

/* ── Stepper Footer ── */
.stepper-footer {
    padding: 16px 28px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stp-nav {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.stp-error-msg {
    font-size: 0.8rem;
    color: var(--danger);
    font-weight: 500;
    min-height: 20px;
}

/* ── Success State (after registration) ── */
.stp-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 28px;
    text-align: center;
    gap: 12px;
}

.stp-success-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(62, 202, 123, 0.12);
    border: 1px solid rgba(62, 202, 123, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    margin-bottom: 4px;
    animation: checkPop 0.4s ease;
}

.stp-success h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
}

.stp-success p {
    font-size: 0.83rem;
    color: var(--text-2);
}

/* ==========================================================
   ANIMATIONS & ENHANCEMENTS
   ========================================================== */

/* Stat value count-up shimmer */
.stat-value.counting {
    background: linear-gradient(90deg, #ededed 0%, #ffffff 50%, #ededed 100%);
    background-size: 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: statShimmer 1.2s ease forwards;
}

@keyframes statShimmer {
    0%   { background-position: 200%; }
    100% { background-position: -50%; -webkit-text-fill-color: transparent; }
}

/* Smooth section transitions */
.content-section {
    animation: sectionFadeIn 0.25s ease forwards;
}

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

/* Logo brand subtle gradient text */
.sidebar .brand {
    background: linear-gradient(135deg, #ffffff 60%, #a3a3a3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Subtle left-border accent on active nav item */
.nav-links li a.active {
    border-left: 2px solid var(--text-1) !important;
    padding-left: 12px;
}

/* Subtle row highlight on data tables */
.data-table tbody tr:hover td {
    color: var(--text-1);
}

/* ==========================================================
   NEXIZAN PVT LTD BRANDING
   ========================================================== */
.nexizan-brand {
    font-size: 0.72rem;
    color: var(--text-2);
    text-align: center;
    padding-top: 10px;
    letter-spacing: 0.2px;
    line-height: 1.5;
}

.nexizan-brand a {
    color: var(--text-2);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.14s ease;
}

.nexizan-brand a:hover {
    color: var(--text-1);
}

/* ==========================================================
   AI ASSISTANT CHAT WIDGET
   ========================================================== */

/* Floating trigger button — bottom-right corner */
#ai-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

#ai-trigger-btn {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--text-1);
    color: #000;
    border: none;
    padding: 11px 18px 11px 14px;
    border-radius: 999px;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 4px 24px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

#ai-trigger-btn:hover {
    background: #d4d4d4;
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}

#ai-trigger-btn:active {
    transform: translateY(0);
}

/* Spinner animation */
@keyframes aiSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

#ai-spinner {
    animation: aiSpin 0.9s steps(12, end) infinite;
}

/* Chat Panel — glass treatment (Entrances: Ease-out | Exits: Ease-in) */
#ai-panel {
    width: 360px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 16px 64px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04) inset;
    /* Entrance: Ease-out */
    transition: opacity 0.3s var(--ease-entrance), transform 0.32s var(--ease-entrance);
    max-height: 520px;
    pointer-events: auto;
    will-change: transform, opacity;
}

.ai-panel-hidden {
    opacity: 0 !important;
    transform: translateY(14px) scale(0.96) !important;
    pointer-events: none !important;
    /* Exit: Ease-in */
    transition: opacity 0.2s var(--ease-exit), transform 0.22s var(--ease-exit) !important;
}

/* Header */
.ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.4);
}

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

.ai-header-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    animation: aiPulse 2s ease infinite;
}

@keyframes aiPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.ai-header-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.1px;
}

.ai-header-model {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-2);
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    padding: 2px 8px;
    border-radius: var(--r-capsule);
    font-family: var(--font-mono);
}

#ai-close-btn {
    background: transparent;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--r-capsule);
    display: flex;
    align-items: center;
    transition: all 0.14s ease;
}

#ai-close-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-1);
}

/* Messages area */
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 320px;
}

.ai-msg {
    display: flex;
    flex-direction: column;
}

.ai-msg-bot { align-items: flex-start; }
.ai-msg-user { align-items: flex-end; }

.ai-msg-bubble {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--text-1);
}

.ai-msg-bot .ai-msg-bubble {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 4px;
}

.ai-msg-user .ai-msg-bubble {
    background: var(--text-1);
    color: #000;
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

/* Example chips — capsule */
.ai-msg-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.ai-example-chip {
    font-size: 0.72rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--border-2);
    color: var(--text-2);
    cursor: pointer;
    font-family: var(--font);
    font-weight: 500;
    transition: all 0.14s ease;
}

.ai-example-chip:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-3);
    color: var(--text-1);
}

/* Typing indicator */
.ai-typing .ai-msg-bubble {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 16px;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-3);
    animation: typingBounce 1.2s ease infinite;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

/* Input row */
.ai-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3);
}

#ai-input {
    flex: 1;
    background: rgba(15,15,15,0.8);
    border: 1px solid var(--glass-border);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 0.83rem;
    padding: 9px 14px;
    border-radius: var(--r-capsule);
    outline: none;
    transition: border-color 0.14s ease;
}

#ai-input:focus {
    border-color: var(--border-3);
}

#ai-input::placeholder { color: var(--text-3); }

#ai-send-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--r-capsule);
    background: var(--text-1);
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.14s ease;
}

#ai-send-btn:hover { background: #d4d4d4; }
#ai-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Mobile AI widget */
@media screen and (max-width: 480px) {
    #ai-panel { width: calc(100vw - 32px); }
    #ai-widget { bottom: 16px; right: 16px; }
}

/* ==========================================================
   SAAS BILLING SYSTEM UI
   ========================================================== */

/* Warning Banner (2nd-4th of month) — capsule */
.billing-banner {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    background: #f59e0b;
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--r-capsule);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.billing-banner.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -20px);
}

.billing-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

#billing-warning-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    display: flex;
    align-items: center;
    padding: 4px;
}

#billing-warning-close:hover {
    opacity: 1;
}

/* Full Lockout Modal (5th onwards) */
.billing-lockout {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.billing-lockout.hidden {
    opacity: 0;
    pointer-events: none;
}

.billing-lockout-box {
    padding: 32px;
    max-width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.billing-lockout-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.billing-lockout-box h2 {
    font-size: 1.25rem;
    color: var(--text-1);
    font-weight: 600;
    margin: 0;
    border: none;
    padding: 0;
}

.billing-lockout-box p {
    font-size: 0.9rem;
    color: var(--text-2);
    margin: 0;
    line-height: 1.5;
}

.billing-lockout-box .billing-note {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-bottom: 8px;
}

/* ==========================================================
   SAAS BILLING DASHBOARD UI
   ========================================================== */

.billing-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.billing-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.billing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.billing-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-1);
    border: none;
    padding: 0;
}

.badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    display: inline-block;
}

.billing-status-paid {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #22c55e !important;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.billing-status-unpaid {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.plan-details {
    padding: 16px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.plan-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-1);
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-1);
    margin: 8px 0;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-3);
}

.plan-desc {
    font-size: 0.85rem;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0;
}

.billing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.due-date {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.due-date span {
    color: var(--text-3);
}

.due-date strong {
    color: var(--text-1);
}

.billing-overview-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.overview-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.overview-item svg {
    color: var(--text-2);
    flex-shrink: 0;
    margin-top: 2px;
}

.overview-item h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: var(--text-1);
}

.overview-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-2);
    line-height: 1.4;
}

/* ==========================================================
   PAYMENT CONFIRMATION MODAL
   ========================================================== */

.payment-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.payment-confirm-overlay.visible {
    opacity: 1;
}

.payment-confirm-box {
    padding: 40px 36px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.payment-confirm-overlay.visible .payment-confirm-box {
    transform: scale(1) translateY(0);
}

.payment-confirm-box.success {
    border-color: rgba(34, 197, 94, 0.15);
}

.payment-confirm-box.failed {
    border-color: rgba(239, 68, 68, 0.15);
}

.payment-confirm-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: confirmIconPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.payment-confirm-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.15);
}

.payment-confirm-icon.failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}

@keyframes confirmIconPop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.payment-confirm-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-1);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.payment-confirm-desc {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.55;
    margin: 0 0 24px;
}

.payment-confirm-details {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 4px 0;
    margin-bottom: 24px;
    overflow: hidden;
}

.payment-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 18px;
    border-bottom: 1px solid var(--glass-border);
}

.payment-detail-row:last-child {
    border-bottom: none;
}

.payment-detail-row span {
    font-size: 0.82rem;
    color: var(--text-3);
    font-weight: 400;
}

.payment-detail-row strong {
    font-size: 0.88rem;
    color: var(--text-1);
    font-weight: 600;
}

.payment-txn-id {
    font-family: var(--font-mono);
    font-size: 0.72rem !important;
    letter-spacing: 0.3px;
    color: var(--text-2) !important;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-status-label {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-capsule);
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.payment-status-label.paid {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e !important;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.payment-status-label.unpaid {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.payment-confirm-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-confirm-btn:not(.retry) {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.payment-confirm-btn:not(.retry):hover {
    background: #16a34a;
    border-color: #16a34a;
    transform: translateY(-1px);
    box-shadow: none !important;
}

.payment-confirm-btn.retry {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.payment-confirm-btn.retry:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: none !important;
}

.payment-confirm-footer {
    font-size: 0.78rem;
    color: var(--text-3);
    margin: 16px 0 0;
    font-style: italic;
}

/* ========================================================================= */
/*  UNIFIED DESIGN SYSTEM: SLEEK APPLE OBSIDIAN + ZERO BUTTON/ICON GLOW      */
/* ========================================================================= */

/* ---- 0. APPLE HIG ACCESSIBILITY: THREE-TIER SYSTEM SIGNALS ---- */
/* 1. Reduced Motion: Gentle opacity cross-fades without vestibular disorientation */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.15s !important;
        animation-delay: 0s !important;
    }
    .content-section,
    .modal-content,
    .toast,
    .apple-glass-card,
    .stat-card {
        transform: none !important;
        transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease !important;
    }
    .ambient-orb {
        animation: none !important;
    }
}

/* 2. Reduced Transparency: Solid, high-contrast surfaces without blur */
@media (prefers-reduced-transparency: reduce) {
    .apple-glass-card,
    .glass-capsule-card,
    .modal-content,
    .apple-tab-bar,
    .sidebar,
    .data-table th,
    .server-check-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #1C1C1E !important;
    }
}

/* 3. High Contrast: Clear, distinct structural boundaries */
@media (prefers-contrast: more) {
    .apple-glass-card,
    .glass-capsule-card,
    .modal-content,
    .data-table,
    .btn,
    .apple-btn,
    input, select, textarea {
        border-color: rgba(255, 255, 255, 0.45) !important;
    }
}

/* ---- 1. BASE CANVAS: PURE OLED BLACKS ---- */
html, body {
    background: #000000 !important;
    color: var(--text-1) !important;
}

/* Ensure layout containers are transparent to let subtle dark depth show */
#login-container,
#dashboard-container,
.content-area {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* ---- 2. RESTRAINED AMBIENT STAGE: DOMINANT DEEP BLACKS ---- */
.ambient-stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #000000 !important;
}

/* Dark vignette overlay: 80%+ of screen is deep pure black */
.ambient-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 65% 65% at 50% 50%, transparent 10%, #000000 80%);
    pointer-events: none;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.12; /* Subtle whisper, never covers the screen */
    will-change: transform;
}

/* Orb 1: Subtle Emerald Tint — Top-Left corner only */
.ambient-orb-emerald {
    width: 340px;
    height: 340px;
    top: -50px;
    left: 2%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, transparent 60%);
    animation: orbDrift1 26s ease-in-out infinite alternate;
}

/* Orb 2: Subtle Sapphire Tint — Top-Right corner only */
.ambient-orb-cyan {
    width: 360px;
    height: 360px;
    top: -50px;
    right: 2%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 60%);
    animation: orbDrift2 28s ease-in-out infinite alternate;
}

/* Orb 3: Subtle Violet Tint — Deep bottom center */
.ambient-orb-violet {
    width: 380px;
    height: 380px;
    bottom: -60px;
    left: 40%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
    animation: orbDrift3 30s ease-in-out infinite alternate;
}

.ambient-orb-amber { display: none !important; }

@keyframes orbDrift1 {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(25px, 20px); }
}

@keyframes orbDrift2 {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-25px, 20px); }
}

@keyframes orbDrift3 {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(20px, -20px); }
}

.ambient-studio-light { display: none !important; }

/* Subtle studio micro-grain */
.ambient-grain {
    position: absolute;
    inset: 0;
    opacity: 0.015;
    mix-blend-mode: overlay;
    background: repeating-conic-gradient(rgba(255,255,255,0.03) 0% 25%, transparent 0% 50%) 0 0 / 3px 3px;
    pointer-events: none;
}

/* ---- 3. DARK OBSIDIAN GLASS PANELS ---- */
.glass-capsule,
.sidebar,
.stat-card,
.data-card,
.modal-content,
.server-check-card,
.ai-panel,
.login-card {
    background: rgba(10, 11, 15, 0.8) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                background 0.25s ease !important;
}

/* Card Hover: Clean subtle lift, ZERO colored glow */
.stat-card:hover,
.data-card:hover {
    transform: translateY(-2px) !important;
    background: rgba(15, 16, 22, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* ---- 4. ZERO GLOW ON ICONS ---- */
.stat-icon-wrapper,
.stat-card .stat-icon-wrapper,
.stat-card:hover .stat-icon-wrapper,
.server-step-indicator,
.nav-icon {
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.stat-card .stat-icon-wrapper {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #d4d4d8 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
}

.stat-card:hover .stat-icon-wrapper {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    transform: none !important;
}

/* ---- 5. SIDEBAR: Clean Dark Glass ---- */
.sidebar {
    background: rgba(8, 9, 12, 0.85) !important;
    backdrop-filter: blur(24px) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.nav-links li a {
    position: relative;
    border-radius: var(--r-capsule);
    transition: background 0.2s ease, color 0.2s ease !important;
    box-shadow: none !important;
}

.nav-links li a:hover {
    transform: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.nav-links li a.active {
    background: rgba(255, 255, 255, 0.09) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.nav-links li a::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 55%;
    background: #ededed;
    border-radius: 0 3px 3px 0;
    box-shadow: none !important; /* NO GLOW */
    transition: transform 0.34s var(--ease-spring);
}

.nav-links li a.active::before {
    transform: translateY(-50%) scaleY(1);
}

/* ---- 6. ZERO GLOW ON BUTTONS — Interface Spring with Slight Overshoot ---- */
.btn {
    border-radius: var(--r-capsule) !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
    box-shadow: none !important; /* NO GLOW */
    transition: transform 0.32s var(--ease-spring), 
                background-color 0.18s var(--ease-entrance), 
                border-color 0.18s var(--ease-entrance) !important;
    cursor: pointer;
    will-change: transform;
}

.btn:hover {
    transform: scale(1.02);
}

.btn:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s var(--ease-entrance) !important;
}

/* Primary Green Button: Solid, Crisp Apple Accent, ZERO GLOW */
.btn-primary,
button[type="submit"]:not(.btn-outline):not(.btn-danger) {
    background: #10b981 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important; /* NO GLOW */
    color: #ffffff !important;
}

.btn-primary:hover,
button[type="submit"]:not(.btn-outline):not(.btn-danger):hover {
    background: #059669 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important; /* NO GLOW */
    transform: translateY(-1px) !important;
}

/* Glass Buttons: Crisp Monochromatic, ZERO GLOW */
.glass-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important; /* NO GLOW */
    color: #ededed !important;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: none !important; /* NO GLOW */
    transform: translateY(-1px) !important;
}

.glass-btn::after { display: none !important; }

/* ---- 7. TABLE ROWS: Clean Flat Hover, NO GLOW ---- */
.data-table tbody tr {
    transition: background 0.2s ease !important;
}

.data-table tbody tr:hover {
    transform: none !important;
    background: rgba(255, 255, 255, 0.03) !important;
    box-shadow: none !important; /* NO GLOW */
}

/* ---- 8. INPUTS: Dark Minimalist Capsules ---- */
input, select, textarea {
    background: rgba(10, 10, 14, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease !important;
}

input:focus, select:focus, textarea:focus {
    transform: none !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06) !important; /* Minimal monochrome focus */
    outline: none !important;
}

/* ---- 9. MODALS ---- */
.modal-overlay {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    background: rgba(0, 0, 0, 0.8) !important;
}

.modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* ---- 10. SECTION TRANSITIONS ---- */
.content-section {
    animation: sectionSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

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

/* ---- 11. APPLE LOADER VEIL Z-INDEX GUARANTEE ---- */
.apple-loader-veil {
    z-index: 9999999 !important;
}

/* ==========================================================
   APPLE HIG TYPOGRAPHY SYSTEM INTEGRATION
   (SF Pro · SF Compact · SF Mono · New York · Multilingual)
   ========================================================== */

/* Subpixel Font Smoothing & Advanced Typography Rendering */
html, body {
    font-family: var(--font-sf-pro);
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    font-feature-settings: "cv02" 1, "cv03" 1, "cv04" 1, "cv11" 1 !important;
}

/* Optical Tracking Hierarchy on Native Headings */
h1 {
    font-family: var(--font-sf-pro);
    letter-spacing: var(--tracking-title-1);
    font-weight: 700;
}

h2, header h2 {
    font-family: var(--font-sf-pro);
    letter-spacing: var(--tracking-title-2);
    font-weight: 700;
}

h3 {
    font-family: var(--font-sf-pro);
    letter-spacing: var(--tracking-title-3);
    font-weight: 600;
}

h4 {
    font-family: var(--font-sf-pro);
    letter-spacing: var(--tracking-headline);
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   1. SF MONO — Tabular Figure Alignment (Xcode Standard)
   Ensures numbers, financial figures & timestamps never jitter
   ══════════════════════════════════════════════════════════ */
.stat-value,
.tabular-nums,
.currency,
.badge-count,
.member-id-tag,
.code-tag,
.slider-value-display,
.data-table td:has(span.numeric),
.data-table td.numeric,
.data-table .mono,
.invoice-number,
.price-display {
    font-family: var(--font-sf-mono) !important;
    font-variant-numeric: tabular-nums lining-nums !important;
    font-feature-settings: "tnum" 1, "lnum" 1 !important;
    letter-spacing: var(--tracking-mono);
}

/* ══════════════════════════════════════════════════════════
   2. SF COMPACT — Small Sizes & Narrow Columns (watchOS Standard)
   ══════════════════════════════════════════════════════════ */
.capsule-badge,
.status-pill,
.data-table th,
.apple-tab-bar .tab-label,
.compact-tag,
.server-step-label,
.breadcrumb-bar,
.pill-badge {
    font-family: var(--font-sf-compact) !important;
    letter-spacing: var(--tracking-caption-1);
}

.data-table th {
    letter-spacing: var(--tracking-caption-2) !important;
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
   3. NEW YORK — Apple Graphic Display & Editorial Reading
   ══════════════════════════════════════════════════════════ */
.font-new-york,
.apple-editorial,
.display-serif {
    font-family: var(--font-new-york) !important;
    font-feature-settings: "kern" 1, "liga" 1;
}

/* ══════════════════════════════════════════════════════════
   4. APPLE HIG SEMANTIC TYPOGRAPHY SCALE (Utility Classes)
   ══════════════════════════════════════════════════════════ */
.apple-large-title {
    font-family: var(--font-sf-pro);
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: var(--tracking-display);
    color: var(--color-label-primary);
}

.apple-title-1 {
    font-family: var(--font-sf-pro);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: var(--tracking-title-1);
    color: var(--color-label-primary);
}

.apple-title-2 {
    font-family: var(--font-sf-pro);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: var(--tracking-title-2);
    color: var(--color-label-primary);
}

.apple-title-3 {
    font-family: var(--font-sf-pro);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: var(--tracking-title-3);
    color: var(--color-label-primary);
}

.apple-headline {
    font-family: var(--font-sf-pro);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: var(--tracking-headline);
    color: var(--color-label-primary);
}

.apple-body {
    font-family: var(--font-sf-pro);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: var(--tracking-body);
    color: var(--color-label-primary);
}

.apple-callout {
    font-family: var(--font-sf-pro);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: var(--tracking-callout);
    color: var(--color-label-secondary);
}

.apple-subheadline {
    font-family: var(--font-sf-pro);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: var(--tracking-subheadline);
    color: var(--color-label-secondary);
}

.apple-footnote {
    font-family: var(--font-sf-pro);
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: var(--tracking-footnote);
    color: var(--color-label-tertiary);
}

.apple-caption-1 {
    font-family: var(--font-sf-compact);
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: var(--tracking-caption-1);
    color: var(--color-label-secondary);
}

.apple-caption-2 {
    font-family: var(--font-sf-compact);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: var(--tracking-caption-2);
    color: var(--color-label-tertiary);
}

.apple-mono {
    font-family: var(--font-sf-mono) !important;
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: var(--tracking-mono);
}

.apple-compact {
    font-family: var(--font-sf-compact) !important;
}

.apple-editorial {
    font-family: var(--font-new-york) !important;
}

/* ==========================================================
   APPLE HIG UI DESIGN DOS & DON'TS ENGINE
   (Hit Targets · Content Formatting · Touch Ergonomics · Non-Distortion)
   ========================================================== */

/* ── 1. HIT TARGETS (44pt x 44pt MINIMUM) ── */
.btn,
.apple-btn,
button:not(.btn-sm):not(.bin-lid-svg):not(.accent-dot-btn):not(.accent-dot),
input:not([type="checkbox"]):not([type="radio"]),
select,
.nav-links a,
.apple-tab-bar .tab-item,
.modal-close-btn,
.close-btn {
    min-height: 44px;
    box-sizing: border-box;
}

/* Close & Icon Buttons: Minimum 44x44 square touch area */
.close-btn,
.modal-close-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Checkbox & Radio Labels: Minimum 44px tap strip */
.checkbox-label,
label:has(input[type="checkbox"]) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    touch-action: manipulation;
}

/* ── 2. TOUCH CONTROLS & GESTURE ERGONOMICS ── */
button,
a,
input,
select,
.tab-item,
.capsule-badge,
.status-pill {
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
}

/* Natural Mechanical Spring Rebound */
.btn:active,
.apple-btn:active,
.tab-item:active,
.action-btn:active {
    transform: scale(0.97) !important;
    transition: transform 0.08s ease-out !important;
}

/* ── 3. FORMATTING CONTENT & VIEWPORT ADAPTIVITY ── */
html, body {
    overflow-x: hidden !important;
    width: 100%;
}

/* Responsive Table Containment (Zero viewport blowout) */
.table-container {
    -webkit-overflow-scrolling: touch !important;
    overflow-x: auto !important;
    max-width: 100% !important;
}

/* Safari Auto-Zoom Prevention: Inputs stay ≥16px on mobile viewports */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* ── 4. READABILITY & NON-OVERLAPPING SPACING ── */
p, label, span, .text-muted, .data-card, .table-container {
    line-height: 1.5;
}

h1, h2, h3, h4 {
    line-height: 1.25;
}

/* Minimum 11pt Legibility Safeguard across all text */
body * {
    min-font-size: 11px;
}

/* ── 5. HIGH RESOLUTION & NON-DISTORTION ── */
img, video, canvas {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
}

/* Member Avatars & Profile Pictures (Strict 1:1 Non-Distortion) */
.member-avatar,
.avatar-img,
.profile-img,
.user-avatar {
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

/* ── 6. ERGONOMIC BOTTOM TAB BAR (HIGH REACHABILITY / THUMB ZONE) ── */
.apple-tab-bar {
    display: none;
}

@media (max-width: 850px) {
    .apple-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(64px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(18, 18, 20, 0.88);
        backdrop-filter: blur(28px) saturate(190%);
        -webkit-backdrop-filter: blur(28px) saturate(190%);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.7);
    }

    .apple-tab-bar .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 56px;
        min-height: 44px; /* Apple 44pt touch hit target */
        padding: 6px 10px;
        color: var(--color-label-secondary);
        text-decoration: none;
        transition: transform 0.15s ease, color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .apple-tab-bar .tab-item .tab-icon {
        font-size: 1.2rem;
        line-height: 1;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .apple-tab-bar .tab-item .tab-label {
        font-size: 0.68rem;
        font-weight: 500;
        font-family: var(--font-sf-compact);
        letter-spacing: var(--tracking-caption-1);
    }

    .apple-tab-bar .tab-item.active {
        color: var(--accent-current, #0A84FF);
    }

    .apple-tab-bar .tab-item.active .tab-icon {
        transform: scale(1.12);
    }

    .apple-tab-bar .tab-item:active {
        transform: scale(0.92);
    }

    /* Provide bottom padding in content-area so tab bar never overlaps content */
    .content-area {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ── 7. APPLE QUICK DOCK & SPRING INTERACTIONS ── */
.apple-dock-card {
    transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.apple-dock-card:hover {
    background: rgba(38, 38, 42, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.apple-dock-card:active {
    transform: scale(0.97) translateY(0);
}

.spring-press:active {
    transform: scale(0.96) !important;
}

/* ==========================================================
   ENTERPRISE DATA PROTECTION & SECURITY SUITE
   (Watermark · Pagination · Phone Masking · Throttling · Audit Logs · Session Monitoring)
   ========================================================== */

/* ── 1. DYNAMIC SECURITY WATERMARK OVERLAY ── */
.table-container {
    position: relative;
    overflow: hidden;
}

.table-watermark-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background-repeat: repeat;
    opacity: 0.14;
    mix-blend-mode: screen;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.3s ease;
}

/* ── 2. APPLE HIG TABLE PAGINATION BAR ── */
.table-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    margin-top: 10px;
    background: rgba(28, 28, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 0.82rem;
    color: var(--color-label-secondary);
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-range {
    font-family: var(--font-sf-mono);
    font-variant-numeric: tabular-nums lining-nums;
    color: var(--color-label-primary);
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.per-page-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--color-label-secondary);
}

.pagination-select {
    padding: 4px 8px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    background: rgba(10, 10, 14, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--color-label-primary) !important;
    font-family: var(--font-sf-mono);
    font-size: 0.78rem !important;
    cursor: pointer;
}

.pagination-btn {
    padding: 6px 12px !important;
    min-height: 36px !important;
    font-size: 0.78rem !important;
    gap: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.pagination-btn:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.pagination-current-page {
    font-family: var(--font-sf-mono);
    font-variant-numeric: tabular-nums lining-nums;
    font-weight: 600;
    color: var(--color-label-primary);
    padding: 0 4px;
}

/* ── 3. MASKED PHONE NUMBERS ── */
.masked-phone {
    font-family: var(--font-sf-mono);
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: 0.05em;
    color: var(--color-label-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.phone-mask-dot {
    opacity: 0.7;
    letter-spacing: -0.05em;
}

/* ── 4. ACCESS THROTTLING & LOCKOUT MODAL ── */
.throttle-countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 24px;
    margin: 12px 0;
    background: rgba(255, 69, 58, 0.08);
    border: 1px solid rgba(255, 69, 58, 0.35);
    border-radius: 14px;
    animation: throttlePulse 1.5s ease-in-out infinite alternate;
}

.throttle-countdown-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 69, 58, 0.85);
    text-transform: uppercase;
}

.throttle-countdown-timer {
    font-family: var(--font-sf-mono);
    font-size: 2.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #ff453a;
    letter-spacing: -0.02em;
    line-height: 1;
}

@keyframes throttlePulse {
    from { border-color: rgba(255, 69, 58, 0.25); box-shadow: 0 0 10px rgba(255, 69, 58, 0.1); }
    to   { border-color: rgba(255, 69, 58, 0.6); box-shadow: 0 0 20px rgba(255, 69, 58, 0.25); }
}

/* ── 5. SESSION SECURITY ALERT BANNER (Entrances: Ease-out | Exits: Ease-in) ── */
.session-alert-banner {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    max-width: 600px;
    width: calc(100% - 32px);
    transition: transform 0.22s var(--ease-exit), opacity 0.18s var(--ease-exit);
    will-change: transform, opacity;
}

.session-alert-banner:not(.hidden) {
    animation: bannerEntrance 0.32s var(--ease-entrance) forwards;
}

.session-alert-banner.banner-closing {
    animation: bannerExit 0.2s var(--ease-exit) forwards !important;
}

@keyframes bannerEntrance {
    from {
        opacity: 0;
        transform: translate(-50%, -14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

@keyframes bannerExit {
    from {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -14px) scale(0.96);
    }
}

.session-alert-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(30, 25, 10, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 159, 10, 0.4);
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    color: #FFD60A;
    font-size: 0.82rem;
    line-height: 1.4;
}

.session-alert-close {
    background: transparent;
    border: none;
    color: #FFD60A;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.session-alert-close:hover {
    opacity: 1;
}

/* ── 6. FULL-SCREEN DYNAMIC SECURITY WATERMARK ── */
.fullscreen-watermark-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99990;
    background-repeat: repeat;
    opacity: 0.085;
    mix-blend-mode: screen;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.3s ease;
}

/* ── 7. ONE-RECORD-AT-A-TIME INSPECTOR & VIEW TOGGLE ── */
.view-mode-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.segmented-control {
    display: inline-flex;
    align-items: center;
    background: rgba(20, 22, 30, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 3px;
    gap: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.segmented-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-label-secondary);
    background: transparent;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    /* Interface spring with slight overshoot */
    transition: transform 0.32s var(--ease-spring),
                background-color 0.18s var(--ease-entrance),
                color 0.18s var(--ease-entrance),
                box-shadow 0.32s var(--ease-spring);
    will-change: transform;
}

.segmented-option:hover {
    color: #ffffff;
    transform: scale(1.02);
}

.segmented-option:active {
    transform: scale(0.96);
    transition: transform 0.1s var(--ease-entrance);
}

.segmented-option.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.single-record-inspector {
    padding: 24px 28px;
    margin-bottom: 24px;
    background: rgba(22, 25, 36, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    /* Entrance: Ease-out */
    animation: inspectorCardEntrance 0.32s var(--ease-entrance) forwards;
    will-change: transform, opacity;
}

@keyframes inspectorCardEntrance {
    from {
        opacity: 0.1;
        transform: translateY(8px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.inspector-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.inspector-index-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sf-mono);
    font-size: 0.82rem;
    color: var(--color-label-secondary);
}

.inspector-index-field {
    width: 54px;
    padding: 4px 6px;
    text-align: center;
    font-family: var(--font-sf-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(10, 12, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    outline: none;
}

.inspector-index-field:focus {
    border-color: #0a84ff;
    box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.25);
}

.inspector-card-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.inspector-profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.inspector-profile-lead {
    display: flex;
    align-items: center;
    gap: 16px;
}

.inspector-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.25), rgba(99, 102, 241, 0.35));
    border: 1px solid rgba(122, 155, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.25);
}

.inspector-name-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inspector-customer-name {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.inspector-joined-tag {
    font-size: 0.78rem;
    color: var(--color-label-secondary);
}

/* Sensitive Customer Data Shield Box */
.inspector-sensitive-box {
    background: rgba(12, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.sensitive-phone-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sensitive-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-label-secondary);
    text-transform: uppercase;
}

.masked-phone-large {
    font-family: var(--font-sf-mono);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.unmasked-phone-large {
    font-family: var(--font-sf-mono);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #34c759;
}

.reveal-countdown-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 159, 10, 0.15);
    border: 1px solid rgba(255, 159, 10, 0.45);
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #ffd60a;
    font-family: var(--font-sf-mono);
    animation: revealPulse 1.2s ease-in-out infinite alternate;
}

@keyframes revealPulse {
    from { opacity: 0.85; }
    to   { opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 159, 10, 0.35)); }
}

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

.inspector-metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inspector-metric-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-label-secondary);
    text-transform: uppercase;
}

.inspector-metric-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.inspector-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 6px;
}

/* Shake Animation for Reauth Error */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.shake-error {
    animation: shakeError 0.4s ease-in-out;
}




.segmented-control {
    display: inline-flex;
    align-items: center;
    background: rgba(20, 22, 30, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 3px;
    gap: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.segmented-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-label-secondary);
    background: transparent;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    /* Interface spring with slight overshoot */
    transition: transform 0.32s var(--ease-spring),
                background-color 0.18s var(--ease-entrance),
                color 0.18s var(--ease-entrance),
                box-shadow 0.32s var(--ease-spring);
    will-change: transform;
}

.segmented-option:hover {
    color: #ffffff;
    transform: scale(1.02);
}

.segmented-option:active {
    transform: scale(0.96);
    transition: transform 0.1s var(--ease-entrance);
}

.segmented-option.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.single-record-inspector {
    padding: 24px 28px;
    margin-bottom: 24px;
    background: rgba(22, 25, 36, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    /* Entrance: Ease-out */
    animation: inspectorCardEntrance 0.32s var(--ease-entrance) forwards;
    will-change: transform, opacity;
}

@keyframes inspectorCardEntrance {
    from {
        opacity: 0.1;
        transform: translateY(8px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.inspector-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.inspector-index-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sf-mono);
    font-size: 0.82rem;
    color: var(--color-label-secondary);
}

.inspector-index-field {
    width: 54px;
    padding: 4px 6px;
    text-align: center;
    font-family: var(--font-sf-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(10, 12, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    outline: none;
}

.inspector-index-field:focus {
    border-color: #0a84ff;
    box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.25);
}

.inspector-card-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.inspector-profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.inspector-profile-lead {
    display: flex;
    align-items: center;
    gap: 16px;
}

.inspector-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.25), rgba(99, 102, 241, 0.35));
    border: 1px solid rgba(122, 155, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.25);
}

.inspector-name-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inspector-customer-name {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.inspector-joined-tag {
    font-size: 0.78rem;
    color: var(--color-label-secondary);
}

/* Sensitive Customer Data Shield Box */
.inspector-sensitive-box {
    background: rgba(12, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.sensitive-phone-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sensitive-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-label-secondary);
    text-transform: uppercase;
}

.masked-phone-large {
    font-family: var(--font-sf-mono);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.unmasked-phone-large {
    font-family: var(--font-sf-mono);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #34c759;
}

.reveal-countdown-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 159, 10, 0.15);
    border: 1px solid rgba(255, 159, 10, 0.45);
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #ffd60a;
    font-family: var(--font-sf-mono);
    animation: revealPulse 1.2s ease-in-out infinite alternate;
}

@keyframes revealPulse {
    from { opacity: 0.85; }
    to   { opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 159, 10, 0.35)); }
}

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

.inspector-metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inspector-metric-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-label-secondary);
    text-transform: uppercase;
}

.inspector-metric-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.inspector-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 6px;
}

/* Shake Animation for Reauth Error */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.shake-error {
    animation: shakeError 0.4s ease-in-out;
}



