/* =====================================================================
   Theme 2 — modern restyle. Standalone stylesheet (own htmlhead links it).
   Deep-blue headings, teal accent, flat tables, calm light background.
   ===================================================================== */

/* self-hosted fonts (no CDN); both are variable woff2 covering the full weight range */
@font-face {
    font-family: 'Saira';
    font-style: normal;
    font-weight: 100 900;
    font-display: optional;
    src: url(/vendor/fonts/saira-latin.woff2?h=74d80e18e2e5d12005f1110b49ec1625) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Saira';
    font-style: normal;
    font-weight: 100 900;
    font-display: optional;
    src: url(/vendor/fonts/saira-latin-ext.woff2?h=a930d35e7cb9e161bae065c839ec117d) format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: optional;
    src: url(/vendor/fonts/inter-latin.woff2?h=260c81a4759baf163c025001c4f27872) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: optional;
    src: url(/vendor/fonts/inter-latin-ext.woff2?h=1ad231aac0a8a891b8374aa5526a5813) format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 62.5%; scroll-behavior: smooth; overflow-y: scroll; }

:root {
    --font-head: 'Saira', "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --font-body: 'Inter', "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --navy: #16395a;
    --navy-deep: #0f2942;
    --blue: #1c6fb0;
    --teal: #1aa6a0;
    --ink: #1f2d3a;
    --muted: #6b7b8a;
    --th: #3c5468;
    --line: #e4e9ef;
    --bg: #F1F4F5;
    --card: #ffffff;
    --danger: #d64545;
    --success: #2e8b57;
}

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

a { text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* ---- header ---- */
.header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 30px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
/* logged-out pages (login, password reset) have no nav/account: center the logo */
.header-inner-centered { justify-content: center; }
.logo img { width: 140px; display: block; }

.nav ul { display: flex; gap: 6px; align-items: center; }
.nav > ul > li { position: relative; }
.nav a {
    display: block;
    padding: 8px 14px;
    border-radius: 6px;
    color: var(--navy);
    font-weight: 600;
    font-size: 1.45rem;
    transition: background 0.18s ease, color 0.18s ease;
}
.nav a:hover { background: #eef3f8; color: var(--blue); }
.nav .fa-chevron-down { font-size: 1rem; margin-left: 4px; opacity: 0.6; }
.nav li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(22, 57, 90, 0.12);
    padding: 6px;
    z-index: 20;
}
.nav li:hover > ul { display: block; }
.nav li ul a { font-weight: 500; }

.account { display: flex; align-items: center; gap: 12px; }
.account-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e6edf4;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.account-name { color: var(--ink); font-weight: 600; }
.account-name:hover { color: var(--blue); }
.account form { margin: 0; }
.icon-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.6rem;
    padding: 6px;
    line-height: 1;
    transition: color 0.18s ease;
}
.icon-btn:hover { color: var(--blue); }

/* theme switch link in the header */
.theme-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-size: 1.3rem;
    font-weight: 600;
    padding: 6px 12px;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.theme-switch:hover { border-color: var(--blue); color: var(--blue); }

/* ---- page shell ---- */
.page {
    max-width: 1500px;
    margin: 0 auto;
    padding: 38px 30px 25px;
}
.page-narrow { max-width: 880px; }

.title {
    font-family: var(--font-head);
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--navy);
    margin: 0 0 24px;
    letter-spacing: 0;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 14px;
}
.back:hover { color: var(--blue); }

.muted { color: var(--muted); margin: 0; }

.subheader-note { margin: -6px 0 18px; font-size: 1.3rem; font-style: italic; }

/* ---- toolbar ---- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.toolbar-right { display: flex; align-items: center; gap: 20px; }

.search { position: relative; display: flex; flex: 1; max-width: 420px; }
.search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1.4rem;
}
.search input {
    flex: 1;
    min-width: 0;
    padding: 11px 38px 11px 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    font-size: 1.45rem;
    color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28, 111, 176, 0.12); }
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
    transition: color 0.18s ease;
}
.search-clear:hover { color: var(--navy); }

/* ---- buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 1.45rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn i { line-height: 1; display: inline-flex; align-items: center; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ---- toggle (segmented) ---- */
.toggle { display: inline-flex; }
.toggle input[type="radio"] { display: none; }
.toggle label {
    padding: 10px 16px;
    border: 1px solid var(--line);
    cursor: pointer;
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--muted);
    background: #fff;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.toggle label:first-of-type { border-radius: 8px 0 0 8px; }
.toggle label:last-of-type { border-radius: 0 8px 8px 0; border-left: none; }
.toggle input[type="radio"]:checked + label { background: var(--navy); color: #fff; border-color: var(--navy); }
.toggle-inline { margin-top: 2px; }

/* ---- switch (sliding toggle, two hidden radios so a value is always submitted) ---- */
.switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    font-size: 1.45rem;
    line-height: 1;
    color: var(--ink);
}
/* the wrapping form is a flex container so it adds no own text-line height that offsets centering */
.switch-form { display: flex; align-items: center; margin: 0; }
.switch input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    border-radius: 13px;
    background: #c7cfd6;
    transition: background 0.2s;
}
.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
}
/* "on" radio checked -> track navy, knob slides right */
.switch input.switch-on:checked ~ .switch-track { background: var(--navy); }
.switch input.switch-on:checked ~ .switch-track::after { transform: translateX(20px); }

/* ---- card + table ---- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(22, 57, 90, 0.05);
    overflow: hidden;
    margin-bottom: 22px;
}

.table { width: 100%; border-collapse: collapse; background: transparent; }
.table thead th {
    text-align: left;
    padding: 14px 18px;
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--th);
    background: #fafbfc;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table tbody td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 1.45rem;
    white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: none; }
.row { cursor: pointer; }
.row:hover { background: #f1f7fc; }
.row-inactive td { color: var(--muted); }
.name { font-weight: 600; color: var(--ink); }
.empty { text-align: center; color: var(--muted); padding: 28px; }

.pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 1.15rem;
    font-weight: 600;
    vertical-align: middle;
}
.pill-muted { background: #eef1f4; color: var(--muted); }
.pill-admin { background: #dce8f3; color: var(--navy); text-transform: uppercase; letter-spacing: 0.3px; }

/* overview I/E status cells (0 ok = green, 1 uitsluiting = orange, 2 danger = red), tuned to theme2 palette */
.col-status { text-align: center; width: 40px; }
.status {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
}
.status-ok { background: #19b35a; }
.status-unknown { background: #f5a623; }
.status-danger { background: #f0322f; }

/* ---- forms ---- */
/* a form-section is a vertical stack: one uniform gap spaces every child (fields, groups, helper text),
   so spacing stays consistent without per-element margins */
.form { display: flex; flex-direction: column; }
/* card-less forms (login, reset/forgot password) stack loose fields straight in .form; give them the same 22px rhythm */
.form > .field { margin-bottom: 22px; }
.form-section { display: flex; flex-direction: column; gap: 18px; padding: 24px 26px; }
.section-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 500;
    color: var(--navy);
    margin: 0;
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field select {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1.45rem;
    color: var(--ink);
    background: #fff;
    width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28, 111, 176, 0.12); }

/* text input with a trailing clear (×) button */
.input-clearable { position: relative; }
.input-clearable input[type="text"] { padding-right: 34px; }
.input-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 4px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
}
.input-clear:hover { color: var(--ink); }

.checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px 18px;
}
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 1.4rem; user-select: none; }
/* checkbox labels are normal weight, even inside .field (where .field label sets 600) */
label.check { font-weight: 400; }
label.check-all { font-weight: 600; }
/* custom checkbox so the on/off background colour can animate (native accent-color can't transition) */
.check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.check input[type="checkbox"]::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.18s ease;
}
.check input[type="checkbox"]:checked { background: var(--navy); border-color: var(--navy); }
.check input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
.check input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(28, 111, 176, 0.18); }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

/* ---- alerts ---- */
.alert { padding: 14px 26px; border-radius: 8px; margin-bottom: 20px; font-size: 1.4rem; border: 1px solid transparent; }
.alert ul { margin: 0; padding: 0; list-style: none; }
.alert li + li { margin-top: 4px; }
.alert-success { background: #f1faf4; border-color: #cce8d6; color: #1d6b41; }
.alert-danger { background: #fdf3f3; border-color: #f3d0d0; color: #a32626; }

@media (max-width: 720px) {
    .grid-2 { grid-template-columns: 1fr; }
    .toolbar { align-items: stretch; }
    .search { max-width: none; }
}

/* ---- auth pages (login, password reset) ---- */
.auth-page { max-width: 460px; padding-top: 60px; }
.auth-card { padding: 32px 30px; }
.auth-card .title { font-size: 2.8rem; margin-bottom: 22px; }
.auth-card .form-actions { justify-content: stretch; }
.auth-card .form-actions .btn { flex: 1; justify-content: center; }
.auth-link { margin: 18px 0 0; font-size: 1.4rem; }
.auth-link a { color: var(--blue); font-weight: 600; }
.auth-link a:hover { color: var(--navy); }

/* ---- documents page ---- */
[hidden] { display: none !important; }

.drop-indicator {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(28, 111, 176, 0.12);
    pointer-events: none;
}
.drop-indicator.active { display: flex; }
.drop-indicator-inner {
    border: 3px dashed var(--blue);
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    font-size: 2.2rem;
    font-family: var(--font-head);
    font-weight: 500;
    padding: 40px 60px;
}

/* tabs are desktop-hidden; both panes show side by side. They appear only on narrow screens (see media query). */
.upload-tabs { display: none; }

.upload-panel {
    display: grid;
    grid-template-columns: minmax(360px, 0.6fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 25px;
    margin-top: 25px;
}
/* the form column grows with its content (no inner scroll); the page scrolls */
.upload-form { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
/* sticky cover spanning header height + gap (80+25); scrolling rows hide behind it, the header (higher z) sits over it
   so its border and shadow stay visible. Negative margin removes its flow footprint so it adds no space. */
.sticky-cover {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 105px;
    margin: -105px -30px 0;
    background: var(--bg);
}

/* the details + address search stick below the header, leaving a 25px gap (header is 80px tall) */
.upload-form-fixed { position: sticky; top: 105px; z-index: 2; }
/* the address lists scroll with the page, sliding behind the sticky block above */
.upload-form-addresses { min-width: 0; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
/* the preview cell reserves the column's width/position; the viewer inside is fixed to the viewport (105px under the
   header, 25px above the bottom) and never scrolls. Its left/width track the cell via JS (syncPreviewWidth). */
.upload-preview { min-width: 0; }
.upload-preview .pdf-viewer-component {
    position: fixed;
    top: 105px;
    bottom: 25px;
    height: auto;
    z-index: 4;
}
.upload-form .original-name { font-size: 1.2rem; color: var(--muted); margin: 0; word-break: break-all; }
/* a small hint under a field label, in the same colour as labels */
.field-hint { font-size: 1.3rem; color: var(--ink); font-weight: 600; margin: 2px 0 0; }

.doc-type { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.doc-type .check { display: inline-flex; margin: 0; }
.doc-type input[type=radio] { width: 18px; height: 18px; accent-color: var(--navy); }

.date-candidates { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.date-candidate {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    padding: 4px 12px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.date-candidate:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* detected addresses: checkbox list */
.doc-addresses { display: flex; flex-direction: column; gap: 8px; }
.doc-addresses.checks { display: grid; grid-template-columns: 1fr; gap: 8px; }

/* inline address search box */
.address-search { position: relative; margin-top: 4px; }
.address-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1.4rem;
}
.address-search input[type="text"] {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 1.45rem;
    color: var(--ink);
}
.address-search input[type="text"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28, 111, 176, 0.12); }

/* appended search-result groups, each removable */
#address-results { display: flex; flex-direction: column; gap: 12px; }
#address-results:empty { display: none; }
.address-result-group { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fafbfc; }
.address-result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.address-result-title { font-size: 1.3rem; font-weight: 600; color: var(--navy); }
.address-result-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 2px;
    transition: color 0.18s ease;
}
.address-result-remove:hover { color: var(--danger); }
.address-result-note { font-size: 1.3rem; color: var(--muted); margin: 0 0 8px; padding-right: 26px; }
.address-checks { display: grid; grid-template-columns: 1fr; gap: 6px; }
/* (de)select-all row sits above the list, separated by a thin rule (its label weight is set above) */
.check-all { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-addresses .check-all { margin-bottom: 6px; }
/* a search result whose address already appears in an earlier group: disabled + struck through */
.check.duplicate { cursor: default; }
.check.duplicate span { text-decoration: line-through; opacity: 0.5; }
.check.duplicate input[type="checkbox"] { cursor: default; }

/* ---- reusable PDF viewer component ---- */
.pdf-viewer-component, .pdf-viewer-component * { transition: none; }

.pdf-viewer-component {
    display: flex;
    flex-direction: column;
    height: 80vh;
    border-radius: 8px;
    overflow: hidden;
    background: #444;
}
.pdf-viewer-component .pdfv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 14px;
    background: #333;
    color: #fff;
    font-size: 1.3rem;
}
.pdf-viewer-component .pdfv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-viewer-component .pdfv-zoom { color: #ddd; }
.pdf-viewer-component .pdfv-pages { color: #ddd; white-space: nowrap; }
.pdf-viewer-component .pdfv-pages.loading { color: #ff6b6b; }

.pdf-viewer-component .pdfv-scroll {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    cursor: grab;
    scrollbar-color: #999 #333;
}
.pdf-viewer-component .pdfv-scroll.panning { cursor: grabbing; user-select: none; }
.pdf-viewer-component .pdfv-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.pdf-viewer-component .pdfv-scroll::-webkit-scrollbar-track { background: #333; }
.pdf-viewer-component .pdfv-scroll::-webkit-scrollbar-thumb { background: #999; border-radius: 6px; border: 2px solid #333; }
.pdf-viewer-component .pdfv-scroll::-webkit-scrollbar-thumb:hover { background: #bbb; }

.pdf-viewer-component .pdfv-placeholder { margin: auto; color: #bbb; pointer-events: none; }

.pdf-viewer-component .pdfv-page {
    position: relative;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    margin: 0 auto;
}
.pdf-viewer-component .pdfv-page canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.pdf-viewer-component .pdfv-page .pdfv-hires { z-index: 1; }

@media (max-width: 800px) {
    /* narrow screens: form and preview become two tabs; only the active one is shown */
    .upload-tabs { display: flex; gap: 8px; margin-top: 20px; }
    .upload-tab {
        flex: 1;
        padding: 10px 14px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        color: var(--muted);
        font-size: 1.45rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    }
    .upload-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

    .upload-panel { grid-template-columns: 1fr; margin-top: 12px; }

    /* show only the pane for the active tab */
    .upload-panel[data-active-tab="form"] .upload-preview { display: none; }
    .upload-panel[data-active-tab="preview"] .upload-form { display: none; }

    /* the form's top section no longer needs to stick (one column, the page scrolls normally) */
    .upload-form-fixed { position: static; }
    /* the desktop sticky cover would overlap the content top here; not needed without sticky panes */
    .sticky-cover { display: none; }

    /* the preview returns to normal flow: full width of the column, a fixed tall box, not pinned over the page */
    .upload-preview .pdf-viewer-component {
        position: static;
        left: auto !important;
        width: auto !important;
        height: 75vh;
    }
}

/* ======================= Account page ======================== */
[x-cloak] { display: none !important; }

.strength { margin-top: 10px; }
.strength-bar { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.strength-fill { height: 100%; width: 0; border-radius: 4px; transition: width 0.2s, background 0.2s; }
.strength-fill.strength-0, .strength-fill.strength-1, .strength-fill.strength-2 { background: #f0322f; }
.strength-fill.strength-3, .strength-fill.strength-4 { background: #f5a623; }
.strength-fill.strength-5 { background: #19b35a; }
.strength-rules { list-style: none; margin: 10px 0 0; padding: 0; font-size: 1.3rem; }
.strength-rules li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.strength-rules li.ok { color: #19b35a; }
.strength-rules li.no { color: var(--muted); }

.field input[readonly] { background: #f4f6f8; color: var(--muted); cursor: default; }
.field input[readonly]:focus { border-color: var(--line); box-shadow: none; }

.match-hint { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 1.3rem; }
.match-hint.ok { color: #19b35a; }
.match-hint.no { color: #f0322f; }

.permission-list { list-style: none; margin: 0; padding: 0; }
.permission-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 1.45rem; color: var(--ink); border-bottom: 1px solid var(--line); }
.permission-list li:last-child { border-bottom: none; }
.permission-list li i { color: var(--teal); }
.permission-hint { margin-top: 14px; font-size: 1.25rem; font-style: italic; }
