/* ==========================================================================
   VERBATIMLY — ELITE INTERACTION & MOTION DESIGN SYSTEM
   Fluid Motion, Tactile Micro-Interactions & Mobile-First Engineering
   ========================================================================== */

:root {
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-expo: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-spring-subtle: cubic-bezier(0.34, 1.56, 0.64, 1);

    --duration-instant: 120ms;
    --duration-micro: 180ms;
    --duration-dropdown: 200ms;
    --duration-fast: 260ms;
    --duration-modal: 280ms;
    --duration-base: 420ms;
    --duration-slow: 680ms;

    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-indigo: #4f46e5;
    --brand-emerald: #10b981;
    --brand-navy: #0f2b51;

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    /* Semantic Design Tokens — Light Theme */
    --vb-bg: #f8fafc;
    --vb-surface: #ffffff;
    --vb-surface-2: #f1f5f9;
    --vb-surface-elevated: rgba(255, 255, 255, 0.92);
    --vb-border: #cbd5e1;
    --vb-border-subtle: #e2e8f0;
    --vb-border-strong: #94a3b8;
    --vb-text: #0f172a;
    --vb-text-secondary: #334155;
    --vb-text-muted: #64748b;
    --vb-input-bg: #ffffff;
    --vb-input-border: #94a3b8;
    --vb-input-border-hover: #64748b;
    --vb-shadow-card: 0 10px 28px -12px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --vb-shadow-elevated: 0 22px 48px -18px rgba(15, 23, 42, 0.16), 0 8px 18px -6px rgba(15, 23, 42, 0.06);
    --vb-skeleton-base: #e2e8f0;
    --vb-skeleton-shine: rgba(255, 255, 255, 0.65);
    --vb-chart-grid: rgba(148, 163, 184, 0.18);
    --vb-chart-tick: #64748b;
}

html.dark {
    --brand-primary: #3b82f6;
    --brand-primary-hover: #60a5fa;
    --brand-indigo: #6366f1;
    --brand-emerald: #34d399;

    /* Semantic Design Tokens — Dark Theme (Rich Slate-Navy, Never Pure Black) */
    --vb-bg: #0b1120;
    --vb-surface: #111a2e;
    --vb-surface-2: #17233b;
    --vb-surface-elevated: rgba(17, 26, 46, 0.92);
    --vb-border: #334155;
    --vb-border-subtle: #24324c;
    --vb-border-strong: #475569;
    --vb-text: #f1f5f9;
    --vb-text-secondary: #cbd5e1;
    --vb-text-muted: #94a3b8;
    --vb-input-bg: #0f172a;
    --vb-input-border: #64748b;
    --vb-input-border-hover: #94a3b8;
    --vb-shadow-card: 0 16px 36px -16px rgba(2, 6, 23, 0.72), 0 4px 12px -2px rgba(2, 6, 23, 0.45);
    --vb-shadow-elevated: 0 24px 52px -18px rgba(2, 6, 23, 0.85), 0 8px 20px -6px rgba(2, 6, 23, 0.55);
    --vb-skeleton-base: #1e293b;
    --vb-skeleton-shine: rgba(148, 163, 184, 0.16);
    --vb-chart-grid: rgba(148, 163, 184, 0.14);
    --vb-chart-tick: #94a3b8;
}

html.vb-theme-transitioning,
html.vb-theme-transitioning body,
html.vb-theme-transitioning header,
html.vb-theme-transitioning main,
html.vb-theme-transitioning nav,
html.vb-theme-transitioning section,
html.vb-theme-transitioning article,
html.vb-theme-transitioning aside,
html.vb-theme-transitioning footer,
html.vb-theme-transitioning div,
html.vb-theme-transitioning a,
html.vb-theme-transitioning button,
html.vb-theme-transitioning input,
html.vb-theme-transitioning select,
html.vb-theme-transitioning textarea {
    transition-property: background-color, border-color, color, box-shadow, fill, stroke !important;
    transition-duration: 220ms !important;
    transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1) !important;
}

body {
    font-family: var(--font-sans);
    background-color: var(--vb-bg);
    color: var(--vb-text);
}

.vb-serif-accent {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.vb-mono-pill {
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

/* Studio Acoustic Grid Background Pattern */
.vb-studio-grid {
    background-image:
        linear-gradient(to right, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(37, 99, 235, 0.045) 1px, transparent 1px);
    background-size: 36px 36px;
}

html.dark .vb-studio-grid {
    background-image:
        linear-gradient(to right, rgba(59, 130, 246, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
}

/* Animated Audio Waveform Bars */
@keyframes vb-wave {
    0%, 100% {
        transform: scaleY(0.32);
        opacity: 0.65;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.vb-wave-bar {
    transform-origin: center bottom;
    animation: vb-wave 1.35s var(--ease-in-out-expo) infinite;
}

/* --------------------------------------------------------------------------
   1. Smooth Scrolling (Lenis & Native Fallback)
   -------------------------------------------------------------------------- */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-Smooth iframe {
    pointer-events: none;
}

/* Prevent horizontal overflow during spatial transforms */
body {
    overflow-x: clip;
    -webkit-tap-highlight-color: transparent;
}

/* --------------------------------------------------------------------------
   2. Accessible Focus Rings & Keyboard Navigation
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    transition: outline-offset var(--duration-micro) var(--ease-out-quart);
}

/* --------------------------------------------------------------------------
   3. Sticky Header Glass & Scroll State
   -------------------------------------------------------------------------- */
header[role="banner"] {
    transition:
        background-color var(--duration-base) var(--ease-out-quart),
        box-shadow var(--duration-base) var(--ease-out-quart),
        border-color var(--duration-base) var(--ease-out-quart),
        backdrop-filter var(--duration-base) var(--ease-out-quart),
        transform var(--duration-base) var(--ease-out-quart);
}

header[role="banner"].is-scrolled {
    background-color: var(--vb-surface-elevated);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    border-bottom-color: var(--vb-border);
}

html.dark header[role="banner"].is-scrolled {
    box-shadow: 0 12px 32px -12px rgba(2, 6, 23, 0.72), 0 2px 6px -1px rgba(2, 6, 23, 0.45);
}

/* --------------------------------------------------------------------------
   4. Navigation Links & Directional Underlines
   -------------------------------------------------------------------------- */
.vb-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: color var(--duration-fast) var(--ease-out-quart);
}

.vb-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-indigo));
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform var(--duration-fast) var(--ease-in-out-expo);
    pointer-events: none;
}

.vb-nav-link:hover::after,
.vb-nav-link:focus-visible::after,
.vb-nav-link.is-active::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.vb-nav-link.is-active {
    color: var(--brand-primary);
    font-weight: 600;
}

/* Footer link subtle slide & underline */
footer a:not(.vb-btn) {
    position: relative;
    transition:
        color var(--duration-fast) var(--ease-out-quart),
        transform var(--duration-fast) var(--ease-out-quart);
    display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
    footer ul li a:hover {
        transform: translateX(3px);
    }
}

/* --------------------------------------------------------------------------
   5. Premium Buttons, CTAs & Light Sweep
   -------------------------------------------------------------------------- */
.vb-btn,
button[type="submit"],
a.bg-blue-600,
a.bg-emerald-600,
a.bg-purple-600,
a.bg-slate-900,
a[class*="from-blue-600"],
a[class*="from-emerald-600"],
a[class*="from-purple-600"] {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform var(--duration-fast) var(--ease-out-quart),
        box-shadow var(--duration-fast) var(--ease-out-quart),
        background-color var(--duration-fast) var(--ease-out-quart),
        border-color var(--duration-fast) var(--ease-out-quart),
        color var(--duration-fast) var(--ease-out-quart);
    will-change: transform;
}

/* Subtle diagonal sheen on primary buttons */
.vb-btn-sheen::before,
a.bg-blue-600::before,
a[class*="from-blue-600"]::before,
a[class*="from-emerald-600"]::before,
a[class*="from-purple-600"]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 20%,
        rgba(255, 255, 255, 0.24) 48%,
        rgba(255, 255, 255, 0.0) 65%
    );
    transform: translateX(-125%) skewX(-15deg);
    transition: transform 0.65s var(--ease-out-expo);
    pointer-events: none;
    z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
    .vb-btn-sheen:hover::before,
    a.bg-blue-600:hover::before,
    a[class*="from-blue-600"]:hover::before,
    a[class*="from-emerald-600"]:hover::before,
    a[class*="from-purple-600"]:hover::before {
        transform: translateX(125%) skewX(-15deg);
    }

    .vb-btn:hover,
    a.bg-blue-600:hover,
    a.bg-emerald-600:hover,
    a.bg-slate-900:hover,
    a[class*="from-blue-600"]:hover {
        transform: translateY(-2px);
    }
}

/* Tactile press feedback across pointer & touch */
.vb-btn:active,
button:not(:disabled):active,
a.bg-blue-600:active,
a.bg-emerald-600:active,
a.bg-slate-900:active,
.is-pressed {
    transform: translateY(0) scale(0.975) !important;
    transition-duration: 90ms !important;
}

/* Directional icon shift inside CTAs */
.vb-btn i.fa-arrow-right,
a i.fa-arrow-right,
button i.fa-arrow-right,
.vb-arrow-icon {
    transition: transform var(--duration-fast) var(--ease-out-quart);
}

@media (hover: hover) and (pointer: fine) {
    .vb-btn:hover i.fa-arrow-right,
    a:hover i.fa-arrow-right,
    button:hover i.fa-arrow-right,
    a:hover .vb-arrow-icon,
    button:hover .vb-arrow-icon {
        transform: translateX(4px);
    }
}

/* Button Loading State */
.is-loading {
    pointer-events: none;
    opacity: 0.88;
}

/* --------------------------------------------------------------------------
   6. Interactive Cards, Surfaces & Pointer Spotlight
   -------------------------------------------------------------------------- */
.vb-card,
[data-tilt-card],
[data-interactive-card] {
    position: relative;
    transition:
        transform var(--duration-base) var(--ease-out-quart),
        box-shadow var(--duration-base) var(--ease-out-quart),
        border-color var(--duration-base) var(--ease-out-quart),
        background-color var(--duration-base) var(--ease-out-quart);
    --spotlight-x: 50%;
    --spotlight-y: 50%;
    --spotlight-opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
    .vb-card::after,
    [data-tilt-card]::after,
    [data-interactive-card]::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(
            420px circle at var(--spotlight-x) var(--spotlight-y),
            rgba(59, 130, 246, 0.065),
            transparent 70%
        );
        opacity: var(--spotlight-opacity, 0);
        transition: opacity var(--duration-base) var(--ease-out-quart);
        pointer-events: none;
        z-index: 1;
    }

    .vb-card:hover::after,
    [data-tilt-card]:hover::after,
    [data-interactive-card]:hover::after {
        --spotlight-opacity: 1;
    }

    [data-interactive-card]:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 38px -15px rgba(15, 23, 42, 0.09), 0 8px 16px -8px rgba(15, 23, 42, 0.04);
    }
}

/* Touch feedback for interactive cards on mobile */
@media (hover: none), (pointer: coarse) {
    .vb-card:active,
    [data-tilt-card]:active,
    [data-interactive-card]:active {
        transform: scale(0.988);
        transition-duration: 120ms;
    }
}

/* Contributor Level Cards & Progression Containers */
.vb-level-card {
    border-width: 2px !important;
    border-style: solid !important;
    transition:
        border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 240ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vb-level-card-current {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 12px 28px -8px rgba(37, 99, 235, 0.22) !important;
}

html.dark .vb-level-card-current {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.22), 0 12px 32px -8px rgba(2, 6, 23, 0.7) !important;
}

.vb-level-card-unlocked {
    border-color: #10b981 !important;
}

html.dark .vb-level-card-unlocked {
    border-color: #34d399 !important;
}

.vb-level-card-locked {
    border-color: #cbd5e1 !important;
}

.vb-level-card-locked:hover {
    border-color: #94a3b8 !important;
    transform: translateY(-2px);
}

html.dark .vb-level-card-locked {
    border-color: #475569 !important;
}

html.dark .vb-level-card-locked:hover {
    border-color: #64748b !important;
}

/* --------------------------------------------------------------------------
   7. Typography Reveals & Masked Headlines
   -------------------------------------------------------------------------- */
.vb-word-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.vb-word-inner {
    display: inline-block;
    will-change: transform, opacity;
}

/* --------------------------------------------------------------------------
   8. Smooth Accordions (<details>)
   -------------------------------------------------------------------------- */
details {
    transition:
        border-color var(--duration-fast) var(--ease-out-quart),
        box-shadow var(--duration-fast) var(--ease-out-quart),
        background-color var(--duration-fast) var(--ease-out-quart);
}

details[open] {
    box-shadow: 0 10px 25px -8px rgba(15, 23, 42, 0.06);
}

details summary {
    list-style: none;
    user-select: none;
    transition: color var(--duration-fast) var(--ease-out-quart), background-color var(--duration-fast) var(--ease-out-quart);
}

details summary::-webkit-details-marker {
    display: none;
}

details summary i.fa-chevron-down {
    transition: transform var(--duration-base) var(--ease-out-expo), color var(--duration-fast) var(--ease-out-quart);
}

details[open] summary i.fa-chevron-down {
    transform: rotate(180deg);
    color: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   9. Forms, Inputs & Interactive Controls
   -------------------------------------------------------------------------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="hidden"]),
select,
textarea {
    border-width: 2px !important;
    border-style: solid !important;
    border-color: var(--vb-input-border, #94a3b8) !important;
    transition:
        border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 240ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="hidden"]):hover:not(:focus):not(:disabled),
select:hover:not(:focus):not(:disabled),
textarea:hover:not(:focus):not(:disabled) {
    border-color: var(--vb-input-border-hover, #64748b) !important;
    box-shadow: 0 3px 10px -2px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: var(--brand-primary, #2563eb) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 6px 16px -4px rgba(37, 99, 235, 0.14) !important;
    transform: translateY(-1px);
}

input.border-emerald-500,
select.border-emerald-500,
textarea.border-emerald-500 {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14) !important;
}

input.border-rose-500,
select.border-rose-500,
textarea.border-rose-500 {
    border-color: #f43f5e !important;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.14) !important;
}

input[type="checkbox"],
input[type="radio"] {
    border-width: 2px !important;
    border-style: solid !important;
    border-color: var(--vb-input-border, #94a3b8) !important;
    transition:
        border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 200ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 160ms cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

input[type="checkbox"]:hover:not(:disabled),
input[type="radio"]:hover:not(:disabled) {
    border-color: var(--brand-primary, #2563eb) !important;
    transform: scale(1.06);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    border-color: var(--brand-primary, #2563eb) !important;
}

.relative:focus-within > div > i,
.relative:focus-within > span > i,
.relative:focus-within > i:first-child {
    color: var(--brand-primary, #2563eb) !important;
    transform: scale(1.08);
    transition:
        color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vb-field-focused label,
div:has(> .relative > input:focus) > label,
div:has(> input:focus) > label,
div:has(> select:focus) > label,
div:has(> textarea:focus) > label {
    color: var(--brand-primary);
    transition: color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   10. Hero & Product Visual Accents
   -------------------------------------------------------------------------- */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.vb-pulse-ring::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid currentColor;
    animation: pulse-ring 2.4s var(--ease-out-quart) infinite;
    pointer-events: none;
}

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

.animate-fade-in {
    animation: fade-in 0.35s var(--ease-out-quart) forwards;
}

/* Progress bar shimmer accent */
.vb-progress-shimmer {
    position: relative;
    overflow: hidden;
}

.vb-progress-shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: progress-shimmer 2.8s var(--ease-in-out-expo) infinite;
}

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

/* --------------------------------------------------------------------------
   10b. Floating Toast Stack, Reading Progress, Back-to-Top & Spinners
   -------------------------------------------------------------------------- */
.vb-toast-stack {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: min(24rem, calc(100vw - 2rem));
    pointer-events: none;
}

@media (max-width: 639px) {
    .vb-toast-stack {
        top: 4.25rem;
        right: 50%;
        transform: translateX(50%);
    }
}

.vb-toast {
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    padding: 0.875rem 1rem;
    box-shadow: 0 18px 36px -14px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(-10px) scale(0.97);
    opacity: 0;
    transition:
        transform var(--duration-fast) var(--ease-out-expo),
        opacity var(--duration-fast) var(--ease-out-quart);
}

.vb-toast.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.vb-toast.is-leaving {
    transform: translateY(-8px) scale(0.96);
    opacity: 0;
}

.vb-toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    transform-origin: left center;
    background: currentColor;
    opacity: 0.35;
}

/* Reading Progress Bar (Long-form Guides & Legal Docs) */
.vb-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 55;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-indigo), var(--brand-emerald));
    transform-origin: left center;
    transform: scaleX(0);
    pointer-events: none;
    will-change: transform;
}

/* Floating Back-to-Top Button */
.vb-back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.5rem;
    z-index: 45;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(14px) scale(0.92);
    pointer-events: none;
    transition:
        opacity var(--duration-fast) var(--ease-out-quart),
        transform var(--duration-fast) var(--ease-out-expo),
        background-color var(--duration-micro) var(--ease-out-quart);
}

@media (max-width: 767px) {
    .vb-back-to-top {
        bottom: 5rem;
    }
}

.vb-back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Lightweight CSS Spinner for Form Submit Loading States */
.vb-spinner {
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 9999px;
    animation: vb-spin 0.65s linear infinite;
    vertical-align: -0.125em;
}

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

/* Lightweight Skeleton Shimmer & Loading Placeholders */
.vb-skeleton {
    position: relative;
    overflow: hidden;
    background-color: var(--vb-skeleton-base);
    border-radius: 0.75rem;
}

.vb-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--vb-skeleton-shine), transparent);
    transform: translateX(-100%);
    animation: progress-shimmer 1.6s ease-in-out infinite;
}

.vb-skeleton-line {
    height: 0.875rem;
    border-radius: 9999px;
}

.vb-skeleton-card {
    border-radius: 1rem;
    min-height: 7rem;
}

/* Responsive table scroll container */
.vb-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Unified Empty State Container */
.vb-empty-state {
    border-radius: 1.25rem;
    border: 1.5px dashed var(--vb-border-strong);
    background: var(--vb-surface-2);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

/* Real CSS Fallbacks for Fade/Zoom Utility Classes */
@keyframes vb-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vb-zoom-in-95 {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: vb-fade-in-up var(--duration-fast) var(--ease-out-expo) both;
}

.animate-in.fade-in {
    animation: fade-in var(--duration-fast) var(--ease-out-quart) both;
}

.animate-in.zoom-in-95 {
    animation: vb-zoom-in-95 var(--duration-modal) var(--ease-out-expo) both;
}

/* Coarse pointer minimum touch target helper */
@media (pointer: coarse) {
    .vb-touch-target {
        min-height: 44px;
        min-width: 44px;
    }
}

/* --------------------------------------------------------------------------
   11. Reduced Motion Compliance (Accessibility First)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .vb-btn:hover,
    [data-interactive-card]:hover,
    [data-tilt-card]:hover {
        transform: none !important;
    }

    .vb-progress-shimmer::after,
    .vb-pulse-ring::before,
    .vb-skeleton::after {
        display: none !important;
    }

    .vb-wave-bar,
    .animate-bounce,
    .animate-ping,
    .animate-pulse {
        animation: none !important;
    }
}

/* --------------------------------------------------------------------------
   12. Rendering & Navigation Performance Utilities
   -------------------------------------------------------------------------- */
@view-transition {
    navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }
}

.vb-cv-auto {
    content-visibility: auto;
    contain-intrinsic-size: auto 480px;
}

/* --------------------------------------------------------------------------
   13. Global Accessible Tooltip System
   -------------------------------------------------------------------------- */
#vb-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    max-width: 240px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.35), 0 4px 10px -2px rgba(15, 23, 42, 0.2);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 4px, 0) scale(0.97);
    transition: opacity 140ms cubic-bezier(0.16, 1, 0.3, 1), transform 140ms cubic-bezier(0.16, 1, 0.3, 1), visibility 140ms linear;
    will-change: opacity, transform;
}

#vb-tooltip[data-placement="bottom"] {
    transform: translate3d(0, -4px, 0) scale(0.97);
}

#vb-tooltip[data-placement="left"] {
    transform: translate3d(4px, 0, 0) scale(0.97);
}

#vb-tooltip[data-placement="right"] {
    transform: translate3d(-4px, 0, 0) scale(0.97);
}

#vb-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0) scale(1);
}

#vb-tooltip[data-tone="danger"] {
    background: rgba(153, 27, 27, 0.96);
    border-color: rgba(254, 202, 202, 0.22);
}

.vb-tooltip-arrow {
    position: absolute;
    width: 8px;
    height: 8px;
    background: inherit;
    transform: rotate(45deg);
    pointer-events: none;
}

#vb-tooltip[data-placement="top"] .vb-tooltip-arrow {
    bottom: -4px;
    left: var(--vb-arrow-x, 50%);
    margin-left: -4px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#vb-tooltip[data-placement="bottom"] .vb-tooltip-arrow {
    top: -4px;
    left: var(--vb-arrow-x, 50%);
    margin-left: -4px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#vb-tooltip[data-placement="left"] .vb-tooltip-arrow {
    right: -4px;
    top: var(--vb-arrow-y, 50%);
    margin-top: -4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#vb-tooltip[data-placement="right"] .vb-tooltip-arrow {
    left: -4px;
    top: var(--vb-arrow-y, 50%);
    margin-top: -4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    #vb-tooltip {
        transition: opacity 0.01ms linear !important;
        transform: none !important;
    }
}

/* --------------------------------------------------------------------------
   Mobile Bottom Navigation Bar (Viewport-Fixed, Safe-Area Aware)
   -------------------------------------------------------------------------- */
.vb-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--vb-surface-elevated);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--vb-border);
    box-shadow: 0 -4px 20px -2px rgba(15, 23, 42, 0.07);
    transform: translateZ(0);
}

html.dark .vb-mobile-bottom-nav {
    box-shadow: 0 -8px 28px -4px rgba(2, 6, 23, 0.65);
}

@media (min-width: 768px) {
    .vb-mobile-bottom-nav {
        display: none !important;
    }
}

.vb-mobile-bottom-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    max-width: 28rem;
    margin: 0 auto;
    padding: 0.25rem 0.375rem;
}

.vb-mobile-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3.35rem;
    padding: 0.35rem 0.25rem;
    border-radius: 0.75rem;
    color: var(--vb-text-muted);
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
        color 160ms var(--ease-out-quart),
        background-color 160ms var(--ease-out-quart),
        transform 140ms var(--ease-out-quart);
}

.vb-mobile-nav-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 1.5rem;
    height: 2.5px;
    border-radius: 9999px;
    background: var(--brand-primary, #2563eb);
    transform: translateX(-50%) scaleX(0);
    opacity: 0;
    transition:
        transform 180ms var(--ease-out-quart),
        opacity 180ms var(--ease-out-quart);
}

.vb-mobile-nav-item:active,
.vb-mobile-nav-item.is-tapped {
    transform: scale(0.92);
    background-color: rgba(37, 99, 235, 0.08);
}

.vb-mobile-nav-item:focus-visible {
    outline: 2px solid var(--brand-primary, #2563eb);
    outline-offset: -2px;
}

.vb-mobile-nav-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 1.65rem;
    border-radius: 9999px;
    font-size: 1rem;
    transition:
        transform 180ms var(--ease-out-quart),
        background-color 180ms var(--ease-out-quart),
        color 160ms var(--ease-out-quart);
}

.vb-mobile-nav-label {
    font-size: 0.625rem;
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.vb-mobile-nav-item.is-active {
    color: var(--brand-primary);
}

.vb-mobile-nav-item.is-active::before {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

.vb-mobile-nav-item.is-active .vb-mobile-nav-icon {
    background-color: var(--vb-nav-active-bg);
    color: var(--brand-primary);
    transform: translateY(-1px) scale(1.06);
}

.vb-mobile-nav-item.is-active .vb-mobile-nav-label {
    font-weight: 800;
    color: var(--brand-primary);
}

html.dark .vb-mobile-nav-item.is-active,
html.dark .vb-mobile-nav-item.is-active .vb-mobile-nav-icon,
html.dark .vb-mobile-nav-item.is-active .vb-mobile-nav-label {
    color: #93c5fd;
}

@media (max-width: 767px) {
    body.has-mobile-bottom-nav main#main-content {
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    }

    body.has-mobile-bottom-nav .vb-back-to-top {
        bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .vb-mobile-nav-item,
    .vb-mobile-nav-item::before,
    .vb-mobile-nav-icon {
        transition: none !important;
    }

    .vb-mobile-nav-item:active,
    .vb-mobile-nav-item.is-tapped,
    .vb-mobile-nav-item.is-active .vb-mobile-nav-icon {
        transform: none !important;
    }
}

/* ==========================================================================
   LEFT-TO-RIGHT MOBILE SIDE NAVIGATION DRAWER SYSTEM
   ========================================================================== */
.vb-mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    background-color: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    opacity: 1;
    transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark .vb-mobile-drawer-overlay {
    background-color: rgba(2, 6, 23, 0.76);
}

.vb-mobile-drawer-overlay.hidden {
    display: none !important;
}

.vb-mobile-drawer-panel {
    position: relative;
    width: min(86vw, 352px);
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--vb-surface, #ffffff);
    border-right: 2px solid var(--vb-border-strong, #cbd5e1);
    border-top-right-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
    box-shadow:
        24px 0 60px -12px rgba(15, 23, 42, 0.32),
        6px 0 20px -4px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition:
        transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark .vb-mobile-drawer-panel {
    background-color: #0f172a;
    border-right-color: #334155;
    box-shadow:
        28px 0 70px -12px rgba(2, 6, 23, 0.85),
        8px 0 24px -4px rgba(2, 6, 23, 0.6);
}

.vb-mobile-drawer-overlay.is-closing .vb-mobile-drawer-panel {
    transform: translate3d(-104%, 0, 0);
}

.vb-mobile-drawer-overlay.is-closing {
    opacity: 0;
}

@keyframes vbDrawerSlideInLeft {
    0% {
        transform: translate3d(-104%, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

.vb-mobile-drawer-overlay:not([data-gsap-controlled="true"]):not(.hidden) .vb-mobile-drawer-panel {
    animation: vbDrawerSlideInLeft 380ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.vb-mobile-drawer-overlay[data-gsap-controlled="true"] .vb-mobile-drawer-panel {
    animation: none !important;
    transition:
        background-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.vb-drawer-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.vb-drawer-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.875rem;
    border: 1px solid transparent;
    color: var(--vb-text, #0f172a);
    font-weight: 600;
    transition:
        background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
        color 200ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vb-drawer-link:hover,
.vb-drawer-link:focus-visible {
    background-color: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.18);
    transform: translateX(3px);
}

html.dark .vb-drawer-link {
    color: #e2e8f0;
}

html.dark .vb-drawer-link:hover,
html.dark .vb-drawer-link:focus-visible {
    background-color: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.28);
}

.vb-drawer-link.is-active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-color: rgba(37, 99, 235, 0.28);
    color: #1d4ed8;
    font-weight: 800;
}

.vb-drawer-link.is-active::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 20%;
    bottom: 20%;
    width: 4px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #2563eb 0%, #4f46e5 100%);
}

html.dark .vb-drawer-link.is-active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.22) 0%, rgba(99, 102, 241, 0.10) 100%);
    border-color: rgba(96, 165, 250, 0.36);
    color: #93c5fd;
}

.vb-drawer-link-icon {
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vb-drawer-link:hover .vb-drawer-link-icon,
.vb-drawer-link:focus-visible .vb-drawer-link-icon {
    transform: scale(1.08);
}

.vb-drawer-chevron {
    transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), color 200ms ease;
}

.vb-drawer-link:hover .vb-drawer-chevron,
.vb-drawer-link:focus-visible .vb-drawer-chevron {
    transform: translateX(3px);
    color: var(--brand-primary, #2563eb);
}

@media (prefers-reduced-motion: reduce) {
    .vb-mobile-drawer-overlay,
    .vb-mobile-drawer-panel,
    .vb-drawer-link,
    .vb-drawer-link-icon,
    .vb-drawer-chevron {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   GLOBAL BUTTON FEEDBACK SYSTEM
   ========================================================================== */
.vb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

button,
[role="button"],
input[type="submit"],
input[type="button"] {
    transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

button:not(:disabled):not([aria-disabled="true"]):active,
[role="button"]:not([aria-disabled="true"]):active,
input[type="submit"]:not(:disabled):active,
input[type="button"]:not(:disabled):active,
button.vb-is-pressed,
[role="button"].vb-is-pressed {
    transform: scale(0.975);
}

button:focus-visible,
[role="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

button:disabled,
[role="button"][aria-disabled="true"],
input[type="submit"]:disabled,
input[type="button"]:disabled,
.vb-btn-loading,
[data-vb-loading="true"],
[data-vb-submitting="true"] {
    cursor: not-allowed !important;
    opacity: 0.78;
    transform: none !important;
}

.vb-btn-loading {
    pointer-events: none;
    position: relative;
}

.vb-btn-success {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

.vb-btn-error {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

@media (prefers-reduced-motion: reduce) {
    button,
    [role="button"],
    input[type="submit"],
    input[type="button"] {
        transition: none !important;
    }

    button:not(:disabled):active,
    [role="button"]:not([aria-disabled="true"]):active,
    button.vb-is-pressed,
    [role="button"].vb-is-pressed {
        transform: none !important;
    }

    .vb-spinner {
        animation-duration: 1.5s;
    }

    html.vb-theme-transitioning,
    html.vb-theme-transitioning * {
        transition: none !important;
    }
}

/* ==========================================================================
   15. THEME TOGGLE, CENTRALIZED DARK MODE TOKENS & RESPONSIVE SAFEGUARDS
   ========================================================================== */

/* Theme Toggle Button (Sun / Moon Icon Swap Powered Immediately by html.dark) */
.vb-theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid var(--vb-border);
    background-color: var(--vb-surface);
    color: var(--vb-text-secondary);
    cursor: pointer;
    transition:
        background-color var(--duration-micro) var(--ease-out-quart),
        border-color var(--duration-micro) var(--ease-out-quart),
        color var(--duration-micro) var(--ease-out-quart),
        transform var(--duration-instant) var(--ease-out-quart);
}

.vb-theme-toggle:hover {
    background-color: var(--vb-surface-2);
    color: var(--brand-primary);
    border-color: var(--vb-border-strong);
}

.vb-theme-toggle .vb-icon-sun {
    display: none;
    color: #fbbf24;
}

.vb-theme-toggle .vb-icon-moon {
    display: inline-block;
    color: #475569;
}

html.dark .vb-theme-toggle .vb-icon-sun {
    display: inline-block;
}

html.dark .vb-theme-toggle .vb-icon-moon {
    display: none;
}

/* Global Overflow & Media Safety Across Narrow Viewports (320px+) */
html {
    overflow-x: clip;
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

/* Low-Specificity Centralized Dark Token Harmonization (html.dark :where(...) = (0,1,1), beating Tailwind base (0,1,0) while yielding to explicit dark:* (0,2,0)!) */
html.dark :where(.bg-white) {
    background-color: var(--vb-surface);
}

html.dark :where(.bg-gray-50, .bg-slate-50) {
    background-color: #0e1628;
}

html.dark :where(.bg-gray-100, .bg-slate-100) {
    background-color: var(--vb-surface-2);
}

html.dark :where(.bg-gray-200, .bg-slate-200) {
    background-color: #24324c;
}

html.dark :where(.border-gray-50, .border-slate-50, .border-gray-100, .border-slate-100, .border-gray-200, .border-slate-200) {
    border-color: var(--vb-border);
}

html.dark :where(.border-gray-300, .border-slate-300) {
    border-color: var(--vb-border-strong);
}

html.dark :where(.divide-gray-100, .divide-slate-100, .divide-gray-200, .divide-slate-200) > :where(:not([hidden]) ~ :not([hidden])) {
    border-color: var(--vb-border);
}

/* Typography Contrast in Dark Mode */
html.dark :where(.text-gray-900, .text-slate-900) {
    color: #f8fafc;
}

html.dark :where(.text-gray-800, .text-slate-800) {
    color: #e2e8f0;
}

html.dark :where(.text-gray-700, .text-slate-700) {
    color: #cbd5e1;
}

html.dark :where(.text-gray-600, .text-slate-600, .text-gray-500, .text-slate-500, .text-gray-400, .text-slate-400) {
    color: #94a3b8;
}

/* Preserve Dark Text on Intentionally Bright Solid Badges */
html.dark :where(.bg-amber-400, .bg-yellow-400, .bg-emerald-400) {
    color: #0f172a;
}

/* Soft Translucent Tinted Surfaces in Dark Mode */
html.dark :where(.bg-blue-50, .bg-indigo-50, .bg-sky-50) {
    background-color: rgba(37, 99, 235, 0.14);
}

html.dark :where(.bg-blue-100, .bg-indigo-100, .bg-sky-100) {
    background-color: rgba(59, 130, 246, 0.22);
}

html.dark :where(.bg-emerald-50, .bg-green-50) {
    background-color: rgba(16, 185, 129, 0.14);
}

html.dark :where(.bg-emerald-100, .bg-green-100) {
    background-color: rgba(16, 185, 129, 0.22);
}

html.dark :where(.bg-amber-50, .bg-yellow-50) {
    background-color: rgba(245, 158, 11, 0.14);
}

html.dark :where(.bg-amber-100, .bg-yellow-100) {
    background-color: rgba(245, 158, 11, 0.22);
}

html.dark :where(.bg-rose-50, .bg-red-50) {
    background-color: rgba(244, 63, 94, 0.14);
}

html.dark :where(.bg-rose-100, .bg-red-100) {
    background-color: rgba(244, 63, 94, 0.22);
}

html.dark :where(.bg-purple-50, .bg-violet-50) {
    background-color: rgba(139, 92, 246, 0.15);
}

html.dark :where(.bg-purple-100, .bg-violet-100) {
    background-color: rgba(139, 92, 246, 0.24);
}

html.dark :where(.bg-teal-50, .bg-cyan-50) {
    background-color: rgba(20, 184, 166, 0.14);
}

html.dark :where(.bg-orange-50) {
    background-color: rgba(249, 115, 22, 0.14);
}

html.dark :where(.border-blue-100, .border-blue-200, .border-blue-300, .border-indigo-100, .border-indigo-200) {
    border-color: rgba(59, 130, 246, 0.30);
}

html.dark :where(.border-emerald-100, .border-emerald-200, .border-green-100, .border-green-200) {
    border-color: rgba(16, 185, 129, 0.30);
}

html.dark :where(.border-amber-100, .border-amber-200, .border-yellow-100, .border-yellow-200) {
    border-color: rgba(245, 158, 11, 0.32);
}

html.dark :where(.border-rose-100, .border-rose-200, .border-red-100, .border-red-200) {
    border-color: rgba(244, 63, 94, 0.32);
}

html.dark :where(.border-purple-100, .border-purple-200, .border-violet-100, .border-violet-200) {
    border-color: rgba(139, 92, 246, 0.32);
}

/* Luminous Accent Text Contrast in Dark Mode */
html.dark :where(.text-blue-900, .text-blue-800, .text-blue-700, .text-indigo-900, .text-indigo-800, .text-indigo-700) {
    color: #93c5fd;
}

html.dark :where(.text-blue-600, .text-indigo-600) {
    color: #60a5fa;
}

html.dark :where(.text-emerald-900, .text-emerald-800, .text-emerald-700, .text-green-900, .text-green-800, .text-green-700) {
    color: #6ee7b7;
}

html.dark :where(.text-emerald-600, .text-green-600) {
    color: #34d399;
}

html.dark :where(.text-amber-900, .text-amber-800, .text-amber-700, .text-yellow-900, .text-yellow-800, .text-yellow-700) {
    color: #fcd34d;
}

html.dark :where(.text-amber-600, .text-yellow-600) {
    color: #fbbf24;
}

html.dark :where(.text-rose-900, .text-rose-800, .text-rose-700, .text-red-900, .text-red-800, .text-red-700) {
    color: #fda4af;
}

html.dark :where(.text-rose-600, .text-red-600) {
    color: #fb7185;
}

html.dark :where(.text-purple-900, .text-purple-800, .text-purple-700, .text-violet-800, .text-violet-700) {
    color: #c4b5fd;
}

html.dark :where(.text-purple-600, .text-violet-600) {
    color: #a78bfa;
}

/* Form Controls, Placeholders, Tables & Interactive Hover States in Dark Mode */
html.dark :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="hidden"]), select, textarea) {
    background-color: var(--vb-input-bg);
    color: var(--vb-text);
    border-color: var(--vb-input-border) !important;
}

html.dark :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="hidden"]):hover:not(:focus):not(:disabled), select:hover:not(:focus):not(:disabled), textarea:hover:not(:focus):not(:disabled)) {
    border-color: var(--vb-input-border-hover, #94a3b8) !important;
    box-shadow: 0 4px 12px -2px rgba(2, 6, 23, 0.45);
}

html.dark :where(input, textarea)::placeholder {
    color: #94a3b8;
}

html.dark :where(select option) {
    background-color: #0f172a;
    color: #f1f5f9;
}

html.dark :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="hidden"]):focus, select:focus, textarea:focus) {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.24), 0 8px 20px -4px rgba(37, 99, 235, 0.25) !important;
}

html.dark input.border-emerald-500,
html.dark select.border-emerald-500,
html.dark textarea.border-emerald-500 {
    border-color: #10b981 !important;
}

html.dark input.border-rose-500,
html.dark select.border-rose-500,
html.dark textarea.border-rose-500 {
    border-color: #f43f5e !important;
}

html.dark :where(.hover\:bg-gray-50, .hover\:bg-slate-50):hover {
    background-color: #1e293b;
}

html.dark :where(.hover\:bg-gray-100, .hover\:bg-slate-100):hover {
    background-color: #24324c;
}

html.dark :where(.hover\:bg-blue-50):hover {
    background-color: rgba(37, 99, 235, 0.18);
}

html.dark :where(.hover\:bg-rose-50, .hover\:bg-red-50):hover {
    background-color: rgba(244, 63, 94, 0.18);
}

/* Native Audio Player & Subtle Scrollbar Adaptation */
html.dark audio {
    color-scheme: dark;
    filter: contrast(0.95);
}

html.dark ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

html.dark ::-webkit-scrollbar-track {
    background: #0b1120;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #24324c;
    border-radius: 9999px;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Frosted Light Opacity Surfaces in Dark Mode (Preserve bg-white/5..25 used on dark hero cards!) */
html.dark :where(.bg-white\/95, .bg-white\/90, .bg-white\/85, .bg-white\/80, .bg-white\/70) {
    background-color: rgba(17, 26, 46, 0.90);
}

html.dark :where(.bg-slate-50\/95, .bg-slate-50\/90, .bg-slate-50\/80, .bg-slate-50\/70, .bg-slate-50\/60, .bg-gray-50\/80, .bg-gray-50\/70) {
    background-color: rgba(23, 35, 59, 0.72);
}

html.dark :where(.bg-slate-100\/90, .bg-slate-100\/80, .bg-slate-100\/70, .bg-gray-100\/80) {
    background-color: rgba(30, 41, 59, 0.82);
}

html.dark :where(.bg-blue-50\/70, .bg-blue-50\/60, .bg-blue-50\/50, .bg-blue-50\/40, .bg-blue-50\/20, .bg-indigo-50\/50, .bg-indigo-50\/40) {
    background-color: rgba(37, 99, 235, 0.14);
}

html.dark :where(.bg-emerald-50\/80, .bg-emerald-50\/70, .bg-emerald-50\/60, .bg-emerald-50\/40, .bg-emerald-50\/20) {
    background-color: rgba(16, 185, 129, 0.14);
}

html.dark :where(.bg-amber-50\/80, .bg-amber-50\/60, .bg-amber-50\/40) {
    background-color: rgba(245, 158, 11, 0.14);
}

html.dark :where(.bg-rose-50\/80, .bg-rose-50\/60, .bg-rose-50\/40, .bg-rose-50\/20) {
    background-color: rgba(244, 63, 94, 0.14);
}

html.dark :where(.bg-purple-50\/80, .bg-purple-50\/40) {
    background-color: rgba(139, 92, 246, 0.15);
}

/* Pastel Linear Gradient Stops in Dark Mode */
html.dark :where(.from-white, .from-slate-50, .from-gray-50) {
    --tw-gradient-from: #111a2e var(--tw-gradient-from-position);
    --tw-gradient-to: rgb(17 26 46 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

html.dark :where(.via-white, .via-slate-50) {
    --tw-gradient-to: rgb(17 26 46 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), #16223a var(--tw-gradient-via-position), var(--tw-gradient-to);
}

html.dark :where(.to-white, .to-slate-50, .to-gray-50) {
    --tw-gradient-to: #111a2e var(--tw-gradient-to-position);
}

html.dark :where(.from-blue-50, .from-indigo-50) {
    --tw-gradient-from: rgba(30, 58, 138, 0.34) var(--tw-gradient-from-position);
    --tw-gradient-to: rgb(30 58 138 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

html.dark :where(.via-blue-50, .via-indigo-50) {
    --tw-gradient-to: rgb(30 58 138 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), rgba(49, 46, 129, 0.28) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

html.dark :where(.to-blue-50, .to-indigo-50) {
    --tw-gradient-to: rgba(30, 58, 138, 0.28) var(--tw-gradient-to-position);
}

html.dark :where(.from-amber-50, .from-amber-50\/70) {
    --tw-gradient-from: rgba(120, 53, 15, 0.34) var(--tw-gradient-from-position);
    --tw-gradient-to: rgb(120 53 15 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

html.dark :where(.via-amber-50, .via-amber-50\/40, .via-orange-50) {
    --tw-gradient-to: rgb(120 53 15 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), rgba(146, 64, 14, 0.26) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

html.dark :where(.to-amber-50, .to-orange-50) {
    --tw-gradient-to: rgba(124, 45, 18, 0.28) var(--tw-gradient-to-position);
}

html.dark :where(.from-emerald-50, .from-teal-50) {
    --tw-gradient-from: rgba(6, 78, 59, 0.34) var(--tw-gradient-from-position);
    --tw-gradient-to: rgb(6 78 59 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

html.dark :where(.via-teal-50) {
    --tw-gradient-to: rgb(19 78 74 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), rgba(19, 78, 74, 0.28) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

html.dark :where(.to-emerald-50, .to-teal-50) {
    --tw-gradient-to: rgba(6, 78, 59, 0.28) var(--tw-gradient-to-position);
}

html.dark :where(.from-purple-50, .from-rose-50) {
    --tw-gradient-from: rgba(88, 28, 135, 0.32) var(--tw-gradient-from-position);
    --tw-gradient-to: rgb(88 28 135 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

html.dark :where(.via-purple-50, .via-rose-50) {
    --tw-gradient-to: rgb(88 28 135 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), rgba(107, 33, 168, 0.26) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

html.dark :where(.to-purple-50, .to-pink-50) {
    --tw-gradient-to: rgba(112, 26, 117, 0.28) var(--tw-gradient-to-position);
}

/* Text-white opacity helpers ensure nested dark-mode typography consistency */
html.dark :where(.text-cyan-700) {
    color: #67e8f9;
}

html.dark :where(.text-teal-700, .text-teal-800) {
    color: #5eead4;
}

html.dark :where(.text-sky-700, .text-sky-800) {
    color: #7dd3fc;
}

html.dark :where(.text-orange-700, .text-orange-800) {
    color: #fdba74;
}

html.dark :where(.border-sky-200, .border-sky-300, .border-teal-200, .border-cyan-200) {
    border-color: rgba(56, 189, 248, 0.30);
}

html.dark :where(.border-orange-200) {
    border-color: rgba(249, 115, 22, 0.32);
}

/* Keep prose & raw HTML text crisp in dark mode */
html.dark :where(.prose) {
    color: #cbd5e1;
}

html.dark :where(.prose) :where(h1, h2, h3, h4, strong) {
    color: #f8fafc;
}

/* Auth Split Layout (Login & Registration Desktop Marketing Showcase) */
.vb-auth-desktop-marketing {
    display: none;
}

@media (min-width: 1024px) {
    .vb-auth-split-grid {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 2.5rem;
    }

    .vb-auth-desktop-marketing {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
    }

    .vb-auth-marketing-col-7 {
        grid-column: span 7 / span 7;
    }

    .vb-auth-marketing-col-6 {
        grid-column: span 6 / span 6;
    }

    .vb-auth-form-col-5 {
        grid-column: span 5 / span 5;
        max-width: none !important;
    }

    .vb-auth-form-col-6 {
        grid-column: span 6 / span 6;
        max-width: none !important;
    }
}

@media (min-width: 1280px) {
    .vb-auth-split-grid {
        gap: 3.5rem;
    }

    .vb-auth-marketing-col-6.xl\:col-span-7 {
        grid-column: span 7 / span 7;
    }

    .vb-auth-form-col-6.xl\:col-span-5 {
        grid-column: span 5 / span 5;
    }
}

