/* Budgie admin: the app's colours, plainer layout. */
:root {
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, Inter, system-ui, sans-serif;
    --gold: #F5B83D;
    --gold-soft: rgba(245, 184, 61, .14);
    --mint: #3DDC97;
    --mint-soft: rgba(61, 220, 151, .14);
    --coral: #FF6B6B;
    --coral-soft: rgba(255, 107, 107, .14);
    --bg: #0B0C10;
    --surface: #14161C;
    --surface-2: #1B1E26;
    --surface-3: #242833;
    --border: rgba(255, 255, 255, .07);
    --border-strong: rgba(255, 255, 255, .14);
    --text: #F4F5F7;
    --text-2: #A3A8B4;
    --text-3: #6B7180;
    --radius: 14px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
p { margin: 0 0 12px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.gold { color: var(--gold); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.pad { padding: 16px; }

/* Top bar */
.bar { display: flex; align-items: center; gap: 24px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.brand:hover { text-decoration: none; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 6px 12px; border-radius: 999px; color: var(--text-2); font-weight: 550; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.signout { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; }

.main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { margin: 0; }
.back { display: inline-block; margin-bottom: 8px; font-size: 14px; }

/* Cards and figures */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.narrow { max-width: 440px; margin: 40px auto; }
.danger { border-color: rgba(255, 107, 107, .35); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.label { font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.value.small { font-size: 17px; margin-top: 6px; }
.sub { font-size: 12.5px; color: var(--text-3); }

/* Sign-ups per week */
.weeks { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 170px; }
.week { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.count { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 18px; }
.bar-fill { width: 100%; max-width: 40px; background: var(--gold); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-fill.h0 { background: var(--surface-3); height: 2px; }
.h1 { height: 11px; } .h2 { height: 22px; } .h3 { height: 33px; } .h4 { height: 44px; } .h5 { height: 55px; }
.h6 { height: 66px; } .h7 { height: 77px; } .h8 { height: 88px; } .h9 { height: 99px; } .h10 { height: 110px; }
.week-label { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* Tables and rows */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 10px 14px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th.num { text-align: right; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.row-item:first-of-type { border-top: 0; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-left: 6px; }
.tag { background: var(--surface-3); color: var(--text-2); }
.tag-good { background: var(--mint-soft); color: var(--mint); }
.tag-bad { background: var(--coral-soft); color: var(--coral); }

/* Forms */
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px; }
.input:focus { outline: none; border-color: var(--gold); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #1A1A1A; }
.btn-primary:hover { background: #FFC85A; }
.btn-danger { color: var(--coral); border-color: rgba(255, 107, 107, .4); }
.btn-danger:hover { background: var(--coral-soft); }
.search { display: flex; gap: 8px; }
.search .input { width: 260px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 220px; }
.alert { background: var(--coral-soft); color: var(--coral); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.notice { background: var(--gold-soft); border: 1px solid rgba(245, 184, 61, .3); padding: 12px 14px; border-radius: 10px; margin-bottom: 20px; }
.notice p:last-child { margin: 0; }
.link { display: block; word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; margin-top: 8px; }
.qr { background: #fff; border-radius: 12px; padding: 12px; width: fit-content; margin: 8px 0 12px; }
.qr img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.key { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; letter-spacing: .05em; }

@media (max-width: 700px) {
    .bar { padding: 10px 16px; gap: 10px; }
    .signout { margin-left: 0; width: 100%; justify-content: space-between; }
    .main { padding: 20px 16px 48px; }
    .search { width: 100%; }
    .search .input { width: auto; flex: 1; }
    .weeks { gap: 3px; }
    .week-label { font-size: 9px; }
}
