:root {
    color-scheme: light;
    /* Atheer IT brand */
    --brand-maroon: #7a1630;
    --brand-maroon-dark: #5c0f24;
    --brand-maroon-deep: #2d0912;
    --brand-maroon-light: #9a2340;
    --brand-steel: #5f6369;
    --brand-steel-dark: #45484e;
    --brand-steel-light: #d4d6da;
    --brand-ink: #121214;
    --brand-night: #000000;

    --ink: var(--brand-ink);
    --muted: #5f6369;
    --line: #e5e3e4;
    --paper: #f5f5f6;
    --card: #ffffff;
    --navy: var(--brand-night);
    --blue: var(--brand-maroon);
    --blue-bright: var(--brand-maroon-light);
    --accent: var(--brand-maroon);
    --accent-ink: #ffffff;
    --danger: #9d2d2d;
    --ok: #146b3f;
    --focus: var(--brand-maroon);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
    --sidebar-w: 17.75rem;
    --sidebar-bg: #ffffff;
    --sidebar-ink: var(--brand-ink);
    --sidebar-active: var(--brand-maroon);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    font-size: 1rem;
}

body.marshal-app {
    background:
        radial-gradient(720px 320px at 100% 0, rgba(122, 22, 48, 0.07), transparent 55%),
        radial-gradient(560px 280px at 0 100%, rgba(95, 99, 105, 0.1), transparent 58%),
        var(--paper);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* App shell — sidebar control panel */
.m-app { display: flex; min-height: 100vh; }

.m-sidebar {
    position: fixed;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(360px 200px at 0 0, rgba(122, 22, 48, 0.06), transparent 65%),
        radial-gradient(280px 160px at 100% 100%, rgba(95, 99, 105, 0.08), transparent 70%),
        var(--sidebar-bg);
    border-inline-end: 1px solid var(--line);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.06);
    color: var(--sidebar-ink);
}

.m-sidebar::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--brand-maroon) 0%, var(--brand-steel-dark) 100%);
    border-radius: 0 3px 3px 0;
    pointer-events: none;
}

.m-sidebar > * { position: relative; z-index: 1; }

.m-sidebar-brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 0.85rem 0.8rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--line);
}

/* Sidebar pro — brand header */
.m-sidebar-pro {
    background:
        radial-gradient(320px 180px at 0 0, rgba(122, 22, 48, 0.08), transparent 70%),
        radial-gradient(280px 140px at 100% 30%, rgba(95, 99, 105, 0.06), transparent 65%),
        var(--sidebar-bg);
    box-shadow: 6px 0 32px rgba(122, 22, 48, 0.07);
}

.m-sidebar-brand-pro {
    position: relative;
    align-items: center;
    padding: 0;
    margin-bottom: 0.5rem;
    border-bottom: 0;
    overflow: hidden;
}

.m-sidebar-brand-pro .m-sidebar-close {
    position: absolute;
    top: 0.55rem;
    inset-inline-end: 0.55rem;
    z-index: 3;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.m-brand-pro {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1rem 0.85rem 1.05rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.m-brand-pro:hover {
    transform: translateY(-1px);
}

.m-brand-pro:focus-visible {
    outline: 2px solid var(--brand-steel-dark);
    outline-offset: -2px;
}

.m-brand-pro-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(155deg, #5c0f24 0%, #7a1630 38%, #3a1520 100%);
    pointer-events: none;
}

.m-brand-pro-mesh {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
}

.m-brand-pro-shine {
    position: absolute;
    top: -30%;
    inset-inline-start: -40%;
    width: 55%;
    height: 160%;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
    animation: m-brand-pro-glint 4.5s ease-in-out infinite;
}

@keyframes m-brand-pro-glint {
    0%, 70% { transform: translateX(0); opacity: 0; }
    78% { opacity: 1; }
    100% { transform: translateX(240%); opacity: 0; }
}

.m-brand-pro-orbit {
    position: absolute;
    top: 1.35rem;
    left: 50%;
    width: 9.5rem;
    height: 9.5rem;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    animation: home-orbit-spin 28s linear infinite;
    pointer-events: none;
}

[dir="rtl"] .m-brand-pro-orbit {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.m-brand-pro-logo-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 13.5rem);
    min-height: 4.35rem;
    padding: 0.65rem 0.85rem;
    margin-top: 0.15rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(122, 22, 48, 0.08) inset;
}

.m-sidebar-pro .m-brand-logo {
    max-width: 11.5rem;
    max-height: 3.5rem;
    filter: none;
}

.m-brand-pro-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    margin-top: 0.65rem;
    text-align: center;
}

.m-brand-pro-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.02em;
}

.m-brand-pro-tagline {
    font-size: 0.68rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.05em;
}

.m-sidebar-pro .m-nav {
    padding-inline: 0.55rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(122, 22, 48, 0.25) transparent;
}

.m-sidebar-pro .m-nav-item.is-active {
    position: relative;
    background: linear-gradient(135deg, rgba(122, 22, 48, 0.14), rgba(122, 22, 48, 0.05));
    border-color: rgba(122, 22, 48, 0.2);
    box-shadow: inset 3px 0 0 var(--brand-maroon);
}

[dir="rtl"] .m-sidebar-pro .m-nav-item.is-active {
    box-shadow: inset -3px 0 0 var(--brand-maroon);
}

.m-sidebar-pro .m-sidebar-foot {
    background: linear-gradient(180deg, #faf7f8 0%, #f3f0f2 100%);
}

@media (prefers-reduced-motion: reduce) {
    .m-brand-pro-shine,
    .m-brand-pro-orbit {
        animation: none !important;
    }
}

.m-brand-panel {
    position: relative;
    display: block;
    flex: 1;
    min-width: 0;
    padding: 0.15rem;
    border-radius: 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.m-brand-panel:hover {
    transform: translateY(-2px);
}

.m-brand-panel:focus-visible {
    outline: 2px solid var(--brand-steel-dark);
    outline-offset: 3px;
}

.m-brand-glow {
    position: absolute;
    inset: 0.35rem 0.5rem auto;
    height: 4.5rem;
    border-radius: 1rem;
    background: radial-gradient(ellipse at 50% 40%, rgba(122, 22, 48, 0.18), transparent 68%);
    pointer-events: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.m-brand-panel:hover .m-brand-glow {
    opacity: 1;
}

.m-brand-frame {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 5.25rem;
    padding: 0.55rem 0.65rem;
    border-radius: 1rem;
    background: linear-gradient(165deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid rgba(99, 13, 44, 0.14);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.m-brand-frame::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-maroon), var(--brand-steel));
    opacity: 0.85;
}

.m-brand-frame::after {
    content: "";
    position: absolute;
    inset-inline-end: -1.5rem;
    bottom: -1.5rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(157, 180, 196, 0.25), transparent 70%);
    pointer-events: none;
}

.m-brand-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 12.5rem;
    max-height: 3.85rem;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: transform 0.2s ease;
}

.m-brand-panel:hover .m-brand-logo {
    transform: scale(1.02);
}

.brand-print-logo {
    max-width: 10rem;
    height: auto;
    object-fit: contain;
    filter: none;
}

.m-brand-caption {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 0.45rem;
    padding-inline: 0.35rem;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--brand-steel-dark);
    letter-spacing: 0.02em;
}

.m-sidebar-close {
    display: none;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: #fff;
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.m-facility-card {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    margin: 0 0.75rem 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(122, 22, 48, 0.05), rgba(157, 180, 196, 0.08));
    border: 1px solid var(--line);
}

.m-facility-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--brand-maroon);
    box-shadow: 0 0 0 4px rgba(122, 22, 48, 0.12);
    flex-shrink: 0;
}

.m-facility-card strong { display: block; color: var(--brand-ink); font-size: 0.95rem; }
.m-facility-card span { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 700; }

.m-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.35rem 0.65rem 0.75rem;
}

.m-nav-label {
    margin: 0.85rem 0.35rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.m-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.65rem;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.2rem;
    border-radius: 0.85rem;
    color: var(--sidebar-ink);
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.m-nav-item:hover {
    background: rgba(157, 180, 196, 0.18);
    color: var(--brand-maroon-dark);
}

.m-nav-item.is-active {
    background: linear-gradient(135deg, rgba(122, 22, 48, 0.12), rgba(122, 22, 48, 0.06));
    border-color: rgba(122, 22, 48, 0.22);
    color: var(--brand-maroon-dark);
    box-shadow: 0 4px 14px rgba(122, 22, 48, 0.08);
}

.m-nav-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
}

.m-nav-item[data-module="reception"] .m-nav-icon { background: linear-gradient(145deg, #1b93ef, #0c5eaa); }
.m-nav-item[data-module="emr"] .m-nav-icon { background: linear-gradient(145deg, #0c8f6a, #065f46); }
.m-nav-item[data-module="lis"] .m-nav-icon { background: linear-gradient(145deg, #0e7c86, #155e75); }
.m-nav-item[data-module="ris"] .m-nav-icon { background: linear-gradient(145deg, #6b4fd8, #4338ca); }
.m-nav-item[data-module="pharmacy"] .m-nav-icon { background: linear-gradient(145deg, #d0891f, #b45309); }
.m-nav-item[data-module="nursing"] .m-nav-icon { background: linear-gradient(145deg, #c4537a, #9d174d); }
.m-nav-item[data-module="inpatient"] .m-nav-icon { background: linear-gradient(145deg, #2f6fdb, #1d4ed8); }
.m-nav-item[data-module="finance"] .m-nav-icon { background: linear-gradient(145deg, #1f7a4d, #14532d); }
.m-nav-item[data-module="inventory"] .m-nav-icon { background: linear-gradient(145deg, #0f766e, #134e4a); }
.m-nav-item[data-module="hr"] .m-nav-icon { background: linear-gradient(145deg, #3d5a80, #1e3a5f); }

.m-icon-dash { background: linear-gradient(145deg, #64748b, #334155) !important; }
.m-icon-patients { background: linear-gradient(145deg, #38bdf8, #0284c7) !important; }
.m-icon-add { background: linear-gradient(145deg, #34d399, #059669) !important; }
.m-icon-dept { background: linear-gradient(145deg, #a78bfa, #7c3aed) !important; }
.m-icon-loc { background: linear-gradient(145deg, #fbbf24, #d97706) !important; }
.m-icon-users { background: linear-gradient(145deg, #94a3b8, #475569) !important; }
.m-icon-clinics { background: linear-gradient(145deg, var(--brand-maroon-light), var(--brand-maroon-dark)) !important; }
.m-icon-ai { background: linear-gradient(145deg, var(--brand-maroon-light), var(--brand-steel-dark)) !important; }
.m-nav-item[data-module="clinics"] .m-nav-icon { background: linear-gradient(145deg, var(--brand-maroon-light), var(--brand-maroon-dark)); }

.m-nav-icon::after {
    content: "";
    position: absolute;
    inset: 0.55rem;
    border-radius: 0.25rem;
    border: 2px solid rgba(255, 255, 255, 0.65);
    opacity: 0.85;
}

.m-icon-dash::after { border-radius: 50%; inset: 0.45rem; }
.m-icon-add::after { border: 0; background: linear-gradient(#fff, #fff) center/55% 2px no-repeat, linear-gradient(#fff, #fff) center/2px 55% no-repeat; }

.m-nav-text { line-height: 1.25; font-size: 0.92rem; }

.m-sidebar-foot {
    padding: 0.75rem 0.85rem 1rem;
    border-top: 1px solid var(--line);
    background: #faf7f8;
}

.m-user-name { margin: 0 0 0.45rem; font-weight: 800; color: var(--brand-ink); font-size: 0.88rem; }

.m-facility-switch select {
    width: 100%;
    min-height: 2.35rem;
    margin-bottom: 0.5rem;
    border-radius: 0.65rem;
    border: 1px solid var(--line);
    background: #fff;
    padding-inline: 0.65rem;
    font: inherit;
    font-weight: 700;
    color: var(--brand-ink);
}

.m-foot-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.m-foot-actions button {
    flex: 1;
    min-height: 2.25rem;
    border-radius: 0.65rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.m-foot-actions button:hover {
    background: rgba(157, 180, 196, 0.15);
    border-color: var(--brand-steel);
    color: var(--brand-maroon-dark);
}

.m-signout {
    border-color: rgba(122, 22, 48, 0.35) !important;
    color: var(--brand-maroon) !important;
    background: rgba(122, 22, 48, 0.06) !important;
}

.m-main {
    flex: 1;
    min-width: 0;
    margin-inline-start: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.m-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.65rem 1.25rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(213, 226, 238, 0.9);
    box-shadow: 0 8px 24px rgba(12, 36, 64, 0.06);
}

.m-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: #fff;
    cursor: pointer;
}

.m-menu-btn span:not(.visually-hidden) {
    display: block;
    width: 1.15rem;
    height: 2px;
    margin-inline: auto;
    background: var(--ink);
    border-radius: 2px;
}

.m-top-search {
    display: flex;
    flex: 1;
    min-width: min(100%, 14rem);
    max-width: 28rem;
    gap: 0.45rem;
    align-items: center;
}

.m-top-search input {
    flex: 1;
    min-height: 2.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--line);
    font: inherit;
    background: #f8fafc;
}

.m-top-search button {
    min-height: 2.5rem;
}

.m-top-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    margin-inline-start: auto;
    font-weight: 800;
    font-size: 0.88rem;
}

.m-top-facility {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(122, 22, 48, 0.1);
    color: var(--brand-maroon-dark);
    border: 1px solid rgba(122, 22, 48, 0.15);
}

.m-top-clock {
    padding: 0.25rem 0.65rem;
    border-radius: 0.5rem;
    background: var(--brand-maroon-deep);
    color: var(--brand-steel-light);
    font-variant-numeric: tabular-nums;
}

.m-content {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding: 1.15rem 1.25rem 2.75rem;
}

.m-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(2, 8, 20, 0.55);
    backdrop-filter: blur(2px);
}

body.sidebar-open .m-backdrop { display: block !important; }

@media (max-width: 960px) {
    .m-sidebar {
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }
    [dir="rtl"] .m-sidebar {
        transform: translateX(105%);
    }
    body.sidebar-open .m-sidebar { transform: translateX(0); }
    .m-sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
    .m-main { margin-inline-start: 0; }
    .m-menu-btn { display: inline-flex; }
    .m-top-facility { display: none; }
}

/* Control panel dashboard */
.cp-dashboard { display: grid; gap: 1rem; }

.cp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.8fr);
    gap: 1.25rem;
    align-items: end;
}

.cp-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
    font-size: 0.78rem;
    color: #e0f2fe;
}

.cp-hero h1 { margin: 0; color: #fff; font-size: clamp(1.65rem, 2.5vw, 2.35rem); }
.cp-hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.45rem 0 0; color: #dbeafe; font-weight: 600; }
.cp-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0, 0, 0, 0.28); font-variant-numeric: tabular-nums; }
.cp-lead { margin: 0.55rem 0 0; max-width: 40rem; color: #e0f2fe; line-height: 1.55; opacity: 0.95; }

.cp-hero-aside { display: grid; gap: 0.55rem; justify-items: stretch; }
.cp-search label { display: block; }
.cp-search input {
    width: 100%;
    min-height: 2.55rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font: inherit;
}
.cp-search input::placeholder { color: rgba(219, 234, 254, 0.65); }
.cp-quick-primary {
    display: inline-flex;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    border-radius: 0.75rem;
    background: #fff;
    color: var(--brand-maroon-dark);
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.cp-section-head { margin-bottom: 0.65rem; }
.cp-section-head h2 { margin: 0; }
.cp-section-head .muted { margin: 0.2rem 0 0; font-size: 0.88rem; }

.cp-modules .cp-module {
    position: relative;
    padding-top: 2.75rem;
}

.cp-module-icon {
    position: absolute;
    top: 0.85rem;
    inset-inline-end: 0.85rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    opacity: 0.35;
    background: var(--blue);
}

.cp-module[data-module="reception"] .cp-module-icon { background: #1b93ef; }
.cp-module[data-module="emr"] .cp-module-icon { background: #0c8f6a; }
.cp-module[data-module="lis"] .cp-module-icon { background: #0e7c86; }
.cp-module[data-module="ris"] .cp-module-icon { background: #6b4fd8; }
.cp-module[data-module="pharmacy"] .cp-module-icon { background: #d0891f; }
.cp-module[data-module="nursing"] .cp-module-icon { background: #c4537a; }
.cp-module[data-module="inpatient"] .cp-module-icon { background: #2f6fdb; }
.cp-module[data-module="finance"] .cp-module-icon { background: #1f7a4d; }
.cp-module[data-module="inventory"] .cp-module-icon { background: #0f766e; }
.cp-module[data-module="hr"] .cp-module-icon { background: #3d5a80; }

.cp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.85fr);
    gap: 0.85rem;
    align-items: start;
}

.cp-stack { display: grid; gap: 0.85rem; }
.cp-panel { border-radius: 1.15rem; box-shadow: 0 14px 32px rgba(12, 36, 64, 0.07); }
.cp-panel-head { margin-bottom: 0.35rem; }
.cp-arrival { grid-template-columns: minmax(0, 1fr) auto auto; }

@media (max-width: 1100px) {
    .cp-hero { grid-template-columns: 1fr; }
    .cp-grid { grid-template-columns: 1fr; }
}

/* App-wide loader */
body.app-loader-active {
    overflow: hidden;
}

.m-app-loader {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background:
        radial-gradient(900px 420px at 12% 0%, rgba(122, 22, 48, 0.08), transparent 58%),
        linear-gradient(180deg, #fafafa 0%, #ececf0 100%);
    transition: opacity 0.45s ease, visibility 0.45s;
}

.m-app-loader[hidden] {
    display: none !important;
}

.m-app-loader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.m-app-loader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
}

.m-app-loader-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    width: min(17rem, 88vw);
    text-align: center;
    animation: m-app-loader-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes m-app-loader-in {
    from { opacity: 0; transform: translateY(0.75rem) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.m-app-loader-ring {
    position: absolute;
    top: 0.25rem;
    left: 50%;
    width: 8.5rem;
    height: 8.5rem;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 2px solid rgba(122, 22, 48, 0.1);
    border-top-color: rgba(122, 22, 48, 0.75);
    animation: home-orbit-spin 1.8s linear infinite;
    pointer-events: none;
}

[dir="rtl"] .m-app-loader-ring {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.m-app-loader-logo-card {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
    padding: 0.85rem 1.1rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid rgba(122, 22, 48, 0.1);
    box-shadow: 0 16px 40px rgba(122, 22, 48, 0.12);
}

.m-app-loader-logo {
    display: block;
    width: min(9.5rem, 70vw);
    height: auto;
    object-fit: contain;
}

.m-app-loader-brand {
    margin: 0.35rem 0 0;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.m-app-loader-track {
    width: min(11rem, 72vw);
    height: 4px;
    border-radius: 999px;
    background: rgba(122, 22, 48, 0.1);
    overflow: hidden;
}

.m-app-loader-fill {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7a1630, #c44b6a, #7a1630);
    background-size: 200% 100%;
    transform-origin: inline-start center;
    transform: scaleX(var(--app-loader-progress, 0));
    transition: transform 0.3s ease;
    animation: home-splash-progress-hue 2.5s linear infinite;
}

[dir="rtl"] .m-app-loader-fill {
    transform-origin: right center;
}

.m-app-loader-status {
    margin: 0.15rem 0 0;
    font-size: 0.76rem;
    font-weight: 700;
    color: rgba(122, 22, 48, 0.55);
}

@media print {
    .m-sidebar, .m-topbar, .m-backdrop, .m-app-loader { display: none !important; }
    .m-main { margin-inline-start: 0 !important; }
    body.app-loader-active { overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
    .m-app-loader-ring,
    .m-app-loader-fill {
        animation: none !important;
    }
    .m-app-loader-panel {
        animation: none !important;
    }
}

h1, h2, h3 { font-weight: 800; letter-spacing: 0; line-height: 1.25; }
h1 { font-size: 1.7rem; margin: 0 0 0.8rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
p { margin: 0.4rem 0; }

a { color: var(--accent); }

.skip {
    position: absolute;
    inset-inline-start: 0.75rem;
    top: -4rem;
    z-index: 5;
}

.skip:focus { top: 0.5rem; background: #fff; padding: 0.45rem 0.7rem; border-radius: 0.4rem; }

.shell {
    position: sticky;
    top: 0;
    z-index: 30;
    background:
        radial-gradient(520px 140px at 0 0, rgba(27, 147, 239, 0.32), transparent 62%),
        linear-gradient(180deg, #0a1624 0%, #05070c 100%);
    box-shadow: 0 14px 34px rgba(2, 8, 16, 0.28);
}

.shell::after {
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1b93ef 18%, #d7efff 50%, #1b93ef 82%, transparent);
}

.nav-frame, .content { width: min(1240px, calc(100% - 2rem)); margin-inline: auto; }

.topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0 0.35rem;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.15rem 0.35rem;
    border-radius: 0.85rem;
    background: #000;
    box-shadow: 0 0 0 1px rgba(126, 200, 255, 0.45), 0 8px 22px rgba(27, 147, 239, 0.22);
}

.brand img { height: 58px; width: auto; display: block; }

.nav, .inline { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

.shell .nav { padding: 0.15rem 0 0.5rem; }

.shell .tools { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; justify-content: flex-end; }

.shell .nav a,
.shell .tools button {
    min-height: 2.35rem;
    padding: 0.28rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    background: transparent;
    color: #d7e8f6;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.shell .nav a:hover,
.shell .tools button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.shell .nav a[aria-current="page"] {
    background: #fff;
    color: #0b3f72;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.shell .tools button.signout {
    border-color: rgba(255, 255, 255, 0.22);
}

.facility-chip, .who {
    display: inline-flex;
    align-items: center;
    min-height: 2.35rem;
    padding: 0.15rem 0.8rem;
    border-radius: 999px;
    font-weight: 800;
}

.facility-chip {
    gap: 0.45rem;
    color: #fff;
    background: rgba(27, 147, 239, 0.2);
    border: 1px solid rgba(126, 200, 255, 0.38);
}

.facility-chip::before {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: #3ddea0;
    box-shadow: 0 0 0 3px rgba(61, 222, 160, 0.18);
}

.who { color: #d5e6f5; background: rgba(255, 255, 255, 0.06); }

.shell .tools select {
    min-height: 2.35rem;
    border-radius: 999px;
    border: 0;
    background: #fff;
    color: var(--ink);
    padding-inline: 0.7rem;
    font: inherit;
}

body.marshal-app .m-content.content { padding: 1.15rem 1.25rem 2.75rem; }
.content:not(.m-content) { padding: 1.4rem 0 3rem; }

.content > header.tools,
.page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.content > header.tools h1,
.page-head h1 { margin: 0; }

button, .button {
    min-height: 2.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 0.7rem;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button.primary, .button.primary {
    background: linear-gradient(180deg, var(--brand-maroon-light) 0%, var(--brand-maroon-dark) 100%);
    color: var(--accent-ink);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(110, 31, 46, 0.28);
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.05rem 1.15rem;
    margin-block: 0.9rem;
    box-shadow: var(--shadow);
}

.grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.card label, .content form label, .gate-panel label { display: grid; gap: 0.3rem; font-size: 0.95rem; font-weight: 600; }
label.inline { display: flex; grid-template-columns: none; align-items: center; gap: 0.45rem; }
label.inline input { width: auto; min-height: 1.1rem; }

input, select, textarea {
    min-height: 2.6rem;
    width: 100%;
    padding: 0.45rem 0.7rem;
    border: 1px solid #c5d5e4;
    border-radius: 0.7rem;
    font: inherit;
    font-weight: 500;
    background: #fff;
    color: var(--ink);
}

textarea { min-height: 6.5rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.banner { padding: 0.75rem 0.95rem; border-radius: 0.8rem; font-weight: 600; }
.banner.success { background: #e7f6ee; color: var(--ok); }
.banner.error { background: #fdecec; color: var(--danger); }
.banner ul { margin: 0; padding-inline-start: 1.1rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 0.7rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: #f5f9fc; color: #16395c; font-weight: 800; }
tbody tr:hover { background: #f7fbfe; }

.muted { color: var(--muted); font-weight: 500; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.85rem; }
.metric { position: relative; overflow: hidden; }
.metric span { color: var(--muted); font-weight: 700; }
.metric strong { display: block; margin-top: 0.35rem; font-size: 2rem; font-weight: 800; color: var(--blue); }
.metric::after {
    content: "";
    position: absolute;
    inset-inline-end: -1.2rem;
    bottom: -1.4rem;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27, 147, 239, 0.22), transparent 68%);
}

.modules { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.modules li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.15rem;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
}

.content nav { display: flex; gap: 0.8rem; align-items: center; margin-top: 0.8rem; font-weight: 700; }

.module-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.2rem;
    overflow-x: auto;
    padding: 0.45rem 0 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: thin;
}

.module-bar a {
    flex: 0 0 auto;
    color: #c5d9ea;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 0.32rem 0.8rem;
    border-radius: 999px;
    white-space: nowrap;
}

.module-bar a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.module-bar a[aria-current="page"] {
    color: #fff;
    background: linear-gradient(180deg, rgba(27, 147, 239, 0.55), rgba(12, 94, 170, 0.35));
    box-shadow: inset 0 0 0 1px rgba(190, 226, 255, 0.35);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
    gap: 0.85rem;
}

.module-card {
    display: grid;
    align-content: start;
    gap: 0.45rem;
    min-height: 8.5rem;
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--blue-bright);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
}

.module-card strong { font-size: 1.15rem; font-weight: 800; }
.module-card span { color: var(--muted); font-weight: 600; line-height: 1.45; }
.module-card:hover { border-color: var(--blue-bright); transform: translateY(-1px); }

.module-hero {
    background:
        radial-gradient(420px 160px at 100% 0, rgba(27, 147, 239, 0.45), transparent 70%),
        linear-gradient(120deg, #071525 0%, #0c5eaa 100%);
    color: #fff;
    border-radius: 1.15rem;
    padding: 1.35rem 1.4rem 1.2rem;
    box-shadow: var(--shadow);
}

.module-hero h1 { color: #fff; margin-bottom: 0.35rem; }
.module-hero p { color: #e7f2fb; max-width: 44rem; }
.module-hero .eyebrow { margin: 0 0 0.2rem; color: #9fd0ff; font-weight: 800; letter-spacing: 0.02em; }
.module-hero .button { background: #fff; color: #0c4f8a; }
.module-hero .button.primary { color: #fff; }

.desk { display: grid; gap: 0.9rem; }
.desk-head {
    display: grid;
    grid-template-columns: minmax(16rem, 1.1fr) minmax(16rem, 0.9fr);
    gap: 1.2rem;
    align-items: end;
    padding: 1.35rem 1.4rem;
    border-radius: 1.2rem;
    color: #fff;
    background:
        radial-gradient(380px 180px at 100% 0, rgba(255, 255, 255, 0.18), transparent 60%),
        linear-gradient(125deg, #071525 0%, #0c5eaa 62%, #1b93ef 100%);
    box-shadow: var(--shadow);
}
.desk-head h1 { color: #fff; margin: 0.1rem 0 0.25rem; font-size: clamp(1.6rem, 3vw, 2.15rem); }
.desk-head p { color: #e7f3fc; margin: 0; }
.desk-head .eyebrow { color: #b9dcff; font-weight: 800; margin-bottom: 0.15rem; }
.desk-lead { margin-top: 0.45rem !important; max-width: 36rem; }
.desk-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: end;
    background: #fff;
    color: var(--ink);
    border-radius: 1rem;
    padding: 0.75rem;
}
.desk-search label { color: var(--ink); }
.desk-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.desk-action {
    display: grid;
    gap: 0.3rem;
    min-height: 6.2rem;
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
}
.desk-action strong { font-size: 1.08rem; }
.desk-action span { color: var(--muted); font-weight: 600; }
.desk-action.is-primary { background: linear-gradient(180deg, #1b93ef, #0c5eaa); border-color: transparent; }
.desk-action.is-primary strong, .desk-action.is-primary span { color: #fff; }
.desk-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.desk-metrics article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow);
}
.desk-metrics span { color: var(--muted); font-weight: 700; }
.desk-metrics strong { display: block; margin-top: 0.15rem; font-size: 1.8rem; color: var(--blue); }
.desk-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 0.85fr); gap: 0.85rem; align-items: start; }
.desk-side { display: grid; gap: 0.85rem; }
.desk-panel h2 { margin-bottom: 0.35rem; }
.arrival {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}
.arrival:last-child { border-bottom: 0; padding-bottom: 0; }
.arrival p { margin: 0; }
.desk-person { display: grid; gap: 0.05rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.desk-person:last-child { border-bottom: 0; }
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.1rem 0.7rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.82rem;
    background: #e7f2fc;
    color: #0c5eaa;
}
.pill.in_progress { background: #fff4e5; color: #8a5a00; }
.pill.completed, .pill.signed { background: #e7f6ee; color: #146b3f; }
.pill.cancelled { background: #fdecec; color: #9d2d2d; }
.pill.draft { background: #e7f2fc; color: #0c5eaa; }

.command { display: grid; gap: 0.9rem; }
.command-hero {
    position: relative;
    overflow: hidden;
    padding: 1.6rem 1.5rem;
    border-radius: 1.4rem;
    box-shadow: 0 22px 46px rgba(74, 18, 28, 0.22);
    background:
        radial-gradient(460px 200px at 100% 0, rgba(197, 214, 224, 0.22), transparent 58%),
        radial-gradient(380px 180px at 0 100%, rgba(122, 22, 48, 0.35), transparent 62%),
        linear-gradient(128deg, var(--brand-night) 0%, var(--brand-maroon-deep) 42%, var(--brand-maroon) 100%);
}
.command-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
    pointer-events: none;
}
.command-hero > * { position: relative; }
.command > section > h2 { display: flex; align-items: center; gap: 0.5rem; }
.command > section > h2::before {
    content: "";
    width: 0.45rem;
    height: 1.05rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand-maroon-light), var(--brand-maroon-dark));
}
.command-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.command-metrics article {
    position: relative;
    overflow: hidden;
    padding: 1rem 1rem 0.9rem;
    border: 0;
    background: linear-gradient(180deg, #fff 0%, #f5faff 100%);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.command-metrics article::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}
.command-metrics article:nth-child(1)::before { background: var(--brand-maroon); }
.command-metrics article:nth-child(2)::before { background: var(--brand-steel-dark); }
.command-metrics article:nth-child(3)::before { background: var(--brand-maroon-light); }
.command-metrics article:nth-child(4)::before { background: var(--brand-steel); }
.command-metrics strong { font-size: 2.15rem; font-variant-numeric: tabular-nums; }
.command-metrics em { display: block; margin-top: 0.15rem; color: var(--muted); font-style: normal; font-weight: 700; font-size: 0.82rem; }
.command-actions { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.command-modules { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
.command-module { min-height: 10.5rem; transition: transform 0.16s ease, box-shadow 0.16s ease; }
.command-module .module-count { font-size: 1.85rem; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
.command-module small { color: var(--muted); font-weight: 600; line-height: 1.4; }
.command-module:hover { transform: translateY(-3px); box-shadow: 0 18px 32px rgba(12, 36, 64, 0.14); }
.command-module[data-module="reception"] { border-top-color: #1b93ef; }
.command-module[data-module="emr"] { border-top-color: #0c8f6a; }
.command-module[data-module="lis"] { border-top-color: #0e7c86; }
.command-module[data-module="ris"] { border-top-color: #6b4fd8; }
.command-module[data-module="pharmacy"] { border-top-color: #d0891f; }
.command-module[data-module="nursing"] { border-top-color: #c4537a; }
.command-module[data-module="inpatient"] { border-top-color: #2f6fdb; }
.command-module[data-module="finance"] { border-top-color: #1f7a4d; }
.command-module[data-module="inventory"] { border-top-color: #8a5a2b; }
.command-module[data-module="hr"] { border-top-color: #3d5a80; }
.command-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
.fact {
    display: grid;
    gap: 0.1rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
}
.fact strong { font-size: 1.5rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-weight: 700; }
.fact:hover { border-color: var(--blue-bright); transform: translateY(-2px); box-shadow: 0 16px 28px rgba(12, 36, 64, 0.12); }

@media (max-width: 1100px) {
    .command-modules, .command-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .desk-head, .desk-layout, .desk-actions, .desk-metrics, .command-metrics, .command-actions, .command-modules, .command-facts { grid-template-columns: 1fr; }
    .arrival { grid-template-columns: 1fr; }
}

.gate-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(18rem, 1.05fr) minmax(20rem, 0.95fr);
    background: var(--navy);
}

.gate-brand {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.65rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--brand-steel-light);
    background:
        radial-gradient(480px 260px at 50% 12%, rgba(122, 22, 48, 0.35), transparent 68%),
        radial-gradient(360px 200px at 80% 80%, rgba(157, 180, 196, 0.12), transparent 65%),
        var(--navy);
}

.gate-logo-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(157, 180, 196, 0.16);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gate-logo-shell:hover {
    transform: translateY(-2px);
    box-shadow:
        0 26px 56px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.gate-logo {
    width: min(22rem, 88vw);
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.35));
}

.gate-brand p { max-width: 28rem; margin: 0; }

.gate-tagline {
    margin: 0.85rem 0 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: rgba(197, 214, 224, 0.88);
    letter-spacing: 0.02em;
}

.gate-panel {
    display: grid;
    align-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background:
        radial-gradient(700px 240px at 0 0, rgba(157, 180, 196, 0.22), transparent 60%),
        var(--paper);
}

.gate-panel h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.gate-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.2rem; }
.locale-form { margin-top: 0.8rem; }

/* Login page — enterprise gate */
body.login-page {
    margin: 0;
    min-height: 100vh;
    background: #ece6e9;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(22rem, 1.12fr) minmax(24rem, 0.88fr);
}

.login-showcase {
    position: relative;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    overflow: hidden;
    color: #f5f5f5;
    background:
        radial-gradient(520px 300px at 12% 8%, rgba(122, 22, 48, 0.55), transparent 58%),
        radial-gradient(420px 260px at 92% 88%, rgba(95, 99, 105, 0.35), transparent 55%),
        linear-gradient(160deg, #000 0%, #1a0a10 42%, #0d0d0d 100%);
}

.login-showcase-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 45% 35%, #000 0%, transparent 75%);
    pointer-events: none;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
    opacity: 0.55;
}

.login-orb-a {
    width: 14rem;
    height: 14rem;
    top: 8%;
    inset-inline-end: -3rem;
    background: rgba(122, 22, 48, 0.55);
    animation: loginOrbDriftA 14s ease-in-out infinite;
}

.login-orb-b {
    width: 11rem;
    height: 11rem;
    bottom: 12%;
    inset-inline-start: -2rem;
    background: rgba(95, 99, 105, 0.4);
    animation: loginOrbDriftB 16s ease-in-out infinite;
}

@keyframes loginOrbDriftA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-1.25rem, 1rem) scale(1.08); }
}

@keyframes loginOrbDriftB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(1rem, -0.75rem) scale(1.06); }
}

.login-showcase-inner {
    position: relative;
    z-index: 1;
    width: min(28rem, 100%);
    text-align: center;
}

@keyframes loginLogoReveal {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.88);
        filter: blur(6px);
    }
    55% {
        opacity: 1;
        transform: translateY(-6px) scale(1.03);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes loginLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes loginGlowPulse {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.06); }
}

@keyframes loginRingPulse {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    40% {
        opacity: 0.55;
    }
    100% {
        opacity: 0;
        transform: scale(1.12);
    }
}

@keyframes loginShineSweep {
    0% { transform: translateX(-120%) skewX(-18deg); opacity: 0; }
    15% { opacity: 0.85; }
    100% { transform: translateX(220%) skewX(-18deg); opacity: 0; }
}

@keyframes loginLogoImgIn {
    0% { opacity: 0; transform: scale(0.94); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes loginShowcaseFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo-stage {
    position: relative;
    display: block;
    margin-inline: auto;
    max-width: 24rem;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-logo-animate {
    animation: loginLogoReveal 1.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-logo-stage:hover .login-logo-frame {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.015);
    box-shadow:
        0 38px 80px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(122, 22, 48, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.login-logo-ring {
    position: absolute;
    inset: -0.35rem;
    border-radius: 1.65rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    pointer-events: none;
    animation: loginRingPulse 2.8s ease-out 0.35s infinite;
}

.login-logo-glow {
    position: absolute;
    inset: 5% 0 auto;
    height: 60%;
    border-radius: 2rem;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.32), transparent 72%);
    pointer-events: none;
    animation: loginGlowPulse 3.5s ease-in-out 0.6s infinite;
}

.login-logo-frame {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 10.5rem;
    padding: clamp(1rem, 2.8vw, 1.5rem) clamp(1.15rem, 3.2vw, 2rem);
    border-radius: 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: loginLogoFloat 5s ease-in-out 1.05s infinite;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.login-logo-frame::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 5px;
    border-radius: 1.5rem 1.5rem 0 0;
    background: linear-gradient(90deg, var(--brand-maroon), var(--brand-steel-dark) 55%, var(--brand-maroon-light));
    background-size: 200% 100%;
    animation: loginBarShift 6s ease-in-out infinite;
}

@keyframes loginBarShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-logo-shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 42%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0) 58%,
        transparent 100%
    );
    animation: loginShineSweep 4.5s ease-in-out 1.2s infinite;
}

.login-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 21rem;
    max-height: 8rem;
    height: auto;
    object-fit: contain;
    object-position: center;
    animation: loginLogoImgIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

.login-showcase-tag,
.login-showcase-title,
.login-showcase-lead,
.login-features {
    animation: loginShowcaseFade 0.75s ease-out both;
}

.login-showcase-tag { animation-delay: 0.55s; }
.login-showcase-title { animation-delay: 0.68s; }
.login-showcase-lead { animation-delay: 0.82s; }
.login-features { animation-delay: 0.95s; }

@media (prefers-reduced-motion: reduce) {
    .login-logo-animate,
    .login-logo-frame,
    .login-logo-glow,
    .login-logo-ring,
    .login-logo-shine,
    .login-logo,
    .login-logo-frame::before,
    .login-orb-a,
    .login-orb-b,
    .login-showcase-tag,
    .login-showcase-title,
    .login-showcase-lead,
    .login-features {
        animation: none !important;
    }
}

.login-showcase-tag {
    margin: 1.25rem 0 0;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-steel-light);
}

.login-showcase-title {
    margin: 0.75rem 0 0;
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.login-showcase-lead {
    margin: 0.65rem auto 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(232, 221, 225, 0.9);
    max-width: 24rem;
}

.login-features {
    list-style: none;
    margin: 1.35rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}

.login-features li {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(157, 180, 196, 0.22);
    backdrop-filter: blur(6px);
}

.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    background:
        radial-gradient(720px 320px at 100% 0, rgba(122, 22, 48, 0.06), transparent 52%),
        radial-gradient(520px 240px at 0 100%, rgba(157, 180, 196, 0.25), transparent 55%),
        linear-gradient(180deg, #faf6f8 0%, var(--paper) 100%);
}

.login-main-inner {
    position: relative;
    width: min(28rem, 100%);
}

.login-locale-top {
    position: absolute;
    top: -0.25rem;
    inset-inline-end: 0;
    z-index: 2;
    margin: 0;
}

.login-locale button {
    min-height: 2.15rem;
    padding-inline: 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--brand-maroon-dark);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(74, 18, 28, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.login-locale button:hover {
    background: #fff;
    border-color: var(--brand-steel);
}

.login-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 2.25rem;
    padding: clamp(1.5rem, 3.5vw, 2rem) clamp(1.35rem, 3vw, 1.85rem) clamp(1.25rem, 3vw, 1.65rem);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(232, 221, 225, 0.95);
    box-shadow:
        0 28px 60px rgba(74, 18, 28, 0.11),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    backdrop-filter: blur(12px);
}

.login-card-accent {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--brand-maroon), var(--brand-steel));
}

.login-card-head {
    margin-bottom: 1.35rem;
    padding-inline-start: 0.35rem;
}

.login-kicker {
    display: inline-flex;
    margin: 0 0 0.45rem;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(122, 22, 48, 0.1), rgba(157, 180, 196, 0.12));
    color: var(--brand-maroon-dark);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.login-card-head h1 {
    margin: 0;
    font-size: clamp(1.65rem, 2.8vw, 2.05rem);
    font-weight: 800;
    color: var(--brand-ink);
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.login-sub {
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 22rem;
}

.login-form { display: grid; gap: 1rem; }

.login-field {
    display: grid;
    gap: 0.4rem;
}

.login-field > span:first-child {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.login-input-wrap {
    display: block;
    position: relative;
}

.login-input-wrap input {
    width: 100%;
    min-height: 3rem;
    padding-inline: 0.85rem 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid #e5d8dd;
    background: #fdfbfb;
    font: inherit;
    font-weight: 600;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input-email input { padding-inline-start: 2.65rem; }
.login-input-password input { padding-inline-start: 2.65rem; }

.login-input-wrap::before {
    content: "";
    position: absolute;
    inset-inline-start: 0.95rem;
    top: 50%;
    width: 1.1rem;
    height: 1.1rem;
    transform: translateY(-50%);
    opacity: 0.55;
    background: var(--brand-maroon);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    pointer-events: none;
}

.login-input-email::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 16 16'%3E%3Cpath d='M2 4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v.217l5 3.3 5-3.3V4a1 1 0 0 0-1-1H4zm10 2.383-4.758 3.147L14 7.383V6zM2 6.383l4.758-3.147L2 6.383V6v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6l-4.758-3.147L8 6.217 2 6.383z'/%3E%3C/svg%3E");
}

.login-input-password::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a4 4 0 0 0-4 4v2H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1h-1V5a4 4 0 0 0-4-4zm3 6V5a3 3 0 1 0-6 0v2h6z'/%3E%3C/svg%3E");
}

.login-input-wrap:focus-within input {
    outline: none;
    border-color: var(--brand-steel-dark);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(157, 180, 196, 0.28);
}

.login-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--muted);
    cursor: pointer;
}

.login-remember input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--brand-maroon);
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 3rem;
    margin-top: 0.15rem;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border-radius: 0.85rem;
    box-shadow: 0 12px 28px rgba(110, 31, 46, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(110, 31, 46, 0.32);
}

.login-submit:active { transform: translateY(0); }

a.login-submit,
a.gate-home-enter {
    text-decoration: none;
    color: var(--accent-ink);
}

.gate-home-page .gate-home-card {
    margin-top: 2.25rem;
}

.gate-home-actions {
    display: grid;
    gap: 0.65rem;
}

.login-alert {
    padding: 0.7rem 0.85rem;
    border-radius: 0.85rem;
    font-weight: 700;
    font-size: 0.86rem;
}

.login-alert.error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.login-alert p { margin: 0.15rem 0; }

.login-secure-note {
    margin: 1.1rem 0 0;
    padding-top: 1rem;
    border-top: 1px dashed var(--line);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: var(--muted);
}

/* Login v2 — light brand panel (transparent logo) */
body.login-page-v2 {
    min-height: 100vh;
    background: #ececee;
}

.login-v2 {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(20rem, 1.08fr) minmax(22rem, 0.92fr);
}

.login-v2-brand {
    position: relative;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: clamp(2rem, 5vw, 3.25rem);
    background: #ffffff;
    overflow: hidden;
    border-inline-end: 1px solid var(--line);
}

.login-v2-brand-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(122, 22, 48, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 22, 48, 0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}

.login-v2-brand-stripe {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--brand-maroon) 0%, var(--brand-steel-dark) 100%);
}

.login-v2-brand-inner {
    position: relative;
    z-index: 1;
    width: min(26rem, 100%);
    text-align: center;
}

.login-v2-logo-wrap {
    display: inline-block;
    padding: 1.1rem 1.35rem;
    border-radius: 1.2rem;
    background: #fff;
    border: 1px solid rgba(122, 22, 48, 0.14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.07);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-v2-logo-wrap:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.1);
}

.login-v2-logo {
    display: block;
    width: min(20rem, 100%);
    height: auto;
    object-fit: contain;
}

.login-v2-eyebrow {
    margin: 1.35rem 0 0;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-steel-dark);
}

.login-v2-title {
    margin: 0.55rem 0 0;
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: var(--brand-maroon-dark);
    line-height: 1.3;
}

.login-v2-lead {
    margin: 0.7rem auto 0;
    font-size: 0.93rem;
    line-height: 1.65;
    color: var(--muted);
    max-width: 24rem;
}

.login-v2-features {
    list-style: none;
    margin: 1.2rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.login-v2-features li {
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--brand-maroon-dark);
    background: #faf0f3;
    border: 1px solid #ecd5dc;
}

.login-v2-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    background:
        radial-gradient(520px 260px at 100% 0, rgba(122, 22, 48, 0.06), transparent 58%),
        linear-gradient(180deg, #f6f6f7 0%, #ebebed 100%);
}

.login-v2-main-inner {
    position: relative;
    width: min(26rem, 100%);
}

.login-v2-locale {
    position: absolute;
    top: -0.35rem;
    inset-inline-end: 0;
    z-index: 2;
    margin: 0;
}

.login-v2-card {
    position: relative;
    overflow: hidden;
    margin-top: 2.15rem;
    padding: clamp(1.45rem, 3vw, 2rem);
    border-radius: 1.35rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.08);
}

.login-v2-card-mark {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--brand-maroon), var(--brand-steel-dark));
}

.login-v2-card-head {
    margin-bottom: 1.2rem;
    padding-inline-start: 0.25rem;
}

.login-v2-card-head h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.6vw, 1.95rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.login-v2-card-sub {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.login-v2-submit {
    width: 100%;
    min-height: 3rem;
    font-weight: 900;
}

.login-v2-note {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--line);
}

@media (max-width: 900px) {
    .login-v2 { grid-template-columns: 1fr; }
    .login-v2-brand {
        border-inline-end: 0;
        border-bottom: 1px solid var(--line);
        padding-block: 1.65rem 1.4rem;
    }
    .login-v2-brand-stripe {
        inset-inline: 0;
        top: auto;
        bottom: 0;
        width: auto;
        height: 4px;
    }
    .login-v2-lead { display: none; }
    .login-v2-main { padding-block: 1.25rem 2rem; }
    .login-v2-locale { position: static; text-align: end; margin-bottom: 0.5rem; }
    .login-v2-card { margin-top: 0; }
    .login-v2-logo { width: min(18rem, 92vw); }
}

/* Login pro — creative split layout */
body.login-page-pro {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(900px 420px at 8% -10%, rgba(122, 22, 48, 0.09), transparent 55%),
        radial-gradient(700px 360px at 95% 30%, rgba(95, 99, 105, 0.07), transparent 52%),
        linear-gradient(180deg, #fafafa 0%, #ececef 100%);
}

.login-pro-aura {
    position: fixed;
    border-radius: 50%;
    filter: blur(72px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

.login-pro-aura-a {
    width: 22rem;
    height: 22rem;
    top: -4rem;
    inset-inline-start: -6rem;
    background: rgba(122, 22, 48, 0.14);
    animation: login-pro-float-a 12s ease-in-out infinite alternate;
}

.login-pro-aura-b {
    width: 18rem;
    height: 18rem;
    bottom: 8%;
    inset-inline-end: -4rem;
    background: rgba(157, 180, 196, 0.18);
    animation: login-pro-float-b 14s ease-in-out infinite alternate;
}

@keyframes login-pro-float-a {
    to { transform: translate(1.5rem, 1rem) scale(1.06); }
}

@keyframes login-pro-float-b {
    to { transform: translate(-1.25rem, -0.75rem) scale(1.05); }
}

.login-pro-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(18rem, 1.05fr) minmax(20rem, 0.95fr);
}

.login-pro-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.75rem, 4vw, 3rem);
    border-inline-end: 1px solid rgba(122, 22, 48, 0.1);
    background:
        radial-gradient(100% 80% at 50% 100%, rgba(122, 22, 48, 0.06), transparent 55%),
        rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.login-pro-brand-mesh {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(122, 22, 48, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 22, 48, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 15%, transparent 72%);
    pointer-events: none;
}

.login-pro-brand-glow {
    position: absolute;
    width: 20rem;
    height: 20rem;
    top: 10%;
    inset-inline-end: -6rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 22, 48, 0.12), transparent 68%);
    pointer-events: none;
}

.login-pro-brand-inner {
    position: relative;
    z-index: 1;
    width: min(26rem, 100%);
    text-align: center;
}

.login-pro-scene {
    position: relative;
    width: min(20rem, 88vw);
    aspect-ratio: 1;
    margin: 0 auto;
}

.login-pro-orbit {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
    animation: home-orbit-spin 52s linear infinite;
}

.login-pro-orbit li {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 6rem;
    padding: 0.32rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    color: var(--brand-maroon-dark);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(122, 22, 48, 0.14);
    box-shadow: 0 8px 22px rgba(122, 22, 48, 0.1);
    transform:
        rotate(calc(var(--orbit-i) * 60deg))
        translateY(-8.25rem)
        rotate(calc(var(--orbit-i) * -60deg))
        translate(-50%, -50%);
}

.login-pro-orbit-core {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    padding: 0.35rem;
    border-radius: 1.35rem;
    background: linear-gradient(135deg, rgba(122, 22, 48, 0.25), rgba(240, 196, 207, 0.65), rgba(122, 22, 48, 0.3));
    background-size: 200% 200%;
    animation: login-pro-frame-shift 5s ease infinite;
    box-shadow: 0 18px 44px rgba(122, 22, 48, 0.16);
}

@keyframes login-pro-frame-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-pro-logo-link {
    display: block;
    padding: 0.85rem 1.1rem;
    border-radius: 1.2rem;
    background: #fff;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.login-pro-logo-link:hover {
    transform: translateY(-2px);
}

.login-pro-logo {
    display: block;
    width: min(8.5rem, 72vw);
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.login-pro-kicker {
    margin: 1.25rem 0 0;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: var(--brand-steel-dark);
}

.login-pro-brand-title {
    margin: 0.5rem 0 0;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-weight: 900;
    line-height: 1.35;
    color: var(--brand-maroon-dark);
    letter-spacing: -0.02em;
}

.login-pro-brand-lead {
    margin: 0.65rem auto 0;
    max-width: 22rem;
    font-size: 0.88rem;
    line-height: 1.6;
    font-weight: 600;
    color: var(--muted);
}

.login-pro-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.login-pro-pills li {
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand-maroon-dark);
    background: rgba(122, 22, 48, 0.06);
    border: 1px solid rgba(122, 22, 48, 0.12);
}

.login-pro-home-link {
    display: inline-flex;
    margin-top: 1.15rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--brand-maroon);
    text-decoration: none;
    border-bottom: 1px dashed rgba(122, 22, 48, 0.35);
}

.login-pro-home-link:hover {
    color: var(--brand-maroon-dark);
    border-bottom-color: var(--brand-maroon-dark);
}

.login-pro-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.login-pro-main-inner {
    width: min(26.5rem, 100%);
}

.login-pro-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.login-pro-toolbar-brand {
    display: none;
    flex-shrink: 0;
    text-decoration: none;
}

.login-pro-toolbar-logo {
    display: block;
    height: 2.15rem;
    width: auto;
    object-fit: contain;
}

.login-pro-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-inline-start: auto;
}

.login-pro-toolbar-home {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}

.login-pro-toolbar-home:hover {
    color: var(--brand-maroon-dark);
}

.login-pro-locale {
    margin: 0;
}

.login-pro-lang-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(122, 22, 48, 0.16);
    background: rgba(255, 255, 255, 0.85);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand-maroon-dark);
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.login-pro-lang-btn:hover {
    background: #fff;
    box-shadow: 0 8px 20px rgba(122, 22, 48, 0.1);
}

.login-pro-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 3.5vw, 2.1rem);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 28px 64px rgba(122, 22, 48, 0.12),
        0 0 0 1px rgba(122, 22, 48, 0.06) inset;
    backdrop-filter: blur(16px) saturate(1.1);
}

.login-pro-card-shine {
    position: absolute;
    top: -40%;
    inset-inline-start: -30%;
    width: 45%;
    height: 180%;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%);
    animation: login-pro-shine 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes login-pro-shine {
    0%, 70% { transform: translateX(0); opacity: 0; }
    80% { opacity: 1; }
    100% { transform: translateX(280%); opacity: 0; }
}

.login-pro-card-head {
    position: relative;
    margin-bottom: 1.25rem;
}

.login-pro-card-badge {
    display: inline-flex;
    margin-bottom: 0.5rem;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--brand-maroon-dark);
    background: rgba(122, 22, 48, 0.08);
    border: 1px solid rgba(122, 22, 48, 0.12);
}

.login-pro-card-head h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.8vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.login-pro-card-sub {
    margin: 0.45rem 0 0;
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 600;
    color: var(--muted);
}

.login-pro-form {
    position: relative;
}

.login-pro-input input {
    border-radius: 1rem;
    border-color: rgba(122, 22, 48, 0.14);
    background: rgba(253, 251, 252, 0.95);
}

.login-pro-input:focus-within input {
    border-color: rgba(122, 22, 48, 0.35);
    box-shadow: 0 0 0 4px rgba(122, 22, 48, 0.1);
}

.login-pro-submit {
    min-height: 3.1rem;
    border-radius: 1rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand-maroon-dark) 0%, var(--brand-maroon) 55%, #9a2845 100%) !important;
    box-shadow: 0 16px 36px rgba(122, 22, 48, 0.28) !important;
}

.login-pro-note {
    text-align: start;
    font-size: 0.74rem;
}

.login-pro-alert {
    border-radius: 1rem;
}

@media (max-width: 960px) {
    body.login-page-pro {
        min-height: 100dvh;
    }

    .login-pro-shell {
        grid-template-columns: 1fr;
        min-height: 100dvh;
    }

    .login-pro-main {
        order: -1;
        align-items: stretch;
        padding:
            max(0.65rem, env(safe-area-inset-top, 0px))
            max(1rem, env(safe-area-inset-right, 0px))
            1.15rem
            max(1rem, env(safe-area-inset-left, 0px));
    }

    .login-pro-main-inner {
        width: 100%;
        max-width: 26.5rem;
        margin-inline: auto;
    }

    .login-pro-toolbar {
        position: sticky;
        top: 0;
        z-index: 5;
        margin: -0.25rem 0 0.75rem;
        padding: 0.45rem 0.55rem;
        border-radius: 1rem;
        background: rgba(255, 255, 255, 0.82);
        border: 1px solid rgba(122, 22, 48, 0.08);
        box-shadow: 0 10px 28px rgba(122, 22, 48, 0.06);
        backdrop-filter: blur(12px);
    }

    .login-pro-toolbar-brand {
        display: block;
    }

    .login-pro-toolbar-home {
        padding: 0.35rem 0.65rem;
        border-radius: 999px;
        color: var(--brand-maroon-dark);
        background: rgba(122, 22, 48, 0.06);
        border: 1px solid rgba(122, 22, 48, 0.1);
        font-size: 0.68rem;
    }

    .login-pro-card {
        padding: 1.35rem 1.15rem 1.25rem;
        border-radius: 1.25rem;
        box-shadow: 0 18px 44px rgba(122, 22, 48, 0.1);
    }

    .login-pro-card-head h1 {
        font-size: 1.45rem;
    }

    .login-pro-input input {
        min-height: 3.1rem;
        font-size: 1rem;
    }

    .login-pro-submit {
        min-height: 3.25rem;
        font-size: 1rem;
    }

    .login-pro-brand {
        order: 1;
        border-inline-end: 0;
        border-top: 1px solid rgba(122, 22, 48, 0.1);
        border-bottom: 0;
        padding:
            1.15rem
            max(1rem, env(safe-area-inset-right, 0px))
            max(1.35rem, env(safe-area-inset-bottom, 0px))
            max(1rem, env(safe-area-inset-left, 0px));
        background: rgba(255, 255, 255, 0.55);
    }

    .login-pro-brand-inner {
        width: 100%;
        max-width: 26.5rem;
        margin-inline: auto;
    }

    .login-pro-scene {
        width: min(15rem, 70vw);
        margin-bottom: 0.35rem;
    }

    .login-pro-orbit li {
        font-size: 0.52rem;
        max-width: 4.85rem;
        padding: 0.28rem 0.42rem;
        transform:
            rotate(calc(var(--orbit-i) * 60deg))
            translateY(-6.15rem)
            rotate(calc(var(--orbit-i) * -60deg))
            translate(-50%, -50%);
    }

    .login-pro-brand-title {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .login-pro-brand-lead,
    .login-pro-home-link {
        display: none;
    }

    .login-pro-pills {
        gap: 0.35rem;
    }

    .login-pro-pills li {
        font-size: 0.68rem;
        padding: 0.32rem 0.62rem;
    }
}

@media (max-width: 520px) {
    .login-pro-aura {
        opacity: 0.35;
        transform: scale(0.85);
    }

    .login-pro-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .login-pro-toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .login-pro-toolbar-home {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .login-pro-scene {
        display: none;
    }

    .login-pro-kicker {
        margin-top: 0;
    }

    .login-pro-brand-title {
        margin-top: 0.35rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .login-pro-pills {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-items: stretch;
    }

    .login-pro-pills li {
        text-align: center;
        justify-content: center;
    }

    .login-pro-pills li:last-child {
        grid-column: 1 / -1;
        max-width: 14rem;
        justify-self: center;
    }

    .login-pro-note {
        text-align: center;
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-pro-aura-a,
    .login-pro-aura-b,
    .login-pro-orbit,
    .login-pro-orbit-core,
    .login-pro-card-shine {
        animation: none !important;
    }
}

@media (max-width: 960px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-showcase { padding-block: 2rem 1.5rem; }
    .login-logo-frame { min-height: 8rem; }
    .login-logo { max-height: 6rem; }
    .login-showcase-lead { display: none; }
    .login-features { margin-top: 1rem; }
    .login-main { padding-top: 0.5rem; }
    .login-main-inner { width: min(26rem, 100%); }
    .login-locale-top { position: static; text-align: end; margin-bottom: 0.35rem; }
    .login-card { margin-top: 0; }
}

@media (max-width: 480px) {
    .login-showcase-title { font-size: 1.2rem; }
    .login-features li { font-size: 0.68rem; }
}

@media (max-width: 860px) {
    .gate-page { grid-template-columns: 1fr; }
    .brand img { height: 48px; }
    .shell { position: static; }
    .gate-brand { padding-block: 1.4rem 0.4rem; }
}

.reception { display: grid; gap: 1rem; }
.reception-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(16rem, 1.15fr) minmax(18rem, 0.85fr);
    gap: 1.25rem;
    align-items: end;
    padding: 1.7rem 1.5rem;
    border-radius: 1.45rem;
    color: #fff;
    background:
        radial-gradient(480px 220px at 100% 0, rgba(197, 214, 224, 0.24), transparent 58%),
        linear-gradient(128deg, var(--brand-night) 0%, var(--brand-maroon-deep) 45%, var(--brand-maroon) 100%);
    box-shadow: 0 22px 46px rgba(74, 18, 28, 0.22);
}
.reception-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
    pointer-events: none;
}
.reception-hero > * { position: relative; }
.reception-kicker {
    display: inline-flex;
    margin: 0 0 0.4rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 800;
}
.reception-hero h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 3vw, 2.45rem); }
.reception-date, .reception-lead { margin: 0.35rem 0 0; color: #e7f3fc; }
.reception-lead { max-width: 36rem; }
.reception-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: end;
    padding: 0.85rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.97);
    color: var(--ink);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}
.reception-search label { color: var(--ink); font-weight: 800; }
.reception-search input { background: #f4f8fc; }

.reception-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.reception-metrics article {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.05rem 0.9rem;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #fff 0%, #f5faff 100%);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.reception-metrics article::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}
.reception-metrics article:nth-child(1)::before { background: #1b93ef; }
.reception-metrics article:nth-child(2)::before { background: #0c8f6a; }
.reception-metrics article:nth-child(3)::before { background: #d0891f; }
.reception-metrics span { color: var(--muted); font-weight: 800; }
.reception-metrics strong { display: block; margin-top: 0.15rem; font-size: 2.2rem; color: var(--blue); font-variant-numeric: tabular-nums; }

/* Reception desk (module board) */
.reception-desk { gap: 1.1rem; }
.reception-desk-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.8fr);
    gap: 1.25rem;
    align-items: end;
    padding: 1.55rem 1.6rem;
    border-radius: 1.45rem;
    color: #fff;
    background:
        radial-gradient(520px 240px at 100% 0, rgba(27, 147, 239, 0.28), transparent 58%),
        linear-gradient(128deg, #0c4a6e 0%, var(--brand-maroon-deep) 46%, var(--brand-maroon) 100%);
    box-shadow: 0 22px 48px rgba(12, 74, 110, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.reception-desk-meta { display: flex; flex-wrap: wrap; gap: 0.45rem 0.75rem; margin: 0.45rem 0 0; color: #dbeafe; font-weight: 600; }
.reception-desk-clock {
    padding: 0.1rem 0.55rem;
    border-radius: 0.45rem;
    background: rgba(0, 0, 0, 0.22);
    font-variant-numeric: tabular-nums;
}
.reception-desk-badge {
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.72rem;
    font-weight: 800;
}
.reception-desk-collected { margin: 0.5rem 0 0; color: #e0f2fe !important; }
.reception-desk-collected strong { color: #fff; }
.reception-desk-hero-side { display: grid; gap: 0.5rem; align-content: start; }
.reception-desk-cta {
    display: flex;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    border-radius: 0.8rem;
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    color: #0f172a;
    font-weight: 900;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}
.reception-desk-ghost {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}
.reception-desk-alert {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid #fcd34d;
    background: linear-gradient(90deg, #fffbeb, #fff);
    color: var(--ink);
    text-decoration: none;
}
.reception-desk-alert-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: #f59e0b;
    color: #fff;
}
.reception-desk-alert em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; margin-top: 0.15rem; }
.reception-desk-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.6rem;
}
.reception-metric {
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.06);
}
.reception-metric.is-warn { border-color: #fecaca; background: linear-gradient(180deg, #fff7f7, #fff); }
.reception-metric span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.reception-metric strong { display: block; margin-top: 0.12rem; font-size: 1.45rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.reception-workflow-head h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.reception-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.reception-workflow-card {
    padding: 1rem;
    border-radius: 1.1rem;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 28px rgba(12, 36, 64, 0.05);
}
.reception-workflow-patient { border-top: 3px solid #1b93ef; }
.reception-workflow-billing { border-top: 3px solid #f59e0b; }
.reception-workflow-operations { border-top: 3px solid #0c8f6a; }
.reception-workflow-card h3 { margin: 0; font-size: 0.98rem; }
.reception-workflow-card ul { list-style: none; margin: 0.65rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.reception-workflow-card a {
    display: block;
    padding: 0.45rem 0.6rem;
    border-radius: 0.55rem;
    border: 1px solid var(--line);
    font-weight: 800;
    font-size: 0.86rem;
    text-decoration: none;
    color: var(--ink);
}
.reception-workflow-card a.is-primary { background: var(--brand-maroon); color: #fff; border-color: transparent; }
.reception-queue {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 14px 32px rgba(12, 36, 64, 0.06);
}
.reception-queue--lab { border-color: #c5e8dc; }
.reception-queue--imaging { border-color: #bfdbfe; }
.reception-queue--clinic { border-color: #fde68a; }
.reception-queue--services { border-color: #e9d5ff; }
.reception-queue-head { margin-bottom: 0.75rem; }
.reception-queue-kicker {
    display: inline-flex;
    margin: 0 0 0.3rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.72rem;
    font-weight: 800;
    color: #475569;
}
.reception-queue-grid { display: grid; gap: 0.65rem; }
.reception-bill-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    background: #fafbfc;
    align-items: start;
}
.reception-bill-card.is-stat { border-color: #fecaca; background: #fff5f5; }
.reception-bill-lines { margin: 0.45rem 0 0; padding-inline-start: 1.1rem; font-size: 0.88rem; }
.reception-bill-lines li { margin: 0.2rem 0; }
.reception-bill-lines code { font-size: 0.75rem; }
.reception-bill-lines span:last-child { font-weight: 800; color: var(--brand-maroon); }
.reception-bill-actions { display: grid; gap: 0.4rem; justify-items: end; min-width: 10rem; }
.reception-bill-total { margin: 0; text-align: end; font-size: 0.82rem; }
.reception-bill-total strong { font-size: 1.1rem; color: var(--brand-maroon); }
.reception-bill-type { margin: 0.15rem 0; font-size: 0.82rem; font-weight: 800; color: #64748b; }
.reception-clinic-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.88rem; margin: 0.35rem 0; }
.reception-clinic-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.reception-desk-board { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.8fr); gap: 0.85rem; }
.reception-receipt-row {
    display: block;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
}
.reception-receipt-row:last-child { border-bottom: 0; }
.reception-receipt-row span { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.1rem; }

.reception-lab-queue {
    background: #fff;
    border: 1px solid #c5e8dc;
    border-radius: 1.2rem;
    padding: 1rem 1.15rem 1.1rem;
    box-shadow: 0 16px 32px rgba(10, 92, 72, 0.1);
}
.reception-lab-queue-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}
.reception-lab-kicker {
    display: inline-flex;
    margin: 0 0 0.3rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: #dcf5ee;
    color: #0a5c48;
    font-weight: 800;
    font-size: 0.78rem;
}
.reception-lab-queue-head h2 { margin: 0; color: #0a5c48; }
.reception-lab-queue-list { display: grid; gap: 0.65rem; }
.reception-lab-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    border: 1px solid #dceee8;
    background: linear-gradient(180deg, #fff, #f6fbf9);
}
.reception-lab-card.is-stat {
    border-color: #f5c2c2;
    background: linear-gradient(180deg, #fff8f8, #fff);
}
.reception-lab-tests {
    list-style: none;
    margin: 0.45rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
    font-size: 0.86rem;
}
.reception-lab-tests li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    align-items: baseline;
}
.reception-lab-tests code {
    font-size: 0.72rem;
    padding: 0.1rem 0.35rem;
    border-radius: 0.35rem;
    background: #ecf8f4;
    color: #0a5c48;
}
.reception-lab-tests span:last-child {
    margin-inline-start: auto;
    font-weight: 800;
    color: var(--brand-maroon);
}
.reception-lab-card-side {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: stretch;
    min-width: 10.5rem;
}
.reception-lab-total {
    margin: 0;
    text-align: end;
    font-size: 0.82rem;
}
.reception-lab-total strong {
    display: block;
    font-size: 1.25rem;
    color: var(--brand-maroon);
}
.rcpt-lab-group {
    border: 1px solid #cfece2;
    border-radius: 0.85rem;
    background: #f8fcfa;
    padding: 0.55rem 0.65rem 0.65rem;
    margin-bottom: 0.45rem;
}
.rcpt-lab-group-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    cursor: pointer;
}
.rcpt-lab-group-tests {
    list-style: none;
    margin: 0.45rem 0 0 1.65rem;
    padding: 0;
    font-size: 0.82rem;
    display: grid;
    gap: 0.2rem;
}
.rcpt-lab-group-tests code { font-size: 0.7rem; color: #0a5c48; }
.rcpt-lab-group-tests span { float: inline-end; font-weight: 800; color: var(--brand-maroon); }
.lab-awaiting-payment {
    margin: 0.65rem 0;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid #f0dfa8;
    background: #fff8e8;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
}
.rcpt-vat-ref { margin: 0.35rem 0 0; color: #0a5c48; font-weight: 700; }
.rcpt-tax-invoice { margin-top: 1rem; }

.reception-clinics {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.reception-clinics-head h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.reception-clinics-head p { margin: 0 0 0.85rem; }
.reception-clinic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.65rem;
}
.reception-clinic-card {
    position: relative;
    display: grid;
    gap: 0.2rem;
    min-height: 5.5rem;
    padding: 0.85rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, #f7fbff, #fff);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    border-top: 3px solid #1b93ef;
}
.reception-clinic-card[data-accent="internal"] { border-top-color: #1b93ef; }
.reception-clinic-card[data-accent="orthopedics"] { border-top-color: #5c6bc0; }
.reception-clinic-card[data-accent="dentistry"] { border-top-color: #26a69a; }
.reception-clinic-card[data-accent="pediatrics"] { border-top-color: #ff7043; }
.reception-clinic-card[data-accent="obgyn"] { border-top-color: #ec407a; }
.reception-clinic-card[data-accent="cardiology"] { border-top-color: #e53935; }
.reception-clinic-card[data-accent="ent"] { border-top-color: #7e57c2; }
.reception-clinic-card[data-accent="dermatology"] { border-top-color: #f59e0b; }
.reception-clinic-card[data-accent="ophthalmology"] { border-top-color: #0284c7; }
.reception-clinic-card[data-accent="surgery"] { border-top-color: #64748b; }
.reception-clinic-card[data-accent="neurology"] { border-top-color: #6366f1; }
.reception-clinic-card[data-accent="psychiatry"] { border-top-color: #a855f7; }
.reception-clinic-card[data-accent="urology"] { border-top-color: #0d9488; }
.reception-clinic-card[data-accent="physiotherapy"] { border-top-color: #22c55e; }
.reception-clinic-card[data-accent="family"] { border-top-color: #0891b2; }
.reception-clinic-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(12, 36, 64, 0.12); }

.clinic-hub { display: grid; gap: 1rem; }
.clinic-hub-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    padding: 1.45rem 1.5rem;
    border-radius: 1.35rem;
    color: #fff;
    background:
        radial-gradient(480px 220px at 0 0, rgba(197, 214, 224, 0.18), transparent 58%),
        linear-gradient(128deg, var(--brand-night) 0%, var(--brand-maroon-deep) 40%, var(--brand-maroon-light) 100%);
    box-shadow: 0 22px 46px rgba(74, 18, 28, 0.22);
}
.clinic-hub-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
    font-size: 0.78rem;
}
.clinic-hub-hero h1 { margin: 0; color: #fff; font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.clinic-hub-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.4rem 0 0; color: #e0e7ff; font-weight: 600; }
.clinic-hub-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0, 0, 0, 0.25); font-variant-numeric: tabular-nums; }
.clinic-hub-lead { margin: 0.5rem 0 0; max-width: 42rem; color: #e0e7ff; line-height: 1.55; }
.clinic-hub-back {
    padding: 0.55rem 0.9rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-maroon-dark);
    font-weight: 800;
    text-decoration: none;
}
.clinic-hub-grid-wrap { border: 0; box-shadow: none; background: transparent; padding: 0; }
.clinic-hub-grid { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.75rem; }

/* Clinic hub — physician landing */
.clinic-hub-pro { gap: 1.15rem; }
.clinic-hub-hero-pro {
    position: relative;
    overflow: hidden;
    align-items: stretch;
    padding: clamp(1.35rem, 3vw, 2rem) clamp(1.35rem, 3vw, 2.1rem);
    background:
        radial-gradient(620px 280px at 0% 0%, rgba(184, 67, 87, 0.45), transparent 62%),
        radial-gradient(480px 220px at 100% 100%, rgba(27, 147, 239, 0.28), transparent 58%),
        linear-gradient(135deg, #080508 0%, var(--brand-maroon-deep) 38%, #0c2438 100%);
}
.clinic-hub-hero-glow {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at 30% 20%, #000 0%, transparent 72%);
    pointer-events: none;
}
.clinic-hub-hero-main { position: relative; z-index: 1; flex: 1; min-width: min(100%, 28rem); }
.clinic-hub-hero-aside {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    justify-content: flex-start;
}
.clinic-hub-reception { background: rgba(255, 255, 255, 0.12) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, 0.28); }
.clinic-hub-stats-pro {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
    gap: 0.75rem;
}
.clinic-hub-stats-pro article {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.05rem;
    border-radius: 1.1rem;
    background: linear-gradient(165deg, #fff, #faf6f8);
    border: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(74, 18, 28, 0.07);
}
.clinic-hub-stats-pro article::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 1.1rem 0 0 1.1rem;
    background: var(--brand-maroon);
}
.clinic-hub-stats-pro .stat-wait::before { background: var(--brand-maroon); }
.clinic-hub-stats-pro .stat-busy::before { background: #d0891f; }
.clinic-hub-stats-pro .stat-active::before { background: #0c5eaa; }
.clinic-hub-stats-pro strong { font-size: clamp(1.65rem, 3vw, 2.1rem); }
.clinic-hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 0.25rem 0.15rem;
}
.clinic-hub-toolbar h2 { margin: 0; font-size: 1.2rem; }
.clinic-hub-toolbar p { margin: 0.2rem 0 0; font-size: 0.88rem; }
.clinic-hub-search { flex: 1; min-width: min(100%, 16rem); max-width: 22rem; }
.clinic-hub-search input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.85rem 0.55rem 2.35rem;
    border-radius: 0.9rem;
    border: 1px solid var(--line);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%236b5d63' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm8.25-1.8 4.2 4.2-1.35 1.35-4.2-4.2 1.35-1.35z'/%3E%3C/svg%3E") no-repeat 0.75rem center;
    font: inherit;
    box-shadow: 0 8px 20px rgba(12, 36, 64, 0.06);
}
.clinic-hub-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 0.85rem;
}
a.clinic-hub-card {
    text-decoration: none;
    color: inherit;
}
.clinic-hub-card {
    display: grid;
    gap: 0.55rem;
    padding: 1.05rem 1.1rem 1rem;
    border-radius: 1.2rem;
    background: linear-gradient(168deg, #ffffff 0%, #f8fbff 55%, #f4f8fc 100%);
    border: 1px solid rgba(157, 180, 196, 0.35);
    box-shadow: 0 16px 34px rgba(12, 36, 64, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border-top: 4px solid var(--brand-maroon);
}
.clinic-hub-card[data-accent="internal"] { border-top-color: #1b93ef; }
.clinic-hub-card[data-accent="orthopedics"] { border-top-color: #5c6bc0; }
.clinic-hub-card[data-accent="dentistry"] { border-top-color: #26a69a; }
.clinic-hub-card[data-accent="pediatrics"] { border-top-color: #ff7043; }
.clinic-hub-card[data-accent="obgyn"] { border-top-color: #ec407a; }
.clinic-hub-card[data-accent="cardiology"] { border-top-color: #e53935; }
.clinic-hub-card[data-accent="ent"] { border-top-color: #7e57c2; }
.clinic-hub-card[data-accent="dermatology"] { border-top-color: #f59e0b; }
.clinic-hub-card[data-accent="ophthalmology"] { border-top-color: #0284c7; }
.clinic-hub-card[data-accent="general_surgery"],
.clinic-hub-card[data-accent="surgery"] { border-top-color: #64748b; }
.clinic-hub-card[data-accent="neurology"] { border-top-color: #6366f1; }
.clinic-hub-card[data-accent="psychiatry"] { border-top-color: #a855f7; }
.clinic-hub-card[data-accent="urology"] { border-top-color: #0d9488; }
.clinic-hub-card[data-accent="physiotherapy"] { border-top-color: #22c55e; }
.clinic-hub-card[data-accent="family"] { border-top-color: #0891b2; }
.clinic-hub-card.is-clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(12, 36, 64, 0.14);
    border-color: rgba(122, 22, 48, 0.22);
}
.clinic-hub-card.has-waiting {
    background: linear-gradient(168deg, #fff9fb 0%, #fff 45%, #f7fbff 100%);
}
.clinic-hub-card.is-locked { opacity: 0.88; cursor: default; }
.clinic-hub-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.clinic-hub-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.95rem;
    background: linear-gradient(145deg, rgba(122, 22, 48, 0.12), rgba(157, 180, 196, 0.18));
    border: 1px solid rgba(122, 22, 48, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.clinic-hub-card-badges { display: flex; align-items: center; gap: 0.35rem; }
.clinic-hub-queue-pill {
    min-width: 2rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-maroon), var(--brand-maroon-light));
    color: #fff;
    font-weight: 900;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    box-shadow: 0 8px 18px rgba(122, 22, 48, 0.28);
}
.clinic-hub-live-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: clinicLivePulse 1.8s ease-in-out infinite;
}
.clinic-hub-card-title { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.clinic-hub-card-key { margin: 0; font-size: 0.72rem; }
.clinic-hub-card-key code {
    padding: 0.1rem 0.4rem;
    border-radius: 0.4rem;
    background: rgba(12, 36, 64, 0.06);
    color: var(--muted);
    font-weight: 700;
}
.clinic-hub-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.15rem 0 0;
}
.clinic-hub-card-metrics div {
    padding: 0.45rem 0.55rem;
    border-radius: 0.75rem;
    background: rgba(12, 94, 170, 0.06);
    border: 1px solid rgba(12, 94, 170, 0.1);
}
.clinic-hub-card-metrics dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.clinic-hub-card-metrics dd {
    margin: 0.1rem 0 0;
    font-size: 1.35rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--brand-maroon-dark);
}
.clinic-hub-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--line);
}
.clinic-hub-card-actions .button,
.clinic-hub-card-actions .clinic-hub-enter {
    cursor: pointer;
    font-size: 0.82rem;
}
.clinic-hub-display {
    background: #fff;
    border: 1px solid var(--line);
}
.clinic-hub-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    border-radius: 1.2rem;
}
.clinic-hub-empty h3 { margin: 0 0 0.5rem; }
.clinic-hub-no-match { margin: 1rem 0 0; text-align: center; }

@media (max-width: 960px) {
    .clinic-hub-stats-pro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clinic-hub-hero-pro { flex-direction: column; }
    .clinic-hub-hero-aside { align-items: stretch; }
    .clinic-hub-card-grid { grid-template-columns: 1fr; }
}
.reception-clinic-card.is-readonly { cursor: default; opacity: 0.92; }
.reception-clinic-card.is-readonly:hover { transform: none; box-shadow: none; }
.reception-clinic-card strong { font-size: 0.98rem; line-height: 1.25; }
.reception-clinic-card > span:last-child { color: var(--muted); font-weight: 700; font-size: 0.78rem; }
.reception-clinic-badge {
    position: absolute;
    top: 0.55rem;
    inset-inline-end: 0.55rem;
    min-width: 1.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #1b93ef;
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.clinic-desk { display: grid; gap: 1rem; }
.clinic-desk-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.45rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #0c5eaa, #1b93ef 55%, #3eb8ff);
    color: #fff;
    box-shadow: 0 18px 36px rgba(12, 94, 170, 0.28);
}
.clinic-desk-kicker { margin: 0; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.72rem; opacity: 0.9; }
.clinic-desk-hero h1 { margin: 0.25rem 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); color: #fff; }
.clinic-desk-date, .clinic-desk-lead { margin: 0.35rem 0 0; color: #e7f3fc; max-width: 36rem; }
.clinic-desk-back { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.clinic-desk-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.clinic-desk-metrics article {
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.06);
}
.clinic-desk-metrics span { color: var(--muted); font-weight: 800; }
.clinic-desk-metrics strong { display: block; margin-top: 0.15rem; font-size: 2rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.clinic-desk-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.clinic-desk-panel h2 { margin: 0 0 0.25rem; }
.clinic-queue-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.9rem 0.95rem;
    border: 1px solid var(--line);
    border-inline-start: 4px solid #1b93ef;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff, #f7fbff);
}
.clinic-queue-row.in_progress { border-inline-start-color: #d0891f; }
.clinic-queue-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: flex-end; }
.clinic-queue-actions form { margin: 0; }

.clinic-assign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.5rem 0.75rem;
    margin: 1rem 0;
    border: 0;
    padding: 0;
}
.clinic-assign-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
}

.clinic-visit { display: grid; gap: 1rem; }
.clinic-visit-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, #0a4d7a, #1b93ef 60%, #5ec4ff);
    color: #fff;
    box-shadow: 0 16px 32px rgba(12, 77, 122, 0.25);
}
.clinic-visit-hero h1 { margin: 0.2rem 0 0; color: #fff; font-size: clamp(1.5rem, 2.8vw, 2rem); }
.clinic-visit-hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.clinic-visit-hero-actions .button { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.35); color: #fff; }
.clinic-visit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: start;
}
.clinic-visit-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    padding: 1rem 1.05rem 1.1rem;
    box-shadow: 0 12px 26px rgba(12, 36, 64, 0.07);
}
.clinic-visit-panel h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.clinic-visit-panel h3 { margin: 1rem 0 0.5rem; font-size: 0.95rem; }
.clinic-visit-panel label { display: grid; gap: 0.35rem; margin-top: 0.65rem; font-weight: 800; }
.clinic-visit-panel textarea,
.clinic-visit-panel select { font: inherit; }
.clinic-shortcut-grid,
.clinic-care-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.65rem;
}
.clinic-shortcut-grid form,
.clinic-care-grid form { margin: 0; }
.clinic-shortcut-grid button,
.clinic-care-grid button {
    width: 100%;
    min-height: 2.85rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.85rem;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #f7fbff, #fff);
    font-weight: 800;
    cursor: pointer;
    text-align: start;
}
.clinic-care-grid button {
    border-inline-start: 3px solid #e53935;
    background: linear-gradient(180deg, #fff8f8, #fff);
}
.clinic-custom-order {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}
.clinic-span-all { grid-column: 1 / -1; }
.clinic-visit-orders { grid-column: 1 / -1; }
.clinic-order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.65rem;
    align-items: center;
    margin-top: 0.65rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: #f9fcff;
}
@media (max-width: 900px) {
    .clinic-visit-grid { grid-template-columns: 1fr; }
    .clinic-visit-orders { grid-column: auto; }
}

.clinic-hub-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 28rem;
}
.clinic-hub-stats article {
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.06);
}
.clinic-hub-stats span { color: var(--muted); font-weight: 800; font-size: 0.82rem; }
.clinic-hub-stats strong { display: block; margin-top: 0.2rem; font-size: 1.85rem; color: var(--brand-maroon); font-variant-numeric: tabular-nums; }

.clinic-desk-panel-head { margin-bottom: 0.35rem; }
.clinic-desk-panel-head h2 { margin: 0; }
.clinic-queue-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    margin-top: 0.75rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.06);
    border-inline-start: 4px solid var(--brand-steel);
}
.clinic-queue-card.in_progress { border-inline-start-color: #d0891f; }
.clinic-queue-avatar {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    font-weight: 900;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-maroon), var(--brand-maroon-light));
    box-shadow: 0 8px 18px rgba(122, 22, 48, 0.25);
}
.clinic-queue-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; }
.clinic-queue-meta, .clinic-queue-reception { margin: 0.25rem 0 0; font-size: 0.88rem; }
.clinic-queue-meta span + span::before { content: " · "; opacity: 0.55; }
.clinic-queue-empty { padding: 1.5rem 0.5rem; text-align: center; }

/* Clinic desk — live queue workstation */
.clinic-desk-hero-pro {
    background:
        radial-gradient(520px 200px at 100% 0, rgba(255, 255, 255, 0.12), transparent 62%),
        linear-gradient(128deg, var(--brand-maroon-deep) 0%, var(--brand-maroon) 42%, #0c5eaa 100%);
}
.clinic-desk-hero-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}
.clinic-desk-display-btn { background: #fff; color: var(--brand-maroon-dark); font-weight: 800; }
.clinic-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
}
.clinic-live-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.65);
    animation: clinicLivePulse 1.8s ease-in-out infinite;
}
@keyframes clinicLivePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
    50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}
.clinic-desk-metrics-pro {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.clinic-desk-metrics-pro .metric-waiting strong { color: var(--brand-maroon); }
.clinic-desk-metrics-pro .metric-progress strong { color: #d0891f; }
.clinic-desk-metrics-pro .metric-today strong { color: #0c5eaa; }
.clinic-desk-metrics-pro .metric-total strong { color: #146b3f; }
.clinic-desk-layout-pro {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.clinic-desk-aside { display: grid; gap: 0.75rem; }
.clinic-now-card,
.clinic-next-card,
.clinic-display-card {
    padding: 1rem 1.05rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 26px rgba(12, 36, 64, 0.08);
}
.clinic-now-card h2,
.clinic-next-card h3,
.clinic-display-card h3 { margin: 0 0 0.25rem; font-size: 0.95rem; }
.clinic-now-ticket {
    margin: 0.5rem 0 0;
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    color: var(--brand-maroon);
    text-align: center;
}
.clinic-next-chips {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.clinic-next-chips li {
    min-width: 3.25rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.75rem;
    text-align: center;
    font-weight: 900;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #f7fbff, #eef6fc);
    border: 1px solid #cfe0f0;
    color: #0c4f8a;
}
.clinic-next-chips .muted-chip { opacity: 0.45; font-weight: 700; }
.clinic-desk-panel-pro { margin: 0; }
.clinic-queue-count-label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--muted);
}
.clinic-desk-panel-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}
.clinic-queue-card-pro {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 0.75rem;
}
.clinic-queue-ticket {
    display: grid;
    gap: 0.15rem;
    justify-items: center;
    min-width: 4.25rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.85rem;
    background: linear-gradient(165deg, #fff7f9, #fff);
    border: 1px solid rgba(122, 22, 48, 0.18);
}
.clinic-queue-ticket-label {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.clinic-queue-ticket strong {
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--brand-maroon);
    font-variant-numeric: tabular-nums;
}
.clinic-desk-alert-stack {
    position: fixed;
    top: 4.5rem;
    inset-inline-end: 1rem;
    z-index: 80;
    display: grid;
    gap: 0.5rem;
    max-width: 22rem;
}
.clinic-desk-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #0c5eaa, #1b93ef);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 16px 36px rgba(12, 94, 170, 0.35);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.clinic-desk-alert.is-visible { opacity: 1; transform: translateY(0); }

/* Kiosk — waiting room display */
body.marshal-kiosk {
    margin: 0;
    min-height: 100vh;
    background: #050508;
    color: #fff;
}
.clinic-queue-display {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    background:
        radial-gradient(640px 320px at 50% 0, rgba(122, 22, 48, 0.35), transparent 70%),
        radial-gradient(480px 240px at 100% 100%, rgba(12, 94, 170, 0.35), transparent 65%),
        linear-gradient(160deg, #080508, #1a0a12 45%, #0a1a2e);
}
.clinic-queue-display-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.clinic-queue-display-kicker {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-steel-light);
}
.clinic-queue-display-head h1 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #fff;
}
.clinic-queue-display-clock-wrap { text-align: end; }
.clinic-queue-display-live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: #4ade80;
}
.clinic-queue-display-live::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
    animation: clinicLivePulse 1.8s ease-in-out infinite;
}
.clinic-queue-display-clock {
    display: block;
    margin-top: 0.35rem;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.clinic-queue-display-grid {
    display: grid;
    align-content: center;
    gap: 2rem;
    text-align: center;
    padding: 2rem 0;
}
.clinic-queue-now-label,
.clinic-queue-next-label {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-steel-light);
}
.clinic-queue-now-ticket {
    margin: 0.5rem 0 0;
    font-size: clamp(5rem, 18vw, 12rem);
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #fff;
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s ease, color 0.35s ease;
}
.clinic-queue-now-ticket.is-updated {
    color: #fde68a;
    transform: scale(1.04);
}
.clinic-queue-next-list {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.clinic-queue-next-list li {
    min-width: 4.5rem;
    padding: 0.65rem 1rem;
    border-radius: 1rem;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.clinic-queue-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}
.clinic-queue-stats article span {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--brand-steel-light);
}
.clinic-queue-stats article strong {
    font-size: clamp(2rem, 5vw, 3rem);
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.clinic-queue-display-foot {
    text-align: center;
    font-size: 0.95rem;
    color: rgba(232, 221, 225, 0.85);
}
.clinic-queue-display-desk-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--brand-steel-light);
}

@media (max-width: 960px) {
    .clinic-desk-metrics-pro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clinic-desk-layout-pro { grid-template-columns: 1fr; }
    .clinic-queue-card-pro { grid-template-columns: auto minmax(0, 1fr); }
    .clinic-queue-ticket { grid-column: 1; grid-row: 1 / span 2; }
    .clinic-queue-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

.clinic-visit-pro .clinic-visit-grid-pro { grid-template-columns: 1fr; }
.clinic-patient-banner {
    grid-column: 1 / -1;
    display: grid;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(12, 36, 64, 0.08);
}
.clinic-patient-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; }
.clinic-patient-avatar {
    width: 3.5rem;
    height: 3.5rem;
    display: grid;
    place-items: center;
    border-radius: 1.1rem;
    font-weight: 900;
    font-size: 1.15rem;
    color: #fff;
    background: linear-gradient(145deg, #0c5eaa, #1b93ef);
}
.clinic-patient-name { margin: 0; font-size: 1.35rem; }
.clinic-patient-mrn { margin: 0.2rem 0 0; color: var(--muted); font-weight: 700; }
.clinic-patient-mrn span + span::before { content: " · "; }
.clinic-patient-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.65rem 1rem;
    margin: 0;
}
.clinic-patient-facts dt { margin: 0; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.clinic-patient-facts dd { margin: 0.15rem 0 0; font-weight: 800; }
.clinic-patient-ids-label { font-weight: 800; font-size: 0.82rem; color: var(--muted); }
.clinic-patient-ids ul { margin: 0.35rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; }
.clinic-patient-ids li { font-size: 0.88rem; }
.clinic-patient-status-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.clinic-visit-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.35rem 0;
}
.clinic-visit-steps a {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--ink);
}
.clinic-visit-steps a:hover { border-color: var(--brand-steel); color: var(--brand-maroon); }

.clinic-panel-head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.clinic-panel-head h2 { margin: 0; font-size: 1.05rem; }
.clinic-panel-head .muted { margin: 0.2rem 0 0; font-size: 0.88rem; }
.clinic-panel-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #eef4fb, #fff);
    border: 1px solid var(--line);
}
.clinic-panel-icon.assessment { border-inline-start: 4px solid var(--brand-maroon); }
.clinic-panel-icon.orders { border-inline-start: 4px solid #1b93ef; }
.clinic-panel-icon.admission { border-inline-start: 4px solid #e53935; }
.clinic-panel-icon.tracker { border-inline-start: 4px solid #5c6bc0; }
.clinic-panel-icon.lab { border-inline-start: 4px solid #0a5c48; }
.clinic-lab-results-panel { grid-column: 1 / -1; }
.clinic-lab-result-card {
    margin-top: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px solid #cfece2;
    background: #f8fcfa;
}
.clinic-lab-result-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}
.clinic-lab-result-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.lab-result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
}
.lab-print-table-wrap { padding: 0.75rem 1.35rem 1rem; }
.lab-print-footer {
    padding: 0.75rem 1.35rem 1.25rem;
    border-top: 1px dashed var(--line);
    font-size: 0.82rem;
    color: var(--muted);
}
.lab-print-draft-warn { color: #b45309; font-weight: 700; margin-top: 0.35rem; }

.clinic-order-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.55rem;
}
.clinic-order-tile {
    display: grid;
    gap: 0.2rem;
    width: 100%;
    min-height: 4.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #f7fbff);
    cursor: pointer;
    text-align: start;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.clinic-order-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(12, 36, 64, 0.1); }
.clinic-order-tile-label { font-weight: 900; font-size: 0.92rem; color: var(--ink); }
.clinic-order-tile-type { font-size: 0.72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.clinic-order-tile[data-icon="lab"] { border-top: 3px solid #0284c7; }
.clinic-order-tile[data-icon="imaging"] { border-top: 3px solid #6366f1; }
.clinic-order-tile[data-icon="medication"] { border-top: 3px solid #16a34a; }
.clinic-order-tile[data-icon="procedure"] { border-top: 3px solid #64748b; }
.clinic-order-tile[data-icon="nursing"] { border-top: 3px solid #0d9488; }
.clinic-order-tile[data-icon="dressing"] { border-top: 3px solid #d97706; }
.clinic-order-tile[data-icon="other"] { border-top: 3px solid #94a3b8; }

.clinic-custom-order-wrap {
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.95rem;
    border: 1px dashed var(--line);
    background: #fafcff;
}
.clinic-custom-order-wrap summary { cursor: pointer; font-weight: 800; }

.clinic-order-groups { display: grid; gap: 1rem; }
.clinic-order-group h3 {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.clinic-order-group[data-type="laboratory"] h3 { color: #0284c7; }
.clinic-order-group[data-type="imaging"] h3 { color: #6366f1; }
.clinic-order-group[data-type="medication"] h3 { color: #16a34a; }
.clinic-order-group[data-type="procedure"] h3 { color: #64748b; }
.clinic-order-group[data-type="nursing"] h3 { color: #0d9488; }

.clinic-complete-btn { white-space: nowrap; }

.user-clinic-page { display: grid; gap: 1rem; max-width: 56rem; }
.user-clinic-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    padding: 1.35rem 1.45rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, var(--brand-maroon) 0%, #6b1f32 45%, var(--brand-steel) 100%);
    color: #fff;
    box-shadow: 0 20px 40px rgba(122, 22, 48, 0.22);
}
.user-clinic-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.92;
}
.user-clinic-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; margin-top: 0.5rem; }
.user-clinic-avatar {
    width: 3.25rem;
    height: 3.25rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    font-weight: 900;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.user-clinic-hero h1 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 1.85rem); color: #fff; }
.user-clinic-email { margin: 0.2rem 0 0; font-size: 0.92rem; opacity: 0.9; }
.user-clinic-lead { margin: 0.75rem 0 0; max-width: 36rem; line-height: 1.55; color: #fce8ed; }
.user-clinic-hero-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.user-clinic-facility { font-weight: 800; font-size: 0.88rem; opacity: 0.95; }
.user-clinic-hero-aside .pill.role {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
.user-clinic-back {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    margin-top: 0.25rem;
}

.user-clinic-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.user-clinic-stats article {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.06);
}
.user-clinic-stats span { color: var(--muted); font-weight: 800; font-size: 0.82rem; }
.user-clinic-stats strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 2rem;
    color: var(--brand-maroon);
    font-variant-numeric: tabular-nums;
}

.user-clinic-form { display: grid; gap: 0.85rem; }
.user-clinic-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.user-clinic-hint { margin: 0; max-width: 28rem; }
.user-clinic-toolbar-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.user-clinic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    border: 0;
}
.user-clinic-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    min-height: 4.75rem;
    padding: 0.85rem 0.95rem;
    margin: 0;
    border-radius: 1rem;
    border: 2px solid var(--line);
    background: linear-gradient(180deg, #fff, #f8fafc);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    border-top: 4px solid var(--brand-steel);
}
.user-clinic-card[data-accent="internal"] { border-top-color: #1b93ef; }
.user-clinic-card[data-accent="orthopedics"] { border-top-color: #5c6bc0; }
.user-clinic-card[data-accent="dentistry"] { border-top-color: #26a69a; }
.user-clinic-card[data-accent="pediatrics"] { border-top-color: #ff7043; }
.user-clinic-card[data-accent="obgyn"] { border-top-color: #ec407a; }
.user-clinic-card[data-accent="cardiology"] { border-top-color: #e53935; }
.user-clinic-card[data-accent="ent"] { border-top-color: #7e57c2; }
.user-clinic-card[data-accent="dermatology"] { border-top-color: #f59e0b; }
.user-clinic-card[data-accent="ophthalmology"] { border-top-color: #0284c7; }
.user-clinic-card[data-accent="surgery"],
.user-clinic-card[data-accent="general_surgery"] { border-top-color: #64748b; }
.user-clinic-card[data-accent="neurology"] { border-top-color: #6366f1; }
.user-clinic-card[data-accent="psychiatry"] { border-top-color: #a855f7; }
.user-clinic-card[data-accent="urology"] { border-top-color: #0d9488; }
.user-clinic-card[data-accent="physiotherapy"] { border-top-color: #22c55e; }
.user-clinic-card[data-accent="family"] { border-top-color: #0891b2; }
.user-clinic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(12, 36, 64, 0.1);
}
.user-clinic-card.is-selected {
    border-color: var(--brand-maroon);
    background: linear-gradient(180deg, #fff, #fdf6f8);
    box-shadow: 0 0 0 1px rgba(122, 22, 48, 0.12), 0 14px 28px rgba(122, 22, 48, 0.12);
}
.user-clinic-check {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.user-clinic-card-check {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0.4rem;
    border: 2px solid #cbd5e1;
    background: #fff;
    flex-shrink: 0;
}
.user-clinic-card.is-selected .user-clinic-card-check {
    border-color: var(--brand-maroon);
    background: var(--brand-maroon);
    box-shadow: inset 0 0 0 2px #fff;
}
.user-clinic-card-body { display: grid; gap: 0.2rem; }
.user-clinic-card-body strong { font-size: 0.95rem; line-height: 1.25; color: var(--ink); }
.user-clinic-card-body span { font-size: 0.75rem; font-weight: 700; color: var(--muted); }

.user-clinic-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 26px rgba(12, 36, 64, 0.07);
}
.user-clinic-foot-meta { margin: 0; font-weight: 800; color: var(--ink); }
.user-clinic-foot-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.user-clinic-notice h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }

@media (min-width: 960px) {
    .clinic-visit-pro .clinic-visit-grid-pro {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .clinic-patient-banner,
    .clinic-visit-orders { grid-column: 1 / -1; }
}

.reception-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.reception-action {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.8rem;
    align-items: center;
    min-height: 5.8rem;
    padding: 1rem 1.05rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.reception-action .step { grid-row: span 2; font-size: 1.35rem; font-weight: 800; color: var(--blue); }
.reception-action strong { font-size: 1.08rem; }
.reception-action span:last-child { color: var(--muted); font-weight: 700; }
.reception-action.is-primary {
    background: linear-gradient(145deg, #1b93ef, #0c5eaa);
    border-color: transparent;
    color: #fff;
}
.reception-action.is-primary .step,
.reception-action.is-primary span:last-child { color: #fff; }
.reception-action:hover { transform: translateY(-3px); box-shadow: 0 18px 32px rgba(12, 36, 64, 0.14); }

.reception-board { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(17rem, 0.85fr); gap: 0.9rem; align-items: start; }
.reception-side { display: grid; gap: 0.9rem; }
.reception-stage, .reception-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 1rem 1.1rem 1.1rem;
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.reception-stage h2, .reception-card h2 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.reception-stage h2::before, .reception-card h2::before {
    content: "";
    width: 0.45rem;
    height: 1.05rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #1b93ef, #0c5eaa);
}
.visit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.7rem;
    padding: 0.9rem 0.95rem;
    border: 1px solid var(--line);
    border-inline-start: 4px solid #1b93ef;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff, #f7fbff);
}
.visit.in_progress { border-inline-start-color: #d0891f; }
.visit.completed { border-inline-start-color: #0c8f6a; }
.visit.cancelled { border-inline-start-color: #9d2d2d; }
.visit strong { font-size: 1.05rem; }
.visit p { margin: 0; color: var(--muted); font-weight: 700; }
.person {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.7rem;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}
.person:last-child { border-bottom: 0; padding-bottom: 0; }
.person strong { font-weight: 800; }
.person span:last-child { color: var(--muted); font-weight: 700; }
.avatar {
    grid-row: span 2;
    width: 2.45rem;
    height: 2.45rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #1b93ef, #0c5eaa);
    color: #fff;
    font-weight: 800;
}
.counter {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin: 0;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}
.counter:last-child { border-bottom: 0; padding-bottom: 0; }
.counter > span:last-child { display: grid; }
.counter-code {
    min-width: 3.4rem;
    padding: 0.4rem 0.45rem;
    border-radius: 0.75rem;
    background: #e7f2fc;
    color: #0c5eaa;
    font-weight: 800;
    text-align: center;
}
.counter span span { color: var(--muted); font-weight: 700; }

@media (max-width: 860px) {
    .reception-hero, .reception-metrics, .reception-actions, .reception-board, .visit { grid-template-columns: 1fr; }
    .reception-desk-hero, .reception-desk-board, .reception-workflow-grid, .reception-bill-card { grid-template-columns: 1fr; }
    .emr-hero, .emr-board, .emr-workflow-grid { grid-template-columns: 1fr; }
    .emr-hero-actions { min-width: 0; width: 100%; }
    .reception-bill-actions { justify-items: stretch; min-width: 0; }
}

.patients-desk { display: grid; gap: 1rem; }
.patients-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(16rem, 0.95fr) minmax(20rem, 1.05fr);
    gap: 1.2rem;
    align-items: end;
    padding: 1.55rem 1.45rem;
    border-radius: 1.4rem;
    color: #fff;
    background:
        radial-gradient(460px 210px at 100% 0, rgba(215, 239, 255, 0.34), transparent 58%),
        linear-gradient(128deg, #06101c 0%, #0a4f96 48%, #1b93ef 100%);
    box-shadow: 0 22px 46px rgba(8, 36, 72, 0.28);
}
.patients-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
    pointer-events: none;
}
.patients-hero > * { position: relative; }
.patients-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 800;
}
.patients-hero h1 { color: #fff; margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.patients-hero-main { min-width: 0; }
.patients-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin: 0.35rem 0 0; color: #dbeafe; font-weight: 600; }
.patients-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0, 0, 0, 0.22); font-variant-numeric: tabular-nums; }
.patients-lead { margin: 0.35rem 0 0; color: #e7f3fc; max-width: 34rem; line-height: 1.5; }
.patients-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.patients-quick-link {
    display: inline-flex; padding: 0.45rem 0.85rem; border-radius: 0.65rem; border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.12); color: #fff; font-weight: 800; text-decoration: none; font-size: 0.86rem;
}
.patients-quick-link.is-primary { background: #fff; color: #0c5eaa; border-color: transparent; }
.patients-alert {
    display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start;
    padding: 0.85rem 1rem; border-radius: 1rem; border: 1px solid #fcd34d; background: #fffbeb; color: var(--ink);
}
.patients-alert-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: #f59e0b; color: #fff; }
.patients-alert em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; margin-top: 0.15rem; }
.patients-alert-link { display: inline-block; margin-top: 0.35rem; font-weight: 800; color: #0c5eaa; }
.patients-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.6rem; }
.patients-metric {
    padding: 0.8rem 0.9rem; border-radius: 1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.06); position: relative; overflow: hidden;
}
.patients-metric::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: #1b93ef; }
.patients-metric.is-warn { border-color: #fecaca; background: linear-gradient(180deg, #fff7f7, #fff); }
.patients-metric.is-warn::before { background: #f59e0b; }
.patients-metric span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.patients-metric strong { display: block; margin-top: 0.1rem; font-size: 1.35rem; color: #0c5eaa; font-variant-numeric: tabular-nums; }
.patients-metric-results strong { font-size: 1.15rem; }
.patients-active-filters { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.patients-active-filters code { padding: 0.1rem 0.4rem; border-radius: 0.35rem; background: #f1f5f9; font-size: 0.85rem; }
.patients-empty-state {
    padding: 2rem 1.25rem; text-align: center; border-radius: 1.1rem; border: 1px dashed var(--line);
    background: #fff; box-shadow: var(--shadow);
}
.patients-empty-state h2 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.patients-empty-state .button { margin-top: 0.75rem; }
.patient-row-rich { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.patient-avatar {
    width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; display: grid; place-items: center; font-weight: 900;
    background: #e7f2fc; color: #0c5eaa; border: 1px solid #bfdbfe;
}
.patient-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem; }
.patient-chip {
    padding: 0.08rem 0.4rem; border-radius: 0.35rem; font-size: 0.72rem; font-weight: 700;
    background: #f1f5f9; color: #475569;
}
.patient-chip-phone { font-variant-numeric: tabular-nums; }
.patient-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.patient-open-visits {
    font-size: 0.72rem; font-weight: 800; padding: 0.12rem 0.45rem; border-radius: 0.4rem;
    background: #dbeafe; color: #1e40af;
}
.patients-search-field-wide { grid-column: span 1; }
.patients-search-btn { align-self: end; min-height: 2.65rem; }
.patients-hero-tools { display: grid; gap: 0.75rem; }
.patients-hero-tools .button.primary { justify-self: start; }
.patients-search {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(10rem, 0.8fr) auto;
    gap: 0.55rem;
    align-items: end;
    padding: 0.85rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.97);
    color: var(--ink);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}
.patients-search label { color: var(--ink); font-weight: 800; }
.patients-search input, .patients-search select { background: #f4f8fc; }

.patients-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; }
.patients-summary article {
    position: relative;
    overflow: hidden;
    padding: 0.95rem 1rem;
    border-radius: 1.05rem;
    background: linear-gradient(180deg, #fff 0%, #f5faff 100%);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.patients-summary article::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #1b93ef;
}
.patients-summary article.is-filtered::before { background: #d0891f; }
.patients-summary span { color: var(--muted); font-weight: 800; }
.patients-summary strong { display: block; margin-top: 0.12rem; font-size: 1.15rem; color: var(--ink); }
.patients-clear {
    display: inline-block;
    margin-top: 0.35rem;
    font-weight: 800;
    text-decoration: none;
}

.patients-list {
    display: grid;
    gap: 0.65rem;
    padding: 0.35rem 0;
}
.patient-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1.05rem;
    background: #fff;
    box-shadow: 0 12px 24px rgba(12, 36, 64, 0.07);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.patient-row:hover {
    transform: translateY(-2px);
    border-color: var(--blue-bright);
    box-shadow: 0 16px 30px rgba(12, 36, 64, 0.12);
}
.patient-main { display: grid; gap: 0.08rem; }
.patient-main strong { font-size: 1.05rem; }
.patient-main span { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.patient-open {
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    background: #e7f2fc;
    color: #0c5eaa;
    font-weight: 800;
    font-size: 0.88rem;
}
.pill.provisional { background: #fff4e5; color: #8a5a00; }
.pill.verified { background: #e7f6ee; color: #146b3f; }
.pill.merged { background: #eef0f4; color: #4a5568; }
.pill.inactive { background: #fdecec; color: #9d2d2d; }
.patients-empty {
    margin: 0;
    padding: 1.2rem 1.1rem;
    border-radius: 1.05rem;
    background: #fff;
    border: 1px dashed var(--line);
    color: var(--muted);
    font-weight: 700;
    box-shadow: var(--shadow);
}
.patients-pager nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-weight: 800;
}

@media (max-width: 900px) {
    .patients-hero, .patients-search, .patient-row, .patient-row-rich { grid-template-columns: 1fr; }
    .patient-badges { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
    .patient-open { justify-self: start; }
}

/* Facility departments desk */
.dept-desk { display: grid; gap: 1rem; }
.dept-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 0.9fr); gap: 1rem; align-items: end;
    padding: 1.45rem 1.35rem; border-radius: 1.35rem; color: #fff;
    background:
        radial-gradient(400px 200px at 100% 0, rgba(251, 191, 36, 0.2), transparent 55%),
        linear-gradient(128deg, #1c1917 0%, #44403c 38%, #78716c 100%);
    box-shadow: 0 22px 46px rgba(28, 25, 23, 0.25);
}
.dept-hero-compact { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.dept-kicker { display: inline-flex; margin: 0 0 0.35rem; padding: 0.12rem 0.65rem; border-radius: 999px; background: rgba(255,255,255,0.14); font-weight: 800; font-size: 0.76rem; }
.dept-hero h1 { margin: 0; color: #fff; font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
.dept-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.4rem 0 0; color: #e7e5e4; font-weight: 600; }
.dept-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0,0,0,0.25); font-variant-numeric: tabular-nums; }
.dept-lead { margin: 0.4rem 0 0; color: #f5f5f4; max-width: 36rem; line-height: 1.5; font-size: 0.94rem; }
.dept-hero-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.dept-cta { display: inline-flex; padding: 0.5rem 0.9rem; border-radius: 0.7rem; background: #fff; color: #44403c; font-weight: 900; text-decoration: none; }
.dept-ghost {
    display: inline-flex; align-self: end; padding: 0.5rem 0.9rem; border-radius: 0.7rem;
    border: 1px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.1); color: #fff; font-weight: 800; text-decoration: none;
}
.dept-search {
    display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(7rem, 0.7fr)) auto; gap: 0.5rem; align-items: end;
    padding: 0.85rem; border-radius: 1rem; background: rgba(255,255,255,0.96); color: var(--ink);
}
.dept-search label { font-weight: 800; font-size: 0.82rem; }
.dept-search input, .dept-search select { background: #fafaf9; }
.dept-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.6rem; }
.dept-metric {
    padding: 0.8rem 0.9rem; border-radius: 1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 10px 22px rgba(28, 25, 23, 0.06); border-inline-start: 4px solid #78716c;
}
.dept-metric span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.dept-metric strong { display: block; margin-top: 0.1rem; font-size: 1.35rem; color: #44403c; font-variant-numeric: tabular-nums; }
.dept-active-filters { margin: 0; }
.dept-clear { font-weight: 800; color: #57534e; }
.dept-empty { padding: 2rem 1.2rem; text-align: center; border-radius: 1.1rem; border: 1px dashed var(--line); background: #fff; }
.dept-table-wrap { overflow-x: auto; padding: 0; }
.dept-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dept-table th, .dept-table td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.dept-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #fafaf9; }
.dept-table tbody tr:hover { background: #fafaf9; }
.dept-table tbody tr.is-inactive { opacity: 0.72; }
.dept-code-link { font-weight: 900; color: #57534e; text-decoration: none; font-family: ui-monospace, Menlo, Consolas, monospace; }
.dept-sub { display: block; font-size: 0.78rem; }
.dept-pill { display: inline-block; padding: 0.12rem 0.45rem; border-radius: 0.4rem; font-size: 0.72rem; font-weight: 800; background: #e7e5e4; color: #44403c; }
.dept-pill.type-clinical { background: #dbeafe; color: #1e40af; }
.dept-pill.type-diagnostic { background: #ede9fe; color: #5b21b6; }
.dept-pill.type-administrative { background: #fef3c7; color: #92400e; }
.dept-pill.type-support { background: #d1fae5; color: #047857; }
.dept-pill.status-active { background: #d1fae5; color: #047857; }
.dept-pill.status-inactive { background: #fee2e2; color: #b91c1c; }
.dept-pager nav { margin-top: 0.25rem; }
.dept-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.dept-span-2 { grid-column: span 2; }
.dept-field { display: grid; gap: 0.25rem; font-weight: 800; }
.dept-field em { font-style: normal; color: #b91c1c; }
.dept-form { padding: 1.1rem; }
.dept-form-foot { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--line); }
.dept-show-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.dept-panel { padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff; box-shadow: 0 12px 28px rgba(28, 25, 23, 0.06); }
.dept-panel-wide { grid-column: 1 / -1; }
.dept-panel h2 { margin: 0 0 0.5rem; font-size: 1.02rem; color: #44403c; }
.dept-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.65rem; }
.dept-panel-head h2 { margin: 0; }
.dept-count-badge { padding: 0.2rem 0.55rem; border-radius: 999px; background: #44403c; color: #fff; font-weight: 900; font-size: 0.82rem; }
.dept-dl { display: grid; gap: 0.55rem; margin: 0; }
.dept-dl div { display: grid; gap: 0.1rem; }
.dept-dl dt { font-size: 0.72rem; font-weight: 900; text-transform: uppercase; color: var(--muted); }
.dept-dl dd { margin: 0; }
.dept-child-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.dept-child-list a { text-decoration: none; color: var(--ink); }
.dept-location-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.55rem; }
.dept-location-card {
    display: grid; gap: 0.15rem; padding: 0.7rem 0.8rem; border-radius: 0.75rem; border: 1px solid #e7e5e4; background: #fafaf9;
}
.dept-location-card.is-inactive { opacity: 0.7; border-style: dashed; }
.dept-code-badge { padding: 0.15rem 0.5rem; border-radius: 0.4rem; background: rgba(0,0,0,0.25); color: #fff; font-weight: 800; }

/* Service locations desk */
.loc-desk .loc-hero {
    background:
        radial-gradient(420px 210px at 0 100%, rgba(95, 99, 105, 0.35), transparent 55%),
        linear-gradient(128deg, #000 0%, var(--brand-maroon-deep) 40%, var(--brand-steel-dark) 100%);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.2);
}
.loc-desk .metric-total { border-inline-start-color: var(--brand-maroon); }
.loc-desk .metric-active { border-inline-start-color: #059669; }
.loc-desk .metric-wards { border-inline-start-color: #7c3aed; }
.loc-desk .metric-diagnostic { border-inline-start-color: #d97706; }
.dept-search.loc-search {
    grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(6.5rem, 0.55fr)) auto;
}
.dept-search-wide { grid-column: span 1; }
.loc-code {
    font-weight: 900;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    color: #0c4a6e;
}
.dept-pill.loc-type-clinic { background: #dbeafe; color: #1e40af; }
.dept-pill.loc-type-counter { background: #e0e7ff; color: #3730a3; }
.dept-pill.loc-type-lab { background: #fef3c7; color: #92400e; }
.dept-pill.loc-type-imaging { background: #fce7f3; color: #9d174d; }
.dept-pill.loc-type-theater { background: #fee2e2; color: #b91c1c; }
.dept-pill.loc-type-ward { background: #ddd6fe; color: #5b21b6; }
.dept-pill.loc-type-pharmacy { background: #d1fae5; color: #047857; }
.dept-pill.loc-type-other { background: #e7e5e4; color: #44403c; }
.loc-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin-top: 0.65rem;
}

/* Atheer AI assistant — brand desk */
.ai-desk-pro {
    display: grid;
    gap: 1rem;
    max-width: min(72rem, 100%);
    margin-inline: auto;
    padding-bottom: 1.25rem;
}
.ai-hero-pro {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.35rem 1.4rem;
    border-radius: 1.35rem;
    color: #fff;
    background:
        radial-gradient(520px 240px at 100% 0, rgba(255, 255, 255, 0.12), transparent 58%),
        linear-gradient(128deg, #000 0%, var(--brand-maroon-deep) 38%, var(--brand-maroon) 72%, var(--brand-steel-dark) 100%);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.2);
}
.ai-hero-pro::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    pointer-events: none;
}
.ai-hero-pro > * { position: relative; z-index: 1; }
.ai-hero-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.12rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
    font-size: 0.76rem;
}
.ai-hero-pro h1 { margin: 0; color: #fff; font-size: clamp(1.45rem, 2.6vw, 2rem); }
.ai-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    font-size: 0.88rem;
}
.ai-hero-clock {
    padding: 0.1rem 0.55rem;
    border-radius: 0.45rem;
    background: rgba(0, 0, 0, 0.22);
    font-variant-numeric: tabular-nums;
}
.ai-hero-lead { margin: 0.5rem 0 0; max-width: 40rem; line-height: 1.55; color: rgba(255, 255, 255, 0.94); font-size: 0.92rem; }
.ai-trust-strip {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    min-width: min(100%, 14rem);
}
.ai-trust-strip li {
    padding: 0.45rem 0.7rem;
    border-radius: 0.65rem;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.ai-workspace {
    display: grid;
    grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}
.ai-aside {
    display: grid;
    gap: 0;
    padding: 0;
    align-self: start;
    position: sticky;
    top: 0.85rem;
    border-radius: 1.15rem;
    overflow: hidden;
}
.ai-aside-block {
    padding: 1rem 1.05rem;
    border-bottom: 1px solid var(--line);
}
.ai-aside-block:last-child { border-bottom: 0; }
.ai-aside-block h2 {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.ai-role-badge {
    display: inline-block;
    margin: 0;
    padding: 0.35rem 0.7rem;
    border-radius: 0.55rem;
    font-weight: 900;
    font-size: 0.92rem;
    color: var(--brand-maroon-dark);
    background: #fce8ec;
    border: 1px solid #f5d0d8;
}
.ai-aside-user { margin: 0.45rem 0 0; font-size: 0.86rem; }
.ai-module-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    font-size: 0.86rem;
    font-weight: 700;
}
.ai-module-list li { display: flex; gap: 0.45rem; align-items: center; }
.ai-module-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--brand-maroon);
    box-shadow: 0 0 0 3px rgba(122, 22, 48, 0.15);
    flex-shrink: 0;
}
.ai-aside-note p { margin: 0; font-size: 0.8rem; line-height: 1.5; }
.ai-chat-shell {
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    min-height: min(76vh, 44rem);
    padding: 0;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.ai-chat-toolbar {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff 0%, #faf8f9 100%);
}
.ai-toolbar-brand { display: flex; gap: 0.65rem; align-items: center; }
.ai-toolbar-logo {
    display: block;
    width: auto;
    max-width: 8rem;
    max-height: 2.6rem;
    object-fit: contain;
    padding: 0;
    background: transparent;
    border: 0;
}
.ai-toolbar-brand strong { display: block; font-size: 0.95rem; color: var(--ink); }
.ai-toolbar-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--ok);
}
.ai-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px rgba(20, 107, 63, 0.2);
}
.ai-chat-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.1rem 1rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    background:
        radial-gradient(520px 300px at 50% 0%, rgba(157, 180, 196, 0.12), transparent 65%),
        #fff;
}
.ai-empty {
    margin: auto;
    text-align: center;
    max-width: 20rem;
    padding: 2.5rem 1rem;
    color: var(--muted);
}
.ai-empty-mark {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, var(--brand-steel-light), var(--brand-steel));
    box-shadow: 0 10px 24px rgba(122, 154, 173, 0.35);
}
.ai-empty h2 { margin: 0 0 0.35rem; font-size: 1.12rem; color: var(--ink); }
.ai-empty p { margin: 0; font-size: 0.9rem; line-height: 1.55; }
.ai-turn { display: grid; gap: 0.75rem; animation: ai-turn-in 0.28s ease-out; }
@keyframes ai-turn-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
.ai-row {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    max-width: min(100%, 38rem);
}
.ai-row-bot { margin-inline-end: auto; }
.ai-row-user { flex-direction: row-reverse; margin-inline-start: auto; }
.ai-row-user .ai-stack { align-items: flex-end; }
.ai-row-user .ai-row-head { flex-direction: row-reverse; }
.ai-avatar {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.7rem;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 0.82rem;
}
.ai-avatar-user {
    color: #fff;
    background: linear-gradient(145deg, var(--brand-maroon-light), var(--brand-maroon-dark));
    box-shadow: 0 4px 12px rgba(122, 22, 48, 0.28);
}
.ai-avatar-bot {
    color: #fff;
    background: linear-gradient(145deg, var(--brand-steel), var(--brand-steel-dark));
    box-shadow: 0 4px 12px rgba(122, 154, 173, 0.35);
}
.ai-avatar-mark { font-size: 0.62rem; letter-spacing: 0.04em; font-weight: 900; }
.ai-stack { display: flex; flex-direction: column; gap: 0.28rem; min-width: 0; max-width: min(100%, 34rem); }
.ai-row-head { display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; align-items: center; }
.ai-row-name { font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ai-row-time { font-size: 0.68rem; font-variant-numeric: tabular-nums; color: #94a3b8; font-weight: 700; }
.ai-bubble {
    padding: 0.75rem 0.95rem;
    border-radius: 1rem;
    line-height: 1.65;
    font-size: 0.93rem;
    word-break: break-word;
}
.ai-bubble-user {
    background: #faeef1;
    color: var(--brand-maroon-deep);
    border: 1px solid #f0d4db;
    border-end-end-radius: 0.22rem;
}
.ai-bubble-bot {
    background: #f8fafb;
    color: var(--ink);
    border: 1px solid var(--line);
    border-end-start-radius: 0.22rem;
}
.ai-bubble-rich a { color: var(--brand-maroon); font-weight: 800; word-break: break-all; }
.ai-row-bot.is-denied .ai-bubble-bot {
    background: #fef7f7;
    border-color: #f5c4c4;
    color: var(--danger);
}
.ai-bubble-pending { min-width: 7.5rem; }
.ai-typing { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; color: var(--muted); font-size: 0.86rem; }
.ai-dots { display: inline-flex; gap: 0.18rem; align-items: center; }
.ai-dots i {
    display: block;
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 50%;
    background: var(--brand-steel-dark);
    animation: ai-dot 1.15s ease-in-out infinite;
}
.ai-dots i:nth-child(2) { animation-delay: 0.12s; }
.ai-dots i:nth-child(3) { animation-delay: 0.24s; }
@keyframes ai-dot {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-3px); opacity: 1; }
}
.ai-suggest-bar {
    display: grid;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--line);
    background: #faf8f9;
}
.ai-suggest-label { font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 0.38rem; }
.ai-chip {
    border: 1px solid #e5d2d7;
    background: #fff;
    color: var(--brand-maroon-dark);
    padding: 0.36rem 0.72rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.ai-chip:hover { background: #fdf5f7; border-color: var(--brand-maroon-light); }
.ai-composer {
    padding: 0.7rem 1rem 0.85rem;
    border-top: 1px solid var(--line);
    background: #fff;
}
.ai-composer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: flex-end;
    padding: 0.4rem 0.45rem 0.4rem 0.55rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: var(--paper);
}
.ai-composer-inner:focus-within {
    border-color: var(--brand-steel-dark);
    box-shadow: 0 0 0 3px rgba(122, 154, 173, 0.22);
}
.ai-input-wrap textarea {
    width: 100%;
    min-height: 2.45rem;
    max-height: 7.5rem;
    resize: none;
    border: 0;
    background: transparent;
    padding: 0.4rem 0.35rem;
    font: inherit;
    line-height: 1.5;
}
.ai-input-wrap textarea:focus { outline: none; }
.ai-send {
    min-width: 5.25rem;
    border-radius: 0.75rem !important;
    padding: 0.5rem 1rem !important;
    font-weight: 900 !important;
    white-space: nowrap;
}
.ai-send:disabled { opacity: 0.55; cursor: not-allowed; }
.ai-composer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    justify-content: space-between;
    margin-top: 0.4rem;
    font-size: 0.72rem;
}
.ai-footnote { margin: 0; max-width: 22rem; text-align: end; }

@media (max-width: 960px) {
    .ai-workspace { grid-template-columns: 1fr; }
    .ai-aside { position: static; order: 2; }
    .ai-chat-shell { min-height: min(68vh, 40rem); order: 1; }
}
@media (max-width: 600px) {
    .ai-trust-strip { width: 100%; }
    .ai-send-label { font-size: 0; }
    .ai-send { min-width: 2.75rem; padding-inline: 0.65rem !important; }
    .ai-send::after { content: "→"; font-size: 1rem; }
}

.chart-desk { display: grid; gap: 1rem; }
.chart-desk-pro { gap: 1.1rem; max-width: 72rem; }
.chart-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.45rem 1.4rem;
    border-radius: 1.4rem;
    color: #fff;
    background:
        radial-gradient(480px 220px at 100% 0, rgba(255, 255, 255, 0.1), transparent 58%),
        linear-gradient(128deg, #000 0%, var(--brand-maroon-deep) 35%, var(--brand-maroon) 68%, var(--brand-steel-dark) 100%);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.18);
}
.chart-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
    pointer-events: none;
}
.chart-hero > * { position: relative; z-index: 1; }
.chart-hero-main { display: grid; gap: 1rem; flex: 1; min-width: min(100%, 28rem); }
.chart-identity { display: flex; gap: 1rem; align-items: flex-start; }
.chart-avatar,
.chart-identity .avatar {
    width: 4.25rem;
    height: 4.25rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.16);
    border: 2px solid rgba(255, 255, 255, 0.35);
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}
.chart-kicker { margin: 0 0 0.2rem; color: #fce8ed; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.03em; }
.chart-hero h1 { color: #fff; margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.15; }
.chart-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin: 0.4rem 0 0.5rem;
    font-weight: 700;
    font-size: 0.92rem;
    color: #f3e8eb;
}
.chart-meta-row span + span::before { content: " · "; opacity: 0.65; }
.chart-lead { margin: 0.35rem 0 0.55rem; color: #e7f3fc; max-width: 38rem; }
.chart-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chart-hero-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.65rem 1rem;
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.chart-hero-facts dt { margin: 0; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.chart-hero-facts dd { margin: 0.15rem 0 0; font-weight: 800; font-size: 0.92rem; }
.chart-hero-tools { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: flex-start; justify-content: flex-end; }
.chart-hero-action {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
.chart-hero-tools .button.primary,
.chart-hero-action.primary {
    background: #fff;
    border-color: #fff;
    color: var(--brand-maroon);
    font-weight: 900;
}

.chart-layout { display: grid; grid-template-columns: minmax(16rem, 0.82fr) minmax(0, 1.18fr); gap: 0.9rem; align-items: start; }
.chart-side { display: grid; gap: 0.9rem; }
.chart-main { display: grid; gap: 0.9rem; }
.chart-panel, .encounter-card, .chart-empty {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    padding: 1rem 1.05rem 1.05rem;
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.chart-panel h2, .chart-stack > h2 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.45rem; }
.chart-panel h2::before, .chart-stack > h2::before {
    content: "";
    width: 0.45rem;
    height: 1.05rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #1b93ef, #0c5eaa);
}
.chart-facts { margin: 0; display: grid; gap: 0.55rem; }
.chart-facts div { display: grid; gap: 0.08rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--line); }
.chart-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.chart-facts dt { color: var(--muted); font-weight: 800; font-size: 0.88rem; }
.chart-facts dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-line { display: grid; gap: 0.08rem; margin: 0.55rem 0; padding-bottom: 0.55rem; border-bottom: 1px solid var(--line); }
.chart-line:last-of-type { border-bottom: 0; }
.chart-note { margin-top: 0.65rem; font-size: 0.88rem; }
.chart-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem; }
.chart-span-all { grid-column: 1 / -1; }
.chart-form-actions { margin: 0.75rem 0 0; }
.chart-form-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: end;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--line);
}
.encounter-card { display: grid; gap: 0.75rem; margin-top: 0.65rem; }
.encounter-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}
.encounter-head p { margin: 0; color: var(--muted); font-weight: 700; }
.encounter-tools { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.orders-block h3 { margin: 0 0 0.25rem; }
.order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.55rem 0.75rem;
    align-items: center;
    margin-top: 0.55rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #fff, #f7fbff);
}
.order-row p { margin: 0; color: var(--muted); font-weight: 700; }
.order-fulfillment { color: var(--muted); font-weight: 800; font-size: 0.88rem; }
.order-row form { grid-column: 1 / -1; }
.chart-empty { margin: 0.65rem 0 0; color: var(--muted); font-weight: 700; }
.chart-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.chart-nav-pro {
    position: sticky;
    top: 0.5rem;
    z-index: 5;
    padding: 0.45rem 0.55rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
}
.chart-nav a {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--brand-maroon);
    font-weight: 800;
    font-size: 0.82rem;
}
.chart-nav a:hover { background: #fdf6f8; }
.chart-side-pro { position: sticky; top: 4.5rem; align-self: start; }
.chart-panel-side .chart-panel-head h2 { margin: 0 0 0.65rem; font-size: 1.02rem; }
.chart-panel-side .chart-panel-head h2::before { display: none; }
.chart-open-encounter {
    border-inline-start: 4px solid var(--brand-maroon);
    background: linear-gradient(180deg, #fff, #fdf8fa);
}
.chart-overview article strong { color: var(--brand-maroon); }
.chart-nav-orders { font-weight: 800; }
.chart-nav-lab { font-weight: 800; color: #0a5c48 !important; }
.chart-desk.is-lab-focus .chart-laboratory {
    box-shadow: 0 0 0 3px rgba(18, 168, 132, 0.35), 0 18px 36px rgba(12, 36, 64, 0.12);
}
.chart-laboratory {
    border-color: #b8e6d8;
    background: linear-gradient(180deg, #fff 0%, #f4fbf8 100%);
}
.chart-lab-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.chart-lab-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.1rem 0.65rem;
    border-radius: 999px;
    background: #dcf5ee;
    color: #0a5c48;
    font-weight: 800;
    font-size: 0.82rem;
}
.chart-lab-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}
.chart-orders-desk { padding-top: 1.15rem; }
.chart-orders-head { margin-bottom: 0.85rem; }
.chart-orders-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.12rem 0.65rem;
    border-radius: 999px;
    background: #f3e8eb;
    color: var(--brand-maroon);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.chart-orders-head h2 { margin: 0; }
.chart-orders-lead { margin: 0.35rem 0 0; max-width: 40rem; }
.chart-orders-list-title {
    margin: 1.25rem 0 0.65rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--line);
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.chart-orders-desk .order-row-static {
    border-radius: 0.85rem;
    border: 1px solid var(--line);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.45rem;
    background: linear-gradient(180deg, #fff, #fafbfc);
}

.lab-order-desk-pro {
    margin-bottom: 0.25rem;
    border-radius: 1.15rem;
    border: 1px solid #c5e8dc;
    background:
        radial-gradient(520px 180px at 0% 0%, rgba(18, 168, 132, 0.12), transparent 55%),
        linear-gradient(165deg, #fff 0%, #f6fbf9 100%);
    box-shadow: 0 16px 36px rgba(10, 92, 72, 0.1);
    overflow: hidden;
}
.lab-order-desk-pro:target {
    box-shadow: 0 0 0 3px rgba(18, 168, 132, 0.35), 0 18px 40px rgba(10, 92, 72, 0.14);
}
.lab-order-desk-hero {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.1rem 1.2rem 0.85rem;
    border-bottom: 1px solid rgba(18, 168, 132, 0.15);
}
.lab-order-desk-icon {
    width: 3.25rem;
    height: 3.25rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    color: #0a5c48;
    background: linear-gradient(145deg, #dcf5ee, #fff);
    border: 1px solid #b8e6d8;
    box-shadow: 0 8px 18px rgba(10, 92, 72, 0.12);
}
.lab-order-desk-icon svg { width: 2rem; height: 2rem; }
.lab-order-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0a5c48;
}
.lab-order-desk-hero-text h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #0c2438;
}
.lab-order-lead { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--muted); max-width: 36rem; }
.lab-order-desk-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.85fr);
    gap: 0;
    align-items: stretch;
}
.lab-order-desk-main {
    padding: 1rem 1.2rem 1.15rem;
    border-inline-end: 1px solid rgba(18, 168, 132, 0.12);
}
.lab-order-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}
.lab-order-field {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3d5166;
}
.lab-order-field-compact select {
    font-weight: 600;
}
.lab-order-field input[type="search"],
.lab-order-field select,
.lab-order-field textarea {
    width: 100%;
    font-weight: 600;
}
.lab-order-search-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0a5c48;
}
.lab-order-search-shell {
    position: relative;
    display: flex;
    align-items: center;
}
.lab-order-search-icon {
    position: absolute;
    inset-inline-start: 0.85rem;
    width: 1.15rem;
    height: 1.15rem;
    color: #12a884;
    pointer-events: none;
}
.lab-order-search-input {
    width: 100%;
    padding: 0.72rem 3rem 0.72rem 2.65rem;
    border-radius: 0.85rem;
    border: 2px solid #b8e6d8;
    background: #fff;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 2px rgba(12, 36, 64, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.lab-order-search-input:focus {
    outline: none;
    border-color: #12a884;
    box-shadow: 0 0 0 3px rgba(18, 168, 132, 0.22);
}
.lab-order-search-kbd {
    position: absolute;
    inset-inline-end: 0.65rem;
    padding: 0.12rem 0.45rem;
    border-radius: 0.35rem;
    border: 1px solid var(--line);
    background: #f4f7fa;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--muted);
}
.lab-order-results-panel {
    margin: 0.65rem 0 0.85rem;
    max-height: 16rem;
    overflow: auto;
    border-radius: 0.85rem;
    border: 1px solid #dceee8;
    background: #fff;
    box-shadow: 0 10px 24px rgba(12, 36, 64, 0.08);
}
.lab-order-results-status {
    margin: 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #eef5f2;
}
.lab-order-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.lab-order-search-hit {
    display: grid;
    grid-template-columns: 5.25rem 1fr auto auto;
    gap: 0.55rem;
    align-items: center;
    text-align: start;
    padding: 0.6rem 0.75rem;
    border: none;
    border-bottom: 1px solid #eef5f2;
    background: #fff;
    cursor: pointer;
    transition: background 0.12s;
}
.lab-order-search-hit:last-child { border-bottom: none; }
.lab-order-search-hit:hover:not(:disabled) {
    background: linear-gradient(90deg, #eefbf6, #fff);
}
.lab-order-search-hit.is-added,
.lab-order-search-hit:disabled {
    opacity: 0.62;
    cursor: default;
    background: #f8faf9;
}
.lab-order-hit-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.74rem;
    font-weight: 800;
    color: #0a5c48;
    padding: 0.2rem 0.35rem;
    border-radius: 0.35rem;
    background: #ecf8f4;
}
.lab-order-hit-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #0c2438;
    line-height: 1.35;
}
.lab-order-hit-price {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--brand-maroon);
    font-size: 0.92rem;
}
.lab-order-hit-action {
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #0a5c48;
    color: #fff;
}
.lab-order-search-hit.is-added .lab-order-hit-action {
    background: #94a3b8;
}
.lab-order-desk-cart {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1rem 1.05rem 1.1rem;
    background: linear-gradient(180deg, #f0faf6 0%, #fff 100%);
}
.lab-order-cart-head h4 {
    margin: 0 0 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    color: #0a5c48;
}
.lab-order-cart-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--brand-maroon);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
}
.lab-order-cart-empty {
    margin: 0;
    padding: 1rem 0.5rem;
    text-align: center;
    font-size: 0.88rem;
}
.lab-order-cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 14rem;
    overflow: auto;
}
.lab-order-cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.35rem 0.5rem;
    align-items: center;
    padding: 0.55rem 0.6rem;
    border-radius: 0.65rem;
    border: 1px solid #cfece2;
    background: #fff;
}
.lab-order-cart-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.lab-order-cart-code {
    font-family: ui-monospace, monospace;
    font-size: 0.68rem;
    font-weight: 800;
    color: #0a5c48;
}
.lab-order-cart-name {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lab-order-cart-price {
    font-weight: 900;
    font-size: 0.85rem;
    color: var(--brand-maroon);
    font-variant-numeric: tabular-nums;
}
.lab-order-remove {
    width: 1.65rem;
    height: 1.65rem;
    border: none;
    border-radius: 0.45rem;
    background: #fce8ed;
    color: var(--brand-maroon);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    font-weight: 700;
}
.lab-order-remove:hover { background: #f5d0da; }
.lab-order-cart-foot {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #b8e6d8;
}
.lab-order-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.65rem;
    font-weight: 800;
}
.lab-order-cart-total-row strong {
    font-size: 1.25rem;
    color: var(--brand-maroon);
    font-variant-numeric: tabular-nums;
}
.lab-order-sign {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #3d5166;
}
.lab-order-sign-pro { margin-bottom: 0.75rem; }
.lab-order-submit {
    width: 100%;
    font-weight: 900;
    padding: 0.65rem 1rem;
}
.lab-order-desk-empty {
    padding: 1rem 1.15rem;
}
.lab-order-no-encounter {
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #fff8e8;
    border: 1px solid #f0dfa8;
    font-weight: 600;
}
.imaging-catalog-browse {
    margin: 0.85rem 0 0.25rem;
    padding: 0.85rem 0.9rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px solid #c8d9ec;
    background: linear-gradient(180deg, #f4f8fc 0%, #fff 100%);
}
.imaging-catalog-browse-title {
    margin: 0 0 0.2rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: #1e4a7a;
}
.imaging-catalog-browse-hint {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
}
.imaging-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.5rem;
    max-height: 13.5rem;
    overflow: auto;
}
.imaging-catalog-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #cbd8e8;
    border-radius: 0.65rem;
    background: #fff;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.imaging-catalog-card:hover:not(:disabled) {
    border-color: #4a7ab8;
    box-shadow: 0 4px 12px rgba(30, 74, 122, 0.12);
}
.imaging-catalog-card.is-added,
.imaging-catalog-card:disabled {
    opacity: 0.55;
    cursor: default;
    background: #f1f5f9;
}
.imaging-catalog-card code {
    font-size: 0.68rem;
    font-weight: 800;
    color: #1e4a7a;
}
.imaging-catalog-name {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    color: #1b2e44;
}
.imaging-catalog-price {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--brand-maroon);
    font-variant-numeric: tabular-nums;
}
.lab-requested-tests {
    margin: 0.65rem 0 0.75rem;
}
.lab-requested-tests h4 {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    color: #0a5c48;
}
.lab-requested-table tfoot td {
    font-weight: 700;
}
@media (max-width: 900px) {
    .lab-order-desk-body {
        grid-template-columns: 1fr;
    }
    .lab-order-desk-main {
        border-inline-end: none;
        border-bottom: 1px solid rgba(18, 168, 132, 0.12);
    }
    .lab-order-search-hit {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "code action"
            "name price";
    }
    .lab-order-hit-code { grid-area: code; }
    .lab-order-hit-body { grid-area: name; }
    .lab-order-hit-price { grid-area: price; justify-self: end; }
    .lab-order-hit-action { grid-area: action; justify-self: end; }
}
@media (max-width: 720px) {
    .lab-order-toolbar {
        grid-template-columns: 1fr;
    }
}
.chart-lab-metrics article {
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid #cfece2;
}
.chart-lab-metrics span { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.chart-lab-metrics strong { font-size: 1.65rem; color: #0a5c48; font-variant-numeric: tabular-nums; }
.chart-lab-timeline { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px dashed #cfece2; }
.chart-lab-pointer { margin: 0.35rem 0 0.65rem; }
.chart-lab-pointer a { font-weight: 800; color: #0a5c48; }
.lab-result-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.lab-result-card.is-stat { border-color: #e8a020; box-shadow: inset 4px 0 0 #e8a020; }
.chart-module-link { display: inline-block; margin-top: 0.35rem; font-weight: 800; color: #0a5c48; }

@media (max-width: 860px) {
    .chart-lab-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pill.identity { background: #eef0f4; color: #4a5568; }
.chart-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.65rem;
}
.chart-overview article {
    padding: 0.85rem 0.9rem;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #fff, #f5faff);
    border: 1px solid var(--line);
}
.chart-overview span { color: var(--muted); font-weight: 800; font-size: 0.88rem; }
.chart-overview strong { display: block; margin-top: 0.1rem; font-size: 1.7rem; color: var(--blue); }
.timeline-item {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 0; }
.timeline-item time { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.timeline-item p { margin: 0.15rem 0 0; color: var(--muted); font-weight: 700; }
.order-row-static { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.order-indication { margin: 0.2rem 0 0 !important; color: var(--ink) !important; font-weight: 600 !important; }
.order-when { font-size: 0.88rem; }
.chart-modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.65rem; }
.chart-module {
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    background: #fff;
}
.chart-module.is-live { border-top: 3px solid #0c8f6a; }
.chart-module.is-pending { border-top: 3px solid #d0891f; background: #fffaf3; }
.chart-module strong { display: block; }
.chart-module span { color: var(--muted); font-weight: 800; font-size: 0.88rem; }
.chart-module p { margin: 0.35rem 0 0; color: var(--muted); font-weight: 600; line-height: 1.45; }
.chart-panel-accent {
    background: linear-gradient(180deg, #fff 0%, #fff9f0 100%);
    border-color: #f0dcc0;
}

@media (max-width: 960px) {
    .chart-layout, .order-row, .order-row-static, .chart-form-inline, .timeline-item { grid-template-columns: 1fr; }
}

.register-desk { display: grid; gap: 1rem; max-width: 52rem; }
.register-desk-pro { gap: 1.1rem; }
.register-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.45rem 1.4rem;
    border-radius: 1.4rem;
    color: #fff;
    background:
        radial-gradient(420px 200px at 100% 0, rgba(255, 255, 255, 0.12), transparent 55%),
        linear-gradient(128deg, var(--brand-maroon) 0%, #6b1f32 42%, var(--brand-steel) 100%);
    box-shadow: 0 22px 46px rgba(122, 22, 48, 0.22);
}
.register-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
    pointer-events: none;
}
.register-hero > * { position: relative; }
.register-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 800;
}
.register-hero-main { position: relative; z-index: 1; }
.register-hero-aside { position: relative; z-index: 1; display: flex; align-items: flex-start; }
.register-hero h1 { color: #fff; margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.register-facility { margin: 0.35rem 0 0; font-weight: 800; color: #fce8ed; font-size: 0.95rem; }
.register-lead { margin: 0.5rem 0 0; color: #f3e8eb; max-width: 40rem; line-height: 1.55; }
.register-back {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.register-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.register-steps a {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 6px 14px rgba(12, 36, 64, 0.05);
}
.register-steps a:hover {
    border-color: var(--brand-maroon);
    color: var(--brand-maroon);
}

.register-form { display: grid; gap: 0.9rem; }
.register-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    padding: 1rem 1.05rem 1.05rem;
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.register-panel-accent {
    background: linear-gradient(180deg, #fff 0%, #fff9f0 100%);
    border-color: #f0dcc0;
}
.register-panel-head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}
.register-panel-head h2 { margin: 0; font-size: 1.08rem; }
.register-panel-head .muted { margin: 0.25rem 0 0; font-size: 0.88rem; }
.register-step-badge {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 0.65rem;
    font-weight: 900;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-maroon), var(--brand-maroon-light));
    box-shadow: 0 8px 16px rgba(122, 22, 48, 0.25);
}
.register-step-badge.warn {
    background: linear-gradient(145deg, #c2410c, #ea580c);
    box-shadow: 0 8px 16px rgba(234, 88, 12, 0.25);
}
.register-field { display: grid; gap: 0.35rem; margin: 0; font-weight: 700; }
.register-label { font-size: 0.82rem; font-weight: 800; color: var(--ink); }
.register-required { color: var(--brand-maroon); font-style: normal; }
.register-field input,
.register-field select,
.register-field textarea {
    font: inherit;
    font-weight: 600;
}
.register-id-list { display: grid; gap: 0.65rem; }
.register-id-primary {
    margin-inline-start: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(122, 22, 48, 0.1);
    color: var(--brand-maroon);
    vertical-align: middle;
}
.register-toggle-card {
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    background: #fafcff;
    margin-top: 0.5rem;
}
.register-toggle-card span { display: grid; gap: 0.2rem; }
.register-toggle-card strong { font-size: 0.95rem; }
.register-toggle-card small { font-weight: 600; line-height: 1.4; }
#register-estimated-years-wrap:not(.is-active) { opacity: 0.55; }
#register-dob-field.is-muted { opacity: 0.55; }
#register-provisional-reason-wrap:not(.is-visible) { display: none; }

.register-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(12, 36, 64, 0.08);
    position: sticky;
    bottom: 0.75rem;
    z-index: 2;
}
.register-foot-note { margin: 0; max-width: 22rem; font-size: 0.88rem; }
.register-submit { min-width: 8rem; }
.register-actions { margin: 0; }
.register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.register-span-all { grid-column: 1 / -1; }
.register-id-block {
    margin-top: 0.75rem;
    padding: 0.85rem;
    border: 1px dashed var(--line);
    border-radius: 0.95rem;
    background: #f8fbfe;
}
.register-id-title { margin: 0 0 0.45rem; font-weight: 800; color: #0c5eaa; }
.register-check {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    grid-template-columns: none;
    font-weight: 700;
}
.register-check input { width: auto; min-height: 1.1rem; }
.register-note { margin: 0.65rem 0 0; font-size: 0.92rem; }
.register-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin: 0.85rem 0 0;
}

@media (max-width: 860px) {
    .register-grid { grid-template-columns: 1fr; }
}

/* EMR clinical desk */
.emr-desk { display: grid; gap: 1.1rem; max-width: 80rem; }
.emr-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: end;
    padding: 1.5rem 1.55rem;
    border-radius: 1.4rem;
    color: #fff;
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(110, 231, 183, 0.22), transparent 58%),
        linear-gradient(135deg, #064e3b 0%, #047857 46%, #065f46 100%);
    box-shadow: 0 22px 48px rgba(6, 78, 59, 0.32);
    border: 1px solid rgba(110, 231, 183, 0.22);
}
.emr-kicker { margin: 0; font-weight: 800; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; color: #a7f3d0; }
.emr-hero h1 { margin: 0.25rem 0 0; color: #fff; font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
.emr-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin: 0.45rem 0 0; color: #d1fae5; font-weight: 600; }
.emr-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0, 0, 0, 0.22); font-variant-numeric: tabular-nums; }
.emr-lead { margin: 0.45rem 0 0; color: #bbf7d0; max-width: 40rem; line-height: 1.5; }
.emr-hero-actions { display: flex; flex-direction: column; gap: 0.4rem; min-width: 10.5rem; }
.emr-cta {
    display: flex; justify-content: center; padding: 0.55rem 0.9rem; border-radius: 0.75rem;
    background: #fff; color: #065f46; font-weight: 900; text-decoration: none; text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}
.emr-ghost {
    display: flex; justify-content: center; padding: 0.5rem 0.85rem; border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 800; text-decoration: none;
}
.emr-alert {
    display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center;
    padding: 0.85rem 1rem; border-radius: 1rem; border: 1px solid #fcd34d; background: #fffbeb; color: var(--ink);
}
.emr-alert-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: #f59e0b; color: #fff; }
.emr-alert em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; margin-top: 0.15rem; }
.emr-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.6rem; }
.emr-metric { padding: 0.8rem 0.9rem; border-radius: 1rem; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 22px rgba(12, 36, 64, 0.05); }
.emr-metric.is-warn { border-color: #fecaca; background: linear-gradient(180deg, #fff7f7, #fff); }
.emr-metric span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.emr-metric strong { display: block; margin-top: 0.1rem; font-size: 1.45rem; color: #047857; font-variant-numeric: tabular-nums; }
.emr-workflow header h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.emr-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.emr-workflow-card { padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff; box-shadow: 0 12px 28px rgba(12, 36, 64, 0.05); }
.emr-workflow-care { border-top: 3px solid #047857; }
.emr-workflow-chart { border-top: 3px solid #1b93ef; }
.emr-workflow-orders { border-top: 3px solid #d97706; }
.emr-workflow-card h3 { margin: 0; font-size: 0.96rem; }
.emr-workflow-card ul { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.emr-workflow-card a { display: block; padding: 0.45rem 0.6rem; border-radius: 0.55rem; border: 1px solid var(--line); font-weight: 800; font-size: 0.86rem; text-decoration: none; color: var(--ink); }
.emr-workflow-card a.is-primary { background: #047857; color: #fff; border-color: transparent; }
.emr-board { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 0.85rem; align-items: start; }
.emr-panel { background: #fff; border: 1px solid var(--line); border-radius: 1.15rem; overflow: hidden; box-shadow: 0 14px 36px rgba(12, 36, 64, 0.06); }
.emr-panel-wide { grid-column: 1; }
.emr-panel-head { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.emr-panel-head h2 { margin: 0; font-size: 1rem; color: #065f46; }
.emr-table-wrap { overflow-x: auto; }
.emr-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.emr-table th, .emr-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.emr-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #f8fafc; }
.emr-table tbody tr:hover { background: #f0fdf4; }
.emr-table tbody tr.is-urgent { background: #fff7ed; }
.emr-link { font-weight: 800; color: #047857; text-decoration: none; }
.emr-link:hover { text-decoration: underline; }
.emr-sub { display: block; font-size: 0.8rem; }
.emr-pill { display: inline-block; padding: 0.15rem 0.45rem; border-radius: 0.4rem; font-size: 0.72rem; font-weight: 800; background: #e2e8f0; color: #334155; }
.emr-pill.priority-emergency, .emr-pill.priority-urgent { background: #fee2e2; color: #b91c1c; }
.emr-pill.priority-stat { background: #fecaca; color: #991b1b; }
.emr-pill.status-in_progress { background: #dbeafe; color: #1e40af; }
.emr-time { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.82rem; }
.emr-row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 9rem; }
.emr-aside { display: grid; gap: 0.75rem; }
.emr-draft-list, .emr-clinic-list { list-style: none; margin: 0; padding: 0.5rem 1rem 0.85rem; display: grid; gap: 0.55rem; }
.emr-draft-list li, .emr-clinic-list li { padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.emr-draft-list li.is-stat { border-inline-start: 3px solid #dc2626; padding-inline-start: 0.45rem; }
.emr-draft-list a { color: inherit; text-decoration: none; display: grid; gap: 0.1rem; }
.emr-draft-list span { color: var(--muted); font-size: 0.82rem; }

.lis-desk { display: grid; gap: 1rem; }
.lis-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(16rem, 1.15fr) minmax(14rem, 0.85fr);
    gap: 1.25rem;
    align-items: end;
    padding: 1.7rem 1.5rem;
    border-radius: 1.45rem;
    color: #fff;
    background:
        radial-gradient(420px 200px at 0 100%, rgba(12, 143, 106, 0.35), transparent 62%),
        linear-gradient(128deg, #041612 0%, #0a5c48 42%, #12a884 100%);
    box-shadow: 0 22px 46px rgba(6, 48, 38, 0.28);
}
.lis-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
    pointer-events: none;
}
.lis-hero > * { position: relative; }
.lis-kicker {
    display: inline-flex;
    margin: 0 0 0.4rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}
.lis-hero-main { position: relative; }
.lis-hero h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 3vw, 2.45rem); }
.lis-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin: 0.4rem 0 0; color: #dcf5ee; font-weight: 600; }
.lis-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0, 0, 0, 0.22); font-variant-numeric: tabular-nums; }
.lis-lead { margin: 0.4rem 0 0; color: #dcf5ee; max-width: 38rem; line-height: 1.5; }
.lis-hero-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.lis-cta {
    display: inline-flex; justify-content: center; padding: 0.55rem 0.95rem; border-radius: 0.75rem;
    background: #fff; color: #0a5c48; font-weight: 900; text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}
.lis-ghost {
    display: inline-flex; justify-content: center; padding: 0.5rem 0.9rem; border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 800; text-decoration: none;
}
.lis-alert {
    display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center;
    padding: 0.85rem 1rem; border-radius: 1rem; border: 1px solid #fcd34d; background: #fffbeb; color: var(--ink);
}
.lis-alert-stat { border-color: #fecaca; background: #fef2f2; }
.lis-alert-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: #f59e0b; color: #fff; }
.lis-alert-stat .lis-alert-icon { background: #dc2626; }
.lis-alert em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; margin-top: 0.15rem; }
.lis-integration {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 1.1rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.lis-integration strong { display: block; color: #fff; }
.lis-integration p { margin: 0.25rem 0 0; color: #c8ebe2; font-size: 0.92rem; }
.lis-integration.is-live {
    background: rgba(18, 168, 132, 0.22);
    border-color: rgba(255, 255, 255, 0.22);
}
.lis-integration.is-live .lis-integration-dot {
    background: #5dffb8;
    box-shadow: 0 0 0 4px rgba(93, 255, 184, 0.25);
}
.lis-endpoint code {
    display: block;
    overflow-x: auto;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    background: #f4f8fc;
    font-size: 0.82rem;
}
.lis-integration-panel form { display: grid; gap: 0.55rem; margin-top: 0.55rem; }

.lis-integration-dot {
    flex-shrink: 0;
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #ffb020;
    box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.25);
}

.lis-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.6rem; }
.lis-metric {
    padding: 0.8rem 0.9rem; border-radius: 1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.05);
}
.lis-metric.is-warn { border-color: #fecaca; background: linear-gradient(180deg, #fff7f7, #fff); }
.lis-metric span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.lis-metric strong { display: block; margin-top: 0.1rem; font-size: 1.45rem; color: #0a5c48; font-variant-numeric: tabular-nums; }
.lis-workflow header h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.lis-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.lis-workflow-card {
    padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 12px 28px rgba(12, 36, 64, 0.05);
}
.lis-workflow-bench { border-top: 3px solid #0a5c48; }
.lis-workflow-sites { border-top: 3px solid #1b93ef; }
.lis-workflow-interop { border-top: 3px solid #7c3aed; }
.lis-workflow-card h3 { margin: 0; font-size: 0.96rem; }
.lis-workflow-card ul { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.lis-workflow-card a {
    display: block; padding: 0.45rem 0.6rem; border-radius: 0.55rem; border: 1px solid var(--line);
    font-weight: 800; font-size: 0.86rem; text-decoration: none; color: var(--ink);
}
.lis-workflow-card a.is-primary { background: #0a5c48; color: #fff; border-color: transparent; }
.lis-metrics article {
    padding: 1rem 1.05rem;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #fff 0%, #f2fbf8 100%);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
    border-inline-start: 5px solid #12a884;
}
.lis-metrics span { color: var(--muted); font-weight: 800; }
.lis-metrics strong { display: block; margin-top: 0.15rem; font-size: 2.2rem; color: #0a5c48; font-variant-numeric: tabular-nums; }

.lis-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; }
.lis-action {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.06);
    text-decoration: none;
    color: var(--ink);
}
.lis-action.is-primary { border-color: #12a884; background: linear-gradient(180deg, #fff 0%, #eefaf6 100%); }
.lis-action .step {
    grid-row: span 2;
    font-size: 1.35rem;
    font-weight: 900;
    color: #12a884;
    font-variant-numeric: tabular-nums;
}
.lis-action strong { font-size: 1.02rem; }

.lis-panel {
    background: #fff; border: 1px solid var(--line); border-radius: 1.15rem; overflow: hidden;
    box-shadow: 0 14px 36px rgba(12, 36, 64, 0.06);
}
.lis-panel-wide { min-width: 0; }
.lis-panel-head {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; align-items: flex-start;
    padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); background: #f8fafc;
}
.lis-panel-head h2 { margin: 0; font-size: 1rem; color: #0a5c48; }

.lis-worklist-panel { border-color: #c5e8dc; box-shadow: 0 18px 40px rgba(10, 92, 72, 0.1); }
.lis-worklist-head {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: flex-start;
    padding: 1.05rem 1.15rem; border-bottom: 1px solid #dceee8;
    background: linear-gradient(180deg, #f8fdfb 0%, #fff 100%);
}
.lis-worklist-kicker {
    display: inline-flex; margin: 0 0 0.35rem; padding: 0.12rem 0.6rem; border-radius: 999px;
    background: #dcf5ee; color: #0a5c48; font-weight: 800; font-size: 0.72rem;
}
.lis-worklist-head h2 { margin: 0; font-size: 1.15rem; color: #0a5c48; }
.lis-worklist-head-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; justify-content: flex-end; }
.lis-worklist-count {
    padding: 0.35rem 0.7rem; border-radius: 999px; background: #0a5c48; color: #fff;
    font-weight: 900; font-size: 0.82rem; font-variant-numeric: tabular-nums;
}
.lis-worklist-list { display: grid; gap: 0.65rem; padding: 1rem 1.05rem 1.15rem; }
.lis-order-card {
    position: relative; display: grid; grid-template-columns: 0.35rem minmax(0, 1fr) auto;
    gap: 0; align-items: stretch; border-radius: 1rem; border: 1px solid #dceee8;
    background: linear-gradient(180deg, #fff 0%, #f6fbf9 100%);
    overflow: hidden; transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.lis-order-card:hover { border-color: #9fd9c8; box-shadow: 0 12px 28px rgba(10, 92, 72, 0.08); }
.lis-order-card.is-stat { border-color: #fecaca; background: linear-gradient(180deg, #fff7f7 0%, #fff1f2 100%); }
.lis-order-card.is-stat .lis-order-card-strip { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.lis-order-card-strip { background: linear-gradient(180deg, #12a884, #0a5c48); }
.lis-order-card-main { padding: 0.9rem 1rem; min-width: 0; }
.lis-order-card-top {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem 0.75rem; align-items: center;
    margin-bottom: 0.65rem;
}
.lis-order-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 900; font-size: 0.95rem;
    color: #0a5c48; text-decoration: none;
}
.lis-order-number:hover { text-decoration: underline; }
.lis-order-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.lis-order-when { display: grid; text-align: end; font-variant-numeric: tabular-nums; line-height: 1.25; }
.lis-order-date { font-size: 0.78rem; font-weight: 800; color: var(--ink); }
.lis-order-time { font-size: 0.76rem; color: var(--muted); }
.lis-order-patient { display: flex; gap: 0.65rem; align-items: center; margin-bottom: 0.65rem; }
.lis-order-avatar {
    width: 2.35rem; height: 2.35rem; border-radius: 0.75rem; display: grid; place-items: center;
    font-weight: 900; color: #0a5c48; background: #ecfdf5; border: 1px solid #a7f3d0; flex-shrink: 0;
}
.lis-order-patient-text strong { font-size: 1.02rem; }
.lis-order-ids { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.25rem 0 0; }
.lis-id-chip {
    padding: 0.12rem 0.45rem; border-radius: 0.4rem; font-size: 0.74rem; font-weight: 800;
    background: #f1f5f9; color: #475569; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.lis-id-chip--enc { background: #eff6ff; color: #1e40af; }
.lis-order-tests-block {
    padding: 0.65rem 0.75rem; border-radius: 0.75rem; border: 1px dashed #c5e8dc; background: rgba(255, 255, 255, 0.72);
}
.lis-order-tests-title {
    margin: 0 0 0.4rem; font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b;
    display: flex; align-items: center; gap: 0.4rem;
}
.lis-order-tests-count {
    display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem;
    border-radius: 999px; background: #0a5c48; color: #fff; font-size: 0.68rem;
}
.lis-order-tests { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.lis-order-tests li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; align-items: baseline; font-size: 0.88rem; }
.lis-order-tests code {
    padding: 0.08rem 0.35rem; border-radius: 0.35rem; background: #ecfdf5; color: #047857; font-size: 0.72rem; font-weight: 800;
}
.lis-order-tests li span { color: var(--ink); line-height: 1.35; }
.lis-order-tests-more { grid-column: 1 / -1; font-size: 0.82rem; }
.lis-order-no-tests { margin: 0; font-size: 0.86rem; }
.lis-order-card-actions {
    display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; padding: 0.85rem 1rem;
    border-inline-start: 1px solid #e2efe9; background: rgba(248, 252, 250, 0.9); min-width: 9.5rem;
}
.lis-order-card-actions .button { justify-content: center; text-align: center; white-space: nowrap; }
.lis-worklist-empty {
    padding: 2rem 1rem; text-align: center; border: 1px dashed var(--line); border-radius: 1rem; color: var(--muted);
}

.lis-table-wrap { overflow-x: auto; }
.lis-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.lis-table th, .lis-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.lis-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #f8fafc; }
.lis-table tbody tr:hover { background: #f0fdf9; }
.lis-table tbody tr.is-stat { background: #fff1f2; }
.lis-link { font-weight: 800; color: #0a5c48; text-decoration: none; }
.lis-link:hover { text-decoration: underline; }
.lis-sub { display: block; font-size: 0.8rem; }
.lis-pill { display: inline-block; padding: 0.15rem 0.45rem; border-radius: 0.4rem; font-size: 0.72rem; font-weight: 800; background: #e2e8f0; color: #334155; }
.lis-pill.priority-stat, .lis-pill.priority-emergency, .lis-pill.priority-urgent { background: #fecaca; color: #991b1b; }
.lis-pill.status-signed { background: #d1fae5; color: #065f46; }
.lis-pill.status-draft { background: #fef3c7; color: #92400e; }
.lis-pill.status-cancelled { background: #e2e8f0; color: #64748b; }
.lis-time { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.82rem; }
.lis-row-actions { min-width: 7rem; }
.lis-test-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; max-width: 14rem; }
.lis-test-chip {
    padding: 0.1rem 0.4rem; border-radius: 0.35rem; font-size: 0.72rem; font-weight: 800;
    background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
}
.lis-test-more { font-size: 0.75rem; }
.lis-aside { display: grid; gap: 0.75rem; }
.lis-side-panel { padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff; box-shadow: 0 12px 28px rgba(12, 36, 64, 0.05); }
.lis-side-panel h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.lis-form-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.lis-location-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.lis-location-list li { padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); font-size: 0.88rem; display: grid; gap: 0.1rem; }
.lis-location-list li:last-child { border-bottom: 0; }

.lis-board {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.65fr);
    gap: 1rem;
    align-items: start;
}
.lis-worklist {
    padding: 1rem 1.05rem 1.1rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.lis-worklist-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.lis-worklist h2 { margin: 0; }
.lis-order {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.75rem;
    align-items: center;
    padding: 0.85rem 0.9rem;
    margin-top: 0.55rem;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    background: #f8fbfe;
}
.lis-order.is-stat {
    border-color: #e8a020;
    background: linear-gradient(90deg, #fff9ed 0%, #fff 55%);
    box-shadow: inset 4px 0 0 #e8a020;
}
.lis-order-main strong { font-size: 1.05rem; color: #0a5c48; }
.lis-order-main p { margin: 0.15rem 0 0; }
.lis-order-tags {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.lis-order .button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.pill.priority.stat { background: #fff0d6; color: #9a5a00; }

.lis-side { display: grid; gap: 0.85rem; }
.lis-panel {
    padding: 1rem 1.05rem;
    border-radius: 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(12, 36, 64, 0.07);
}
.lis-panel h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.lis-settings form { display: grid; gap: 0.65rem; margin-top: 0.65rem; }
.lis-check {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}
.lis-check input { width: auto; min-height: 1.1rem; }
.lis-location {
    display: grid;
    gap: 0.1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}
.lis-location:last-child { border-bottom: 0; }

.lab-result-card {
    margin-top: 0.85rem;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff 0%, #f7fcfa 100%);
}
.lab-result-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}
.lab-result-table-wrap { overflow-x: auto; margin-top: 0.65rem; }
.lab-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.lab-result-table th,
.lab-result-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--line);
    text-align: start;
}
.lab-result-table tr.is-abnormal td { color: #9a5a00; font-weight: 700; }
.lab-result-table tr.lab-severity-normal td,
.lab-result-entry-table tr.lab-severity-normal td { color: var(--text); }
.lab-result-table tr.lab-severity-low td,
.lab-result-entry-table tr.lab-severity-low td { color: #9a5a00; font-weight: 600; }
.lab-result-table tr.lab-severity-high td,
.lab-result-entry-table tr.lab-severity-high td { color: #b45309; font-weight: 700; }
.lab-result-table tr.lab-severity-critical_low td,
.lab-result-table tr.lab-severity-critical_high td,
.lab-result-entry-table tr.lab-severity-critical_low td,
.lab-result-entry-table tr.lab-severity-critical_high td {
    color: #b91c1c;
    font-weight: 800;
    background: #fef2f2;
}
.lab-flag-badge {
    display: inline-block;
    margin-inline-start: 0.35rem;
    padding: 0.1rem 0.35rem;
    border-radius: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    background: #fee2e2;
    color: #991b1b;
    vertical-align: middle;
}
.lab-severity-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.lab-severity-pill-normal { background: #ecfdf5; color: #047857; }
.lab-severity-pill-low { background: #fffbeb; color: #b45309; }
.lab-severity-pill-high { background: #ffedd5; color: #c2410c; }
.lab-severity-pill-critical_low,
.lab-severity-pill-critical_high { background: #fee2e2; color: #b91c1c; }
.lab-entry-ref-label { font-size: 0.85rem; color: #0a5c48; font-weight: 600; }
.catalog-filter-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.lab-ref-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    gap: 0.35rem 0.5rem;
    align-items: end;
    min-width: 18rem;
}
.lab-ref-admin-grid label span {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 0.15rem;
}
.lab-ref-admin-grid input {
    width: 100%;
    padding: 0.35rem 0.4rem;
    font-size: 0.85rem;
}
.lab-ref-admin-grid button { grid-column: 1 / -1; justify-self: start; margin-top: 0.25rem; }
.lab-result-form { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--line); }
.lab-result-form-pro {
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #f6fbf9, #fff);
    border: 1px solid #cfece2;
}
.lab-result-form-head h3 { margin: 0 0 0.25rem; color: #0a5c48; font-size: 0.95rem; }
.lab-result-form-head p { margin: 0 0 0.65rem; font-size: 0.82rem; }
.lab-result-entry-table-wrap { overflow-x: auto; margin-bottom: 0.65rem; }
.lab-result-entry-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.lab-result-entry-table th,
.lab-result-entry-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid #dceee8;
    text-align: start;
    vertical-align: middle;
}
.lab-result-entry-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0a5c48;
    background: #ecf8f4;
}
.lab-result-entry-table code {
    font-size: 0.75rem;
    padding: 0.15rem 0.35rem;
    border-radius: 0.35rem;
    background: #fff;
    color: #0a5c48;
    font-weight: 800;
}
.lab-entry-test-name { font-weight: 700; line-height: 1.35; }
.lab-entry-value {
    width: 100%;
    min-width: 5.5rem;
    font-weight: 800;
    border-color: #12a884;
}
.lab-entry-value:focus {
    box-shadow: 0 0 0 2px rgba(18, 168, 132, 0.25);
}
.lab-result-form-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.45rem;
}

@media (max-width: 960px) {
    .lab-result-form-row { grid-template-columns: 1fr 1fr; }
    .lis-hero { grid-template-columns: 1fr; }
    .lis-workflow-grid { grid-template-columns: 1fr; }
    .lis-board { grid-template-columns: 1fr; }
    .lis-order-card { grid-template-columns: 0.3rem 1fr; }
    .lis-order-card-top { grid-template-columns: 1fr; }
    .lis-order-badges, .lis-order-when { justify-self: start; text-align: start; }
    .lis-order-card-actions {
        grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; border-inline-start: 0;
        border-top: 1px solid #e2efe9; min-width: 0;
    }
    .lis-order { grid-template-columns: 1fr; }
    .lis-order .button { grid-column: 1; grid-row: auto; justify-self: start; }
}

.ris-desk { display: grid; gap: 1rem; }
.ris-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(16rem, 1.15fr) minmax(14rem, 0.85fr);
    gap: 1.25rem;
    align-items: end;
    padding: 1.7rem 1.5rem;
    border-radius: 1.45rem;
    color: #fff;
    background:
        radial-gradient(420px 200px at 100% 0, rgba(120, 160, 255, 0.35), transparent 62%),
        linear-gradient(128deg, #0a1024 0%, #1a3a8a 45%, #3d6fd8 100%);
    box-shadow: 0 22px 46px rgba(8, 24, 72, 0.28);
}
.ris-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
    pointer-events: none;
}
.ris-hero > * { position: relative; }
.ris-kicker, .chart-ris-kicker {
    display: inline-flex;
    margin: 0 0 0.4rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}
.ris-hero h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 3vw, 2.45rem); }
.ris-date, .ris-lead { margin: 0.35rem 0 0; color: #dbe6ff; }
.ris-pacs {
    display: flex;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 1.1rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.ris-pacs-dot {
    flex-shrink: 0;
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #ffb020;
    box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.25);
}
.ris-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.ris-metrics article {
    padding: 1rem;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #fff 0%, #f2f6ff 100%);
    border-inline-start: 5px solid #3d6fd8;
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.ris-metrics span { color: var(--muted); font-weight: 800; }
.ris-metrics strong { display: block; font-size: 2.2rem; color: #1a3a8a; font-variant-numeric: tabular-nums; }
.ris-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; }
.ris-action {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
}
.ris-action.is-primary { border-color: #3d6fd8; background: linear-gradient(180deg, #fff 0%, #eef3ff 100%); }
.ris-action .step { grid-row: span 2; font-weight: 900; color: #3d6fd8; font-size: 1.35rem; }
.ris-board { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.65fr); gap: 1rem; }
.ris-worklist, .ris-panel {
    padding: 1rem 1.05rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.ris-study {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.75rem;
    align-items: center;
    padding: 0.85rem;
    margin-top: 0.55rem;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    background: #f8fbfe;
}
.ris-study.is-stat { border-color: #e8a020; box-shadow: inset 4px 0 0 #e8a020; }
.ris-study-actions { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 0.35rem; justify-items: end; }
.ris-study-tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ris-side { display: grid; gap: 0.85rem; }
.ris-settings form, .ris-study-form { display: grid; gap: 0.65rem; }
.ris-check { display: flex !important; flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 700; }
.ris-check input { width: auto; }
.ris-location { display: grid; gap: 0.1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.ris-study-desk { display: grid; gap: 1rem; }
.ris-study-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.35rem;
    border-radius: 1.2rem;
    color: #fff;
    background: linear-gradient(128deg, #0a1024 0%, #1a3a8a 50%, #3d6fd8 100%);
}
.ris-study-hero h1 { margin: 0; color: #fff; }
.ris-study-hero-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.ris-study-hero .button { background: rgba(255, 255, 255, 0.95); color: #1a3a8a; }
.ris-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
    margin-top: 0.65rem;
}
.ris-gallery.compact { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.ris-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.65rem;
    border: 1px solid var(--line);
    background: #eef3ff;
}
.ris-gallery figure { margin: 0; }
.ris-gallery figcaption { font-size: 0.78rem; margin-top: 0.25rem; }
.ris-form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ris-report-text { white-space: pre-wrap; line-height: 1.55; }
.chart-radiology {
    border-color: #c5d4f5;
    background: linear-gradient(180deg, #fff 0%, #f5f8ff 100%);
}
.chart-desk.is-ris-focus .chart-radiology {
    box-shadow: 0 0 0 3px rgba(61, 111, 216, 0.35), 0 18px 36px rgba(12, 36, 64, 0.12);
}
.chart-nav-ris { font-weight: 800; color: #1a3a8a !important; }
.chart-ris-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.chart-ris-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}
.chart-ris-metrics article {
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid #c5d4f5;
}
.chart-ris-metrics strong { color: #1a3a8a; font-size: 1.65rem; }
.ris-chart-card {
    margin-top: 0.75rem;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
}

.pharmacy-desk { display: grid; gap: 1rem; }
.pharmacy-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(16rem, 1.15fr) minmax(14rem, 0.85fr);
    gap: 1.25rem;
    align-items: end;
    padding: 1.7rem 1.5rem;
    border-radius: 1.45rem;
    color: #fff;
    background:
        radial-gradient(420px 200px at 0 100%, rgba(168, 88, 200, 0.32), transparent 62%),
        linear-gradient(128deg, #1a0a24 0%, #6b2d8a 42%, #a855c8 100%);
    box-shadow: 0 22px 46px rgba(48, 12, 64, 0.28);
}
.pharmacy-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
    pointer-events: none;
}
.pharmacy-hero > * { position: relative; }
.pharmacy-kicker, .chart-pharmacy-kicker {
    display: inline-flex;
    margin: 0 0 0.4rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}
.pharmacy-hero h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 3vw, 2.45rem); }
.pharmacy-date, .pharmacy-lead { margin: 0.35rem 0 0; color: #f3e8ff; }
.pharmacy-inventory {
    display: flex;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 1.1rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.pharmacy-inventory-dot {
    flex-shrink: 0;
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #ffb020;
    box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.25);
}
.pharmacy-inventory.is-linked .pharmacy-inventory-dot {
    background: #3dd68c;
    box-shadow: 0 0 0 4px rgba(61, 214, 140, 0.28);
}
.pharmacy-hero-main { position: relative; }
.pharmacy-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin: 0.4rem 0 0; color: #f3e8ff; font-weight: 600; }
.pharmacy-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0, 0, 0, 0.22); font-variant-numeric: tabular-nums; }
.pharmacy-hero-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.pharmacy-cta {
    display: inline-flex; justify-content: center; padding: 0.55rem 0.95rem; border-radius: 0.75rem;
    background: #fff; color: #6b2d8a; font-weight: 900; text-decoration: none; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}
.pharmacy-ghost {
    display: inline-flex; justify-content: center; padding: 0.5rem 0.9rem; border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 800; text-decoration: none;
}
.pharmacy-alert {
    display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center;
    padding: 0.85rem 1rem; border-radius: 1rem; border: 1px solid #fcd34d; background: #fffbeb; color: var(--ink);
}
.pharmacy-alert-stat { border-color: #fecaca; background: #fef2f2; }
.pharmacy-alert-stock { border-color: #e9d5ff; background: #faf5ff; }
.pharmacy-alert-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: #f59e0b; color: #fff; font-size: 0.72rem; }
.pharmacy-alert-stat .pharmacy-alert-icon { background: #dc2626; }
.pharmacy-alert-stock .pharmacy-alert-icon { background: #9333ea; }
.pharmacy-alert em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; margin-top: 0.15rem; }
.pharmacy-metrics-block { display: grid; gap: 0.55rem; }
.pharmacy-metrics-head h2 { margin: 0; font-size: 1.05rem; color: #6b2d8a; }
.pharmacy-metrics-head p { margin: 0.2rem 0 0; }
.pharmacy-metric {
    padding: 0.8rem 0.9rem; border-radius: 1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 10px 22px rgba(48, 12, 64, 0.05);
}
.pharmacy-metric.is-warn { border-color: #fecaca; background: linear-gradient(180deg, #fff7f7, #fff); }
.pharmacy-metric span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.pharmacy-metric strong { display: block; margin-top: 0.1rem; font-size: 1.35rem; color: #6b2d8a; font-variant-numeric: tabular-nums; }
.pharmacy-retail-block .pharmacy-metric strong { color: #7c3aed; }
.pharmacy-workflow header h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.pharmacy-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.pharmacy-workflow-card {
    padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 12px 28px rgba(48, 12, 64, 0.05);
}
.pharmacy-workflow-clinical { border-top: 3px solid #6b2d8a; }
.pharmacy-workflow-retail { border-top: 3px solid #d97706; }
.pharmacy-workflow-sites { border-top: 3px solid #1b93ef; }
.pharmacy-workflow-card h3 { margin: 0; font-size: 0.96rem; }
.pharmacy-workflow-card ul { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.pharmacy-workflow-card a {
    display: block; padding: 0.45rem 0.6rem; border-radius: 0.55rem; border: 1px solid var(--line);
    font-weight: 800; font-size: 0.86rem; text-decoration: none; color: var(--ink);
}
.pharmacy-workflow-card a.is-primary { background: #6b2d8a; color: #fff; border-color: transparent; }
.pharmacy-worklist-panel { border-color: #e9d5ff; box-shadow: 0 18px 40px rgba(107, 45, 138, 0.12); overflow: hidden; }
.pharmacy-worklist-head {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: flex-start;
    padding: 1.05rem 1.15rem; border-bottom: 1px solid #ede9fe;
    background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
}
.pharmacy-worklist-kicker {
    display: inline-flex; margin: 0 0 0.35rem; padding: 0.12rem 0.6rem; border-radius: 999px;
    background: #f3e8ff; color: #6b2d8a; font-weight: 800; font-size: 0.72rem;
}
.pharmacy-worklist-head h2 { margin: 0; font-size: 1.15rem; color: #6b2d8a; }
.pharmacy-worklist-head-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.pharmacy-worklist-count {
    padding: 0.35rem 0.7rem; border-radius: 999px; background: #6b2d8a; color: #fff; font-weight: 900; font-size: 0.82rem;
}
.pharmacy-worklist-list { display: grid; gap: 0.65rem; padding: 1rem 1.05rem 1.15rem; }
.pharmacy-order-card {
    position: relative; display: grid; grid-template-columns: 0.35rem minmax(0, 1fr) auto;
    border-radius: 1rem; border: 1px solid #ede9fe; background: linear-gradient(180deg, #fff 0%, #faf5ff 100%); overflow: hidden;
}
.pharmacy-order-card.is-stat { border-color: #fcd34d; background: linear-gradient(180deg, #fffbeb 0%, #fff 100%); }
.pharmacy-order-card.needs-review { border-color: #c4b5fd; box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.15); }
.pharmacy-order-card-strip { background: linear-gradient(180deg, #a855c8, #6b2d8a); }
.pharmacy-order-card.is-stat .pharmacy-order-card-strip { background: linear-gradient(180deg, #f59e0b, #d97706); }
.pharmacy-order-card-main { padding: 0.9rem 1rem; min-width: 0; }
.pharmacy-order-card-top {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem 0.75rem; align-items: center; margin-bottom: 0.65rem;
}
.pharmacy-order-number { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 900; color: #6b2d8a; text-decoration: none; }
.pharmacy-order-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.pharmacy-pill { display: inline-block; padding: 0.15rem 0.45rem; border-radius: 0.4rem; font-size: 0.72rem; font-weight: 800; background: #e2e8f0; color: #334155; }
.pharmacy-pill.priority-stat, .pharmacy-pill.priority-urgent { background: #fecaca; color: #991b1b; }
.pharmacy-pill.status-signed { background: #d1fae5; color: #065f46; }
.pharmacy-pill.status-draft { background: #fef3c7; color: #92400e; }
.pharmacy-pill.pharmacy-none, .pharmacy-pill.pharmacy-pending { background: #ede9fe; color: #5b21b6; }
.pharmacy-pill.pharmacy-verified { background: #dbeafe; color: #1e40af; }
.pharmacy-pill.pharmacy-issued { background: #d1fae5; color: #047857; }
.pharmacy-pill.pharmacy-declined { background: #fee2e2; color: #b91c1c; }
.pharmacy-order-when { display: grid; text-align: end; font-variant-numeric: tabular-nums; line-height: 1.25; }
.pharmacy-order-date { font-size: 0.78rem; font-weight: 800; }
.pharmacy-order-time { font-size: 0.76rem; color: var(--muted); }
.pharmacy-order-patient { display: flex; gap: 0.65rem; align-items: center; margin-bottom: 0.55rem; }
.pharmacy-order-avatar {
    width: 2.35rem; height: 2.35rem; border-radius: 0.75rem; display: grid; place-items: center; font-weight: 900;
    color: #6b2d8a; background: #f3e8ff; border: 1px solid #e9d5ff; flex-shrink: 0;
}
.pharmacy-order-ids { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.25rem 0 0; }
.pharmacy-id-chip {
    padding: 0.12rem 0.45rem; border-radius: 0.4rem; font-size: 0.74rem; font-weight: 800; background: #f1f5f9; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.pharmacy-id-chip--enc { background: #eff6ff; color: #1e40af; }
.pharmacy-order-indication {
    margin-bottom: 0.55rem; padding: 0.5rem 0.65rem; border-radius: 0.65rem; background: #fff; border: 1px solid #ede9fe;
}
.pharmacy-order-indication span { font-size: 0.72rem; font-weight: 900; text-transform: uppercase; color: #64748b; }
.pharmacy-order-indication p { margin: 0.2rem 0 0; font-size: 0.88rem; line-height: 1.4; }
.pharmacy-order-rx-block {
    padding: 0.65rem 0.75rem; border-radius: 0.75rem; border: 1px dashed #d8b4fe; background: rgba(255, 255, 255, 0.8);
}
.pharmacy-order-rx-title { margin: 0 0 0.35rem; font-size: 0.72rem; font-weight: 900; text-transform: uppercase; color: #7c3aed; }
.pharmacy-order-rx-line { margin: 0; color: #6b2d8a; }
.pharmacy-order-card-actions {
    display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; padding: 0.85rem 1rem;
    border-inline-start: 1px solid #ede9fe; background: #faf5ff; min-width: 10rem;
}
.pharmacy-worklist-empty { padding: 2rem 1rem; text-align: center; border: 1px dashed var(--line); border-radius: 1rem; color: var(--muted); }
.pharmacy-aside { display: grid; gap: 0.75rem; }
.pharmacy-side-panel {
    padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 12px 28px rgba(48, 12, 64, 0.05);
}
.pharmacy-side-panel h2 { margin: 0 0 0.35rem; font-size: 1.02rem; }
.pharmacy-side-highlight { border-color: #e9d5ff; background: linear-gradient(180deg, #faf5ff, #fff); }
.pharmacy-retail-today strong { font-size: 1.8rem; color: #6b2d8a; }
.pharmacy-retail-revenue { margin: 0.35rem 0 0.65rem; font-weight: 900; color: #7c3aed; font-size: 1.1rem; }
.pharmacy-side-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pharmacy-stock-alert-list, .pharmacy-movement-list, .pharmacy-location-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.pharmacy-stock-alert-list li, .pharmacy-movement-list li, .pharmacy-location-list li {
    display: grid; gap: 0.1rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--line); font-size: 0.86rem;
}
.pharmacy-stock-alert-list li.is-out { border-inline-start: 3px solid #dc2626; padding-inline-start: 0.4rem; }
.pharmacy-stock-qty { font-weight: 900; color: #6b2d8a; }
.pharmacy-movement-type { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; color: #64748b; }
.pharmacy-movement-qty { font-weight: 900; }
.pharmacy-movement-when { font-size: 0.78rem; }
.pharmacy-retail-metrics { grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
.pharmacy-retail-desk { display: grid; gap: 1rem; }
.pharmacy-retail-grid {
    display: grid;
    grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1.15fr);
    gap: 1rem;
}
.pharmacy-add-product form,
.pharmacy-receive-form {
    display: grid;
    gap: 0.55rem;
}
.pharmacy-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.75fr);
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}
.pharmacy-movement {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
}
.pharmacy-cashier-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.pharmacy-pos-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(6rem, 7rem);
    gap: 0.75rem;
    align-items: end;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
}
.pharmacy-checkout { margin-top: 1rem; width: 100%; }

/* Pharmacy POS / cashier */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.pos-desk { display: grid; gap: 1.1rem; }
.pos-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto auto;
    gap: 1rem 1.25rem;
    align-items: end;
    padding: 1.65rem 1.5rem;
    border-radius: 1.45rem;
    color: #fff;
    background:
        radial-gradient(480px 220px at 100% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
        radial-gradient(420px 200px at 0 100%, rgba(168, 88, 200, 0.35), transparent 62%),
        linear-gradient(128deg, #120818 0%, #5a2475 38%, #9333ea 72%, #c084fc 100%);
    box-shadow: 0 24px 50px rgba(48, 12, 64, 0.32);
}
.pos-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    pointer-events: none;
}
.pos-hero > * { position: relative; z-index: 1; }
.pos-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.15rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
    font-size: 0.85rem;
}
.pos-hero h1 { margin: 0; color: #fff; font-size: clamp(1.65rem, 2.8vw, 2.35rem); line-height: 1.15; }
.pos-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.45rem 0 0;
    color: #f3e8ff;
    font-weight: 600;
}
.pos-clock {
    padding: 0.1rem 0.55rem;
    border-radius: 0.45rem;
    background: rgba(0, 0, 0, 0.22);
    font-variant-numeric: tabular-nums;
}
.pos-lead { margin: 0.5rem 0 0; max-width: 36rem; color: #ede9fe; line-height: 1.55; }
.pos-hero-stats {
    display: grid;
    gap: 0.55rem;
    min-width: 9rem;
}
.pos-hero-stats article {
    padding: 0.65rem 0.85rem;
    border-radius: 0.95rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.pos-hero-stats span { display: block; font-size: 0.78rem; color: #e9d5ff; }
.pos-hero-stats strong { font-size: 1.65rem; color: #fff; font-variant-numeric: tabular-nums; }
.pos-hero-actions { display: flex; flex-direction: column; gap: 0.45rem; justify-content: end; }
.pos-ghost-btn {
    display: inline-flex;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: #6b2d8a;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}
.pos-ghost-btn:hover { background: #fff; }
.pos-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 22rem);
    gap: 1rem;
    align-items: start;
}
.pos-catalog,
.pos-ticket {
    border-radius: 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 36px rgba(12, 36, 64, 0.09);
}
.pos-catalog { padding: 1rem 1.05rem 1.15rem; }
.pos-catalog-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.pos-catalog-head h2 { margin: 0; color: #6b2d8a; }
.pos-search-wrap { flex: 1 1 14rem; max-width: 22rem; margin-inline-start: auto; }
.pos-search {
    width: 100%;
    padding: 0.65rem 0.85rem 0.65rem 2.35rem;
    border-radius: 0.85rem;
    border: 1px solid #e9d5ff;
    background: #faf5ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%239333ea' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 0.75rem center;
    font: inherit;
}
.pos-search:focus {
    outline: 2px solid #a855c8;
    outline-offset: 1px;
    border-color: #c084fc;
}
[dir="rtl"] .pos-search {
    padding: 0.65rem 2.35rem 0.65rem 0.85rem;
    background-position: calc(100% - 0.75rem) center;
}
.pos-scan-dock {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border-radius: 1.15rem;
    background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
    border: 2px solid #d8b4fe;
    box-shadow: 0 12px 28px rgba(147, 51, 234, 0.12);
}
.pos-scan-icon {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    background: #6d28d9;
    color: #fff;
}
.pos-scan-field { display: grid; gap: 0.25rem; }
.pos-scan-field span { font-size: 0.78rem; font-weight: 800; color: #6b2d8a; }
.pos-barcode-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    border: 2px solid #c084fc;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    background: #fff;
}
.pos-barcode-input:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.2);
}
.pos-scan-hint { grid-column: 2; margin: 0; font-size: 0.82rem; }
.pos-scan-feedback {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 0.65rem;
    font-weight: 700;
    font-size: 0.88rem;
}
.pos-scan-feedback.is-ok { background: #ecfdf5; color: #047857; }
.pos-scan-feedback.is-error { background: #fef2f2; color: #b91c1c; }
.pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 0.75rem;
    max-height: min(62vh, 38rem);
    overflow: auto;
    padding-inline-end: 0.15rem;
}
.pos-grid-products { grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); }
.pos-card,
.pos-product-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0.8rem;
    border-radius: 1rem;
    border: 1px solid #ede9fe;
    background: linear-gradient(180deg, #fff 0%, #fdfaff 100%);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.pos-card:hover:not(.is-disabled),
.pos-product-card:hover:not(.is-disabled) {
    border-color: #d8b4fe;
    box-shadow: 0 10px 22px rgba(147, 51, 234, 0.12);
    transform: translateY(-1px);
}
.pos-card.is-in-cart,
.pos-product-card.is-in-cart {
    border-color: #a855c8;
    box-shadow: inset 0 0 0 1px #a855c8, 0 12px 24px rgba(147, 51, 234, 0.15);
}
.pos-product-card.is-scan-flash {
    animation: pos-scan-pulse 0.65s ease;
}
@keyframes pos-scan-pulse {
    0% { box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.55); }
    100% { box-shadow: 0 0 0 14px rgba(147, 51, 234, 0); }
}
.pos-card.is-disabled,
.pos-product-card.is-disabled { opacity: 0.55; }
.pos-product-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.pos-product-icon {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, #ede9fe, #f3e8ff);
    color: #7e22ce;
    font-size: 0.72rem;
    font-weight: 900;
}
.pos-product-meta {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem;
    align-items: center;
}
.pos-barcode-block {
    margin: 0.35rem 0 0.5rem;
    padding: 0.45rem 0.5rem 0.35rem;
    border-radius: 0.55rem;
    background: #fff;
    border: 1px solid #e5e7eb;
}
.pos-barcode-bars {
    display: flex;
    align-items: stretch;
    gap: 1px;
    height: 2.35rem;
    padding: 0.15rem 0.25rem;
    background: #fff;
}
.pos-barcode-bar {
    display: block;
    min-width: 2px;
    background: #111827;
    border-radius: 1px;
}
.pos-barcode-bar.w-1 { flex: 1; }
.pos-barcode-bar.w-2 { flex: 2; }
.pos-barcode-bar.w-3 { flex: 3; }
.pos-barcode-bar.w-4 { flex: 4; }
.pos-barcode-guard { margin-inline-start: 4px; }
.pos-barcode-digits {
    display: block;
    margin-top: 0.25rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #374151;
}
.pos-product-name {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    min-height: 2.6em;
}
.pos-product-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 0.5rem;
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    border-top: 1px dashed #ede9fe;
}
.inv-barcode {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #4338ca;
}
.pos-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.35rem; }
.pos-card-sku {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #9333ea;
}
.pos-badge-ok,
.pos-badge-warn {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
}
.pos-badge-ok { background: #ecfdf5; color: #047857; }
.pos-badge-warn { background: #fef2f2; color: #b91c1c; }
.pos-card-name { margin: 0; font-size: 0.95rem; line-height: 1.35; color: var(--ink); }
.pos-card-price { margin: 0; display: flex; align-items: baseline; gap: 0.35rem; }
.pos-card-price strong { font-size: 1.25rem; color: #6b2d8a; font-variant-numeric: tabular-nums; }
.pos-card-price span { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.pos-qty-control {
    display: grid;
    grid-template-columns: 2.25rem 1fr 2.25rem;
    gap: 0.35rem;
    margin-top: 0.25rem;
}
.pos-qty-btn {
    display: grid;
    place-items: center;
    border: 1px solid #e9d5ff;
    border-radius: 0.65rem;
    background: #faf5ff;
    color: #7e22ce;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
}
.pos-qty-btn:hover:not(:disabled) { background: #f3e8ff; border-color: #d8b4fe; }
.pos-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pos-qty-input {
    text-align: center;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border-radius: 0.65rem;
    border: 1px solid var(--line);
    padding: 0.45rem 0.25rem;
}
.pos-ticket {
    position: sticky;
    top: 0.75rem;
    padding: 1rem 1.05rem 1.15rem;
    background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
    border-color: #e9d5ff;
}
.pos-ticket-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}
.pos-ticket-head h2 { margin: 0; font-size: 1.1rem; color: #6b2d8a; }
.pos-text-btn {
    border: 0;
    background: none;
    color: #9333ea;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
}
.pos-ticket-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 14rem;
    overflow: auto;
}
.pos-ticket-line {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed #e9d5ff;
    font-variant-numeric: tabular-nums;
}
.pos-ticket-line strong { display: block; font-size: 0.88rem; }
.pos-ticket-line .muted { font-size: 0.78rem; }
.pos-ticket-empty { margin: 0.5rem 0 0; font-size: 0.88rem; }
.pos-ticket-summary {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 2px solid #e9d5ff;
}
.pos-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.25rem 0;
    font-weight: 700;
}
.pos-summary-total {
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    font-size: 1.05rem;
}
.pos-summary-total strong { font-size: 1.35rem; color: #6b2d8a; font-variant-numeric: tabular-nums; }
.pos-pay-fieldset {
    margin: 0.85rem 0 0;
    padding: 0;
    border: 0;
}
.pos-pay-fieldset legend {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
}
.pos-pay-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.pos-pay-pill {
    position: relative;
    display: block;
    cursor: pointer;
}
.pos-pay-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.pos-pay-pill span {
    display: block;
    padding: 0.5rem 0.35rem;
    border-radius: 0.65rem;
    border: 1px solid #e9d5ff;
    background: #fff;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: #6b2d8a;
}
.pos-pay-pill.is-active span,
.pos-pay-pill input:focus-visible + span {
    border-color: #a855c8;
    background: #f3e8ff;
    box-shadow: 0 0 0 2px rgba(168, 85, 200, 0.35);
}
.pos-checkout-btn {
    display: grid;
    gap: 0.15rem;
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: 0.95rem;
    cursor: pointer;
    color: #fff;
    font: inherit;
    font-weight: 800;
    background: linear-gradient(135deg, #7e22ce 0%, #a855c8 45%, #c084fc 100%);
    box-shadow: 0 14px 28px rgba(126, 34, 206, 0.35);
    transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.pos-checkout-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(126, 34, 206, 0.42);
}
.pos-checkout-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}
.pos-checkout-label { font-size: 0.88rem; opacity: 0.95; }
.pos-checkout-amount { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pos-recent {
    padding: 0.85rem 1rem;
    border-radius: 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
}
.pos-recent h2 { margin: 0 0 0.65rem; font-size: 1rem; color: #6b2d8a; }
.pos-recent-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.pos-recent-chip {
    display: grid;
    gap: 0.05rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #ede9fe;
    background: #fdfaff;
    text-decoration: none;
    color: var(--ink);
    min-width: 9rem;
}
.pos-recent-chip:hover { border-color: #c084fc; }
.pos-recent-chip strong { font-size: 0.82rem; color: #6b2d8a; }
.pos-recent-chip time { font-size: 0.72rem; color: var(--muted); }
.pos-empty-state {
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: 1.2rem;
    background: #faf5ff;
    border: 1px dashed #d8b4fe;
}
.pos-no-results { margin: 0.75rem 0 0; text-align: center; }

/* Pharmacy inventory desk */
.inv-desk { display: grid; gap: 1.1rem; }
.inv-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) auto auto;
    gap: 1rem 1.25rem;
    align-items: end;
    padding: 1.65rem 1.5rem;
    border-radius: 1.45rem;
    color: #fff;
    background:
        radial-gradient(460px 210px at 0 0%, rgba(255, 255, 255, 0.1), transparent 58%),
        radial-gradient(400px 190px at 100% 100%, rgba(157, 180, 196, 0.32), transparent 60%),
        linear-gradient(132deg, var(--brand-night) 0%, var(--brand-maroon-deep) 38%, var(--brand-maroon) 72%, var(--brand-maroon-light) 100%);
    box-shadow: 0 24px 50px rgba(74, 18, 28, 0.22);
}
.inv-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
    pointer-events: none;
}
.inv-hero > * { position: relative; z-index: 1; }
.inv-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.15rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
    font-size: 0.85rem;
}
.inv-hero h1 { margin: 0; color: #fff; font-size: clamp(1.65rem, 2.8vw, 2.35rem); }
.inv-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.45rem 0 0;
    color: #e0e7ff;
    font-weight: 600;
}
.inv-clock {
    padding: 0.1rem 0.55rem;
    border-radius: 0.45rem;
    background: rgba(0, 0, 0, 0.25);
    font-variant-numeric: tabular-nums;
}
.inv-lead { margin: 0.5rem 0 0; max-width: 36rem; color: #e0e7ff; line-height: 1.55; opacity: 0.95; }
.inv-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(7rem, 1fr));
    gap: 0.5rem;
    min-width: 15rem;
}
.inv-hero-stats article {
    padding: 0.55rem 0.75rem;
    border-radius: 0.9rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.inv-hero-stats article.is-warn { border-color: rgba(252, 165, 165, 0.55); background: rgba(127, 29, 29, 0.35); }
.inv-hero-stats span { display: block; font-size: 0.72rem; color: #c7d2fe; }
.inv-hero-stats strong { font-size: 1.45rem; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.inv-hero-stats small { display: block; font-size: 0.68rem; color: #c7d2fe; font-weight: 700; }
.inv-hero-actions { display: flex; flex-direction: column; gap: 0.45rem; justify-content: end; }
.inv-ghost-btn {
    display: inline-flex;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-maroon-dark);
    font-weight: 800;
    text-decoration: none;
    text-align: center;
}
.inv-ghost-primary { background: #fff; color: var(--brand-maroon); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); }
.inv-shell {
    display: grid;
    grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.inv-compose,
.inv-catalog,
.inv-ledger {
    border-radius: 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 36px rgba(12, 36, 64, 0.08);
}
.inv-compose { padding: 1rem 1.05rem 1.15rem; }
.inv-compose-head h2 { margin: 0; color: var(--brand-maroon); font-size: 1.05rem; }
.inv-compose-head .muted { margin: 0.25rem 0 0; font-size: 0.88rem; }
.inv-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.85rem;
}
.inv-span-2 { grid-column: 1 / -1; }
.inv-field { display: grid; gap: 0.25rem; }
.inv-field span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.inv-field input {
    padding: 0.55rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid #e0e7ff;
    background: #fafafa;
    font: inherit;
}
.inv-field input:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 1px;
    border-color: #c4b5fd;
    background: #fff;
}
.inv-submit-btn {
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 0.85rem;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-maroon-dark) 0%, var(--brand-maroon) 50%, var(--brand-maroon-light) 100%);
    box-shadow: 0 12px 24px rgba(67, 56, 202, 0.3);
}
.inv-submit-btn:hover { filter: brightness(1.05); }
.inv-catalog { padding: 1rem 1.05rem 1.15rem; min-width: 0; }
.inv-catalog-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.inv-catalog-head h2 { margin: 0; color: var(--brand-maroon); }
.inv-search-wrap { flex: 1 1 14rem; max-width: 22rem; margin-inline-start: auto; }
.inv-search {
    width: 100%;
    padding: 0.65rem 0.85rem 0.65rem 2.35rem;
    border-radius: 0.85rem;
    border: 1px solid #e0e7ff;
    background: #f5f3ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%236d28d9' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 0.75rem center;
    font: inherit;
}
[dir="rtl"] .inv-search {
    padding: 0.65rem 2.35rem 0.65rem 0.85rem;
    background-position: calc(100% - 0.75rem) center;
}
.inv-table-wrap {
    overflow: auto;
    border-radius: 0.95rem;
    border: 1px solid #eef2ff;
    max-height: min(58vh, 32rem);
}
.inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.inv-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
}
.inv-table th {
    padding: 0.65rem 0.75rem;
    text-align: start;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5b21b6;
    border-bottom: 1px solid #ddd6fe;
}
.inv-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.inv-row:hover { background: #faf5ff; }
.inv-row.is-low { background: #fffbeb; }
.inv-row.is-low:hover { background: #fef3c7; }
.inv-sku {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 0.4rem;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.78rem;
    font-weight: 800;
}
.inv-unit { display: block; font-size: 0.78rem; margin-top: 0.1rem; }
.inv-stock-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.inv-stock-pill.is-empty { background: #fef2f2; color: #b91c1c; }
.inv-price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-price small { font-weight: 700; color: var(--muted); }
.inv-receive-details { margin: 0; }
.inv-receive-toggle {
    list-style: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.82rem;
    color: #6d28d9;
    padding: 0.35rem 0.65rem;
    border-radius: 0.55rem;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
}
.inv-receive-toggle::-webkit-details-marker { display: none; }
.inv-receive-details[open] .inv-receive-toggle { background: #ede9fe; }
.inv-receive-form {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.55rem;
    padding: 0.65rem;
    border-radius: 0.65rem;
    background: #fafafa;
    border: 1px solid var(--line);
    min-width: 12rem;
}
.inv-receive-form label { display: grid; gap: 0.2rem; font-size: 0.78rem; font-weight: 700; }
.inv-receive-form input {
    padding: 0.45rem 0.55rem;
    border-radius: 0.5rem;
    border: 1px solid var(--line);
    font: inherit;
}
.inv-receive-form button {
    padding: 0.45rem 0.65rem;
    border-radius: 0.55rem;
    border: 0;
    background: #6d28d9;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    font: inherit;
}
.inv-empty {
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 0.95rem;
    background: #faf5ff;
    border: 1px dashed #c4b5fd;
}
.inv-no-results { margin-top: 0.75rem; text-align: center; }
.inv-ledger { padding: 1rem 1.15rem 1.2rem; }
.inv-ledger-head h2 { margin: 0; color: var(--brand-maroon); font-size: 1.05rem; }
.inv-ledger-head .muted { margin: 0.2rem 0 0; font-size: 0.88rem; }
.inv-timeline {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: grid;
    gap: 0;
}
.inv-timeline-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem 0.85rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: start;
}
.inv-timeline-dot {
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #94a3b8;
}
.inv-timeline-item.is-in .inv-timeline-dot { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }
.inv-timeline-item.is-out .inv-timeline-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2); }
.inv-timeline-body p { margin: 0.15rem 0 0; font-size: 0.85rem; }
.inv-timeline-note { font-size: 0.8rem !important; }
.inv-delta { font-weight: 800; font-variant-numeric: tabular-nums; }
.inv-timeline-time {
    font-size: 0.75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pharmacy-sale-link {
    display: grid;
    gap: 0.1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
}
.pharmacy-sale-link:hover strong { color: #6b2d8a; }
.pharmacy-invoice-sheet {
    padding: 1.25rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.pharmacy-invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.pharmacy-invoice-table th,
.pharmacy-invoice-table td {
    padding: 0.55rem 0.45rem;
    border-bottom: 1px solid var(--line);
    text-align: start;
}
.pharmacy-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.pharmacy-metrics article {
    padding: 1rem;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
    border-inline-start: 5px solid #a855c8;
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.pharmacy-metrics strong { display: block; font-size: 2.2rem; color: #6b2d8a; font-variant-numeric: tabular-nums; }
.pharmacy-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; }
.pharmacy-action {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
}
.pharmacy-action.is-primary { border-color: #a855c8; background: linear-gradient(180deg, #fff 0%, #faf5ff 100%); }
.pharmacy-action .step { grid-row: span 2; font-weight: 900; color: #a855c8; font-size: 1.35rem; }
.pharmacy-board { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.65fr); gap: 1rem; }
.pharmacy-worklist, .pharmacy-panel {
    padding: 1rem 1.05rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(12, 36, 64, 0.08);
}
.pharmacy-request {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.75rem;
    padding: 0.85rem;
    margin-top: 0.55rem;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    background: #fdfaff;
}
.pharmacy-request.is-stat { border-color: #e8a020; box-shadow: inset 4px 0 0 #e8a020; }
.pharmacy-request-tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill.pharmacy.issued, .pill.pharmacy.verified { background: #e8f5ee; color: #0a5c48; }
.pill.pharmacy.declined { background: #fde8e8; color: #9a2020; }
.pill.pharmacy.none, .pill.pharmacy.pending { background: #f3e8ff; color: #6b2d8a; }
.pharmacy-request-actions { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 0.35rem; justify-items: end; }
.pharmacy-drug-preview { font-weight: 800; color: #6b2d8a; margin: 0.25rem 0 0; }
.pharmacy-side { display: grid; gap: 0.85rem; }
.pharmacy-settings form { display: grid; gap: 0.65rem; }
.pharmacy-check { display: flex !important; flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 700; }
.pharmacy-location { display: grid; gap: 0.1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.pharmacy-review-desk { display: grid; gap: 1rem; }
.pharmacy-review-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.35rem;
    border-radius: 1.2rem;
    color: #fff;
    background: linear-gradient(128deg, #1a0a24 0%, #6b2d8a 50%, #a855c8 100%);
}
.pharmacy-review-hero h1 { margin: 0; color: #fff; }
.pharmacy-review-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pharmacy-review-hero .button { background: rgba(255, 255, 255, 0.95); color: #6b2d8a; }
.pharmacy-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}
.pharmacy-span-all { grid-column: 1 / -1; }
.pharmacy-form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.65rem; }
.pharmacy-panel-warn { border-color: #e8c4c4; background: #fffafa; }
.chart-pharmacy {
    border-color: #e9d5ff;
    background: linear-gradient(180deg, #fff 0%, #fdfaff 100%);
}
.chart-desk.is-pharmacy-focus .chart-pharmacy {
    box-shadow: 0 0 0 3px rgba(168, 85, 200, 0.35), 0 18px 36px rgba(12, 36, 64, 0.12);
}
.chart-nav-pharmacy { font-weight: 800; color: #6b2d8a !important; }
.chart-pharmacy-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.chart-pharmacy-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}
.chart-pharmacy-metrics article {
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid #e9d5ff;
}
.chart-pharmacy-metrics strong { color: #6b2d8a; font-size: 1.65rem; }
.pharmacy-chart-card {
    margin-top: 0.75rem;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
}

/* Inpatient / ward desk */
.ip-desk { display: grid; gap: 1rem; }
.ip-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(12rem, 0.55fr); gap: 1.25rem; align-items: end;
    padding: 1.6rem 1.45rem; border-radius: 1.45rem; color: #fff;
    background:
        radial-gradient(440px 220px at 100% 0%, rgba(96, 165, 250, 0.35), transparent 58%),
        linear-gradient(128deg, #0c1929 0%, #1e40af 40%, #2563eb 72%, #3b82f6 100%);
    box-shadow: 0 22px 48px rgba(30, 64, 175, 0.28);
}
.ip-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 0%, transparent 82%); pointer-events: none;
}
.ip-hero > * { position: relative; }
.ip-kicker { display: inline-flex; margin: 0 0 0.35rem; padding: 0.12rem 0.7rem; border-radius: 999px; background: rgba(255,255,255,0.16); font-weight: 800; font-size: 0.78rem; }
.ip-hero h1 { margin: 0; color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.35rem); }
.ip-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin: 0.4rem 0 0; color: #dbeafe; font-weight: 600; }
.ip-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0,0,0,0.22); font-variant-numeric: tabular-nums; }
.ip-lead, .ip-note { margin: 0.4rem 0 0; color: #eff6ff; line-height: 1.5; max-width: 40rem; }
.ip-note { font-size: 0.9rem; opacity: 0.92; }
.ip-hero-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.ip-cta {
    display: inline-flex; padding: 0.55rem 0.95rem; border-radius: 0.75rem; background: #fff; color: #1d4ed8;
    font-weight: 900; text-decoration: none; box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}
.ip-ghost {
    display: inline-flex; padding: 0.5rem 0.9rem; border-radius: 0.75rem; border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.1); color: #fff; font-weight: 800; text-decoration: none;
}
.ip-hero-badge {
    padding: 1rem; border-radius: 1.1rem; background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.14); text-align: center;
}
.ip-hero-badge-value { display: block; font-size: 2.6rem; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.ip-hero-badge strong { display: block; margin-top: 0.35rem; color: #fff; }
.ip-hero-badge p { margin: 0.35rem 0 0; color: #bfdbfe; font-size: 0.82rem; }
.ip-alert {
    display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center;
    padding: 0.85rem 1rem; border-radius: 1rem; border: 1px solid #fcd34d; background: #fffbeb; color: var(--ink);
}
.ip-alert-urgent { border-color: #fecaca; background: #fef2f2; }
.ip-alert-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: #f59e0b; color: #fff; font-size: 0.8rem; }
.ip-alert-urgent .ip-alert-icon { background: #dc2626; }
.ip-alert em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; margin-top: 0.15rem; }
.ip-metrics-block { display: grid; gap: 0.5rem; }
.ip-metrics-head h2 { margin: 0; font-size: 1.05rem; color: #1d4ed8; }
.ip-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.6rem; }
.ip-metric {
    padding: 0.8rem 0.9rem; border-radius: 1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 10px 22px rgba(30, 64, 175, 0.06);
}
.ip-metric.is-warn { border-color: #fecaca; background: linear-gradient(180deg, #fff7f7, #fff); }
.ip-metric span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.ip-metric strong { display: block; margin-top: 0.1rem; font-size: 1.35rem; color: #1d4ed8; font-variant-numeric: tabular-nums; }
.ip-metrics--teal .ip-metric strong { color: #0f766e; }
.ip-metrics--teal .ip-metric { border-inline-start: 3px solid #14b8a6; }
.ip-workflow header h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.ip-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.ip-workflow-card {
    padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 12px 28px rgba(30, 64, 175, 0.06);
}
.ip-workflow-census { border-top: 3px solid #2563eb; }
.ip-workflow-nursing { border-top: 3px solid #14b8a6; }
.ip-workflow-wards { border-top: 3px solid #64748b; }
.ip-workflow-card h3 { margin: 0; font-size: 0.96rem; }
.ip-workflow-card ul { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.ip-workflow-card a {
    display: block; padding: 0.45rem 0.6rem; border-radius: 0.55rem; border: 1px solid var(--line);
    font-weight: 800; font-size: 0.86rem; text-decoration: none; color: var(--ink);
}
.ip-workflow-card a.is-primary { background: #2563eb; color: #fff; border-color: transparent; }
.ip-board { display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; gap: 0.85rem; align-items: start; }
.ip-board-main { display: grid; gap: 0.85rem; min-width: 0; }
.ip-panel {
    background: #fff; border: 1px solid var(--line); border-radius: 1.15rem; overflow: hidden;
    box-shadow: 0 14px 36px rgba(30, 64, 175, 0.07);
}
.ip-census-panel { border-color: #bfdbfe; }
.ip-panel-head {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.65rem; align-items: flex-start;
    padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #eff6ff, #fff);
}
.ip-panel-kicker {
    display: inline-flex; margin: 0 0 0.3rem; padding: 0.1rem 0.55rem; border-radius: 999px;
    background: #dbeafe; color: #1e40af; font-weight: 800; font-size: 0.72rem;
}
.ip-panel-head h2 { margin: 0; font-size: 1.08rem; color: #1e40af; }
.ip-count-badge { padding: 0.35rem 0.7rem; border-radius: 999px; background: #2563eb; color: #fff; font-weight: 900; font-size: 0.82rem; }
.ip-census-list, .ip-nursing-list { display: grid; gap: 0.6rem; padding: 1rem; }
.ip-census-card {
    display: grid; grid-template-columns: 0.32rem minmax(0, 1fr) auto; border-radius: 1rem;
    border: 1px solid #dbeafe; background: linear-gradient(180deg, #fff, #f8fafc); overflow: hidden;
}
.ip-census-card.is-urgent { border-color: #fcd34d; background: linear-gradient(180deg, #fffbeb, #fff); }
.ip-census-strip { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.ip-census-card.is-urgent .ip-census-strip { background: linear-gradient(180deg, #f59e0b, #d97706); }
.ip-census-body { padding: 0.85rem 0.95rem; min-width: 0; }
.ip-census-top {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.45rem 0.65rem; align-items: center; margin-bottom: 0.55rem;
}
.ip-enc-link { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 900; color: #1d4ed8; text-decoration: none; }
.ip-pills { display: flex; flex-wrap: wrap; gap: 0.28rem; justify-content: flex-end; }
.ip-pill { padding: 0.12rem 0.42rem; border-radius: 0.4rem; font-size: 0.7rem; font-weight: 800; background: #e2e8f0; color: #334155; }
.ip-pill.priority-stat, .ip-pill.priority-urgent, .ip-pill.priority-emergency { background: #fecaca; color: #991b1b; }
.ip-pill.type-inpatient { background: #dbeafe; color: #1e40af; }
.ip-pill.type-observation { background: #e0e7ff; color: #4338ca; }
.ip-pill.type-day_surgery { background: #fce7f3; color: #9d174d; }
.ip-pill.status-in_progress { background: #fef3c7; color: #92400e; }
.ip-when { display: grid; text-align: end; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.ip-patient { display: flex; gap: 0.6rem; align-items: center; }
.ip-avatar {
    width: 2.2rem; height: 2.2rem; border-radius: 0.65rem; display: grid; place-items: center; font-weight: 900;
    color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; flex-shrink: 0;
}
.ip-ids { margin: 0.2rem 0 0; }
.ip-id-chip {
    padding: 0.1rem 0.4rem; border-radius: 0.35rem; font-size: 0.74rem; font-weight: 800; background: #f1f5f9; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ip-census-actions { display: flex; align-items: center; padding: 0.75rem; border-inline-start: 1px solid #e2e8f0; background: #f8fafc; }
.ip-nursing-panel .ip-panel-head { background: linear-gradient(180deg, #f0fdfa, #fff); }
.ip-nursing-panel .ip-panel-kicker { background: #ccfbf1; color: #0f766e; }
.ip-nursing-panel h2 { color: #0f766e; }
.ip-nursing-card {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.65rem; align-items: center;
    padding: 0.75rem 0.85rem; border-radius: 0.85rem; border: 1px solid #ccfbf1; background: #f0fdfa;
}
.ip-nursing-card.is-stat { border-color: #fcd34d; background: #fffbeb; }
.ip-order-num { color: #0f766e; }
.ip-indication { margin: 0.25rem 0; font-size: 0.88rem; }
.ip-empty { padding: 1.5rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 0.85rem; }
.ip-aside { display: grid; gap: 0.75rem; }
.ip-side-panel {
    padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 12px 28px rgba(30, 64, 175, 0.05);
}
.ip-side-panel h2 { margin: 0 0 0.35rem; font-size: 1rem; }
.ip-side-highlight { border-color: #99f6e4; background: linear-gradient(180deg, #f0fdfa, #fff); }
.ip-service-list, .ip-ward-list { list-style: none; margin: 0.5rem 0 0.65rem; padding: 0; display: grid; gap: 0.45rem; }
.ip-service-list li, .ip-ward-list li { display: grid; gap: 0.08rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.ip-service-list code { font-size: 0.72rem; font-weight: 800; color: #0d9488; }
.ip-service-list em { font-style: normal; font-weight: 800; color: #64748b; font-size: 0.82rem; }
.ip-side-tip { border-style: dashed; }

/* Nursing desk */
.nursing-desk { display: grid; gap: 1rem; }
.nursing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 1.4rem;
    color: #fff;
    background: linear-gradient(128deg, #042f2e 0%, #0f766e 45%, #14b8a6 100%);
    box-shadow: 0 20px 40px rgba(4, 47, 46, 0.25);
}
.nursing-kicker { display: inline-flex; padding: 0.12rem 0.7rem; border-radius: 999px; background: rgba(255,255,255,0.15); font-weight: 800; }
.nursing-hero h1 { margin: 0; color: #fff; }
.nursing-date, .nursing-lead, .nursing-note { color: #ccfbf1; margin: 0.35rem 0 0; }
.nursing-aside { padding: 0.85rem 1rem; border-radius: 1rem; background: rgba(0,0,0,0.2); align-self: end; }
.nursing-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0.65rem; }
.nursing-metrics article { padding: 0.85rem; border-radius: 1rem; background: #fff; border-inline-start: 4px solid #14b8a6; box-shadow: 0 12px 24px rgba(12,36,64,0.08); }
.nursing-metrics strong { font-size: 1.85rem; color: #0f766e; }
.nursing-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem,1fr)); gap: 0.65rem; }
.nursing-action { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; padding: 0.75rem 1rem; border-radius: 0.95rem; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); }
.nursing-action.is-primary { border-color: #14b8a6; background: linear-gradient(180deg,#fff,#f0fdfa); }
.nursing-board { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.85rem; }
.nursing-panel { padding: 1rem; border-radius: 1.1rem; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 24px rgba(12,36,64,0.07); }
.nursing-panel h2 { margin: 0 0 0.5rem; color: #0f766e; font-size: 1.05rem; }
.nursing-service-grid { display: grid; gap: 0.45rem; margin: 0.65rem 0; max-height: 14rem; overflow: auto; }
.nursing-service-card { display: grid; gap: 0.1rem; padding: 0.55rem 0.65rem; border-radius: 0.65rem; background: #f0fdfa; border: 1px solid #99f6e4; }
.nursing-service-card code { font-size: 0.72rem; color: #0d9488; font-weight: 800; }
.nursing-order-row, .nursing-encounter { display: grid; gap: 0.35rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.nursing-service-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.55rem; }
.nursing-service-table { width: 100%; border-collapse: collapse; }
.nursing-service-table th, .nursing-service-table td { padding: 0.5rem; border-bottom: 1px solid var(--line); text-align: start; }
.nursing-hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem; align-self: end; }

/* Reception service cashier (POS) */
.rcpt-desk { display: grid; gap: 1.1rem; }
.rcpt-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) auto auto;
    gap: 1rem 1.25rem;
    align-items: end;
    padding: 1.6rem 1.45rem;
    border-radius: 1.45rem;
    color: #fff;
    background:
        radial-gradient(460px 210px at 100% 0%, rgba(255, 255, 255, 0.14), transparent 58%),
        linear-gradient(128deg, #0c1929 0%, #1e40af 42%, #2563eb 68%, #60a5fa 100%);
    box-shadow: 0 22px 48px rgba(30, 64, 175, 0.28);
}
.rcpt-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    pointer-events: none;
}
.rcpt-hero > * { position: relative; z-index: 1; }
.rcpt-kicker {
    display: inline-flex;
    margin: 0 0 0.35rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
    font-size: 0.85rem;
}
.rcpt-hero h1 { margin: 0; color: #fff; font-size: clamp(1.65rem, 2.8vw, 2.3rem); }
.rcpt-hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.4rem 0 0; color: #dbeafe; font-weight: 600; }
.rcpt-clock { padding: 0.1rem 0.55rem; border-radius: 0.45rem; background: rgba(0, 0, 0, 0.22); font-variant-numeric: tabular-nums; }
.rcpt-lead { margin: 0.45rem 0 0; max-width: 36rem; color: #eff6ff; line-height: 1.55; }
.rcpt-hero-stats { display: grid; gap: 0.5rem; min-width: 9rem; }
.rcpt-hero-stats article {
    padding: 0.55rem 0.75rem;
    border-radius: 0.9rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.rcpt-hero-stats span { display: block; font-size: 0.72rem; color: #bfdbfe; }
.rcpt-hero-stats strong { font-size: 1.5rem; color: #fff; font-variant-numeric: tabular-nums; }
.rcpt-ghost {
    align-self: end;
    padding: 0.55rem 0.95rem;
    border-radius: 0.75rem;
    background: #fff;
    color: #1d4ed8;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.rcpt-patient-card {
    padding: 1rem 1.1rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid #bfdbfe;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}
.rcpt-patient-card header h2 { margin: 0; font-size: 1.05rem; color: #1e40af; }
.rcpt-patient-card header .muted { margin: 0.2rem 0 0; font-size: 0.88rem; }
.rcpt-patient-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.rcpt-field { display: grid; gap: 0.3rem; }
.rcpt-field span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.rcpt-select {
    padding: 0.6rem 0.7rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font: inherit;
}
.rcpt-select:focus { outline: 2px solid #3b82f6; border-color: #93c5fd; background: #fff; }
.rcpt-patient-warn {
    margin: 0.65rem 0 0;
    padding: 0.45rem 0.65rem;
    border-radius: 0.55rem;
    background: #fffbeb;
    color: #b45309;
    font-weight: 700;
    font-size: 0.85rem;
}
.rcpt-shell { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 22rem); gap: 1rem; align-items: start; }
.rcpt-catalog-panel {
    padding: 1rem 1.05rem 1.1rem;
    border-radius: 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 32px rgba(12, 36, 64, 0.08);
    min-width: 0;
}
.rcpt-catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.rcpt-catalog-toolbar h2 { margin: 0; color: #1e40af; }
.rcpt-search-wrap { flex: 1 1 14rem; max-width: 22rem; margin-inline-start: auto; }
.rcpt-search {
    width: 100%;
    padding: 0.65rem 0.85rem 0.65rem 2.35rem;
    border-radius: 0.85rem;
    border: 1px solid #bfdbfe;
    background: #eff6ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%232563eb' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 0.75rem center;
    font: inherit;
}
[dir="rtl"] .rcpt-search {
    padding: 0.65rem 2.35rem 0.65rem 0.85rem;
    background-position: calc(100% - 0.75rem) center;
}
.rcpt-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #e2e8f0;
}
.rcpt-tab {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #f8fafc;
    color: #1e40af;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}
.rcpt-tab.is-active { background: #2563eb; border-color: #2563eb; color: #fff; }
.rcpt-catalog-scroll { max-height: min(58vh, 36rem); overflow: auto; padding-inline-end: 0.15rem; }
.rcpt-category-block { margin-bottom: 1rem; }
.rcpt-category-block[hidden] { display: none !important; }
.rcpt-category-title {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}
.rcpt-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 0.65rem;
}
.rcpt-service-card {
    display: grid;
    gap: 0.3rem;
    padding: 0.8rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.rcpt-service-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}
.rcpt-service-card.is-selected {
    border-color: #2563eb;
    box-shadow: inset 0 0 0 1px #2563eb, 0 12px 24px rgba(37, 99, 235, 0.12);
}
.rcpt-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.35rem; }
.rcpt-card-top code { font-size: 0.7rem; font-weight: 800; color: #2563eb; }
.rcpt-cat-badge {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    max-width: 6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rcpt-card-name { margin: 0; font-size: 0.92rem; line-height: 1.35; min-height: 2.5em; }
.rcpt-dept { margin: 0; font-size: 0.75rem; }
.rcpt-card-price { margin: 0; display: flex; align-items: baseline; gap: 0.35rem; }
.rcpt-card-price strong { font-size: 1.2rem; color: #1e40af; font-variant-numeric: tabular-nums; }
.rcpt-card-price span { font-size: 0.75rem; color: var(--muted); font-weight: 700; }
.rcpt-qty-control {
    display: grid;
    grid-template-columns: 2.25rem 1fr 2.25rem;
    gap: 0.35rem;
    margin-top: 0.2rem;
}
.rcpt-qty-btn {
    display: grid;
    place-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 0.6rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
}
.rcpt-qty-btn:hover { background: #dbeafe; }
.rcpt-qty-input {
    text-align: center;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border-radius: 0.6rem;
    border: 1px solid var(--line);
    padding: 0.4rem 0.2rem;
}
.rcpt-ticket {
    position: sticky;
    top: 0.75rem;
    padding: 1rem 1.05rem 1.1rem;
    border-radius: 1.2rem;
    background: linear-gradient(180deg, #fff 0%, #eff6ff 100%);
    border: 2px solid #93c5fd;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
}
.rcpt-ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.rcpt-ticket-head h2 { margin: 0; font-size: 1.05rem; color: #1e40af; }
.rcpt-clear-btn {
    border: 0;
    background: none;
    color: #2563eb;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
    font-size: 0.82rem;
}
.rcpt-patient-chip {
    margin: 0.55rem 0;
    padding: 0.5rem 0.65rem;
    border-radius: 0.65rem;
    background: #f1f5f9;
    font-size: 0.85rem;
}
.rcpt-ticket-lines { list-style: none; margin: 0; padding: 0; max-height: 14rem; overflow: auto; }
.rcpt-ticket-line {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed #bfdbfe;
    font-variant-numeric: tabular-nums;
    font-size: 0.88rem;
}
.rcpt-ticket-line strong { display: block; font-size: 0.86rem; }
.rcpt-ticket-line .muted { font-size: 0.72rem; }
.rcpt-ticket-empty { margin: 0.35rem 0; font-size: 0.85rem; }
.rcpt-summary { margin-top: 0.65rem; padding-top: 0.65rem; border-top: 2px solid #bfdbfe; }
.rcpt-summary-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.2rem 0; font-weight: 700; }
.rcpt-summary-total { margin-top: 0.35rem; font-size: 1.05rem; }
.rcpt-summary-total strong { font-size: 1.3rem; color: #1e40af; font-variant-numeric: tabular-nums; }
.rcpt-pay-fieldset { margin: 0.75rem 0 0; padding: 0; border: 0; }
.rcpt-pay-fieldset legend { font-weight: 800; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; }
.rcpt-pay-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; }
.rcpt-pay-pill { position: relative; display: block; cursor: pointer; }
.rcpt-pay-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.rcpt-pay-pill span {
    display: block;
    padding: 0.48rem 0.3rem;
    border-radius: 0.6rem;
    border: 1px solid #bfdbfe;
    background: #fff;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 800;
    color: #1e40af;
}
.rcpt-pay-pill.is-active span { background: #dbeafe; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25); }
.rcpt-checkout-btn {
    display: grid;
    gap: 0.12rem;
    width: 100%;
    margin-top: 0.8rem;
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: 0.95rem;
    cursor: pointer;
    color: #fff;
    font: inherit;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #60a5fa 100%);
    box-shadow: 0 14px 28px rgba(29, 78, 216, 0.35);
}
.rcpt-checkout-btn span { font-weight: 700; font-size: 0.88rem; opacity: 0.95; }
.rcpt-checkout-btn strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.rcpt-checkout-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.rcpt-empty-catalog {
    padding: 2rem;
    text-align: center;
    border-radius: 1rem;
    background: #eff6ff;
    border: 1px dashed #93c5fd;
}
.rcpt-no-match { text-align: center; margin-top: 0.75rem; }
.rcpt-recent {
    padding: 0.85rem 1rem;
    border-radius: 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
}
.rcpt-recent h2 { margin: 0 0 0.55rem; font-size: 1rem; color: #1e40af; }
.rcpt-recent-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.rcpt-recent-chip {
    display: grid;
    gap: 0.05rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #dbeafe;
    background: #f8fafc;
    text-decoration: none;
    color: var(--ink);
}
.rcpt-recent-chip strong { font-size: 0.82rem; color: #1e40af; }
.rcpt-receipt-sheet { padding: 1.25rem; border-radius: 1.1rem; background: #fff; border: 1px solid var(--line); }
.rcpt-policy { margin-top: 0.5rem; font-size: 0.88rem; max-width: 40rem; }
.rcpt-orders-panel { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 2px solid #e2e8f0; }
.rcpt-orders-list { display: grid; gap: 0.5rem; }
.rcpt-order-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid #bfdbfe;
    background: #f8fafc;
    cursor: pointer;
}
.rcpt-order-card:has(input:checked) { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px #2563eb; }
.rcpt-order-card input { width: 1.1rem; height: 1.1rem; accent-color: #2563eb; }
.rcpt-order-price { font-weight: 800; font-variant-numeric: tabular-nums; color: #1e40af; }
.rcpt-consult-panel { margin-top: 0.5rem; }
.rcpt-orders-empty { padding: 0.75rem; border-radius: 0.65rem; background: #f1f5f9; }

@media (max-width: 960px) {
    .pharmacy-hero, .pharmacy-board, .pharmacy-retail-grid, .pharmacy-retail-metrics, .pharmacy-workflow-grid { grid-template-columns: 1fr; }
    .pharmacy-order-card { grid-template-columns: 0.3rem 1fr; }
    .pharmacy-order-card-top { grid-template-columns: 1fr; }
    .pharmacy-order-badges, .pharmacy-order-when { justify-self: start; text-align: start; }
    .pharmacy-order-card-actions {
        grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; border-inline-start: 0; border-top: 1px solid #ede9fe; min-width: 0;
    }
    .ip-hero, .ip-board, .ip-workflow-grid { grid-template-columns: 1fr; }
    .ip-census-card { grid-template-columns: 0.28rem 1fr; }
    .ip-census-top { grid-template-columns: 1fr; }
    .ip-pills, .ip-when { justify-self: start; text-align: start; }
    .ip-census-actions {
        grid-column: 1 / -1; border-inline-start: 0; border-top: 1px solid #e2e8f0; justify-content: flex-start;
    }
    .ip-nursing-card { grid-template-columns: 1fr; }
    .stock-desk-v2 .stock-hero-rich, .stock-board-rich, .stock-workflow-grid { grid-template-columns: 1fr; }
    .stock-metrics-rich { grid-template-columns: repeat(2, 1fr); }
    .dept-hero, .dept-search, .dept-search.loc-search, .dept-show-grid, .dept-form-grid { grid-template-columns: 1fr; }
    .dept-span-2 { grid-column: 1; }
    .pharmacy-product-row { grid-template-columns: 1fr; }
    .pos-hero { grid-template-columns: 1fr; }
    .pos-scan-dock { grid-template-columns: 1fr; }
    .pos-scan-icon { grid-row: auto; width: 2.75rem; height: 2.75rem; }
    .pos-scan-hint { grid-column: 1; }
    .pos-shell { grid-template-columns: 1fr; }
    .pos-ticket { position: static; }
    .pos-hero-actions { flex-direction: row; flex-wrap: wrap; }
    .inv-hero { grid-template-columns: 1fr; }
    .inv-shell { grid-template-columns: 1fr; }
    .inv-hero-stats { grid-template-columns: repeat(2, 1fr); }
    .inv-hero-actions { flex-direction: row; flex-wrap: wrap; }
    .inv-form-grid { grid-template-columns: 1fr; }
    .inv-span-2 { grid-column: 1; }
    .pharmacy-request { grid-template-columns: 1fr; }
    .pharmacy-request-actions { grid-column: 1; justify-items: start; }
    .pharmacy-form-grid { grid-template-columns: 1fr; }
    .chart-pharmacy-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ris-hero, .ris-board { grid-template-columns: 1fr; }
    .ris-study { grid-template-columns: 1fr; }
    .ris-study-actions { grid-column: 1; grid-row: auto; justify-items: start; }
    .chart-ris-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nursing-board, .nursing-metrics { grid-template-columns: 1fr; }
    .rcpt-hero { grid-template-columns: 1fr; }
    .rcpt-shell, .rcpt-patient-fields { grid-template-columns: 1fr; }
    .rcpt-ticket { position: static; }
    .rcpt-service-grid { grid-template-columns: 1fr; }
}

.finance-desk { display: grid; gap: 1.15rem; }
.finance-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: end;
    padding: 1.45rem 1.55rem;
    border-radius: 1.35rem;
    background:
        radial-gradient(520px 240px at 100% 0%, rgba(212, 175, 55, 0.22), transparent 58%),
        radial-gradient(380px 200px at 0 100%, rgba(255, 255, 255, 0.06), transparent 62%),
        linear-gradient(135deg, #0b1020 0%, #152238 45%, #1e3a5f 100%);
    color: #fff;
    box-shadow: 0 22px 48px rgba(11, 16, 32, 0.35);
    border: 1px solid rgba(212, 175, 55, 0.22);
}
.finance-kicker { margin: 0; font-weight: 800; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; color: #d4af37; }
.finance-hero h1 { margin: 0.3rem 0 0; color: #fff; font-size: clamp(1.55rem, 2.6vw, 2.15rem); }
.finance-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.75rem; margin: 0.45rem 0 0; color: #c8d4e8; font-weight: 600; }
.finance-clock {
    padding: 0.12rem 0.55rem;
    border-radius: 0.45rem;
    background: rgba(0, 0, 0, 0.28);
    font-variant-numeric: tabular-nums;
}
.finance-badge {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.finance-badge-currency { background: rgba(212, 175, 55, 0.22); color: #f5e6b8; border: 1px solid rgba(212, 175, 55, 0.45); }
.finance-badge-vat { background: rgba(255, 255, 255, 0.1); color: #e2e8f0; border: 1px solid rgba(255, 255, 255, 0.18); }
.finance-lead { margin: 0.5rem 0 0; color: #a8b8d4; max-width: 42rem; line-height: 1.55; }
.finance-hero-aside { display: grid; gap: 0.75rem; justify-items: end; }
.finance-hero-stat {
    min-width: 8.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.9rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: end;
}
.finance-hero-stat span { display: block; font-size: 0.72rem; color: #94a3b8; font-weight: 700; }
.finance-hero-stat strong { font-size: 1.65rem; color: #fff; font-variant-numeric: tabular-nums; }
.finance-hero-links { display: flex; flex-direction: column; gap: 0.4rem; align-items: stretch; min-width: 11rem; }
.finance-ghost {
    display: inline-flex;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    color: #1e3a5f;
    font-weight: 800;
    font-size: 0.86rem;
    text-decoration: none;
    text-align: center;
}
.finance-ghost-accent { background: linear-gradient(145deg, #d4af37, #b8962e); color: #0b1020; box-shadow: 0 8px 22px rgba(212, 175, 55, 0.35); }
.finance-ghost-muted { background: rgba(255, 255, 255, 0.12); color: #e2e8f0; border: 1px solid rgba(255, 255, 255, 0.16); }
.finance-alert {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid #fcd34d;
    background: linear-gradient(90deg, #fffbeb, #fff);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(180, 83, 9, 0.08);
}
.finance-alert strong { display: block; font-size: 0.95rem; }
.finance-alert em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; margin-top: 0.15rem; }
.finance-alert-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: #f59e0b;
    color: #fff;
}
.finance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.65rem;
}
.finance-metric {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 0.85rem 0.95rem;
    box-shadow: 0 10px 22px rgba(12, 36, 64, 0.05);
}
.finance-metric.is-warn { border-color: #fecaca; background: linear-gradient(135deg, #fff7f7, #fff); }
.finance-metric.is-ok { border-color: #bbf7d0; background: linear-gradient(135deg, #f0fdf4, #fff); }
.finance-metric-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #1e3a5f, #152238);
    opacity: 0.92;
}
.finance-metric.metric-accounts .finance-metric-icon { background: linear-gradient(145deg, #1e3a5f, #334155); }
.finance-metric.metric-receipts .finance-metric-icon { background: linear-gradient(145deg, #047857, #065f46); }
.finance-metric.metric-payments .finance-metric-icon { background: linear-gradient(145deg, #b45309, #92400e); }
.finance-metric.metric-journals .finance-metric-icon { background: linear-gradient(145deg, var(--brand-maroon), var(--brand-maroon-deep)); }
.finance-metric.metric-invoices .finance-metric-icon { background: linear-gradient(145deg, #4f46e5, #3730a3); }
.finance-metric.metric-pending_vat .finance-metric-icon { background: linear-gradient(145deg, #d97706, #b45309); }
.finance-metric-label { color: var(--muted); font-weight: 800; font-size: 0.78rem; line-height: 1.25; }
.finance-metric strong { display: block; font-size: 1.55rem; color: var(--brand-maroon); margin-top: 0.1rem; font-variant-numeric: tabular-nums; }
.finance-section-head { margin: 0.25rem 0 0; }
.finance-section-head h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.finance-section-head-inline { margin-top: 0.5rem; }
.finance-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.finance-workflow-card {
    padding: 1rem 1.05rem;
    border-radius: 1.15rem;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 28px rgba(12, 36, 64, 0.05);
}
.finance-workflow-card header h3 { margin: 0; font-size: 1rem; color: #1e3a5f; }
.finance-workflow-card header p { margin: 0.35rem 0 0; font-size: 0.84rem; }
.finance-workflow-treasury { border-top: 3px solid #059669; }
.finance-workflow-ledger { border-top: 3px solid #1e3a5f; }
.finance-workflow-compliance { border-top: 3px solid #d4af37; }
.finance-workflow-links { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.finance-workflow-links a {
    display: block;
    padding: 0.5rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid var(--line);
    font-weight: 800;
    font-size: 0.86rem;
    text-decoration: none;
    color: var(--ink);
    transition: border-color 0.15s, background 0.15s;
}
.finance-workflow-links a:hover { border-color: #94a3b8; background: #f8fafc; }
.finance-workflow-links a.is-primary {
    border-color: transparent;
    background: linear-gradient(145deg, var(--brand-maroon), var(--brand-maroon-deep));
    color: #fff;
}
.finance-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }
.finance-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(12, 36, 64, 0.05);
}
.finance-panel-head { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.finance-panel-head h3 { margin: 0; font-size: 0.95rem; color: #1e3a5f; }
.finance-feed { flex: 1; padding: 0.35rem 1rem; }
.finance-feed-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0.15rem 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    align-items: center;
}
.finance-feed-row:last-child { border-bottom: 0; }
.finance-feed-row:hover .finance-feed-number { color: var(--brand-maroon); }
.finance-pill {
    grid-row: span 2;
    align-self: center;
    padding: 0.2rem 0.45rem;
    border-radius: 0.4rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    background: #e2e8f0;
    color: #334155;
}
.finance-pill.is-receipt { background: #d1fae5; color: #065f46; }
.finance-pill.is-payment { background: #ffedd5; color: #9a3412; }
.finance-pill.is-journal { background: #ede9fe; color: #5b21b6; }
.finance-pill.is-vat { background: #dbeafe; color: #1e40af; }
.finance-feed-number { font-size: 0.9rem; font-weight: 800; grid-column: 2; }
.finance-feed-meta { grid-column: 2; font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.finance-empty { margin: 0.75rem 0; color: var(--muted); font-size: 0.9rem; }
.finance-panel-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--line);
    background: #fafbfc;
}
.finance-panel-foot .button.ghost { background: transparent; border: 1px solid var(--line); }
.finance-row { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.finance-row:last-of-type { border-bottom: 0; }
.finance-page { display: grid; gap: 1rem; }
.finance-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; }
.finance-coa-tree { list-style: none; margin: 0; padding: 0; }
.finance-coa-node { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.finance-coa-node.is-group { font-weight: 800; background: #f7fbf9; }
.finance-coa-children { list-style: none; margin: 0; padding-inline-start: 1rem; grid-column: 1 / -1; }
.finance-coa-type { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.finance-journal-line { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.5rem; margin-bottom: 0.65rem; padding-bottom: 0.65rem; border-bottom: 1px dashed var(--line); }
.finance-journal-line .span-2 { grid-column: span 2; }
.finance-pending-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.65rem; align-items: center; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.finance-invoice-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.finance-invoice-parties { display: grid; gap: 0.75rem; }
.finance-invoice-totals { margin-top: 1rem; text-align: end; font-weight: 800; }
.finance-voucher-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.finance-voucher-filters a { padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.finance-voucher-filters a.is-active { background: var(--brand-maroon); color: #fff; border-color: var(--brand-maroon); }
.finance-page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.finance-coa-add { margin-top: 1rem; }
.finance-module-link { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px dashed var(--line); }
.finance-module-link ul { margin: 0.35rem 0 0; padding-inline-start: 1.25rem; }

/* Journal entry composer & print */
.journal-compose { display: grid; gap: 1rem; max-width: 64rem; }
.journal-compose-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.journal-compose-shell { display: grid; gap: 0.85rem; }
.journal-compose-meta .grid { gap: 0.75rem; }
.journal-lines-card { padding: 0; overflow: hidden; }
.journal-lines-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #f8fafc, #fff);
}
.journal-lines-head h2 { margin: 0; font-size: 1.05rem; color: #1e3a5f; }
.journal-lines-table-wrap { overflow-x: auto; padding: 0 0.35rem 0.5rem; }
.journal-lines-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.journal-lines-table th,
.journal-lines-table td { padding: 0.55rem 0.45rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.journal-lines-table thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #f8fafc; }
.journal-lines-table select,
.journal-lines-table input { width: 100%; min-width: 5rem; }
.journal-lines-table .journal-account { min-width: 12rem; }
.journal-totals-row th { background: #0f172a; color: #e2e8f0; font-weight: 800; }
.journal-totals-row th .journal-balance-pill { font-size: 0.78rem; font-weight: 800; padding: 0.2rem 0.55rem; border-radius: 999px; }
.journal-balance-pill.is-balanced { background: #059669; color: #fff; }
.journal-balance-pill.is-warn { background: #f59e0b; color: #0f172a; }
.journal-balance-pill.is-empty { background: #64748b; color: #fff; }
.journal-line-actions { width: 2.5rem; text-align: center; }
.journal-remove-line {
    border: 0;
    background: #fee2e2;
    color: #b91c1c;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    font-weight: 900;
}
.journal-attachments-card { padding: 1rem 1.1rem; }
.journal-attachments-card h2 { margin: 0 0 0.35rem; font-size: 1rem; }
.journal-file-drop {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 0.85rem;
    background: #f8fafc;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    color: #334155;
}
.journal-file-drop input { font-size: 0.85rem; }
.journal-file-list { margin: 0.65rem 0 0; padding-inline-start: 1.2rem; font-size: 0.88rem; }
.journal-compose-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: #fff;
    position: sticky;
    bottom: 0.5rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    z-index: 2;
}
.journal-compose-foot button:disabled { opacity: 0.45; cursor: not-allowed; }
.journal-view { display: grid; gap: 1rem; max-width: 52rem; margin-inline: auto; }
.journal-view-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.journal-print-doc {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}
.journal-print-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #1e3a5f;
    margin-bottom: 1rem;
}
.journal-print-brand { display: flex; gap: 0.85rem; align-items: center; }
.journal-print-brand h1 { margin: 0.2rem 0 0; font-size: 1.25rem; color: #0f172a; }
.journal-print-kicker { margin: 0; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; color: #64748b; letter-spacing: 0.05em; }
.journal-print-meta { display: grid; gap: 0.45rem; margin: 0; font-size: 0.82rem; text-align: end; }
.journal-print-meta div { display: grid; gap: 0.1rem; }
.journal-print-meta dt { margin: 0; color: var(--muted); font-weight: 700; }
.journal-print-meta dd { margin: 0; font-weight: 800; color: #0f172a; }
.journal-print-description { margin: 0 0 1rem; line-height: 1.55; }
.journal-print-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.journal-print-table th,
.journal-print-table td { border: 1px solid #cbd5e1; padding: 0.45rem 0.5rem; }
.journal-print-table thead th { background: #1e3a5f; color: #fff; font-size: 0.76rem; }
.journal-print-table tfoot th { background: #f1f5f9; }
.journal-print-table .num { text-align: end; font-variant-numeric: tabular-nums; font-weight: 700; }
.journal-print-balanced { color: #047857; font-weight: 800; }
.journal-print-signatures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #94a3b8;
}
.journal-print-signatures span { display: block; font-size: 0.78rem; font-weight: 800; color: #475569; }
.journal-print-signatures em {
    display: block;
    margin-top: 2.25rem;
    border-top: 1px solid #0f172a;
    font-style: normal;
    height: 0;
}
.journal-print-attachments { margin-top: 1rem; font-size: 0.85rem; }
.journal-print-attachments h2 { font-size: 0.9rem; margin: 0 0 0.35rem; }
.journal-print-footer { margin: 1rem 0 0; font-size: 0.75rem; text-align: center; }
.journal-attachments-panel { padding: 1rem; }
.journal-attachment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.journal-attachment-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
}
.journal-attachment-upload { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: end; margin-top: 0.75rem; }
.link-danger { border: 0; background: none; color: #b91c1c; font-weight: 800; cursor: pointer; text-decoration: underline; }

/* Finance journals ledger index */
.journal-ledger { display: grid; gap: 1rem; max-width: 72rem; }
.journal-ledger-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding: 1.35rem 1.45rem;
    border-radius: 1.25rem;
    background:
        radial-gradient(480px 220px at 100% 0%, rgba(212, 175, 55, 0.18), transparent 55%),
        linear-gradient(135deg, #0b1020 0%, #152238 48%, #1e3a5f 100%);
    color: #fff;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 20px 44px rgba(11, 16, 32, 0.32);
}
.journal-ledger-hero h1 { margin: 0.25rem 0 0; color: #fff; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.journal-ledger-lead { margin: 0.45rem 0 0; color: #c8d4e8; max-width: 38rem; line-height: 1.5; }
.journal-ledger-facility { margin: 0.35rem 0 0; color: #94a3b8 !important; font-size: 0.88rem; }
.journal-ledger-hero-actions { display: flex; flex-direction: column; gap: 0.4rem; min-width: 10.5rem; }
.journal-ledger-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}
.journal-ledger-metric {
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.85rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: #fff;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(12, 36, 64, 0.05);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.journal-ledger-metric span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.journal-ledger-metric strong { font-size: 1.45rem; color: var(--brand-maroon); font-variant-numeric: tabular-nums; }
.journal-ledger-metric.is-active {
    border-color: #1e3a5f;
    box-shadow: 0 10px 26px rgba(30, 58, 95, 0.12);
    background: linear-gradient(180deg, #f8fafc, #fff);
}
.journal-ledger-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)) auto;
    gap: 0.65rem;
    align-items: end;
    padding: 0.9rem 1rem;
}
.journal-ledger-filters label span { display: block; font-size: 0.78rem; font-weight: 800; color: var(--muted); margin-bottom: 0.25rem; }
.journal-ledger-filter-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.journal-ledger-table-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(12, 36, 64, 0.06);
}
.journal-ledger-table-wrap { overflow-x: auto; }
.journal-ledger-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.journal-ledger-table thead th {
    padding: 0.65rem 0.75rem;
    text-align: start;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.journal-ledger-table tbody td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.journal-ledger-table tbody tr:hover { background: #f8fafc; }
.journal-ledger-number { font-weight: 800; color: #1e3a5f; text-decoration: none; font-variant-numeric: tabular-nums; }
.journal-ledger-number:hover { color: var(--brand-maroon); text-decoration: underline; }
.journal-ledger-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.journal-ledger-desc { max-width: 22rem; line-height: 1.4; }
.journal-ledger-party { display: block; font-size: 0.8rem; margin-top: 0.15rem; }
.journal-ledger-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; color: #0f172a; }
.journal-attach-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.78rem;
    font-weight: 900;
}
.journal-ledger-foot { padding: 0.75rem 1rem; border-top: 1px solid var(--line); background: #fafbfc; }
.journal-ledger-empty { padding: 2.5rem 1.5rem; text-align: center; display: grid; gap: 0.75rem; justify-items: center; }

/* Finance voucher composer */
.voucher-compose { display: grid; gap: 1rem; max-width: 70rem; }
.voucher-compose-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding: 1.35rem 1.45rem;
    border-radius: 1.25rem;
    color: #fff;
    box-shadow: 0 20px 44px rgba(11, 16, 32, 0.28);
}
.voucher-compose--receipt .voucher-compose-hero {
    background:
        radial-gradient(460px 200px at 100% 0%, rgba(16, 185, 129, 0.25), transparent 55%),
        linear-gradient(135deg, #064e3b 0%, #047857 48%, #065f46 100%);
    border: 1px solid rgba(110, 231, 183, 0.25);
}
.voucher-compose--payment .voucher-compose-hero {
    background:
        radial-gradient(460px 200px at 100% 0%, rgba(251, 191, 36, 0.28), transparent 55%),
        linear-gradient(135deg, #451a03 0%, #9a3412 42%, #c2410c 100%);
    border: 1px solid rgba(253, 186, 116, 0.28);
}
.voucher-compose-kicker { margin: 0; font-weight: 800; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; opacity: 0.9; }
.voucher-compose--payment .voucher-compose-kicker { color: #fde68a; }
.voucher-compose--receipt .voucher-compose-kicker { color: #a7f3d0; }
.voucher-compose-hero h1 { margin: 0.25rem 0 0; color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.95rem); }
.voucher-compose-lead { margin: 0.4rem 0 0; color: #ffedd5; max-width: 40rem; line-height: 1.5; }
.voucher-compose--receipt .voucher-compose-lead { color: #d1fae5; }
.voucher-compose-facility { color: rgba(255, 255, 255, 0.75) !important; margin: 0.35rem 0 0; }
.voucher-compose-hero-actions { display: flex; flex-direction: column; gap: 0.4rem; min-width: 10rem; }
.voucher-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.65rem;
    align-items: center;
}
.voucher-flow-step {
    padding: 0.65rem 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid var(--line);
    background: #fff;
}
.voucher-flow-step span { display: block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.voucher-flow-step strong { font-size: 0.88rem; }
.voucher-flow-step.is-debit { border-color: #86efac; background: #f0fdf4; }
.voucher-compose--payment .voucher-flow-step.is-debit { border-color: #fdba74; background: #fff7ed; }
.voucher-flow-step.is-credit { border-color: #93c5fd; background: #eff6ff; }
.voucher-flow-arrow { font-size: 1.35rem; font-weight: 900; color: #64748b; text-align: center; }
.voucher-compose-shell { display: grid; gap: 0.85rem; }
.voucher-meta-card { padding: 1rem 1.1rem; }
.voucher-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.voucher-meta-grid .span-all { grid-column: 1 / -1; }
.voucher-compose-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16rem;
    gap: 0.85rem;
    align-items: start;
}
.voucher-offsets-card { padding: 0; overflow: hidden; }
.voucher-offsets-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #f8fafc, #fff);
}
.voucher-offsets-head h2 { margin: 0; font-size: 1.05rem; }
.voucher-compose--payment .voucher-totals-row th { background: #9a3412; }
.voucher-compose--receipt .voucher-totals-row th { background: #047857; }
.voucher-remove-offset {
    border: 0;
    background: #fee2e2;
    color: #b91c1c;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    font-weight: 900;
    cursor: pointer;
}
.voucher-aside { padding: 0.85rem 1rem; position: sticky; top: 0.5rem; }
.voucher-aside h3 { margin: 0 0 0.35rem; font-size: 0.95rem; color: #1e3a5f; }
.voucher-quick-accounts { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.35rem; max-height: 20rem; overflow-y: auto; }
.voucher-pick-account {
    display: grid;
    gap: 0.1rem;
    width: 100%;
    text-align: start;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid var(--line);
    background: #f8fafc;
    cursor: pointer;
    font: inherit;
    color: var(--ink);
}
.voucher-pick-account:hover { border-color: #94a3b8; background: #fff; }
.voucher-pick-account code { font-size: 0.72rem; font-weight: 800; color: #64748b; }
.voucher-pick-account span { font-size: 0.8rem; font-weight: 700; line-height: 1.25; }
.voucher-compose-foot { margin-top: 0.25rem; }

/* Hospital supplies inventory desk */
.stock-desk { display: grid; gap: 1rem; }
.stock-desk .inv-hero {
    background:
        radial-gradient(420px 200px at 0 0%, rgba(255, 255, 255, 0.08), transparent 58%),
        radial-gradient(380px 180px at 100% 100%, rgba(157, 180, 196, 0.35), transparent 60%),
        linear-gradient(132deg, var(--brand-night) 0%, var(--brand-maroon-deep) 42%, var(--brand-maroon) 100%);
    box-shadow: 0 24px 50px rgba(74, 18, 28, 0.22);
}
.stock-desk .inv-compose-head h2 { color: var(--brand-maroon); }
.stock-desk .inv-submit-btn { background: linear-gradient(145deg, var(--brand-maroon-light), var(--brand-maroon-dark)); }
.stock-desk .inv-ghost-btn { color: var(--brand-maroon); }
.stock-desk .inv-ghost-primary { color: var(--brand-maroon-dark); }
.inv-catalog-full { grid-column: 1 / -1; }
.inv-filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.inv-filter-bar select {
    padding: 0.55rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid #ccfbf1;
    background: #fafafa;
    font-weight: 700;
}
.stock-cat-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 800;
}
.stock-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    padding: 1.35rem 1.45rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 45%, #0f766e 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
}
.stock-kicker { margin: 0; font-weight: 800; text-transform: uppercase; font-size: 0.72rem; opacity: 0.92; }
.stock-hero h1 { margin: 0.25rem 0 0; color: #fff; }
.stock-meta, .stock-lead { margin: 0.35rem 0 0; color: #ccfbf1; }
.stock-clock {
    padding: 0.1rem 0.55rem;
    border-radius: 0.45rem;
    background: rgba(0, 0, 0, 0.25);
    font-variant-numeric: tabular-nums;
}
.stock-hero-links { display: flex; flex-direction: column; gap: 0.45rem; }
.stock-ghost {
    display: inline-flex;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    color: #0f766e;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
}
.stock-ghost-primary { background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.stock-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.stock-metrics article { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 0.85rem; box-shadow: 0 10px 22px rgba(12, 36, 64, 0.06); }
.stock-metrics article.is-warn { border-color: #fecaca; background: #fff7f7; }
.stock-metrics span { color: var(--muted); font-weight: 800; font-size: 0.82rem; }
.stock-metrics strong { display: block; font-size: 1.85rem; color: var(--brand-maroon); margin-top: 0.15rem; }
.stock-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.stock-action {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: center;
    min-height: 4.5rem;
    padding: 0.85rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: #fff;
    text-decoration: none;
    color: var(--ink);
}
.stock-action.is-primary { background: linear-gradient(145deg, var(--brand-maroon), var(--brand-maroon-deep)); color: #fff; border-color: transparent; }
.stock-action .step { font-weight: 800; color: var(--brand-maroon); }
.stock-action.is-primary .step { color: #fff; }
.stock-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.stock-panel { background: #fff; border: 1px solid var(--line); border-radius: 1.15rem; padding: 1rem; }
.stock-panel-wide { grid-column: 1 / -1; }
.stock-panel-head { margin-bottom: 0.75rem; }
.stock-panel-head h2 { margin: 0; }
.stock-row { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.stock-row:last-of-type { border-bottom: 0; }
.stock-rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem; }
.stock-rule-grid-compact { margin-top: 0.5rem; }
.stock-rule-card {
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    border: 1px solid #ccfbf1;
    background: #f0fdfa;
}
.stock-rule-card h3 { margin: 0 0 0.35rem; font-size: 0.95rem; color: #134e4a; }
.stock-rule-card ul { margin: 0.35rem 0 0; padding-inline-start: 1.1rem; font-size: 0.88rem; }
.stock-trigger { display: inline-block; margin-bottom: 0.35rem; font-size: 0.72rem; opacity: 0.85; }
.stock-rule-qty { font-weight: 800; color: #0f766e; }
.stock-low-row { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.stock-low-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.88rem; }
.stock-low-name { margin: 0.2rem 0 0.35rem; font-size: 0.82rem; }
.stock-meter { height: 0.35rem; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.stock-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f87171, #0f766e); }
.stock-desk-v2 .stock-hero-rich {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(12rem, 0.5fr); gap: 1rem; align-items: end;
}
.stock-hero-main { min-width: 0; }
.stock-hero-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.75rem; }
.stock-cta {
    display: inline-flex; padding: 0.55rem 0.95rem; border-radius: 0.75rem; background: #fff; color: #0f766e;
    font-weight: 900; text-decoration: none; box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}
.stock-hero-aside { display: grid; gap: 0.45rem; align-content: end; }
.stock-pharmacy-note { margin: 0; color: #99f6e4; font-size: 0.8rem; max-width: 14rem; }
.stock-alert {
    display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center;
    padding: 0.85rem 1rem; border-radius: 1rem; border: 1px solid #fcd34d; background: #fffbeb; color: var(--ink);
}
.stock-alert-critical { border-color: #fecaca; background: #fef2f2; }
.stock-alert-po { border-color: #bfdbfe; background: #eff6ff; }
.stock-alert-icon { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 0.68rem; background: #f59e0b; color: #fff; }
.stock-alert-critical .stock-alert-icon { background: #dc2626; }
.stock-alert-po .stock-alert-icon { background: #2563eb; }
.stock-alert em { display: block; font-style: normal; color: var(--muted); font-size: 0.86rem; margin-top: 0.15rem; }
.stock-metrics-rich { grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); }
.stock-workflow header h2 { margin: 0 0 0.25rem; font-size: 1.05rem; color: #134e4a; }
.stock-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.stock-workflow-card {
    padding: 1rem; border-radius: 1.1rem; border: 1px solid var(--line); background: #fff;
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.06);
}
.stock-workflow-catalog { border-top: 3px solid #0f766e; }
.stock-workflow-procurement { border-top: 3px solid #2563eb; }
.stock-workflow-audit { border-top: 3px solid #d97706; }
.stock-workflow-card h3 { margin: 0; font-size: 0.96rem; }
.stock-workflow-card ul { list-style: none; margin: 0.55rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.stock-workflow-card a {
    display: block; padding: 0.45rem 0.6rem; border-radius: 0.55rem; border: 1px solid var(--line);
    font-weight: 800; font-size: 0.86rem; text-decoration: none; color: var(--ink);
}
.stock-workflow-card a.is-primary { background: #0f766e; color: #fff; border-color: transparent; }
.stock-board-rich { grid-template-columns: minmax(0, 1fr) 18rem; align-items: start; }
.stock-board-main { display: grid; gap: 0.85rem; min-width: 0; }
.stock-panel-rules { border-color: #99f6e4; }
.stock-low-panel .stock-panel-head h2 { color: #b45309; }
.stock-low-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.6rem; margin-bottom: 0.75rem; }
.stock-low-card {
    display: grid; gap: 0.25rem; padding: 0.7rem 0.8rem; border-radius: 0.85rem; border: 1px solid #fde68a;
    background: #fffbeb; text-decoration: none; color: inherit;
}
.stock-low-card.is-out { border-color: #fecaca; background: #fef2f2; }
.stock-low-card-top { display: flex; justify-content: space-between; gap: 0.35rem; font-size: 0.78rem; }
.stock-low-card code { font-weight: 800; color: #0f766e; }
.stock-aside { display: grid; gap: 0.75rem; }
.stock-aside-panel { padding: 0; overflow: hidden; }
.stock-aside-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.stock-aside-head h2 { margin: 0; font-size: 0.98rem; }
.stock-link { font-size: 0.82rem; font-weight: 800; color: #0f766e; text-decoration: none; }
.stock-feed { list-style: none; margin: 0; padding: 0.5rem 1rem; display: grid; gap: 0.35rem; }
.stock-feed-row { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; align-items: start; text-decoration: none; color: inherit; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.stock-feed-row:last-child { border-bottom: 0; }
.stock-feed-delta { font-weight: 900; font-variant-numeric: tabular-nums; min-width: 3.5rem; }
.stock-feed-delta.is-in { color: #047857; }
.stock-feed-delta.is-out { color: #b91c1c; }
.stock-feed-body { display: grid; gap: 0.08rem; font-size: 0.86rem; }
.stock-feed-time { font-size: 0.75rem; }
.stock-feed-simple .stock-feed-row { grid-template-columns: 1fr; gap: 0.15rem; }
.stock-pill { display: inline-block; padding: 0.1rem 0.45rem; border-radius: 0.4rem; font-size: 0.72rem; font-weight: 800; background: #e2e8f0; }
.stock-pill.po-draft { background: #fef3c7; color: #92400e; }
.stock-pill.po-ordered { background: #dbeafe; color: #1e40af; }
.stock-pill.po-received { background: #d1fae5; color: #047857; }
.stock-pill.count-draft { background: #fef3c7; color: #92400e; }
.stock-pill.count-posted { background: #d1fae5; color: #047857; }
.stock-enc-link { font-weight: 800; color: #0f766e; text-decoration: none; }
.stock-page-desk { gap: 1rem; }
.stock-empty-inline { padding: 0.5rem 0; }
.stock-page { display: grid; gap: 1rem; }
.stock-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; }
.stock-ledger-card { overflow-x: auto; }
.stock-ledger-table { width: 100%; border-collapse: collapse; }
.stock-ledger-table th, .stock-ledger-table td { padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--line); text-align: start; }
.stock-ledger-table tr.is-in .stock-delta { color: #0f766e; font-weight: 800; }
.stock-ledger-table tr.is-out .stock-delta { color: #b91c1c; font-weight: 800; }
.stock-po-form { display: grid; gap: 1rem; }
.stock-po-supplier { display: grid; gap: 0.35rem; max-width: 28rem; font-weight: 800; }
.stock-po-supplier input { padding: 0.55rem 0.65rem; border-radius: 0.65rem; border: 1px solid var(--line); }
.stock-po-lines-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; }
.stock-po-lines-head h2 { margin: 0; }
.stock-po-submit { margin: 0; }
.inv-receive-inline { display: flex; gap: 0.35rem; align-items: center; }
@media (max-width: 900px) {
    .stock-metrics, .stock-actions, .stock-board { grid-template-columns: 1fr; }
    .stock-panel-wide { grid-column: auto; }
    .finance-hero { grid-template-columns: 1fr; }
    .finance-hero-aside { justify-items: stretch; }
    .finance-hero-links { min-width: 0; }
    .finance-metrics, .finance-workflow-grid, .finance-board { grid-template-columns: 1fr; }
    .finance-journal-line { grid-template-columns: 1fr; }
    .journal-print-head { grid-template-columns: 1fr; }
    .journal-print-meta { text-align: start; }
    .journal-print-signatures { grid-template-columns: 1fr; }
    .journal-attachment-list li { grid-template-columns: 1fr; }
    .journal-ledger-metrics, .journal-ledger-filters { grid-template-columns: 1fr; }
    .journal-ledger-hero-actions { min-width: 0; width: 100%; }
    .voucher-meta-grid, .voucher-compose-layout, .voucher-flow { grid-template-columns: 1fr; }
    .voucher-flow-arrow { transform: rotate(90deg); }
    .voucher-compose-hero-actions { min-width: 0; width: 100%; }
}

.rcpt-print-page { display: grid; gap: 1rem; max-width: 52rem; margin: 0 auto; }
.rcpt-print-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 0.65rem 0.75rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(12, 36, 64, 0.08);
}
.rcpt-invoice-doc {
    background: #fff;
    border-radius: 1.25rem;
    border: 1px solid #dce3ec;
    box-shadow: 0 20px 44px rgba(12, 36, 64, 0.1);
    overflow: hidden;
}
.rcpt-invoice-brand {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.35rem;
    color: #fff;
    background:
        radial-gradient(420px 200px at 100% 0, rgba(255, 255, 255, 0.12), transparent 55%),
        linear-gradient(128deg, var(--brand-maroon) 0%, #6b1f32 45%, #0c5eaa 88%);
}
.rcpt-invoice-logo-wrap {
    width: 5.5rem;
    height: 5.5rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.35rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.rcpt-invoice-logo { max-width: 100%; max-height: 100%; object-fit: contain; }
.rcpt-invoice-hospital h1 {
    margin: 0;
    font-size: 1.35rem;
    color: #fff;
    line-height: 1.25;
}
.rcpt-invoice-legal { margin: 0.2rem 0 0; font-size: 0.88rem; opacity: 0.92; }
.rcpt-invoice-address { margin: 0.35rem 0 0; font-size: 0.82rem; max-width: 28rem; line-height: 1.45; opacity: 0.95; }
.rcpt-invoice-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
}
.rcpt-invoice-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem;
    border-radius: 0.85rem;
    background: #fff;
    color: var(--ink);
}
.rcpt-invoice-qr svg { display: block; width: 5.5rem; height: 5.5rem; }
.rcpt-invoice-qr-caption { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #0a5c48; }
.rcpt-invoice-title-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.35rem 0.75rem;
    border-bottom: 1px dashed var(--line);
}
.rcpt-invoice-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-maroon);
}
.rcpt-invoice-title-row h2 { margin: 0; font-size: 1.25rem; color: #0c2438; }
.rcpt-invoice-datetime {
    text-align: end;
    font-variant-numeric: tabular-nums;
}
.rcpt-invoice-datetime strong { display: block; font-size: 1.35rem; color: var(--brand-maroon); }
.rcpt-invoice-parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 0.85rem 1.35rem;
    background: #f8fafc;
}
.rcpt-invoice-parties h3 {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.rcpt-invoice-lines {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.rcpt-invoice-lines th,
.rcpt-invoice-lines td {
    padding: 0.55rem 1.35rem;
    border-bottom: 1px solid #eef2f6;
    text-align: start;
}
.rcpt-invoice-lines th { background: #f1f5f9; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; }
.rcpt-invoice-lines td:last-child,
.rcpt-invoice-lines th:last-child { text-align: end; font-variant-numeric: tabular-nums; }
.rcpt-line-code {
    display: inline-block;
    margin-inline-end: 0.35rem;
    padding: 0.05rem 0.35rem;
    border-radius: 0.3rem;
    background: #ecf8f4;
    color: #0a5c48;
    font-size: 0.72rem;
}
.rcpt-invoice-totals {
    padding: 0.85rem 1.35rem 1rem;
    background: linear-gradient(180deg, #fff, #fdf8fa);
}
.rcpt-total-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
    font-weight: 700;
}
.rcpt-total-grand {
    margin-top: 0.35rem;
    padding-top: 0.55rem;
    border-top: 2px solid var(--brand-maroon);
    font-size: 1.05rem;
}
.rcpt-total-grand strong { color: var(--brand-maroon); font-size: 1.25rem; }
.rcpt-invoice-footnote {
    margin: 0;
    padding: 0.75rem 1.35rem 1.1rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
    .rcpt-invoice-brand { grid-template-columns: 1fr; text-align: center; }
    .rcpt-invoice-qr { margin: 0 auto; }
    .rcpt-invoice-meta-row { justify-content: center; }
    .rcpt-invoice-parties { grid-template-columns: 1fr; }
}

@media print {
    .noprint { display: none !important; }
    body { background: #fff; }
    .card { border: 0; box-shadow: none; }
    .m-content { padding: 0 !important; }
    .banner { display: none !important; }
    .rcpt-print-page { max-width: none; margin: 0; }
    .rcpt-invoice-doc {
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    .journal-print-doc {
        border: none;
        box-shadow: none;
        border-radius: 0;
        max-width: none;
        padding: 0;
    }
    .journal-view { max-width: none; }
    .journal-print-table thead th { background: #1e3a5f !important; color: #fff !important; }
}

@media print {
    body.print-a4-receipt,
    body.print-thermal {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    body.print-thermal .rcpt-invoice-doc { width: 72mm; max-width: 72mm; font-size: 9pt; }
    body.print-thermal .rcpt-invoice-brand {
        grid-template-columns: 1fr;
        padding: 0.5rem 0.35rem;
        gap: 0.45rem;
        text-align: center;
    }
    body.print-thermal .rcpt-invoice-logo-wrap {
        width: 3.25rem;
        height: 3.25rem;
        margin: 0 auto;
    }
    body.print-thermal .rcpt-invoice-hospital h1 { font-size: 0.95rem; }
    body.print-thermal .rcpt-invoice-address,
    body.print-thermal .rcpt-invoice-meta-row { font-size: 7pt; }
    body.print-thermal .rcpt-invoice-qr svg { width: 4rem; height: 4rem; }
    body.print-thermal .rcpt-invoice-title-row,
    body.print-thermal .rcpt-invoice-parties,
    body.print-thermal .rcpt-invoice-totals { padding-inline: 0.35rem; }
    body.print-thermal .rcpt-invoice-lines th,
    body.print-thermal .rcpt-invoice-lines td { padding: 0.25rem 0.35rem; font-size: 8pt; }
    body.print-thermal .rcpt-invoice-parties { grid-template-columns: 1fr; }
    body.print-thermal .rcpt-total-grand strong { font-size: 1rem; }
}

/* Public home / gateway (pro) */
body.home-site {
    margin: 0;
    min-height: 100vh;
    background: #f4f4f6;
    color: var(--ink);
    overflow-x: hidden;
}

body.home-site-pro {
    background:
        radial-gradient(1000px 480px at 8% -10%, rgba(122, 22, 48, 0.11), transparent 52%),
        radial-gradient(900px 420px at 92% 20%, rgba(95, 99, 105, 0.09), transparent 55%),
        linear-gradient(180deg, #fafafa 0%, #ebebed 55%, #e4e4e7 100%);
}

.home-wrap {
    width: min(76rem, 100% - 2.25rem);
    margin-inline: auto;
}

.home-aura {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.55;
}

.home-aura-a {
    width: 28rem;
    height: 28rem;
    top: -6rem;
    inset-inline-start: -8rem;
    background: rgba(122, 22, 48, 0.18);
}

.home-aura-b {
    width: 22rem;
    height: 22rem;
    bottom: 10%;
    inset-inline-end: -6rem;
    background: rgba(95, 99, 105, 0.14);
}

body.home-site-pro main,
body.home-site-pro .home-top { position: relative; z-index: 1; }

@keyframes home-rise {
    from { opacity: 0; transform: translateY(1.25rem); }
    to { opacity: 1; transform: translateY(0); }
}

.home-reveal {
    animation: home-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-reveal-delay { animation-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
    .home-reveal, .home-reveal-delay { animation: none; }
    .home-module-card:hover, .home-platform-card:hover, .home-trust-card:hover { transform: none; }
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--brand-maroon-dark);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(122, 22, 48, 0.14);
    box-shadow: 0 8px 24px rgba(122, 22, 48, 0.08);
}

.home-btn-lg {
    min-height: 3rem;
    padding-inline: 1.35rem;
    font-size: 0.95rem;
}

.home-section-head-center {
    text-align: center;
    margin-inline: auto;
    max-width: 42rem;
}

.home-top {
    position: sticky;
    top: 0.65rem;
    z-index: 40;
    margin: 0.65rem auto 0;
    width: min(76rem, 100% - 1.25rem);
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.home-top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    justify-content: space-between;
    padding: 0.55rem 0.85rem;
}

.home-top-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.home-top-logo {
    display: block;
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

.home-top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    font-size: 0.84rem;
    font-weight: 800;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(122, 22, 48, 0.05);
    border: 1px solid rgba(122, 22, 48, 0.08);
}

.home-top-nav a {
    color: var(--brand-steel-dark);
    text-decoration: none;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.home-top-nav a:hover {
    color: var(--brand-maroon-dark);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.home-top-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.home-locale { margin: 0; }

.home-top-login {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding-inline: 1.1rem;
}

.home-hero {
    position: relative;
    padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 3.5rem);
    overflow: hidden;
}

.home-hero-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(122, 22, 48, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 22, 48, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 20%, transparent 78%);
}

.home-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(18rem, 0.98fr);
    gap: clamp(1.75rem, 4vw, 3.5rem);
    align-items: center;
}

.home-eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand-steel-dark);
}

.home-hero-copy h1 {
    margin: 0.65rem 0 0;
    font-size: clamp(1.95rem, 4.2vw, 3rem);
    font-weight: 900;
    line-height: 1.18;
    color: var(--brand-maroon-dark);
    letter-spacing: -0.03em;
}

.home-hero-checks {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.home-hero-checks li {
    position: relative;
    padding-inline-start: 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
}

.home-hero-checks li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.45rem;
    width: 0.65rem;
    height: 0.35rem;
    border-inline-start: 2px solid var(--brand-maroon);
    border-bottom: 2px solid var(--brand-maroon);
    transform: rotate(-45deg);
}

.home-hero-lead {
    margin: 1rem 0 0;
    max-width: 36rem;
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    line-height: 1.7;
    color: var(--muted);
}

.home-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.45rem;
}

.home-hero-enter { text-decoration: none; }

.button.ghost {
    background: transparent;
    border: 1px solid rgba(122, 22, 48, 0.22);
    color: var(--brand-maroon-dark);
    box-shadow: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.button.ghost:hover {
    background: #fff;
    border-color: rgba(122, 22, 48, 0.35);
}

.home-showcase {
    border-radius: 1.35rem;
    overflow: hidden;
    border: 1px solid rgba(122, 22, 48, 0.12);
    background: linear-gradient(165deg, #fff 0%, #f8f8fa 100%);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.9) inset,
        0 32px 70px rgba(45, 9, 18, 0.14),
        0 8px 20px rgba(0, 0, 0, 0.06);
    transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
    transition: transform 0.35s ease;
}

.home-hero-visual:hover .home-showcase {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.home-showcase-chrome {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    background: linear-gradient(180deg, #f0f0f2 0%, #e8e8eb 100%);
    border-bottom: 1px solid var(--line);
}

.home-showcase-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #d4d6da;
}

.home-showcase-dot:nth-child(1) { background: #e57373; }
.home-showcase-dot:nth-child(2) { background: #ffb74d; }
.home-showcase-dot:nth-child(3) { background: #81c784; }

.home-showcase-url {
    margin-inline-start: auto;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--muted);
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    background: #fff;
    border: 1px solid var(--line);
}

.home-showcase-body {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    min-height: 16rem;
}

.home-showcase-rail {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem 0.45rem;
    background: #fafafa;
    border-inline-end: 1px solid var(--line);
}

.home-showcase-rail-logo {
    height: 1.75rem;
    margin-bottom: 0.35rem;
    border-radius: 0.45rem;
    background: linear-gradient(135deg, #faf0f3, #fff);
    border: 1px solid #ecd5dc;
}

.home-showcase-rail-item {
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.25;
    padding: 0.35rem 0.4rem;
    border-radius: 0.45rem;
    color: var(--muted);
    background: #fff;
    border: 1px solid transparent;
}

.home-showcase-rail-item[data-module="reception"] { color: var(--brand-maroon-dark); border-color: #ecd5dc; background: #faf0f3; }

.home-showcase-main {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.home-showcase-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.home-showcase-kpi {
    padding: 0.5rem 0.55rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid var(--line);
}

.home-showcase-kpi-accent {
    border-color: rgba(122, 22, 48, 0.22);
    background: linear-gradient(165deg, #faf0f3, #fff);
}

.home-showcase-kpi-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    color: var(--muted);
}

.home-showcase-kpi strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 1rem;
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.home-showcase-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-content: flex-start;
}

.home-showcase-chips li {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    color: var(--brand-maroon-dark);
    background: #fff;
    border: 1px solid #e8d8dc;
}

.home-showcase-chips li[data-module="reception"],
.home-showcase-chips li[data-module="emr"],
.home-showcase-chips li[data-module="finance"] {
    background: linear-gradient(180deg, #faf0f3, #fff);
}

.home-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: clamp(2rem, 4vw, 3rem);
    padding: 0;
}

.home-stat-card {
    padding: 1.15rem 1.25rem;
    border-radius: 1.05rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.06);
    text-align: center;
    backdrop-filter: blur(8px);
}

.home-stats dt {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.home-stat-num {
    font-size: clamp(1.65rem, 2.8vw, 2.1rem);
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.home-stat-text {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.home-stats dd { margin: 0.4rem 0 0; }

.home-section {
    padding-block: clamp(2.5rem, 6vw, 4rem);
}

.home-flow {
    background:
        radial-gradient(720px 320px at 50% 0%, rgba(122, 22, 48, 0.06), transparent 62%),
        linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.72) 40%, rgba(255, 255, 255, 0.72) 60%, transparent 100%);
}

.home-flow-shell {
    width: min(76rem, calc(100% - 2.25rem));
    margin: 2rem auto 0;
    padding: clamp(1.35rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
    border-radius: 1.45rem;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 249, 0.92));
    border: 1px solid rgba(122, 22, 48, 0.1);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.9) inset,
        0 28px 64px rgba(45, 9, 18, 0.08);
}

.home-flow-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0.25rem 0.25rem;
}

.home-flow-track::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 1.85rem;
    inset-inline: 9%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-maroon-light), var(--brand-maroon), var(--brand-steel-dark));
    opacity: 0.35;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-flow-shell.is-inview .home-flow-track::before {
    opacity: 0.55;
    transform: scaleX(1);
}

.home-flow-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.home-flow-node {
    position: relative;
    display: grid;
    place-items: center;
    width: 3.65rem;
    height: 3.65rem;
    margin-bottom: 0.85rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(122, 22, 48, 0.15);
    box-shadow:
        0 0 0 4px rgba(122, 22, 48, 0.06),
        0 10px 28px rgba(122, 22, 48, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-flow-icon {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
    color: var(--brand-maroon);
}

.home-flow-step[data-step="reception"] .home-flow-icon::before { content: "◆"; }
.home-flow-step[data-step="emr"] .home-flow-icon::before { content: "✚"; }
.home-flow-step[data-step="diagnostics"] .home-flow-icon::before { content: "◎"; }
.home-flow-step[data-step="pharmacy"] .home-flow-icon::before { content: "⚕"; }
.home-flow-step[data-step="finance"] .home-flow-icon::before { content: "₯"; }

.home-flow-index {
    position: absolute;
    inset-inline-end: -0.15rem;
    bottom: -0.2rem;
    min-width: 1.45rem;
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #fff;
    background: linear-gradient(180deg, var(--brand-maroon-light), var(--brand-maroon-dark));
    box-shadow: 0 4px 10px rgba(122, 22, 48, 0.3);
}

.home-flow-body {
    width: 100%;
    padding: 1rem 0.9rem 1.05rem;
    border-radius: 1.1rem;
    background: #fff;
    border: 1px solid rgba(122, 22, 48, 0.09);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    min-height: 7.5rem;
}

.home-flow-step:hover .home-flow-node {
    transform: scale(1.06);
    box-shadow:
        0 0 0 5px rgba(122, 22, 48, 0.1),
        0 14px 32px rgba(122, 22, 48, 0.18);
}

.home-flow-step:hover .home-flow-body {
    transform: translateY(-4px);
    border-color: rgba(122, 22, 48, 0.18);
    box-shadow: 0 20px 44px rgba(122, 22, 48, 0.11);
}

.home-flow-body h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--brand-maroon-dark);
    line-height: 1.4;
}

.home-flow-body p {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--muted);
    font-weight: 600;
}

.home-modules-section {
    background:
        radial-gradient(600px 280px at 0% 50%, rgba(122, 22, 48, 0.05), transparent 70%),
        radial-gradient(500px 240px at 100% 80%, rgba(95, 99, 105, 0.06), transparent 68%);
}

.home-section-head {
    max-width: 40rem;
    margin-bottom: 1.65rem;
}

.home-section-head h2 {
    margin: 0.45rem 0 0;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.home-section-lead {
    margin: 0.65rem 0 0;
    line-height: 1.65;
    color: var(--muted);
    font-size: 0.95rem;
}

.home-module-grid {
    list-style: none;
    margin: 1.75rem auto 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.9rem;
    width: min(68rem, calc(100% - 2.25rem));
}

.home-module-grid-center {
    margin-inline: auto;
}

.home-module-card {
    position: relative;
    box-sizing: border-box;
    flex: 0 1 calc(33.333% - 0.6rem);
    min-width: 16rem;
    max-width: 22rem;
    padding: 1.2rem 1.15rem 1.25rem;
    border-radius: 1.15rem;
    background: linear-gradient(168deg, #fff 0%, #fbfbfb 100%);
    border: 1px solid rgba(122, 22, 48, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
}

.home-module-card::after {
    content: "";
    position: absolute;
    width: 8rem;
    height: 8rem;
    top: -3rem;
    inset-inline-end: -2rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 22, 48, 0.07), transparent 68%);
    pointer-events: none;
}

.home-module-card:hover {
    transform: translateY(-5px);
    border-color: rgba(122, 22, 48, 0.18);
    box-shadow: 0 22px 48px rgba(122, 22, 48, 0.12);
}

.home-module-num {
    position: absolute;
    top: 0.85rem;
    inset-inline-end: 0.95rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: rgba(122, 22, 48, 0.35);
}

.home-module-icon {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    margin-bottom: 0.7rem;
    background: linear-gradient(145deg, #faf0f3, #fff);
    border: 1px solid #ecd5dc;
    box-shadow: 0 6px 14px rgba(122, 22, 48, 0.08);
}

.home-module-card[data-module="reception"] .home-module-icon::before { content: "◆"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.85rem; color: var(--brand-maroon); }
.home-module-card[data-module="emr"] .home-module-icon::before { content: "✚"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 1rem; color: var(--brand-maroon); }
.home-module-card[data-module="lis"] .home-module-icon::before { content: "⌗"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.9rem; color: var(--brand-maroon); }
.home-module-card[data-module="ris"] .home-module-icon::before { content: "◎"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.95rem; color: var(--brand-maroon); }
.home-module-card[data-module="pharmacy"] .home-module-icon::before { content: "⚕"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.95rem; color: var(--brand-maroon); }
.home-module-card[data-module="nursing"] .home-module-icon::before { content: "♥"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.85rem; color: var(--brand-maroon); }
.home-module-card[data-module="inpatient"] .home-module-icon::before { content: "▣"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.9rem; color: var(--brand-maroon); }
.home-module-card[data-module="finance"] .home-module-icon::before { content: "₯"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.95rem; color: var(--brand-maroon); }
.home-module-card[data-module="inventory"] .home-module-icon::before { content: "▤"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.9rem; color: var(--brand-maroon); }
.home-module-card[data-module="hr"] .home-module-icon::before { content: "HR"; display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.62rem; font-weight: 900; color: var(--brand-maroon); }

.home-module-card h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 900;
    color: var(--ink);
}

.home-module-card p {
    margin: 0.45rem 0 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--muted);
}

.home-platform-section {
    padding-block: clamp(2.5rem, 6vw, 4rem);
}

.home-platform-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: start;
    padding: clamp(1.35rem, 3vw, 2rem);
    border-radius: 1.35rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(250, 250, 251, 0.88));
    border: 1px solid rgba(122, 22, 48, 0.1);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.07);
}

.home-platform-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.home-platform-card {
    position: relative;
    padding: 1.15rem 1.1rem 1.2rem;
    border-radius: 1.05rem;
    background: #fff;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-platform-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(122, 22, 48, 0.1);
}

.home-platform-icon {
    display: flex;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.7rem;
    margin-bottom: 0.6rem;
    background: linear-gradient(145deg, #faf0f3, #fff);
    border: 1px solid #ecd5dc;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--brand-maroon);
}

.home-platform-card[data-platform="patients"] .home-platform-icon::before { content: "◉"; }
.home-platform-card[data-platform="structure"] .home-platform-icon::before { content: "▦"; }
.home-platform-card[data-platform="clinics"] .home-platform-icon::before { content: "✚"; }
.home-platform-card[data-platform="ai"] .home-platform-icon::before { content: "◎"; }

.home-platform-card h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.home-platform-card p {
    margin: 0.5rem 0 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--muted);
}

.home-trust-grid {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.home-trust-card {
    padding: 1.15rem 1.1rem;
    border-radius: 1.05rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-trust-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(122, 22, 48, 0.1);
}

.home-trust-icon {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    margin-bottom: 0.65rem;
    align-items: center;
    justify-content: center;
    background: var(--brand-maroon-dark);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
}

.home-trust-card[data-trust="audit"] .home-trust-icon::before { content: "✓"; }
.home-trust-card[data-trust="scope"] .home-trust-icon::before { content: "◆"; }
.home-trust-card[data-trust="ai"] .home-trust-icon::before { content: "AI"; font-size: 0.62rem; }
.home-trust-card[data-trust="staff"] .home-trust-icon::before { content: "⬢"; }

.home-trust-card h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--ink);
}

.home-trust-card p {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--muted);
    font-weight: 600;
}

/* CTA — sign-in pro */
.home-cta-pro {
    padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.home-cta-pro-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    gap: 0;
    border-radius: 1.65rem;
    overflow: hidden;
    border: 1px solid rgba(122, 22, 48, 0.12);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px) saturate(1.15);
    box-shadow:
        0 28px 64px rgba(122, 22, 48, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.75) inset;
}

.home-cta-pro-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
    padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2rem);
    background:
        radial-gradient(120% 90% at 50% 100%, rgba(122, 22, 48, 0.22), transparent 58%),
        linear-gradient(155deg, #5c0f24 0%, #7a1630 42%, #3d1522 100%);
    color: #fff;
    min-height: 100%;
}

.home-cta-pro-mesh {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
    pointer-events: none;
}

.home-cta-pro-orbit {
    position: absolute;
    width: 16rem;
    height: 16rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -54%);
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    animation: home-cta-orbit-spin 24s linear infinite;
    pointer-events: none;
}

body.home-site[dir="rtl"] .home-cta-pro-orbit {
    left: auto;
    right: 50%;
    transform: translate(50%, -54%);
}

@keyframes home-cta-orbit-spin {
    to { transform: translate(-50%, -54%) rotate(360deg); }
}

body.home-site[dir="rtl"] .home-cta-pro-orbit {
    animation-name: home-cta-orbit-spin-rtl;
}

@keyframes home-cta-orbit-spin-rtl {
    to { transform: translate(50%, -54%) rotate(360deg); }
}

.home-cta-pro-logo-wrap {
    position: relative;
    z-index: 1;
    padding: 1rem 1.35rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    animation: home-cta-logo-float 4s ease-in-out infinite;
}

@keyframes home-cta-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-0.4rem); }
}

.home-cta-pro-logo {
    display: block;
    height: clamp(2.75rem, 5vw, 3.35rem);
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}

.home-cta-pro-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 20rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-cta-pro-stats li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.55rem 0.35rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    text-align: center;
}

.home-cta-pro-stats strong {
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
}

.home-cta-pro-stats span {
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.72);
}

.home-cta-pro-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.75rem, 4vw, 2.85rem) clamp(1.5rem, 4vw, 3rem);
}

.home-cta-pro-eyebrow {
    margin-bottom: 0.35rem;
}

.home-cta-pro-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    font-weight: 900;
    line-height: 1.2;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.home-cta-pro-lead {
    margin: 0.75rem 0 0;
    max-width: 36rem;
    font-size: clamp(0.92rem, 1.6vw, 1.02rem);
    line-height: 1.65;
    font-weight: 600;
    color: var(--muted);
}

.home-cta-pro-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.35rem 0 0;
    padding: 0;
    list-style: none;
}

.home-cta-pro-features li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--brand-maroon-dark);
    background: rgba(122, 22, 48, 0.06);
    border: 1px solid rgba(122, 22, 48, 0.12);
}

.home-cta-pro-feature-icon {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-maroon), #c44b6a);
    box-shadow: 0 0 0 3px rgba(122, 22, 48, 0.12);
    flex-shrink: 0;
}

.home-cta-pro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.home-cta-pro-btn-primary {
    box-shadow: 0 14px 32px rgba(122, 22, 48, 0.22) !important;
}

.home-cta-pro-btn-ghost {
    border-color: rgba(122, 22, 48, 0.2) !important;
    color: var(--brand-maroon-dark) !important;
    font-weight: 800 !important;
}

.home-cta-pro-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1.15rem 0 0;
    max-width: 34rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.5;
    color: rgba(26, 26, 30, 0.5);
}

.home-cta-pro-note-dot {
    width: 0.4rem;
    height: 0.4rem;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: var(--brand-maroon);
    flex-shrink: 0;
    animation: home-cta-note-pulse 2.2s ease-in-out infinite;
}

@keyframes home-cta-note-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 820px) {
    .home-cta-pro-card {
        grid-template-columns: 1fr;
    }

    .home-cta-pro-visual {
        padding-block: 2rem;
    }

    .home-cta-pro-orbit {
        width: 13rem;
        height: 13rem;
    }

    .home-cta-pro-body {
        text-align: center;
        align-items: center;
    }

    .home-cta-pro-lead,
    .home-cta-pro-note {
        text-align: center;
    }

    .home-cta-pro-features {
        justify-content: center;
    }

    .home-cta-pro-actions {
        justify-content: center;
        width: 100%;
    }

    .home-cta-pro-actions .button {
        flex: 1 1 auto;
        justify-content: center;
        min-width: 10rem;
    }
}

@media (max-width: 420px) {
    .home-cta-pro-stats {
        grid-template-columns: 1fr;
        max-width: 14rem;
    }

    .home-cta-pro-actions {
        flex-direction: column;
    }

    .home-cta-pro-actions .button {
        width: 100%;
    }
}

.home-footer {
    padding: 1.75rem 0 2.25rem;
    border-top: 1px solid rgba(122, 22, 48, 0.1);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
}

.home-footer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.home-footer-brand {
    margin: 0;
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.home-footer-tagline {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.home-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.15rem;
    font-size: 0.86rem;
    font-weight: 800;
}

.home-footer-nav a {
    color: var(--brand-steel-dark);
    text-decoration: none;
}

.home-footer-nav a:hover { color: var(--brand-maroon-dark); }

.home-footer-copy {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 1100px) {
    .home-flow-track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
    .home-flow-track::before { display: none; }
    .home-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-module-card { flex: 0 1 calc(50% - 0.45rem); max-width: none; }
}

@media (max-width: 900px) {
    .home-hero-grid { grid-template-columns: 1fr; }
    .home-hero-visual { order: -1; }
    .home-showcase { transform: none; }
    .home-top { top: 0; width: 100%; border-radius: 0; margin: 0; }
    .home-top-nav { width: 100%; justify-content: center; order: 3; }
    .home-stats { grid-template-columns: 1fr; }
    .home-platform-shell { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .home-flow-shell { padding-inline: 1rem; }
    .home-flow-track {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding-inline-start: 0.5rem;
    }
    .home-flow-track::before {
        display: block;
        top: 0.5rem;
        bottom: 0.5rem;
        inset-inline: auto;
        inset-inline-start: 1.72rem;
        width: 3px;
        height: auto;
        transform: scaleY(0);
        transform-origin: top;
    }
    .home-flow-shell.is-inview .home-flow-track::before {
        transform: scaleY(1);
    }
    .home-flow-step {
        flex-direction: row;
        align-items: flex-start;
        text-align: start;
        gap: 0.85rem;
    }
    .home-flow-node {
        flex-shrink: 0;
        margin-bottom: 0;
        width: 3.25rem;
        height: 3.25rem;
    }
    .home-flow-body {
        min-height: 0;
        flex: 1;
    }
    .home-module-card { flex: 1 1 100%; min-width: 0; max-width: 26rem; margin-inline: auto; }
    .home-platform-grid { grid-template-columns: 1fr; }
    .home-trust-grid { grid-template-columns: 1fr; }
    .home-showcase-body { grid-template-columns: 1fr; }
    .home-showcase-rail {
        flex-direction: row;
        flex-wrap: wrap;
        border-inline-end: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 520px) {
    .home-top-inner { justify-content: center; }
    .home-top-actions { width: 100%; justify-content: center; }
    .home-hero-cta { flex-direction: column; }
    .home-hero-cta .button { width: 100%; justify-content: center; }
}

/* Home — motion, bilingual, global polish */
html:has(body.home-site) { scroll-behavior: smooth; }

body.home-site-pro .home-aura {
    animation: home-float 18s ease-in-out infinite alternate;
}

.home-aura-c {
    width: 18rem;
    height: 18rem;
    top: 42%;
    inset-inline-start: 38%;
    background: rgba(122, 22, 48, 0.08);
    animation-duration: 22s;
}

@keyframes home-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(12px, -18px) scale(1.06); }
}

.home-hero-beam {
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 55%;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 42%, rgba(122, 22, 48, 0.06) 50%, transparent 58%);
    animation: home-beam 9s ease-in-out infinite;
}

@keyframes home-beam {
    0%, 100% { opacity: 0.35; transform: translateX(-8%); }
    50% { opacity: 0.75; transform: translateX(8%); }
}

[data-home-animate] {
    opacity: 0;
    transform: translateY(1.4rem);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-home-animate].is-inview {
    opacity: 1;
    transform: translateY(0);
}

[data-home-stagger] > * {
    opacity: 0;
    transform: translateY(1rem);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--home-stagger, 0ms);
}

[data-home-animate].is-inview [data-home-stagger] > *,
[data-home-stagger].is-inview > * {
    opacity: 1;
    transform: translateY(0);
}

.home-top.is-scrolled {
    top: 0.35rem;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.92);
}

.home-top-nav a.is-active {
    color: var(--brand-maroon-dark);
    background: #fff;
    box-shadow: 0 4px 14px rgba(122, 22, 48, 0.12);
}

.home-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(122, 22, 48, 0.06);
    border: 1px solid rgba(122, 22, 48, 0.1);
}

.home-lang-switch form { margin: 0; }

.home-lang-btn {
    min-height: 2.1rem;
    padding: 0.3rem 0.75rem;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
    color: var(--brand-steel-dark);
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.home-lang-btn.is-active {
    color: #fff;
    background: linear-gradient(180deg, var(--brand-maroon-light), var(--brand-maroon-dark));
    box-shadow: 0 6px 16px rgba(122, 22, 48, 0.28);
}

.home-lang-btn:not(.is-active):hover {
    color: var(--brand-maroon-dark);
    background: rgba(255, 255, 255, 0.85);
}

.home-badge-glow {
    animation: home-badge-pulse 4s ease-in-out infinite;
}

@keyframes home-badge-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(122, 22, 48, 0.08); }
    50% { box-shadow: 0 10px 32px rgba(122, 22, 48, 0.16); }
}

.home-global-tag {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--brand-steel-dark);
}

.home-hero-title-alt {
    margin: 0.45rem 0 0;
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 700;
    line-height: 1.45;
    color: rgba(122, 22, 48, 0.72);
    font-style: italic;
}

.home-bilingual-ribbon {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-top: 1.15rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 240, 243, 0.9));
    border: 1px solid rgba(122, 22, 48, 0.12);
    box-shadow: 0 12px 28px rgba(122, 22, 48, 0.06);
}

.home-bilingual-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #fff, #f0e8ea 70%),
        linear-gradient(145deg, var(--brand-maroon-light), var(--brand-steel-dark));
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.home-bilingual-icon::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.85) 49%, rgba(255, 255, 255, 0.85) 51%, transparent 52%),
        linear-gradient(0deg, transparent 48%, rgba(255, 255, 255, 0.55) 49%, rgba(255, 255, 255, 0.55) 51%, transparent 52%);
    opacity: 0.9;
}

.home-bilingual-copy {
    display: grid;
    gap: 0.25rem;
}

.home-bilingual-copy strong {
    font-size: 0.88rem;
    color: var(--brand-maroon-dark);
}

.home-bilingual-copy span {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--muted);
    font-weight: 600;
}

.home-showcase-live {
    position: relative;
}

.home-showcase-orbit {
    position: absolute;
    inset: -3px;
    border-radius: 1.4rem;
    background: linear-gradient(120deg, var(--brand-maroon), #9a2340, var(--brand-steel-dark), var(--brand-maroon));
    background-size: 300% 300%;
    animation: home-orbit 6s linear infinite;
    z-index: 0;
    opacity: 0.55;
}

.home-showcase-live > *:not(.home-showcase-orbit) {
    position: relative;
    z-index: 1;
}

.home-showcase-live .home-showcase-chrome {
    background: linear-gradient(180deg, #f5f5f7 0%, #ececef 100%);
}

@keyframes home-orbit {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.home-showcase-live .home-showcase-chips li {
    animation: home-chip-in 0.5s ease both;
    animation-delay: calc(var(--home-stagger, 0ms) + 400ms);
}

@keyframes home-chip-in {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.home-flow-shell.is-inview .home-flow-step {
    animation: home-step-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--home-stagger, 0ms);
}

@keyframes home-step-pop {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}


.home-footer-bilingual {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--brand-maroon);
}

body.home-site[dir="ltr"] .home-hero-title-alt {
    font-style: normal;
    letter-spacing: -0.01em;
}

body.home-site[dir="ltr"] .home-section-head h2,
body.home-site[dir="ltr"] .home-hero-copy h1 {
    letter-spacing: -0.03em;
}

@media (prefers-reduced-motion: reduce) {
    html:has(body.home-site) { scroll-behavior: auto; }
    body.home-site-pro .home-aura,
    .home-hero-beam,
    .home-hero-spotlight,
    .home-badge-glow,
    .home-showcase-orbit,
    .home-cta-pro-orbit,
    .home-cta-pro-logo-wrap,
    .home-cta-pro-note-dot,
    .home-showcase-live .home-showcase-chips li {
        animation: none !important;
    }
    [data-home-animate],
    [data-home-stagger] > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Hero pro */
.home-hero-pro {
    padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2rem, 5vw, 3rem);
}

.home-hero-spotlight {
    position: absolute;
    width: min(52rem, 90vw);
    height: min(28rem, 55vh);
    top: -6%;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(122, 22, 48, 0.11), transparent 68%);
    filter: blur(4px);
}

body.home-site[dir="rtl"] .home-hero-spotlight {
    transform: translateX(50%);
}

.home-hero-stage {
    position: relative;
    z-index: 1;
    padding: clamp(1.35rem, 3vw, 2rem);
    border-radius: 1.65rem;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background:
        linear-gradient(168deg, rgba(255, 255, 255, 0.97) 0%, rgba(251, 249, 250, 0.94) 48%, rgba(255, 255, 255, 0.92) 100%);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.95) inset,
        0 40px 90px rgba(45, 9, 18, 0.1);
    overflow: hidden;
}

.home-hero-stage::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--brand-maroon), var(--brand-steel-dark));
    border-radius: 0 6px 6px 0;
    opacity: 0.9;
}

.home-hero-stage .home-hero-grid {
    padding: 0.25rem 0.15rem;
}

.home-hero-brand-lockup {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 0.35rem;
}

.home-hero-logo-link {
    display: inline-flex;
    padding: 0.45rem 0.75rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(122, 22, 48, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-hero-logo-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(122, 22, 48, 0.1);
}

.home-hero-logo-img {
    display: block;
    height: clamp(2.75rem, 5vw, 3.75rem);
    width: auto;
    object-fit: contain;
}

.home-hero-trust-pills {
    list-style: none;
    margin: 1.15rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.home-hero-trust-pills li {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--brand-maroon-dark);
    background: linear-gradient(180deg, #faf0f3, #fff);
    border: 1px solid #ecd5dc;
    box-shadow: 0 4px 14px rgba(122, 22, 48, 0.06);
}

.home-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 1.35rem 0 0;
    padding: 0.85rem;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, rgba(122, 22, 48, 0.05), rgba(95, 99, 105, 0.04));
    border: 1px solid rgba(122, 22, 48, 0.08);
}

.home-metric {
    text-align: center;
    padding: 0.65rem 0.5rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.home-metric-accent {
    border-color: rgba(122, 22, 48, 0.16);
    background: linear-gradient(165deg, #faf0f3, #fff);
}

.home-metric dt {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--muted);
}

.home-metric dd {
    margin: 0.35rem 0 0;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

/* Footer pro */
.home-footer-pro {
    position: relative;
    margin-top: 1rem;
    padding: 0 0 1.75rem;
    background: linear-gradient(165deg, #1a0a0f 0%, #2d0912 42%, #121214 100%);
    color: #f2f2f3;
    border-top: 0;
}

.home-footer-wave {
    display: block;
    height: 3.25rem;
    margin-bottom: -1px;
    background:
        radial-gradient(120% 180% at 50% 120%, transparent 58%, #1a0a0f 59%),
        linear-gradient(180deg, transparent, rgba(122, 22, 48, 0.08));
}

.home-footer-main {
    display: grid;
    grid-template-columns: minmax(14rem, 1.35fr) repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 3vw, 2.25rem);
    padding-block: clamp(2rem, 4vw, 2.75rem);
}

.home-footer-brand-col .home-footer-brand {
    margin: 0.65rem 0 0;
    font-size: 1.05rem;
    font-weight: 900;
    color: #fff;
}

.home-footer-logo-link {
    display: inline-flex;
    padding: 0.55rem 0.85rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.home-footer-logo {
    display: block;
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

.home-footer-pro .home-footer-tagline {
    margin-top: 0.45rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.84rem;
    line-height: 1.55;
    max-width: 22rem;
}

.home-footer-cta {
    display: inline-flex;
    margin-top: 1rem;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.home-footer-col-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.home-footer-links {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.home-footer-links a {
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
}

.home-footer-links a:hover {
    color: #fff;
    transform: translateX(3px);
}

body.home-site[dir="rtl"] .home-footer-links a:hover {
    transform: translateX(-3px);
}

.home-footer-note {
    margin: 0.85rem 0 0;
    font-size: 0.76rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.home-lang-switch-footer {
    margin-top: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.home-lang-switch-footer .home-lang-btn {
    color: rgba(255, 255, 255, 0.85);
}

.home-lang-switch-footer .home-lang-btn:not(.is-active):hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.home-footer-pro .home-footer-bilingual {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: #f0c4cf;
}

.home-footer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding-block: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.home-footer-pro .home-footer-copy {
    margin: 0;
    text-align: start;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.76rem;
}

.home-footer-bar-tag {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 960px) {
    .home-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-footer-main { grid-template-columns: 1fr 1fr; }
    .home-footer-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .home-hero-stage { padding: 1rem; border-radius: 1.2rem; }
    .home-hero-brand-lockup { flex-direction: column; align-items: flex-start; }
    .home-hero-metrics { grid-template-columns: 1fr; }
    .home-footer-main { grid-template-columns: 1fr; }
    .home-footer-bar { flex-direction: column; text-align: center; }
    .home-footer-pro .home-footer-copy { text-align: center; }
}

/* Hero creative */
.home-hero-creative {
    position: relative;
    padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(3.5rem, 7vw, 5rem);
    overflow: clip;
}

.home-hero-creative::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 40%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(244, 244, 246, 0.95));
}

.home-hero-rings {
    position: absolute;
    inset-inline-end: 8%;
    top: 12%;
    width: min(32rem, 70vw);
    aspect-ratio: 1;
    pointer-events: none;
    opacity: 0.45;
}

.home-hero-rings span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(122, 22, 48, 0.12);
}

.home-hero-rings span:nth-child(1) { inset: 0; animation: home-ring-pulse 8s ease-in-out infinite; }
.home-hero-rings span:nth-child(2) { inset: 12%; animation: home-ring-pulse 8s ease-in-out infinite 1.2s; }
.home-hero-rings span:nth-child(3) { inset: 24%; border-color: rgba(122, 22, 48, 0.2); animation: home-ring-pulse 8s ease-in-out infinite 2.4s; }

@keyframes home-ring-pulse {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(1.02); }
}

.home-hero-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(17rem, 0.95fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.home-hero-kicker {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--brand-maroon-dark);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(122, 22, 48, 0.12);
    box-shadow: 0 10px 28px rgba(122, 22, 48, 0.08);
}

.home-hero-headline {
    margin: 0.55rem 0 0;
    font-size: clamp(2.05rem, 4.8vw, 3.35rem);
    font-weight: 900;
    line-height: 1.14;
    letter-spacing: -0.035em;
    background: linear-gradient(125deg, var(--brand-maroon-deep) 0%, var(--brand-maroon) 45%, var(--brand-steel-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-hero-scene {
    position: relative;
    min-height: 26rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.home-orbit {
    position: relative;
    width: min(22rem, 92vw);
    aspect-ratio: 1;
    margin: 0 auto;
}

.home-orbit-track {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
    animation: home-orbit-spin 48s linear infinite;
}

@keyframes home-orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.home-orbit-track li {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max-content;
    max-width: 6.5rem;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    color: var(--brand-maroon-dark);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(122, 22, 48, 0.14);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform:
        rotate(calc(var(--orbit-i) * 36deg))
        translateY(-9.25rem)
        rotate(calc(var(--orbit-i) * -36deg))
        translate(-50%, -50%);
}

.home-orbit-core {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(11rem, 46vw);
    padding: 1rem 0.85rem;
    border-radius: 1.35rem;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(122, 22, 48, 0.08), transparent 58%),
        #fff;
    border: 1px solid rgba(122, 22, 48, 0.14);
    box-shadow: 0 24px 56px rgba(45, 9, 18, 0.14);
}

.home-orbit-core img {
    display: block;
    width: min(9rem, 80%);
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.home-orbit-core span {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.68rem;
    font-weight: 900;
    color: var(--muted);
}

.home-hero-float {
    position: absolute;
    z-index: 3;
    padding: 0.55rem 0.75rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 32px rgba(122, 22, 48, 0.12);
    animation: home-float-card 5s ease-in-out infinite;
}

.home-hero-float strong {
    display: block;
    font-size: 1rem;
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.home-hero-float span {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--muted);
    margin-top: 0.1rem;
}

.home-hero-float-patients {
    inset-inline-start: 0;
    top: 18%;
    animation-delay: 0.4s;
}

.home-hero-float-ai {
    inset-inline-end: 0;
    top: 8%;
    border-color: rgba(122, 22, 48, 0.22);
    background: linear-gradient(165deg, #faf0f3, #fff);
    animation-delay: 1.1s;
}

@keyframes home-float-card {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.home-showcase-compact {
    position: absolute;
    z-index: 4;
    inset-inline: 0;
    bottom: 0;
    max-width: 22rem;
    margin-inline: auto;
    transform: none !important;
}

.home-showcase-body-compact {
    display: grid;
    gap: 0.55rem;
    padding: 0.65rem !important;
}

.home-showcase-compact .home-showcase-body {
    grid-template-columns: 1fr;
}

.home-showcase-compact .home-showcase-kpis {
    grid-template-columns: repeat(2, 1fr);
}

.home-showcase-chips-compact {
    justify-content: center;
}

.home-hero-dock {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin: -2.25rem auto 0;
    padding: 0.9rem 1rem;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(14px);
    box-shadow: 0 22px 50px rgba(45, 9, 18, 0.12);
}

.home-dock-item {
    text-align: center;
    padding: 0.55rem 0.4rem;
    border-radius: 0.75rem;
    border-inline-end: 1px solid var(--line);
}

.home-dock-item:last-child {
    border-inline-end: 0;
}

.home-dock-item dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--muted);
}

.home-dock-item dd {
    margin: 0.3rem 0 0;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    font-weight: 900;
    color: var(--brand-maroon-dark);
}

.home-dock-item-accent {
    background: linear-gradient(165deg, #faf0f3, transparent);
}

@media (max-width: 900px) {
    .home-hero-layout { grid-template-columns: 1fr; }
    .home-hero-scene { min-height: 22rem; order: -1; }
    .home-hero-rings { inset-inline: 50% auto auto; transform: translateX(-50%); top: 4%; opacity: 0.3; }
    body.home-site[dir="rtl"] .home-hero-rings { transform: translateX(50%); }
    .home-hero-float-patients { inset-inline-start: 4%; top: 6%; }
    .home-hero-float-ai { inset-inline-end: 4%; }
    .home-hero-dock { margin-top: 1rem; grid-template-columns: repeat(2, 1fr); }
    .home-dock-item { border-inline-end: 0; border-bottom: 1px solid var(--line); padding-bottom: 0.65rem; }
    .home-dock-item:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 520px) {
    .home-orbit-track { animation-duration: 60s; }
    .home-orbit-track li { transform: rotate(calc(var(--orbit-i) * 36deg)) translateY(-7.5rem) rotate(calc(var(--orbit-i) * -36deg)) translate(-50%, -50%); font-size: 0.58rem; max-width: 5.5rem; }
    .home-hero-dock { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .home-orbit-track,
    .home-hero-rings span,
    .home-hero-float {
        animation: none !important;
    }
}

/* Navbar pro */
.home-navbar {
    position: sticky;
    top: 0.75rem;
    z-index: 80;
    margin: 0.65rem auto 0;
    width: min(78rem, calc(100% - 1.1rem));
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(252, 250, 251, 0.88));
    backdrop-filter: blur(18px) saturate(1.25);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.85) inset,
        0 20px 50px rgba(45, 9, 18, 0.1);
}

.home-navbar.is-scrolled {
    top: 0.4rem;
    box-shadow: 0 22px 55px rgba(45, 9, 18, 0.14);
}

.home-navbar-bar {
    display: grid;
    grid-template-columns: minmax(0, auto) 1fr auto;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.5rem 0.7rem;
}

.home-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    min-width: 0;
}

.home-navbar-logo-chip {
    display: inline-flex;
    flex-shrink: 0;
    padding: 0.35rem 0.55rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid rgba(122, 22, 48, 0.1);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-navbar-brand:hover .home-navbar-logo-chip {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(122, 22, 48, 0.1);
}

.home-navbar-brand-text {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.home-navbar-brand-text strong {
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--brand-maroon-dark);
    line-height: 1.2;
}

.home-navbar-brand-text small {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--muted);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 11rem;
}

.home-navbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    border: 1px solid rgba(122, 22, 48, 0.14);
    border-radius: 0.8rem;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.home-navbar-toggle-icon,
.home-navbar-toggle-icon::before,
.home-navbar-toggle-icon::after {
    display: block;
    width: 1.05rem;
    height: 2px;
    border-radius: 2px;
    background: var(--brand-maroon-dark);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-navbar-toggle-icon {
    position: relative;
}

.home-navbar-toggle-icon::before,
.home-navbar-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.home-navbar-toggle-icon::before { top: -5px; }
.home-navbar-toggle-icon::after { top: 5px; }

.home-navbar-toggle[aria-expanded="true"] .home-navbar-toggle-icon {
    background: transparent;
}

.home-navbar-toggle[aria-expanded="true"] .home-navbar-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.home-navbar-toggle[aria-expanded="true"] .home-navbar-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.home-navbar-panel {
    grid-column: 2 / 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
    min-width: 0;
}

.home-navbar-links {
    flex: 1;
    justify-content: center;
    padding: 0.28rem;
    background: rgba(122, 22, 48, 0.04);
    border: 1px solid rgba(122, 22, 48, 0.08);
    border-radius: 999px;
}

.home-navbar-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    padding: 0.48rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 800;
}

.home-nav-idx {
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: rgba(122, 22, 48, 0.45);
    transition: color 0.15s ease;
}

.home-navbar-links a.is-active .home-nav-idx,
.home-navbar-links a:hover .home-nav-idx {
    color: var(--brand-maroon);
}

.home-navbar-links a.is-active {
    color: var(--brand-maroon-dark);
    background: #fff;
    box-shadow: 0 6px 18px rgba(122, 22, 48, 0.12);
}

.home-navbar-toolbar {
    flex-shrink: 0;
    gap: 0.55rem;
}

.home-navbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding-inline: 1.15rem !important;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(122, 22, 48, 0.28);
}

.home-navbar-cta::after {
    content: "›";
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.9;
}

body.home-site[dir="rtl"] .home-navbar-cta::after {
    content: "‹";
}

.home-navbar-progress {
    height: 3px;
    background: rgba(122, 22, 48, 0.08);
    overflow: hidden;
}

.home-navbar-progress span {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: inset-inline-start center;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--brand-maroon-light), var(--brand-maroon-dark));
    transition: transform 0.08s linear;
}

body.home-nav-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .home-navbar-brand-text small { max-width: 8rem; }
}

@media (max-width: 900px) {
    .home-navbar {
        top: 0;
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-inline: 0;
    }

    .home-navbar-bar {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 0.55rem 0.85rem;
    }

    .home-navbar-toggle {
        display: inline-flex;
    }

    .home-navbar-panel {
        grid-column: 1 / -1;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        padding: 0.65rem 0.15rem 0.85rem;
        border-top: 1px solid rgba(122, 22, 48, 0.08);
    }

    .home-navbar-panel.is-open {
        display: flex;
    }

    .home-navbar-links {
        flex-direction: column;
        align-items: stretch;
        border-radius: 1rem;
        padding: 0.45rem;
    }

    .home-navbar-links a {
        justify-content: flex-start;
        border-radius: 0.75rem;
        padding: 0.65rem 0.85rem;
    }

    .home-navbar-toolbar {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .home-navbar-cta {
        flex: 1;
        justify-content: center;
        min-width: 10rem;
    }

    .home-navbar-brand-text small {
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .home-navbar-brand-text { display: none; }
    .home-navbar-toolbar { flex-direction: column; align-items: stretch; }
    .home-navbar-cta { width: 100%; }
}

/* Home splash / preloader — light creative */
.home-splash,
.home-splash.home-splash-light {
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 12% 0%, rgba(122, 22, 48, 0.1), transparent 58%),
        radial-gradient(780px 380px at 92% 22%, rgba(95, 99, 105, 0.08), transparent 55%),
        linear-gradient(180deg, #fafafa 0%, #f2f2f5 48%, #e8e8ec 100%);
    color: var(--ink, #1a1a1e);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.75s,
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-splash.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.02);
}

.home-splash-aurora {
    position: absolute;
    inset: -20% -10%;
    pointer-events: none;
    overflow: hidden;
}

.home-splash-aurora-band {
    position: absolute;
    width: 140%;
    height: 42%;
    left: -20%;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.65;
    mix-blend-mode: multiply;
}

.home-splash-aurora-a {
    top: 8%;
    background: linear-gradient(90deg, transparent, rgba(122, 22, 48, 0.14), rgba(240, 196, 207, 0.35), transparent);
    animation: home-splash-aurora-drift 14s ease-in-out infinite alternate;
}

.home-splash-aurora-b {
    top: 38%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), rgba(122, 22, 48, 0.08), transparent);
    animation: home-splash-aurora-drift 18s ease-in-out infinite alternate-reverse;
}

.home-splash-aurora-c {
    bottom: 5%;
    height: 36%;
    background: linear-gradient(90deg, transparent, rgba(95, 99, 105, 0.1), rgba(122, 22, 48, 0.06), transparent);
    animation: home-splash-aurora-drift 20s ease-in-out infinite alternate;
}

@keyframes home-splash-aurora-drift {
    0% { transform: translateX(-6%) skewX(-6deg) scale(1); }
    100% { transform: translateX(8%) skewX(4deg) scale(1.06); }
}

.home-splash-bubble {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(122, 22, 48, 0.12);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 40px rgba(122, 22, 48, 0.06);
    pointer-events: none;
}

.home-splash-bubble-1 {
    width: 5.5rem;
    height: 5.5rem;
    top: 14%;
    inset-inline-start: 8%;
    animation: home-splash-float-a 7s ease-in-out infinite;
}

.home-splash-bubble-2 {
    width: 3.25rem;
    height: 3.25rem;
    top: 22%;
    inset-inline-end: 12%;
    animation: home-splash-float-b 9s ease-in-out infinite;
}

.home-splash-bubble-3 {
    width: 4rem;
    height: 4rem;
    bottom: 18%;
    inset-inline-start: 14%;
    animation: home-splash-float-c 8s ease-in-out infinite;
}

@keyframes home-splash-float-a {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(0.75rem, -1.25rem) rotate(8deg); }
}

@keyframes home-splash-float-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-1rem, 0.85rem); }
}

@keyframes home-splash-float-c {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(0.5rem, -0.65rem) scale(1.06); }
}

.home-splash-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-splash-sparkles i {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(122, 22, 48, 0.35);
    box-shadow: 0 0 10px rgba(122, 22, 48, 0.25);
    animation: home-splash-twinkle 2.4s ease-in-out infinite;
}

.home-splash-sparkles i:nth-child(1) { top: 18%; inset-inline-start: 22%; animation-delay: 0s; }
.home-splash-sparkles i:nth-child(2) { top: 28%; inset-inline-end: 20%; animation-delay: 0.35s; }
.home-splash-sparkles i:nth-child(3) { top: 42%; inset-inline-start: 14%; animation-delay: 0.7s; width: 4px; height: 4px; }
.home-splash-sparkles i:nth-child(4) { bottom: 32%; inset-inline-end: 26%; animation-delay: 1s; }
.home-splash-sparkles i:nth-child(5) { bottom: 22%; inset-inline-start: 30%; animation-delay: 0.2s; width: 5px; height: 5px; }
.home-splash-sparkles i:nth-child(6) { top: 55%; inset-inline-end: 10%; animation-delay: 1.4s; }
.home-splash-sparkles i:nth-child(7) { top: 12%; inset-inline-start: 48%; animation-delay: 0.55s; width: 4px; height: 4px; }
.home-splash-sparkles i:nth-child(8) { bottom: 38%; inset-inline-end: 42%; animation-delay: 0.9s; }

@keyframes home-splash-twinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

.home-splash-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 2rem 1.75rem 1.75rem;
    min-width: min(22rem, 88vw);
    text-align: center;
    animation: home-splash-stage-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-splash.is-done .home-splash-stage {
    animation: home-splash-stage-out-light 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes home-splash-stage-in {
    from {
        opacity: 0;
        transform: translateY(1.5rem) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes home-splash-stage-out-light {
    to {
        opacity: 0;
        transform: translateY(-1rem) scale(1.04);
        filter: blur(6px);
    }
}

.home-splash-arena {
    position: relative;
    width: 16.5rem;
    height: 16.5rem;
    display: grid;
    place-items: center;
    margin-bottom: 0.35rem;
}

.home-splash-orbit-dash {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(122, 22, 48, 0.14);
    animation: home-splash-spin 22s linear infinite;
}

.home-splash-orbit-dots {
    position: absolute;
    inset: 0;
    animation: home-splash-spin 6s linear infinite;
}

.home-splash-orbit-dots span {
    position: absolute;
    inset: 0;
    transform-origin: center center;
}

.home-splash-orbit-dots span::after {
    content: '';
    position: absolute;
    top: -0.15rem;
    left: 50%;
    width: 0.55rem;
    height: 0.55rem;
    margin-left: -0.275rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #7a1630, #c44b6a);
    box-shadow: 0 0 14px rgba(122, 22, 48, 0.35);
}

.home-splash-orbit-dots span:nth-child(1) { transform: rotate(0deg); }
.home-splash-orbit-dots span:nth-child(2) { transform: rotate(120deg); }
.home-splash-orbit-dots span:nth-child(3) { transform: rotate(240deg); }

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

.home-splash-logo-halo {
    position: absolute;
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 22, 48, 0.12), transparent 68%);
    animation: home-splash-halo-pulse 3.2s ease-in-out infinite;
}

@keyframes home-splash-halo-pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.65; }
    50% { transform: scale(1.08); opacity: 1; }
}

.home-splash-logo-frame {
    position: relative;
    z-index: 2;
    padding: 3px;
    border-radius: 1.45rem;
    background: linear-gradient(135deg, rgba(122, 22, 48, 0.35), rgba(240, 196, 207, 0.85), rgba(122, 22, 48, 0.45));
    background-size: 200% 200%;
    animation: home-splash-frame-shift 4.5s ease infinite;
    box-shadow: 0 20px 50px rgba(122, 22, 48, 0.12);
}

@keyframes home-splash-frame-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.home-splash-logo-glint {
    position: absolute;
    inset: 3px;
    border-radius: 1.35rem;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.home-splash-logo-glint::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -120%;
    width: 55%;
    height: 200%;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.65) 50%, transparent 65%);
    animation: home-splash-glint-sweep 2.8s ease-in-out infinite;
}

@keyframes home-splash-glint-sweep {
    0% { transform: translateX(0); opacity: 0; }
    25% { opacity: 1; }
    100% { transform: translateX(320%); opacity: 0; }
}

.home-splash-logo-shell {
    position: relative;
    padding: 1.1rem 1.3rem;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.95);
    animation: home-splash-logo-float 3.6s ease-in-out infinite;
}

@keyframes home-splash-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-0.35rem); }
}

.home-splash-logo {
    display: block;
    width: min(12.5rem, 68vw);
    height: auto;
    filter: drop-shadow(0 6px 18px rgba(122, 22, 48, 0.08));
}

.home-splash-brand {
    margin: 0.25rem 0 0;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--brand-maroon-dark, #5c0f24);
}

.home-splash-tagline {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: rgba(26, 26, 30, 0.45);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.home-site[dir="rtl"] .home-splash-tagline {
    text-transform: none;
    letter-spacing: 0.02em;
}

.home-splash-progress-track {
    position: relative;
    width: min(15rem, 76vw);
    height: 6px;
    margin-top: 0.75rem;
    border-radius: 999px;
    background: rgba(122, 22, 48, 0.08);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.85) inset,
        0 4px 16px rgba(122, 22, 48, 0.06);
}

.home-splash-progress-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #7a1630, #a83252, #e8b4c4, #7a1630);
    background-size: 200% 100%;
    transform-origin: inline-start center;
    transform: scaleX(var(--splash-progress, 0));
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    animation: home-splash-progress-hue 3s linear infinite;
}

@keyframes home-splash-progress-hue {
    to { background-position: 200% 0; }
}

body.home-site[dir="rtl"] .home-splash-progress-fill {
    transform-origin: right center;
}

.home-splash-progress-shimmer {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: translateX(-100%);
    animation: home-splash-shimmer 1.6s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

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

.home-splash-status {
    margin: 0.4rem 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(122, 22, 48, 0.55);
    animation: home-splash-status-pulse 2s ease-in-out infinite;
}

@keyframes home-splash-status-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

body.home-splash-done .home-top,
body.home-splash-done main,
body.home-splash-done .home-aura,
body.home-splash-done .skip,
body.home-splash-done .home-footer-pro {
    animation: home-splash-content-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes home-splash-content-in {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-splash-aurora-a,
    .home-splash-aurora-b,
    .home-splash-aurora-c,
    .home-splash-bubble-1,
    .home-splash-bubble-2,
    .home-splash-bubble-3,
    .home-splash-sparkles i,
    .home-splash-orbit-dash,
    .home-splash-orbit-dots,
    .home-splash-logo-halo,
    .home-splash-logo-frame,
    .home-splash-logo-glint::after,
    .home-splash-logo-shell,
    .home-splash-progress-fill,
    .home-splash-progress-shimmer,
    .home-splash-status {
        animation: none !important;
    }
    .home-splash-stage,
    .home-splash.is-done .home-splash-stage,
    body.home-splash-done .home-top,
    body.home-splash-done main,
    body.home-splash-done .home-aura,
    body.home-splash-done .skip,
    body.home-splash-done .home-footer-pro {
        animation: none !important;
    }
    .home-splash.is-done .home-splash-stage {
        filter: none;
    }
    .home-splash.is-done {
        transform: none;
    }
}

/* Home — mobile professional layout */
.home-hero-mobile-card,
.home-splash-timer {
    display: none;
}

@media (max-width: 768px) {
    body.home-site-pro,
    body.home-site-pro.home-mobile,
    html.home-is-mobile body.home-site-pro {
        padding-bottom: 6.5rem;
        background: #f4f4f6;
    }

    body.home-site-pro.home-nav-open {
        overflow: hidden;
    }

    .home-aura,
    .home-hero-mesh,
    .home-hero-beam,
    .home-hero-spotlight,
    .home-hero-rings {
        display: none !important;
    }

    .home-wrap {
        width: min(78rem, calc(100% - 1.5rem));
    }

    .home-navbar {
        position: sticky;
        top: 0;
        z-index: 80;
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-inline: 0;
        border-top: 0;
        box-shadow: 0 8px 28px rgba(45, 9, 18, 0.08);
    }

    .home-navbar-bar {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 0.55rem 0.85rem;
    }

    .home-navbar-brand-text {
        display: grid !important;
    }

    .home-navbar-brand-text small {
        max-width: 9.5rem;
    }

    .home-navbar-panel {
        grid-column: 1 / -1;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.3s ease;
    }

    .home-navbar-panel.is-open {
        max-height: 24rem;
        opacity: 1;
        padding-top: 0.25rem;
    }

    .home-navbar-links a {
        border-radius: 0.75rem;
        padding: 0.65rem 0.85rem;
    }

    .home-hero-creative {
        padding: 1rem 0 2rem;
        background:
            radial-gradient(120% 80% at 50% -10%, rgba(122, 22, 48, 0.09), transparent 55%),
            linear-gradient(180deg, #fafafa 0%, #f4f4f6 100%);
    }

    .home-hero-creative::after {
        display: none;
    }

    .home-hero-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .home-hero-scene {
        display: none !important;
    }

    .home-hero-layout .home-hero-copy {
        text-align: start;
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }

    .home-hero-mobile-card {
        display: block;
        margin-bottom: 0.35rem;
        order: -2;
    }

    .home-hero-mobile-card-inner {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        padding: 0.85rem 1rem;
        border-radius: 1.1rem;
        background: #fff;
        border: 1px solid rgba(122, 22, 48, 0.1);
        box-shadow: 0 14px 36px rgba(45, 9, 18, 0.08);
    }

    .home-hero-mobile-logo {
        width: 4.5rem;
        height: auto;
        object-fit: contain;
        flex-shrink: 0;
    }

    .home-hero-mobile-meta {
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.75rem;
        font-weight: 900;
        color: var(--brand-maroon-dark);
        line-height: 1.4;
    }

    .home-hero-mobile-dot {
        color: var(--muted);
        font-weight: 700;
    }

    .home-hero-kicker {
        align-self: flex-start;
        font-size: 0.68rem;
        animation: none;
        box-shadow: none;
        background: rgba(122, 22, 48, 0.08);
        border-color: transparent;
    }

    .home-eyebrow {
        margin: 0;
        font-size: 0.78rem;
    }

    .home-hero-headline {
        font-size: clamp(1.55rem, 7.2vw, 2rem);
        line-height: 1.22;
        animation: none;
        -webkit-text-fill-color: unset;
        color: var(--brand-maroon-deep);
        background: none;
    }

    .home-hero-title-alt {
        display: none;
    }

    .home-hero-lead {
        margin: 0;
        font-size: 0.88rem;
        line-height: 1.65;
        max-width: none;
        color: var(--muted);
    }

    .home-hero-trust-pills {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
        margin: 0.25rem 0 0;
        padding: 0;
        list-style: none;
        overflow: visible;
        mask-image: none;
    }

    .home-hero-trust-pills li {
        padding: 0.55rem 0.4rem;
        border-radius: 0.75rem;
        font-size: 0.62rem;
        font-weight: 800;
        line-height: 1.35;
        text-align: center;
        color: var(--brand-maroon-dark);
        background: #fff;
        border: 1px solid rgba(122, 22, 48, 0.1);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
        animation: none;
    }

    .home-hero-cta {
        flex-direction: column;
        gap: 0.55rem;
        margin-top: 0.5rem;
    }

    .home-hero-cta .button {
        width: 100%;
        justify-content: center;
        min-height: 3rem;
        animation: none;
        box-shadow: 0 12px 28px rgba(122, 22, 48, 0.2);
    }

    .home-hero-dock {
        display: none;
    }

    .home-section {
        padding-block: 2rem;
    }

    .home-section-head-center {
        text-align: start;
    }

    .home-section-head h2 {
        font-size: 1.35rem;
    }

    .home-section-lead {
        font-size: 0.88rem;
    }

    .home-flow-shell {
        margin-top: 1.25rem;
        padding: 1rem;
        border-radius: 1rem;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
    }

    .home-module-grid.home-module-grid-center {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 0.65rem;
        overflow: visible;
        flex-wrap: wrap;
    }

    .home-module-grid.home-module-grid-center .home-module-card {
        flex: none;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin-inline: 0;
    }

    .home-platform-grid,
    .home-trust-grid {
        gap: 0.65rem;
    }

    .home-cta-pro-card {
        border-radius: 1.1rem;
    }

    .home-cta-pro-visual {
        min-height: 10rem;
    }

    .home-footer-main {
        gap: 1.25rem;
    }

    .home-mobile-dock {
        display: grid;
        gap: 0.4rem;
        position: fixed;
        z-index: 90;
        inset-inline: 0;
        bottom: 0;
        padding: 0.65rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid rgba(122, 22, 48, 0.08);
        box-shadow: 0 -12px 40px rgba(45, 9, 18, 0.1);
        transform: translateY(0);
        opacity: 1;
        transition: transform 0.35s ease, opacity 0.3s ease;
    }

    .home-mobile-dock.is-hidden {
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }

    .home-mobile-dock-cta {
        width: 100%;
        min-height: 3rem;
        justify-content: center;
        margin: 0;
        animation: none;
    }

    .home-mobile-dock-secondary {
        display: block;
        text-align: center;
        font-size: 0.78rem;
        font-weight: 900;
        color: var(--brand-maroon);
        text-decoration: none;
        padding: 0.25rem;
    }

    html.home-is-mobile .home-splash-timer,
    body.home-is-mobile .home-splash-timer {
        display: grid;
        place-items: center;
        width: 2.75rem;
        height: 2.75rem;
        margin: 0.35rem auto 0;
        border-radius: 50%;
        font-size: 1.05rem;
        font-weight: 900;
        color: var(--brand-maroon-dark);
        background: #fff;
        border: 2px solid rgba(122, 22, 48, 0.15);
        box-shadow: 0 10px 24px rgba(122, 22, 48, 0.12);
    }
}

@media (min-width: 769px) {
    .home-mobile-dock,
    .home-hero-mobile-card {
        display: none !important;
    }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .home-flow-shell.is-flow-live .home-flow-step {
        animation: none !important;
    }
}
