/* App-specific rules. The design system (colours, components, shell) is in css/collectionhub.css, the same as LocalGarages. */

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Signature pad (driver app): a box to sign in with a finger, pen or mouse (as LocalGarages check-in). */
.signature-pad { display: block; width: 100%; height: 180px; touch-action: none; background: #fff; border: 2px dashed #94a3b8; border-radius: .5rem; cursor: crosshair; }
.signature-image { max-width: 100%; height: 90px; background: #fff; border: 1px solid #dee2e6; border-radius: .375rem; }

/* Dashboard tiles. */
.kpi-tile { display: block; height: 100%; color: inherit; text-decoration: none; }
.kpi-tile:hover { border-color: #93b4f8; box-shadow: var(--ch-shadow-md); color: inherit; }
.kpi-label { font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ch-text-muted); }
.kpi-value { font-size: 2rem; font-weight: 650; letter-spacing: -.02em; color: #111827; }

/* Proof photos: square thumbnails. */
.proof-thumb { width: 104px; height: 104px; object-fit: cover; border-radius: var(--ch-radius-sm); border: 1px solid var(--ch-border); }

/* Online booking: big choice cards (a tap selects; the chosen one is outlined in blue). */
.choice-card { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .8rem 1rem; text-align: left; background: #fff; border: 1px solid #d0d5dd; border-radius: var(--ch-radius); }
.choice-card:hover { border-color: #93b4f8; background: #f8fafc; }
.choice-card.is-selected { border: 2px solid #2563eb; background: #eef3fe; padding: calc(.8rem - 1px) calc(1rem - 1px); }

/* Planning board: a column per van, cards in run order; drag a card onto a column or another card. */
.plan-board { display: flex; gap: 1rem; align-items: flex-start; overflow-x: auto; padding-bottom: .5rem; }
.plan-column { flex: 0 0 17.5rem; display: flex; flex-direction: column; gap: .5rem; min-height: 12rem; padding: .5rem; background: #eef1f5; border: 1px solid var(--ch-border); border-radius: var(--ch-radius); }
.plan-column-waiting { background: #fff8eb; border-color: #f5d48a; }
.plan-column.is-drop-target { outline: 2px dashed #93b4f8; outline-offset: 2px; }
.plan-column-header { padding: .35rem .5rem .5rem; border-bottom: 1px solid var(--ch-border); margin-bottom: .25rem; }
.plan-load { height: 6px; background: #dfe3ea; border-radius: 3px; overflow: hidden; }
.plan-load-bar { height: 100%; background: #2563eb; }
.plan-load-bar.is-over { background: #dc2626; }
.plan-card { background: #fff; border: 1px solid var(--ch-border); border-radius: var(--ch-radius-sm); padding: .55rem .65rem; box-shadow: var(--ch-shadow-sm); cursor: grab; }
.plan-card.is-locked { cursor: default; opacity: .75; background: #f8fafc; }
.plan-card.is-dragging { opacity: .45; }
.plan-card .min-w-0 { min-width: 0; }
.plan-card-actions { display: flex; align-items: center; gap: .15rem; margin-top: .35rem; padding-top: .35rem; border-top: 1px solid #eef1f5; }
.plan-stop-number { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; margin-right: .25rem; border-radius: 50%; background: #111827; color: #fff; font-size: .7rem; font-weight: 700; }
@media (max-width: 767.98px) {
    .plan-board { flex-direction: column; }
    .plan-column { flex-basis: auto; width: 100%; }
}

/* What's new: entries stacked in the pop-up with a rule between them; screenshots kept to a sensible height. */
.whats-new-entry + .whats-new-entry { border-top: 1px solid var(--bs-border-color); margin-top: 1rem; padding-top: 1rem; }
.whats-new-entry img { max-height: 420px; object-fit: contain; object-position: left top; }
.whats-new-list { max-width: 56rem; }

/* Driver app: big touch targets. */
.stop-card { color: inherit; text-decoration: none; }
.stop-card:hover { color: inherit; border-color: #93b4f8; }
.stop-card.is-done { opacity: .55; }
.tech-content .btn-lg { padding-top: .8rem; padding-bottom: .8rem; }

/* Performance: stat tiles and simple single-series bar charts (one hue, thin bars, 2px gaps, rounded data ends). */
.kpi-tile { height: 100%; }
.kpi-value { font-size: 1.75rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--ch-text-muted); font-size: .85rem; }
.bar-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; border-bottom: 1px solid #d0d5dd; }
.bar-chart-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; }
.bar-chart-col:hover { background: rgba(37, 99, 235, .06); }
.bar-chart-bar { width: 100%; max-width: 28px; margin: 0 auto; background: #2563eb; border-radius: 4px 4px 0 0; min-height: 0; }
.bar-chart-col:hover .bar-chart-bar { background: #1d4ed8; }
.bar-chart-tip { display: none; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap;
    background: #111827; color: #fff; font-size: .75rem; padding: .25rem .5rem; border-radius: .35rem; z-index: 2; pointer-events: none; }
.bar-chart-col:hover .bar-chart-tip { display: block; }
.bar-chart-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ch-text-muted); margin-top: .25rem; }
.hbar { height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: #2563eb; border-radius: 0 4px 4px 0; }

/* Trade portal: the brand bar on top, the page on the light background. */
.portal-page { min-height: 100vh; background: var(--ch-page-bg); }
.portal-header { background: var(--ch-sidebar-bg); color: #fff; }
.portal-header-inner { max-width: 1200px; margin: 0 auto; padding: .9rem 16px; display: flex; align-items: center; gap: .75rem; }
.portal-header-sub { color: var(--ch-sidebar-muted); }
.portal-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 16px 3rem; }

/* Container labels: A6 cards, four to an A4 page when printed. */
.print-page { background: #fff; min-height: 100vh; padding: 16px; }
.print-toolbar { margin-bottom: 16px; }
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(105mm, 1fr)); gap: 0; }
.container-label { box-sizing: border-box; width: 105mm; height: 148mm; padding: 9mm 8mm; border: 1px dashed #c7cdd8;
    display: flex; flex-direction: column; align-items: center; text-align: center; color: #111827; break-inside: avoid; }
.container-label-business { font-weight: 700; font-size: 15pt; }
.container-label-ask { font-size: 13pt; margin: 2mm 0 3mm; }
.container-label-qr { width: 72mm; height: 72mm; }
.container-label-qr svg { width: 100%; height: 100%; display: block; }
.container-label-name { font-weight: 700; font-size: 16pt; margin-top: 3mm; }
.container-label-site { font-size: 10pt; color: #475467; }
.container-label-foot { margin-top: auto; font-size: 10pt; display: flex; gap: 4mm; justify-content: center; }
@media print {
    @page { size: A4; margin: 0; }
    .print-toolbar { display: none; }
    .print-page { padding: 0; }
    .label-sheet { grid-template-columns: repeat(2, 105mm); }
}

/* Maps: a fixed-height box; vans are labelled badges, supplier sites are dots. */
.map-box { height: 520px; border-radius: var(--ch-radius); border: 1px solid var(--ch-border); z-index: 0; }
.map-box-small { height: 260px; }
.map-van { background: #2563eb; color: #fff; font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 999px;
    border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); white-space: nowrap; width: auto !important; height: auto !important;
    transform-origin: center; margin-left: -20px; margin-top: -12px; }
.map-van.is-weighing { background: #b45309; }
.map-van.is-stale { background: #667085; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d0d5dd; margin-right: 4px; vertical-align: -1px; }
