/* Auction Clerk. The director view's system: Geist (Geist Mono for lot and
   bidder numbers), black plaque app bar, Dynamic gold as the one accent,
   following the device's light or dark setting. See DESIGN.md. */
:root {
  color-scheme: dark;
  --ground: oklch(0.155 0.004 80);
  --surface: oklch(0.195 0.005 80);
  --surface-2: oklch(0.235 0.006 80);
  --surface-3: oklch(0.285 0.007 80);
  --line: oklch(0.27 0.006 80);
  --line-2: oklch(0.36 0.008 80);
  --ink: oklch(0.955 0.006 85);
  --ink-2: oklch(0.83 0.008 85);
  --muted: oklch(0.70 0.01 85);
  --accent: oklch(0.80 0.12 85);
  --accent-ink: oklch(0.86 0.1 88);
  --btn-bg: oklch(0.80 0.12 85);
  --btn-ink: oklch(0.19 0.02 80);
  --mark: oklch(0.665 0.115 82);
  --mark-track: oklch(0.29 0.03 85);
  --ref: oklch(0.955 0.006 85);
  --tip-bg: oklch(0.955 0.006 85);
  --tip-ink: oklch(0.17 0.005 80);
  --good: oklch(0.72 0.15 150);
  --warn: oklch(0.77 0.15 62);
  --crit: oklch(0.66 0.19 25);
  --tint: 12%;
  --shadow: none;
  --plaque: oklch(0.13 0.004 80);
  --plaque-ink: oklch(0.955 0.006 85);
  --plaque-ink-2: oklch(0.76 0.01 85);
  --plaque-line: oklch(0.25 0.006 80);
  --gold: oklch(0.80 0.12 85);
  --f-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --z-sticky: 10;
  --z-bar: 20;
  --z-tip: 50;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ground: oklch(0.975 0.002 85); --surface: oklch(1 0 0); --surface-2: oklch(0.965 0.003 85); --surface-3: oklch(0.93 0.004 85);
    --line: oklch(0.915 0.004 85); --line-2: oklch(0.85 0.006 85);
    --ink: oklch(0.2 0.01 80); --ink-2: oklch(0.37 0.012 80); --muted: oklch(0.5 0.012 80);
    --accent: oklch(0.52 0.1 78); --accent-ink: oklch(0.47 0.095 76); --btn-bg: oklch(0.76 0.125 83); --btn-ink: oklch(0.19 0.02 80);
    --mark: oklch(0.655 0.12 80); --mark-track: oklch(0.93 0.035 88); --ref: oklch(0.2 0.01 80);
    --tip-bg: oklch(0.2 0.01 80); --tip-ink: oklch(0.975 0.002 85);
    --good: oklch(0.56 0.15 150); --warn: oklch(0.63 0.15 64); --crit: oklch(0.56 0.2 25);
    --tint: 9%; --shadow: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: oklch(0.975 0.002 85); --surface: oklch(1 0 0); --surface-2: oklch(0.965 0.003 85); --surface-3: oklch(0.93 0.004 85);
  --line: oklch(0.915 0.004 85); --line-2: oklch(0.85 0.006 85);
  --ink: oklch(0.2 0.01 80); --ink-2: oklch(0.37 0.012 80); --muted: oklch(0.5 0.012 80);
  --accent: oklch(0.52 0.1 78); --accent-ink: oklch(0.47 0.095 76); --btn-bg: oklch(0.76 0.125 83); --btn-ink: oklch(0.19 0.02 80);
  --mark: oklch(0.655 0.12 80); --mark-track: oklch(0.93 0.035 88); --ref: oklch(0.2 0.01 80);
  --tip-bg: oklch(0.2 0.01 80); --tip-ink: oklch(0.975 0.002 85);
  --good: oklch(0.56 0.15 150); --warn: oklch(0.63 0.15 64); --crit: oklch(0.56 0.2 25);
  --tint: 9%; --shadow: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }
a { color: inherit; }
img { max-width: 100%; }
b, strong { font-weight: 600; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { padding-bottom: 64px; }

/* App bar: always dark, so the white "D" of the mark reads */
.plaque { background: var(--plaque); color: var(--plaque-ink); border-bottom: 1px solid var(--plaque-line); padding-top: env(safe-area-inset-top, 0px); }
.plaque .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.plaque a.home { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; border-radius: 8px; }
.plaque img { width: 30px; height: 30px; display: block; }
.wordmark { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; color: var(--plaque-ink); }
.wordmark span { color: var(--gold); }
@media (max-width: 520px) { .wordmark span { display: none; } }
@media (max-width: 400px) { .wordmark { display: none; } }
.plaque .right { margin-left: auto; display: flex; align-items: stretch; gap: 4px; align-self: stretch; }
.plaque .right a {
  display: inline-flex; align-items: center; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--plaque-ink-2);
  text-decoration: none; position: relative; transition: color .15s var(--ease);
}
.plaque .right a:hover, .plaque .right a[aria-current="page"] { color: var(--plaque-ink); }
.plaque .right a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--gold); }
.plaque .right a:focus-visible { outline-offset: -4px; border-radius: 8px; }
.plaque form { margin: 0 0 0 8px; display: flex; align-items: center; }
.plaque button {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--plaque-ink-2); background: transparent; border: 1px solid var(--plaque-line);
  border-radius: 8px; padding: 6px 12px; min-height: 34px; cursor: pointer; white-space: nowrap; transition: color .15s var(--ease), border-color .15s var(--ease);
}
.plaque button:hover { color: var(--plaque-ink); border-color: oklch(0.4 0.008 80); }
@media (max-width: 560px) { .plaque .right a { padding: 0 8px; font-size: 13px; } .plaque .right a[aria-current="page"]::after { left: 8px; right: 8px; } .plaque form { margin-left: 4px; } }

/* Messages */
.flash {
  margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--ink); display: flex; gap: 10px; align-items: start;
  background: color-mix(in oklch, var(--good) var(--tint), var(--surface)); border: 1px solid color-mix(in oklch, var(--good) 35%, var(--line));
}
.flash.error { background: color-mix(in oklch, var(--crit) var(--tint), var(--surface)); border-color: color-mix(in oklch, var(--crit) 40%, var(--line)); }
.flash svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.lockbar {
  margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line);
}
.lockbar svg { width: 16px; height: 16px; flex: none; color: var(--muted); }

/* Page heads */
.crumb { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 20px; font-size: 13px; color: var(--muted); }
.crumb a { color: var(--ink-2); text-decoration: none; border-radius: 4px; }
.crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumb i { font-style: normal; color: var(--line-2); }
.pagehead { padding-block: 16px 4px; display: flex; gap: 12px 20px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.pagehead > div { display: grid; gap: 6px; min-width: 0; }
.eyebrow { margin: 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
h1 { font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
h1 .mono { font-size: 0.8em; color: var(--muted); font-weight: 500; margin-right: 10px; }
.lede { font-size: 15px; color: var(--ink-2); margin: 2px 0 0; max-width: 70ch; text-wrap: pretty; }
.idchip { font-family: var(--f-mono); font-size: 12.5px; font-weight: 500; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 2px 10px 2px 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.live::before { background: var(--good); box-shadow: 0 0 0 3px color-mix(in oklch, var(--good) 25%, transparent); }
.pill.done::before { background: var(--ink-2); }

/* Section tabs (one page each) */
.tabs {
  position: sticky; top: 0; z-index: var(--z-sticky); display: flex; gap: 2px; margin-top: 14px;
  background: color-mix(in oklch, var(--ground) 92%, transparent); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 12px; min-height: 48px; position: relative; white-space: nowrap; transition: color .15s var(--ease);
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.tabs a:focus-visible { outline-offset: -6px; border-radius: 10px; }
.tabs .badge { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.panel { padding-top: 24px; }

/* Headline numbers */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 24px; box-shadow: var(--shadow); }
@media (min-width: 820px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
@media (min-width: 640px) { .kpis.six { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1120px) { .kpis.six { grid-template-columns: repeat(6, 1fr); } }
.kpi { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); background: var(--surface); padding: 16px 20px 18px; display: grid; gap: 4px; align-content: start; min-width: 0; text-decoration: none; color: inherit; }
a.kpi { transition: background-color .15s var(--ease); }
a.kpi:hover { background: var(--surface-2); }
.kpi .k { font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi .v { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .d { font-size: 13px; color: var(--ink-2); }

/* Sections and cards */
.sec { display: grid; gap: 2px; margin: 36px 0 14px; }
.panel > .sec:first-child { margin-top: 0; }
.sec h2 { font-weight: 600; font-size: 19px; letter-spacing: -0.01em; margin: 0; line-height: 1.25; }
.sec .note { font-size: 13px; color: var(--muted); max-width: 84ch; margin: 0; }
.sec-row { display: flex; gap: 12px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid2.wide-left { grid-template-columns: 1.4fr 1fr; } }
.grid2 + .grid2 { margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; box-shadow: var(--shadow); }
.card h3 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
.card .sub { font-size: 13px; color: var(--muted); margin: 4px 0 16px; max-width: 64ch; text-wrap: pretty; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.none-yet { color: var(--muted); font-size: 14px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: 12px; padding: 16px 18px; margin: 0; }
.none-yet a { color: var(--accent-ink); }

/* Needs attention */
.alist { display: grid; margin: 4px -20px -20px; }
.alist .it { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; align-items: start; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 14px; }
.alist .it svg { width: 16px; height: 16px; display: block; margin-top: 2px; }
.alist .it a { color: var(--accent-ink); font-size: 13px; font-weight: 500; white-space: nowrap; text-underline-offset: 3px; }
.alist .ok { padding: 14px 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; }
.alist .ok svg { width: 16px; height: 16px; }

/* Charts */
.meter { display: grid; gap: 8px; }
.meter .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.meter .top b { color: var(--ink); font-variant-numeric: tabular-nums; }
.meter .trk { height: 12px; border-radius: 4px; background: var(--mark-track); overflow: hidden; display: flex; gap: 2px; }
.meter .trk div { height: 100%; background: var(--mark); border-radius: 0 4px 4px 0; min-width: 0; }
.mlist { display: grid; gap: 8px; margin: 16px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--line); }
.mlist li { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 14px; color: var(--ink-2); }
.mlist li b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.mlist li.total { border-top: 1px solid var(--line); padding-top: 8px; color: var(--ink); font-weight: 600; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin: 0 0 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 8px; border-radius: 0 2px 2px 0; background: var(--mark); display: inline-block; }
.sw.track { background: var(--mark-track); border: 1px solid var(--line-2); }
.sw.tick { width: 2px; height: 12px; border-radius: 1px; background: var(--ref); }
.lotchart { position: relative; height: 200px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line-2); padding-top: 18px; }
.lotchart .c { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; align-items: flex-end; position: relative; outline: none; cursor: default; }
.lotchart .c .b { width: 100%; background: var(--mark); border-radius: 4px 4px 0 0; min-height: 0; transition: filter .15s var(--ease); }
.lotchart .c.unsold .b { background: transparent; }
.lotchart .c .t { position: absolute; left: -1px; right: -1px; height: 2px; background: var(--ref); border-radius: 1px; box-shadow: 0 0 0 1px var(--surface); }
.lotchart .c:hover .b, .lotchart .c:focus-visible .b { filter: brightness(1.15); }
.lotchart .c:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 3px; }
.lotchart .ymax { position: absolute; top: -2px; left: 0; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lotaxis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; font-family: var(--f-mono); }
.bars { display: grid; gap: 12px; }
.brow { display: grid; gap: 5px; padding: 2px 0; border-radius: 6px; outline: none; cursor: default; text-decoration: none; color: inherit; }
.brow:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.brow .bl { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--ink-2); min-width: 0; }
.brow .bl .n { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.brow .bl .n i { font-style: normal; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); margin-right: 7px; }
.brow .bl .m { font-size: 12px; color: var(--muted); white-space: nowrap; margin-left: auto; }
.track { position: relative; height: 10px; margin-right: 84px; }
.fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--mark); border-radius: 0 4px 4px 0; min-width: 2px; transition: filter .15s var(--ease); }
.brow:hover .fill, .brow:focus-visible .fill { filter: brightness(1.12); }
.val { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1; }
#tip { position: fixed; z-index: var(--z-tip); pointer-events: none; background: var(--tip-bg); color: var(--tip-ink); border-radius: 8px; padding: 8px 11px; font-size: 13px; line-height: 1.4; max-width: 300px; box-shadow: 0 4px 12px oklch(0 0 0 / 0.22); }
#tip .tv { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
#tip .tl2 { opacity: .82; }

/* Tables */
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12.5px; font-weight: 500; color: var(--muted); background: var(--surface); white-space: nowrap; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.c, th.c { text-align: center; }
td.lot, td.bno { font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
td a.rowlink { color: var(--ink); text-decoration: none; font-weight: 500; }
td a.rowlink:hover { text-decoration: underline; text-underline-offset: 3px; }
tbody tr:hover td { background: color-mix(in oklch, var(--surface-2) 60%, var(--surface)); }
tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); border-bottom: 0; font-variant-numeric: tabular-nums; }
td .sub2 { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.st { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; color: var(--ink-2); font-size: 13.5px; }
.st svg { width: 14px; height: 14px; flex: none; }
.dim { color: var(--muted); }

/* Filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg a {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); background: none; border: 0; border-radius: 7px; text-decoration: none;
  padding: 0 12px; min-height: 34px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.seg button:hover, .seg a:hover { color: var(--ink); }
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px oklch(0 0 0 / 0.18); }
:root:not([data-theme="light"]) .seg [aria-pressed="true"], :root:not([data-theme="light"]) .seg [aria-current="true"] { background: var(--surface-3); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .seg [aria-pressed="true"], :root:not([data-theme="dark"]) .seg [aria-current="true"] { background: var(--surface); } }
.seg .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.search { flex: 1 1 220px; min-width: 0; position: relative; }
.search::before { content: ""; position: absolute; left: 13px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border: 1.6px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search::after { content: ""; position: absolute; left: 24px; top: 50%; width: 5px; height: 1.6px; margin-top: 4px; background: var(--muted); transform: rotate(45deg); pointer-events: none; }
.search input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px 0 38px; min-height: 42px; }
.search input::placeholder { color: var(--muted); }
.count { font-size: 13px; color: var(--muted); margin: 0 0 10px; }

/* Buttons */
.button, button.primary, a.secondary, button.secondary, button.small, a.small {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), filter .15s var(--ease);
}
.button, button.primary { font-size: 14px; padding: 0 18px; min-height: 42px; background: var(--btn-bg); color: var(--btn-ink); border: 0; }
.button:hover, button.primary:hover { filter: brightness(1.06); }
.button:active, button.primary:active { filter: brightness(0.95); }
a.secondary, button.secondary { font-size: 14px; padding: 0 16px; min-height: 42px; color: var(--ink); border: 1px solid var(--line-2); background: var(--surface); }
a.secondary:hover, button.secondary:hover { background: var(--surface-2); }
button.small, a.small { font-size: 13px; font-weight: 500; padding: 0 12px; min-height: 34px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); }
button.small:hover, a.small:hover { background: var(--surface-2); color: var(--ink); }
button.danger, a.danger { color: var(--crit); }
button.danger:hover { background: color-mix(in oklch, var(--crit) var(--tint), var(--surface)); border-color: color-mix(in oklch, var(--crit) 40%, var(--line-2)); }
button:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.linkbtn { font: inherit; font-size: 13px; font-weight: 500; color: var(--accent-ink); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: none; white-space: nowrap; border-radius: 6px; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.right { justify-content: flex-end; }
.row-actions { display: flex; gap: 4px 12px; justify-content: flex-end; flex-wrap: nowrap; }
.tbl > table { min-width: 720px; }
.tbl > table.wide { min-width: 1120px; }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 20px; display: grid; gap: 18px; box-shadow: var(--shadow); }
.form-card + .form-card { margin-top: 16px; }
.form-card.narrow { max-width: 520px; }
.form-card h3, .form-card .h3 { font-size: 17px; font-weight: 600; margin: 0; }
.form-card .sub { font-size: 13px; color: var(--muted); margin: -10px 0 0; max-width: 80ch; }
.fields { display: grid; gap: 16px 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .fields { grid-template-columns: 1fr 1fr; } .fields.three { grid-template-columns: repeat(3, 1fr); } .fields.four { grid-template-columns: repeat(4, 1fr); } .field.wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); align-content: start; min-width: 0; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date], .field input[type=number],
.field input:not([type]), .field select, .field textarea, .login input {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: var(--ground); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 0 12px; min-height: 44px; width: 100%; min-width: 0; transition: border-color .15s var(--ease);
}
.field textarea { padding: 10px 12px; resize: vertical; line-height: 1.45; min-height: 88px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field.check { grid-template-columns: auto 1fr; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); min-height: 44px; font-weight: 400; }
.field.check input { width: 20px; height: 20px; accent-color: var(--mark); margin: 0; }
.field .hint, .hint { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.field input.money, .field input.num { font-variant-numeric: tabular-nums; }
.error-box { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--ink); background: color-mix(in oklch, var(--crit) var(--tint), var(--surface)); border: 1px solid color-mix(in oklch, var(--crit) 40%, var(--line)); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 4px; }
details.more { border-top: 1px solid var(--line); padding-top: 14px; }
details.more summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 32px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; width: 18px; height: 18px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: 5px; font-size: 13px; color: var(--muted); }
details.more[open] summary::before { content: "\2212"; }
details.more > *:not(summary) { margin-top: 14px; }
.drop { display: grid; gap: 4px; justify-items: start; padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--ground); }
.drop input[type=file] { margin-top: 8px; font: inherit; font-size: 13px; color: var(--ink-2); max-width: 100%; }
.drop-t { font-size: 15px; font-weight: 600; }
.drop-s { font-size: 13px; color: var(--muted); }

/* Auction list */
.alist2 { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
a.arow { text-decoration: none; padding: 16px 20px; display: grid; gap: 6px 24px; grid-template-columns: 64px 1fr auto; align-items: center; border-top: 1px solid var(--line); transition: background-color .15s var(--ease); }
a.arow:first-child { border-top: 0; }
a.arow:hover { background: var(--surface-2); }
.arow .when { text-align: center; background: var(--surface-2); border-radius: 8px; padding: 6px 0 5px; }
a.arow:hover .when { background: var(--surface-3); }
.arow .when b { display: block; font-size: 20px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.arow .when span { font-size: 12px; font-weight: 500; color: var(--accent-ink); }
.arow .nm { font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.arow .nm .mono { color: var(--muted); font-weight: 500; margin-right: 8px; }
.arow .in { font-size: 13px; color: var(--muted); display: flex; gap: 4px 14px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
.arow .fig { text-align: right; }
.arow .fig .fv { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.arow .fig .fk { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 600px) { a.arow { grid-template-columns: 56px 1fr; } .arow .fig { grid-column: 2; text-align: left; } }

/* Lots grid */
.grid-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.grid-wrap .tbl { max-height: calc(100vh - 170px); overflow: auto; }
table.grid { min-width: 980px; font-size: 14px; }
table.grid th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
table.grid td { padding: 4px 6px; }
table.grid td:first-child, table.grid th:first-child { padding-left: 14px; width: 34px; }
table.grid input[type=text] {
  font: inherit; font-size: 14px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 7px;
  padding: 0 8px; min-height: 34px; width: 100%; min-width: 0;
}
table.grid input[type=text]:hover { border-color: var(--line-2); }
table.grid input[type=text]:focus { background: var(--ground); border-color: var(--accent); outline: none; }
table.grid input.money, table.grid input.pc { text-align: right; font-variant-numeric: tabular-nums; }
table.grid input.lotno { font-family: var(--f-mono); font-size: 13px; width: 68px; }
table.grid select { font: inherit; font-size: 13.5px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 7px; min-height: 34px; padding: 0 4px; max-width: 170px; }
table.grid select:hover { border-color: var(--line-2); }
table.grid input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--mark); margin: 0; vertical-align: middle; }
table.grid tr.dirty td { background: color-mix(in oklch, var(--accent) 9%, var(--surface)); }
table.grid tr.bad td { background: color-mix(in srgb, var(--crit) 20%, var(--surface)); }

table.grid tr.sel td { background: color-mix(in oklch, var(--accent) 5%, var(--surface-2)); }
table.grid td.res { font-size: 13.5px; white-space: nowrap; color: var(--ink-2); }
table.grid td.res b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
table.grid .w-title { min-width: 280px; }
table.grid .w-money { width: 120px; }
table.grid .w-pc { width: 74px; }
.savebar, .bulkbar {
  position: sticky; bottom: 12px; z-index: var(--z-bar); margin-top: 12px; display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap;
  background: var(--plaque); color: var(--plaque-ink); border-radius: 12px; padding: 10px 12px 10px 16px; box-shadow: 0 8px 24px oklch(0 0 0 / 0.28);
  font-size: 14px;
}
.savebar .msg, .bulkbar .msg { margin-right: auto; }
.bulkbar select, .bulkbar input { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; min-height: 36px; padding: 0 8px; }
.bulkbar input { width: 110px; }
.bulkbar button.small, .savebar button.small { background: transparent; color: var(--plaque-ink); border-color: var(--plaque-line); }
.bulkbar button.small:hover, .savebar button.small:hover { background: oklch(0.22 0.005 80); }
.bulkbar .grp { display: inline-flex; gap: 6px; align-items: center; }
.bulkbar .grp label { color: var(--plaque-ink-2); font-size: 13px; }

/* Clerk desk */
.desk { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 1000px) { .desk { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.entry .inputs { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .entry .inputs { grid-template-columns: 0.8fr 1fr 1.3fr; } }
.entry label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.entry input {
  font: inherit; font-size: 30px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); background: var(--ground); border: 1.5px solid var(--line-2);
  border-radius: 12px; padding: 0 14px; min-height: 64px; width: 100%; min-width: 0; font-variant-numeric: tabular-nums;
}
.entry input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent); }
.entry input#f-lot, .entry input#f-bidder { font-family: var(--f-mono); }
.lotcard { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; min-height: 72px; }
.lotcard .t { font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.lotcard .t .mono { color: var(--muted); margin-right: 8px; font-weight: 500; }
.lotcard .m { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 4px 14px; flex-wrap: wrap; }
.lotcard.warn { background: color-mix(in oklch, var(--warn) calc(var(--tint) + 4%), var(--surface)); }
.who { font-size: 14px; color: var(--ink-2); min-height: 21px; }
.who.new { color: var(--warn); }
.entry .btns { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.entry .btns button { min-height: 56px; font-size: 16px; }
.entry .kbd { font-size: 12.5px; color: var(--muted); }
kbd { font-family: var(--f-mono); font-size: 11.5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); color: var(--ink-2); }
.netbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 14px; background: var(--surface-2); color: var(--ink-2); }
.netbar::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--good); flex: none; }
.netbar.wait::before { background: var(--warn); }
.netbar.bad { background: color-mix(in oklch, var(--crit) var(--tint), var(--surface)); color: var(--ink); }
.netbar.bad::before { background: var(--crit); }
.recent { list-style: none; margin: 0; padding: 0; display: grid; }
.recent li { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.recent li:first-child { border-top: 0; }
.recent .ln { font-family: var(--f-mono); color: var(--muted); font-size: 13px; }
.recent .tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .tt small { display: block; color: var(--muted); font-size: 12.5px; }
.recent .am { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recent .sy svg { width: 15px; height: 15px; display: block; }
.recent li.failed { color: var(--crit); }
.upnext { display: flex; gap: 6px; flex-wrap: wrap; }
.upnext button { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; font-family: var(--f-mono); }
.upnext button:hover { background: var(--surface-2); color: var(--ink); }
.quick { display: grid; gap: 10px; grid-template-columns: 90px 1fr 1fr 110px auto; align-items: end; }
.quick input { font: inherit; font-size: 15px; color: var(--ink); background: var(--ground); border: 1px solid var(--line-2); border-radius: 8px; min-height: 40px; padding: 0 10px; width: 100%; min-width: 0; }
.quick label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
@media (max-width: 720px) { .quick { grid-template-columns: 1fr 1fr; } }

/* Bidder account and import preview */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); margin: 0; }
.facts div { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); padding: 12px 16px; display: grid; gap: 2px; }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 6px; white-space: nowrap; }
.chip svg { width: 14px; height: 14px; flex: none; }
.problems { margin: 0; padding: 12px 16px 12px 34px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); background: color-mix(in oklch, var(--warn) var(--tint), var(--surface)); border: 1px solid color-mix(in oklch, var(--warn) 35%, var(--line)); display: grid; gap: 4px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.history li { display: grid; grid-template-columns: 120px minmax(120px, 220px) 1fr; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.history li:first-child { border-top: 0; }
.history .when { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.history .who2 { font-weight: 500; color: var(--ink-2); overflow-wrap: anywhere; font-size: 13px; }
.history .what { color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 640px) { .history li { grid-template-columns: 1fr; gap: 2px; } }
.shown { background: color-mix(in oklch, var(--good) var(--tint), var(--surface)); border-color: color-mix(in oklch, var(--good) 35%, var(--line)); }
.shown .pw { font-family: var(--f-mono); font-size: 22px; letter-spacing: 0.02em; color: var(--ink); user-select: all; overflow-wrap: anywhere; }
.recon { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.recon li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.recon li:first-child { border-top: 0; }
.recon li b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.recon li.sum { border-top: 1.5px solid var(--line-2); color: var(--ink); font-weight: 600; }
.recon li.sub { padding-left: 14px; font-size: 13.5px; }
.recon li .note2 { display: block; font-size: 12.5px; color: var(--muted); }
.check-ok, .check-bad { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 13.5px; }
.check-ok svg, .check-bad svg { width: 16px; height: 16px; }

/* Sign in */
.login { min-height: calc(100vh - 140px); display: grid; place-items: center; padding-block: 40px; }
.login form { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.login .brand { display: flex; align-items: center; gap: 10px; }
.login .brand img { width: 36px; height: 36px; border-radius: 8px; background: var(--plaque); padding: 3px; }
.login h1 { font-size: 24px; }
.login p { margin: 0; color: var(--muted); font-size: 14px; }
.login label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.login button { font: inherit; font-weight: 600; font-size: 15px; color: var(--btn-ink); background: var(--btn-bg); border: 0; border-radius: 10px; min-height: 46px; cursor: pointer; margin-top: 4px; }

footer.foot { margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
