@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ─── Design Tokens ─────────────────────────────────── */
:root {
    --bg:          #f8fafc;
    --surface:     #ffffff;
    --border:      rgba(14, 165, 233, 0.15);
    --border-soft: rgba(14, 165, 233, 0.08);

    --text-1: #091225;
    --text-2: #334155;
    --text-3: #64748b;

    --teal:        #0ea5e9;
    --teal-dark:   #0369a1;
    --teal-light:  #f0f9ff;
    --teal-border: #bae6fd;

    --green:        #16a34a;
    --green-light:  #f0fdf4;
    --green-border: #bbf7d0;

    --amber:        #b45309;
    --amber-light:  #fffbeb;
    --amber-border: #fde68a;

    --red:        #dc2626;
    --red-light:  #fef2f2;
    --red-border: #fecaca;

    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
    --shadow-card: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-card-hover: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.04);

    --sidebar-width: 260px;
    --topbar-height: 70px;
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .card-title, .auth-title {
    font-family: 'Space Grotesk', sans-serif !important;
    letter-spacing: -0.02em;
}

/* ─── Utility Classes (Reference-Inspired) ──────────── */
.mesh-gradient {
    background:
        radial-gradient(ellipse 80% 80% at 20% 20%, rgba(14,165,233,0.25) 0%, transparent 60%),
        radial-gradient(ellipse 60% 60% at 80% 80%, rgba(99,102,241,0.2) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(2,132,199,0.12) 0%, transparent 70%),
        #070d1a;
}
.text-gradient {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    border-radius: 9999px;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    color: #0369a1;
}
.section-tag-dark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    border-radius: 9999px;
    border: 1px solid rgba(56,189,248,0.3);
    background: rgba(56,189,248,0.1);
    color: #7dd3fc;
}
.icon-circle {
    display: flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    box-shadow: 0 8px 16px rgba(14,165,233,0.3);
    flex-shrink: 0;
}
.icon-circle svg { width: 28px; height: 28px; }

/* ─══════════════════════════════════════════════════════
   LANDING PAGE (Full-Screen Scrollable)
   ═══════════════════════════════════════════════════════ */

/* Landing Wrapper */
.landing-page {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    background: #070d1a;
    scroll-behavior: smooth;
}

/* --- Landing Navbar --- */
.landing-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 72px;
    background: rgba(7, 13, 26, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.3s;
}
.landing-navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.landing-navbar-brand img {
    height: 32px;
    object-fit: contain;
}
.landing-navbar-brand span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}
.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}
.landing-nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.landing-nav-links a:hover { color: #fff; }
.landing-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(14,165,233,0.3);
    transition: all 0.3s;
    text-decoration: none;
}
.landing-nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14,165,233,0.4);
}

/* --- Hero Section --- */
.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 80px;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(14,165,233,0.12);
    filter: blur(100px);
    pointer-events: none;
    animation: floatSlow 8s ease-in-out infinite;
}
.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: 5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(99,102,241,0.1);
    filter: blur(90px);
    pointer-events: none;
    animation: floatSlow 10s ease-in-out infinite reverse;
}
.landing-hero-inner {
    position: relative;
    z-index: 10;
    max-width: 800px;
}
.landing-hero-inner h1 {
    font-size: 56px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}
.landing-hero-inner p {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 40px;
}
.landing-hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(14,165,233,0.3);
    transition: all 0.3s;
    text-decoration: none;
}
.btn-hero-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 28px rgba(14,165,233,0.45);
}
.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 9999px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s;
    text-decoration: none;
}
.btn-hero-ghost:hover {
    background: #fff;
    color: #0f172a;
    transform: translateY(-3px);
}

/* --- Stats Section --- */
.landing-stats {
    padding: 80px 40px;
    background: #f8fafc;
}
.landing-stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.stat-card {
    padding: 32px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-2xl);
    text-align: center;
    transition: all 0.3s;
}
.stat-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}
.stat-card .stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.03em;
}
.stat-card .stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 4px;
}

/* --- Features Section --- */
.landing-features {
    padding: 80px 40px;
    background: #fff;
}
.landing-features-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.landing-features-inner .section-heading {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}
.landing-features-inner .section-sub {
    font-size: 16px;
    color: var(--text-3);
    margin-bottom: 48px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: left;
}
.feature-card {
    padding: 32px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-2xl);
    transition: all 0.4s;
}
.feature-card:hover {
    background: #fff;
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-6px);
}
.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
    margin: 16px 0 8px;
}
.feature-card p {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.6;
}

/* --- Role Selection Section --- */
.landing-roles {
    padding: 80px 40px;
    background: #f8fafc;
}
.landing-roles-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 48px auto 0;
    padding-bottom: 28px;
}
.role-card {
    position: relative;
    background: #fff;
    border-radius: var(--radius-2xl);
    overflow: visible;
    box-shadow: var(--shadow-card);
    transition: all 0.4s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.role-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-6px);
}
.role-card-img {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    background: #f1f5f9;
}
.role-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}
.role-card:hover .role-card-img img {
    transform: scale(1.05);
}
.role-card-img .role-label-pill {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 0;
    width: calc(100% - 32px);
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fff;
    background: rgba(14,165,233,0.85);
    backdrop-filter: blur(8px);
    border-radius: 9999px;
    box-shadow: 0 8px 16px rgba(14,165,233,0.3);
}
.role-card-body {
    padding: 28px 24px 36px;
    flex: 1;
}
.role-card-body h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.role-card-body h3::before {
    content: '';
    width: 4px;
    height: 22px;
    background: #0ea5e9;
    border-radius: 9999px;
}
.role-card-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.role-card-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
}
.role-card-features li .check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.role-card-features li .check-icon svg {
    width: 12px;
    height: 12px;
    stroke: #0ea5e9;
    stroke-width: 3;
    fill: none;
}
/* Hover CTA pill that pops out */
.role-card-cta {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    padding: 10px 28px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(14,165,233,0.35);
    transition: all 0.3s;
    white-space: nowrap;
    z-index: 20;
}
.role-card:hover .role-card-cta {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Landing Footer --- */
.landing-footer-section {
    padding: 32px 40px;
    background: #070d1a;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* --- Login Modal Overlay --- */
.login-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(7, 13, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-modal-overlay.active {
    display: flex;
}
.login-modal-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    padding: 40px;
    position: relative;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}
.login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-3);
}
.login-modal-close:hover {
    background: #f1f5f9;
    color: var(--text-1);
}

/* ═══════════════════════════════════════════════════════
   DASHBOARD LAYOUT (Sidebar + Content)
   ═══════════════════════════════════════════════════════ */

/* Sidebar */
.dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow: hidden;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand img {
    height: 28px;
    object-fit: contain;
    filter: brightness(1.5);
}
.sidebar-brand span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}
.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}
.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}
.sidebar-menu-item:hover {
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
}
.sidebar-menu-item.active {
    background: linear-gradient(135deg, rgba(14,165,233,0.15), rgba(37,99,235,0.1));
    color: #38bdf8;
    font-weight: 600;
}
.sidebar-menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 12px 16px;
}
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #f87171;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}
.sidebar-logout-btn:hover {
    background: rgba(248,113,113,0.1);
}
.sidebar-logout-btn svg {
    width: 20px;
    height: 20px;
}

/* Dashboard Main Area */
.dashboard-main-area {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.topbar-welcome h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.02em;
}
.topbar-welcome p {
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-actions .topbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}
.topbar-actions .topbar-btn:hover {
    background: #f8fafc;
}

/* Dashboard Content Scrollable Area */
.dashboard-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
}

/* Stats Cards (Dashboard Tab) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.dash-stat-card {
    padding: 28px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-2xl);
    transition: all 0.3s;
}
.dash-stat-card:hover {
    box-shadow: 0 12px 24px rgba(14,165,233,0.06);
    transform: translateY(-2px);
}
.dash-stat-card .stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.dash-stat-card .stat-top .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}
.dash-stat-card:hover .stat-top .stat-icon {
    transform: scale(1.1);
}
.dash-stat-card .stat-icon.sky { background: #f0f9ff; color: #0ea5e9; }
.dash-stat-card .stat-icon.emerald { background: #ecfdf5; color: #10b981; }
.dash-stat-card .stat-icon.amber { background: #fffbeb; color: #f59e0b; }
.dash-stat-card .stat-icon svg { width: 24px; height: 24px; }
.dash-stat-card .stat-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-3);
    margin-bottom: 6px;
}
.dash-stat-card .stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.03em;
}

/* Big Content Card (wrapping tab panels) */
.dash-content-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-2xl);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04);
    overflow: hidden;
}
.dash-content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #f1f5f9;
}
.dash-content-card-header .card-hdr-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.dash-content-card-header .card-hdr-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: #0ea5e9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-content-card-header .card-hdr-icon svg { width: 22px; height: 22px; }
.dash-content-card-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-1);
}
.dash-content-card-body {
    padding: 24px 28px;
}
/* ─── NEW: Landing Page ──────────────────────────────── */
.landing-container {
    min-height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.app-container {
    display: none; /* Hidden by default, shown after login */
}

/* Landing Nav */
.landing-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.landing-navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    padding: 14px 48px;
}
.landing-navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.landing-navbar-brand:hover {
    transform: scale(1.02);
}
.landing-navbar-brand img {
    height: 40px;
    width: auto;
    transition: transform 0.5s ease;
}
.landing-navbar-brand:hover img {
    transform: rotate(5deg);
}
.landing-navbar-brand span {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-1);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.landing-nav-links a {
    position: relative;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.03em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.landing-navbar.scrolled .landing-nav-links a {
    color: #1e293b !important;
    text-shadow: none;
}
.landing-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 16px;
    right: 16px;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #14b8a6);
    border-radius: 99px;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.landing-nav-links a:hover {
    color: #38bdf8 !important;
    background: rgba(255, 255, 255, 0.08);
}
.landing-navbar.scrolled .landing-nav-links a:hover {
    color: #0ea5e9 !important;
    background: rgba(14, 165, 233, 0.08);
}
.landing-nav-links a:hover::after {
    transform: scaleX(1);
}
.landing-nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}
.landing-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

/* Landing Hero */
.landing-hero {
    position: relative;
    padding: 80px 48px 100px;
    text-align: center;
    overflow: hidden;
}
.landing-hero-bg-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.landing-hero-bg-orbs .orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(80px);
    animation: floatSlow 8s ease-in-out infinite;
}
.landing-hero-bg-orbs .orb:nth-child(1) {
    width: 400px; height: 400px;
    top: -80px; left: -60px;
    background: #0ea5e9;
}
.landing-hero-bg-orbs .orb:nth-child(2) {
    width: 300px; height: 300px;
    bottom: -40px; right: -40px;
    background: #6366f1;
    animation-delay: 2s;
}
.landing-hero-bg-orbs .orb:nth-child(3) {
    width: 200px; height: 200px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #14b8a6;
    animation-delay: 4s;
}
.landing-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}
.landing-hero-content h1 {
    font-size: 48px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}
.landing-hero-content p {
    font-size: 16px;
    color: #475569;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 32px;
}
.landing-hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.landing-hero-actions .btn-hero-primary {
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(14,165,233,0.25);
}
.landing-hero-actions .btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(14,165,233,0.35);
}
.landing-hero-actions .btn-hero-secondary {
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 700;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.3s;
}
.landing-hero-actions .btn-hero-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Landing Stats Row */
.landing-stats-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 60px;
}
.landing-stat-item {
    text-align: center;
}
.landing-stat-item .stat-val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #0ea5e9;
    letter-spacing: -0.03em;
}
.landing-stat-item .stat-lbl {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* Landing Features */
.landing-features {
    padding: 80px 48px;
    background: #f8fafc;
}
.landing-features-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.section-heading {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.section-sub {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 48px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: left;
}
.feature-card {
    padding: 28px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    transition: all 0.3s;
}
.feature-card:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    transform: translateY(-4px);
}
.feature-card .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.feature-card .feature-icon svg {
    width: 24px;
    height: 24px;
}
.feature-card .feature-icon.sky { background: #f0f9ff; color: #0ea5e9; }
.feature-card .feature-icon.emerald { background: #ecfdf5; color: #10b981; }
.feature-card .feature-icon.violet { background: #f5f3ff; color: #8b5cf6; }
.feature-card .feature-icon.amber-icon { background: #fffbeb; color: #f59e0b; }
.feature-card .feature-icon.rose { background: #fff1f2; color: #f43f5e; }
.feature-card .feature-icon.teal { background: #f0fdfa; color: #14b8a6; }
.feature-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}
.feature-card p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

/* Landing Roles */
.landing-roles {
    padding: 80px 48px;
}
.landing-roles-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}


/* ─── Login Modal Overlays ───────────────────────────── */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeInUp 0.3s ease;
}
.login-modal-overlay.active {
    display: flex;
}
.login-modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
    z-index: 1;
}
.login-modal-close:hover {
    background: #f8fafc;
    color: #0f172a;
}
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* ─── New Animations ─────────────────────────────────── */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ─── App Shell ──────────────────────────────────────── */
.app-container {
    display: none;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.app-container.admin-mode {
    flex-direction: column !important;
}
.app-container.admin-mode .dashboard-sidebar {
    display: flex !important;
}
.app-container.admin-mode .dashboard-main-area {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.app-container:not(.admin-mode) .dashboard-sidebar {
    display: none !important;
}
.app-container:not(.admin-mode) .dashboard-main-area {
    margin-left: 0 !important;
}

/* ─── Header ─────────────────────────────────────────── */
.app-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.brand-text h1 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-text span {
    font-size: 10px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.flag-id {
    display: inline-block;
    width: 12px;
    height: 8px;
    background: linear-gradient(180deg, #dc2626 50%, #fff 50%);
    border: 1px solid var(--border);
    border-radius: 1px;
}

/* ─── Nav Tabs ───────────────────────────────────────── */
.view-tabs {
    display: flex;
    gap: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.tab-btn {
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 5px 14px;
    cursor: pointer;
    transition: color 0.12s, background 0.12s;
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-1); background: rgba(0,0,0,0.03); }

.tab-btn.active {
    background: var(--surface);
    color: var(--teal);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

/* ─── Header Controls ────────────────────────────────── */
.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sys-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #065f46;
    background: var(--green-light);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

.status-dot.disconnected { background: var(--red); }
.status-dot.processing   { background: var(--amber); animation: pulse 1.2s infinite; }

/* ─── Main Workspace ─────────────────────────────────── */
.main-workspace {
    flex: 1;
    height: calc(100vh - 56px);
    min-height: 0;
    overflow: hidden;
    padding: 14px 16px;
    display: flex;       /* fallback for solo panels */
    flex-direction: column;
}

.split-layout {
    display: grid !important;
    grid-template-columns: 320px 1fr;
    gap: 14px;
    align-items: stretch;
}

/* Solo-panel views (booth or nakes tab) */
.main-workspace:not(.split-layout) #booth-view-panel,
.main-workspace:not(.split-layout) #nakes-dashboard-panel {
    flex: 1;
    height: 100%;
}
.main-workspace:not(.split-layout) #split-left-side {
    flex: 1;
    width: 100%;
    max-width: 840px;
    margin: 0 auto;
}

/* ─── Side Panel (Booth) ─────────────────────────────── */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    overflow: hidden;
}

/* ─── Dashboard Right Panel ──────────────────────────── */
.dashboard-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

/* ─── Panel Shared ───────────────────────────────────── */
.glass-panel {
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(14, 165, 233, 0.14);
    box-shadow: 0 10px 30px rgba(9, 18, 37, 0.03), 0 1px 8px rgba(9, 18, 37, 0.01);
    border-radius: var(--radius-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: #fafbfc;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-shrink: 0;
}

.card-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-body {
    flex: 1;
    overflow: hidden;
    padding: 14px;
}

/* ─── Patient Feed ───────────────────────────────────── */
.patient-feed-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    height: 100%;
    overflow: hidden;
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    padding-right: 2px;
}

/* Patient card */
.patient-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-left-color: var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.1s;
}

.patient-card:hover { background: #fafbfc; transform: translateX(1px); }

.patient-card.active         { background: var(--teal-light); border-color: var(--teal-border); border-left-color: var(--teal); }
.patient-card.CRITICAL       { border-left-color: var(--red); }
.patient-card.CRITICAL.active{ background: var(--red-light); border-color: var(--red-border); }
.patient-card.WARNING        { border-left-color: var(--amber); }
.patient-card.WARNING.active { background: var(--amber-light); border-color: var(--amber-border); }
.patient-card.NORMAL         { border-left-color: var(--green); }
.patient-card.NORMAL.active  { background: var(--green-light); border-color: var(--green-border); }
.patient-card.PENDING_ACC       { border-left-color: var(--amber); }
.patient-card.PENDING_ACC.active{ background: var(--amber-light); border-color: var(--amber-border); }
.patient-card.BELUM_DIPERIKSA   { border-left-color: #3b82f6; }
.patient-card.BELUM_DIPERIKSA.active{ background: rgba(59, 130, 246, 0.05); border-color: rgba(59, 130, 246, 0.2); }

.patient-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3px;
}

.patient-name { font-weight: 600; font-size: 13px; color: var(--text-1); }

.patient-priority-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.patient-priority-badge.CRITICAL { background: var(--red-light);   color: var(--red);   border: 1px solid var(--red-border);   }
.patient-priority-badge.WARNING  { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.patient-priority-badge.NORMAL   { background: var(--green-light); color: var(--green); border: 1px solid var(--green-border); }
.patient-priority-badge.PENDING_ACC { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.patient-priority-badge.BELUM_DIPERIKSA { background: rgba(59, 130, 246, 0.1); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.2); }

.patient-meta { font-size: 11px; color: var(--text-2); margin-bottom: 3px; }
.patient-time { font-size: 10px; color: var(--text-3); }

/* Filter chips */
.preset-chip {
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.preset-chip:hover   { background: var(--bg); }
.preset-chip.active  { background: var(--bg); color: var(--text-1); font-weight: 600; }

/* ─── Detail Panel ───────────────────────────────────── */
.detail-right-col {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 12px;
    overflow: hidden;
    height: 100%;
}

.detail-view {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 2px;
}

/* Detail header strip */
.detail-header-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Profile section */
.section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.patient-profile-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.profile-item { display: flex; flex-direction: column; gap: 2px; }

.profile-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.profile-value { font-size: 12px; font-weight: 500; color: var(--text-1); }

/* Vitals */
.vitals-grid {
    display: grid;
    grid-template-columns: 1fr; /* Custom: single column since only Suhu is active */
    gap: 8px;
}

.vital-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}

.vital-card.ALERT { background: var(--red-light); border-color: var(--red-border); }

.vital-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
}

.vital-icon.heart { background: #fff1f2; color: #f43f5e; }
.vital-icon.heart svg { animation: heartBeat 1s infinite ease-in-out; }
.vital-icon.spo2  { background: #eff6ff; color: #2563eb; }
.vital-icon.temp  { background: #fffbeb; color: #d97706; }

.vital-val  { font-size: 18px; font-weight: 700; color: var(--text-1); line-height: 1; }
.vital-unit { font-size: 10px; color: var(--text-2); }
.vital-lbl  { font-size: 9px;  color: var(--text-3); font-weight: 600; text-transform: uppercase; }

/* Thermal panel */
.thermal-panel { padding: 14px; }

.thermal-display-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
}

.thermal-image-wrapper {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.thermal-stats-table {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
}

.table-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 4px;
    align-items: center;
}

.table-row.th {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.table-row:not(.th) { background: #f9fafb; border: 1px solid var(--border-soft); }
.table-row:not(.th):hover { background: #f3f4f6; }

.asym-val           { font-weight: 600; }
.asym-val.critical  { color: var(--red);   font-weight: 700; }
.asym-val.warning   { color: var(--amber); font-weight: 700; }

/* Clinical summary */
.clinical-summary-box {
    background: var(--green-light);
    border: 1px solid var(--green-border);
    border-radius: var(--radius);
    padding: 12px 14px;
    position: relative;
}

.clinical-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--teal);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.clinical-content {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-1);
}

/* Also keep .gemini-* aliases for app.js compatibility */
.gemini-summary-box  { background: var(--green-light); border: 1px solid var(--green-border); border-radius: var(--radius); padding: 12px 14px; }
.gemini-badge        { display: inline-flex; align-items: center; gap: 4px; background: var(--teal); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; position: absolute; top: 12px; right: 14px; }
.gemini-content      { font-size: 12px; line-height: 1.55; color: var(--text-1); margin-top: 6px; }

/* Action buttons */
.nakes-actions { display: flex; gap: 10px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px; /* Rounded pill buttons */
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex: 1;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
    color: #fff !important;
    border: none;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
}
.btn-primary:hover {
    transform: translateY(-1.5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}
.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.65) !important;
    color: var(--text-1) !important;
    border: 1px solid rgba(14, 165, 233, 0.2) !important;
    backdrop-filter: blur(8px);
}
.btn-outline:hover {
    background: #ffffff !important;
    border-color: #0ea5e9 !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.08);
}
.btn-outline:active {
    transform: translateY(0);
}

/* History panel */
.history-panel {
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    overflow-y: auto;
    height: 100%;
}

/* ─── Booth Panel ────────────────────────────────────── */
.booth-mirror-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.booth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-soft);
    background: #fafbfc;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-shrink: 0;
}

.booth-lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
}

.booth-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--green-light);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.booth-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    text-align: center;
    overflow-y: auto;
}

/* Booth states */
.booth-state-panel         { display: none; flex-direction: column; align-items: center; width: 100%; }
.booth-state-panel.active  { display: flex; }

.scanner-frame {
    width: 56px;
    height: 56px;
    border: 1px dashed var(--teal-border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: var(--teal-light);
    position: relative;
    overflow: hidden;
}

.scanner-frame::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: var(--teal);
    top: 0;
    animation: scanLine 2.5s ease-in-out infinite;
}

.booth-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 6px;
}

.booth-instruction {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
    max-width: 260px;
}

.booth-anim-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    border-top-color: var(--teal);
    animation: spin 0.9s linear infinite;
    margin-bottom: 14px;
}

.booth-vitals-display {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    width: 100%;
    justify-content: center;
}

.booth-vital-bubble {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    text-align: center;
    flex: 1;
    max-width: 140px;
}

.booth-vital-bubble span   { display: block; font-size: 9px; color: var(--text-3); margin-bottom: 2px; }
.booth-vital-bubble strong { display: block; font-size: 15px; font-weight: 700; color: var(--teal); }

.booth-audio-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-3);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    margin-top: 14px;
}

.audio-bars { display: flex; align-items: center; gap: 2px; height: 10px; }
.audio-bar  { width: 2px; height: 10px; background: var(--teal); border-radius: 1px; animation: audioWave 1.2s ease-in-out infinite; }
.audio-bar:nth-child(2) { height: 6px; animation-delay: 0.2s; }
.audio-bar:nth-child(3) { height: 8px; animation-delay: 0.4s; }

/* ─── Form inputs (registration drawer) ─────────────── */
.sim-form-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.sim-input, .sim-select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    padding: 7px 10px;
    font-family: inherit;
    font-size: 12px;
    outline: none;
    transition: border-color 0.12s;
}

.sim-input:focus, .sim-select:focus { border-color: var(--teal); }

/* ─── Empty placeholder ──────────────────────────────── */
.empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    color: var(--text-3);
    gap: 8px;
    text-align: center;
    padding: 24px;
    font-size: 12px;
}

.empty-placeholder svg { width: 28px; height: 28px; stroke: var(--text-3); }

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #dde1e7; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c5ccd5; }

/* ─── Animations ─────────────────────────────────────── */
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes pulse     { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes scanLine  { 0% { top:0; } 50% { top:100%; } 100% { top:0; } }
@keyframes audioWave { 0%,100% { transform:scaleY(1); } 50% { transform:scaleY(2); } }
@keyframes heartBeat {
    0%   { transform: scale(1); }
    15%  { transform: scale(1.15); }
    30%  { transform: scale(1); }
    45%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ─── Modal Overlay ─────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

/* --- Pulse animation for AI mic --- */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* ─── Visual Foot Scanner UI Styles ──────────────────── */
.camera-stream-wrapper::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    z-index: 10;
    opacity: 0.8;
    display: none;
}
.camera-stream-wrapper.streaming::before {
    display: block;
    animation: pulse 1s infinite;
}
.pred-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 500;
}
.pred-badge.ulcer {
    border-left: 3px solid var(--red);
    color: var(--red);
    background: var(--red-light);
}
.pred-badge.callus {
    border-left: 3px solid var(--amber);
    color: var(--amber);
    background: var(--amber-light);
}

/* --- Print rules --- */
@media print {
    body * {
        visibility: hidden;
    }
    #referral-modal, #referral-modal *, #referral-letter-content, #referral-letter-content * {
        visibility: visible;
    }
    #referral-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        background: white !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .no-print {
        display: none !important;
    }
    .printable-area {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
}

/* ─── State Management (CSS Driven) ─────────────────── */
body.show-app #landing-page {
    display: none !important;
}
body.show-app .app-container {
    display: flex !important;
}

body:not(.show-app) #landing-page {
    display: block !important;
}
body:not(.show-app) .app-container {
    display: none !important;
}

/* ─── Scanner Mockup Hero Elements ─── */
.scanner-laser-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2dd4bf, transparent);
    animation: mockScan 3s ease-in-out infinite;
    z-index: 2;
    box-shadow: 0 0 12px #2dd4bf;
}
@keyframes mockScan {
    0%, 100% { top: 0%; }
    50% { top: 100%; }
}
.live-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.live-status-dot.online {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: softPulse 2s infinite;
}
.live-status-dot.active {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: softPulse 1.2s infinite;
}
@keyframes softPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* ─── How it works timeline progress styles ─── */
.step-number.active {
    background: linear-gradient(135deg, #0ea5e9, #14b8a6) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.4);
}

/* ─── Interactive Foot Silhouette and Thermal points ─── */
.foot-silhouette {
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.foot-silhouette:hover {
    transform: scale(1.05);
}
.thermal-point {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.thermal-point:hover {
    transform: scale(1.3);
    box-shadow: 0 0 12px currentColor;
}



