/* Primary GE Fleet TMS: dispatch board */
.pge-dispatch {
	--sign: #00613F;
	--sign-dark: #004A30;
	--sign-tint: #DCEFE5;
	--ink: #1B2421;
	--muted: #5B6661;
	--line: #D5DBD8;
	--surface: #F4F6F5;
	--amber: #E0A800;
	--amber-bg: #FFF6D6;
	--red: #B42318;
	--red-bg: #FDECEA;
	--display: "Overpass", "Helvetica Neue", Arial, sans-serif;
	color: var(--ink);
	font-size: 15px;
	line-height: 1.45;
}
.pge-dispatch *, .pge-dispatch *::before { box-sizing: border-box; }
.pge-dispatch h2, .pge-dispatch h3, .pge-dispatch h4 { font-family: var(--display); font-weight: 800; line-height: 1.15; margin: 0; }
.pge-dispatch a { color: var(--sign); }
.pge-dispatch :focus-visible { outline: 3px solid var(--sign); outline-offset: 2px; }
.pd-muted { color: var(--muted); }
.pd-money { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-load { font-family: var(--display); font-weight: 800; text-decoration: none; }
.pd-empty { color: var(--muted); margin: 6px 0 0; }
.pd-neg strong { color: var(--red); }

/* Buttons */
.pd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	font-family: var(--display);
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	padding: 10px 14px 8px;
	border-radius: 6px;
	border: 2px solid var(--sign);
	background: #fff;
	color: var(--sign);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
}
.pd-btn:hover { background: var(--sign-tint); color: var(--sign-dark); }
.pd-btn.pd-primary { background: var(--sign); color: #fff; }
.pd-btn.pd-primary:hover { background: var(--sign-dark); border-color: var(--sign-dark); color: #fff; }
.pd-big { min-height: 48px; font-size: 17px; padding: 12px 22px 10px; }
.pd-inline { display: inline; margin: 0; }

/* Header and figures */
.pd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.pd-head h2 { font-size: clamp(28px, 4vw, 38px); }
.pd-head p { margin: 2px 0 0; color: var(--muted); }
.pd-head-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-figures {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 2px solid var(--ink);
	border-bottom: 1px solid var(--line);
	margin-bottom: 22px;
}
.pd-figures > div { padding: 12px 16px 10px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.pd-figures > div:first-child { border-left: 0; padding-left: 0; }
.pd-figures strong { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pd-figures span { color: var(--muted); font-size: 13px; }

.pd-notice { padding: 12px 14px; border-left: 4px solid var(--sign); background: var(--surface); margin: 0 0 16px; }
.pd-notice-err { border-left-color: var(--red); background: var(--red-bg); }

/* Book a load */
.pd-book { border: 2px solid var(--sign); border-radius: 10px; margin-bottom: 28px; }
.pd-book summary {
	cursor: pointer;
	font-family: var(--display);
	font-weight: 800;
	font-size: 19px;
	padding: 12px 18px 10px;
	color: var(--sign);
	list-style-position: inside;
}
.pd-book[open] summary { border-bottom: 1px solid var(--line); }
.pd-book > p, .pd-book-form { padding: 16px 18px 18px; margin: 0; }
.pd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.pd-wide { grid-column: span 3; }
.pd-grid label, .pd-row-pick label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.pge-dispatch input[type=text], .pge-dispatch input[type=number], .pge-dispatch input[type=datetime-local], .pge-dispatch select, .pge-dispatch textarea {
	width: 100%;
	font: inherit;
	padding: 9px 10px;
	border: 1px solid #A9B3AE;
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
	min-height: 42px;
}
.pd-grid small { display: block; margin-top: 4px; }
.pd-check { display: flex; gap: 8px; align-items: center; margin: 16px 0 12px; font-weight: 600; }

/* Sections */
.pd-section { margin-bottom: 30px; }
.pd-section h3 { font-size: 22px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.pd-count {
	font-size: 14px;
	font-weight: 800;
	background: var(--sign);
	color: #fff;
	border-radius: 4px;
	padding: 3px 7px 1px;
}

/* Ready to dispatch */
.pd-rows { display: flex; flex-direction: column; }
.pd-row {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 10px 16px;
	align-items: end;
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
	margin: 0;
}
.pd-row-main { align-self: center; }
.pd-lane { font-family: var(--display); font-weight: 700; font-size: 17px; margin-top: 2px; }
.pd-row-go { display: flex; gap: 6px; }

/* On the road */
.pd-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pd-col { background: var(--surface); border-radius: 10px; padding: 12px; min-width: 0; }
.pd-col h4 { font-size: 16px; display: flex; justify-content: space-between; margin-bottom: 10px; }
.pd-col h4 span { color: var(--muted); }
.pd-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--sign); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.pd-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pd-customer { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.pd-flag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--red); background: var(--red-bg); border-radius: 4px; padding: 2px 6px; margin: 0 4px 6px 0; }
.pd-route { list-style: none; margin: 4px 0 10px; padding: 0 0 0 14px; border-left: 3px dashed var(--line); }
.pd-route li { margin-bottom: 6px; position: relative; }
.pd-route li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--sign); }
.pd-route li:last-child::before { background: var(--ink); }
.pd-route span { display: block; font-family: var(--display); font-weight: 700; }
.pd-route small { color: var(--muted); font-size: 13px; }
.pd-crew { display: flex; flex-direction: column; font-size: 14px; margin-bottom: 10px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-actions .pd-btn { font-size: 14px; min-height: 38px; padding: 8px 10px 6px; }

/* Billing */
.pd-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.pd-bill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pd-bill .pd-flag { margin: 2px 0 0; }
.pd-bill-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }

/* Alerts */
.pd-alerts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.pd-alerts li { padding: 8px 12px; border-left: 4px solid var(--amber); background: var(--amber-bg); }
.pd-alerts li.pd-alert-overdue { border-left-color: var(--red); background: var(--red-bg); }
.pd-alerts a { color: var(--ink); text-decoration: none; }
.pd-alerts a:hover { text-decoration: underline; }
.pd-foot { color: var(--muted); font-size: 13px; }

@media (max-width: 1100px) {
	.pd-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pd-wide { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
	.pd-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pd-figures > div:nth-child(3) { border-left: 0; padding-left: 0; }
	.pd-figures > div:nth-child(n+3) { border-top: 1px solid var(--line); }
	.pd-row { grid-template-columns: 1fr 1fr; }
	.pd-row-main, .pd-row-go { grid-column: 1 / -1; }
	.pd-row-go .pd-btn { flex: 1; min-height: 46px; }
	.pd-board, .pd-two, .pd-alerts { grid-template-columns: 1fr; }
	.pd-col:empty { display: none; }
}
@media (max-width: 480px) {
	.pd-grid { grid-template-columns: 1fr; }
}
