/* Admin: same "vitrin" palette as the board (velvet green, ivory, gold), tuned for forms.
   Titles use the board's engraved capitals and serif; inputs and the table use the system font for legibility. */
:root {
  --bg: #0C1813; --bg-hi: #15291F; --panel: #12231B; --field: #0A140F;
  --ink: #F4ECDA; --muted: #A99F86;
  --gold: #C9A45C; --gold-hi: #EBD497; --gold-lo: #8E7038;
  --rule: rgba(201, 164, 92, .22); --rule-strong: rgba(201, 164, 92, .45);
  --ok: #6FC48C; --err: #EE7A62;
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --caps: Cinzel, "Cormorant Garamond", Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background: radial-gradient(120% 70% at 50% 0%, var(--bg-hi) 0%, var(--bg) 65%) fixed, var(--bg);
  font-family: var(--ui); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.num { font-variant-numeric: tabular-nums lining-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: clamp(18px, 3vw, 36px); }

h1 {
  margin: 0; font-family: var(--caps); font-weight: 600; font-size: 26px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
  background: linear-gradient(100deg, var(--gold-lo), var(--gold-hi) 35%, var(--gold) 55%, var(--gold-hi) 80%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
h2 {
  margin: 32px 0 10px; padding-bottom: 6px; border-bottom: 3px double var(--gold-lo);
  font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: .01em; color: var(--ink);
}
p.help { margin: 6px 0 16px; color: var(--muted); max-width: 75ch; font-size: 14px; }
.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }

.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 18px; }
label.f {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--caps); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}
input, select {
  font: 15px var(--ui); color: var(--ink); background: var(--field);
  border: 1px solid var(--rule-strong); border-radius: 3px; padding: 7px 9px; min-width: 0;
}
input:hover, select:hover { border-color: var(--gold); }
input[type="checkbox"] { accent-color: var(--gold); width: 18px; height: 18px; }
select option { background: var(--field); color: var(--ink); }

button {
  font: 600 14px var(--ui); letter-spacing: .02em; cursor: pointer; border-radius: 3px;
  border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); padding: 9px 14px;
}
button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-hi); }
button.primary {
  background: linear-gradient(180deg, #D8B66E, #B48C45); border-color: #B48C45; color: #1A140A;
}
button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #E6C680, #C29A50); color: #1A140A; }
button.icon { padding: 4px 9px; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
a { color: var(--gold); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
a:hover { color: var(--gold-hi); border-color: var(--gold-hi); }

.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.priceline { font-size: 16px; color: var(--muted); }
.priceline b { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--ink); }
.status { font-size: 14px; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

.scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); }
table.items { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 1050px; }
.items th {
  text-align: left; vertical-align: bottom; padding: 10px 6px 8px; border-bottom: 1px solid var(--rule-strong);
  font-family: var(--caps); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.items td { padding: 6px; border-bottom: 1px solid var(--rule); }
.items tbody tr:last-child td { border-bottom: 0; }
.items tbody tr:hover td { background: rgba(201, 164, 92, .05); }
.items td input[type="number"] { width: 76px; }
.items td input.name { width: 190px; }
.items td.out { text-align: right; white-space: nowrap; font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--ink); }
.items td.out.buy { color: var(--muted); font-weight: 600; }
.items td.base { text-align: right; white-space: nowrap; color: var(--muted); }
.items td.move { white-space: nowrap; }

.actions {
  position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 14px 0; margin-top: 18px; background: var(--bg); border-top: 3px double var(--gold-lo);
}
.errors { color: var(--err); margin: 8px 0 0; padding-left: 18px; }
.login { max-width: 380px; margin: 12vh auto 0; }
.login h1 { font-size: 22px; margin-bottom: 4px; }
.hidden { display: none !important; }
