/*
 * SKN Taxi & Tour Dispatch
 *
 * The values here come straight from the SKTA Dispatch design handoff. Square
 * corners everywhere, Public Sans, heavy weights, tabular figures, and nothing
 * rounded or soft: the screens are read across a counter and across a room.
 *
 * Every screen is scoped under .td so the host theme cannot reach in and the
 * plugin cannot leak out.
 */

.td {
	--td-ink: #0b0b0b;
	--td-ink-hover: #2a2a28;
	--td-text: #3a3a36;
	--td-muted: #5a5a55;
	--td-muted-soft: #7a7a75;
	--td-faint: #9a9a95;
	--td-line: #d6d6d2;
	--td-line-soft: #e4e4e0;
	--td-border: #bdbdb8;
	--td-panel: #f7f7f5;
	--td-panel-deep: #f2f2ef;
	--td-canvas: #e4e4e0;
	--td-surface: #fff;
	--td-green: #00703c;
	--td-green-hover: #005a30;
	--td-green-deep: #004d29;
	--td-yellow: #fcd116;
	--td-yellow-soft: #fff4c2;
	--td-red: #b3001b;
	--td-red-soft: #fbedef;
	--td-board-bg: #000;
	--td-board-line: #333;
	--td-board-cell: #444;
	--td-board-faint: #a8a8a3;

	font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--td-ink);
	background: var(--td-canvas);
	font-variant-numeric: tabular-nums;
	-webkit-font-smoothing: antialiased;
	line-height: 1.4;
}

.td *,
.td *::before,
.td *::after {
	box-sizing: border-box;
}

.td a {
	color: var(--td-green);
}

.td a:hover {
	color: var(--td-green-deep);
}

.td button,
.td input,
.td select,
.td textarea {
	font-family: inherit;
	font-variant-numeric: inherit;
	border-radius: 0;
}

/*
 * The host theme styles bare buttons, and Astra colours their text white. A
 * button here that did not set its own colour came out white on white, which
 * is exactly as visible as not being there.
 *
 * :where() keeps this at the specificity of .td alone, so it beats the theme
 * without outranking the component classes further down. The first version of
 * this rule was .td button, which outranks a single class and turned every
 * white button label black.
 */
.td :where(button) {
	cursor: pointer;
	color: var(--td-ink);
	text-transform: none;
	letter-spacing: normal;
	line-height: normal;
}

.td button {
	cursor: pointer;
}

.td button[disabled] {
	cursor: not-allowed;
	opacity: 0.4;
}

.td-hide {
	display: none !important;
}

.td-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ *
 * Shared pieces
 * ------------------------------------------------------------------ */

.td-surface {
	background: var(--td-surface);
	border: 1px solid var(--td-border);
}

.td-eyebrow {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--td-muted);
}

.td-btn {
	border: 0;
	background: var(--td-ink);
	color: #fff;
	font-weight: 800;
	padding: 0 18px;
	height: 52px;
	font-size: 18px;
}

.td-btn:hover {
	background: var(--td-ink-hover);
}

.td-btn--green {
	background: var(--td-green);
}

.td-btn--green:hover {
	background: var(--td-green-hover);
}

.td-btn--ghost {
	background: var(--td-surface);
	color: var(--td-ink);
	border: 1.5px solid var(--td-ink);
	font-weight: 700;
	height: 40px;
	font-size: 15px;
	padding: 0 14px;
}

.td-btn--ghost:hover {
	background: var(--td-panel-deep);
}

.td-btn--danger {
	background: var(--td-surface);
	color: var(--td-red);
	border: 2px solid var(--td-red);
	font-weight: 800;
	height: 52px;
	font-size: 17px;
}

.td-btn--danger:hover {
	background: var(--td-red-soft);
}

.td-btn--small {
	height: 36px;
	font-size: 14px;
	padding: 0 12px;
}

.td-input,
.td-select {
	border: 1.5px solid var(--td-ink);
	background: var(--td-surface);
	height: 48px;
	padding: 0 12px;
	font-size: 16px;
	font-weight: 600;
	outline: none;
	color: var(--td-ink);
	width: 100%;
}

.td-input:focus,
.td-select:focus {
	outline: 3px solid var(--td-yellow);
	outline-offset: -1px;
}

.td-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.td-field > span:first-child {
	font-size: 14px;
	font-weight: 700;
}

.td-flash {
	font-size: 15px;
	font-weight: 600;
	padding: 10px 14px;
	background: var(--td-surface);
	border: 1.5px solid var(--td-ink);
}

.td-flash--error {
	border-color: var(--td-red);
	color: var(--td-red);
}

.td-pill {
	font-weight: 700;
	font-size: 15px;
}

.td-pill--ok {
	color: var(--td-green);
}

.td-pill--bad {
	color: var(--td-red);
}

/* ------------------------------------------------------------------ *
 * 1 Login
 * ------------------------------------------------------------------ */

.td-login {
	min-height: 100vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px 48px;
}

.td-login__card {
	width: 100%;
	max-width: 390px;
	background: var(--td-surface);
	border: 1px solid var(--td-border);
	display: flex;
	flex-direction: column;
	padding: 56px 28px 40px;
	min-height: 640px;
}

.td-login__logo {
	width: 120px;
	height: 120px;
	align-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed var(--td-border);
	color: var(--td-faint);
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	padding: 8px;
}

.td-login__logo img {
	max-width: 100%;
	max-height: 100%;
	display: block;
}

.td-login__title {
	margin: 48px 0 0;
	font-size: 30px;
	font-weight: 800;
}

.td-login__form {
	margin-top: 24px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.td-login__label {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.td-login__label > span {
	font-size: 16px;
	font-weight: 700;
}

.td-login__phone {
	display: flex;
	border: 2px solid var(--td-ink);
	height: 60px;
}

.td-login__prefix {
	display: flex;
	align-items: center;
	padding: 0 14px;
	font-size: 20px;
	font-weight: 600;
	background: var(--td-panel-deep);
	border-right: 2px solid var(--td-ink);
	white-space: nowrap;
}

.td-login__phone input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: none;
	padding: 0 14px;
	font-size: 22px;
	font-weight: 600;
	background: var(--td-surface);
}

.td-login__passcode {
	border: 2px solid var(--td-ink);
	height: 60px;
	padding: 0 14px;
	font-size: 26px;
	letter-spacing: 0.3em;
	outline: none;
	width: 100%;
	background: var(--td-surface);
}

.td-login__submit {
	height: 64px;
	background: var(--td-green);
	color: #fff;
	border: 0;
	font-size: 20px;
	font-weight: 800;
	margin-top: 8px;
}

.td-login__submit:hover {
	background: var(--td-green-hover);
}

.td-login__foot {
	margin-top: auto;
	padding-top: 24px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--td-muted);
	text-align: center;
}

/* ------------------------------------------------------------------ *
 * 2 Operator
 * ------------------------------------------------------------------ */

/* Staff looking at an operator's screen. Says whose, and offers the way back. */
.td-preview {
	max-width: 440px;
	margin: 0 auto;
	background: var(--td-ink);
	color: #fff;
	padding: 10px 16px;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.td-preview a,
.td .td-preview a {
	color: var(--td-yellow);
	font-weight: 700;
	white-space: nowrap;
}

.td-op {
	max-width: 440px;
	margin: 0 auto;
	background: var(--td-surface);
	border: 1px solid var(--td-border);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.td-op__bar {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 24px;
	font-size: 15px;
	font-weight: 700;
	border-bottom: 1px solid var(--td-line);
}

.td-op__status {
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	background: var(--td-green);
}

.td-op__status--bad {
	background: var(--td-red);
}

.td-op__block {
	padding: 24px;
	border-bottom: 1px solid var(--td-line);
}

.td-op__blockTitle {
	font-size: 22px;
	font-weight: 700;
}

.td-op__number {
	font-size: 150px;
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: -0.04em;
	margin-top: 4px;
}

.td-op__number--held {
	color: var(--td-faint);
	font-size: 120px;
}

.td-op__ahead {
	font-size: 32px;
	font-weight: 800;
	margin-top: 14px;
}

.td-op__meta {
	margin-top: 18px;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 16px;
	font-size: 16px;
}

.td-op__meta dt {
	color: var(--td-muted);
	margin: 0;
}

.td-op__meta dd {
	font-weight: 700;
	margin: 0;
}

.td-op__note {
	margin-top: 16px;
	font-size: 15px;
	line-height: 1.45;
	color: var(--td-text);
}

.td-op__jobs {
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.td-op__jobsHead {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.td-op__jobsHead > :first-child {
	font-size: 18px;
	font-weight: 800;
}

.td-op__jobsHead > :last-child {
	font-size: 16px;
	font-weight: 700;
}

.td-op__jobRows {
	display: grid;
	grid-template-columns: 56px 1fr auto;
	gap: 0 12px;
	font-size: 16px;
}

.td-op__jobRows > span {
	padding: 10px 0;
	border-top: 1px solid var(--td-line);
}

.td-op__jobTime {
	color: var(--td-muted);
}

.td-op__jobDest {
	font-weight: 600;
}

.td-op__jobDest small {
	display: block;
	font-weight: 400;
	color: var(--td-muted);
	font-size: 14px;
}

.td-op__jobFare {
	font-weight: 700;
	text-align: right;
}

.td-op__empty {
	font-size: 15px;
	color: var(--td-muted);
	padding: 10px 0;
	border-top: 1px solid var(--td-line);
}

.td-op__foot {
	margin-top: auto;
	padding: 20px 24px;
	font-size: 15px;
	color: var(--td-muted);
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: center;
}

.td-op__signout {
	background: none;
	border: 0;
	padding: 0;
	font-size: 15px;
	color: var(--td-muted);
	text-decoration: underline;
}

/* The full-screen "you're up" state. */
.td-op__called {
	flex: 1;
	background: var(--td-yellow);
	display: flex;
	flex-direction: column;
	padding: 28px 28px 32px;
}

.td-op__calledTitle {
	margin-top: 48px;
	font-size: 60px;
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.02em;
}

.td-op__calledLabel {
	margin-top: 24px;
	font-size: 20px;
	font-weight: 700;
}

.td-op__calledNumber {
	font-size: 180px;
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: -0.04em;
}

.td-op__calledLead {
	margin-top: 24px;
	font-size: 28px;
	font-weight: 800;
	line-height: 1.15;
}

.td-op__calledNote {
	margin-top: 16px;
	font-size: 18px;
	line-height: 1.45;
	font-weight: 500;
}

.td-op__calledBtn {
	margin-top: auto;
	height: 68px;
	background: var(--td-ink);
	color: #fff;
	border: 0;
	font-size: 21px;
	font-weight: 800;
	width: 100%;
}

.td-op__calledBtn[disabled] {
	opacity: 1;
	background: var(--td-green);
}

.td-op__steps {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 10px 8px;
	font-size: 17px;
	line-height: 1.4;
	margin-top: 12px;
}

.td-op__steps b {
	font-weight: 800;
}

/* ------------------------------------------------------------------ *
 * 3 Dispatcher
 * ------------------------------------------------------------------ */

.td-dispatch {
	min-height: 100vh;
	background: var(--td-surface);
	display: flex;
	flex-direction: column;
}

.td-dispatch__bar {
	background: var(--td-ink);
	color: #fff;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px 28px;
	padding: 10px 24px;
	min-height: 60px;
	font-size: 16px;
}

.td-dispatch__brand {
	font-size: 18px;
	font-weight: 800;
}

.td-dispatch__where {
	font-weight: 600;
}

.td-dispatch__arrival {
	color: var(--td-yellow);
	font-weight: 700;
}

.td-dispatch__who {
	margin-left: auto;
	font-weight: 600;
}

.td-dispatch__clock {
	font-weight: 800;
}

.td-dispatch__bar .td-op__signout {
	color: #fff;
}

.td-dispatch__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 460px;
	flex: 1;
	align-items: start;
}

.td-dispatch__queue {
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	border-right: 1px solid var(--td-line);
	min-width: 0;
}

.td-dispatch__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	font-size: 16px;
}

.td-dispatch__stats b {
	font-weight: 800;
}

.td-dispatch__stats .td-bad {
	color: var(--td-red);
}

.td-group__head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 12px;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--td-ink);
}

.td-group__title {
	font-size: 22px;
	font-weight: 800;
}

.td-group__note {
	font-size: 15px;
	color: var(--td-muted);
}

.td-qrow,
.td-qhead {
	display: grid;
	grid-template-columns: 56px 64px minmax(0, 1fr) 190px 150px 260px;
	gap: 0 12px;
	align-items: center;
}

.td-qhead {
	padding: 8px 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--td-muted);
	border-bottom: 1px solid var(--td-line);
}

.td-qrow {
	min-height: 52px;
	border-bottom: 1px solid var(--td-line-soft);
	font-size: 16px;
	background: var(--td-surface);
}

.td-qrow--next {
	background: var(--td-yellow-soft);
}

.td-qrow--blocked {
	background: var(--td-panel);
	color: var(--td-muted-soft);
}

.td-qrow--called {
	background: var(--td-yellow);
}

.td-qrow__pos {
	font-weight: 700;
	color: var(--td-muted);
	padding-left: 6px;
}

.td-qrow__num {
	font-size: 24px;
	font-weight: 900;
}

.td-qrow--blocked .td-qrow__num {
	color: var(--td-faint);
}

.td-qrow__op b {
	font-weight: 700;
}

.td-qrow__op span {
	color: var(--td-muted);
	font-size: 14px;
}

.td-qrow__veh {
	font-size: 14px;
	color: var(--td-text);
}

.td-qrow__notify {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.td-empty {
	padding: 18px 0;
	font-size: 16px;
	color: var(--td-muted);
}

.td-dispatch__panel {
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	background: var(--td-panel);
	min-width: 0;
}

.td-callnext {
	height: 76px;
	background: var(--td-ink);
	color: #fff;
	border: 0;
	font-size: 24px;
	font-weight: 800;
	text-align: left;
	padding: 0 22px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	width: 100%;
}

.td-callnext:hover {
	background: var(--td-ink-hover);
}

.td-callnext span:last-child {
	font-size: 18px;
	font-weight: 600;
	color: var(--td-yellow);
	text-align: right;
}

.td-counter {
	background: var(--td-surface);
	border: 1px solid var(--td-line);
	padding: 18px;
}

.td-counter__who {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	margin-top: 6px;
	flex-wrap: wrap;
}

.td-counter__num {
	font-size: 80px;
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: -0.03em;
}

.td-counter__name {
	display: block;
	font-size: 20px;
	font-weight: 800;
}

.td-counter__meta {
	font-size: 14px;
	color: var(--td-muted);
}

.td-counter__ack {
	display: inline-block;
	margin-top: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--td-green);
}

.td-counter__none {
	margin-top: 8px;
	font-size: 18px;
	color: var(--td-muted);
}

.td-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.td-form--idle {
	opacity: 0.45;
}

.td-form__title {
	font-size: 20px;
	font-weight: 800;
}

.td-seg {
	display: grid;
	border: 1.5px solid var(--td-ink);
}

.td-seg button {
	height: 48px;
	border: 0;
	border-right: 1px solid var(--td-ink);
	background: var(--td-surface);
	color: var(--td-ink);
	font-size: 15px;
	font-weight: 700;
}

.td-seg button:last-child {
	border-right: 0;
}

.td-seg button[aria-pressed='true'] {
	background: var(--td-ink);
	color: #fff;
}

.td-form__pair {
	display: grid;
	grid-template-columns: 170px 1fr;
	gap: 12px;
}

.td-stepper {
	display: grid;
	grid-template-columns: 48px 1fr 48px;
	border: 1.5px solid var(--td-ink);
	height: 52px;
	background: var(--td-surface);
}

.td-stepper button {
	border: 0;
	background: var(--td-surface);
	color: var(--td-ink);
	font-size: 24px;
	font-weight: 700;
}

.td-stepper button:first-child {
	border-right: 1px solid var(--td-ink);
}

.td-stepper button:last-child {
	border-left: 1px solid var(--td-ink);
}

.td-stepper output {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	font-weight: 800;
}

.td-fare {
	display: grid;
	grid-template-columns: 170px 1fr;
	gap: 12px;
	align-items: center;
}

.td-fare input {
	height: 52px;
	border: 1.5px solid var(--td-ink);
	font-size: 24px;
	font-weight: 800;
	padding: 0 12px;
	outline: none;
	width: 100%;
	background: var(--td-surface);
}

.td-fare__note {
	font-size: 14px;
	line-height: 1.35;
	color: var(--td-text);
}

.td-fare__error {
	font-size: 14px;
	font-weight: 700;
	color: var(--td-red);
}

.td-dispatch__go {
	height: 60px;
	background: var(--td-green);
	color: #fff;
	border: 0;
	font-size: 20px;
	font-weight: 800;
	width: 100%;
}

.td-dispatch__go:hover {
	background: var(--td-green-hover);
}

.td-refusal {
	display: flex;
	flex-direction: column;
	gap: 10px;
	border-top: 1px solid var(--td-line);
	padding-top: 18px;
}

.td-log {
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-top: 1px solid var(--td-line);
	padding-top: 18px;
}

.td-log__title {
	font-size: 16px;
	font-weight: 800;
}

.td-log__row {
	display: grid;
	grid-template-columns: 52px 44px 1fr auto;
	gap: 8px;
	font-size: 14px;
	padding: 6px 0;
	border-bottom: 1px solid var(--td-line-soft);
	align-items: baseline;
}

/* ------------------------------------------------------------------ *
 * 4 Staff / admin
 * ------------------------------------------------------------------ */

.td-admin {
	min-height: 100vh;
	background: var(--td-surface);
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
}

.td-admin__nav {
	background: var(--td-ink);
	color: #fff;
	display: flex;
	flex-direction: column;
	padding: 20px 0;
}

.td-admin__brand {
	padding: 0 20px 24px;
	font-size: 18px;
	font-weight: 800;
}

.td-admin__brand span {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: var(--td-border);
	margin-top: 4px;
}

.td-admin__nav button {
	height: 52px;
	text-align: left;
	padding: 0 20px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 17px;
	font-weight: 700;
}

.td-admin__nav button[aria-current='page'] {
	background: var(--td-surface);
	color: var(--td-ink);
}

/* The second sidebar group: links to the screens that are not tabs. */
.td-admin__group {
	padding: 28px 20px 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--td-faint);
}

.td-admin__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 44px;
	padding: 8px 20px;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.25;
}

.td-admin__link:hover,
.td-admin__link:focus {
	background: var(--td-ink-hover);
	color: var(--td-yellow);
}

.td-admin__who {
	margin-top: auto;
	padding: 24px 20px 0;
	font-size: 14px;
	color: var(--td-border);
}

.td-admin__who .td-op__signout {
	color: var(--td-border);
}

.td-admin__main {
	padding: 28px 36px;
	display: flex;
	flex-direction: column;
	gap: 28px;
	min-width: 0;
}

.td-admin__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	border-bottom: 3px solid var(--td-ink);
	padding-bottom: 14px;
}

.td-admin__title {
	font-size: 30px;
	font-weight: 800;
}

.td-admin__tools {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

.td-admin__tools .td-select,
.td-admin__tools .td-input {
	height: 42px;
	width: auto;
	font-size: 15px;
}

.td-admin__cols {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 36px;
}

.td-admin__cols--even {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
}

.td-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.td-block__title {
	font-size: 20px;
	font-weight: 800;
}

.td-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.td-table th {
	text-align: left;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--td-muted);
	padding: 8px 10px 8px 0;
	border-bottom: 1px solid var(--td-ink);
	white-space: nowrap;
}

.td-table td {
	padding: 9px 10px 9px 0;
	border-bottom: 1px solid var(--td-line-soft);
	vertical-align: middle;
}

.td-table td b {
	font-weight: 700;
}

.td-table .td-num {
	text-align: right;
	font-weight: 700;
}

.td-bar {
	display: flex;
	align-items: center;
	gap: 8px;
}

.td-bar__fill {
	height: 12px;
	background: var(--td-green);
	min-width: 2px;
}

.td-bar__pct {
	font-size: 13px;
}

.td-counts {
	display: flex;
	gap: 28px;
	flex-wrap: wrap;
	font-size: 16px;
}

.td-counts b {
	font-weight: 800;
}

.td-settings__group {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.td-setting {
	display: grid;
	grid-template-columns: 1fr 110px;
	gap: 16px;
	align-items: center;
	font-size: 16px;
}

.td-setting > span b {
	font-weight: 700;
}

.td-setting__hint {
	display: block;
	color: var(--td-muted);
	font-size: 14px;
	font-weight: 400;
	margin-top: 2px;
}

.td-setting input[type='number'],
.td-setting input[type='text'] {
	height: 46px;
	border: 1.5px solid var(--td-ink);
	font-size: 20px;
	font-weight: 800;
	padding: 0 10px;
	width: 100%;
	background: var(--td-surface);
}

.td-setting--wide {
	grid-template-columns: 1fr;
}

.td-setting--wide textarea {
	border: 1.5px solid var(--td-ink);
	font-size: 15px;
	padding: 10px;
	min-height: 72px;
	width: 100%;
	background: var(--td-surface);
}

.td-radio {
	display: flex;
	gap: 12px;
	align-items: center;
	font-size: 16px;
	flex-wrap: wrap;
}

.td-radio input[type='radio'] {
	width: 22px;
	height: 22px;
	accent-color: var(--td-ink);
}

.td-radio input[type='number'] {
	height: 40px;
	width: 80px;
	border: 1.5px solid var(--td-ink);
	font-size: 18px;
	font-weight: 800;
	padding: 0 8px;
	background: var(--td-surface);
}

.td-callout {
	font-size: 15px;
	color: var(--td-text);
	background: var(--td-panel-deep);
	padding: 12px 14px;
}

.td-reasons {
	display: flex;
	flex-direction: column;
	font-size: 16px;
}

.td-reasons span {
	padding: 9px 0;
	border-bottom: 1px solid var(--td-line-soft);
}

.td-fares__note {
	font-size: 14px;
	color: var(--td-muted);
	line-height: 1.4;
}

.td-fares__head {
	font-size: 14px;
	font-weight: 800;
	padding: 14px 0 4px;
}

.td-fares__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 110px 110px;
	gap: 0 12px;
	align-items: center;
	font-size: 15px;
	padding: 5px 0;
	border-bottom: 1px solid var(--td-line-soft);
}

.td-fares__row input {
	height: 38px;
	border: 1.5px solid var(--td-ink);
	font-size: 16px;
	font-weight: 700;
	padding: 0 8px;
	width: 100%;
	background: var(--td-surface);
}

.td-passcode {
	font-size: 34px;
	font-weight: 900;
	letter-spacing: 0.22em;
	padding: 14px 16px;
	background: var(--td-yellow);
	display: inline-block;
}

/* ------------------------------------------------------------------ *
 * 5 Display board
 * ------------------------------------------------------------------ */

.td-board {
	position: relative;
	width: 100%;
	min-height: 100vh;
	background: var(--td-board-bg);
	color: #fff;
	display: grid;
	grid-template-rows: clamp(84px, 13vh, 140px) 1fr clamp(68px, 10vh, 110px);
	overflow: hidden;
}

.td-board__bar {
	display: flex;
	align-items: center;
	gap: clamp(16px, 2vw, 32px);
	padding: 0 clamp(20px, 3vw, 56px);
	border-bottom: 2px solid var(--td-board-line);
	min-width: 0;
}

.td-board__logo {
	width: clamp(48px, 5vw, 92px);
	height: clamp(48px, 5vw, 92px);
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.td-board__logo img {
	max-width: 100%;
	max-height: 100%;
}

.td-board__title {
	font-size: clamp(22px, 2.7vw, 52px);
	font-weight: 800;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.td-board__arrival {
	margin-left: auto;
	font-size: clamp(16px, 1.9vw, 36px);
	font-weight: 600;
	color: var(--td-yellow);
	white-space: nowrap;
}

.td-board__clock {
	font-size: clamp(22px, 2.7vw, 52px);
	font-weight: 800;
	flex: none;
}

.td-board__body {
	display: grid;
	grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
	min-height: 0;
}

.td-board__now {
	background: var(--td-yellow);
	color: #000;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 clamp(24px, 3.4vw, 64px);
	min-width: 0;
}

.td-board__nowLabel {
	font-size: clamp(26px, 3.3vw, 64px);
	font-weight: 900;
}

.td-board__nowNumber {
	font-size: clamp(140px, 23vw, 440px);
	font-weight: 900;
	line-height: 0.85;
	letter-spacing: -0.05em;
	margin: clamp(10px, 1.6vh, 24px) 0;
}

.td-board__nowNote {
	font-size: clamp(20px, 2.5vw, 48px);
	font-weight: 800;
	line-height: 1.1;
}

.td-board__also {
	margin-top: clamp(8px, 1.4vh, 20px);
	font-size: clamp(16px, 1.8vw, 34px);
	font-weight: 700;
}

.td-board__nowIdle {
	font-size: clamp(22px, 2.8vw, 54px);
	font-weight: 800;
	line-height: 1.15;
	margin: clamp(10px, 1.6vh, 24px) 0;
}

/* Nothing calling: a quieter panel, so the room is not shouted at by an
   empty slot. */
.td-board__now--idle {
	background: var(--td-board-bg);
	color: var(--td-board-faint);
	border-right: 2px solid var(--td-board-line);
}

.td-board__next {
	padding: clamp(18px, 3.5vh, 40px) clamp(20px, 3vw, 56px);
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 2.4vh, 28px);
	min-height: 0;
}

.td-board__nextLabel {
	font-size: clamp(24px, 2.9vw, 56px);
	font-weight: 800;
}

.td-board__grid {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: clamp(8px, 1.1vw, 20px);
	min-height: 0;
}

.td-board__cell {
	border: 2px solid var(--td-board-cell);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	min-height: 0;
}

.td-board__cellIndex {
	position: absolute;
	top: clamp(6px, 1vh, 14px);
	left: clamp(8px, 1vw, 20px);
	font-size: clamp(14px, 1.7vw, 32px);
	font-weight: 700;
	color: var(--td-board-faint);
}

.td-board__cellNumber {
	font-size: clamp(56px, 10vw, 200px);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.04em;
}

.td-board__cell--empty .td-board__cellNumber {
	color: var(--td-board-cell);
}

.td-board__foot {
	display: flex;
	align-items: center;
	padding: 0 clamp(20px, 3vw, 56px);
	font-size: clamp(16px, 2vw, 38px);
	font-weight: 600;
	border-top: 2px solid var(--td-board-line);
}

.td-board__stale {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background: var(--td-red);
	color: #fff;
	font-size: clamp(14px, 1.4vw, 24px);
	font-weight: 800;
	padding: 6px 16px;
	text-align: center;
}

/* ------------------------------------------------------------------ *
 * Narrow screens
 *
 * The dispatcher and admin screens are drawn for a 1440 counter display, but a
 * supervisor opens them on a tablet, so the two-column layouts stack and the
 * queue rows drop their less important columns rather than scrolling sideways.
 * ------------------------------------------------------------------ */

@media (max-width: 1180px) {
	.td-dispatch__body {
		grid-template-columns: minmax(0, 1fr);
	}

	.td-dispatch__queue {
		border-right: 0;
		border-bottom: 1px solid var(--td-line);
	}

	.td-qrow,
	.td-qhead {
		grid-template-columns: 48px 56px minmax(0, 1fr) 230px;
	}

	.td-qrow__veh,
	.td-qhead > :nth-child(4) {
		display: none;
	}

	.td-admin {
		grid-template-columns: minmax(0, 1fr);
	}

	.td-admin__nav {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		padding: 12px 16px;
		gap: 8px;
	}

	.td-admin__brand,
	.td-admin__who {
		padding: 0;
		margin: 0;
	}

	.td-admin__nav button {
		height: 44px;
		padding: 0 14px;
	}

	/* Side by side on a tablet, with the group label out of the way. */
	.td-admin__group {
		display: none;
	}

	.td-admin__link {
		min-height: 44px;
		padding: 0 14px;
		font-size: 15px;
		border-left: 1px solid var(--td-ink-hover);
	}

	.td-admin__cols,
	.td-admin__cols--even {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.td-admin__main {
		padding: 20px 16px;
	}
}

@media (max-width: 720px) {
	.td-qrow,
	.td-qhead {
		grid-template-columns: 44px 52px minmax(0, 1fr);
	}

	.td-qrow__notify,
	.td-qhead > :nth-child(5),
	.td-qhead > :nth-child(6) {
		display: none;
	}

	.td-qrow--called .td-qrow__notify,
	.td-qrow--next .td-qrow__notify {
		display: flex;
		grid-column: 1 / -1;
		padding: 0 0 10px;
	}

	.td-dispatch__queue,
	.td-dispatch__panel {
		padding: 16px;
	}

	.td-form__pair,
	.td-fare {
		grid-template-columns: minmax(0, 1fr);
	}

	.td-counter__num {
		font-size: 64px;
	}

	.td-op {
		border: 0;
	}

	.td-board__body {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto 1fr;
	}

	.td-board__grid {
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: repeat(2, 1fr);
	}

	.td-board__cell:nth-child(n + 7) {
		display: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.td-qrow,
	.td-counter__num,
	.td-board__nowNumber {
		transition: background-color 120ms linear;
	}
}

/* ------------------------------------------------------------------ *
 * Theme overrides
 *
 * Astra styles form controls with attribute selectors such as
 * input[type="password"], which outrank a single class, so the plugin's own
 * borders lost on some fields and not others. These rules restate exactly
 * what the component layer already says, with enough specificity to win, and
 * nothing beyond that.
 * ------------------------------------------------------------------ */

.td input[type='text'],
.td input[type='tel'],
.td input[type='search'],
.td input[type='number'],
.td input[type='date'],
.td input[type='datetime-local'],
.td input[type='password'],
.td select,
.td textarea {
	border: 1.5px solid var(--td-ink);
	border-radius: 0;
	background: var(--td-surface);
	color: var(--td-ink);
	box-shadow: none;
	font-family: inherit;
	font-variant-numeric: tabular-nums;
}

.td input[type='text']:focus,
.td input[type='tel']:focus,
.td input[type='number']:focus,
.td input[type='password']:focus,
.td select:focus,
.td textarea:focus {
	outline: 3px solid var(--td-yellow);
	outline-offset: -1px;
}

.td .td-login__passcode {
	border: 2px solid var(--td-ink);
}

.td .td-login__phone input {
	border: 0;
}

.td .td-btn,
.td .td-callnext,
.td .td-dispatch__go,
.td .td-login__submit,
.td .td-op__calledBtn,
.td .td-admin__nav button,
.td .td-seg button[aria-pressed='true'] {
	color: #fff;
}

.td .td-admin__nav button[aria-current='page'] {
	color: var(--td-ink);
}

.td .td-btn--ghost,
.td .td-stepper button,
.td .td-seg button,
.td .td-op__signout {
	color: var(--td-ink);
}

.td .td-btn--danger {
	color: var(--td-red);
}

.td .td-dispatch__bar .td-op__signout {
	color: #fff;
}

.td .td-admin__who .td-op__signout {
	color: var(--td-border);
}

.td .td-admin__link {
	color: #fff;
	text-decoration: none;
}

.td .td-admin__link:hover,
.td .td-admin__link:focus {
	color: var(--td-yellow);
}

@media print {
	.td-admin__nav,
	.td-admin__tools,
	.td-dispatch__panel {
		display: none;
	}

	.td-admin,
	.td-dispatch__body {
		grid-template-columns: minmax(0, 1fr);
	}
}
