/* =====================================================================================
   LabExpert Franchise Portal - styles
   Palette of LabExpert (OriCommon.css): teal #0b8f83, blue #007cc0, rose #e53f6d,
   peach #ec9f83, gold #cdb274, lilac #af88b9, mint #88b999, sea #88b2b9
   ===================================================================================== */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../lib/inter/files/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../lib/inter/files/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../lib/inter/files/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('../lib/inter/files/inter-latin-700-normal.woff2') format('woff2'); }

:root {
    --teal: #0b8f83; --teal-deep: #06564f; --teal-ink: #043d38; --teal-soft: #e5f4f2;
    --blue: #007cc0; --blue-soft: #e5f2fa;
    --rose: #e53f6d; --rose-soft: #fdeaf0;
    --peach: #ec9f83; --peach-soft: #fdf0ea;
    --gold: #cdb274; --gold-ink: #7a6326; --gold-soft: #f8f2e2;
    --lilac: #af88b9; --lilac-ink: #6e4a78; --lilac-soft: #f4edf6;
    --mint: #88b999; --mint-ink: #3f6e4f; --mint-soft: #edf6f0;
    --ink: #1d2b2a; --muted: #5b6b69; --faint: #8a9b99; --line: #dfe7e6; --paper: #f3f7f7; --white: #fff;
    --radius: 14px; --side-w: 256px;
    --shadow: 0 1px 2px rgba(6, 86, 79, .06), 0 10px 28px -16px rgba(6, 86, 79, .28);
    --focus: 0 0 0 3px rgba(11, 143, 131, .28);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.muted { color: var(--muted); }

/* ---------------------------------------------------------------- shell */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.app > .side { grid-column: 1; grid-row: 1; }
.app > .main { grid-column: 2; grid-row: 1; }
.scrim { display: none; }                                   /* dark overlay behind the mobile menu - only while it is open */
.side {
    position: sticky; top: 0; height: 100vh; overflow-y: auto; color: #dceeeb; display: flex; flex-direction: column;
    background: radial-gradient(420px 300px at 120% -10%, rgba(0, 124, 192, .5), transparent 60%),
                radial-gradient(380px 300px at -30% 110%, rgba(136, 185, 153, .32), transparent 60%),
                linear-gradient(170deg, var(--teal) 0%, var(--teal-deep) 52%, var(--teal-ink) 100%);
}
.side-brand { padding: 18px 16px 14px; }
.side-logo { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 12px; padding: 8px 10px; min-height: 58px; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.side-logo img { max-width: 100%; max-height: 46px; object-fit: contain; display: block; }
.side-centre { margin: 14px 4px 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.side-centre b { display: block; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.side-centre span { font-size: 12px; color: #a9d3cd; }
.nav { list-style: none; margin: 6px 0 0; padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11.5px; color: #8fc4bc; padding: 12px 12px 4px; }
.nav a, .nav button {
    display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: none;
    font: inherit; font-size: 14px; color: #e3f3f1; text-decoration: none; cursor: pointer; text-align: left;
}
.nav a:hover, .nav button:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.nav a .ico, .nav button .ico { color: #9ed8cf; }
.nav a.active { background: #fff; color: var(--teal-deep); font-weight: 600; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.nav a.active .ico { color: var(--teal); }
.side-foot { margin-top: auto; padding: 14px 18px 18px; font-size: 11.5px; color: #8fc4bc; }
.side-foot img { height: 22px; background: #fff; border-radius: 6px; padding: 2px 6px; display: block; margin-bottom: 6px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 26px; background: rgba(243, 247, 247, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-toggle { display: none; border: 0; background: #fff; border-radius: 10px; width: 40px; height: 40px; place-items: center; color: var(--teal-deep); box-shadow: var(--shadow); cursor: pointer; }
.top-title h1 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.top-title p { margin: 1px 0 0; font-size: 13px; color: var(--muted); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bal-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.bal-chip small { color: var(--muted); }
.bal-chip b.dr { color: #b4234f; }
.bal-chip b.cr { color: var(--teal-deep); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--teal), var(--blue)); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(6, 60, 55, .18); padding: 6px; z-index: 30; }
.user-menu .menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu .menu .who b { display: block; font-size: 13.5px; }
.user-menu .menu .who span { font-size: 12px; color: var(--muted); }
.user-menu .menu a, .user-menu .menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; text-decoration: none; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--teal-soft); }
.content { padding: 22px 26px 34px; display: flex; flex-direction: column; gap: 18px; max-width: 1400px; width: 100%; }

/* ---------------------------------------------------------------- cards & blocks */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; border: 1px solid; }
.alert .ico { margin-top: 1px; }
.alert-ok { background: var(--teal-soft); border-color: #bfe3dd; color: #075049; }
.alert-err { background: var(--rose-soft); border-color: #f6c5d3; color: #9b1d43; }
.alert-info { background: var(--blue-soft); border-color: #c4dff0; color: #0c4f78; }
.alert-warn { background: var(--gold-soft); border-color: #ebdcb4; color: var(--gold-ink); }

.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty .ico { width: 44px; height: 44px; color: #b9cfcc; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }

/* ---------------------------------------------------------------- KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi { position: relative; overflow: hidden; padding: 16px 16px 14px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.kpi::after { content: ""; position: absolute; right: -26px; top: -26px; width: 92px; height: 92px; border-radius: 50%; background: var(--k-soft); }
.kpi-ico { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--k); margin-bottom: 12px; }
.kpi-ico .ico { width: 20px; height: 20px; }
.kpi small { display: block; font-size: 12.5px; color: var(--muted); }
.kpi strong { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-style: normal; font-size: 12px; color: var(--faint); }
.k-teal { --k: var(--teal); --k-soft: var(--teal-soft); }
.k-blue { --k: var(--blue); --k-soft: var(--blue-soft); }
.k-rose { --k: var(--rose); --k-soft: var(--rose-soft); }
.k-gold { --k: #b99a52; --k-soft: var(--gold-soft); }
.k-lilac { --k: var(--lilac); --k-soft: var(--lilac-soft); }
.kpi strong.dr { color: #b4234f; }
.kpi strong.cr { color: var(--teal-deep); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.dash-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.dash-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(136, 185, 153, .25); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; transition: border-color .15s, transform .15s; }
.quick a:hover { border-color: var(--teal); transform: translateY(-1px); text-decoration: none; }
.quick a span.qi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--k); flex: none; }
.quick a small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.status-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--paper); }
.status-list li i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.status-list li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.top-tests { list-style: none; margin: 0; padding: 0; }
.top-tests li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.top-tests li:last-child { border-bottom: 0; }
.top-tests .bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--paper); overflow: hidden; }
.top-tests .bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--teal), var(--blue)); }

/* ---------------------------------------------------------------- filters & forms */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; padding: 14px 18px; }
.filter-bar .f { display: flex; flex-direction: column; gap: 5px; min-width: 140px; }
.filter-bar .f:has(.e-datepicker) { width: 160px; }
.filter-bar .f.grow { flex: 1; min-width: 200px; }
.filter-bar label, .field > label { font-size: 12.5px; font-weight: 600; color: #33423f; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.seg input:checked + span { background: #fff; color: var(--teal-deep); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg input:focus-visible + span { box-shadow: var(--focus); }

.input, .select, textarea.input {
    width: 100%; height: 40px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--ink);
    background: #fbfdfd; border: 1.5px solid var(--line); border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.select { -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer; background: #fbfdfd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6b69' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.input:hover, .select:hover { border-color: #bccbc9; }
.input:focus, .select:focus { border-color: var(--teal); background: #fff; box-shadow: var(--focus); }
.input.upper { text-transform: uppercase; }
.input-validation-error { border-color: var(--rose) !important; }
.field-validation-error { display: block; font-size: 12px; color: #b4234f; margin-top: 4px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; }
.c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.age { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.age .input { text-align: center; padding: 0 6px; }
.age small { display: block; text-align: center; font-size: 11px; color: var(--faint); margin-top: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1.5px solid transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { color: #fff; background: linear-gradient(100deg, var(--teal) 0%, #098378 55%, var(--blue) 150%); box-shadow: 0 8px 18px -10px rgba(11, 143, 131, .9); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { color: var(--teal-deep); background: #fff; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); background: var(--teal-soft); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-xs { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn .ico { width: 16px; height: 16px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------------------------------------------------------------- status chips */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.st-printed { background: var(--blue-soft); color: #075d90; }
.st-approved { background: var(--teal-soft); color: #075049; }
.st-ready { background: var(--teal-soft); color: #075049; }
.st-pending { background: var(--gold-soft); color: var(--gold-ink); }
.st-hold { background: var(--rose-soft); color: #a8204a; }

/* ---------------------------------------------------------------- reports list */
.rep-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.rep-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.rep-table th { background: #f6faf9; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rep-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rep-table tbody tr:hover td { background: #fbfdfd; }
.rep-bill b { display: block; font-weight: 600; }
.rep-bill small, .rep-pat small { display: block; color: var(--muted); font-size: 12px; }
.rep-pat b { font-weight: 600; }
.rep-docs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rep-groups { display: flex; flex-direction: column; gap: 8px; }
.rep-group { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--paper); }
.rep-group ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.rep-group li small { color: #a8204a; display: block; font-size: 11.5px; }
.due { color: #b4234f; font-weight: 600; }

/* ---------------------------------------------------------------- new bill */
.bill-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.bill-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.tests-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tests-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f6faf9; }
.tests-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tests-table .x { width: 34px; text-align: center; }
.tests-table .x button { width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; color: #b4234f; cursor: pointer; display: grid; place-items: center; }
.tests-table .x button:hover { background: var(--rose-soft); }
.tests-empty td { text-align: center; color: var(--muted); padding: 28px 10px; }
.total-card { padding: 18px; border-radius: var(--radius); color: #fff; background: radial-gradient(240px 160px at 110% -10%, rgba(0, 124, 192, .55), transparent 60%), linear-gradient(160deg, var(--teal), var(--teal-deep)); box-shadow: var(--shadow); }
.total-card small { display: block; color: #bfe3dd; font-size: 12.5px; }
.total-card strong { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 10px; }
.total-card dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: 13px; color: #d7efeb; }
.total-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.picker-wrap { padding: 14px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f6fbfa, #fff); }

/* ---------------------------------------------------------------- profile & contact */
.profile-head { display: flex; align-items: center; gap: 18px; padding: 22px; color: #fff; border-radius: var(--radius) var(--radius) 0 0;
    background: radial-gradient(400px 220px at 110% -20%, rgba(0, 124, 192, .55), transparent 60%), linear-gradient(160deg, var(--teal), var(--teal-deep)); }
.profile-head .avatar { width: 64px; height: 64px; font-size: 22px; background: rgba(255, 255, 255, .18); border: 2px solid rgba(255, 255, 255, .5); }
.profile-head h2 { font-size: 20px; }
.profile-head p { margin: 4px 0 0; color: #cfe7e3; font-size: 13.5px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 18px; }
.fact { padding: 12px 14px; border-radius: 12px; background: var(--paper); }
.fact small { display: block; font-size: 12px; color: var(--muted); }
.fact b { display: block; font-weight: 600; margin-top: 2px; word-break: break-word; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; overflow: hidden; }
.contact-grid > img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; display: block; }
.contact-info { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.contact-info p { margin: 0; color: var(--muted); }
.contact-row { display: flex; gap: 14px; align-items: flex-start; }
.contact-row .qi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--k); flex: none; }
.contact-row small { display: block; font-size: 12px; color: var(--muted); }
.contact-row b { font-weight: 600; }

/* ---------------------------------------------------------------- Syncfusion look */
.e-grid, .e-control, .e-css, .e-input-group input.e-input, .e-input-group.e-control-wrapper input.e-input { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important; }
.e-grid { border: 0 !important; border-radius: 0 0 var(--radius) var(--radius); }
.e-grid .e-gridheader, .e-grid .e-headercell { background: #f6faf9 !important; }
.e-grid .e-headercell .e-headertext { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.e-grid .e-rowcell { font-size: 13.5px !important; }
.e-grid .e-toolbar { border-bottom: 1px solid var(--line); background: #fff; }
.e-grid .e-gridpager { border-top: 1px solid var(--line); }
.e-grid .e-summaryrow .e-summarycell { background: var(--teal-soft) !important; font-weight: 700; color: var(--teal-deep); }
.filter-bar .e-input-group, .filter-bar .e-control-wrapper { border-radius: 10px !important; }
.e-input-group.e-control-wrapper:not(.e-float-icon-left), .e-input-group:not(.e-float-icon-left) { min-height: 40px; }

/* ---------------------------------------------------------------- franchise login (street scene) */
.k-peach { --k: #e07f5c; --k-soft: var(--peach-soft); }
.fr-body { background: linear-gradient(180deg, #e3f0fa 0%, #f3f9fc 48%, #eef7f6 100%); }
.fr-login { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.fr-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 56px); }
.fr-logo { display: inline-flex; background: #fff; border-radius: 14px; padding: 8px 14px; box-shadow: 0 8px 24px -12px rgba(0, 80, 130, .35); }
.fr-logo img { display: block; height: clamp(36px, 5.5vh, 50px); max-width: 240px; object-fit: contain; }
.fr-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.fr-contacts a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid #d3e5f0; color: #0c4f78; font-size: 13px; text-decoration: none; }
.fr-contacts a:hover { background: #fff; text-decoration: none; }
.fr-contacts .ico { width: 15px; height: 15px; color: var(--blue); }
.fr-stage { position: relative; z-index: 2; flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 420px); gap: clamp(24px, 5vw, 80px); align-items: start;
    padding: clamp(4px, 2.5vh, 36px) clamp(16px, 4vw, 56px) clamp(170px, 27vh, 300px); max-width: 1320px; width: 100%; margin: 0 auto; }
.fr-intro { padding-top: clamp(0px, 3vh, 36px); }
.fr-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #0c4f78; background: #d7eaf7; padding: 5px 11px; border-radius: 999px; }
.fr-tag .ico { width: 15px; height: 15px; }
.fr-intro h1 { margin-top: 16px; font-size: clamp(30px, 3.6vw, 50px); line-height: 1.08; letter-spacing: -.025em; color: #0b3550; max-width: 15ch; }
.fr-intro p { margin: 14px 0 0; font-size: 16px; color: #46606e; max-width: 46ch; }
.fr-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fr-points li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; font-weight: 500; color: #23404e; }
.fr-points li span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--k); flex: none; }
.fr-points li span .ico { width: 17px; height: 17px; }
.fr-card { position: relative; background: #fff; border-radius: 22px; padding: 30px 30px 24px; border: 1px solid #d9e8f1;
    box-shadow: 0 30px 60px -30px rgba(0, 70, 120, .45), 0 2px 4px rgba(0, 70, 120, .05); }
.fr-card::before { content: ""; position: absolute; left: 30px; right: 30px; top: -1px; height: 4px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--blue), var(--teal) 55%, var(--peach)); }
.fr-card h2 { font-size: 22px; letter-spacing: -.015em; color: #0b3550; }
.fr-card .sub { margin: 4px 0 18px; color: var(--muted); font-size: 14px; }
.fr-card .alert { margin-bottom: 14px; }
.fr-card .field { margin-bottom: 14px; }
.fr-input { position: relative; display: flex; align-items: center; }
.fr-input > .ico { position: absolute; left: 13px; width: 18px; height: 18px; color: #7d97a6; pointer-events: none; }
.fr-input .input { height: 48px; padding-left: 42px; font-size: 15px; border-radius: 12px; background: #f8fbfd; border-color: #d6e4ec; }
.fr-input .input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 124, 192, .22); background: #fff; }
.fr-input .input:focus ~ .ico, .fr-input:focus-within > .ico { color: var(--blue); }
.fr-input input[type=password], .fr-input input#Password { padding-right: 46px; }
.fr-eye { position: absolute; right: 6px; width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; color: #6f8a98; cursor: pointer; display: grid; place-items: center; }
.fr-eye:hover { background: var(--blue-soft); color: var(--blue); }
.fr-submit { width: 100%; margin-top: 4px; color: #fff; border-radius: 12px; background: linear-gradient(100deg, #0069a6 0%, var(--blue) 45%, var(--teal) 120%); box-shadow: 0 12px 24px -12px rgba(0, 110, 170, .8); }
.fr-submit:hover { filter: brightness(1.06); }
.fr-submit:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0, 124, 192, .45); }
.fr-help { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.fr-scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(210px, 36vh, 390px); z-index: 1; pointer-events: none; }
.fr-foot { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 10px 16px 14px; font-size: 12px; color: #48606c; background: rgba(233, 241, 245, .85); }
.fr-foot a { color: inherit; }
@media (prefers-reduced-motion: reduce) { .fr-moving { display: none; } }
@media (max-height: 760px) and (min-width: 921px) { .fr-intro h1 { font-size: 36px; } .fr-intro p { font-size: 15px; } .fr-points { display: none; } .fr-scene { height: 210px; } .fr-stage { padding-bottom: 80px; } .fr-card { padding: 24px 28px 20px; } .fr-top { padding-top: 12px; padding-bottom: 8px; } }
@media (max-width: 920px) {
    .fr-stage { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .fr-intro { padding-top: 0; }
    .fr-intro h1 { font-size: 28px; margin-top: 10px; }
    .fr-intro p, .fr-points { display: none; }
    .fr-contacts span { display: none; }
    .fr-contacts a { padding: 8px; }
    .fr-card { padding: 24px 20px 20px; }
    .fr-card::before { left: 20px; right: 20px; }
    .fr-scene { position: relative; height: 170px; margin-top: 8px; }
    .fr-stage { padding-bottom: 0; }
    .fr-foot { background: #e9f1f5; }
}

/* ---------------------------------------------------------------- legal pages */
.doc { max-width: 860px; margin: 0 auto; padding: 30px 22px 50px; }
.doc h1 { font-size: 26px; margin-bottom: 4px; }
.doc h2 { font-size: 17px; margin: 26px 0 8px; color: var(--teal-deep); }
.doc p, .doc li { color: #344543; }
.doc .back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 18px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
    .dash-grid, .bill-layout { grid-template-columns: minmax(0, 1fr); }
    .bill-side { position: static; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-grid > img { min-height: 200px; max-height: 260px; }
}
@media (max-width: 920px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 290px); z-index: 50; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    body.nav-open .side { transform: none; }
    .app > .main { grid-column: 1; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(4, 30, 28, .45); }
    .top-toggle { display: grid; }
    .top { padding: 10px 16px; }
    .content { padding: 16px 16px 28px; }
    .bal-chip small { display: none; }
    .form-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .c2, .c3 { grid-column: span 3; } .c4, .c5, .c6, .c7, .c8, .c12 { grid-column: span 6; }
}
@media (max-width: 640px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi strong { font-size: 18px; }
    .kpi { padding: 12px 12px 10px; }
    .kpi-ico { width: 32px; height: 32px; margin-bottom: 8px; }
    .kpi:last-child { grid-column: span 2; }
    .top-title p, .user-menu summary .nm { display: none; }
    .filter-bar .f { min-width: calc(50% - 7px); }
    .filter-bar .f.grow { min-width: 100%; }
    .rep-table thead { display: none; }
    .rep-table, .rep-table tbody, .rep-table tr, .rep-table td { display: block; width: 100%; }
    .rep-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
    .rep-table td { border: 0; padding: 6px 14px; }
    .rep-group { grid-template-columns: minmax(0, 1fr) auto; }
    .rep-group .chip { grid-column: 1; justify-self: start; }
    .status-list { grid-template-columns: 1fr; }
    .quick { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
    .side, .top, .filter-bar, .no-print { display: none !important; }
    .app { display: block; }
    .card { box-shadow: none; }
}
.tests-table tr.flash td { background: var(--gold-soft); transition: background .2s; }
