/* Sample direction "Board" (2026-11-16): a dark departure board. Near-black navy, one lime
   accent, monospace numbers, thin lines, square corners, flat. Fake data from ../data.js. */

:root {
	--bg: #0b1020;
	--panel: #111830;
	--panel2: #18213b;
	--line: #222c48;
	--text: #e9edf5;
	--soft: #8e98b0;
	--dim: #5d6782;
	--lime: #c6f432;
	--amber: #f2b544;
	--green: #34d27b;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
	--map-land: #131b32;
	--map-water: #0d2240;
	--map-park: #14281f;
	--map-road: #2b3759;
	--map-minor: #1b2543;
	--map-text: #5d6782;
	--map-text-strong: #d5dbe8;
	--map-stop: #0b1020;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 14px;
	line-height: 1.35;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, p { margin: 0; }

h1 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); }

.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lbl { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--soft); font-weight: 600; }
.soft { color: var(--soft); }
.dim { color: var(--dim); }
.lime { color: var(--lime); }
.amber { color: var(--amber); }
.green { color: var(--green); }
.grow { flex: 1; }
.right { text-align: right; }

/* controls */

input, select, textarea, button {
	font: inherit;
	color: var(--text);
}

input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 3px;
	height: 34px;
	padding: 0 10px;
	width: 100%;
	min-width: 0;
	outline: none;
	color-scheme: dark;
}

input:focus, select:focus, textarea:focus { border-color: var(--lime); }

input::placeholder { color: var(--dim); }

button, .btn {
	align-items: center;
	background: var(--panel2);
	border: 1px solid var(--line);
	border-radius: 3px;
	cursor: pointer;
	display: inline-flex;
	gap: 6px;
	height: 34px;
	justify-content: center;
	padding: 0 12px;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 600;
}

button:hover, .btn:hover { border-color: #34406a; }

.go { background: var(--lime); border-color: var(--lime); color: #0b1020; }
.go:hover { border-color: #e2ff7a; background: #d4ff4a; }
.small { height: 28px; padding: 0 9px; font-size: 12px; }
.warn { color: var(--amber); }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row { display: flex; gap: 8px; align-items: flex-end; }
.row > .field { flex: 1; }

/* segmented control: small rectangles joined in one frame */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; flex-shrink: 0; max-width: 100%; }
.seg > * { background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0; height: 30px; padding: 0 11px; color: var(--soft); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; cursor: pointer; white-space: nowrap; }
.seg > *:last-child { border-right: 0; }
.seg > .on { background: var(--panel2); color: var(--text); box-shadow: inset 0 -2px 0 var(--lime); }

/* panels and tables */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; min-height: 0; display: flex; flex-direction: column; }
.panel > .ph { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; min-height: 38px; padding: 6px 12px; }
.panel > .pb { padding: 12px; }
.scroll { overflow: auto; min-height: 0; flex: 1; }

.tbl { border-collapse: collapse; width: 100%; }
.tbl th { background: var(--panel); color: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; padding: 8px 12px; position: sticky; text-align: left; text-transform: uppercase; top: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { border-bottom: 1px solid var(--line); padding: 8px 12px; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .n { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.tbl tbody tr:hover td { background: #141c35; }
.tbl tr.click { cursor: pointer; }

.tag { border: 1px solid var(--line); border-radius: 2px; display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 1px 6px; text-transform: uppercase; white-space: nowrap; }
.tag.live { border-color: var(--lime); color: var(--lime); }
.tag.amber { border-color: var(--amber); color: var(--amber); }
.tag.dim { color: var(--dim); }

.sw { border-radius: 1px; display: inline-block; height: 12px; width: 4px; vertical-align: -1px; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 2px; display: inline-flex; font-family: var(--mono); font-size: 12px; gap: 6px; padding: 2px 6px; white-space: nowrap; }
.chip b { color: var(--text); }

.mapbox { background: var(--map-land); border: 1px solid var(--line); border-radius: 3px; min-height: 0; overflow: hidden; position: relative; }

/* brand */

.brand { align-items: center; display: flex; gap: 9px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.brand i { background: var(--lime); display: inline-block; height: 14px; width: 14px; border-radius: 2px; flex-shrink: 0; }

/* rider pages: a top bar and one screen under it */

.app { display: grid; grid-template-rows: auto 1fr; height: 100vh; height: 100dvh; }
.top { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 14px; height: 48px; padding: 0 20px; background: var(--bg); }
.top nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.top nav a { border-radius: 3px; color: var(--soft); font-size: 13px; font-weight: 600; padding: 6px 10px; white-space: nowrap; }
.top nav a:hover { color: var(--text); }
.top nav a.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--lime); border-radius: 0; }
.body { min-height: 0; overflow: hidden; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.body.center { align-items: center; justify-content: center; }
.head { align-items: center; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }

/* office pages: a slim rail and one screen */

.office { display: grid; grid-template-columns: 184px 1fr; height: 100vh; height: 100dvh; }
.rail { background: #090d1a; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 0; min-height: 0; }
.rail .brand { padding: 0 16px 16px; font-size: 12px; }
.rail a.go-to { color: var(--soft); display: block; font-size: 13px; font-weight: 600; padding: 7px 16px; border-left: 2px solid transparent; }
.rail a.go-to:hover { color: var(--text); background: #0f1528; }
.rail a.go-to.on { background: var(--panel); border-left-color: var(--lime); color: var(--text); }
.rail .who { border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; margin-top: auto; padding: 12px 16px 0; display: flex; justify-content: space-between; }
.main { display: grid; grid-template-rows: auto 1fr; min-height: 0; min-width: 0; }
.mhead { align-items: center; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; min-height: 52px; padding: 8px 20px; }
.mhead h1 { margin-right: 6px; }
.mhead .tools { display: flex; gap: 8px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.mbody { min-height: 0; overflow: hidden; padding: 14px 20px; display: grid; gap: 12px; }
.mbody > *, .body > *, .part > * { min-width: 0; }

/* home */

.sched { display: grid; gap: 8px; }
.srow { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; display: grid; grid-template-columns: 6px 1.3fr 1fr 1.1fr 0.8fr 0.6fr 110px; align-items: center; column-gap: 14px; padding: 0 14px 0 0; min-height: 52px; }
.srow .bar { align-self: stretch; border-radius: 3px 0 0 3px; }
.srow .rn { font-size: 15px; font-weight: 650; }
.srow .stops { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px; padding: 0 0 10px; }
.srow .st { text-align: right; }
.actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.action { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; display: flex; flex-direction: column; gap: 10px; justify-content: space-between; padding: 12px 14px; min-height: 76px; font-weight: 650; font-size: 15px; }
.action:hover { border-color: var(--lime); }
.action .k { color: var(--lime); font-family: var(--mono); font-size: 12px; }
.action.main { background: var(--lime); color: #0b1020; border-color: var(--lime); }
.action.main .k { color: #0b1020; opacity: 0.6; }
.contact { border-top: 1px solid var(--line); color: var(--soft); display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; padding-top: 10px; margin-top: auto; }
.contact b { color: var(--text); font-weight: 600; }

/* big numbers */

.big { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 44px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }

/* calendar */

.cal { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; flex: 1; min-height: 0; }
.cal .dh { background: var(--panel); color: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; padding: 6px 8px; text-transform: uppercase; }
.cal .d { background: var(--bg); display: flex; flex-direction: column; gap: 3px; padding: 6px 7px; min-height: 0; overflow: hidden; }
.cal .d .dn { font-family: var(--mono); font-size: 12px; color: var(--soft); }
.cal .d.today { background: #161f3a; box-shadow: inset 0 0 0 1px var(--lime); }
.cal .d.today .dn { color: var(--lime); font-weight: 700; }
.cal .d.blank { background: #090d1a; }
.cal .run { border-left: 3px solid; font-size: 11px; padding-left: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--soft); }
.cal .run.ch { color: var(--amber); }

/* door tablet and next stop screen */

.screen { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); }

@media (max-width: 900px) {
	.office { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
	.rail { flex-direction: row; align-items: center; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; height: 44px; }
	.rail .brand { padding: 0 12px; }
	.rail .brand span { display: none; }
	.rail a.go-to { border-left: 0; border-bottom: 2px solid transparent; padding: 12px 10px 10px; white-space: nowrap; }
	.rail a.go-to.on { border-bottom-color: var(--lime); background: transparent; }
	.rail .who { display: none; }
	.mhead { padding: 8px 12px; min-height: 48px; }
	.mbody { padding: 10px 12px; }
	.srow { grid-template-columns: 5px 1fr auto; row-gap: 2px; padding: 8px 12px 8px 0; }
	.srow .bar { grid-row: 1 / span 4; }
	.srow .hide-s { display: none; }
	.srow .stops { grid-column: 2 / -1; padding: 4px 0 0; }
	.srow .st { grid-column: 3; grid-row: 1; }
	.srow .times { grid-column: 2 / -1; }
}

@media (max-width: 640px) {
	body { font-size: 14px; }
	.top { padding: 0 12px; height: 46px; gap: 8px; }
	.top .brand span { display: none; }
	.top nav a { padding: 6px 7px; font-size: 12px; }
	.body { padding: 10px 12px; gap: 10px; }
	.actions { grid-template-columns: 1fr 1fr; }
	.actions .action:first-child { grid-column: 1 / -1; }
	.action { min-height: 58px; padding: 10px 12px; }
	.big { font-size: 36px; }
	.tbl th, .tbl td { padding: 7px 8px; }
	.hide-p { display: none !important; }
}
