/* OXN Marketing brand (from oxnmarketing.com): Boucherie Block headings, Amurg body, warm browns + cream, tan accent. */
@font-face { font-family: "BoucherieBlock"; src: url("assets/BoucherieBlock-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Amurg"; src: url("assets/Amurg-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* dark (default, like oxnmarketing.com) */
  --bg: hsl(38 25% 10%); --card: hsl(38 25% 14%); --raised: hsl(38 20% 18%); --text: hsl(38 30% 90%);
  --muted: hsl(38 15% 62%); --line: hsl(38 20% 23%); --accent: hsl(32 37% 61%); --accent-ink: hsl(38 25% 10%);
  --field: hsl(38 22% 12%);
  --ok: hsl(130 35% 62%); --ok-bg: hsl(130 25% 18%); --info: hsl(32 55% 70%); --info-bg: hsl(32 30% 20%);
  --bad: hsl(5 75% 68%); --bad-bg: hsl(5 40% 20%); --warn: hsl(42 80% 65%); --warn-bg: hsl(42 40% 18%);
  --radius: 16px; --display: "BoucherieBlock", "Arial Black", Impact, sans-serif; --body: "Amurg", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: hsl(40 28% 85%); --card: hsl(40 25% 90%); --raised: hsl(38 22% 82%); --text: hsl(30 25% 22%);
    --muted: hsl(30 15% 38%); --line: hsl(38 20% 74%); --accent: hsl(35 30% 30%); --accent-ink: hsl(40 25% 92%);
    --field: hsl(40 25% 94%);
    --ok: hsl(130 45% 26%); --ok-bg: hsl(130 30% 84%); --info: hsl(32 50% 30%); --info-bg: hsl(35 40% 80%);
    --bad: hsl(5 65% 38%); --bad-bg: hsl(5 60% 88%); --warn: hsl(38 80% 28%); --warn-bg: hsl(42 70% 82%);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, .display { font-family: var(--display); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { height: 34px; width: auto; display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .brand img, :root:not([data-theme="dark"]) .login-logo { filter: brightness(.32) sepia(.6); } }
.brand span { font-family: var(--display); font-size: 22px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.brand small { display: block; font-family: var(--body); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.link { color: var(--muted); font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 400; font-family: var(--body); }

main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
h2 { font-size: 22px; margin: 0; line-height: 1; }
.muted { color: var(--muted); font-size: 14px; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 14px; background: var(--raised); color: var(--muted); white-space: nowrap; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-busy { background: var(--info-bg); color: var(--info); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0 0 16px; }
.facts div { min-width: 0; }
dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
dd { margin: 3px 0 0; overflow-wrap: anywhere; }

form label { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--text); font: 16px/1.4 var(--body); text-transform: none; letter-spacing: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { font-size: 14px; color: var(--muted); margin: 0 0 14px; min-height: 1em; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
button { font-family: var(--display); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; line-height: 1; }
button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
button.secondary:hover { border-color: var(--accent); }
button.small { padding: 7px 14px; font-size: 13px; }
button:disabled { opacity: .55; cursor: default; }

.list { display: grid; gap: 10px; }
.item { background: var(--raised); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.item-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.item-title { font-size: 17px; }
.chip { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--card); color: var(--muted); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.busy { background: var(--info-bg); color: var(--info); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.item p { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.item a, .muted a { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

.tabs { display: flex; gap: 4px; }
.tabs a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.tabs a[aria-current="page"], .tabs a:hover { color: var(--text); background: var(--raised); }
label.check { display: flex; align-items: flex-start; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); }
label.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--accent); }
.color { display: flex; gap: 8px; align-items: center; }
.color input[type="color"] { width: 46px; height: 42px; padding: 3px; flex: none; }
.changes { margin: 4px 0 0; padding-left: 18px; }
.changes li { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#client-pick { width: auto; max-width: 100%; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; max-width: calc(100% - 32px); font-size: 15px; z-index: 5; }

/* login */
main.login { min-height: 100vh; display: grid; grid-template-columns: 1fr; place-items: center; max-width: none; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; text-align: center; }
.login-logo { width: 200px; max-width: 70%; height: auto; margin: 0 auto 8px; display: block; }
.login h1 { font-size: 26px; margin: 8px 0 22px; }
.login form { text-align: left; }
.login button { width: 100%; margin-top: 4px; }
.login .error { color: var(--bad); font-size: 14px; min-height: 1.2em; margin: 0 0 10px; }
.google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 13px 18px; border-radius: 999px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; text-decoration: none; font: 500 16px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.google:hover { box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.google:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fine { margin: 14px 0 0; font-size: 13px; }

@media (max-width: 760px) {
  main { grid-template-columns: 1fr; padding: 16px 16px 48px; }
  .facts, .grid { grid-template-columns: 1fr; }
  .top { padding: 10px 16px; }
  .brand span { font-size: 18px; }
  .brand small, #me { display: none; }
  .top { flex-wrap: wrap; }
}
