/* Salam EduMed Event Reporting System — application styles.
   Provisional brand: navy / teal / white / soft grey (editable in Settings → Branding). */
:root {
  --brand-primary: #1F2A44;   /* navy */
  --brand-accent: #0E7C7B;    /* teal */
  --brand-surface: #F3F5F7;   /* soft grey */
  --ink: #1d2433; --ink-2: #3b4252; --muted: #5a6272; --line: #d5dae1; --line-2: #e7eaee; --white: #fff;
  --ok: #1b6e3a; --ok-bg: #e7f4ec; --warn: #8a4b00; --warn-bg: #fff4e5; --bad: #a12121; --bad-bg: #fdecec; --info: #1f4f8a; --info-bg: #e8f0fb;
  --radius: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: Montserrat, "Segoe UI", Roboto, Arial, sans-serif;
  --heading-font: var(--font);
  --focus: 0 0 0 3px rgba(14,124,123,.45);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--brand-surface); line-height: 1.5; }
h1, h2, h3 { font-family: var(--heading-font); color: var(--brand-primary); line-height: 1.25; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; } h2 { font-size: 1.25rem; margin: 1.5rem 0 .75rem; } h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; }
a { color: var(--brand-accent); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--brand-primary); color: #fff; padding: 8px 12px; z-index: 1000; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--brand-primary); color: #fff; position: sticky; top: 0; z-index: 50; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; min-width: 0; }
.brand img { max-height: 36px; max-width: 120px; background: #fff; border-radius: 4px; padding: 2px; }
.brand .name { font-family: var(--heading-font); font-size: 1.15rem; white-space: nowrap; }
.brand .sub { font-weight: 500; font-size: .8rem; opacity: .85; }
.topbar .spacer { flex: 1; }
.mode-badge { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 2px solid #fff; white-space: nowrap; }
.mode-badge.demo { background: #ffd166; color: #3d2c00; border-color: #ffd166; }
.mode-badge.cloud { background: #d9f2f1; color: #0b4e4d; border-color: #d9f2f1; }
.mode-badge.local { background: #e8eefc; color: #1d3a7a; border-color: #e8eefc; }
.mode-badge.unconfigured { background: #fff; color: var(--bad); }
.save-status { display: flex; align-items: center; gap: 6px; font-size: .85rem; background: rgba(255,255,255,.12); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.save-status button { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; font: inherit; font-size: .78rem; padding: 1px 6px; cursor: pointer; }
.save-status.failed { background: #a12121; } .save-status.pending { background: #8a4b00; } .save-status.saving { background: rgba(255,255,255,.2); }
.net-status { font-size: .8rem; opacity: .9; }
.menu-btn { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 4px 10px; font: inherit; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 12px 8px; position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; margin: 1px 0; }
.nav a:hover { background: var(--brand-surface); }
.nav a[aria-current="page"] { background: #e3f1f1; color: var(--brand-primary); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand-accent); }
.nav .ico { width: 20px; text-align: center; }
.sidebar .side-note { font-size: .75rem; color: var(--muted); padding: 12px; border-top: 1px solid var(--line-2); margin-top: 12px; }
main { padding: 20px 24px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head p { margin: 0; color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > h3:first-child, .panel > .row:first-child > h2, .panel > .row:first-child > h3 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; background: #eef1f4; padding: 1px 5px; border-radius: 4px; }

/* ---------- banners & states ---------- */
.banner { border-radius: var(--radius); padding: 10px 14px; margin: 0 0 12px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.banner .b-ico { font-weight: 700; } .banner > div { flex: 1; }
.banner.info { background: var(--info-bg); border-color: #b9cdea; color: #173b66; }
.banner.warn { background: var(--warn-bg); border-color: #f0c98b; color: #5c3200; }
.banner.bad { background: var(--bad-bg); border-color: #f0b4b4; color: #7a1717; }
.banner.ok { background: var(--ok-bg); border-color: #a9d8bb; color: #134d29; }
.demo-strip { background: repeating-linear-gradient(45deg, #ffd166, #ffd166 12px, #ffe199 12px, #ffe199 24px); color: #3d2c00; font-weight: 700; text-align: center; padding: 4px; font-size: .85rem; grid-column: 1 / -1; }
.preview-strip { background: #efe9fb; color: #3d2a73; border-bottom: 1px solid #d4c6f2; text-align: center; padding: 4px 8px; font-size: .85rem; grid-column: 1 / -1; }
.local-strip { background: #e8eefc; color: #1d3a7a; border-bottom: 1px solid #c4d2f3; text-align: center; padding: 4px 8px; font-size: .85rem; grid-column: 1 / -1; }
.strip-btn { margin-left: 8px; padding: 2px 10px; min-height: 0; font-size: .8rem; vertical-align: baseline; background: #fff; }
.mode-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mode-choice { border: 1px solid var(--line, #d5dae1); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mode-choice h3 { margin: 0; }
.mode-choice p { margin: 0; }
.mode-choice ul { margin: 0 0 6px; padding-left: 18px; }
.mode-choice .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 860px) { .mode-choices { grid-template-columns: 1fr; } }
.empty-state { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty-state .big { font-size: 2rem; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--brand-accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.btn { font: inherit; font-size: .925rem; font-weight: 600; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; min-height: 38px; }
.btn:hover { background: var(--brand-surface); }
.btn.primary { background: var(--brand-accent); border-color: var(--brand-accent); color: #fff; }
.btn.primary:hover { filter: brightness(.95); }
.btn.navy { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn.danger { color: var(--bad); border-color: #e3a5a5; }
.btn.small { font-size: .82rem; padding: 3px 9px; min-height: 30px; }
.btn.link { border: none; background: none; color: var(--brand-accent); padding: 2px 4px; min-height: auto; text-decoration: underline; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label, .field .lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 3px; color: var(--ink-2); }
.field .req { color: var(--bad); }
.field .help { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.field .err { font-size: .82rem; color: var(--bad); margin-top: 2px; font-weight: 600; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--bad); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  font: inherit; font-size: 1rem; width: 100%; padding: 7px 10px; border: 1px solid #b9c0ca; border-radius: 6px; background: #fff; color: var(--ink); min-height: 40px; }
textarea { min-height: 84px; resize: vertical; }
input[readonly] { background: var(--brand-surface); }
.money { position: relative; } .money span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
.money input { padding-left: 38px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; }
.advanced-toggle { margin: 8px 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0 0 12px; min-width: 0; }
.grid-2 > *, .grid-3 > *, .form-grid > *, .panel, .chart-block, main { min-width: 0; }
legend { font-weight: 700; color: var(--brand-primary); padding: 0 6px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.filters .field { min-width: 150px; } .filters .field label { font-size: .8rem; }
.list-editor .item { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-bottom: 6px; }
.list-editor .item.agenda { grid-template-columns: 110px 1fr 1fr auto; }
.list-editor .item.mix { grid-template-columns: 1fr 120px auto; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; background: #eef1f4; font-weight: 600; padding: 8px 10px; border-bottom: 2px solid #c9d0d8; white-space: nowrap; position: sticky; top: 0; }
table.data th button.sort { font: inherit; font-weight: 600; background: none; border: none; padding: 0; cursor: pointer; color: inherit; }
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tr:hover td { background: #fafbfc; }
table.data .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data tfoot td { font-weight: 700; background: #f6f8fa; border-top: 2px solid #c9d0d8; }
table.data tr.pending td { background: #fff8eb; }
table.data .actions { white-space: nowrap; text-align: right; }

/* ---------- chips / badges (never colour alone: icon + text) ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--ok-bg); border-color: #a9d8bb; }
.chip.warn { color: var(--warn); background: var(--warn-bg); border-color: #f0c98b; }
.chip.bad { color: var(--bad); background: var(--bad-bg); border-color: #f0b4b4; }
.chip.info { color: var(--info); background: var(--info-bg); border-color: #b9cdea; }
.chip.neutral { color: var(--ink-2); background: #f1f3f5; border-color: #ccd2d9; }
.chip.pending { color: #6b3b00; background: #fff1d6; border-color: #e5b25c; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); min-height: 98px; }
.card .lbl { font-size: .82rem; color: var(--muted); font-weight: 600; }
.card .val { font-size: 1.45rem; font-weight: 700; color: var(--brand-primary); margin: 2px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card .val.na { font-size: 1.05rem; color: var(--warn); }
.card .sub { font-size: .78rem; color: var(--muted); }
.card .basis { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-accent); font-weight: 700; }

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.tabs [role=tab] { font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 12px; border: none; background: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; white-space: nowrap; }
.tabs [role=tab][aria-selected="true"] { color: var(--brand-primary); border-bottom-color: var(--brand-accent); }
.tabs [role=tab] .hid { font-size: .72rem; color: var(--muted); }

/* ---------- charts ---------- */
.chart-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; }
.chart-block h3 { margin-top: 0; }
.chart-block svg { width: 100%; height: auto; display: block; }
.chart-block details { margin-top: 8px; } .chart-block summary { cursor: pointer; font-weight: 600; color: var(--brand-accent); }
.chart-tools { display: flex; gap: 6px; justify-content: flex-end; }
.tooltip { position: fixed; pointer-events: none; background: #1d2433; color: #fff; padding: 5px 8px; border-radius: 6px; font-size: .82rem; z-index: 200; max-width: 280px; }

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; z-index: 100; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; width: min(760px, 100%); box-shadow: 0 20px 40px rgba(0,0,0,.25); }
.modal.wide { width: min(1100px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal header h2 { margin: 0; font-size: 1.15rem; }
.modal .body { padding: 16px 18px; max-height: 72vh; overflow-y: auto; }
.modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.x-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 150; }
.toast { background: #1d2433; color: #fff; padding: 10px 14px; border-radius: 8px; max-width: 380px; box-shadow: var(--shadow); font-size: .9rem; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); } .toast.warn { background: var(--warn); }

/* ---------- connect / auth screen ---------- */
.auth-wrap { max-width: 640px; margin: 6vh auto; }
.kv-list { display: grid; grid-template-columns: 200px 1fr; gap: 4px 12px; font-size: .92rem; }
.kv-list dt { font-weight: 600; color: var(--ink-2); } .kv-list dd { margin: 0; overflow-wrap: anywhere; }
.diff { width: 100%; border-collapse: collapse; font-size: .9rem; } .diff td, .diff th { border: 1px solid var(--line); padding: 6px; vertical-align: top; } .diff tr.changed td { background: #fff7e6; }
.report-host { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .menu-btn { display: inline-block; }
  .sidebar { position: fixed; top: 52px; left: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 60; height: auto; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,.25); }
  main { padding: 14px 12px 60px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .brand .sub { display: none; }
}
@media (max-width: 560px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card .val { font-size: 1.15rem; } .save-status .txt-long { display: none; } }

/* ---------- print: only the report ---------- */
@media print {
  body { background: #fff; }
  .topbar, .sidebar, .demo-strip, .local-strip, .no-print, .tabs, .toasts, .page-head .btn-group, .banner { display: none !important; }
  .app { display: block; } main { padding: 0; }
  .report-host { border: none; padding: 0; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* QR post-test & feedback form panel */
.qr-panel h3 { margin: 12px 0 6px; font-size: 1rem; }
.qr-qlist { padding-left: 22px; margin: 0 0 10px; }
.qr-qlist li { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.qr-opt { display: inline-block; margin: 2px 10px 2px 0; }
.qr-opt.correct { font-weight: 700; color: var(--ok); }
.qr-codes { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.qr-fig { margin: 0; width: 220px; max-width: 100%; }
.qr-svg svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qr-link { word-break: break-all; color: var(--muted); }

/* Past events */
.pe-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.pe-steps .panel { position: relative; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pe-steps .panel p { flex: 1; margin: 0; }
.pe-steps .panel .btn { align-self: flex-start; }
.pe-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
@media (max-width: 860px) { .pe-steps { grid-template-columns: 1fr; } }
.modal:has(#pe-body) { width: min(1280px, 98vw); }
.modal .body:has(#pe-body) { max-height: 78vh; }
.pe-table td { vertical-align: top; }
.pe-table thead th { position: sticky; top: -16px; z-index: 1; background: var(--brand-surface); }
.pe-table select { width: 230px; max-width: 100%; }
.pe-table td:nth-child(2) { min-width: 220px; }
.pe-table tr.has-notes td { border-bottom: 0; }
.pe-table tr.pe-notes td { padding-top: 0; }
.pe-table tr.pe-notes ul { margin: 0 0 4px; padding: 8px 12px 8px 28px; border-radius: 6px; font-size: .9rem; line-height: 1.45; }
.pe-table tr.pe-notes.warn ul { background: var(--warn-bg); border: 1px solid #f0c98b; }
.pe-table tr.pe-notes.bad ul { background: var(--bad-bg); border: 1px solid #f0b4b4; }
.pe-table tr.pe-notes li { margin: 2px 0; }
.pe-filter { margin: 6px 0 10px; }
.bad-text { color: var(--bad); }
.warn-row td { background: var(--warn-bg); }
.group-table td.num, .group-table th.num { white-space: nowrap; }

/* Team & access, My account */
.role-help { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 6px 0 10px; font-size: .92rem; }
.role-help dt { font-weight: 700; color: var(--brand-primary); }
.role-help dd { margin: 0; }
.steps { margin: 0 0 8px; padding-left: 20px; } .steps li { margin: 4px 0; }
.team-intro h3 { margin-top: 0; }
.team-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 10px 12px; align-items: end; background: var(--brand-surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0 12px; }
@media (max-width: 900px) { .team-add { grid-template-columns: 1fr; } }
.narrow { max-width: 780px; }
.crumb { margin: 0 0 4px; font-size: .9rem; }

/* Dashboard: one screen */
.dash-filters { align-items: flex-end; }
.more-filters { align-self: flex-end; padding-bottom: 9px; }
.more-filters[open] { flex-basis: 100%; padding-bottom: 0; }
.more-filters > summary { cursor: pointer; font-weight: 600; color: var(--brand-accent); font-size: .9rem; }
.more-filters .row { margin-top: 8px; align-items: flex-end; gap: 10px; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand-accent); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.tile .t-lbl { font-size: .85rem; font-weight: 600; color: var(--muted); }
.tile .t-val { font-size: 1.55rem; font-weight: 700; color: var(--brand-primary); line-height: 1.2; margin: 4px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .t-of { font-size: .88rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tile .t-sub { font-size: .84rem; color: var(--ink-2); }
.tile.na { border-top-color: var(--line); }
.tile.na .t-val { font-size: 1.1rem; color: var(--muted); }
@media (max-width: 1250px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile .t-val { font-size: 1.2rem; } }
.attention { border-left: 4px solid #e5b25c; }
.attention h2 { margin-bottom: 4px; }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-list > li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.att-list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.att-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--warn-bg); color: var(--warn); border: 1px solid #f0c98b; display: grid; place-items: center; font-weight: 700; font-size: .8rem; margin-top: 2px; }
.att-body { flex: 1; min-width: 0; }
.att-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.att-body details > summary { cursor: pointer; font-size: .85rem; color: var(--brand-accent); font-weight: 600; margin-top: 2px; }
.att-events { margin: 6px 0 0; padding-left: 18px; font-size: .9rem; max-height: 220px; overflow: auto; }
.dash-charts .chart-block { margin-bottom: 0; }
.dash-charts { margin-bottom: 16px; }
#tbl-dash-ev td { vertical-align: middle; }
.rep-link { text-decoration: none; }
.show-all { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; }
#all-figures { border-top: 2px dashed var(--line); padding-top: 16px; }
.chart-block details.data-tbl > summary { font-size: .88rem; }

/* Viewer logins: one tidy, even text size (11 pt) everywhere */
html.viewer-ui { font-size: 11pt; }
html.viewer-ui h1 { font-size: 1.45rem; }
html.viewer-ui h2 { font-size: 1.15rem; }
html.viewer-ui h3 { font-size: 1rem; }
html.viewer-ui main { width: 100%; max-width: 1240px; justify-self: center; }
html.viewer-ui .small, html.viewer-ui .tile .t-sub, html.viewer-ui .tile .t-lbl, html.viewer-ui .field .help, html.viewer-ui .chip, html.viewer-ui .att-events, html.viewer-ui .side-note { font-size: .91rem; }
html.viewer-ui table.data { font-size: .95rem; }
html.viewer-ui .btn { font-size: .95rem; }
html.viewer-ui .btn.small { font-size: .91rem; }
html.viewer-ui .tile .t-val { font-size: 1.45rem; }
html.viewer-ui .report { font-size: 11pt; max-width: 980px; }
html.viewer-ui .report h1 { font-size: 17pt; }
html.viewer-ui .report h2 { font-size: 13.5pt; }
html.viewer-ui .report h3 { font-size: 12pt; }
html.viewer-ui .report .rtable { font-size: 10.5pt; }
html.viewer-ui .report .rtable.compact { font-size: 10pt; }
html.viewer-ui .report .rcard-v { font-size: 15pt; }
html.viewer-ui .report .rcard-l, html.viewer-ui .report .rcard-s, html.viewer-ui .report .rmeta, html.viewer-ui .report .note, html.viewer-ui .report .prov, html.viewer-ui .report .rfoot { font-size: 10pt; }

/* Report preview switch and the 1-page summary preview */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 3px; gap: 3px; margin: 0 0 12px; }
.seg-btn { font: inherit; font-size: .9rem; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.seg-btn:hover { color: var(--brand-primary); }
.seg-btn[aria-selected="true"] { background: var(--brand-primary); color: #fff; }
.op-host { overflow-x: auto; border-radius: var(--radius); }
@media (max-width: 900px) { .op-host .op { zoom: .75; } }
@media (max-width: 600px) { .op-host .op { zoom: .45; } }

/* Print chooser */
.pc-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pc-choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; position: relative; background: #fff; }
.pc-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc-choice:has(input:checked) { border-color: var(--brand-accent); box-shadow: 0 0 0 2px rgba(14,124,123,.28); background: #f3faf9; }
.pc-choice:has(input:focus-visible) { box-shadow: var(--focus); }
.pc-text { display: flex; flex-direction: column; gap: 3px; }
.pc-text b { color: var(--brand-primary); font-size: 1rem; }
.pc-text span { font-size: .875rem; color: var(--muted); line-height: 1.4; }
.pc-thumb { flex: none; width: 44px; height: 60px; position: relative; background: #fff; border: 1px solid #c9d0d8; border-radius: 3px; overflow: visible; }
.pc-thumb::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 15px; background: var(--brand-primary); border-bottom: 2px solid #b5782a; border-radius: 2px 2px 0 0; }
.pc-thumb i { position: absolute; left: 6px; height: 3px; background: #d8dee6; border-radius: 2px; }
.pc-thumb i:nth-child(1) { top: 22px; right: 6px; height: 6px; background: #c9d6e2; }
.pc-thumb i:nth-child(2) { top: 33px; width: 14px; background: #009490; }
.pc-thumb i:nth-child(3) { top: 41px; width: 22px; background: #1f2a44; }
.pc-thumb i:nth-child(4) { top: 49px; right: 6px; }
.pc-full { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 #c9d0d8, 8px 8px 0 -1px #fff, 8px 8px 0 0 #c9d0d8; margin-right: 8px; }
.pc-full::before { height: 8px; background: #fff; border-bottom: 2px solid var(--brand-primary); }
.pc-full i:nth-child(1) { top: 14px; height: 3px; }
.pc-full i:nth-child(2) { top: 22px; width: auto; right: 6px; background: #d8dee6; }
.pc-full i:nth-child(3) { top: 30px; width: auto; right: 10px; background: #d8dee6; }
.pc-full i:nth-child(4) { top: 38px; }
.pc-opts { margin: 14px 0 0; }
.pc-opts[hidden] { display: none; }
.pc-secs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-bottom: 8px; }
@media (max-width: 600px) { .pc-choices, .pc-secs { grid-template-columns: 1fr; } }

/* Comments quoted on the 1-page summary */
.hl-panel > summary { cursor: pointer; }
.hl-panel[open] > summary { margin-bottom: 8px; }
.hl-list { max-height: 300px; overflow: auto; display: grid; gap: 6px; padding-right: 6px; }
.hl-item { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; line-height: 1.4; }
.hl-item input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
