/* Beamtime Logistics — hand-rolled, no framework. Palette mirrors the design doc. */
:root {
  --bg: #f6f8f9;
  --surface: #ffffff;
  --ink: #182430;
  --muted: #54646f;
  --line: #d7e0e5;
  --soft: #edf1f3;
  --accent: #0e7c9e;
  --accent-soft: #e1eef3;
  --warn: #b4531d;
  --warn-soft: #f6e8de;
  --pass: #1e7d46;
  --pass-soft: #e2f2e8;
  --auto: #6b4fa3;      /* automatic-operation allocations */
  --auto-soft: #ece7f6;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--accent); }

header.top {
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
header.top .brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
header.top .brand img { height: 28px; display: block; }
header.top .brand span {
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  border-left: 1px solid var(--line); padding-left: 12px;
}
header.top nav { display: flex; gap: 18px; font-size: 14px; }
header.top nav a { text-decoration: none; color: var(--muted); }
header.top nav a.active, header.top nav a:hover { color: var(--accent); }
header.top .who { margin-left: auto; font-size: 13px; color: var(--muted); }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 28px 0 10px; }
p.sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 14px 0;
}

.warnings { border-left: 3px solid var(--warn); background: var(--warn-soft); }
.warnings ul { margin: 4px 0; padding-left: 20px; }
.warnings li { margin: 3px 0; }
.ok { border-left: 3px solid var(--accent); }

/* Timeline lanes (planner + dewar board) */
.axis { position: relative; height: 20px; margin: 0 0 4px; }
.axis span {
  position: absolute; transform: translateX(-50%);
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.lane { margin: 0 0 14px; }
.lane .lane-label { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.lane .lane-label small { color: var(--muted); font-weight: 400; }
.track {
  position: relative;
  height: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 3px;
}
.track.thin { height: 14px; }
.bar {
  position: absolute; top: 3px; bottom: 3px;
  border-radius: 3px;
  font-size: 11px; line-height: 18px;
  padding: 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink);
  text-decoration: none;
}
.bar-run { background: var(--soft); border: 1px solid var(--line); top: 1px; bottom: 1px; color: var(--muted); }
.bar-dark {
  background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 4px, var(--line) 4px, var(--line) 6px);
  border: 1px solid var(--line); top: 1px; bottom: 1px; color: var(--muted);
}
.bar-alloc { background: var(--accent-soft); border: 1px solid var(--accent); }
.bar-auto { background: var(--auto-soft); border-color: var(--auto); }
.bar-auto .bar-out { color: var(--auto); }
/* Too narrow for its text: the bar becomes a small block ("mark") and the
   label hangs beside it — still part of the same link. */
.bar-mark { overflow: visible; padding: 0; }
.bar-out {
  position: absolute; top: 0; bottom: 0;
  font-size: 11px; line-height: 18px; white-space: nowrap;
  color: var(--accent);
}
.bar-out-right { left: 100%; padding-left: 5px; }
.bar-out-left { right: 100%; padding-right: 5px; }
.bar-tentative { border-style: dashed; opacity: 0.75; }
.bar-block { background: var(--accent-soft); border: 1px solid var(--accent); }
.bar-estimated { border-style: dashed; }
.bar-conflict { background: var(--warn-soft); border: 1px solid var(--warn); }
.today {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--warn); opacity: 0.7; z-index: 2;
}

table.data { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--surface); }
table.data th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); background: var(--soft);
  padding: 7px 10px; border-bottom: 1px solid var(--line);
}
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }

.pill {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--soft); color: var(--muted);
  white-space: nowrap;
}
.pill-confirmed { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.pill-warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pill-ok { background: var(--pass-soft); border-color: var(--pass); color: var(--pass); }
.pill-auto { background: var(--auto-soft); border-color: var(--auto); color: var(--auto); }

.swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  vertical-align: -1px; margin-right: 2px;
}
.swatch-manual { background: var(--accent-soft); border: 1px solid var(--accent); }
.swatch-auto { background: var(--auto-soft); border: 1px solid var(--auto); }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 4px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.login-brand { text-align: center; margin: 56px 0 0; }
.login-brand img { height: 46px; }
.login { max-width: 320px; margin: 20px auto 60px; }
.btn-google {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); font-weight: 600;
}
.btn-google:hover { border-color: var(--accent); color: var(--accent); }
p.login-or { margin: 12px 0; text-align: center; }

/* In-place editing (operational CRUD moved out of the admin, 2026-08-30) */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  border-radius: 4px; padding: 7px 14px; font-size: 14px;
}
.btn-quiet { font-size: 13px; color: var(--muted); }
.btn-danger { background: var(--warn); }
.btn-mini {
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent);
}
.btn-mini.quiet { background: var(--soft); color: var(--muted); border-color: var(--line); }
form.inline, .inline { display: inline; }
.quiet-link { font-size: 12px; color: var(--muted); }

details.editor { margin-top: 10px; }
details.editor > summary {
  cursor: pointer; color: var(--accent); font-size: 14px;
  list-style-position: outside; margin-left: 1.1em;
}
details.editor[open] {
  background: var(--soft); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 14px; margin-top: 12px;
}
details.editor[open] > summary { margin-bottom: 10px; }

.card.editing { border-left: 3px solid var(--accent); }
.card.editing > strong, .rowform strong { display: block; margin-bottom: 8px; }

.frm {
  display: grid; grid-template-columns: 160px minmax(0, 420px);
  gap: 8px 14px; align-items: start; font-size: 14px;
}
.frm > label { color: var(--muted); padding-top: 5px; }
.frm-field input[type="text"], .frm-field input[type="number"], .frm-field input[type="email"],
.frm-field input[type="date"], .frm-field input[type="datetime-local"], .frm-field input[type="url"],
.frm-field select, .frm-field textarea {
  width: 100%; padding: 5px 8px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink);
}
.frm-field > div { display: flex; flex-wrap: wrap; gap: 2px 16px; padding-top: 4px; }
.frm-field > div label { font-weight: 400; white-space: nowrap; }
.err { color: var(--warn); font-size: 13px; }
.hint { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
p.hint { margin: 8px 0 0; }

.actions { margin-top: 12px; display: flex; align-items: center; gap: 14px; }
form.delete { margin-top: 10px; text-align: right; }
form.delete .btn-danger { font-size: 12px; padding: 4px 10px; }
tr.rowform > td { background: var(--soft); padding: 12px 14px; }
.login input[type="text"], .login input[type="password"] {
  width: 100%; padding: 8px; margin: 4px 0 12px;
  border: 1px solid var(--line); border-radius: 4px; font-size: 14px;
}
button, input[type="submit"] {
  background: var(--accent); color: #fff; border: none; border-radius: 4px;
  padding: 8px 16px; font-size: 14px; cursor: pointer;
}
