/* DineDesk owner dashboard.
   Navy #032156 and gold #C68C26, the brand's own colours. Gold measures 2.58:1 on the page
   wash, so it appears only on navy grounds and as small markers - never as text you have to
   read on white. */

:root {
  --navy: #032156;
  --navy-deep: #02163B;
  --navy-soft: #EDF1F9;
  --gold: #C68C26;
  --ink: #0E1B33;
  --muted: #5A6480;
  --line: #DCE2EE;
  --panel: #FFFFFF;
  --canvas: #EEF1F7;
  --good: #067647;
  --warn: #B54708;
  --bad: #B42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { margin: 0; font-weight: 650; }
h1 { font-size: 21px; }
h2 { font-size: 15px; }
h2.spaced { margin-top: 22px; }

.eyebrow {
  margin: 0 0 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--gold);
}

.help { margin: 4px 0 14px; font-size: 12.5px; color: var(--muted); }

.error {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 7px;
  background: #FEF3F2;
  border: 1px solid #FDA29B;
  color: var(--bad);
  font-size: 13px;
}

/* ---------- sign in ---------- */
.centred { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 1px 2px rgba(3, 33, 86, .06), 0 10px 30px rgba(3, 33, 86, .07);
}
.sign-in { width: 100%; max-width: 380px; }
.sign-in h1 { margin-bottom: 2px; }

label { display: block; margin: 0 0 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
label input {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
label input:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
label small { display: block; margin-top: 4px; font-weight: 400; font-size: 11.5px; }

button { font: inherit; cursor: pointer; border-radius: 8px; }
button.primary {
  width: 100%;
  padding: 11px 16px;
  font-weight: 650;
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
}
button.primary:hover { background: var(--navy-deep); }
button.primary:disabled { opacity: .6; cursor: default; }
button.quiet {
  padding: 7px 12px;
  color: var(--on-dark, #E8EDF7);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
}
button.quiet:hover { border-color: var(--gold); color: #fff; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- dashboard shell ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: var(--navy-deep);
  border-bottom: 3px solid var(--gold);
  color: #fff;
}
.topbar h1 { color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

/* Not decoration. "No sales yet" and "the till has not spoken to us since eleven" look
   identical on a dashboard, and only one of them is a problem. */
.freshness { font-size: 11.5px; color: #9FAECB; text-align: right; }
.freshness.stale { color: #F2A65A; font-weight: 600; }

.periods { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 22px 0; }
.periods button {
  padding: 7px 14px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}
.periods button.active { color: #fff; background: var(--navy); border-color: var(--navy); font-weight: 600; }
.periods button:hover:not(.active) { border-color: var(--navy); color: var(--navy); }

.content { padding: 16px 22px 40px; display: flex; flex-direction: column; gap: 16px; }
#dashboardError { margin: 14px 22px 0; }

/* ---------- figures ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.kpi span { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.kpi strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.kpi small { display: block; font-size: 11.5px; color: var(--muted); }
.kpi strong.good { color: var(--good); }
.kpi strong.bad { color: var(--bad); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.columns { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------- rows and bars ---------- */
.rows { display: flex; flex-direction: column; gap: 2px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.row-name small { display: block; font-size: 11px; color: var(--muted); }
.row-value { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; text-align: right; }
.row-value small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }

.trend { display: flex; align-items: flex-end; gap: 5px; min-height: 132px; padding-top: 6px; overflow-x: auto; }
.bar { flex: 1 0 22px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; min-width: 22px; }
.bar i { display: block; width: 100%; background: var(--navy); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar.best i { background: var(--gold); }
.bar span { font-size: 10px; color: var(--muted); white-space: nowrap; }

.empty { padding: 18px 0; font-size: 13px; color: var(--muted); }
.footnote { margin: 0; font-size: 11.5px; color: var(--muted); }

@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .content, .periods { padding-left: 14px; padding-right: 14px; }
  .kpi strong { font-size: 21px; }
}
