/* AKESO AKJD Hair Assessment App — Executive Dossier theme */
:root {
    --background: 50 19% 91%;
    --foreground: 199 49% 19%;
    --card: 45 33% 98%;
    --card-foreground: 199 49% 19%;
    --popover: 45 33% 98%;
    --popover-foreground: 199 49% 19%;
    --primary: 198 49% 19%;
    --primary-foreground: 43 41% 94%;
    --secondary: 156 20% 92%;
    --secondary-foreground: 190 29% 31%;
    --muted: 60 11% 94%;
    --muted-foreground: 185 10% 46%;
    --accent: 40 38% 84%;
    --accent-foreground: 35 45% 31%;
    --destructive: 0 59% 47%;
    --destructive-foreground: 0 0% 100%;
    --border: 110 8% 84%;
    --input: 110 8% 82%;
    --ring: 38 37% 54%;
    --radius: 0.85rem;
    --akeso-navy: #142d3b;
    --akeso-ink: #183747;
    --akeso-brass: #C0B37C;
    --akeso-paper: #fbfaf6;
    --akeso-canvas: #e9e7de;
}

.dark {
    --background: 25 15% 10%;
    --foreground: 40 20% 92%;
    --card: 25 18% 13%;
    --card-foreground: 40 20% 92%;
    --popover: 25 18% 13%;
    --popover-foreground: 40 20% 92%;
    --primary: 48 32% 52%;
    --primary-foreground: 40 25% 98%;
    --secondary: 165 25% 25%;
    --secondary-foreground: 165 30% 85%;
    --muted: 25 12% 20%;
    --muted-foreground: 30 8% 58%;
    --accent: 45 20% 24%;
    --accent-foreground: 40 20% 92%;
    --destructive: 0 55% 45%;
    --destructive-foreground: 0 0% 100%;
    --border: 25 12% 22%;
    --input: 25 12% 22%;
    --ring: 48 32% 52%;
}

/* Base */
* { box-sizing: border-box; }
body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    margin: 0;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    -webkit-font-smoothing: antialiased;
}

img { image-orientation: from-image; }
.site-logo-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.site-logo-custom-frame,
.akeso-brand-mark.site-logo-custom-frame,
.patients-brand-mark.site-logo-custom-frame,
.login-brand-mark.site-logo-custom-frame {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

button, a, input, select, textarea {
    transition: border-color .18s ease, background-color .18s ease, color .18s ease,
        box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(192, 179, 124, .34);
    outline-offset: 2px;
}

.akeso-display {
    font-family: 'Space Grotesk', 'DM Sans', sans-serif;
    letter-spacing: -.045em;
}

.akeso-app-shell {
    display: flex;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 72% -8%, rgba(192, 179, 124, .18), transparent 28rem),
        var(--akeso-canvas);
}

.akeso-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    width: 236px;
    height: 100dvh;
    flex: 0 0 236px;
    flex-direction: column;
    padding: 1.25rem 1rem;
    color: #e7ece6;
    background: var(--akeso-navy);
}

.akeso-brand-mark {
    position: relative;
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: .8rem;
    color: var(--akeso-navy);
    background: var(--akeso-brass);
    box-shadow: 0 8px 20px rgba(192, 179, 124, .3);
}

.akeso-brand-mark::before,
.akeso-brand-mark::after {
    position: absolute;
    width: 1.55rem;
    height: 1px;
    content: "";
    background: rgba(20, 45, 59, .72);
}
.akeso-brand-mark::before { transform: rotate(45deg); }
.akeso-brand-mark::after { transform: rotate(-45deg); }
.akeso-brand-mark--image::before,
.akeso-brand-mark--image::after { display: none; }

.akeso-side-label {
    margin: 2rem .75rem .55rem;
    color: #667f82;
    font-size: .56rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.akeso-side-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .7rem;
    margin: .12rem 0;
    padding: .68rem .75rem;
    border-radius: .75rem;
    color: #9aadaf;
    font-size: .75rem;
    font-weight: 600;
}
.akeso-side-link:hover { color: #eff0e8; background: rgba(255,255,255,.045); }
.akeso-side-link.is-active {
    color: #ead7ad;
    background: rgba(192, 179, 124, .18);
    box-shadow: inset 2px 0 0 var(--akeso-brass);
}
.akeso-side-link svg { width: 1rem; height: 1rem; color: #718b8d; }
.akeso-side-link.is-active svg { color: #d8ca96; }

.akeso-page { min-width: 0; flex: 1; }
.akeso-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 4.5rem;
    border-bottom: 1px solid #d7d9d2;
    background: rgba(244, 242, 235, .91);
    backdrop-filter: blur(18px);
}

.akeso-card {
    border: 1px solid #d9ddd6;
    border-radius: 1.25rem;
    background: var(--akeso-paper);
    box-shadow: 0 12px 24px rgba(24, 55, 71, .05);
}

.akeso-hero-card {
    position: relative;
    overflow: hidden;
    color: #f0eee6;
    background: #183b49;
    box-shadow: 0 18px 34px rgba(24, 55, 71, .13);
}
.akeso-hero-card::before,
.akeso-hero-card::after {
    position: absolute;
    border: 1px solid rgba(192, 179, 124, .2);
    border-radius: 999px;
    content: "";
}
.akeso-hero-card::before { width: 18rem; height: 18rem; right: -5rem; top: -6rem; }
.akeso-hero-card::after { width: 12rem; height: 12rem; right: -2rem; top: -3rem; }

.akeso-kicker {
    color: #8f8050;
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.akeso-stat {
    border: 1px solid #d9ddd6;
    border-radius: 1rem;
    background: var(--akeso-paper);
}
.akeso-stat.is-accent { border-color: rgba(185,150,91,.5); background: #f6efdf; }

.akeso-tabbar {
    border-bottom: 1px solid #ced4ce;
    background: transparent;
}
.akeso-tabbar .patient-section-tab {
    position: relative;
    border: 0;
    border-radius: 0;
    color: #7a8a8b;
    background: transparent !important;
    box-shadow: none !important;
}
.akeso-tabbar .patient-section-tab:hover { color: var(--akeso-ink); }
.akeso-tabbar .patient-section-tab[aria-selected="true"] { color: #897b4c !important; }
.akeso-tabbar .patient-section-tab[aria-selected="true"]::after {
    position: absolute;
    right: .75rem;
    bottom: -1px;
    left: .75rem;
    height: 2px;
    border-radius: 999px;
    content: "";
    background: var(--akeso-brass);
}

/* AI Analysis 2 uses restrained data accents so a complex workspace feels
   navigable without losing the clinical dossier tone. */
.ai2-workspace {
    background:
        radial-gradient(circle at 88% 0%, rgba(116, 92, 180, .12), transparent 24rem),
        radial-gradient(circle at 0% 58%, rgba(35, 150, 145, .08), transparent 22rem),
        #f1f0ea;
}
.ai2-content { position: relative; }
.ai2-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .75rem 1rem;
    padding: 1.25rem 1.35rem;
    color: #f8f4e9;
    border: 1px solid rgba(185,150,91,.38);
    border-radius: 1.15rem;
    background: linear-gradient(120deg, #173b4a 0%, #244657 58%, #5b477d 100%);
    box-shadow: 0 16px 30px rgba(24,55,71,.14);
}
.ai2-hero > p { grid-column: 2; margin-top: -.25rem; color: rgba(244,244,236,.75); }
.ai2-hero h2 { color: #fff8e8; }
.ai2-hero-mark {
    display: grid;
    width: 2.9rem;
    height: 2.9rem;
    place-items: center;
    border: 1px solid rgba(255,245,211,.45);
    border-radius: .9rem;
    color: #233e4d;
    background: #C0B37C;
    font-size: 1.5rem;
    box-shadow: 0 8px 18px rgba(0,0,0,.16);
}
.ai2-eyebrow {
    margin-bottom: .18rem;
    color: #d8ca96;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.ai2-alert {
    border: 1px solid #e9bd68;
    border-left: 4px solid #d88b37;
    border-radius: .9rem;
    background: linear-gradient(100deg, #fff3d5, #fff9ed);
    box-shadow: 0 8px 18px rgba(177,117,44,.08);
}
.ai2-card {
    position: relative;
    overflow: hidden;
    border-color: #d9ddd6;
    box-shadow: 0 10px 22px rgba(24,55,71,.055);
}
.ai2-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    content: "";
}
.ai2-card--run { background: linear-gradient(145deg, #fffdf9, #f4effb); }
.ai2-card--run::before { background: linear-gradient(90deg, #7657aa, #ae79c5); }
.ai2-card--params { background: linear-gradient(145deg, #fffefa, #eef8f6); }
.ai2-card--params::before { background: linear-gradient(90deg, #278f8c, #69b5a8); }
.ai2-card--compare { background: linear-gradient(145deg, #fffefa, #f1f7fa); }
.ai2-card--compare::before { background: linear-gradient(90deg, #287b9b, #68b8c1); }
.ai2-card--train { background: linear-gradient(145deg, #fffefa, #fff3e9); }
.ai2-card--train::before { background: linear-gradient(90deg, #d07b4c, #e8b25f); }
.ai2-section-heading { display: flex; align-items: center; gap: .55rem; }
.ai2-section-icon {
    display: inline-grid;
    width: 1.65rem;
    height: 1.65rem;
    place-items: center;
    border-radius: .55rem;
    color: #fff;
    background: #7657aa;
    font-size: .9rem;
    font-weight: 800;
}
.ai2-card--params .ai2-section-icon { background: #278f8c; }
.ai2-card--compare .ai2-section-icon { background: #287b9b; }
.ai2-card--train .ai2-section-icon { background: #d07b4c; }
.ai2-card input[type="number"]:focus,
.ai2-card select:focus { border-color: #7657aa; box-shadow: 0 0 0 3px rgba(118,87,170,.14); }
.ai2-card--params input[type="checkbox"] { accent-color: #278f8c; }
.ai2-run-button {
    border: 0;
    background: linear-gradient(100deg, #694c9e, #9871bf) !important;
    box-shadow: 0 8px 16px rgba(105,76,158,.22);
}
.ai2-run-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 11px 20px rgba(105,76,158,.28); }
.ai2-run-button:disabled { color: #8a837b; background: #ddd9d4 !important; box-shadow: none; }
.ai2-footer-note { border-color: #d9c8b9; background: rgba(255,248,238,.76); }
.ai2-result-card { border-left: 4px solid #7657aa; background: #faf7ff; }
@media (max-width: 640px) {
    .ai2-hero { grid-template-columns: auto 1fr; padding: 1rem; }
    .ai2-hero > p { grid-column: 1 / -1; margin-top: .1rem; }
}

/* Patients registry: a more welcoming, colorful front door to the dossier. */
.patients-page {
    background:
        radial-gradient(circle at 92% 4%, rgba(36, 145, 143, .13), transparent 25rem),
        radial-gradient(circle at 8% 28%, rgba(192, 179, 124, .2), transparent 22rem),
        #eeeee8 !important;
}
.patients-topbar {
    border-color: rgba(201, 215, 208, .28) !important;
    color: #f4f1e8;
    background: linear-gradient(105deg, #142d3b 0%, #1d4651 62%, #2b6d69 100%) !important;
    box-shadow: 0 8px 24px rgba(20,45,59,.16);
}
.patients-topbar .hover\:bg-accent:hover { background: rgba(255,255,255,.1) !important; }
.patients-brand-mark {
    border: 1px solid rgba(255,246,215,.45);
    color: #183747 !important;
    background: linear-gradient(145deg, #ddd3a6, #C0B37C) !important;
    box-shadow: 0 6px 16px rgba(185,150,91,.28);
}
.patients-brand-title { color: #fff9ea; }
.patients-brand-meta { color: rgba(239,241,229,.68) !important; }
.patients-page main { position: relative; }
.patients-page main::before {
    position: absolute;
    top: 1.8rem;
    right: 1rem;
    width: 9rem;
    height: 9rem;
    border: 1px solid rgba(43,109,105,.16);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}
.patients-kicker {
    margin-bottom: .3rem;
    color: #897b4c;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.patients-heading { color: #173b4a; }
.patients-action {
    border-radius: .7rem !important;
    box-shadow: 0 5px 12px rgba(24,55,71,.08);
}
.patients-action--primary {
    border: 0;
    background: linear-gradient(105deg, #9e9160, #C0B37C) !important;
    box-shadow: 0 7px 15px rgba(145,128,73,.24);
}
.patients-action--teal {
    border-color: #8bc4bb !important;
    color: #1e706d;
    background: #e5f5f0 !important;
}
.patients-action--outline {
    border-color: #b9c9c6 !important;
    color: #28636a;
    background: rgba(255,255,255,.7) !important;
}
.patients-crm-banner {
    border-color: #e2c175 !important;
    border-left: 4px solid #d7953e !important;
    background: linear-gradient(100deg, #fff3d7, #fffaf0) !important;
    box-shadow: 0 7px 16px rgba(187,130,48,.08);
}
.patients-crm-banner svg { color: #c67a2f; }
.patients-connect-button {
    border-color: #d2a958 !important;
    color: #8d6124;
    background: #fff8e9;
}
.patients-privacy {
    border-color: #bfd8d2 !important;
    color: #547577 !important;
    background: linear-gradient(100deg, #e8f5f1, #f7faf5) !important;
}
.patients-privacy .text-foreground { color: #28585c !important; }
.patients-search input {
    border-color: #c5d3ce !important;
    background: rgba(255,255,255,.78) !important;
    box-shadow: 0 6px 14px rgba(24,55,71,.045);
}
.patients-search input:focus {
    border-color: #4c9b92 !important;
    box-shadow: 0 0 0 3px rgba(76,155,146,.15);
}
.patient-card {
    position: relative;
    overflow: hidden;
    border-color: #d4ddd6 !important;
    background: linear-gradient(145deg, #fffdf9 0%, #f8fbf7 100%) !important;
    box-shadow: 0 8px 18px rgba(24,55,71,.055);
}
.patient-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    content: "";
    background: linear-gradient(90deg, #C0B37C, #4d9c93);
}
.patient-card:hover {
    border-color: #8ab9ad !important;
    box-shadow: 0 13px 24px rgba(24,55,71,.12);
    transform: translateY(-2px);
}
.patient-avatar {
    color: #275b63 !important;
    background: linear-gradient(145deg, #d8f0e9, #bbd8e0) !important;
}
.patient-card-name { color: #173b4a; }
.patient-exam-count { color: #4d7776 !important; }
.patient-source-badge {
    color: #356b68 !important;
    background: #dff1ea !important;
}
@media (max-width: 640px) {
    .patients-page main::before { display: none; }
    .patients-topbar .mx-auto { align-items: flex-start; }
    .patients-topbar .flex.items-center.gap-1 { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 1023px) {
    .akeso-sidebar { display: none; }
    .akeso-page { width: 100%; }
}

/* Login: the front door is intentionally distinct from the data workspace. */
.login-screen {
    display: grid;
    min-height: 100dvh;
    grid-template-columns: minmax(360px, .92fr) minmax(480px, 1.08fr);
    overflow: hidden;
    color: #183747;
    background: #f5f4ef;
}
.login-showcase {
    position: relative;
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4.8rem);
    color: #eef2e9;
    background:
        radial-gradient(circle at 18% 18%, rgba(68, 136, 137, .4), transparent 20rem),
        radial-gradient(circle at 100% 92%, rgba(192, 179, 124, .22), transparent 25rem),
        linear-gradient(145deg, #112d3b 0%, #183e4b 52%, #205b5c 100%);
}
.login-showcase-grid {
    position: absolute;
    inset: 0;
    opacity: .13;
    background-image: linear-gradient(rgba(231, 232, 215, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(231, 232, 215, .2) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(130deg, black, transparent 68%);
    pointer-events: none;
}
.login-orbit {
    position: absolute;
    border: 1px solid rgba(209, 203, 158, .24);
    border-radius: 50%;
    pointer-events: none;
}
.login-orbit--one { width: min(42vw, 40rem); aspect-ratio: 1; right: -21rem; top: 12%; }
.login-orbit--two { width: min(29vw, 28rem); aspect-ratio: 1; right: -12rem; top: 27%; border-color: rgba(209, 203, 158, .15); }
.login-brand, .login-showcase-copy, .login-signal, .login-showcase-footer { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: .85rem; }
.login-brand-mark {
    width: 3.15rem;
    height: 3.15rem;
    padding: .35rem;
    border: 1px solid rgba(242, 238, 211, .44);
    border-radius: 1rem;
    background: linear-gradient(145deg, #f0e9c7, #bdb276);
    box-shadow: 0 12px 24px rgba(5, 24, 32, .26);
}
.login-brand-name { margin: 0; color: #f4edcf; font-size: .84rem; font-weight: 800; letter-spacing: .22em; }
.login-brand-meta { margin: .22rem 0 0; color: rgba(235, 239, 227, .58); font-size: .59rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.login-showcase-copy { max-width: 36rem; margin: auto 0; padding: 4rem 0 4.4rem; }
.login-eyebrow { display: flex; align-items: center; gap: .5rem; margin: 0 0 1.35rem; color: #d6ca91; font-size: .66rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.login-eyebrow-dot { width: .42rem; height: .42rem; border-radius: 50%; background: #d6ca91; box-shadow: 0 0 0 .25rem rgba(214, 202, 145, .13); }
.login-showcase h1 { max-width: 28rem; margin: 0; color: #f4f0df; font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-size: clamp(2.55rem, 4.6vw, 4.6rem); font-weight: 600; letter-spacing: -.065em; line-height: .98; }
.login-showcase h1 em { color: #d6ca91; font-style: normal; }
.login-showcase-description { max-width: 25rem; margin: 1.55rem 0 0; color: rgba(231, 237, 229, .7); font-size: .9rem; line-height: 1.75; }
.login-signal { display: flex; align-items: center; max-width: 31rem; gap: .8rem; padding: 1rem 0; border-top: 1px solid rgba(232, 236, 222, .18); border-bottom: 1px solid rgba(232, 236, 222, .18); }
.login-signal-item { display: flex; align-items: center; min-width: 0; gap: .58rem; }
.login-signal-icon { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid rgba(214, 202, 145, .42); border-radius: .65rem; color: #d6ca91; background: rgba(10, 35, 45, .2); }
.login-signal-icon svg { width: 1.05rem; height: 1.05rem; }
.login-signal-item strong, .login-signal-item small { display: block; }
.login-signal-item strong { color: rgba(232, 238, 225, .5); font-size: .54rem; letter-spacing: .12em; }
.login-signal-item small { margin-top: .2rem; color: #edf0e5; font-size: .68rem; font-weight: 700; letter-spacing: .02em; }
.login-signal-line { width: 1.8rem; height: 1px; background: rgba(232, 236, 222, .22); }
.login-showcase-footer { display: flex; align-items: center; gap: .7rem; color: rgba(227, 233, 222, .48); font-size: .56rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.login-footer-rule { width: 2.4rem; height: 1px; background: rgba(214, 202, 145, .48); }
.login-panel { display: flex; align-items: center; justify-content: center; min-width: 0; padding: clamp(1.5rem, 5vw, 5rem); background: #f5f4ef; }
.login-panel-inner { width: min(100%, 31rem); }
.login-panel-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: clamp(3rem, 8vh, 6.5rem); }
.login-secure-badge { display: inline-flex; align-items: center; gap: .45rem; color: #4c7775; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.login-secure-badge svg { width: 1rem; height: 1rem; }
.login-panel-version { color: #a4aaa1; font-size: .61rem; font-weight: 700; letter-spacing: .12em; }
.login-heading { margin-bottom: 2.15rem; }
.login-panel-kicker { margin: 0 0 .65rem; color: #9a8750; font-size: .66rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.login-heading h2 { margin: 0; color: #183747; font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-size: clamp(1.8rem, 3vw, 2.35rem); font-weight: 600; letter-spacing: -.05em; line-height: 1.05; }
.login-heading p:last-child { margin: .75rem 0 0; color: #74888a; font-size: .83rem; line-height: 1.6; }
.login-alert { display: flex; align-items: flex-start; gap: .75rem; margin: 0 0 1.25rem; padding: .9rem 1rem; border-radius: .8rem; font-size: .74rem; line-height: 1.5; }
.login-alert--error { border: 1px solid #e7c7c0; background: #fff4f1; color: #9d4c42; }
.login-alert--success { border: 1px solid #bbd9c9; background: #f0faf3; color: #367258; }
.login-alert-icon { display: grid; width: 1.3rem; height: 1.3rem; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: currentColor; font-size: .67rem; font-weight: 800; }
.login-alert--error .login-alert-icon { color: #c36759; }
.login-alert--success .login-alert-icon { color: #57a079; }
.login-alert strong { display: block; margin-bottom: .16rem; color: inherit; font-size: .75rem; }
.login-alert p { margin: 0; }
.login-alert strong + p { margin-top: .1rem; }
.login-form { display: grid; gap: 1.35rem; }
.login-field { display: grid; gap: .52rem; }
.login-field--hidden { display: none; }
.login-field label { color: #32565f; font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.login-label-row { display: flex; align-items: center; justify-content: space-between; }
.login-label-hint { color: #a3aaa2; font-size: .59rem; font-weight: 700; letter-spacing: .04em; }
.login-input-wrap { position: relative; }
.login-input-icon { position: absolute; top: 50%; left: 1rem; width: 1rem; height: 1rem; color: #91a4a1; transform: translateY(-50%); pointer-events: none; }
.login-field input {
    width: 100%;
    height: 3.35rem;
    padding: 0 1rem 0 2.85rem;
    border: 1px solid #d7ddd6;
    border-radius: .78rem;
    outline: none;
    color: #183747;
    background: rgba(255, 255, 253, .74);
    box-shadow: 0 5px 15px rgba(24, 55, 71, .025);
    font: inherit;
    font-size: .82rem;
}
.login-field input::placeholder { color: #aeb8b3; }
.login-field input:hover { border-color: #bacbc5; }
.login-field input:focus { border-color: #4c9b92; box-shadow: 0 0 0 4px rgba(76, 155, 146, .12), 0 8px 18px rgba(24, 55, 71, .05); }
.login-password-toggle { position: absolute; top: 50%; right: .75rem; display: grid; width: 2rem; height: 2rem; place-items: center; padding: 0; border: 0; border-radius: .5rem; color: #809592; background: transparent; transform: translateY(-50%); cursor: pointer; }
.login-password-toggle:hover { color: #245d63; background: #eaf3ef; }
.login-password-toggle svg { width: 1.05rem; height: 1.05rem; }
.login-field input:has(+ .login-password-toggle) { padding-right: 3rem; }
.login-submit { display: flex; width: 100%; height: 3.45rem; align-items: center; justify-content: center; gap: .7rem; margin-top: .35rem; border: 0; border-radius: .8rem; color: #f8f4e7; background: linear-gradient(105deg, #183b4a, #276d6b); box-shadow: 0 10px 18px rgba(24, 59, 74, .17); cursor: pointer; font: inherit; font-size: .76rem; font-weight: 800; letter-spacing: .04em; }
.login-submit svg { width: 1rem; height: 1rem; transition: transform .18s ease; }
.login-submit:hover { background: linear-gradient(105deg, #143342, #23605e); box-shadow: 0 13px 23px rgba(24, 59, 74, .22); transform: translateY(-1px); }
.login-submit:hover svg { transform: translateX(3px); }
.login-submit:active { transform: translateY(0); }
.login-recovery { margin-top: 1.5rem; padding: 1rem; border: 1px solid #e6cd9f; border-radius: .8rem; background: #fff9eb; }
.login-recovery-heading { display: flex; gap: .65rem; }
.login-recovery-icon { display: grid; width: 1.2rem; height: 1.2rem; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #c18c3f; font-size: .68rem; font-weight: 800; }
.login-recovery strong { display: block; color: #76551f; font-size: .72rem; }
.login-recovery p { margin: .25rem 0 0; color: #9b7946; font-size: .68rem; line-height: 1.5; }
.login-recovery form { margin-top: .8rem; }
.login-recovery-button { width: 100%; padding: .65rem .75rem; border: 1px solid #d9b56f; border-radius: .6rem; color: #815f28; background: transparent; cursor: pointer; font: inherit; font-size: .67rem; font-weight: 800; }
.login-recovery-button:hover { background: rgba(255, 255, 255, .7); }
.login-recovery-button span { margin-left: .3rem; font-size: .85rem; }
.login-privacy { display: flex; align-items: center; justify-content: center; gap: .42rem; margin: 2.25rem 0 0; color: #9da9a2; font-size: .62rem; }
.login-privacy svg { width: .9rem; height: .9rem; color: #6e9c91; }
@media (max-width: 900px) {
    .login-screen { grid-template-columns: 1fr; }
    .login-showcase { min-height: auto; padding: 1.75rem clamp(1.4rem, 6vw, 3rem) 2rem; }
    .login-showcase-copy { margin: 3.7rem 0 2.3rem; padding: 0; }
    .login-showcase h1 { font-size: clamp(2.35rem, 8vw, 3.7rem); }
    .login-showcase-description { margin-top: 1rem; }
    .login-signal { max-width: 29rem; }
    .login-showcase-footer { display: none; }
    .login-orbit--one { width: 28rem; right: -16rem; top: 2rem; }
    .login-orbit--two { width: 20rem; right: -9rem; top: 7rem; }
    .login-panel { align-items: flex-start; padding: 2.4rem clamp(1.4rem, 6vw, 3rem) 3rem; }
    .login-panel-topline { margin-bottom: 3.6rem; }
}
@media (max-width: 480px) {
    .login-brand-mark { width: 2.7rem; height: 2.7rem; }
    .login-brand-name { font-size: .76rem; }
    .login-showcase-copy { margin-top: 3rem; }
    .login-showcase h1 { font-size: 2.7rem; }
    .login-showcase-description { max-width: 19rem; font-size: .8rem; }
    .login-signal { gap: .45rem; }
    .login-signal-line { width: 1rem; }
    .login-signal-icon { width: 1.8rem; height: 1.8rem; }
    .login-signal-item small { font-size: .61rem; }
    .login-panel-topline { margin-bottom: 2.7rem; }
    .login-heading h2 { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
    .login-submit, .login-submit svg, .login-password-toggle { transition: none; }
}

/* Examination editor: the clinical workflow lives in a left rail on desktop.
   The existing .tab-btn hooks remain unchanged so permissions, deep links,
   voice commands, and the tab switching script continue to work. */
.exam-workspace {
    display: flex;
    min-height: 0;
    flex: 1 1 0%;
    overflow: hidden;
}
.exam-tab-rail {
    display: flex;
    width: 220px;
    flex: 0 0 220px;
    flex-direction: column;
}
.exam-tab-rail .tab-btn {
    width: 100%;
    justify-content: flex-start;
    border: 0 !important;
    border-left: 2px solid transparent !important;
    border-radius: .65rem;
    color: #8fa6a6 !important;
    background: transparent !important;
    text-align: left;
}
.exam-tab-rail .tab-btn svg { color: #718c8d; flex: 0 0 auto; }
.exam-tab-rail .tab-btn:hover {
    color: #f1eee4 !important;
    background: rgba(255,255,255,.06) !important;
}
.exam-tab-rail .tab-btn.border-primary {
    border-left-color: var(--akeso-brass) !important;
    color: #efd9a6 !important;
    background: rgba(216,195,154,.14) !important;
}
.exam-tab-rail .tab-btn.border-primary svg { color: #d5b675; }
.exam-panel-stage {
    min-width: 0;
    flex: 1 1 0%;
    overflow: hidden;
    background: #f3f2ec;
}
.exam-panel-stage > .tab-panel > div { max-width: 1100px; }

@media (max-width: 767px) {
    .exam-editor > div:first-child {
        flex-wrap: wrap !important;
        height: auto;
    }
    .exam-editor > div:first-child > div:nth-child(2) {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }
    .exam-workspace {
        display: block !important;
        min-height: 0;
        overflow: auto !important;
    }
    .exam-tab-rail {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        flex: none !important;
        height: auto;
        padding: .6rem .75rem;
        border-right: 0;
        border-bottom: 1px solid #d7d9d2;
    }
    .exam-tab-rail > div:first-child,
    .exam-tab-rail > div:last-child { display: none; }
    .exam-tab-rail > div:nth-child(2) {
        display: flex !important;
        flex-direction: row !important;
        width: 100%;
        min-width: max-content;
        overflow-x: auto;
    }
    .exam-tab-rail .tab-btn {
        width: auto;
        border-left: 0 !important;
        border-bottom: 2px solid transparent !important;
        white-space: nowrap;
    }
    .exam-tab-rail .tab-btn.border-primary {
        border-bottom-color: var(--akeso-brass) !important;
    }
    .exam-panel-stage {
        display: block !important;
        width: 100% !important;
        height: calc(100dvh - 148px);
        min-height: 500px;
    }
}

/* Thin scrollbar */
.thin-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scroll::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.35); border-radius: 4px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }

/* Marker pop animation */
@keyframes marker-pop {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* Print styles */
@media print {
    body { background: white !important; }
    .print\:hidden { display: none !important; }
    .print\:block { display: block !important; }
    .print\:break-before-page { break-before: page; }
    .print\:shadow-none { box-shadow: none !important; }
    main { max-width: 100% !important; padding: 0 !important; }
    table { font-size: 9pt !important; }
    @page { margin: 1.5cm; }
}

/* Login: instrument-panel arrival screen. Kept scoped so the authenticated
   workspace retains its existing dossier language. */
.akeso-login {
    --login-navy: #142d3b;
    --login-ink: #183747;
    --login-teal: #2d7774;
    --login-brass: #c0b37c;
    --login-paper: #fbfaf6;
    --login-canvas: #ecebe3;
    display: grid;
    grid-template-columns: minmax(360px, .88fr) minmax(460px, 1.12fr);
    overflow: hidden;
    color: var(--login-ink);
    background: var(--login-canvas);
}

.akeso-login-intro {
    position: relative;
    isolation: isolate;
    min-height: 100dvh;
    overflow: hidden;
    color: #f5f1e7;
    background:
        radial-gradient(circle at 86% 25%, rgba(74, 143, 135, .18), transparent 19rem),
        radial-gradient(circle at 20% 92%, rgba(192, 179, 124, .12), transparent 22rem),
        var(--login-navy);
}
.akeso-login-intro::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .27;
    content: "";
    background-image: linear-gradient(rgba(194, 215, 207, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(194, 215, 207, .08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.akeso-login-intro::after {
    position: absolute;
    z-index: -1;
    right: -18rem;
    bottom: -18rem;
    width: 40rem;
    height: 40rem;
    border: 1px solid rgba(192, 179, 124, .16);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 5rem rgba(192, 179, 124, .035), 0 0 0 11rem rgba(192, 179, 124, .025);
}
.akeso-login-intro-inner {
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
    justify-content: space-between;
    max-width: 700px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4.5rem);
}
.akeso-login-brand {
    display: flex;
    align-items: center;
    gap: .8rem;
}
.akeso-login-logo {
    width: 3rem;
    height: 3rem;
    border-radius: .85rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.akeso-login-brand-name {
    margin: 0;
    color: #f5efd9;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .25em;
}
.akeso-login-brand-subtitle {
    margin: .18rem 0 0;
    color: rgba(220, 229, 219, .62);
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.akeso-login-intro-copy {
    max-width: 33rem;
    margin-top: clamp(2.4rem, 10vh, 8rem);
}
.akeso-login-eyebrow {
    margin: 0 0 1rem;
    color: var(--login-teal);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .19em;
    text-transform: uppercase;
}
.akeso-login-intro .akeso-login-eyebrow {
    color: #c8bb83;
}
.akeso-login-intro h1 {
    margin: 0;
    color: #f6f2e8;
    font-family: 'Space Grotesk', 'DM Sans', sans-serif;
    font-size: clamp(2.6rem, 4.7vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -.065em;
    line-height: .99;
}
.akeso-login-intro h1 em {
    color: #d6c98f;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
}
.akeso-login-lede {
    max-width: 28rem;
    margin: 1.6rem 0 0;
    color: rgba(229, 236, 226, .7);
    font-size: .96rem;
    line-height: 1.7;
}
.akeso-login-instrument {
    display: flex;
    max-width: 29rem;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: clamp(2rem, 9vh, 7rem);
}
.akeso-scan-graphic {
    position: relative;
    width: clamp(9rem, 16vw, 13rem);
    aspect-ratio: 1;
    border: 1px solid rgba(192, 179, 124, .36);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(64, 131, 124, .2), transparent 59%);
}
.akeso-scan-graphic::before,
.akeso-scan-graphic::after {
    position: absolute;
    content: "";
    background: rgba(192, 179, 124, .5);
}
.akeso-scan-graphic::before {
    top: 50%;
    right: 8%;
    left: 8%;
    height: 1px;
}
.akeso-scan-graphic::after {
    top: 8%;
    bottom: 8%;
    left: 50%;
    width: 1px;
}
.akeso-scan-ring {
    position: absolute;
    border: 1px solid rgba(100, 177, 164, .55);
    border-radius: 50%;
}
.akeso-scan-ring-one { inset: 18%; }
.akeso-scan-ring-two { inset: 36%; border-color: rgba(192, 179, 124, .55); }
.akeso-scan-crosshair {
    position: absolute;
    top: 47%;
    left: 47%;
    width: 6%;
    aspect-ratio: 1;
    border: 1px solid #d8ca96;
    border-radius: 50%;
    background: var(--login-navy);
}
.akeso-scan-line {
    position: absolute;
    height: 1px;
    transform-origin: left center;
    background: #d8ca96;
}
.akeso-scan-line-one { top: 27%; left: 55%; width: 42%; transform: rotate(28deg); }
.akeso-scan-line-two { top: 73%; left: 29%; width: 33%; transform: rotate(-34deg); }
.akeso-scan-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d8ca96;
    box-shadow: 0 0 0 4px rgba(192, 179, 124, .12);
}
.akeso-scan-dot-one { top: 23%; right: 7%; }
.akeso-scan-dot-two { bottom: 21%; left: 25%; background: #6fb2a4; }
.akeso-login-instrument-meta {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .45rem;
    padding-bottom: .25rem;
    color: rgba(218, 228, 218, .52);
    font-family: 'Space Grotesk', monospace;
    font-size: .57rem;
    letter-spacing: .13em;
    line-height: 1.6;
    text-transform: uppercase;
}
.akeso-login-instrument-meta span:first-child { color: #d8ca96; }
.akeso-login-trust {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 2rem;
    color: rgba(218, 228, 218, .58);
    font-size: .68rem;
    letter-spacing: .03em;
}
.akeso-login-trust-mark {
    display: inline-block;
    width: .48rem;
    height: .48rem;
    border: 1px solid #9ebcad;
    border-radius: 50%;
    background: #5da398;
    box-shadow: 0 0 0 4px rgba(93, 163, 152, .12);
}

.akeso-login-panel {
    display: flex;
    min-width: 0;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 6rem);
    background:
        radial-gradient(circle at 15% 82%, rgba(192, 179, 124, .12), transparent 25rem),
        var(--login-canvas);
}
.akeso-login-panel-inner { width: min(100%, 34rem); }
.akeso-login-mobile-brand { display: none; }
.akeso-login-heading { margin-bottom: 2rem; }
.akeso-login-heading .akeso-login-eyebrow { margin-bottom: .8rem; }
.akeso-login-heading h2 {
    margin: 0;
    color: var(--login-ink);
    font-family: 'Space Grotesk', 'DM Sans', sans-serif;
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 600;
    letter-spacing: -.055em;
    line-height: 1.04;
}
.akeso-login-heading > p:last-child {
    margin: .8rem 0 0;
    color: #657878;
    font-size: .88rem;
    line-height: 1.55;
}
.akeso-login-form {
    padding: clamp(1.4rem, 3vw, 2.1rem);
    border: 1px solid #d6ddd5;
    border-radius: 1.15rem;
    background: rgba(255, 254, 249, .76);
    box-shadow: 0 18px 40px rgba(24, 55, 71, .08), 0 2px 4px rgba(24, 55, 71, .04);
}
.akeso-login-field + .akeso-login-field { margin-top: 1.15rem; }
.akeso-login-field label,
.akeso-login-label-row label {
    display: block;
    color: #244b55;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.akeso-login-field input {
    display: block;
    width: 100%;
    min-height: 3.25rem;
    margin-top: .48rem;
    padding: .78rem .9rem;
    border: 1px solid #cbd8d0;
    border-radius: .65rem;
    outline: 0;
    color: var(--login-ink);
    background: #fffef9;
    font-family: 'DM Sans', sans-serif;
    font-size: .88rem;
    box-shadow: inset 0 1px 2px rgba(24, 55, 71, .025);
}
.akeso-login-field input::placeholder { color: #91a09b; }
.akeso-login-field input:hover { border-color: #9dbdb4; }
.akeso-login-field input:focus {
    border-color: var(--login-teal);
    box-shadow: 0 0 0 4px rgba(45, 119, 116, .13);
}
.akeso-login-field > span {
    display: block;
    margin-top: .42rem;
    color: #78908b;
    font-size: .68rem;
}
.akeso-login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}
.akeso-login-secure-label {
    color: #6b8c82;
    font-size: .63rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.akeso-login-secure-label span {
    display: inline-block;
    width: .38rem;
    height: .38rem;
    margin-right: .2rem;
    border-radius: 50%;
    background: #4f9a8c;
}
.akeso-login-submit,
.akeso-login-recovery-button {
    display: flex;
    width: 100%;
    min-height: 3.25rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding: .78rem 1rem .78rem 1.15rem;
    border: 1px solid transparent;
    border-radius: .65rem;
    color: #fbf8ed;
    background: var(--login-navy);
    font-family: 'DM Sans', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    cursor: pointer;
}
.akeso-login-submit:hover {
    background: #24505b;
    transform: translateY(-1px);
}
.akeso-login-submit:active { transform: translateY(0); }
.akeso-login-submit:focus-visible,
.akeso-login-recovery-button:focus-visible {
    outline: 3px solid rgba(45, 119, 116, .28);
    outline-offset: 3px;
}
.akeso-login-submit-arrow {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    border-radius: 50%;
    color: var(--login-navy);
    background: var(--login-brass);
    font-size: 1.1rem;
    line-height: 1;
}
.akeso-login-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.2rem;
    padding: .85rem .95rem;
    border-radius: .75rem;
    font-size: .75rem;
    line-height: 1.5;
}
.akeso-login-alert p { margin: 0; }
.akeso-login-alert p + p { margin-top: .2rem; }
.akeso-login-alert-title { margin-bottom: .2rem !important; font-weight: 700; }
.akeso-login-alert-icon {
    display: grid;
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 800;
}
.akeso-login-alert-error {
    border: 1px solid rgba(164, 78, 67, .28);
    color: #8a443d;
    background: #fbebe5;
}
.akeso-login-alert-error .akeso-login-alert-icon { color: #fff; background: #b15a4c; }
.akeso-login-alert-success {
    border: 1px solid rgba(72, 136, 107, .28);
    color: #396e5d;
    background: #eaf5ec;
}
.akeso-login-alert-success .akeso-login-alert-icon { color: #fff; background: #568d72; }
.akeso-login-recovery {
    margin-top: 1rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid rgba(184, 147, 72, .4);
    border-radius: .95rem;
    background: #f8f0df;
}
.akeso-login-recovery-heading {
    display: flex;
    align-items: center;
    gap: .7rem;
}
.akeso-login-recovery-icon {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border: 1px solid rgba(184, 147, 72, .55);
    border-radius: .5rem;
    color: #8b6e35;
    font-size: .95rem;
}
.akeso-login-recovery-heading p {
    margin: 0;
    color: #5f4a27;
    font-size: .78rem;
    font-weight: 700;
}
.akeso-login-recovery-heading span:last-child {
    display: block;
    margin-top: .12rem;
    color: #92784a;
    font-size: .62rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.akeso-login-recovery-copy {
    margin: .8rem 0 0;
    color: #755f38;
    font-size: .7rem;
    line-height: 1.55;
}
.akeso-login-recovery-button {
    min-height: 2.8rem;
    margin-top: .9rem;
    padding: .6rem .85rem  .6rem 1rem;
    border-color: #c7aa68;
    color: #715828;
    background: transparent;
    font-size: .7rem;
}
.akeso-login-recovery-button:hover { background: rgba(255, 253, 244, .64); }
.akeso-login-recovery-button span { font-size: 1rem; }
.akeso-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    margin-top: 2rem;
    color: #82918d;
    font-size: .63rem;
    letter-spacing: .05em;
}
.akeso-login-footer-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #b8c2bc;
}

@media (max-width: 820px) {
    .akeso-login { grid-template-columns: 1fr; }
    .akeso-login-intro { min-height: auto; }
    .akeso-login-intro-inner {
        min-height: auto;
        padding: 2rem clamp(1.35rem, 6vw, 3rem) 2.2rem;
    }
    .akeso-login-intro-copy { margin-top: 3.5rem; }
    .akeso-login-intro h1 { font-size: clamp(2.6rem, 9vw, 4rem); }
    .akeso-login-instrument { padding-top: 3rem; }
    .akeso-login-trust { margin-top: 1.7rem; }
    .akeso-login-panel { min-height: auto; padding: 3.5rem clamp(1.35rem, 6vw, 3rem) 2.5rem; }
}
@media (max-width: 480px) {
    .akeso-login-intro::after { right: -25rem; bottom: -26rem; }
    .akeso-login-intro-inner { padding-top: 1.4rem; }
    .akeso-login-brand { display: none; }
    .akeso-login-intro-copy { margin-top: 1.1rem; }
    .akeso-login-lede { margin-top: 1.1rem; font-size: .85rem; }
    .akeso-login-instrument { align-items: center; padding-top: 2rem; }
    .akeso-scan-graphic { width: 8rem; }
    .akeso-login-instrument-meta { font-size: .53rem; }
    .akeso-login-mobile-brand {
        display: flex;
        align-items: center;
        gap: .65rem;
        margin-bottom: 2.2rem;
        color: var(--login-ink);
        font-family: 'Space Grotesk', sans-serif;
        font-size: .78rem;
        letter-spacing: .12em;
    }
    .akeso-login-mobile-brand .akeso-login-logo { width: 2.2rem; height: 2.2rem; border-radius: .6rem; }
    .akeso-login-mobile-brand b { color: var(--login-teal); font-weight: 600; }
    .akeso-login-panel { padding-top: 2.2rem; }
    .akeso-login-form { padding: 1.1rem; }
    .akeso-login-footer { flex-wrap: wrap; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
    .akeso-login button,
    .akeso-login input { transition: none; }
    .akeso-login-submit:hover { transform: none; }
}
