/* ──────────────────────────────────────────────────────────
   CRAG — Vendor Risk Monitor  |  Design System
   ────────────────────────────────────────────────────────── */

/* ── Reset & Tokens ───────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    /* surfaces */
    --bg: #030712;
    --surface-1: #111827;
    --surface-2: #1f2937;
    --surface-3: #374151;
    --glass: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* text */
    --text: #f9fafb;
    --text-dim: #9ca3af;
    --text-muted: #6b7280;

    /* accent */
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --accent-g: linear-gradient(135deg, #6366f1, #a855f7);

    /* risk palette */
    --low: #10b981;
    --low-bg: rgba(16, 185, 129, 0.1);
    --med: #f59e0b;
    --med-bg: rgba(245, 158, 11, 0.1);
    --high: #ef4444;
    --high-bg: rgba(239, 68, 68, 0.1);

    /* layout */
    --sidebar-w: 260px;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);

    /* fonts */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

html,
body {
    height: 100%;
    background: var(--bg);
    overflow: hidden;
    /* Lock body, scroll happens in main-content */
}

body {
    display: flex;
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 3px;
}

/* ── App Shell (Sidebar + Main Content) ─────────────────── */
#app-shell {
    flex: 1;
    width: 100%;
    display: flex;
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    height: 100vh;
    background: var(--surface-1);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 32px 20px 24px;
    z-index: 1001;
    /* Stay above overlay */
    transition: transform var(--transition), opacity var(--transition);
    overflow: hidden;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    /* for scrollbar spacing */
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-brand {
    text-align: center;
    margin-bottom: 36px;
}

.brand-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, .5));
}

.sidebar-brand h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-g);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.brand-sub {
    font-size: .72rem;
    color: var(--text-dim);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* Nav buttons */
.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-dim);
    font: 500 .88rem/1 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 6px;
    position: relative;
    border: 1px solid transparent;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    transform: translateX(4px);
}

.nav-btn.active {
    background: var(--accent-g);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, .3);
}

.nav-icon {
    font-size: 1.1rem;
}

.badge-alert {
    margin-left: auto;
    background: var(--high);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    animation: pulse-badge 1.6s infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    color: var(--text-muted);
    padding: 10px 14px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--low);
    box-shadow: 0 0 8px var(--low);
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

/* ── Zoom Controls ─────────────────────────────────────── */
.zoom-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    margin: 12px 0 20px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--surface-3);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.23s var(--transition);
    flex-shrink: 0;
}

.zoom-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.zoom-level {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dim);
    min-width: 44px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ── Main Content ───────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background: var(--bg);
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for main content */
.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 10px;
}

.main-content .container {
    padding-left: 32px;
    padding-right: 32px;
    width: 100%;
}

/* ── Utilities ────────────────────────────────────────── */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.mt-4 {
    margin-top: 24px;
}

.mb-4 {
    margin-bottom: 24px;
}

.p-0 {
    padding: 0 !important;
}

/* Top bar */
.topbar {
    display: flex;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    background: rgba(11, 15, 25, .8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-left h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-status-wrap,
.topbar-user-wrap,
.topbar-time-wrap,
.topbar-alerts-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 500;
}

.topbar-alerts-wrap {
    border-right: none;
    padding-right: 0;
}

.header-icon {
    font-size: 1rem;
    line-height: 1;
}

.header-label {
    color: var(--text-dim);
}

.status-emoji {
    font-size: 0.85rem;
}

.clock {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.badge-header {
    background: var(--high);
    color: #fff;
    font-size: 0.62rem;
    padding: 2px 5px;
    border-radius: 8px;
    font-weight: 800;
    margin-left: -4px;
    margin-top: -12px;
}

.btn-icon-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
}

.btn-icon-logout svg {
    transition: transform 0.2s ease;
}

.btn-icon-logout:hover svg {
    transform: translateX(2px);
}

.logout-symbol {
    font-weight: 400;
}

.btn-icon-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}

/* ── Panes ────────────────────────────────────────────── */
.pane {
    display: none;
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
    animation: fadeUp .3s ease;
}

.pane.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── KPI Strip ────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: var(--surface-1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 3px solid transparent;
    /* default */
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}

.kpi-label {
    display: block;
    font-size: .72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
}

.kpi-low .kpi-value {
    color: var(--low);
}

.kpi-med .kpi-value {
    color: var(--med);
}

.kpi-high .kpi-value {
    color: var(--high);
}

/* ── Cards ────────────────────────────────────────────── */
.card {
    background: var(--surface-1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-premium);
    transition: border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ── Dashboard Grid ───────────────────────────────────── */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    align-items: stretch;
    /* Cards will have equal height */
}

.chart-wrap {
    max-width: 220px;
    margin: 0 auto;
    position: relative;
    aspect-ratio: 1 / 1;
}

/* ── Validation Badges ──────────────────────────────── */
.badge-verified {
    background: rgba(34, 197, 94, 0.15);
    color: var(--low);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(34, 197, 94, 0.3);
    display: inline-block;
}

.badge-unverified {
    background: rgba(239, 68, 68, 0.15);
    color: var(--high);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: inline-block;
}

/* ── Vendor Live List ─────────────────────────────────── */
.vendor-live-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Tighter gap */
    max-height: 480px;
    /* Slightly taller allowed */
    overflow-y: auto;
    padding-right: 4px;
    /* Space for scrollbar */
}

.vendor-live-item {
    display: grid;
    grid-template-columns: 1fr auto minmax(60px, auto);
    /* Flexible last column to prevent score overflow */
    align-items: center;
    gap: 16px;
    /* Increased gap for better breathing room */
    padding: 16px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--low);
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
    /* Contain children */
}

.vendor-live-item:hover {
    background: var(--surface-3);
    transform: translateX(4px);
}

.vendor-live-item.risk-medium {
    border-left-color: var(--med);
}

.vendor-live-item.risk-high {
    border-left-color: var(--high);
}

.vendor-live-item .v-name {
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* Allow name to wrap but keeping badge together */
    gap: 4px;
}

.high-badge {
    background: var(--high);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.vendor-live-item .v-cat {
    font-size: .75rem;
    color: var(--text-dim);
}

.risk-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    min-width: 70px;
    justify-content: center;
}

.risk-pill.low {
    background: var(--low-bg);
    color: var(--low);
}

.risk-pill.medium {
    background: var(--med-bg);
    color: var(--med);
}

.risk-pill.high {
    background: var(--high-bg);
    color: var(--high);
    animation: pulse-high 1.5s infinite;
}

@keyframes pulse-high {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, .4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.high-badge {
    font-size: .65rem;
    font-weight: 700;
    background: var(--high);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
    animation: pulse-badge 1.6s infinite;
}

/* ── Score Bar ─────────────────────────────────────────── */
.score-bar-wrap {
    width: 100%;
    max-width: 120px;
}

.score-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--surface-1);
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .6s ease, background .6s ease;
}

/* ── Form ─────────────────────────────────────────────── */
.form-card {
    border-top: 3px solid;
    border-image: var(--accent-g) 1;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.field label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.field input,
.field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    color: var(--text);
    font: 500 .88rem 'Inter', sans-serif;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .2);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font: 600 .85rem 'Inter', sans-serif;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent-g);
    color: #fff;
    box-shadow: 0 4px 18px rgba(99, 102, 241, .35);
}

.btn-danger {
    background: rgba(239, 68, 68, .15);
    color: var(--high);
    font-size: .78rem;
    padding: 6px 14px;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, .3);
}

/* ── Tables ───────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
}

thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    color: var(--text-dim);
}

tbody tr {
    transition: background var(--transition);
}

tbody tr:hover {
    background: var(--surface-3);
}

.sidebar-toggle {
    display: none;
    background: var(--surface-2);
    border: 1px solid var(--glass-border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    transition: background var(--transition);
}

.sidebar-toggle:hover {
    background: var(--surface-3);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Main Content ──────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg);
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar for Main Content */
.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 10px;
}

/* ── Alerts List ──────────────────────────────────────── */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 560px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: var(--high-bg);
    border-left: 4px solid var(--high);
    border-radius: var(--radius-sm);
}

.alert-item .alert-icon {
    font-size: 1.4rem;
}

.alert-item .alert-body {
    flex: 1;
}

.alert-item .alert-msg {
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: 4px;
}

.alert-item .alert-meta {
    font-size: .72rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: .88rem;
}

/* ── Toast ────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: .84rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
    animation: slideIn .3s ease, fadeOut .4s ease 2.6s forwards;
}

.toast.success {
    border-left: 4px solid var(--low);
}

.toast.error {
    border-left: 4px solid var(--high);
}

@keyframes slideIn {
    from {
        transform: translateX(30px);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px)
    }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width:900px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .hamburger {
        display: block;
    }

    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width:500px) {
    .kpi-strip {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Modal Overlay ────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn .2s ease;
}

.modal-overlay.open {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal {
    background: var(--surface-1);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    width: 90vw;
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlide .3s ease;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

@keyframes modalSlide {
    from {
        transform: translateY(20px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: var(--surface-3);
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    z-index: 2;
}

.modal-close:hover {
    background: var(--high);
    color: #fff;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.modal-vendor-icon {
    font-size: 2.4rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3);
    border-radius: 14px;
}

.modal-vendor-name {
    font-size: 1.2rem;
    font-weight: 800;
}

.modal-vendor-cat {
    font-size: .78rem;
    color: var(--text-dim);
}

.modal-header .risk-pill {
    margin-left: auto;
    font-size: .85rem;
    padding: 6px 16px;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 0;
    padding: 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.modal-tab {
    padding: 12px 18px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font: 600 .8rem 'Inter', sans-serif;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.modal-tab:hover {
    color: var(--text);
}

.modal-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Modal Panes */
.modal-pane {
    display: none;
    padding: 24px 28px;
    animation: fadeUp .25s ease;
}

.modal-pane.active {
    display: block;
}

/* Info Grid */
.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.info-block {
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.info-label {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.info-value {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
}

/* Risk Gauge */
.modal-risk-section {
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.modal-risk-section h4 {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.risk-gauge-wrap {
    display: flex;
    justify-content: center;
}

.risk-gauge {
    position: relative;
    width: 180px;
    height: 110px;
}

.gauge-svg {
    width: 100%;
    height: auto;
}

.gauge-score {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    font-weight: 800;
}

.gauge-label {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-dim);
}

.risk-explanation {
    margin-top: 16px;
    font-size: .82rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Risk Factors */
.modal-risk-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.risk-factor {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: var(--radius-sm);
}

.rf-icon {
    font-size: 1.4rem;
    min-width: 28px;
    text-align: center;
}

.rf-title {
    display: block;
    font-weight: 700;
    font-size: .88rem;
    margin-bottom: 2px;
}

.rf-desc {
    display: block;
    font-size: .76rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.rf-value {
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 800;
    min-width: 50px;
    text-align: right;
    color: var(--accent);
}

/* Modal Alert List */
.modal-alert-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

/* Clickable rows */
.vendor-live-item {
    cursor: pointer;
}

.vendor-live-item:hover {
    background: rgba(99, 102, 241, .08);
}

tbody tr.clickable-row {
    cursor: pointer;
}

tbody tr.clickable-row:hover {
    background: rgba(99, 102, 241, .1);
}

@media (max-width:600px) {
    .modal {
        width: 96vw;
    }

    .modal-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-tabs {
        overflow-x: auto;
    }
}

/* ── Nav Divider ──────────────────────────────────────── */
.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, .08);
    margin: 10px 0;
}

/* ── Card Header Row ──────────────────────────────────── */
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header-row h3 {
    margin-bottom: 0;
}

/* ── Reset Button ─────────────────────────────────────── */
.btn-reset {
    background: rgba(239, 68, 68, .12);
    color: var(--high);
    font-size: .76rem;
    padding: 7px 14px;
    border: 1px solid rgba(239, 68, 68, .2);
    transition: all var(--transition);
}

.btn-reset:hover {
    background: var(--high);
    color: #fff;
    border-color: var(--high);
}

/* ── Engine Toggle ────────────────────────────────────── */
.engine-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-muted);
    font: 500 .75rem 'Inter', sans-serif;
    cursor: pointer;
    width: auto;
    transition: all var(--transition);
}

.engine-toggle:hover {
    background: var(--surface-2);
    border-color: rgba(255, 255, 255, .12);
}

.engine-toggle.paused .status-dot {
    background: var(--high);
    box-shadow: 0 0 8px var(--high);
    animation: none;
}

.engine-toggle.paused {
    color: var(--high);
}

/* ── Page Hero ────────────────────────────────────────── */
.page-hero {
    text-align: center;
    padding: 32px 20px 28px;
    margin-bottom: 24px;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
}

.hero-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.page-hero h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.page-hero p {
    color: var(--text-dim);
    font-size: .88rem;
}

/* ── Info Cards Grid ──────────────────────────────────── */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.info-card {
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
    padding: 24px;
}

.info-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.info-card h4 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.info-card p {
    font-size: .84rem;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 8px;
}

/* Help Steps */
.help-steps {
    list-style: none;
    padding: 0;
}

.help-steps li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    font-size: .84rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.help-steps li:last-child {
    border-bottom: none;
}

/* Tech Stack */
.tech-stack-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .84rem;
    color: var(--text-dim);
}

.tech-badge {
    background: var(--accent-g);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    min-width: 70px;
    text-align: center;
}

/* Roadmap */
.roadmap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rm-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-left: 2px solid var(--surface-3);
    padding-left: 20px;
    position: relative;
}

.rm-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    left: -7px;
    top: 18px;
    background: var(--surface-3);
}

.rm-done .rm-dot {
    background: var(--low);
    box-shadow: 0 0 8px var(--low);
}

.rm-next .rm-dot {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.rm-future .rm-dot {
    background: var(--text-muted);
}

.rm-item small {
    color: var(--text-muted);
}

.rm-item strong {
    color: var(--text);
}

.rm-item div {
    font-size: .84rem;
    color: var(--text-dim);
}

/* Impact Grid */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.impact-item {
    text-align: center;
    padding: 16px 10px;
    background: var(--surface-3);
    border-radius: var(--radius-sm);
}

.impact-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-g);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.impact-label {
    font-size: .68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ── Contact ──────────────────────────────────────────── */
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--surface-3);
    border-radius: var(--radius-sm);
}

.contact-icon {
    font-size: 1.4rem;
    min-width: 28px;
    text-align: center;
}

/* ── Legal ────────────────────────────────────────────── */
.legal-card {
    border-top: 3px solid;
    border-image: var(--accent-g) 1;
}

.legal-section {
    margin-bottom: 20px;
}

.legal-section h4 {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.legal-section p {
    font-size: .84rem;
    color: var(--text-dim);
    line-height: 1.65;
}

.legal-section code {
    background: var(--surface-3);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .82rem;
    color: var(--accent);
}

/* ── Developer ────────────────────────────────────────── */
.dev-card {
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
}

.dev-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-g);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 8px 30px rgba(99, 102, 241, .3);
}

.dev-name {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.dev-title {
    color: var(--accent);
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.dev-bio {
    color: var(--text-dim);
    font-size: .88rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 20px;
}

.dev-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.skill-tag {
    background: var(--surface-3);
    border: 1px solid rgba(255, 255, 255, .06);
    color: var(--text-dim);
    font-size: .75rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    transition: all var(--transition);
}

.skill-tag:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.dev-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.dev-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--surface-3);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.dev-link:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Chatbot Widget ───────────────────────────────────── */
.chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-g);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(99, 102, 241, .4);
    z-index: 900;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fabPulse 3s infinite;
}

.chat-fab:hover {
    transform: scale(1.1);
}

@keyframes fabPulse {

    0%,
    100% {
        box-shadow: 0 8px 30px rgba(99, 102, 241, .4);
    }

    50% {
        box-shadow: 0 8px 40px rgba(99, 102, 241, .6);
    }
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    background: var(--surface-1);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    z-index: 901;
    display: none;
    flex-direction: column;
    animation: modalSlide .3s ease;
    overflow: hidden;
}

.chat-window.open {
    display: flex;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--surface-2);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    font-size: 1.6rem;
}

.chat-header strong {
    font-size: .88rem;
}

.chat-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color var(--transition);
}

.chat-close:hover {
    color: var(--high);
}

.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 340px;
}

.chat-msg {
    display: flex;
}

.chat-msg.bot {
    justify-content: flex-start;
}

.chat-msg.user {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: .84rem;
    line-height: 1.5;
}

.chat-msg.bot .chat-bubble {
    background: var(--surface-3);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.chat-msg.user .chat-bubble {
    background: var(--accent-g);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-quick {
    display: inline-block;
    margin: 4px 4px 0 0;
    padding: 5px 12px;
    background: rgba(99, 102, 241, .15);
    border: 1px solid rgba(99, 102, 241, .3);
    border-radius: 16px;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.chat-quick:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.chat-input-wrap {
    display: flex;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    gap: 8px;
}

.chat-input-wrap input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    background: var(--surface-3);
    color: var(--text);
    font: 500 .84rem 'Inter', sans-serif;
    outline: none;
}

.chat-input-wrap input:focus {
    border-color: var(--accent);
}

.chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-g);
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: transform var(--transition);
}

.chat-send:hover {
    transform: scale(1.08);
}

.typing-dots::after {
    content: '...';
    animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {
    0% {
        content: ''
    }

    33% {
        content: '.'
    }

    66% {
        content: '..'
    }

    100% {
        content: '...'
    }
}

@media (max-width:900px) {
    .info-cards-grid {
        grid-template-columns: 1fr;
    }

    .chat-window {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 84px;
    }
}

/* ═══ LANDING PAGE STYLES ══════════════════════════════ */
.landing-page {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    width: 100%;
    /* Fix: Flex child needs 100% width to fill screen */
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    /* Fix: Allow vertical scrolling since body is hidden */
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ── Mobile Overrides ───────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .topbar h2 {
        font-size: 1.1rem;
    }
}

.landing-nav {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(10, 11, 15, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.landing-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.landing-nav-links a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero-bg-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
}

.hero-orb-1 {
    background: var(--accent);
    top: -200px;
    right: -100px;
    animation: orbFloat 20s infinite alternate;
}

.hero-orb-2 {
    background: var(--high);
    bottom: -200px;
    left: -100px;
    animation: orbFloat 25s infinite alternate-reverse;
}

@keyframes orbFloat {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, 100px) scale(1.1);
    }
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-gradient-text {
    background: linear-gradient(90deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-trust {
    display: flex;
    justify-content: center;
    gap: 32px;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Features Grid */
.landing-features {
    padding: 100px 0;
    background: var(--surface);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--surface-2);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3);
    background: var(--surface-3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: block;
}

.feature-card h4 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.landing-stats {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--surface), var(--bg));
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-stats .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

.landing-cta {
    padding: 120px 0;
    text-align: center;
    background: var(--bg);
}

.landing-cta h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.landing-cta p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 48px;
}

/* Footer */
.landing-footer {
    padding: 40px 8%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.landing-footer p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.landing-footer a {
    color: var(--accent);
    text-decoration: none;
}

/* ═══ LOGIN MODAL STYLES ════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.login-card.modal-content {
    background: var(--surface-1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .login-card.modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* ═══ LOGIN PAGE STYLES ════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.login-card {
    background: var(--surface-2);
    width: 100%;
    max-width: 420px;
    padding: 48px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.login-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-dim);
}

.login-role-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: var(--surface-3);
    padding: 6px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.role-btn {
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.role-btn.active {
    background: var(--accent);
    color: white;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--high);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

.login-footer-link {
    text-align: center;
    margin-top: 24px;
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-link:hover {
    color: var(--accent);
}

.login-hints {
    margin-top: 32px;
    text-align: center;
    color: var(--text-dim);
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logged-in-as {
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}

/* ═══ UTILITIES ═══════════════════════════════════════ */
.btn-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

@media (max-width: 768px) {
    .landing-nav {
        padding: 16px 5%;
    }

    .landing-nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .landing-stats {
        flex-direction: column;
        gap: 40px;
    }
}

/* ── Presentation & Architecture Panel ────────────────── */
#pane-presentation {
    transition: all 0.3s ease;
}

#pane-presentation:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    background: var(--surface-1);
    padding: 40px;
}

#pane-presentation:fullscreen {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    background: var(--surface-1);
    padding: 40px;
}

#pane-presentation:-webkit-full-screen #pres-wrapper { max-width: 1200px; margin: 0 auto; }
#pane-presentation:fullscreen #pres-wrapper { max-width: 1200px; margin: 0 auto; }

/* Architecture Diagram */
.arch-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
}

.arch-tier {
    width: 100%;
    max-width: 600px;
    background: var(--surface-3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    position: relative;
}

.tier-label {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--surface-1);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.arch-box {
    background: var(--surface-1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    margin: 8px auto;
    font-size: 0.9rem;
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.arch-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 800;
}

.arch-arrow span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 4px 0;
    background: var(--surface-2);
    padding: 2px 8px;
    border-radius: 4px;
}

.tech-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: var(--surface-3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    justify-content: center;
}
.tech-box span { font-size: 1.4rem; }

/* ── Interactive Slideshow ──────────────────────────────── */
.slideshow-container {
    position: relative;
    width: 100%;
    /* 16:9 Aspect Ratio within the pane */
    aspect-ratio: 16 / 9;
    max-height: 80vh;
    background: var(--surface-1);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.slideshow-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    border: none;
}

.slideshow-container:fullscreen {
    width: 100vw;
    height: 100vh;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    border: none;
}

.pres-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    z-index: 1;
    background: var(--surface-1);
}

.pres-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.slide-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 15px;
    display: inline-block;
}

.slide-desc {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Slideshow UI Additions */
.slide-sidebar {
    background: var(--surface-2);
}
.slide-sidebar::-webkit-scrollbar {
    width: 6px;
}
.slide-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.slide-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}
.sidebar-thumb {
    padding: 15px 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}
.sidebar-thumb:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}
.sidebar-thumb.active {
    background: rgba(138,43,226,0.15);
    color: white;
    font-weight: 700;
    border-left: 4px solid var(--accent);
}

/* System Flow Diagram Additions */
.flow-diagram {
    padding: 20px;
}
.flow-box {
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 1.2rem;
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    min-width: 250px;
    text-align: center;
}
.flow-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 800;
}

.slide-label {
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255,255,255,0.05);
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.slide-nav-text-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.slide-nav-text-btn:hover {
    color: var(--accent);
}

/* Timeline Layout Component */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.1);
}

.timeline .card {
    position: relative;
    margin-bottom: 15px;
}

.timeline .card::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -26px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface-1);
    border: 2px solid var(--accent);
}

/* ── SaaS-Style Architecture Diagram ──────────────────────── */
.saas-diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.saas-layer {
    width: 100%;
    max-width: 500px;
    background: var(--surface-1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.saas-layer-title {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--surface-3);
    padding: 2px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
}

.saas-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid var(--text-dim);
    padding: 15px;
    border-radius: 4px;
    text-align: left;
}

.saas-box strong {
    font-size: 1.1rem;
    color: var(--text);
    display: block;
    margin-bottom: 8px;
}

.saas-box-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.saas-layer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.saas-arrow {
    font-size: 1.2rem;
    font-family: monospace;
    font-weight: 800;
    color: var(--text-dim);
    margin: 5px 0;
}