/* WED2B stock count admin. Brand: charcoal #221F20, beige #E1DAD1, sand #C19B80, blush #DDBBA5. */
:root {
    --charcoal: #221F20;
    --beige: #E1DAD1;
    --sand: #C19B80;
    --blush: #DDBBA5;
    --paper: #FAF8F6;
    --line: #E6E0DA;
    --muted: #6E6763;
    --good: #2E7D32;
    --warn: #B26A00;
    --bad: #C62828;
    --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--charcoal); background: var(--paper); }
h1, h2, .brand { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; }
h1 { font-size: 32px; margin: 0 0 4px; }
h2 { font-size: 22px; margin: 28px 0 10px; }
a { color: var(--charcoal); }
.topbar { background: var(--charcoal); color: var(--beige); display: flex; align-items: center; gap: 20px; padding: 0 24px; min-height: 56px; flex-wrap: wrap; }
.brand { font-size: 22px; color: #fff; text-decoration: none; }
.topbar nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: var(--beige); text-decoration: none; padding: 6px 10px; border-radius: var(--radius); white-space: nowrap; font-size: 14px; }
.topbar nav a.active, .topbar nav a:hover { background: rgba(225, 218, 209, .15); color: #fff; }
.topbar .who { font-size: 13px; color: var(--blush); white-space: nowrap; }
.topbar form { margin: 0; }
.topbar .link { background: none; border: 0; color: var(--beige); cursor: pointer; font: inherit; text-decoration: underline; }
main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .value { font-family: "Cormorant Garamond", Georgia, serif; font-size: 36px; font-weight: 600; line-height: 1.1; }
.stat .label { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--beige); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--beige); }
.badge.good { background: #E3F1E4; color: var(--good); }
.badge.bad { background: #FBE4E4; color: var(--bad); }
.badge.warn { background: #FBEEDB; color: var(--warn); }
.btn { display: inline-block; border: 1px solid var(--charcoal); background: var(--charcoal); color: #fff; padding: 8px 16px; border-radius: var(--radius); font: inherit; cursor: pointer; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--charcoal); }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
form.stacked .field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%; max-width: 480px; padding: 8px 10px; border: 1px solid #CFC7BF; border-radius: var(--radius); font: inherit; background: #fff;
}
textarea { min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sand); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.errors, .error { color: var(--bad); }
.errors { background: #FBE4E4; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.status { background: #E3F1E4; color: var(--good); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; }
.setting-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .inherited { color: var(--muted); font-size: 13px; }
.login { max-width: 380px; margin: 10vh auto; }
.login .brand { color: var(--charcoal); font-size: 30px; display: block; margin-bottom: 4px; }
pre.config { background: var(--charcoal); color: var(--beige); padding: 16px; border-radius: var(--radius); overflow: auto; font-size: 12px; }
/* Phase 2: counts, stock and sync. */
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
table.compact th, table.compact td { padding: 6px 12px; font-size: 14px; }
.crumbs { margin: 0; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.toolbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .actions form { margin: 0; }
.stat .of { font-size: 20px; color: var(--muted); }
.stat .value a { text-decoration: none; }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: var(--radius); text-decoration: none; border: 1px solid var(--line); background: #fff; font-size: 14px; }
.tabs a.active { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.tabs a.active .muted { color: var(--blush); }
.filters { margin-bottom: 16px; }
.filters select { width: auto; min-width: 180px; }
.notice { background: #FBEEDB; color: var(--warn); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.pager { display: flex; gap: 16px; justify-content: center; padding: 14px 0; font-size: 14px; }
td.error { font-size: 13px; }
