/* Conciergr Timetable staff app. Tokens follow Conciergr's site (paper, blue ink,
   terracotta accent). Self-contained: no web fonts, so it loads fast at a front desk. */
:root {
  --paper: #FAFAF7; --card: #fff; --ink: #0b5cad; --ink-press: #094c90; --ink-soft: #3d5a7a;
  --muted: #6b7c8f; --line: #d9dee5; --line-soft: #eceff3; --accent: #C65F38; --accent-soft: #f7e8e1;
  --ok-soft: #e6eef8; --full: #7c8590; --full-soft: #eef0f2; --text: #1d2733; --err: #b03a2a; --good: #2f6b3a; --good-soft: #e7f1e5;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--text); font: 15px/1.45 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0 0 .25em; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--ink); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ok-soft); }
.btn.primary { background: var(--ink); color: #fff; } .btn.primary:hover { background: var(--ink-press); }
.btn.quiet { border-color: var(--line); color: var(--ink-soft); }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; color: var(--ink-soft); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--line-soft); color: var(--ink-soft); margin: 0 3px 3px 0; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.b-available { background: var(--ok-soft); color: var(--ink); } .b-few { background: var(--accent-soft); color: var(--accent); }
.b-full { background: var(--full-soft); color: var(--full); } .b-unknown { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.error { color: var(--err); font-weight: 600; } .ok { color: var(--good); font-weight: 600; }

/* Sign-in pages */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; width: min(420px, 100%); }
.auth-card .brand { font-family: var(--serif); color: var(--ink); font-weight: 700; margin: 0 0 16px; }
.auth-card form .btn { margin-top: 14px; }
.auth-card .or { text-align: center; color: var(--muted); margin: 12px 0; }
.auth-card .dev { background: var(--accent-soft); padding: 10px 12px; border-radius: 10px; }
.choices { list-style: none; padding: 0; display: grid; gap: 8px; }

/* App shell */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .who { font-family: var(--serif); font-size: 18px; font-weight: 700; margin: 0 8px 4px; }
.side .me { margin: 0 8px 14px; font-size: 12.5px; color: var(--muted); word-break: break-all; }
.nav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-soft); font-weight: 600; text-decoration: none; font-size: 14px; }
.nav a.on, .nav a:hover { background: var(--ok-soft); color: var(--ink); }
.nav .notlive { font-size: 11px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.nav .sec { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.side form { margin: 16px 8px 0; }
main.view { padding: 20px 24px 60px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.top .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.banner { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.banner.good { background: var(--good-soft); color: var(--good); }
.banner .btn { border-color: currentColor; color: inherit; background: transparent; padding: 6px 12px; font-size: 13px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.18); z-index: 50; max-width: calc(100% - 32px); }
.toast.bad { background: var(--err); }

/* Week board */
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 10px; }
.col h3 { font-family: var(--sans); font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.k { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px; margin-bottom: 8px; font-size: 13px; cursor: pointer; }
.k:hover { border-color: var(--ink); }
.k .t { font-weight: 700; font-size: 14px; }
.k .s { color: var(--ink-soft); margin: 3px 0 5px; }
.k .tr { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.k.cancelled, .k.closed { background: var(--full-soft); border-style: dashed; color: var(--full); }
.seat { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 6px; }
.step { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.step button { border: 0; background: transparent; padding: 2px 9px; font-weight: 700; color: var(--ink); cursor: pointer; }
.step button:hover { background: var(--ok-soft); }
.step span { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 44px; text-align: center; padding: 2px 4px; font-weight: 600; }
.stale { color: var(--accent); }

/* Table */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select, .filters input { width: auto; min-width: 150px; }
.filters .checks input, .checks input { min-width: 0; width: auto; }
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: #f5f6f8; padding: 8px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.grid td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.grid td[contenteditable] { cursor: text; min-width: 60px; }
table.grid td[contenteditable]:focus { outline: 2px solid var(--ink); background: var(--ok-soft); }
table.grid td.bad { background: #fbeae4; color: var(--accent); font-weight: 600; }
table.grid tr.saving td { opacity: .6; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(560px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(20, 30, 45, .35); }
dialog .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
dialog .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; align-items: center; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; color: var(--text); font-size: 14px; }
.checks input { width: auto; }
dialog .foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
dialog .field-error { color: var(--err); font-size: 13px; font-weight: 600; margin-top: 4px; }

/* Lists (closures, fees, staff, keys) */
.list { display: grid; gap: 8px; }
.row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.secret { font-family: ui-monospace, Menlo, monospace; background: var(--accent-soft); padding: 10px; border-radius: 8px; word-break: break-all; }

/* Phone: today view, and the shell collapses */
.days { display: flex; gap: 6px; margin: 0 0 10px; overflow-x: auto; }
.days a { flex: 1; min-width: 46px; text-align: center; padding: 7px 0; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line); text-decoration: none; }
.days a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.big { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.big .t { font-size: 17px; font-weight: 700; }
.big .step button { width: 48px; height: 44px; font-size: 22px; }
.big .step span { min-width: 72px; font-size: 17px; padding: 10px 4px; }
.big .trials { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 14px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .side .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .side .nav .branch { display: none; } /* the front-desk view has its own branch picker */
  .side .me { margin-bottom: 8px; }
  .side form { display: none; }
  main.view { padding: 14px 14px 60px; }
  .week { grid-template-columns: 1fr; }
  dialog .row2, dialog .row3 { grid-template-columns: 1fr; }
}
