:root {
    color-scheme: light;
    --background: #f3f5f4;
    --surface: #ffffff;
    --surface-muted: #edf3f1;
    --ink: #152421;
    --ink-muted: #5c6966;
    --brand: #00856d;
    --brand-dark: #123035;
    --brand-soft: #def3ed;
    --accent: #e4a41e;
    --danger: #a62a31;
    --danger-soft: #fff0f1;
    --border: #d5dfdc;
    --focus: #075fce;
    --shadow: 0 12px 32px rgb(20 35 31 / 8%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 100% 0, rgb(0 108 84 / 9%), transparent 24rem),
        var(--background);
    line-height: 1.5;
}

a {
    color: var(--brand-dark);
}

a:hover {
    text-decoration-thickness: 0.14rem;
}

:focus-visible {
    outline: 0.2rem solid var(--focus);
    outline-offset: 0.2rem;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.75rem 1rem;
    color: #fff;
    background: var(--focus);
    border-radius: 0.35rem;
    transform: translateY(-180%);
    transition: transform 120ms ease-in-out;
}

.skip-link:focus {
    transform: translateY(0);
}

.app-shell {
    display: grid;
    grid-template-columns: 16.5rem minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    padding: 1.4rem 1rem;
    flex-direction: column;
    color: #f4f9f7;
    background:
        linear-gradient(165deg, rgb(0 133 109 / 18%), transparent 42%),
        #10252a;
    border-right: 1px solid rgb(255 255 255 / 8%);
}

.app-workspace {
    display: grid;
    min-width: 0;
    grid-template-rows: auto 1fr auto;
}

.app-header {
    display: flex;
    min-height: 5rem;
    padding: 0.85rem clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    color: var(--ink);
    background: rgb(255 255 255 / 92%);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(0.75rem);
}

.app-header > div:first-child {
    display: grid;
    gap: 0.15rem;
}

.topbar-label {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 750;
    text-decoration: none;
}

.brand > span:last-child {
    display: grid;
    line-height: 1.15;
}

.brand small {
    margin-top: 0.2rem;
    color: #9cb5b0;
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-mark {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    color: #fff;
    background: var(--brand);
    border-radius: 0.6rem;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
}

.operator-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.7rem;
    color: var(--ink);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-size: 0.85rem;
}

.operator-badge > span:last-child {
    display: grid;
}

.operator-badge small {
    color: var(--ink-muted);
    font-size: 0.67rem;
}

.operator-status {
    width: 0.6rem;
    height: 0.6rem;
    background: #25a97e;
    border: 0.15rem solid #cdeee2;
    border-radius: 50%;
    box-sizing: content-box;
}

.demo-mode-banner {
    position: relative;
    display: flex;
    min-height: 7.5rem;
    margin-bottom: 2rem;
    padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    overflow: hidden;
    color: #effbf7;
    background:
        radial-gradient(circle at 78% -80%, rgb(118 229 199 / 34%), transparent 18rem),
        linear-gradient(120deg, #102e33, #075947);
    border: 1px solid rgb(83 201 171 / 32%);
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgb(13 36 39 / 14%);
}

.demo-mode-banner::after {
    position: absolute;
    right: 18%;
    bottom: -4.5rem;
    width: 12rem;
    height: 7rem;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 50%;
    content: "";
}

.demo-banner-copy {
    position: relative;
    z-index: 1;
    display: grid;
    max-width: 48rem;
    gap: 0.25rem;
}

.demo-banner-copy > strong {
    font-size: clamp(1.15rem, 2.3vw, 1.55rem);
    letter-spacing: -0.015em;
}

.demo-banner-copy p {
    margin-bottom: 0;
    color: #c9e2dc;
    font-size: 0.86rem;
}

.demo-banner-kicker {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 0.1rem;
    align-items: center;
    gap: 0.45rem;
    color: #7ee0c4;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.demo-banner-kicker > span {
    width: 0.5rem;
    height: 0.5rem;
    background: #55d5b3;
    border: 0.16rem solid rgb(85 213 179 / 25%);
    border-radius: 50%;
    box-sizing: content-box;
}

.demo-banner-account {
    position: relative;
    z-index: 1;
    display: grid;
    min-width: 12rem;
    padding: 0.75rem 1rem;
    color: #fff;
    background: rgb(255 255 255 / 9%);
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 0.75rem;
}

.demo-banner-account small {
    color: #a7cdc4;
    font-size: 0.68rem;
}

.demo-banner-account strong {
    font-size: 0.96rem;
}

.primary-navigation {
    display: grid;
    margin-top: 2.5rem;
    gap: 0.35rem;
}

.primary-navigation a {
    display: flex;
    min-height: 3.1rem;
    padding: 0.7rem 0.8rem;
    align-items: center;
    gap: 0.75rem;
    color: #bed0cc;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
}

.primary-navigation a.active {
    color: #fff;
    background: rgb(0 133 109 / 28%);
    border-color: rgb(79 204 174 / 24%);
}

.navigation-icon {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    color: #79d4bd;
    font-size: 1.25rem;
}

.sidebar-context {
    display: grid;
    margin-top: auto;
    padding: 1rem;
    gap: 0.25rem;
    color: #eaf4f1;
    background: rgb(255 255 255 / 5%);
    border: 1px solid rgb(255 255 255 / 9%);
    border-radius: 0.8rem;
}

.sidebar-context-label {
    color: #87a7a0;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-context small {
    color: #9cb5b0;
    font-size: 0.73rem;
}

.main-content {
    width: min(90rem, calc(100% - clamp(2rem, 5vw, 5rem)));
    margin-inline: auto;
    padding-block: 2.75rem 4rem;
}

.app-footer {
    padding: 1.25rem clamp(1.25rem, 3vw, 2.5rem);
    color: var(--ink-muted);
    border-top: 1px solid var(--border);
    font-size: 0.84rem;
}

.page-heading,
.detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0.35rem;
    font-size: clamp(1.8rem, 4vw, 2.55rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

h2 {
    margin-bottom: 0.35rem;
    font-size: 1.25rem;
}

.eyebrow {
    margin-bottom: 0.4rem;
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-introduction {
    max-width: 42rem;
    margin-bottom: 0;
    color: var(--ink-muted);
}

.count-badge {
    display: grid;
    min-width: 3rem;
    height: 3rem;
    padding-inline: 0.7rem;
    place-items: center;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid #b9e7d6;
    border-radius: 0.75rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.live-badge {
    display: inline-flex;
    min-height: 2.3rem;
    padding: 0.45rem 0.75rem;
    align-items: center;
    gap: 0.45rem;
    color: #326259;
    background: #edf8f4;
    border: 1px solid #cbe9df;
    border-radius: 99rem;
    font-size: 0.76rem;
    font-weight: 750;
}

.live-badge > span {
    width: 0.55rem;
    height: 0.55rem;
    background: #18a578;
    border-radius: 50%;
    box-shadow: 0 0 0 0.22rem #ccefe3;
}

.live-button {
    font: inherit;
    cursor: pointer;
}

.live-button:hover {
    color: #174c42;
    background: #def3ec;
}

.live-badge-warning,
.live-badge-warning:hover {
    color: #714507;
    background: #fff4db;
    border-color: #e9c875;
}

.live-badge > .synchronization-dot-warning,
.detail-refresh .synchronization-dot-warning {
    background: #cf8610;
    box-shadow: 0 0 0 0.22rem #f9e4b5;
}

.kpi-grid {
    display: grid;
    margin-bottom: 1.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.kpi-card {
    display: flex;
    min-height: 7rem;
    padding: 1.25rem;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    box-shadow: 0 0.35rem 1.5rem rgb(20 35 31 / 5%);
}

.kpi-card > div {
    display: grid;
    gap: 0.1rem;
}

.kpi-card strong {
    color: var(--brand);
    font-size: 2rem;
    line-height: 1;
}

.kpi-card span:last-child {
    color: var(--ink-muted);
    font-size: 0.86rem;
}

.kpi-icon {
    display: grid;
    width: 3.2rem;
    height: 3.2rem;
    flex: 0 0 auto;
    place-items: center;
    color: #007b66;
    background: #e5f4ef;
    border-radius: 0.7rem;
    font-size: 1.45rem;
    font-weight: 800;
}

.kpi-icon-calendar {
    color: #ba7610;
    background: #fff4df;
}

.kpi-icon-blue {
    color: #1261a6;
    background: #e8f2fd;
}

.kpi-icon-slate {
    color: #4b5e63;
    background: #e9eef0;
}

.state-panel {
    display: flex;
    min-height: 14rem;
    padding: 2.5rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.state-panel p {
    color: var(--ink-muted);
}

.state-panel-error {
    background: var(--danger-soft);
    border-color: #efc3c6;
}

.state-icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    place-items: center;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 850;
}

.state-panel-error .state-icon {
    color: var(--danger);
    background: #ffdadd;
}

.spinner {
    width: 2.3rem;
    height: 2.3rem;
    margin-bottom: 1rem;
    border: 0.25rem solid var(--brand-soft);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.button {
    display: inline-flex;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    color: #fff;
    background: var(--brand);
}

.button-primary:hover {
    background: var(--brand-dark);
}

.button-secondary {
    color: var(--brand-dark);
    background: var(--surface);
    border-color: var(--border);
}

.button-secondary:hover {
    background: var(--surface-muted);
}

.button:disabled,
.button:disabled:hover {
    color: #82908c;
    background: #eef1f0;
    border-color: #dce3e1;
    cursor: not-allowed;
}

.detail-refresh {
    display: flex;
    margin-bottom: 1rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink-muted);
    font-size: 0.78rem;
}

.detail-refresh > span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-refresh > span > span {
    width: 0.5rem;
    height: 0.5rem;
    background: #18a578;
    border-radius: 50%;
    box-shadow: 0 0 0 0.2rem #ccefe3;
}

.detail-refresh-warning > span {
    color: #86590e;
    font-weight: 750;
}

.table-scroll {
    overflow-x: auto;
}

.section-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    box-shadow: var(--shadow);
}

.section-heading {
    display: flex;
    padding: 1.2rem 1.3rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-heading .eyebrow,
.section-heading h2 {
    margin-bottom: 0;
}

.section-heading .eyebrow {
    margin-bottom: 0.2rem;
}

.section-count {
    padding: 0.32rem 0.6rem;
    color: var(--ink-muted);
    background: var(--surface-muted);
    border-radius: 99rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.supervision-toolbar {
    display: grid;
    padding: 1rem 1.3rem;
    grid-template-columns: minmax(15rem, 1.5fr) repeat(2, minmax(11rem, 0.8fr)) auto;
    align-items: end;
    gap: 0.85rem;
    background: #f8faf9;
    border-bottom: 1px solid var(--border);
}

.filter-field {
    display: grid;
    min-width: 0;
    gap: 0.35rem;
}

.filter-field label {
    color: #43534f;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.6rem 0.75rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #bdcbc7;
    border-radius: 0.55rem;
    font: inherit;
}

.filter-field input:hover,
.filter-field select:hover {
    border-color: #8ca49e;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--focus);
}

.search-input {
    position: relative;
}

.search-input > span {
    position: absolute;
    top: 50%;
    left: 0.8rem;
    color: var(--ink-muted);
    font-size: 1.15rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input input {
    padding-left: 2.35rem;
}

.filter-reset {
    white-space: nowrap;
}

.filter-summary {
    display: flex;
    min-height: 3.1rem;
    padding: 0.7rem 1.3rem;
    align-items: center;
    gap: 0.45rem;
    color: var(--ink-muted);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.84rem;
}

.filter-summary strong {
    display: grid;
    min-width: 1.75rem;
    height: 1.75rem;
    padding-inline: 0.4rem;
    place-items: center;
    color: #fff;
    background: var(--brand);
    border-radius: 99rem;
    font-size: 0.76rem;
}

.filter-empty {
    display: flex;
    min-height: 18rem;
    padding: 2rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.filter-empty h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.filter-empty p {
    margin-bottom: 1.2rem;
    color: var(--ink-muted);
}

.receptions-table {
    width: 100%;
    min-width: 68rem;
    border-collapse: collapse;
}

.receptions-table th,
.receptions-table td {
    padding: 1rem 0.9rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.receptions-table th {
    color: var(--ink-muted);
    background: var(--surface-muted);
    font-size: 0.76rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.receptions-table tbody tr:last-child td {
    border-bottom: 0;
}

.receptions-table tbody tr:hover {
    background: #f9fbfa;
}

.receptions-table strong,
.badge {
    display: block;
}

.badge {
    width: fit-content;
    margin-top: 0.4rem;
    padding: 0.18rem 0.48rem;
    border-radius: 99rem;
    font-size: 0.7rem;
    font-weight: 750;
    line-height: 1.35;
}

.badge-status {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.badge-demo {
    color: #654300;
    background: #fff1c8;
    border: 1px solid #efd380;
}

.registration {
    display: inline-block;
    padding: 0.18rem 0.45rem;
    background: #f1f3f2;
    border: 1px solid #c8d0cd;
    border-radius: 0.25rem;
    font-family: ui-monospace, "Cascadia Mono", monospace;
    font-weight: 750;
    letter-spacing: 0.045em;
    white-space: nowrap;
}

.action-cell {
    text-align: right !important;
}

.detail-link {
    display: inline-block;
    padding: 0.45rem;
    font-weight: 750;
    white-space: nowrap;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.detail-card {
    padding: clamp(1.25rem, 4vw, 2.25rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.badge-stack {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 0.35rem;
}

.badge-stack .badge {
    margin-top: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--border);
}

.detail-grid > div {
    min-width: 0;
    padding: 1.2rem 1rem 1.2rem 0;
    border-bottom: 1px solid var(--border);
}

.detail-grid dt {
    margin-bottom: 0.35rem;
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    font-weight: 650;
}

.reception-detail {
    display: grid;
    gap: 1.25rem;
}

.detail-hero {
    display: grid;
    min-height: 9rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    color: #fff;
    background:
        radial-gradient(circle at 72% -20%, rgb(45 190 154 / 26%), transparent 18rem),
        #153036;
    border: 1px solid #24494f;
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgb(13 36 39 / 14%);
}

.detail-hero .eyebrow {
    color: #6dd3ba;
}

.detail-hero h1 {
    margin-bottom: 0.3rem;
}

.detail-subtitle {
    margin-bottom: 0;
    color: #c3d4d0;
}

.vehicle-identity {
    display: grid;
    padding: 0.7rem 1rem;
    gap: 0.15rem;
    color: #24302e;
    background: #f8faf9;
    border: 0.18rem solid #d3dbd8;
    border-radius: 0.45rem;
    box-shadow: inset 0 0 0 1px #8b9995;
}

.vehicle-identity span {
    color: #66736f;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vehicle-identity strong {
    font-family: ui-monospace, "Cascadia Mono", monospace;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.detail-hero .badge-status {
    color: #baf4e3;
    background: rgb(0 133 109 / 28%);
    border: 1px solid rgb(111 219 191 / 28%);
}

.dossier-snapshot {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    box-shadow: 0 0.35rem 1.5rem rgb(20 35 31 / 5%);
}

.dossier-snapshot > header {
    display: flex;
    padding: 1rem 1.2rem;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.dossier-snapshot h2,
.dossier-snapshot .eyebrow {
    margin-bottom: 0;
}

.dossier-snapshot > header > p {
    max-width: 35rem;
    margin-bottom: 0;
    color: var(--ink-muted);
    font-size: 0.78rem;
    text-align: right;
}

.dossier-stage-list {
    display: grid;
    padding: 0;
    margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
}

.dossier-stage-list li {
    display: flex;
    min-width: 0;
    min-height: 5.5rem;
    padding: 1rem 1.2rem;
    align-items: center;
    gap: 0.8rem;
    border-top: 0.22rem solid #cbd4d1;
    border-right: 1px solid var(--border);
}

.dossier-stage-list li:last-child {
    border-right: 0;
}

.stage-number {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    place-items: center;
    color: #596864;
    background: #edf1f0;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 850;
}

.dossier-stage-list li > div {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.dossier-stage-list strong,
.dossier-stage-list li > div > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dossier-stage-list li > div > span {
    color: var(--ink-muted);
    font-size: 0.77rem;
}

.dossier-stage-list .stage-available {
    border-top-color: var(--brand);
}

.stage-available .stage-number {
    color: #fff;
    background: var(--brand);
}

.dossier-stage-list .stage-progress {
    border-top-color: var(--accent);
}

.stage-progress .stage-number {
    color: #583900;
    background: #f8dda4;
}

.detail-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.tracking-card {
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    box-shadow: var(--shadow);
}

.tracking-card-heading {
    display: flex;
    min-height: 5rem;
    padding: 1rem 1.15rem;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.tracking-card-heading > div {
    min-width: 0;
}

.tracking-card-heading .eyebrow,
.tracking-card-heading h2 {
    margin-bottom: 0;
}

.tracking-card-heading h2 {
    font-size: 1.05rem;
}

.tracking-icon,
.file-icon {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    place-items: center;
    color: #007c66;
    background: #e4f4ef;
    border-radius: 0.65rem;
    font-size: 1.15rem;
}

.tracking-icon-blue {
    color: #1767aa;
    background: #e9f2fc;
}

.tracking-icon-amber {
    color: #a86b09;
    background: #fff3dc;
}

.card-count {
    display: grid;
    min-width: 2rem;
    height: 2rem;
    margin-left: auto;
    padding-inline: 0.45rem;
    place-items: center;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-radius: 99rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.tracking-card .detail-grid {
    padding-inline: 1.15rem;
    border-top: 0;
}

.compact-empty {
    display: grid;
    min-height: 9rem;
    padding: 1.5rem;
    place-content: center;
    gap: 0.3rem;
    color: var(--ink-muted);
    text-align: center;
}

.compact-empty strong {
    color: var(--ink);
}

.document-list,
.weight-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.document-list li {
    display: grid;
    padding: 0.85rem 1rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.document-list li:last-child {
    border-bottom: 0;
}

.document-list li > div {
    display: grid;
    min-width: 0;
}

.document-list li > div > span,
.file-meta {
    color: var(--ink-muted);
    font-size: 0.76rem;
}

.document-list li strong,
.document-list li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    justify-items: end;
    text-align: right;
}

.file-meta small {
    color: var(--brand);
}

.file-meta .document-hash {
    max-width: 10rem;
    margin-top: 0.25rem;
    color: var(--ink-muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.67rem;
}

.document-download {
    display: inline-flex;
    margin-top: 0.35rem;
    align-items: center;
    color: var(--brand-dark);
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
}

.document-download:hover {
    text-decoration: underline;
}

.tracking-card-weight {
    grid-column: 1 / -1;
}

.weight-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.38fr);
}

.weight-list li {
    display: grid;
    min-height: 4.6rem;
    padding: 0.8rem 1rem;
    grid-template-columns: 8rem 8rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.weight-list li:last-child {
    border-bottom: 0;
}

.weight-list strong {
    font-size: 1.05rem;
}

.weight-list li > span:not(.weight-type),
.weight-list small {
    color: var(--ink-muted);
    font-size: 0.76rem;
}

.weight-type {
    width: fit-content;
    padding: 0.28rem 0.52rem;
    color: #16614f;
    background: #e5f4ef;
    border-radius: 99rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.net-weight {
    display: grid;
    min-height: 10rem;
    padding: 1.3rem;
    place-content: center;
    gap: 0.25rem;
    color: #fff;
    background: linear-gradient(145deg, #007a64, #005846);
    text-align: center;
}

.net-weight > span {
    color: #bfe8dc;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.net-weight strong {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.net-weight small {
    color: #bfe8dc;
}

.net-weight-pending {
    color: var(--ink);
    background: #f1f4f3;
}

.net-weight-pending > span,
.net-weight-pending small {
    color: var(--ink-muted);
}

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

@media (max-width: 60rem) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
        display: grid;
        width: 100%;
        height: auto;
        padding: 0.75rem 1rem;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 1rem;
    }

    .primary-navigation {
        justify-self: end;
        margin-top: 0;
    }

    .sidebar-context {
        display: none;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .supervision-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-search {
        grid-column: 1 / -1;
    }

    .filter-reset {
        width: 100%;
    }

    .table-scroll {
        overflow: visible;
    }

    .receptions-table {
        display: block;
        min-width: 0;
        padding: 1rem;
        background: #f3f6f5;
    }

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

    .receptions-table tbody {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .receptions-table tr {
        display: block;
        min-width: 0;
        padding: 1rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 0.75rem;
        box-shadow: 0 0.25rem 1rem rgb(20 35 31 / 5%);
    }

    .receptions-table td {
        display: grid;
        padding: 0.4rem 0;
        grid-template-columns: minmax(7.5rem, 0.45fr) minmax(0, 1fr);
        gap: 0.65rem;
        border-bottom: 0;
    }

    .receptions-table td::before {
        content: attr(data-label);
        color: var(--ink-muted);
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 0.025em;
        text-transform: uppercase;
    }

    .receptions-table td:first-child {
        display: block;
        padding: 0 0 0.75rem;
        margin-bottom: 0.35rem;
        border-bottom: 1px solid var(--border);
    }

    .receptions-table td:first-child::before,
    .receptions-table .action-cell::before {
        content: none;
    }

    .receptions-table .action-cell {
        display: block;
        padding-top: 0.75rem;
        text-align: left !important;
    }

    .receptions-table .detail-link {
        display: flex;
        width: 100%;
        min-height: 2.6rem;
        align-items: center;
        justify-content: center;
        color: #fff;
        background: var(--brand);
        border-radius: 0.45rem;
        text-decoration: none;
    }

    .detail-hero {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .detail-hero .badge-stack {
        grid-column: 1 / -1;
        align-items: flex-start;
        flex-direction: row;
    }

    .detail-panels {
        grid-template-columns: 1fr;
    }

    .tracking-card-weight {
        grid-column: auto;
    }
}

@media (max-width: 42rem) {
    .app-header {
        min-height: 4.25rem;
        padding-inline: 0.9rem;
    }

    .app-header > div:first-child {
        display: none;
    }

    .operator-badge {
        max-width: 13rem;
        margin-left: auto;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .demo-mode-banner {
        padding: 1.1rem;
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
    }

    .demo-banner-account {
        min-width: 0;
    }

    .main-content {
        width: min(100% - 1.25rem, 90rem);
        padding-top: 1.75rem;
    }

    .page-heading,
    .detail-heading {
        gap: 1rem;
    }

    .page-heading,
    .detail-heading {
        flex-direction: column;
    }

    .live-button {
        align-self: flex-start;
    }

    .badge-stack {
        align-items: flex-start;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .supervision-toolbar {
        grid-template-columns: 1fr;
    }

    .filter-search {
        grid-column: auto;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .receptions-table tbody {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        grid-template-columns: 1fr;
    }

    .vehicle-identity {
        width: fit-content;
    }

    .dossier-snapshot > header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .dossier-snapshot > header > p {
        text-align: left;
    }

    .dossier-stage-list {
        grid-template-columns: 1fr;
    }

    .dossier-stage-list li {
        min-height: 4.8rem;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .dossier-stage-list li:last-child {
        border-bottom: 0;
    }

    .weight-content {
        grid-template-columns: 1fr;
    }

    .weight-list li {
        grid-template-columns: 1fr auto;
    }

    .weight-list li > span:not(.weight-type) {
        grid-column: 1 / -1;
    }

    .document-list li {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .file-meta {
        grid-column: 2;
        justify-items: start;
        text-align: left;
    }

    .detail-refresh {
        align-items: flex-start;
        flex-direction: column;
    }
}
