/* App shell + shared components. Values come from tokens.css only.
   Layouts here serve the non-dashboard pages (login, admin, runs); the dashboard's
   own components live in dashboard.css. */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---- shell ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.topbar .brand { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.topbar .brand span { color: var(--vis); }
.topbar nav { display: flex; gap: 20px; align-items: center; font-size: 13px; }
.topbar a { color: var(--ink); text-decoration: none; }
.topbar a:hover { color: var(--vis); }

.layout { display: flex; min-height: calc(100vh - 56px); }

.content { flex: 1; padding: 32px 40px; max-width: var(--content-max); }

/* ---- typography ---- */
h1 { font-size: 27px; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 8px; }
h2 { font-size: 19px; font-weight: 640; letter-spacing: -0.02em; margin: 24px 0 12px; }
.kicker {
  font-size: 10.5px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 6px;
}
.explainer { color: var(--mute); font-size: 13.5px; }
.num {
  font-family: var(--figs); letter-spacing: var(--fig-track); font-weight: 640;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---- components ---- */
.kpi-row { display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.kpi {
  flex: 1; min-width: 160px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px;
}
.kpi .big {
  font-family: var(--figs); font-size: 34px; font-weight: 640;
  letter-spacing: var(--fig-track); font-variant-numeric: tabular-nums; color: var(--vis);
}
.kpi .label { font-size: 12.5px; font-weight: 620; margin-top: 4px; }
.kpi .sub { font-size: 12px; color: var(--mute); }
.kpi .delta-up { color: var(--sentdk); font-size: 13px; }
.kpi .delta-down { color: var(--pricedk); font-size: 13px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--plate);
  padding: 22px 24px; margin-bottom: 16px;
}
.note { background: var(--bg); border-radius: var(--r-lg); padding: 14px 18px; }

table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th {
  text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); font-weight: 640; padding: 0 10px 10px;
}
table.data td { padding: 13px 10px; border-top: 1px solid var(--line); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.highlight { background: var(--visbg); font-weight: 620; }

.chip {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.05em; padding: 5px 11px;
  border: 1px solid var(--line2); border-radius: 999px; color: var(--mute);
}
.chip.green { background: var(--sentbg); border-color: transparent; color: var(--sentdk); }
.chip.gold { background: var(--pricebg); border-color: transparent; color: var(--pricedk); }
.chip.grey { border-color: var(--line2); color: var(--mute); }

.btn {
  display: inline-block; font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 17px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg); text-decoration: none; cursor: pointer;
}
.btn:hover { opacity: 0.88; }
.btn.secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { opacity: 1; border-color: var(--line2); box-shadow: var(--lift); }

.stackbar {
  display: flex; height: 28px; border-radius: 999px; overflow: hidden;
  font-size: 11.5px; color: #fff;
}
.stackbar div { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.seg-first { background: var(--vis); }
.seg-named { background: var(--vis); opacity: 0.55; }
.seg-absent { background: var(--line2); color: var(--mute); }
.seg-own { background: var(--vis); }
.seg-booking { background: var(--price); }
.seg-editorial { background: var(--mute); }

.empty-state {
  text-align: center; padding: 48px 24px; color: var(--mute);
  font-size: 14px;
  border: 1px dashed var(--line2); border-radius: var(--r-xl);
}

/* ---- forms ---- */
form.styled label { display: block; font-size: 12.5px; font-weight: 620; margin: 14px 0 4px; }
form.styled input[type=text], form.styled input[type=email], form.styled input[type=password],
form.styled input[type=number], form.styled select, form.styled textarea {
  width: 100%; max-width: 420px; padding: 10px 14px; font-family: inherit;
  font-size: 14px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
form.styled input:focus, form.styled select:focus, form.styled textarea:focus {
  outline: 2px solid var(--vis); outline-offset: 1px; border-color: var(--vis);
}
.errorlist { color: var(--accdk); font-size: 13px; list-style: none; }


/* Admin nav in the top bar. Quiet by default: these are signposts, not actions. */
.navlink {
  color: var(--mute);
  text-decoration: none;
  font-size: 12px;
  margin-right: 14px;
  border-bottom: 1px solid transparent;
}
.navlink:hover { color: var(--ink); border-bottom-color: var(--line2); }
