:root {
  --bg: #EEF2F1;
  --surface: #FFFFFF;
  --ink: #15262D;
  --muted: #5B6B70;
  --line: #D6DEDC;
  --brand: #0F5E6B;
  --brand-ink: #FFFFFF;
  --brand-soft: #DCEBEC;
  --visit: #0F5E6B;
  --report: #4B4FA6;
  --parity: #8A6D1D;
  --late: #B23A3A;
  --good: #2E7D4F;
  --warn: #A9741B;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1A1E; --surface: #16252B; --ink: #E4ECEA; --muted: #95A5A8; --line: #2A3B41;
    --brand: #4FB3BF; --brand-ink: #062227; --brand-soft: #1C3940;
    --visit: #5CC0CB; --report: #9EA2F0; --parity: #D9B45A; --late: #F07B7B; --good: #6FCF97; --warn: #E2B45A;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Onest", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 1.6rem 0 .7rem; }
h2 small, h1 small { color: var(--muted); font-weight: 500; font-size: .8em; margin-left: .3em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; color: var(--ink); text-decoration: none; }
.strong:hover { text-decoration: underline; }
.sub { color: var(--muted); font-size: .82rem; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.mainnav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; }
.mainnav a { padding: .45rem .8rem; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.mainnav a:hover { color: var(--ink); background: var(--bg); }
.mainnav a[aria-current] { color: var(--brand); background: var(--brand-soft); }
.me { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.logout { color: var(--muted); font-size: .85rem; margin-left: .4rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; font: inherit; font-weight: 600; padding: .55rem 1rem; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; background: var(--surface); color: var(--ink); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--line); background: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn.sm { padding: .28rem .6rem; font-size: .82rem; font-weight: 500; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .8rem; text-decoration: underline; padding: 0; }
.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 500; color: var(--muted); }
.form input:not([type=checkbox]), .form select, .form textarea, .filters select, .pt-tools input, .pt-tools select, .note-form textarea, #dlg textarea, #dlg input, #dlg select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; width: 100%; }
.form label.check { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem 1rem; margin: 0; display: grid; gap: .8rem; }
legend { font-weight: 600; padding: 0 .3rem; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; align-items: end; }
.span2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .6rem; align-items: end; }
.ok-box, .err-box { padding: .7rem 1rem; border-radius: 8px; margin: 0 0 1rem; }
.ok-box { background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--ink); }
.err-box { background: color-mix(in srgb, var(--late) 14%, var(--surface)); color: var(--ink); }

/* auth */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; width: 100%; max-width: 380px; display: grid; gap: .8rem; }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 1.4rem; }

/* tasks header */
.day-head { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: end; margin-bottom: 1.25rem; }
.tabs { display: inline-flex; gap: .2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .2rem; margin-bottom: .9rem; }
.tabs a { padding: .35rem .85rem; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .9rem; white-space: nowrap; }
.tabs a[aria-current] { background: var(--ink); color: var(--bg); }
.subtabs { margin-bottom: 1.25rem; flex-wrap: wrap; }
.count-pill { background: var(--late); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 .4rem; margin-left: .2rem; }
.dh-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.dh-title h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.nav-arrow { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 1.3rem; line-height: 1; background: var(--surface); }
.holiday-note { color: var(--late); margin: .4rem 0 0; }
.dh-progress { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: .5rem; }
.prog { display: grid; gap: .15rem; padding: .7rem .9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.prog.on { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.prog-visit { --k: var(--visit); } .prog-report { --k: var(--report); } .prog-parity { --k: var(--parity); }
.prog.on { color: var(--k); }
.prog-num { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--k); line-height: 1.1; }
.prog-num small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.prog-label { font-size: .82rem; color: var(--muted); }
.prog-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--k); }
.filters { margin: 0 0 1rem; display: flex; gap: .8rem; }
.filters label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); }
.filters select { width: auto; }

/* task list */
.day-group { margin-bottom: 1.4rem; }
.dg-title { font-size: .95rem; font-weight: 600; color: var(--muted); margin: 0 0 .5rem; }
.dg-title.is-today { color: var(--ink); }
.dg-title span { background: var(--brand); color: var(--brand-ink); font-size: .72rem; padding: .05rem .45rem; border-radius: 99px; margin-left: .3rem; vertical-align: 2px; }
.tasks { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tasks:empty { display: none; }
.task { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .7rem .9rem; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: transparent; cursor: pointer; padding: 0; display: grid; place-items: center; }
.tick svg { width: 16px; height: 16px; fill: none; stroke: transparent; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tick:hover { border-color: var(--brand); }
.s-done .tick { background: var(--good); border-color: var(--good); }
.s-done .tick svg { stroke: #fff; }
.s-skipped .tick { border-style: dashed; border-color: var(--late); }
.s-done .t-hotel { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.t-line1 { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.t-hotel { font-weight: 600; color: var(--ink); text-decoration: none; }
.t-hotel:hover { text-decoration: underline; }
.t-line2 { display: flex; gap: .35rem .9rem; flex-wrap: wrap; color: var(--muted); font-size: .82rem; margin-top: .1rem; align-items: center; }
.tb { font-size: .74rem; font-weight: 600; padding: .05rem .5rem; border-radius: 5px; white-space: nowrap; }
.tb-visit { color: var(--visit); background: color-mix(in srgb, var(--visit) 13%, transparent); }
.tb-report { color: var(--report); background: color-mix(in srgb, var(--report) 13%, transparent); }
.tb-parity { color: var(--parity); background: color-mix(in srgb, var(--parity) 14%, transparent); }
.late .t-hotel::after { content: "gecikti"; font-size: .72rem; font-weight: 600; color: var(--late); margin-left: .5rem; }
.late-txt { color: var(--late); }
.t-acts { display: flex; gap: .3rem; opacity: .35; transition: opacity .15s; }
.task:hover .t-acts, .task:focus-within .t-acts { opacity: 1; }
@media (hover: none) { .t-acts { opacity: 1; } }
.pchip { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--ink); white-space: nowrap; }
.pchip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tasks.compact .task { padding: .5rem .7rem; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.task.busy { opacity: .5; pointer-events: none; }

/* pages */
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.page-title h2 { margin: 0; }
.pt-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.pt-tools input[type=search] { width: 260px; }
.pt-tools select, .pt-tools input[type=month] { width: auto; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-weight: 600; font-size: .8rem; color: var(--muted); padding: .65rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .6rem .8rem; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:first-child td { border-top: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.inactive td { opacity: .5; }
.tbl tr.total td { font-weight: 600; background: var(--bg); }
.flag { display: inline-block; font-size: .75rem; font-weight: 600; padding: .05rem .45rem; border-radius: 5px; margin: 0 .3rem .2rem 0; }
.flag.late { color: var(--late); background: color-mix(in srgb, var(--late) 12%, transparent); }
.flag.issue { color: var(--parity); background: color-mix(in srgb, var(--parity) 14%, transparent); }
.rate { font-weight: 700; }
.rate.good { color: var(--good); } .rate.warn { color: var(--warn); } .rate.bad { color: var(--late); }
.scoreboard td { vertical-align: middle; }
.back { display: inline-block; margin-bottom: .8rem; color: var(--muted); text-decoration: none; }
.hotel-head { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: 1.5rem; align-items: start; margin-bottom: .8rem; }
.hh-meta { display: flex; gap: .3rem 1rem; flex-wrap: wrap; color: var(--muted); margin: .4rem 0; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; }
.kpis div { background: var(--surface); padding: .6rem .8rem; }
.kpis dt { font-size: .76rem; color: var(--muted); }
.kpis dd { margin: 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.note-form { display: grid; gap: .5rem; justify-items: end; margin-bottom: 1rem; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.notes li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.n-head { display: flex; gap: .7rem; align-items: center; font-size: .8rem; color: var(--muted); }
.n-head .link-btn { margin-left: auto; }
.notes p { margin: .35rem 0 0; white-space: normal; overflow-wrap: anywhere; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.plain li { display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.plain li .sub { flex-basis: 100%; }
.chart-box { height: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem 1.25rem; margin-bottom: 1.5rem; }
.panel h2 { margin-top: 0; }
.flash { margin-bottom: 1.25rem; }

/* dialog */
#dlg { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 2rem)); background: var(--surface); color: var(--ink); }
#dlg::backdrop { background: rgb(10 25 30 / .45); }
.dlg-form { padding: 1.2rem 1.25rem; display: grid; gap: .8rem; }
.dlg-form h3 { font-size: 1.05rem; }
#dlg-body { display: grid; gap: .7rem; }
#dlg-body label { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
#dlg-body .radio { display: flex; gap: 1rem; }
#dlg-body .radio label { display: flex; gap: .35rem; align-items: center; color: var(--ink); font-size: .95rem; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.dlg-err { color: var(--late); margin: 0; font-size: .9rem; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; font-size: .9rem; z-index: 50; }

@media (max-width: 860px) {
  .day-head { grid-template-columns: 1fr; }
  .hotel-head, .cols { grid-template-columns: 1fr; }
  .cols { gap: 0; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: .4rem .8rem; padding: .5rem 1rem; }
  .brand span { display: none; }
  .mainnav { order: 3; flex-basis: 100%; }
  .me { margin-left: auto; }
  .wrap { padding: 1rem 1rem 3rem; }
  .dh-progress { grid-template-columns: repeat(3, 1fr); gap: .35rem; }
  .prog { padding: .5rem .55rem; }
  .prog-num { font-size: 1.25rem; }
  .task { grid-template-columns: auto 1fr; }
  .t-acts { grid-column: 2; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .pt-tools input[type=search] { width: 100%; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .tabs { display: flex; overflow-x: auto; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* potential score */
.lvl { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.4rem; padding: 0 .35rem; border-radius: 6px; font-size: .78rem; font-weight: 700; }
.lvl-a { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.lvl-b { background: color-mix(in srgb, var(--report) 16%, transparent); color: var(--report); }
.lvl-c { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.lvl-x { color: var(--muted); }
.score-card { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; min-width: 260px; justify-self: end; }
.sc-num { font-size: 2.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--brand); }
.sc-num small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.sc-side { display: grid; gap: .25rem; justify-items: start; font-size: .85rem; color: var(--muted); }
.sc-bar { grid-column: 1 / -1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: .5rem; }
.sc-bar i { display: block; height: 100%; background: var(--brand); }
@media (max-width: 860px) { .score-card { justify-self: stretch; } }

/* v2: panel */
.me-link { display: flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; padding: .3rem .5rem; border-radius: 8px; }
.me-link[aria-current], .me-link:hover { background: var(--bg); }
.home-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.home-head p { margin: 0 0 .2rem; }
.home-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.field-status { color: var(--muted); margin: 0; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.person-card { display: grid; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius); padding: .8rem 1rem; color: var(--ink); text-decoration: none; }
.person-card:hover { border-color: var(--c); }
.pc-head { display: flex; justify-content: space-between; align-items: center; }
.pc-head .pchip { font-weight: 600; font-size: .95rem; }
.pc-state { font-size: .78rem; color: var(--muted); }
.pc-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.pc-c b { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pc-c b small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.pc-c span { font-size: .72rem; color: var(--muted); }
.c-visit b { color: var(--visit); } .c-report b { color: var(--report); } .c-parity b { color: var(--parity); }
.pc-visits { margin: 0; font-size: .82rem; color: var(--muted); }
.home-cols h2:first-child { margin-top: 1.6rem; }
.h-link { font-size: .8rem; font-weight: 500; margin-left: .5rem; }
.small-empty { padding: 1.2rem; text-align: left; }
.alerts { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.alerts li { display: grid; gap: .15rem; padding: .65rem .9rem; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.alerts li:first-child { border-top: 0; }
.alerts li.al-high { border-left-color: var(--late); }
.alerts li.al-mid { border-left-color: var(--warn); }
.alerts li b { font-weight: 600; margin-right: .4rem; }
.alerts li a { font-weight: 500; }
.month-bars { display: grid; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.mb-top { display: flex; align-items: center; gap: .6rem; }
.mb-top b { margin-left: auto; }
.mb-bar { position: relative; height: 8px; background: var(--line); border-radius: 4px; margin: .35rem 0; }
.mb-bar i { display: block; height: 100%; border-radius: 4px; }
.mb-bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; }
.mb-types { display: flex; gap: .9rem; flex-wrap: wrap; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.feed li { display: flex; flex-wrap: wrap; gap: .35rem; align-items: baseline; font-size: .9rem; }
.feed time { margin-left: auto; }

/* calendar */
.legend { margin: -.2rem 0 1rem; }
.lg { display: inline-grid; place-items: center; min-width: 1.15rem; padding: 0 .25rem; height: 1.15rem; border-radius: 4px; font-size: .7rem; font-weight: 700; color: #fff; margin-right: .15rem; }
.lg-visit { background: var(--visit); } .lg-report { background: var(--report); } .lg-parity { background: var(--parity); }
.board { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 860px; }
.board th, .board td { border: 1px solid var(--line); padding: .5rem; vertical-align: top; text-align: left; }
.board thead th { font-size: .85rem; background: var(--surface); }
.board thead th a { color: var(--ink); text-decoration: none; font-weight: 600; }
.b-sub { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); }
.board .b-person { width: 110px; background: var(--surface); }
.board td { background: var(--surface); }
.board .off { background: var(--bg); }
.board .is-today { box-shadow: inset 0 3px 0 var(--brand); }
.b-visit { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); text-decoration: none; padding: .3rem .45rem; margin-bottom: .3rem; border-radius: 6px; background: color-mix(in srgb, var(--visit) 12%, transparent); border-left: 3px solid var(--visit); }
.b-visit small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
.b-visit.done { opacity: .55; text-decoration: line-through; }
.b-counts { display: flex; align-items: center; gap: .2rem .3rem; flex-wrap: wrap; font-size: .8rem; font-variant-numeric: tabular-nums; }
.b-counts .lg { margin-left: .2rem; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-h, .cal-row { display: grid; grid-template-columns: .7fr repeat(4, 1fr); }
.cal-h div { padding: .5rem .6rem; font-size: .8rem; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 112px; padding: .45rem .5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .25rem; color: var(--ink); text-decoration: none; }
.cal-cell:hover { background: var(--bg); }
.cal-cell.out { opacity: .4; }
.cal-cell.off { background: var(--bg); }
.cal-cell.is-today .cal-d { background: var(--brand); color: var(--brand-ink); }
.cal-d { font-weight: 700; font-size: .85rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; }
.cal-hol { font-size: .72rem; color: var(--late); }
.cal-empty { font-size: .75rem; color: var(--muted); }
.cal-p { display: flex; align-items: center; gap: .2rem; font-size: .75rem; padding: .15rem .3rem; border-radius: 5px; background: color-mix(in srgb, var(--c) calc(var(--load) * 22%), transparent); }
.cal-p i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.cal-p b { font-weight: 600; margin-right: .15rem; }
.cal-p .lg { min-width: auto; height: 1rem; font-size: .66rem; margin: 0; }
.cal-p .ok { color: var(--good); font-style: normal; font-weight: 700; margin-left: auto; }

/* analytics */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; margin: .5rem 0 .5rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; display: grid; gap: .1rem; }
.tile-l { font-size: .8rem; color: var(--muted); }
.tile-v { font-size: 1.7rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile-s { font-size: .76rem; color: var(--muted); }
.cellbar { display: grid; gap: .2rem; min-width: 110px; }
.cellbar span { font-size: .82rem; font-variant-numeric: tabular-nums; }
.cellbar i { display: block; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.cellbar b { display: block; height: 100%; background: var(--muted); }
.cellbar b.good { background: var(--good); } .cellbar b.warn { background: var(--warn); } .cellbar b.bad { background: var(--late); }
.chart-box.tall { height: 360px; }
.cov { display: grid; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.cov-row { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; }
.cov-bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.cov-bar i { display: block; height: 100%; background: var(--brand); }
#health tr.risk-high td:first-child { box-shadow: inset 3px 0 0 var(--late); }
#health tr.risk-mid td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

/* account & admin */
.copy-row { display: flex; gap: .5rem; margin: .5rem 0; }
.copy-row input { flex: 1; font: inherit; font-size: .8rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-width: 0; }
.steps-list { padding-left: 1.1rem; margin: .5rem 0 1rem; }
.form-sub { font-size: 1rem; margin: .6rem 0 0; }
.danger-zone { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.danger-zone summary { cursor: pointer; color: var(--late); font-weight: 600; }
.btn.danger { background: var(--late); color: #fff; }
@media (max-width: 640px) {
  .cal-h, .cal-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cal-cell { min-height: 90px; padding: .3rem; }
  .cal-p b { display: none; }
}
.cal-cell { min-width: 0; overflow: hidden; } .cal-p { overflow: hidden; white-space: nowrap; }
.changelog pre { white-space: pre-wrap; font: inherit; font-size: .88rem; background: var(--bg); padding: .8rem 1rem; border-radius: 8px; max-height: 340px; overflow: auto; }
.changelog summary { cursor: pointer; font-weight: 600; margin: .4rem 0; }
