:root { --ink: #1c2330; --muted: #5d6778; --line: #d9dee7; --bg: #f6f7f9; --card: #fff; --accent: #2457d6; --ok: #14733b; --warn: #8a5a00; --bad: #a3231c; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, sans-serif; color: var(--ink); background: var(--bg); }
.bar { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1.5rem; background: var(--card); border-bottom: 1px solid var(--line); }
.bar .brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.bar nav a { margin-left: 1rem; }
main { max-width: 68rem; margin: 1.5rem auto; padding: 0 1.5rem; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; } h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem 0; }
a { color: var(--accent); }
.meta, .hint { color: var(--muted); } .hint { font-size: .85rem; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.accounts { border: 1px solid var(--line); border-radius: 8px; }
.badge { padding: .1rem .5rem; border-radius: 99px; font-size: .8rem; font-weight: 600; }
.badge.active { background: #dff3e6; color: var(--ok); } .badge.disabled { background: #fdf0d2; color: var(--warn); }
.badge.expired, .badge.missing { background: #f9dfdd; color: var(--bad); }
tr.expired td, tr.disabled td { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.actions form { margin: 0; } .mini { display: inline-flex; gap: .25rem; } .mini input[type=number] { width: 5rem; }
button, input[type=submit] { font: inherit; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
button:hover, input[type=submit]:hover { border-color: var(--accent); }
.primary, input.primary { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; padding: .3rem .8rem; border-radius: 6px; }
.stack { display: grid; gap: .75rem; max-width: 32rem; } .stack label { display: grid; gap: .25rem; }
.inline { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; } .inline label { display: grid; gap: .25rem; font-size: .85rem; color: var(--muted); }
input[type=text], input[type=email], input[type=number], input[type=date], select, textarea { font: inherit; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.notice { background: #e4efff; border: 1px solid #b9d0f7; padding: .5rem .75rem; border-radius: 6px; }
.errors { background: #fdeceb; border: 1px solid #f0bdb9; color: var(--bad); padding: .5rem .75rem; border-radius: 6px; margin: 1rem 0; } .errors p { margin: 0; font-weight: 600; }
.reveal { border-color: #e0b44c; background: #fffbea; }
pre.newcodes { background: #1c2330; color: #f6f7f9; padding: .75rem 1rem; border-radius: 6px; font-size: 1rem; user-select: all; }
.events { list-style: none; padding: 0; margin: 0; } .events li { padding: .25rem 0; border-bottom: 1px solid var(--line); color: var(--muted); } .events time { color: var(--ink); }
table.codes td:nth-child(3), table.codes td:nth-child(5) { white-space: nowrap; }
.search { margin: .5rem 0 1rem; } .search a { align-self: center; }
table.found td, table.signins td { white-space: nowrap; } table.signins, table.found { border: 1px solid var(--line); }
table.codes td:nth-child(6), table.codes td:nth-child(7) { white-space: nowrap; }
tr:target td { background: #fffbea; }
section.email textarea { width: 100%; font: .9rem/1.45 ui-monospace, monospace; } section.email input[type=text] { width: 100%; }
fieldset.makecodes { border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 48rem; } fieldset.makecodes legend { font-weight: 600; padding: 0 .4rem; }
code.fullcode { font-size: .85rem; white-space: nowrap; user-select: all; }
.emailstate { margin: .5rem 0; } .emailstate form { display: inline-flex; margin-left: .5rem; }
section.batchmail { margin: 1rem 0; } section.batchmail.sent { opacity: .6; } section.batchmail h2 { margin-bottom: .5rem; }
section.report li, table.preview tr.invalid td:last-child { color: var(--bad); }
table.preview tr.exists td:last-child, table.preview tr.duplicate td:last-child { color: var(--warn); } table.preview { border: 1px solid var(--line); }
textarea[name=customers] { width: 100%; font: .9rem/1.45 ui-monospace, monospace; } .stack.wide { max-width: 60rem; }
.dashboard { margin: 0 0 1rem; } .totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.total { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; display: grid; }
.total .number { font-size: 1.8rem; line-height: 1.1; } .total .label { color: var(--muted); font-size: .85rem; }
svg.chart { width: 100%; height: 9rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .4rem; }
svg.chart rect.bar { fill: var(--accent); } svg.chart rect.bar:hover { fill: #1a3f9e; } svg.chart .axis { stroke: var(--line); } svg.chart .axis-label { fill: var(--muted); font-size: 10px; }
.filters { display: flex; gap: .5rem; } a.filter { padding: .15rem .7rem; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); background: #fff; }
a.filter.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager { display: flex; gap: 1rem; align-items: center; color: var(--muted); }
section.notes textarea { width: 100%; font: inherit; }

.linklike { background: none; border: 0; padding: 0; margin-left: 1rem; color: var(--accent); cursor: pointer; font: inherit; } .lastsignin { margin: 0 0 .5rem; font-size: .85rem; }
form.signout { display: inline; }   /* the sign-out button sits in the bar; a class, since the browser policy allows no inline style (GBT-92) */
