/* Rising Maple super admin: one shell, one card, one table, drawn the same on every page.
   Colours are roles on :root; dark mode picks its own values rather than flipping them. */
@font-face { font-family: Inter; src: url(/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --ink: #111c2e; --soft: #55637a; --faint: #7c8aa0; --line: #e4e9f0; --line-strong: #d3dae4;
  --paper: #f5f7fa; --card: #fff; --tile: #f3f5f9; --hover: #f7f9fc;
  --accent: #1f6bc9; --accent-hover: #1858a8; --accent-soft: #e6f0fb; --accent-ink: #15559f;
  --series: #2a78d6; --series-hover: #1858a8;
  --green: #17693d; --green-soft: #e4f4ea; --red: #b42318; --red-soft: #fdeeec; --red-line: #f5c6c0;
  --amber: #875400; --amber-soft: #fdf3dc; --amber-line: #f0d9a2;
  --shadow: 0 1px 2px rgba(17, 28, 46, .05), 0 1px 3px rgba(17, 28, 46, .04);
  --side-bg: #0e1a2b; --side-ink: #aebbcd; --side-head: #6f7f96; --side-hover: #18273c; --side-on: #20344f; --side-line: #1d2c42;
  --side: 248px; --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --ink: #e9edf3; --soft: #a3afc0; --faint: #7f8ca0; --line: #26303f; --line-strong: #344052;
    --paper: #0d131c; --card: #151d29; --tile: #1c2634; --hover: #1a2432;
    --accent: #3a86e0; --accent-hover: #5597e6; --accent-soft: #1b2e47; --accent-ink: #8ebcf2;
    --series: #3987e5; --series-hover: #6aa6ec;
    --green: #6fd19a; --green-soft: #15301f; --red: #f59a90; --red-soft: #351a18; --red-line: #5c2a26;
    --amber: #eec26a; --amber-soft: #33270f; --amber-line: #574117;
    --shadow: none; --side-bg: #0a1018; --side-hover: #141d2a; --side-on: #1c2a3d; --side-line: #1b2533;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9edf3; --soft: #a3afc0; --faint: #7f8ca0; --line: #26303f; --line-strong: #344052;
  --paper: #0d131c; --card: #151d29; --tile: #1c2634; --hover: #1a2432;
  --accent: #3a86e0; --accent-hover: #5597e6; --accent-soft: #1b2e47; --accent-ink: #8ebcf2;
  --series: #3987e5; --series-hover: #6aa6ec;
  --green: #6fd19a; --green-soft: #15301f; --red: #f59a90; --red-soft: #351a18; --red-line: #5c2a26;
  --amber: #eec26a; --amber-soft: #33270f; --amber-line: #574117;
  --shadow: none; --side-bg: #0a1018; --side-hover: #141d2a; --side-on: #1c2a3d; --side-line: #1b2533;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-feature-settings: "cv11", "ss03"; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- shell ---- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; gap: 11px; align-items: center; padding: 16px 16px 14px; color: #fff; font-weight: 650; font-size: 15px; line-height: 1.2; letter-spacing: -.01em; }
.brand img { border-radius: 9px; display: block; }
.brand span { display: block; color: var(--side-head); font-weight: 500; font-size: 12px; letter-spacing: 0; margin-top: 2px; }
.side nav { flex: 1; overflow-y: auto; padding: 2px 10px 12px; scrollbar-width: thin; scrollbar-color: var(--side-on) transparent; }
.side nav h4 { margin: 18px 10px 5px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--side-head); }
.side nav h4:first-child { margin-top: 6px; }
.side nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; color: inherit; padding: 7px 10px; border-radius: 8px; font-weight: 500; font-size: 13.5px; cursor: pointer; margin-bottom: 1px; }
.side nav button:hover { background: var(--side-hover); color: #fff; }
.side nav button.on { background: var(--side-on); color: #fff; box-shadow: inset 2px 0 0 #6fb1f5; }
.side nav button:focus-visible { outline-color: #8ebcf2; outline-offset: -2px; }
.side-foot { margin: 0; padding: 12px 18px 16px; border-top: 1px solid var(--side-line); font-size: 11.5px; line-height: 1.45; color: var(--side-head); }
.shell { margin-left: var(--side); min-height: 100%; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 28px; background: var(--card); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 13.5px; white-space: nowrap; }
.crumbs span { color: var(--faint); } .crumbs span:empty { display: none; }
.crumbs span::after { content: "/"; margin-left: 8px; color: var(--line-strong); }
.crumbs b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.envpill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--green); background: var(--green-soft); padding: 3px 10px; border-radius: 999px; margin-right: 6px; }
.envpill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--soft); cursor: pointer; }
.iconbtn:hover { background: var(--tile); color: var(--ink); }
.iconbtn .ic { width: 18px; height: 18px; }
.menu { display: none; margin-left: -6px; }
.me { display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; font-size: 13px; color: var(--soft); min-width: 0; }
.me-email { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 650; text-transform: uppercase; }
.avatar.big { width: 52px; height: 52px; font-size: 21px; }
.scrim { position: fixed; inset: 0; background: rgba(8, 14, 24, .5); z-index: 20; }
main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 26px 28px 56px; }
body.signedout .side, body.signedout .shell { display: none; }
body:not(.signedout) .login { display: none; }
@media (max-width: 960px) {
  .side { transform: translateX(-100%); transition: transform .18s ease; width: min(82vw, 280px); }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(8, 14, 24, .4); }
  .shell { margin-left: 0; } .menu { display: inline-flex; }
  .topbar { padding: 0 16px; } main { padding: 18px 16px 40px; }
  .crumbs span, .me-email, .envpill { display: none; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } .skel { animation: none !important; } }

/* ---- sign-in ---- */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.login-brand { background: var(--side-bg); color: #c3cedc; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-brand img { border-radius: 14px; display: block; }
.login-brand h2 { color: #fff; font-size: 32px; line-height: 1.18; font-weight: 650; letter-spacing: -.022em; margin: 0 0 12px; max-width: 13em; }
.login-brand p { margin: 0; font-size: 15px; max-width: 30em; }
.login-brand ul { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--side-line); font-size: 13px; color: #8a99ae; }
.login-brand li { padding: 3px 0; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--card); }
.login-inner { width: 100%; max-width: 360px; }
.login-inner h1 { font-size: 24px; } .login-inner label { margin: 14px 0; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google { display: flex; justify-content: center; min-height: 44px; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .login-brand { padding: 24px 20px; gap: 16px; } .login-brand h2 { font-size: 22px; } .login-brand ul { display: none; } }

/* ---- page parts ---- */
.head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 650; letter-spacing: -.018em; margin: 0; }
.head p { margin: 3px 0 0; color: var(--soft); font-size: 13.5px; max-width: 72ch; }
.head .row { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0; }
.card > h2 { font-size: 14px; font-weight: 600; letter-spacing: -.005em; margin: 0 0 12px; }
.card > h2 + .sub { margin: -9px 0 12px; }
.card.flush { padding: 0; overflow: hidden; } .card.flush > h2 { padding: 16px 20px 0; }
.card.flush > .wrap { margin: 0; } .card.flush th:first-child, .card.flush td:first-child { padding-left: 20px; } .card.flush th:last-child, .card.flush td:last-child { padding-right: 20px; }
.card.flush > .toolbar, .card.flush > .pager, .card.flush > .blank, .card.flush > .pad { margin: 0; padding-left: 20px; padding-right: 20px; }
h3 { font-size: 13.5px; font-weight: 600; margin: 18px 0 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.grid > .card { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.split > .card { margin-bottom: 0; } .side-stack { display: grid; gap: 16px; align-content: start; } .side-stack > .card { margin-bottom: 0; }
@media (max-width: 1120px) { .split { grid-template-columns: minmax(0, 1fr); } }
.sub, .muted { color: var(--soft); font-size: 13px; } p.muted { margin: 6px 0; }
.error { color: var(--red); font-weight: 600; } .ok { color: var(--green); font-weight: 600; }
p.ok:empty, p.error:empty { display: none; }

/* ---- empty and loading ---- */
.blank { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 12px; text-align: center; color: var(--faint); font-size: 13px; }
.blank .ic { width: 22px; height: 22px; }
.skel { background: var(--tile); border-radius: var(--radius); animation: skel 1.3s ease-in-out infinite alternate; }
@keyframes skel { from { opacity: 1; } to { opacity: .45; } }
.skels { display: grid; gap: 16px; } .skels .a { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; } .skels .a .skel { height: 104px; } .skels > .skel { height: 280px; }

/* ---- alerts ---- */
.alert { display: flex; gap: 12px; align-items: center; border-radius: 10px; padding: 11px 14px; margin-bottom: 12px; border: 1px solid; }
.alert.critical { background: var(--red-soft); border-color: var(--red-line); color: var(--red); }
.alert.warning { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); }
.alert .ic { width: 18px; height: 18px; }
.alert div.txt { flex: 1; min-width: 0; } .alert b { display: block; font-size: 13.5px; font-weight: 600; } .alert span { font-size: 13px; }

/* ---- forms ---- */
label { display: block; margin: 10px 0; font-weight: 500; font-size: 13px; color: var(--soft); }
input, select, textarea { display: block; width: 100%; margin-top: 5px; font-weight: 400; font-size: 14px; color: var(--ink); padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--accent); box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.row input { width: auto; flex: 1 1 160px; margin: 0; } .row input.short { flex: 0 0 96px; } .row select { width: auto; margin: 0; }
.row label { margin: 0; } .row input[type="checkbox"] { flex: none; width: 16px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: end; margin: 10px 0 14px; }
.fields label { margin: 0; } .fields .full { grid-column: 1 / -1; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; } .check { display: inline-flex; gap: 7px; align-items: center; margin: 0; color: var(--ink); font-size: 13.5px; font-weight: 400; }
.toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 0; }
.searchbox { position: relative; flex: 1; max-width: 380px; } .searchbox .ic { position: absolute; left: 11px; top: 50%; margin-top: -8px; color: var(--faint); pointer-events: none; }
.searchbox input { margin: 0; padding-left: 34px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; border-top: 1px solid var(--line); }
button.primary, .chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 12px; font-weight: 550; font-size: 13px; line-height: 1.45; cursor: pointer; background: var(--card); color: var(--ink); white-space: nowrap; }
.chip:hover { background: var(--tile); }
button.primary, .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .chip.on:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.primary.wide { width: 100%; padding: 9px 12px; font-size: 14px; }
.chip.danger { background: var(--card); border-color: var(--red-line); color: var(--red); } .chip.danger:hover:not([disabled]) { background: var(--red-soft); }
.chip.link { display: inline; border: 0; background: none; padding: 0; color: var(--accent-ink); font-weight: 550; font-size: inherit; text-align: left; white-space: normal; word-break: break-all; }
.chip.link:hover { background: none; text-decoration: underline; }
button[disabled] { opacity: .5; cursor: default; }
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--tile); border-radius: 9px; }
.seg .chip { border: 0; background: none; color: var(--soft); padding: 4px 11px; border-radius: 7px; }
.seg .chip:hover { color: var(--ink); background: none; }
.seg .chip.on, .seg .chip.on:hover { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(17, 28, 46, .12); }

/* ---- tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--tile); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--soft); min-width: 0; }
.tile .lab { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 500; font-size: 12.5px; }
.tile b { display: block; font-size: 22px; line-height: 1.25; margin-top: 4px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile b.word { font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 1.9; color: var(--soft); }
.tile small { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }
.tile .badge { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.card.kpi { background: none; border: 0; box-shadow: none; padding: 0; }
.card.kpi .tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.card.kpi .tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.card.kpi .tile b { font-size: 27px; margin-top: 6px; } .card.kpi .tile b.word { font-size: 15px; line-height: 2.1; }

/* ---- tables ---- */
.wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; } th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--soft); font-weight: 550; font-size: 12px; }
.card.flush th { background: var(--tile); border-bottom-color: var(--line); }
tbody tr:hover td { background: var(--hover); }
th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
th button::after { content: "\2195"; opacity: .3; font-size: 11px; }
th[aria-sort="ascending"] button::after { content: "\2191"; opacity: 1; }
th[aria-sort="descending"] button::after { content: "\2193"; opacity: 1; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; } th.num button { flex-direction: row-reverse; }
td.wraptext { white-space: normal; min-width: 180px; }
.muted-line { display: block; color: var(--faint); font-size: 12px; }
.who-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* ---- charts: one series, grid and axis recede ---- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .base-line { stroke: var(--line-strong); stroke-width: 1; }
.chart .cross { stroke: var(--line-strong); stroke-width: 1; opacity: 0; }
.chart g.pt:hover .cross, .chart g.pt:focus .cross { opacity: 1; }
.chart text { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .area { fill: var(--series); opacity: .1; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .bar { fill: var(--series); } .chart .hit { fill: transparent; } .chart g.pt { outline: none; }
.chart g.pt:hover .bar, .chart g.pt:focus .bar { fill: var(--series-hover); }
.chart .dot { fill: var(--series); stroke: var(--card); stroke-width: 2; opacity: 0; } .chart g.pt:hover .dot, .chart g.pt:focus .dot { opacity: 1; }
.tip { position: absolute; pointer-events: none; background: #0e1a2b; color: #fff; font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -125%); z-index: 2; box-shadow: 0 4px 12px rgba(8, 14, 24, .25); }
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 36%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 8px; background: var(--tile); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar .fill { display: block; height: 100%; background: var(--series); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .val { font-variant-numeric: tabular-nums; color: var(--soft); min-width: 3ch; text-align: right; }

/* ---- lists and misc ---- */
.list > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.list > div:last-child { border-bottom: 0; padding-bottom: 0; } .list > div:first-child { padding-top: 0; }
.list .val { color: var(--soft); white-space: nowrap; font-size: 13px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 550; padding: 1px 9px; border-radius: 999px; background: var(--tile); color: var(--soft); white-space: nowrap; }
.tag.good { background: var(--green-soft); color: var(--green); } .tag.bad { background: var(--red-soft); color: var(--red); } .tag.warn { background: var(--amber-soft); color: var(--amber); }
.answer { border-top: 1px solid var(--line); padding: 14px 0; } .answer:first-of-type { border-top: 0; padding-top: 0; }
.answer ol { margin: 6px 0; padding-left: 20px; font-size: 13.5px; }
.code { font: 650 20px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; background: var(--tile); border: 1px dashed var(--line-strong); padding: 10px 14px; border-radius: 8px; display: inline-block; margin-top: 10px; user-select: all; }
pre { white-space: pre-wrap; font-size: 12px; color: var(--soft); background: var(--tile); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }

/* ---- two-step sign-in: the code prompt and the set-up card ---- */
dialog.codebox { width: min(380px, calc(100vw - 32px)); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); color: var(--ink); padding: 22px; box-shadow: 0 18px 50px rgba(8, 15, 28, .35); }
dialog.codebox::backdrop { background: rgba(8, 15, 28, .55); }
dialog.codebox h2 { margin: 0 0 6px; font-size: 17px; } dialog.codebox p { margin: 0 0 12px; font-size: 13.5px; }
dialog.codebox input { font: 600 20px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-align: center; height: 46px; margin: 0 0 12px; }
dialog.codebox .row { margin: 0; justify-content: flex-end; }
.qrrow { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin: 10px 0 14px; } .qrrow > div { min-width: 0; flex: 1 1 240px; }
svg.qr { width: 184px; height: 184px; flex: none; border-radius: 8px; border: 1px solid var(--line); }
code.secret { display: block; font: 600 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; margin: 2px 0 10px; }
code.secret.small { font-size: 11.5px; font-weight: 400; letter-spacing: 0; color: var(--soft); }
pre.codes { font-size: 14px; line-height: 1.7; color: var(--ink); columns: 2; max-width: 420px; user-select: all; }

/* ---- one family ---- */
.profile { display: flex; gap: 16px; align-items: center; min-width: 0; }
.profile h2 { font-size: 18px; font-weight: 650; letter-spacing: -.012em; margin: 0; overflow-wrap: anywhere; }
.profile .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--soft); font-size: 13px; margin-top: 3px; }
.card.danger-zone { border-color: var(--red-line); }
.card.danger-zone > h2 { color: var(--red); }
.action-group + .action-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.action-group > h3 { margin-top: 0; }

/* ---- plans and flags ---- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.plan h3 { margin: 0; font-size: 14.5px; } .plan .price { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0 10px; }
.plan .price small { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--soft); }
.flagrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.flagrow:first-of-type { padding-top: 0; } .flagrow:last-of-type { border-bottom: 0; padding-bottom: 0; }
.flagrow b { font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.flagrow p { margin: 4px 0 0; color: var(--soft); font-size: 13px; } .flagrow .row { margin: 0; }
@media (max-width: 720px) { .flagrow { grid-template-columns: 1fr; gap: 8px; } }

/* ---- fine tuning ---- */
input:not([type="checkbox"]), select { height: 38px; }
.who-cell .chip.link { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.card:not(.kpi) .tile .badge { display: none; }
.fields > .chip { height: 38px; }
.card.kpi .tile .lab { min-height: 28px; }
.card.kpi .tiles { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }

/* Support inbox: the open count in the menu, and the conversation */
.side nav button .navcount { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11.5px; font-weight: 650; line-height: 18px; text-align: center; }
.supportmsg { padding: 10px 12px; border-radius: 10px; background: var(--tile); margin-bottom: 10px; }
.supportmsg.owner { background: var(--accent-soft); margin-left: 32px; }
.supportmsg.parent { margin-right: 32px; }
.supportmsg p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.supportmsg small { color: var(--soft); }
