/* Söluskrá Sérsveitarinnar. One-column app shell; scoreboard rows; the month board shares one package scale with tier ticks. */
/* Light only, by the owner's request. */
:root {
  --bg: #F5F7F9; --surface: #FFFFFF; --surface-2: #EEF2F5; --ink: #18222D; --muted: #5A6875; --line: #DCE3EA;
  --accent: #F7BC0A; --accent-ink: #1F1800; --accent-soft: #FFF4CF;
  --good: #17794E; --good-soft: #E3F4EC; --bad: #BC3A2A; --bad-soft: #FBE9E6; --info: #2158CF;
  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
p { margin: 0; }
h1, h2, .num { font-family: var(--font-display); }
h1 { font-size: 2.1rem; line-height: 1.05; font-weight: 700; letter-spacing: .01em; margin: 0; text-wrap: balance; }
h2 { font-size: 1.2rem; line-height: 1.1; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin: 0; text-wrap: balance; }
.sub { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.hint { font-size: .8125rem; color: var(--muted); }
.sum { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

.app { max-width: 1040px; margin: 0 auto; padding-block: 20px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 18px; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 32px; height: 32px; color: var(--ink); flex: none; }
.brand b { display: block; font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1; }
.brand span { display: block; font-size: .6875rem; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; margin-top: 3px; }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs a { padding: 8px 16px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .875rem; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.userbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; font-size: .8125rem; color: var(--muted); }
.userbar b { color: var(--ink); font-weight: 600; }
.userbar a { color: var(--ink); }
.linkbtn { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

.view, .stack { display: grid; gap: 18px; min-width: 0; align-content: start; }
.vh, .ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.ph { align-items: center; }
.picks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.pick { display: flex; align-items: center; gap: 8px; }
.pick label { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pick select { width: auto; padding: 7px 10px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.panel.narrow { max-width: 26rem; width: 100%; margin: 24px auto 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols.even { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }

.lb { list-style: none; margin: 0; padding: 0; display: grid; }
.lb-row { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) auto; gap: 0 14px; align-items: center; padding: 14px 0 12px; border-top: 1px solid var(--line); }
.lb-row:first-child { border-top: 0; padding-top: 2px; }
.lb-rank { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.5; border-radius: 6px; }
.lb-row.lead .lb-rank { background: var(--accent); color: var(--accent-ink); }
.lb-main { min-width: 0; }
.lb-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.lb-name { font-weight: 600; overflow-wrap: anywhere; }
.you { font-size: .625rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--surface); border-radius: 4px; padding: 1px 6px; }
.tier { display: inline-flex; align-items: center; gap: 4px; font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tier svg { width: 16px; height: 16px; color: var(--ink); flex: none; }
.lb-bar { position: relative; height: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; margin: 8px 0 20px; }
.lb.plain .lb-bar { margin-bottom: 2px; }
.lb-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--accent); border-radius: 2px; }
.lb-tick { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.lb-tick i { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; font-style: normal; font-size: .6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-tick.end i { left: auto; right: 0; transform: none; }
.lb-sub { font-size: .8125rem; color: var(--muted); }
.lb-count { text-align: right; }
.lb-count b { display: block; font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: .95; font-variant-numeric: tabular-nums; }
.lb-count span { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.empty { color: var(--muted); font-size: .875rem; padding: 6px 0; list-style: none; }

.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .875rem; }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed div { min-width: 0; }
.feed b { display: block; font-weight: 600; }
.feed span { display: block; color: var(--muted); overflow-wrap: anywhere; }
.feed time { color: var(--muted); font-size: .8125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.form { gap: 16px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.who { font-size: .875rem; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.who b { color: var(--ink); font-weight: 600; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .legend { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
legend.legend { margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%; min-width: 0; }
input[type="file"] { font: inherit; font-size: .875rem; color: var(--ink); background: var(--surface); border: 1px dashed var(--line); border-radius: 6px; padding: 9px 12px; width: 100%; min-width: 0; }
#tv-link { font-family: var(--font-mono); font-size: .8125rem; }
.field.short { max-width: 16rem; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seg.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 640px) { .seg, .seg.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.seg label { position: relative; display: block; text-align: center; border: 1px solid var(--line); border-radius: 6px; padding: 10px 6px; font-weight: 600; font-size: .875rem; cursor: pointer; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--info); outline-offset: 2px; }
/* A long name wraps to two lines; the short ones beside it stay centred in the taller box. */
.seg label { display: flex; align-items: center; justify-content: center; line-height: 1.25; }
.addons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.addon { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-width: 0; }
.addon .nm { font-weight: 600; font-size: .875rem; }
.step { display: flex; align-items: center; gap: 6px; flex: none; }
.step button { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.step output { min-width: 1.6ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.btn { font: inherit; font-weight: 600; border-radius: 6px; border: 1px solid var(--ink); background: var(--ink); color: var(--surface); padding: 11px 20px; cursor: pointer; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); padding: 5px 10px; font-size: .8125rem; }
.btn.plain { background: transparent; color: var(--ink); border-color: var(--line); }
.msg { font-size: .8125rem; border-radius: 6px; padding: 8px 10px; min-width: 0; overflow-wrap: anywhere; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.warn { background: var(--accent-soft); color: var(--ink); }
.msg.ok { background: var(--good-soft); color: var(--good); }
/* The owner's list of the salespeople's Google Sheets. */
#gs-table input[type="email"] { width: 12rem; padding: 6px 9px; }
#gs-table .inline { flex-wrap: nowrap; gap: 6px; }
#gs-table .msg { margin-top: 4px; max-width: 15rem; }
#gs-table td { vertical-align: top; }
#gs-table .btn { white-space: nowrap; }
.sheet-link { margin: 0; }
/* The link to the privacy page under every screen, and the privacy page itself: plain text, one column. */
.foot { text-align: center; margin-top: 8px; }
.foot a, .doc a { color: inherit; }
.doc { max-width: 44rem; margin: 0 auto; padding: 32px 20px 64px; display: grid; gap: 14px; line-height: 1.6; }
.doc p { margin: 0; }
.doc h2 { margin-top: 14px; }
.doc ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.newver { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; font-size: .875rem; }
.msg code { font-family: var(--font-mono); font-size: .9375rem; font-weight: 600; color: var(--ink); background: var(--surface); border-radius: 4px; padding: 1px 6px; user-select: all; }

.sold { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; margin: 0; }
.sold dt, .sold dd { padding: 7px 0; border-top: 1px solid var(--line); }
.sold dt:first-of-type, .sold dd:first-of-type { border-top: 0; padding-top: 0; }
.sold dt { align-self: center; }
.sold dd { margin: 0; text-align: right; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sold dd.zero { color: var(--muted); font-weight: 500; }
.big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.big .num { font-size: 3rem; font-weight: 700; line-height: .9; font-variant-numeric: tabular-nums; }
.big .unit { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.kv .payable { color: var(--ink); font-weight: 600; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 700px; font-size: .875rem; font-variant-numeric: tabular-nums; }
#ov-sales { min-width: 1240px; }
#users-table { min-width: 620px; }
th { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.r, td.r { text-align: right; }
td.note { white-space: normal; min-width: 11rem; max-width: 17rem; overflow-wrap: anywhere; }
td.acts { display: flex; gap: 6px; justify-content: flex-end; }
tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }
tr.cancelled td, tr.inactive td { color: var(--muted); }
tr.cancelled td.strike { text-decoration: line-through; }
td .tier { vertical-align: middle; }
.pill { display: inline-block; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; }
.pill.on { background: var(--good-soft); color: var(--good); }
.pill.off { background: var(--bad-soft); color: var(--bad); }
.pill.wait { background: var(--accent-soft); color: var(--ink); }
a.btn { display: inline-block; text-decoration: none; }
.invite { display: grid; gap: 10px; background: var(--accent-soft); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.invite p { font-size: .875rem; }
.invite input { font-family: var(--font-mono); font-size: .8125rem; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; cursor: pointer; }
.more { justify-self: start; }

.set-grid { display: grid; gap: 18px; }
.set-block { display: grid; gap: 8px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.inline label { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.inline input[type="number"] { width: 6.5rem; padding: 8px 10px; }
.rates { display: grid; grid-template-columns: auto repeat(3, minmax(0, 8rem)); gap: 6px 8px; align-items: center; font-size: .875rem; }
.rates .hd { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rates input { padding: 8px 10px; }
.modes { display: grid; gap: 6px; }

@media (max-width: 820px) { .cols, .cols.even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .row3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .tabs { width: 100%; overflow-x: auto; }
  .tabs a { flex: 1; text-align: center; padding-inline: 8px; font-size: .8125rem; }
  .userbar { width: 100%; justify-content: space-between; }
  .row2, .addons { grid-template-columns: minmax(0, 1fr); }
  .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-count b { font-size: 2rem; }
  .panel { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
