/* ============================================
   RBD Guardian - Design System
   Healthcare-grade UI with precision & warmth
   ============================================ */

/* --- CSS Custom Properties / Design Tokens --- */
:root {
    --color-primary: #0EA5E9;
    --color-primary-dark: #0284C7;
    --color-primary-light: #38BDF8;
    --color-primary-50: #f0f9ff;

    --color-success: #10B981;
    --color-success-light: #D1FAE5;
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-error: #EF4444;
    --color-error-light: #FEE2E2;

    --color-surface: #FFFFFF;
    --color-background: #F9FAFB;
    --color-background-alt: #F3F4F6;

    --color-text-primary: #111827;
    --color-text-secondary: #6B7280;
    --color-text-muted: #9CA3AF;

    --color-border: #E5E7EB;
    --color-border-light: #F3F4F6;

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 50px -12px rgba(0, 0, 0, 0.12);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* WCAG AA Compliant Text Colors for Dark Theme */
    --text-primary: #e8e8f5;           /* Increased from #e2e2f0 */
    --text-secondary: rgba(232,232,245,0.75);  /* Increased from 0.6 */
    --text-tertiary: rgba(232,232,245,0.55);   /* Increased from 0.45 */
    --text-placeholder: rgba(232,232,245,0.42); /* Increased from 0.35 */

    /* Medical-grade chart colors with better contrast */
    --chart-heart-rate: #FF6B6B;      /* Brighter red */
    --chart-spo2: #4FC3F7;            /* Brighter cyan */
    --chart-movement: #66BB6A;        /* Brighter green */
    --chart-event-marker: #FF1744;    /* High-contrast red for RBD events */

    --bg-surface: rgba(255,255,255,0.03);
    --border-default: rgba(255,255,255,0.07);
    --text-muted: rgba(226,226,240,0.55);
    --text-hint: rgba(226,226,240,0.5);
    --accent-violet: #a78bfa;
    --accent-green: #6ee7b7;
    --accent-red: #fca5a5;
    --accent-amber: #fbbf24;
    --color-heart-rate: #f87171;
    --color-spo2: #818cf8;
    --color-movement: #34d399;
    --color-battery: #fbbf24;
}

/* --- Base Resets & Defaults --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #0d0d14;
    color: #e2e2f0;
}

/* --- Focus States (Accessibility) --- */
*:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* --- Glassmorphism Utility --- */
.glass {
    background: rgba(13, 13, 20, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

/* --- Dark NavBar --- */
.navbar-dark {
    background: rgba(13, 13, 20, 0.95);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar-dark button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e2f0;
}

/* --- Dark Page Utility --- */
.dark-page {
    background: #0d0d14;
    min-height: 100vh;
}

.glass-dark {
    background: rgba(12, 74, 110, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Gradient Backgrounds --- */
.bg-gradient-medical {
    background: linear-gradient(135deg, #0c4a6e 0%, #0EA5E9 50%, #38BDF8 100%);
}

.bg-gradient-auth {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(79, 70, 229, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #0d0d14 0%, #12121f 40%, #0d0d14 100%);
}

.bg-mesh {
    background:
        radial-gradient(at 40% 20%, rgba(124, 58, 237, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(79, 70, 229, 0.06) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(139, 92, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(124, 58, 237, 0.04) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        #0d0d14;
}

/* --- Noise Texture Overlay --- */
.texture-noise::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* --- Medical Grid Texture --- */
.medical-texture {
    position: relative;
}

.medical-texture::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    pointer-events: none;
    z-index: 0;
}

/* --- Card Styles --- */
.card-base {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-xl);
    color: #e2e2f0;
    box-shadow: none;
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.card-base:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.12);
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(167, 139, 250, 0.25);
}

/* --- Input Styles --- */
.input-field {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #e2e2f0;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
}

.input-field:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.input-field::placeholder {
    color: rgba(226, 226, 240, 0.35);
}

.input-field.input-error {
    border-color: var(--color-error);
}

.input-field.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Settings / inline form fields */
.settings-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    color: #e2e2f0;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 150ms, background 150ms;
    font-family: inherit;
    appearance: none;
}

.settings-input:focus {
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-with-icon {
    padding-left: 2.75rem;
}

/* --- Button Styles --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 1px 3px rgba(14, 165, 233, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0369a1 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
    color: #e2e2f0;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.btn-ghost {
    color: rgba(226, 226, 240, 0.6);
    background: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e2f0;
}

.btn-outline {
    color: rgba(226, 226, 240, 0.8);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-outline:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, var(--color-error) 0%, #DC2626 100%);
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* --- Touch Target for Mobile (WCAG AAA) --- */
.touch-target-button {
    min-height: 44px;
    min-width: 44px;
}

/* --- Badge / Chip Styles --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-primary {
    color: #a78bfa;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.25);
}

.badge-success {
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-neutral {
    color: rgba(226, 226, 240, 0.6);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Loading States --- */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.06) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.06) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-primary {
    border-color: rgba(124, 58, 237, 0.2);
    border-top-color: #7c3aed;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Progress Ring --- */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset var(--transition-slow);
    stroke-linecap: round;
}

/* --- Stat Card Decorative Gradients --- */
.stat-gradient-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.stat-gradient-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
}

.stat-gradient-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
}

.stat-gradient-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
}

/* --- Tabs --- */
.tab-button {
    position: relative;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(226, 226, 240, 0.5);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.tab-button:hover {
    color: #a78bfa;
}

.tab-button.active {
    color: #a78bfa;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #7c3aed;
    border-radius: 1px 1px 0 0;
}

/* --- Table Styles --- */
.table-row-hover {
    transition: background-color 150ms;
}

.table-row-hover:hover {
    background-color: rgba(255,255,255,0.03);
}

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(226, 226, 240, 0.5);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
}

.table-modern tbody tr {
    transition: background-color var(--transition-fast);
}

.table-modern tbody tr:hover {
    background-color: rgba(124, 58, 237, 0.08);
}

.table-modern tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: #e2e2f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

/* --- Sidebar Navigation --- */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    text-decoration: none;
    cursor: pointer;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-link svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.8;
}

.nav-link.active svg {
    opacity: 1;
}

/* Logout / danger nav item */
.nav-link-danger {
    color: rgba(248, 113, 113, 0.75);
}

.nav-link-danger:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
}

/* Ghost button small (used for back buttons, secondary actions) */
.btn-ghost-sm {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(226, 226, 240, 0.6);
    transition: background 150ms, border-color 150ms, color 150ms;
}

.btn-ghost-sm:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e2e2f0;
}

/* Tinted action button variants (replaces inline onmouseover patterns) */
.btn-action-violet {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.25);
    color: #a78bfa;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: background 150ms, border-color 150ms;
    min-height: 44px;
}
.btn-action-violet:hover:not(:disabled) {
    background: rgba(124, 58, 237, 0.22);
    border-color: rgba(124, 58, 237, 0.45);
    color: #c4b5fd;
}

.btn-action-red {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer;
    transition: background 150ms, border-color 150ms;
    min-height: 44px;
}
.btn-action-red:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.45);
}

.btn-action-amber {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fcd34d;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer;
    transition: background 150ms, border-color 150ms;
    min-height: 44px;
}
.btn-action-amber:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
}

.btn-action-green {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer;
    transition: background 150ms, border-color 150ms;
    min-height: 44px;
}
.btn-action-green:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.45);
}

.btn-action-cyan {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: #67e8f9;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer;
    transition: background 150ms, border-color 150ms;
    min-height: 44px;
}
.btn-action-cyan:hover:not(:disabled) {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.45);
}

/* Sleep timeline hover effects */
.sleep-stage-band { opacity: 0.8; cursor: default; }
.sleep-stage-band:hover { opacity: 1; cursor: pointer; }
.rbd-event-marker { width: 0.25rem; cursor: pointer; transition: width 150ms; }
.rbd-event-marker:hover { width: 0.375rem; }

/* Event history table rows */
.event-table-row { border-bottom: 1px solid rgba(255,255,255,0.05); transition: background-color 0.15s ease; }
.event-table-row:hover { background-color: rgba(255,255,255,0.04) !important; }
.event-row-system { background: rgba(251,146,60,0.04); }

/* Table action link buttons (session/patient tables) */
.btn-table-ghost {
    display: inline-flex; align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(226, 226, 240, 0.7);
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: transparent;
    text-decoration: none;
    font-size: 0.8125rem; font-weight: 500;
    transition: all 150ms;
}
.btn-table-ghost:hover { background: rgba(255, 255, 255, 0.06); color: #e2e2f0; }

.btn-table-violet {
    display: inline-flex; align-items: center;
    border: 1px solid rgba(124, 58, 237, 0.25);
    color: #a78bfa;
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: transparent;
    text-decoration: none;
    font-size: 0.8125rem; font-weight: 500;
    transition: all 150ms;
}
.btn-table-violet:hover { background: rgba(124, 58, 237, 0.1); color: #c4b5fd; }

/* Patient card hover */
.patient-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 150ms;
    position: relative;
    overflow: hidden;
}
.patient-card:hover { border-color: rgba(124, 58, 237, 0.3); background: rgba(255, 255, 255, 0.05); }

/* Patient "View Sessions" button */
.btn-patient-sessions {
    display: block; width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem; font-weight: 500;
    text-align: center;
    color: #e2e2f0;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 150ms;
}
.btn-patient-sessions:hover { background: rgba(124, 58, 237, 0.25); border-color: rgba(124, 58, 237, 0.4); }

/* Danger outline (e.g. "Request Account Deletion") */
.btn-danger-outline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: rgba(252, 165, 165, 0.7);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn-danger-outline:hover { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }

/* Small event-row action buttons */
.btn-sm-confirm {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.5rem; min-height: 36px;
    background: rgba(16, 185, 129, 0.2); color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 0.375rem; font-size: 0.7rem; font-weight: 600;
    cursor: pointer; transition: background 150ms;
}
.btn-sm-confirm:hover { background: rgba(16, 185, 129, 0.35); }

.btn-sm-dismiss {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.5rem; min-height: 36px;
    background: rgba(107, 114, 128, 0.2); color: rgba(226, 226, 240, 0.5);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 0.375rem; font-size: 0.7rem; font-weight: 600;
    cursor: pointer; transition: background 150ms;
}
.btn-sm-dismiss:hover { background: rgba(107, 114, 128, 0.35); }

.btn-sm-save {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.625rem; min-height: 36px;
    background: rgba(16, 185, 129, 0.2); color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 0.375rem; font-size: 0.75rem; font-weight: 600;
    cursor: pointer; transition: background 150ms;
}
.btn-sm-save:hover:not(:disabled) { background: rgba(16, 185, 129, 0.3); }

.btn-sm-cancel {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.625rem; min-height: 36px;
    background: rgba(255, 255, 255, 0.06); color: rgba(226, 226, 240, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem; font-size: 0.75rem; font-weight: 600;
    cursor: pointer; transition: background 150ms;
}
.btn-sm-cancel:hover { background: rgba(255, 255, 255, 0.1); }

.btn-sm-edit {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.625rem; min-height: 36px;
    background: rgba(124, 58, 237, 0.15); color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 0.375rem; font-size: 0.75rem; font-weight: 600;
    cursor: pointer; transition: background 150ms;
}
.btn-sm-edit:hover { background: rgba(124, 58, 237, 0.25); }

/* Modal close × button */
.btn-modal-close {
    width: 2rem; height: 2rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem; cursor: pointer;
    color: rgba(226, 226, 240, 0.5);
    transition: background 150ms;
}
.btn-modal-close:hover { background: rgba(255, 255, 255, 0.1); }

/* Modal footer buttons */
.btn-modal-cancel {
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.05); color: rgba(226, 226, 240, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.625rem; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: background 150ms;
}
.btn-modal-cancel:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); }

.btn-modal-submit-red {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(239, 68, 68, 0.2); color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 0.625rem; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: background 150ms;
}
.btn-modal-submit-red:hover:not(:disabled) { background: rgba(239, 68, 68, 0.32); }
.btn-modal-submit-red:disabled { cursor: not-allowed; opacity: 0.7; }

.btn-modal-submit-green {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(16, 185, 129, 0.2); color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 0.625rem; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: background 150ms;
}
.btn-modal-submit-green:hover:not(:disabled) { background: rgba(16, 185, 129, 0.32); }
.btn-modal-submit-green:disabled { cursor: not-allowed; opacity: 0.7; }

/* --- Alert / Toast Styles --- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-info {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-success {
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Modal / Dialog --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease-out;
}

.modal-panel {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-2xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    color: #e2e2f0;
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(226, 226, 240, 0.5);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e2f0;
}

.page-btn.active {
    color: #a78bfa;
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
    font-weight: 600;
}

/* --- Quality Score Ring --- */
.quality-ring-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quality-ring-label {
    position: absolute;
    font-size: 0.875rem;
    font-weight: 700;
    color: #e2e2f0;
}

/* --- Animations (Keyframes) --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Stagger Animation Helper --- */
.stagger-1 { animation-delay: 0ms; }
.stagger-2 { animation-delay: 75ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 225ms; }
.stagger-5 { animation-delay: 300ms; }
.stagger-6 { animation-delay: 375ms; }

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Blazor-specific --- */
#blazor-error-ui {
    color-scheme: dark only;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.3);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
    border-top: 2px solid var(--color-error);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    color: #f87171;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* --- Validation States (Blazor Forms) --- */
.valid.modified:not([type=checkbox]) {
    border-color: var(--color-success);
}

.invalid {
    border-color: var(--color-error);
}

.validation-message {
    color: var(--color-error);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* --- Print Styles --- */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ============================================
   ACCESSIBILITY UTILITIES
   ============================================ */

/* Ensure minimum 44×44px touch targets for accessibility */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

.touch-target-button {
    min-height: 44px;
    padding: 0.625rem 1rem;
}

/* Responsive grid utilities */
.responsive-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

@media (min-width: 640px) {
    .responsive-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .responsive-stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Spacing utilities */
.section-spacing-sm { margin-bottom: 2rem; }
.section-spacing-md { margin-bottom: 3rem; }
.section-spacing-lg { margin-bottom: 4rem; }

/* Animation keyframes */
@keyframes chartFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(20px); }
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.03); opacity: 1; }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); opacity: 1; }
    25% { transform: scale(1.3); opacity: 0.8; }
    50% { transform: scale(1); opacity: 1; }
}

@keyframes expandWidth {
    from { width: 0%; opacity: 0; }
    to { opacity: 0.8; }
}

/* ============================================
   LANDING PAGE — Railway-inspired dark design
   ============================================ */

.landing-root {
    min-height: 100vh;
    background-color: #0d0d14;
    color: #e2e2f0;
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

/* --- Container --- */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Nav --- */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(13,13,20,0.85);
    backdrop-filter: blur(16px);
}

.landing-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 1rem;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    flex-shrink: 0;
}

.landing-brand-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    letter-spacing: -0.01em;
}

.landing-nav-links {
    display: flex;
    gap: 2rem;
}

.landing-nav-link {
    font-size: 0.875rem;
    color: rgba(226,226,240,0.6);
    text-decoration: none;
    transition: color 150ms;
}

.landing-nav-link:hover { color: #e2e2f0; }

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.landing-btn-ghost {
    font-size: 0.875rem;
    color: rgba(226,226,240,0.7);
    text-decoration: none;
    padding: 0.4rem 0.875rem;
    border-radius: 0.5rem;
    transition: color 150ms, background 150ms;
}
.landing-btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.06); }

.landing-btn-primary {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    transition: opacity 150ms, transform 150ms;
}
.landing-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

/* --- Hero --- */
.landing-hero {
    position: relative;
    padding: 7rem 0 5rem;
    overflow: hidden;
}

.landing-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.landing-glow-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -100px;
    background: radial-gradient(circle, rgba(124,58,237,0.25) 0%, transparent 70%);
}

.landing-glow-2 {
    width: 500px;
    height: 500px;
    top: -100px;
    right: -150px;
    background: radial-gradient(circle, rgba(79,70,229,0.2) 0%, transparent 70%);
}

.landing-glow-3 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: 40%;
    background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
}

.landing-glow-cta {
    width: 700px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 70%);
}

.landing-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

.landing-hero-inner {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(167,139,250,0.9);
    background: rgba(124,58,237,0.12);
    border: 1px solid rgba(124,58,237,0.25);
    padding: 0.35rem 0.875rem;
    border-radius: 9999px;
    margin-bottom: 2rem;
}

.landing-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a78bfa;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.landing-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 1.5rem;
    max-width: 800px;
}

.landing-gradient-text {
    background: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(226,226,240,0.6);
    max-width: 580px;
    margin: 0 0 2.5rem;
}

.landing-hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 4rem;
}

.landing-btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 200ms;
    box-shadow: 0 0 30px rgba(124,58,237,0.35);
}
.landing-btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 45px rgba(124,58,237,0.5);
}

.landing-btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(226,226,240,0.8);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 200ms;
    background: rgba(255,255,255,0.04);
}
.landing-btn-hero-ghost:hover {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.07);
    color: #fff;
}

/* --- Stats --- */
.landing-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 1rem;
    padding: 1.25rem 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.landing-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem;
}

.landing-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-stat-label {
    font-size: 0.75rem;
    color: rgba(226,226,240,0.45);
    margin-top: 0.125rem;
    text-align: center;
}

.landing-stat-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(255,255,255,0.08);
}

/* --- Sections --- */
.landing-section {
    padding: 6rem 0;
}

.landing-section--alt {
    background: rgba(255,255,255,0.018);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.landing-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.landing-section-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a78bfa;
    margin: 0 0 1rem;
}

.landing-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 1rem;
}

.landing-section-title--left {
    text-align: left;
}

.landing-section-subtitle {
    font-size: 1.0625rem;
    color: rgba(226,226,240,0.55);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Feature Cards --- */
.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.landing-feature-card {
    padding: 1.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    transition: border-color 200ms, background 200ms, transform 200ms;
}

.landing-feature-card:hover {
    border-color: rgba(167,139,250,0.25);
    background: rgba(124,58,237,0.06);
    transform: translateY(-2px);
}

.landing-feature-card--accent {
    background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(79,70,229,0.06));
    border-color: rgba(124,58,237,0.2);
}

.landing-feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.landing-feature-icon svg { width: 1.25rem; height: 1.25rem; }

.landing-feature-icon--blue   { background: rgba(59,130,246,0.15); color: #60a5fa; }
.landing-feature-icon--purple { background: rgba(124,58,237,0.15); color: #a78bfa; }
.landing-feature-icon--green  { background: rgba(16,185,129,0.15); color: #34d399; }
.landing-feature-icon--orange { background: rgba(245,158,11,0.15); color: #fbbf24; }
.landing-feature-icon--cyan   { background: rgba(6,182,212,0.15);  color: #22d3ee; }
.landing-feature-icon--pink   { background: rgba(236,72,153,0.15); color: #f472b6; }

.landing-feature-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.landing-feature-desc {
    font-size: 0.875rem;
    color: rgba(226,226,240,0.55);
    line-height: 1.65;
    margin: 0;
}

/* --- Steps --- */
.landing-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    flex-wrap: wrap;
}

.landing-step {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
}

.landing-step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(79,70,229,0.2));
    border: 1px solid rgba(124,58,237,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #a78bfa;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
}

.landing-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.landing-step-desc {
    font-size: 0.875rem;
    color: rgba(226,226,240,0.5);
    line-height: 1.6;
    margin: 0;
}

.landing-step-connector {
    width: 2rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(124,58,237,0.4), rgba(79,70,229,0.2));
    margin-top: 1.5rem;
    flex-shrink: 0;
}

/* --- RBD Split --- */
.landing-rbd-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.landing-rbd-desc {
    font-size: 1rem;
    color: rgba(226,226,240,0.6);
    line-height: 1.75;
    margin: 0 0 1rem;
}

.landing-rbd-symptoms {
    margin-top: 2rem;
}

.landing-rbd-symptoms-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(226,226,240,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
}

.landing-rbd-symptoms-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-rbd-symptoms-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: rgba(226,226,240,0.7);
}

.landing-rbd-card {
    position: sticky;
    top: 6rem;
}

.landing-rbd-card-inner {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.25rem;
    padding: 2rem;
}

.landing-rbd-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.landing-rbd-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.75rem;
}

.landing-rbd-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: #a78bfa;
    letter-spacing: -0.02em;
}

.landing-rbd-stat-lbl {
    font-size: 0.75rem;
    color: rgba(226,226,240,0.45);
    line-height: 1.4;
}

.landing-rbd-card-note {
    font-size: 0.8125rem;
    color: rgba(226,226,240,0.45);
    line-height: 1.6;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* --- CTA Section --- */
.landing-cta {
    position: relative;
    overflow: hidden;
    padding: 7rem 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.landing-cta-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 1rem;
}

.landing-cta-subtitle {
    font-size: 1.0625rem;
    color: rgba(226,226,240,0.55);
    max-width: 440px;
    margin: 0 0 2.5rem;
    line-height: 1.65;
}

.landing-cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* --- Footer --- */
.landing-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 2.5rem 0;
    background: rgba(0,0,0,0.2);
}

.landing-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.landing-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.landing-footer-tagline {
    font-size: 0.75rem;
    color: rgba(226,226,240,0.35);
    margin: 0;
}

.landing-footer-links {
    display: flex;
    gap: 1.5rem;
}

.landing-footer-link {
    font-size: 0.875rem;
    color: rgba(226,226,240,0.45);
    text-decoration: none;
    transition: color 150ms;
}
.landing-footer-link:hover { color: rgba(226,226,240,0.8); }

.landing-footer-copy {
    font-size: 0.8125rem;
    color: rgba(226,226,240,0.3);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   ROADMAP
═══════════════════════════════════════════════════════════ */

.rm-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 3.5rem;
}

/* ── Phase card ── */
.rm-phase {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    position: relative;
    transition: border-color 200ms, transform 200ms;
}
.rm-phase:hover {
    transform: translateY(-3px);
}
.rm-phase--live   { border-color: rgba(74,222,128,0.25); background: rgba(74,222,128,0.04); }
.rm-phase--dev    { border-color: rgba(251,191,36,0.25); background: rgba(251,191,36,0.04); }
.rm-phase--planned{ border-color: rgba(167,139,250,0.2); }
.rm-phase--research{ border-color: rgba(96,165,250,0.2); }

/* ── Header row ── */
.rm-phase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.rm-num {
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: rgba(226,226,240,0.12);
    line-height: 1;
    letter-spacing: -0.04em;
}

/* ── Status badges ── */
.rm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: 99px;
}
.rm-badge--live     { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.rm-badge--dev      { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.rm-badge--planned  { background: rgba(167,139,250,0.12); color: #a78bfa; border: 1px solid rgba(167,139,250,0.25); }
.rm-badge--research { background: rgba(96,165,250,0.12);  color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }

.rm-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rm-badge-dot--live { background: #4ade80; animation: rm-pulse 2s ease-in-out infinite; }
.rm-badge-dot--dev  { background: #fbbf24; animation: rm-pulse 2.5s ease-in-out infinite; }

@keyframes rm-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ── Icon ── */
.rm-icon-wrap {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.rm-icon-wrap svg { width: 1.375rem; height: 1.375rem; }
.rm-icon-wrap--green  { background: rgba(74,222,128,0.15);  color: #4ade80; }
.rm-icon-wrap--amber  { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.rm-icon-wrap--purple { background: rgba(167,139,250,0.15); color: #a78bfa; }
.rm-icon-wrap--blue   { background: rgba(96,165,250,0.15);  color: #60a5fa; }

/* ── Text ── */
.rm-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: rgba(226,226,240,0.95);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}
.rm-desc {
    font-size: 0.8125rem;
    color: rgba(226,226,240,0.5);
    line-height: 1.6;
    margin: 0 0 1.125rem;
}

/* ── Feature list ── */
.rm-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.rm-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(226,226,240,0.6);
    line-height: 1.5;
}
.rm-check {
    flex-shrink: 0;
    font-size: 0.65rem;
    margin-top: 0.15rem;
}
.rm-check--green  { color: #4ade80; }
.rm-check--amber  { color: #fbbf24; }
.rm-check--purple { color: #a78bfa; }
.rm-check--blue   { color: #60a5fa; }

/* ── Connector ── */
.rm-connector {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    padding-top: 5rem;
    gap: 0.25rem;
}
.rm-connector-line {
    width: 2rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.18), rgba(255,255,255,0.08));
}
.rm-connector-arrow {
    width: 1rem;
    height: 1rem;
    color: rgba(226,226,240,0.2);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .landing-nav-links { display: none; }
    .landing-stat { padding: 0 1rem; }
    .landing-stat-divider { display: none; }
    .landing-features-grid { grid-template-columns: 1fr; }
    .landing-rbd-split { grid-template-columns: 1fr; }
    .landing-rbd-card { position: static; }
    .landing-steps { flex-direction: column; align-items: center; }
    .landing-step-connector { width: 1px; height: 1.5rem; margin-top: 0; }
    .landing-footer-inner { flex-direction: column; align-items: flex-start; }
    .rm-timeline { flex-direction: column; gap: 0.75rem; }
    .rm-connector { flex-direction: row; padding: 0; padding-left: 5rem; justify-content: flex-start; }
    .rm-connector-line { width: 1px; height: 1.5rem; }
    .rm-connector-arrow { transform: rotate(90deg); }
}
