/* Path: /dashboard/kme/assets/css/app.css */
:root {
    --navy: #123a63;
    --navy-strong: #0a2744;
    --green: #16803c;
    --teal: #087f8c;
    --amber: #c77700;
    --red: #b42318;
    --ink: #16202a;
    --muted: #64748b;
    --line: #d9e2ec;
    --surface: #ffffff;
    --page: #f3f6fa;
    --soft: #eef3f8;
    --shadow: 0 12px 26px rgba(15, 35, 55, .07);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    font-family: "Anuphan", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    background:
        linear-gradient(180deg, rgba(18, 58, 99, .07), rgba(245, 248, 251, 0) 300px),
        var(--page);
}

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

button,
input,
select {
    font: inherit;
}

.app-frame {
    min-height: 100vh;
}

.sidebar {
    display: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(217, 226, 236, .76);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    font-weight: 700;
    color: var(--navy-strong);
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--navy);
}

.brand-text {
    display: none;
}

.top-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
}

.topbar-heading {
    display: none;
    min-width: 0;
}

.topbar-heading-title {
    display: flex;
    align-items: baseline;
    min-width: 0;
    gap: 10px;
}

.topbar-eyebrow {
    flex: 0 0 auto;
    color: var(--teal);
    font-size: .72rem;
    font-weight: 800;
}

.topbar-heading h1 {
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    color: var(--navy-strong);
    font-size: 1rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-heading p {
    margin: 2px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-access {
    display: none;
}

.lang-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(42px, 1fr));
    min-height: 44px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #eef4f8;
}

.lang-button {
    min-height: 36px;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.lang-button.is-active {
    color: var(--navy-strong);
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 35, 55, .1);
}

.page-shell {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 14px 16px 92px;
}

.hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0 16px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--teal);
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
}

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

h1 {
    max-width: 820px;
    margin-bottom: 8px;
    color: var(--navy-strong);
    font-size: clamp(1.9rem, 5vw, 3rem);
    line-height: 1.05;
}

h2 {
    margin-bottom: 14px;
    color: var(--navy-strong);
    font-size: 1.05rem;
}

.hero-copy {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.6;
}

.access-chip {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-weight: 700;
}

.access-chip.is-deep {
    color: var(--green);
    border-color: rgba(22, 128, 60, .25);
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 800;
}

.primary-button {
    color: #fff;
    background: var(--navy);
    box-shadow: 0 10px 18px rgba(18, 58, 99, .18);
}

.primary-button.compact,
.ghost-button {
    min-height: 44px;
    border-radius: 16px;
}

.ghost-button {
    color: var(--navy);
    border-color: var(--line);
    background: #fff;
}

.primary-button.full {
    width: 100%;
}

.filter-panel,
.kpi-grid,
.dashboard-grid,
.detail-grid,
.admin-grid {
    display: grid;
    gap: 14px;
}

.kpi-grid {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
}

.filter-panel,
.metric-card,
.chart-panel,
.insight-panel,
.quality-panel,
.table-panel,
.route-panel,
.locked-panel,
.login-card {
    border: 1px solid rgba(217, 226, 236, .9);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-card {
    position: relative;
    min-width: 0;
    min-height: 132px;
    overflow: hidden;
    padding: 16px 16px 16px 76px;
}

.metric-card::before {
    position: absolute;
    top: 18px;
    left: 16px;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    color: var(--navy);
    background: rgba(18, 58, 99, .1);
    content: "▣";
    font-weight: 900;
}

.metric-card:nth-child(2)::before {
    color: #d06700;
    background: rgba(208, 103, 0, .12);
    content: "●";
}

.metric-card:nth-child(3)::before {
    color: #d06700;
    background: rgba(208, 103, 0, .12);
    content: "▲";
}

.metric-card:nth-child(4)::before {
    color: var(--green);
    background: rgba(22, 128, 60, .12);
    content: "◆";
}

.metric-card:nth-child(5)::before {
    color: #1f68b3;
    background: rgba(31, 104, 179, .12);
    content: "◕";
}

.metric-card:nth-child(6)::before {
    color: var(--red);
    background: rgba(180, 35, 24, .12);
    content: "!";
}

.metric-card span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card strong {
    display: block;
    max-width: 100%;
    margin-top: 12px;
    overflow: hidden;
    color: var(--navy-strong);
    font-size: clamp(1.9rem, 11vw, 2.65rem);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-overflow: clip;
    white-space: nowrap;
}

.metric-card strong span {
    display: inline;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.metric-card.warning strong {
    color: var(--amber);
}

.filter-panel {
    margin-bottom: 14px;
    padding: 14px;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.filter-form label {
    margin: 0;
}

.filter-field {
    min-width: 0;
}

.date-input-wrap {
    position: relative;
    min-width: 0;
}

.date-input-wrap input {
    padding-right: 52px;
}

.date-input-wrap input::-webkit-calendar-picker-indicator {
    opacity: 0;
}

.date-picker-button {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--navy);
    background: var(--soft);
    cursor: pointer;
    transform: translateY(-50%);
}

.date-picker-button::before {
    width: 16px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-width: 5px;
    border-radius: 4px;
    content: "";
}

select {
    width: 100%;
    min-height: 52px;
    padding: 0 42px 0 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(18, 58, 99, .12);
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: end;
}

.export-button {
    grid-column: 1 / -1;
}

.chart-panel,
.insight-panel,
.quality-panel,
.table-panel,
.route-panel,
.locked-panel {
    min-width: 0;
    padding: 18px;
}

.dashboard-grid {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
}

.insight-panel {
    margin-bottom: 14px;
}

.insight-list {
    display: grid;
    gap: 10px;
}

.insight-card {
    display: grid;
    gap: 4px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #d6e4ec;
    border-left: 5px solid var(--teal);
    border-radius: 8px;
    background: #f8fbfd;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .45s ease, transform .45s ease;
}

.insight-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.insight-card.warning {
    border-left-color: var(--amber);
}

.insight-card.success {
    border-left-color: var(--green);
}

.insight-title {
    color: var(--navy-strong);
    font-weight: 800;
}

.insight-message {
    color: var(--muted);
    line-height: 1.55;
}

.quality-panel {
    margin-bottom: 14px;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.quality-card {
    min-height: 88px;
    padding: 12px;
    border: 1px solid #d6e4ec;
    border-radius: 8px;
    background: #f8fbfd;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .45s ease, transform .45s ease;
}

.quality-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.quality-card.warning strong {
    color: var(--amber);
}

.quality-card.success strong {
    color: var(--green);
}

.quality-card span {
    display: block;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.35;
}

.quality-card strong {
    display: block;
    margin-top: 8px;
    color: var(--navy-strong);
    font-size: 1.65rem;
}

.bar-chart {
    display: grid;
    gap: 12px;
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(96px, 34%) 1fr minmax(44px, auto);
    align-items: center;
    gap: 10px;
    min-height: 34px;
}

.bar-label {
    overflow: hidden;
    color: var(--ink);
    font-size: .85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eff5;
}

.bar-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--navy), var(--teal));
    transition: width 900ms cubic-bezier(.22, 1, .36, 1);
}

.bar-value,
.pill-value {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
    text-align: right;
}

.pill-chart {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #d6e4ec;
    border-radius: 999px;
    background: #f8fbfd;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .45s ease, transform .45s ease;
}

.pill-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
}

.locked-panel {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.locked-panel p {
    color: var(--muted);
    line-height: 1.7;
}

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

.route-panel {
    grid-column: 1 / -1;
}

.route-map {
    display: grid;
    gap: 12px;
}

.route-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 76px;
    padding: 12px;
    border: 1px solid #d6e4ec;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbfd, #fff);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .45s ease, transform .45s ease;
}

.route-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.route-line {
    position: relative;
    height: 8px;
    margin: 12px 10px 4px;
    border-radius: 999px;
    background: #dbe7ef;
}

.route-line::before,
.route-line::after {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    content: "";
    transform: translateY(-50%);
}

.route-line::before {
    left: -4px;
    background: var(--green);
}

.route-line::after {
    right: -4px;
    background: var(--navy);
}

.route-title {
    color: var(--navy-strong);
    font-weight: 800;
    line-height: 1.45;
}

.route-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: .8rem;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: .88rem;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-tag {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--green);
    background: rgba(22, 128, 60, .1);
    font-weight: 800;
}

.status-tag.cancelled {
    color: var(--red);
    background: rgba(180, 35, 24, .1);
}

.status-tag.pending {
    color: var(--amber);
    background: rgba(199, 119, 0, .12);
}

.login-shell {
    display: grid;
    min-height: calc(100vh - 190px);
    place-items: center;
}

.login-card {
    width: min(460px, 100%);
    padding: 22px;
}

.login-card h1 {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
}

label {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--navy-strong);
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(18, 58, 99, .12);
}

input.is-invalid {
    border-color: var(--red);
}

small {
    color: var(--muted);
    font-weight: 500;
    line-height: 1.5;
}

.form-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--red);
    background: rgba(180, 35, 24, .1);
    font-weight: 700;
}

.form-success {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--green);
    background: rgba(22, 128, 60, .1);
    font-weight: 700;
}

.table-input {
    min-width: 120px;
    min-height: 44px;
    border-radius: 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0 20px;
}

.report-section {
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid rgba(217, 226, 236, .9);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.report-filter-grid,
.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.report-filter-grid div,
.report-kpi-grid div {
    padding: 12px;
    border: 1px solid #d6e4ec;
    border-radius: 8px;
    background: #f8fbfd;
}

.report-filter-grid span,
.report-kpi-grid span {
    display: block;
    color: var(--muted);
    font-size: .8rem;
}

.report-filter-grid strong,
.report-kpi-grid strong {
    display: block;
    margin-top: 6px;
    color: var(--navy-strong);
}

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

.cookie-banner {
    position: fixed;
    right: 16px;
    bottom: 86px;
    left: 16px;
    z-index: 30;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow);
}

.cookie-banner[hidden],
.cookie-banner.is-hidden {
    display: none !important;
}

.sticky-actions {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 18;
    display: grid;
}

.panel-animate {
    opacity: 0;
    transform: translateY(16px);
    animation: panelIn .62s ease forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes panelIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 720px) {
    .brand-text {
        display: inline;
    }

    .topbar-heading {
        display: grid;
        flex: 1 1 auto;
        gap: 2px;
        margin-inline: 8px;
    }

    .page-shell {
        padding: 20px 24px 44px;
    }

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

    .metric-card strong {
        font-size: clamp(1.75rem, 3.9vw, 2.35rem);
    }

    .filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

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

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

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

    .sticky-actions {
        display: none;
    }

    .cookie-banner {
        left: auto;
        grid-template-columns: 1fr auto;
        width: min(620px, calc(100% - 32px));
        bottom: 20px;
    }
}

@media (min-width: 1024px) {
    .topbar {
        padding-inline: 28px;
    }

    .topbar-heading {
        margin-inline: 16px;
    }

    .topbar-heading h1 {
        font-size: 1.08rem;
    }

    .topbar-heading p {
        font-size: .76rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .filter-form {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        column-gap: 12px;
        row-gap: 16px;
    }

    .filter-field {
        grid-column: span 4;
    }

    .filter-actions {
        grid-column: span 12;
        justify-content: end;
    }

    .filter-actions {
        grid-template-columns: repeat(4, auto);
    }

    .filter-actions .primary-button,
    .filter-actions .ghost-button {
        min-width: 108px;
    }

    .export-button {
        grid-column: auto;
    }
}

@media (min-width: 1180px) {
    .app-frame {
        display: grid;
        grid-template-columns: 224px 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        display: grid;
        min-height: 100vh;
        grid-template-rows: auto 1fr auto;
        border-right: 1px solid rgba(217, 226, 236, .9);
        background: rgba(255, 255, 255, .96);
    }

    .sidebar-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 84px;
        padding: 18px 20px;
        border-bottom: 1px solid rgba(217, 226, 236, .75);
        color: var(--navy-strong);
    }

    .sidebar-brand img {
        width: 50px;
        height: 50px;
        object-fit: contain;
    }

    .sidebar-brand strong,
    .sidebar-brand small {
        display: block;
    }

    .sidebar-brand strong {
        color: #ef5b22;
        font-size: 1.15rem;
        line-height: 1;
    }

    .sidebar-brand small {
        margin-top: 4px;
        color: var(--muted);
        font-size: .76rem;
        line-height: 1.25;
    }

    .sidebar-nav {
        display: grid;
        align-content: start;
        gap: 8px;
        padding: 18px 14px;
    }

    .sidebar-nav a {
        display: grid;
        grid-template-columns: 28px 1fr;
        align-items: center;
        min-height: 48px;
        padding: 0 12px;
        border-radius: 0;
        color: #465568;
        font-weight: 700;
    }

    .sidebar-nav a.is-active {
        color: #ef5b22;
        background: linear-gradient(90deg, rgba(239, 91, 34, .13), rgba(239, 91, 34, 0));
        box-shadow: inset 4px 0 0 #ef5b22;
    }

    .sidebar-foot {
        display: grid;
        gap: 4px;
        padding: 18px 20px;
        color: var(--muted);
        font-size: .78rem;
    }

    .sidebar-foot strong {
        color: var(--navy-strong);
        font-size: .82rem;
    }

    .topbar .brand {
        display: none;
    }

    .topbar {
        min-height: 70px;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(217, 226, 236, .86);
        background: rgba(255, 255, 255, .82);
    }

    .topbar-heading {
        grid-template-columns: minmax(0, 1fr) auto;
        margin-inline: 0 18px;
    }

    .topbar-heading-title,
    .topbar-heading p {
        grid-column: 1;
    }

    .topbar-heading-title {
        gap: 12px;
    }

    .topbar-heading h1 {
        font-size: clamp(1.08rem, 1.25vw, 1.36rem);
    }

    .topbar-heading p {
        font-size: .8rem;
    }

    .topbar-access {
        display: inline-flex;
        width: fit-content;
        min-height: 28px;
        align-items: center;
        padding: 4px 10px;
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--muted);
        background: #fff;
        font-size: .78rem;
        font-weight: 700;
        grid-column: 2;
        grid-row: 1 / span 2;
        justify-self: start;
        align-self: center;
    }

    .topbar-access.is-deep {
        color: var(--green);
        border-color: rgba(22, 128, 60, .26);
        background: rgba(22, 128, 60, .08);
    }

    .page-shell {
        width: min(1540px, 100%);
        padding: 8px 28px 48px;
    }

    .hero {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: start;
        padding: 0 0 14px;
    }

    .hero h1 {
        max-width: 900px;
        font-size: clamp(2.05rem, 3vw, 3.65rem);
    }

    .filter-panel {
        width: min(1480px, 100%);
        margin-inline: auto;
        padding: 14px;
    }

    .filter-form {
        grid-template-columns:
            minmax(140px, 1fr)
            minmax(140px, 1fr)
            repeat(4, minmax(122px, .9fr))
            auto;
        column-gap: 12px;
        row-gap: 12px;
        align-items: end;
    }

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

    .date-field {
        grid-column: auto;
    }

    .filter-actions {
        grid-column: auto;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 8px;
    }

    .filter-actions .primary-button,
    .filter-actions .ghost-button {
        min-width: 92px;
        min-height: 44px;
        padding-inline: 14px;
        white-space: nowrap;
    }

    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .metric-card {
        min-height: 116px;
        padding: 15px 12px 15px 62px;
    }

    .metric-card::before {
        left: 14px;
        width: 38px;
        height: 38px;
    }

    .metric-card strong {
        font-size: clamp(1.72rem, 1.75vw, 2.12rem);
    }

    .metric-card:nth-child(3) strong,
    .metric-card:nth-child(4) strong {
        font-size: clamp(1.62rem, 1.55vw, 1.95rem);
    }

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

    .dashboard-grid > .chart-panel {
        grid-column: span 4;
    }

    .dashboard-grid > .chart-panel:nth-child(1),
    .dashboard-grid > .chart-panel:nth-child(2) {
        grid-column: span 6;
    }

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

    .detail-grid > .table-panel {
        grid-column: span 6;
    }

    .detail-grid > .route-panel,
    .detail-grid > .table-panel:last-child {
        grid-column: span 12;
    }
}

@media print {
    body {
        background: #fff;
    }

    .topbar,
    .sidebar,
    .cookie-banner,
    .sticky-actions,
    .print-button {
        display: none !important;
    }

    .page-shell {
        width: 100%;
        padding: 0;
    }

    .panel-animate,
    .insight-card,
    .quality-card {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .report-section,
    .metric-card,
    .chart-panel,
    .table-panel,
    .insight-panel,
    .quality-panel {
        box-shadow: none;
        break-inside: avoid;
    }
}
