:root {
    --navy-950: #071827;
    --navy-900: #0b2238;
    --navy-800: #12344f;
    --navy-700: #1b4965;
    --terra-600: #008f91;
    --terra-500: #00a8a8;
    --terra-100: #dff7f5;
    --orange-600: #d86716;
    --orange-500: #f07a24;
    --orange-100: #fff0e5;
    --red-700: #b42318;
    --red-100: #fee4e2;
    --slate-900: #1c2733;
    --slate-700: #475467;
    --slate-600: #667085;
    --slate-400: #98a2b3;
    --slate-300: #d0d5dd;
    --slate-200: #e4e7ec;
    --slate-100: #f2f4f7;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(7, 24, 39, 0.08), 0 1px 2px rgba(7, 24, 39, 0.04);
    --shadow-md: 0 14px 35px rgba(7, 24, 39, 0.09), 0 3px 8px rgba(7, 24, 39, 0.04);
    --radius-sm: 0.65rem;
    --radius-md: 1rem;
    --radius-lg: 1.35rem;
    --shell: 94rem;
    --id-width: 7.5rem;
    --name-width: 15rem;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    background: var(--slate-50);
    color: var(--slate-900);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 8%, rgba(0, 168, 168, 0.08), transparent 26rem),
        linear-gradient(180deg, #f7fafc 0, #eef3f7 100%);
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.shell {
    width: min(calc(100% - 2.5rem), var(--shell));
    margin-inline: auto;
}

.site-header {
    color: var(--white);
    background: linear-gradient(112deg, var(--navy-950), var(--navy-800));
    border-bottom: 3px solid var(--terra-500);
    box-shadow: 0 8px 26px rgba(7, 24, 39, 0.2);
}

.header-inner {
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.brand-mark {
    width: 2.65rem;
    height: 2.65rem;
    display: grid;
    place-items: center;
    border-radius: 0.85rem;
    color: var(--navy-950);
    background: linear-gradient(145deg, #55ded8, var(--terra-500));
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.45), 0 6px 18px rgba(0, 168, 168, 0.25);
}

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

.brand strong {
    letter-spacing: -0.02em;
    font-size: 1.1rem;
}

.brand small {
    color: #b7c9d7;
    font-size: 0.73rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #d9e8ef;
    font-size: 0.83rem;
}

.status-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #50d6ae;
    box-shadow: 0 0 0 4px rgba(80, 214, 174, 0.13);
}

.page-main {
    padding-block: 2.4rem 3.5rem;
}

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.45rem;
}

.hero h1,
.panel h2,
.state-card h1,
.state-card h2 {
    margin: 0;
    color: var(--navy-950);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.hero-copy {
    max-width: 43rem;
    margin: 0.55rem 0 0;
    color: var(--slate-600);
}

.eyebrow {
    margin: 0 0 0.35rem;
    color: var(--terra-600);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.period-badge {
    flex: none;
    min-width: 13rem;
    padding: 0.9rem 1.1rem;
    color: var(--white);
    background: linear-gradient(130deg, var(--navy-900), var(--navy-700));
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: right;
}

.period-badge span,
.period-badge strong {
    display: block;
}

.period-badge span {
    color: #9ce9e4;
    font-weight: 800;
    text-transform: capitalize;
}

.period-badge strong {
    margin-top: 0.15rem;
    font-size: 0.82rem;
}

.filter-card,
.panel,
.state-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(208, 213, 221, 0.8);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
}

.filter-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1.3rem;
}

.filter-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 15rem;
}

.filter-heading strong,
.filter-heading small {
    display: block;
}

.filter-heading strong {
    color: var(--navy-900);
}

.filter-heading small,
.panel-note {
    color: var(--slate-600);
    font-size: 0.8rem;
}

.filter-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 0.7rem;
    color: var(--terra-600);
    background: var(--terra-100);
    font-size: 1.4rem;
    font-weight: 800;
}

.filter-fields,
.customer-tools {
    display: flex;
    align-items: flex-end;
    gap: 0.7rem;
}

label > span:not(.sr-only) {
    display: block;
    margin-bottom: 0.28rem;
    color: var(--slate-600);
    font-size: 0.72rem;
    font-weight: 700;
}

input,
select {
    min-height: 2.6rem;
    color: var(--slate-900);
    background: var(--white);
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    outline: none;
}

select {
    min-width: 8rem;
    padding: 0.55rem 2.2rem 0.55rem 0.75rem;
}

input {
    padding: 0.55rem 0.75rem;
}

input:focus,
select:focus,
.table-scroll:focus {
    border-color: var(--terra-500);
    box-shadow: 0 0 0 3px rgba(0, 168, 168, 0.15);
}

.button {
    min-height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.95rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 750;
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--terra-600), var(--terra-500));
    box-shadow: 0 6px 15px rgba(0, 143, 145, 0.18);
}

.button--secondary {
    color: var(--navy-900);
    background: var(--white);
    border-color: var(--slate-300);
}

.button--quiet {
    min-height: auto;
    padding-inline: 0.45rem;
    color: var(--slate-600);
    background: transparent;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.3rem;
}

.metric-card {
    min-width: 0;
    min-height: 8.2rem;
    grid-column: span 4;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
}

.metric-card::after {
    content: "";
    width: 4rem;
    height: 4rem;
    position: absolute;
    right: -1.8rem;
    bottom: -2rem;
    border-radius: 50%;
    background: var(--terra-100);
}

.metric-card--featured {
    color: var(--white);
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    border-color: transparent;
}

.metric-card--featured::after {
    background: rgba(0, 168, 168, 0.28);
}

.metric-label {
    color: var(--slate-600);
    font-size: 0.73rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.metric-card--featured .metric-label,
.metric-card--featured small {
    color: #c3d9e4;
}

.metric-card strong {
    max-width: 100%;
    position: relative;
    z-index: 1;
    color: var(--navy-950);
    font-size: clamp(1.35rem, 2.1vw, 1.85rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.metric-card--featured strong {
    color: var(--white);
}

.metric-card:nth-child(-n + 2) strong {
    font-size: clamp(1.35rem, 1.75vw, 1.85rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.035em;
    white-space: nowrap;
}

.metric-card--compact {
    grid-column: span 5;
}

.metric-card--compact:nth-last-child(4) {
    grid-column: 1 / span 5;
}

.metric-card small {
    position: relative;
    z-index: 1;
    color: var(--slate-600);
    font-size: 0.72rem;
}

.panel {
    padding: 1.25rem;
    margin-top: 1.3rem;
    box-shadow: var(--shadow-md);
}

.panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel h2 {
    font-size: 1.4rem;
}

.panel-note {
    margin: 0.2rem 0 0;
}

.category-list {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.category-row {
    min-height: 4rem;
    display: grid;
    grid-template-columns: minmax(12rem, 1.5fr) minmax(5rem, 0.55fr) minmax(8rem, 0.9fr) minmax(8rem, 0.9fr) minmax(5.5rem, 0.6fr) minmax(12rem, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--slate-200);
}

.category-row:first-child {
    border-top: 0;
}

.category-row:not(.category-row--header):hover {
    background: var(--slate-50);
}

.category-row--header {
    min-height: 2.5rem;
    color: var(--slate-600);
    background: var(--slate-100);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--navy-900);
}

.category-dot {
    width: 0.65rem;
    height: 0.65rem;
    flex: none;
    border-radius: 50%;
    background: var(--terra-500);
    box-shadow: 0 0 0 4px var(--terra-100);
}

.category-row:nth-child(3n + 1) .category-dot {
    background: var(--orange-500);
    box-shadow: 0 0 0 4px var(--orange-100);
}

.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.negative {
    color: var(--red-700) !important;
    font-weight: 750;
}

.share-cell {
    display: grid;
    grid-template-columns: 3.4rem 1fr;
    align-items: center;
    gap: 0.65rem;
    color: var(--slate-700);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

progress {
    width: 100%;
    height: 0.62rem;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--slate-200);
}

progress::-webkit-progress-bar {
    background: var(--slate-200);
    border-radius: 999px;
}

progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--terra-600), var(--terra-500));
    border-radius: 999px;
}

progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--terra-600), var(--terra-500));
    border-radius: 999px;
}

.panel-heading--customers {
    align-items: center;
}

.customer-tools {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search-field {
    position: relative;
}

.search-field > span:not(.sr-only) {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    margin: 0;
    transform: translateY(-50%);
    color: var(--slate-400);
    font-size: 1.1rem;
}

.search-field input {
    width: min(19rem, 58vw);
    padding-left: 2.25rem;
}

.customer-scroll {
    position: relative;
}

.table-scroll-guide {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 1.8rem;
}

.table-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--slate-600);
    font-size: 0.75rem;
    font-weight: 700;
}

.table-scroll-hint span {
    color: var(--terra-600);
    font-size: 1rem;
}

.table-scroll--top {
    height: 1rem;
    margin-bottom: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 999px;
}

.table-scroll-spacer {
    height: 1px;
}

.table-scroll-frame {
    position: relative;
}

.table-scroll-frame::after {
    position: absolute;
    z-index: 7;
    top: 0;
    right: 0;
    bottom: 1rem;
    width: 2.75rem;
    content: "";
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(15, 42, 61, 0.16));
    transition: opacity 160ms ease;
}

.customer-scroll.has-overflow:not(.is-at-end) .table-scroll-frame::after {
    opacity: 1;
}

.table-scroll {
    max-width: 100%;
    overflow: auto;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    outline: none;
    scrollbar-color: var(--slate-400) var(--slate-100);
}

.customer-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--slate-700);
    font-size: 0.78rem;
}

.customer-table th,
.customer-table td {
    min-width: 7.5rem;
    height: 3.25rem;
    padding: 0.55rem 0.7rem;
    background: var(--white);
    border-right: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
    vertical-align: middle;
}

.customer-table tr:last-child th,
.customer-table tr:last-child td {
    border-bottom: 0;
}

.customer-table th:last-child,
.customer-table td:last-child {
    border-right: 0;
}

.customer-table thead th {
    color: var(--navy-900);
    background: #eaf1f5;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.customer-table .subgroup-row th {
    height: 2.25rem;
    color: var(--slate-600);
    background: var(--slate-100);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.customer-table tbody tr:hover td,
.customer-table tbody tr:hover th {
    background: #f4fbfa;
}

.sticky-col {
    position: sticky;
    z-index: 3;
}

.sticky-id {
    left: 0;
    width: var(--id-width);
    min-width: var(--id-width) !important;
    max-width: var(--id-width);
}

.sticky-name {
    left: var(--id-width);
    width: var(--name-width);
    min-width: var(--name-width) !important;
    max-width: var(--name-width);
    box-shadow: 5px 0 9px -8px rgba(7, 24, 39, 0.75);
}

.customer-table thead .sticky-col {
    z-index: 5;
    background: #dbe8ee;
}

.customer-number {
    color: var(--terra-600);
    text-align: left;
    font-weight: 800;
}

.customer-name {
    overflow: hidden;
    color: var(--navy-900);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.total-column {
    color: var(--navy-900);
    background: #f0f7f7 !important;
}

.comparison-panel {
    display: grid;
    gap: 1.4rem;
}

.comparison-empty,
.comparison-list-empty {
    padding: 1rem 1.2rem;
    color: var(--slate-600);
    background: var(--slate-50);
    border: 1px dashed var(--slate-300);
    border-radius: var(--radius-md);
}

.comparison-empty strong {
    color: var(--navy-900);
}

.comparison-empty p,
.comparison-list-empty {
    margin: 0.25rem 0 0;
}

.comparison-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
}

.comparison-table {
    width: 100%;
    min-width: 52rem;
    border-collapse: collapse;
    background: var(--white);
    font-size: 0.82rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.7rem 0.75rem;
    border-right: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
    white-space: nowrap;
}

.comparison-table th {
    color: var(--navy-900);
    text-align: left;
}

.comparison-table thead th {
    background: #dbe8ee;
}

.comparison-table tr:last-child > * {
    border-bottom: 0;
}

.comparison-table tr > *:last-child {
    border-right: 0;
}

.comparison-subheading,
.comparison-list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.comparison-subheading h3,
.comparison-list-heading h4 {
    margin: 0;
    color: var(--navy-900);
}

.comparison-subheading--customers {
    align-items: flex-start;
}

.comparison-customer-section {
    display: grid;
    gap: 0.65rem;
}

.comparison-customer-table {
    min-width: 112rem;
}

.comparison-list-heading h4 span {
    color: var(--slate-600);
    font-weight: 700;
}

.table-empty {
    padding: 2.6rem 1.5rem;
    color: var(--slate-600);
    background: var(--slate-50);
    border: 1px dashed var(--slate-300);
    border-radius: var(--radius-md);
    text-align: center;
}

.table-empty strong {
    color: var(--navy-900);
}

.table-empty p {
    margin: 0.25rem 0 0;
}

.state-card {
    min-height: 17rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem;
    margin-top: 1.2rem;
    text-align: left;
}

.state-card p:not(.eyebrow) {
    max-width: 40rem;
    color: var(--slate-600);
}

.state-card .button {
    margin-top: 0.5rem;
}

.state-icon {
    width: 3.25rem;
    height: 3.25rem;
    flex: none;
    display: grid;
    place-items: center;
    color: var(--terra-600);
    background: var(--terra-100);
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 900;
}

.state-card--warning .state-icon,
.state-card--error .state-icon {
    color: var(--orange-600);
    background: var(--orange-100);
}

.site-footer {
    color: var(--slate-600);
    background: rgba(255, 255, 255, 0.75);
    border-top: 1px solid var(--slate-200);
    font-size: 0.75rem;
}

.footer-inner {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sr-only {
    width: 1px;
    height: 1px;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

@media (max-width: 75rem) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-card,
    .metric-card--compact,
    .metric-card--featured {
        grid-column: span 1;
    }

    .metric-card--compact:nth-last-child(4) {
        grid-column: 1 / span 1;
    }

    .filter-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-fields {
        width: 100%;
        flex-wrap: wrap;
    }

    .category-row {
        grid-template-columns: minmax(11rem, 1.35fr) minmax(4rem, 0.45fr) minmax(7.5rem, 0.8fr) minmax(7.5rem, 0.8fr) minmax(5rem, 0.55fr) minmax(10rem, 1fr);
    }
}

@media (max-width: 52rem) {
    :root {
        --id-width: 6.6rem;
        --name-width: 11.5rem;
    }

    .shell {
        width: min(calc(100% - 1.25rem), var(--shell));
    }

    .page-main {
        padding-block: 1.45rem 2.5rem;
    }

    .hero,
    .panel-heading,
    .panel-heading--customers {
        align-items: flex-start;
        flex-direction: column;
    }

    .period-badge {
        min-width: 0;
        width: 100%;
        text-align: left;
    }

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

    .metric-card,
    .metric-card--featured {
        min-height: 7.4rem;
        grid-column: span 1;
    }

    .category-list {
        overflow-x: auto;
    }

    .category-row {
        min-width: 53rem;
    }

    .customer-tools {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .search-field,
    .search-field input {
        width: 100%;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding-block: 1rem;
    }
}

@media (max-width: 36rem) {
    .header-status {
        max-width: 8rem;
        justify-content: flex-end;
        text-align: right;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .filter-fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .filter-fields label:last-of-type,
    .filter-fields .button {
        grid-column: span 2;
    }

    .filter-fields select,
    .filter-fields .button {
        width: 100%;
    }

    .metric-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.6rem;
    }

    .metric-card,
    .metric-card--compact,
    .metric-card--compact:nth-last-child(4) {
        grid-column: span 1;
        padding: 0.85rem;
    }

    .metric-card strong {
        font-size: 1.35rem;
    }

    .panel {
        padding: 0.8rem;
        border-radius: var(--radius-md);
    }

    .customer-tools select,
    .customer-tools .button {
        flex: 1;
    }
}

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

/* Fase 8: functionele statusweergave voor het read-only Aandachtcentrum. */
.attention-center {
    border-top: 0.25rem solid var(--terra-500);
}

.attention-heading,
.attention-card-top,
.attention-badges,
.attention-filters,
.attention-hardware {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.attention-heading,
.attention-card-top {
    justify-content: space-between;
}

.attention-total,
.attention-badge,
.attention-priority,
.attention-pattern {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.76rem;
    font-weight: 800;
}

.attention-total {
    color: var(--navy-800);
    background: var(--terra-100);
}

.attention-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.attention-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--slate-200);
    border-left: 0.3rem solid var(--slate-400);
    border-radius: var(--radius-sm);
    background: var(--white);
}

.attention-summary-item strong {
    font-size: 1.35rem;
}

.attention-summary-item--action { border-left-color: var(--red-700); }
.attention-summary-item--attention { border-left-color: var(--orange-500); }
.attention-summary-item--opportunity { border-left-color: var(--terra-500); }
.attention-summary-item--control { border-left-color: var(--navy-700); }

.attention-filters {
    align-items: flex-end;
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--slate-50);
}

.attention-filters label {
    display: grid;
    gap: 0.3rem;
    color: var(--slate-700);
    font-size: 0.78rem;
    font-weight: 700;
}

.attention-filters select,
.attention-filters input {
    min-height: 2.65rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.55rem;
    padding: 0.55rem 0.7rem;
    background: var(--white);
}

.attention-search {
    flex: 1 1 15rem;
}

.attention-result-note {
    margin: 0.75rem 0;
    color: var(--slate-600);
    font-size: 0.82rem;
}

.attention-card-list {
    display: grid;
    gap: 0.85rem;
}

.attention-card {
    padding: 1rem;
    border: 1px solid var(--slate-200);
    border-left: 0.3rem solid var(--slate-400);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.attention-card--action { border-left-color: var(--red-700); }
.attention-card--attention { border-left-color: var(--orange-500); }
.attention-card--opportunity { border-left-color: var(--terra-500); }
.attention-card--control { border-left-color: var(--navy-700); }

.attention-card h3 {
    margin: 0.5rem 0 0.2rem;
    color: var(--navy-950);
    font-size: 1.05rem;
}

.attention-customer,
.attention-explanation,
.attention-empty p {
    margin: 0;
    color: var(--slate-600);
}

.attention-badge--action { color: var(--red-700); background: var(--red-100); }
.attention-badge--attention { color: #9a4b12; background: var(--orange-100); }
.attention-badge--opportunity { color: #056b69; background: var(--terra-100); }
.attention-badge--control { color: var(--navy-800); background: var(--slate-100); }
.attention-priority--high { color: var(--red-700); background: var(--red-100); }
.attention-priority--normal { color: var(--slate-700); background: var(--slate-100); }
.attention-pattern { color: var(--slate-700); background: var(--slate-100); }
.attention-pattern--volatile { color: #9a4b12; background: var(--orange-100); }

.attention-figures {
    display: grid;
    grid-template-columns: repeat(6, minmax(7rem, 1fr));
    gap: 0.55rem;
    margin: 0.85rem 0;
}

.attention-figures div {
    display: grid;
    gap: 0.15rem;
    padding: 0.6rem;
    border-radius: 0.55rem;
    background: var(--slate-50);
}

.attention-figures span {
    color: var(--slate-600);
    font-size: 0.72rem;
}

.attention-hardware {
    margin-bottom: 0.7rem;
    color: var(--navy-800);
    font-size: 0.82rem;
}

.attention-hardware span {
    padding: 0.35rem 0.55rem;
    border-radius: 0.5rem;
    background: var(--terra-100);
}

.attention-reasons {
    margin: 0.7rem 0;
    padding-left: 1.25rem;
    color: var(--slate-700);
    font-size: 0.88rem;
}

.attention-empty {
    padding: 1rem;
    border: 1px dashed var(--slate-300);
    border-radius: var(--radius-sm);
    background: var(--slate-50);
}

@media (max-width: 64rem) {
    .attention-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .attention-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
    .attention-summary,
    .attention-figures { grid-template-columns: 1fr; }
    .attention-filters > * { width: 100%; }
}

/* Fase 15: compacte, toetsenbordtoegankelijke taalkeuze. */
.header-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
    margin-left: auto;
}

.language-selector {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.2rem;
    padding: 0.2rem;
    border: 1px solid #ded5e3;
    border-radius: 0.75rem;
    background: var(--terra-50);
}

.language-selector form { margin: 0; }

.language-button {
    display: inline-flex;
    min-width: 3.35rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.4rem 0.5rem;
    border: 0;
    border-radius: 0.55rem;
    color: var(--terra-800);
    background: transparent;
    cursor: pointer;
}

.language-button:hover,
.language-button:focus-visible { color: var(--terra-900); background: var(--terra-100); }
.language-button.is-active { color: var(--white); background: var(--terra-600); box-shadow: 0 4px 10px rgba(122, 76, 153, 0.22); }
.language-button img { width: 1.05rem; height: 0.7rem; object-fit: cover; border-radius: 0.08rem; box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.14); }
.language-button strong { font-size: 0.72rem; letter-spacing: 0.04em; }

@media (max-width: 64rem) {
    .header-actions { order: 2; }
    .main-navigation { order: 3; }
}

@media (max-width: 52rem) {
    .header-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; }
    .account-menu { order: initial; width: auto; padding-top: 0; border-top: 0; }
    .header-status { order: initial; }
}

@media (max-width: 40rem) {
    .header-actions { gap: 0.45rem; }
    .language-selector { order: 1; }
    .account-menu { order: 3; width: 100%; padding-top: 0.55rem; border-top: 1px solid #e7dfea; }
    .header-status { order: 2; max-width: calc(100% - 11.2rem); }
    .language-button { min-width: 3.05rem; padding-inline: 0.38rem; }
}
/* Functionele hoofdnavigatie voor Dashboard en Aandachtspunten. */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.75rem;
    background: rgba(7, 24, 39, 0.28);
}

.main-navigation a {
    padding: 0.48rem 0.78rem;
    border-radius: 0.55rem;
    color: #d9e8ef;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.main-navigation a:hover,
.main-navigation a:focus-visible {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.main-navigation a.is-active {
    color: var(--navy-950);
    background: var(--terra-100);
}

.page-actions {
    display: flex;
    margin: -0.65rem 0 1rem;
}

.attention-summary-panel .attention-summary {
    margin-bottom: 0;
}

.attention-page {
    margin-top: 1.25rem;
}

@media (max-width: 52rem) {
    .header-inner {
        flex-wrap: wrap;
        padding-block: 0.75rem;
    }

    .main-navigation {
        order: 3;
        width: 100%;
    }

    .main-navigation a {
        flex: 1 1 0;
        text-align: center;
    }
}
/* Fase 9: uitsluitend functionele opmaak voor het read-only klantdetail. */
.customer-link {
    color: var(--navy-800);
    font-weight: 700;
    text-decoration-color: var(--terra-500);
    text-underline-offset: 0.16em;
}

.customer-link:hover,
.customer-link:focus-visible { color: var(--terra-700); }

.customer-detail-actions { flex-wrap: wrap; gap: 0.65rem; }

.customer-identity-grid,
.customer-reference-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.25rem;
}

.customer-identity-grid article,
.customer-reference-grid article {
    display: grid;
    gap: 0.3rem;
    padding: 1rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    background: var(--white);
}

.customer-identity-grid span,
.customer-reference-grid span,
.customer-reference-grid small { color: var(--slate-600); font-size: 0.82rem; }

.customer-no-activity {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--slate-100);
    font-size: 0.82rem;
    font-weight: 700;
}

.customer-trend {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.customer-trend svg { display: block; width: 100%; min-width: 36rem; height: auto; }
.customer-trend polyline { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.trend-sales { stroke: var(--terra-500); }
.trend-margin { stroke: var(--orange-500); }
.trend-zero { stroke: var(--slate-300); stroke-width: 1; stroke-dasharray: 5 5; }
.trend-legend { display: flex; justify-content: center; gap: 1rem; font-size: 0.85rem; }
.trend-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.trend-legend i { width: 1.25rem; height: 0.22rem; border-radius: 999px; }
.trend-sales-key { background: var(--terra-500); }
.trend-margin-key { background: var(--orange-500); }
.is-inactive-period { color: var(--slate-500); background: var(--slate-50); }

@media (max-width: 64rem) {
    .customer-identity-grid,
    .customer-reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
    .customer-identity-grid,
    .customer-reference-grid { grid-template-columns: 1fr; }
}
/* Fase 10: functionele opmaak voor login en gebruikersbeheer. */
.auth-shell { display: grid; min-height: 62vh; place-items: center; padding: 2rem 0; }
.auth-card { width: min(100%, 30rem); padding: 2rem; border: 1px solid var(--slate-200); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-lg); }
.auth-form, .admin-form-grid, .inline-admin-form { display: grid; gap: 0.8rem; }
.auth-form { margin-top: 1.25rem; }
.auth-form label, .admin-form-grid label, .inline-admin-form label { display: grid; gap: 0.35rem; color: var(--slate-700); font-size: 0.86rem; font-weight: 700; }
.auth-form input, .admin-form-grid input, .admin-form-grid select, .inline-admin-form input, .inline-admin-form select { width: 100%; padding: 0.7rem 0.75rem; border: 1px solid var(--slate-300); border-radius: 0.55rem; background: var(--white); color: var(--navy-950); }
.form-message { margin: 1rem 0; padding: 0.8rem 1rem; border-radius: 0.6rem; }
.form-message--error { color: #8b1e1e; background: #fff0f0; border: 1px solid #f2b8b8; }
.form-message--success { color: #155d46; background: #edf9f4; border: 1px solid #aadac8; }
.account-menu { display: flex; align-items: center; gap: 0.65rem; color: #d9e8ef; font-size: 0.8rem; }
.account-menu form { margin: 0; }
.button-link { padding: 0; border: 0; color: var(--terra-100); background: transparent; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.admin-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.admin-users { display: grid; gap: 1rem; }
.admin-user-card { display: grid; grid-template-columns: minmax(12rem, 1fr) repeat(3, minmax(11rem, 1fr)); gap: 1rem; padding: 1rem; border: 1px solid var(--slate-200); border-radius: var(--radius-sm); }
.admin-user-card.is-deactivated { opacity: 0.65; background: var(--slate-50); }
.button--danger { color: #8b1e1e; border-color: #e4a5a5; background: #fff0f0; }
@media (max-width: 70rem) { .admin-form-grid, .admin-user-card { grid-template-columns: 1fr 1fr; } }
@media (max-width: 45rem) { .admin-form-grid, .admin-user-card { grid-template-columns: 1fr; } .account-menu { width: 100%; justify-content: space-between; } }

/* Fase 12: Terra-huisstijl. Presentatie-only; semantische signaalkleuren blijven intact. */
:root {
    --navy-950: #26212b;
    --navy-900: #33293a;
    --navy-800: #44334d;
    --navy-700: #58415f;
    --terra-900: #40264f;
    --terra-800: #523267;
    --terra-700: #653d80;
    --terra-600: #7A4C99;
    --terra-500: #8d65a8;
    --terra-100: #f0e8f5;
    --terra-50: #faf7fc;
    --slate-500: #667085;
    --shadow-lg: 0 22px 55px rgba(64, 38, 79, 0.14), 0 5px 14px rgba(38, 33, 43, 0.06);
    --radius: 1rem;
}

html { background: #f8f7f9; }
body {
    max-width: 100%;
    overflow-x: hidden;
    background: radial-gradient(circle at 8% 7%, rgba(122, 76, 153, 0.10), transparent 27rem), radial-gradient(circle at 92% 18%, rgba(122, 76, 153, 0.055), transparent 24rem), linear-gradient(180deg, #fbfafc 0, #f3f1f5 100%);
}
img { max-width: 100%; }
a { color: var(--terra-700); }
a:hover { color: var(--terra-900); }
:where(a, button, input, select, [tabindex]):focus-visible { outline: 3px solid var(--terra-600); outline-offset: 3px; }

.site-header {
    color: var(--slate-900);
    background: var(--white);
    border-bottom: 1px solid #ded5e3;
    box-shadow: 0 8px 26px rgba(64, 38, 79, 0.09);
}
.header-inner { min-height: 6.35rem; }
.brand { min-width: max-content; gap: 0.9rem; color: var(--slate-900); }
.brand-logo { width: 4.35rem; height: auto; aspect-ratio: 828 / 770; flex: 0 0 auto; display: block; object-fit: contain; }
.brand-copy { padding-left: 0.9rem; border-left: 1px solid #ded5e3; }
.brand strong { color: var(--terra-900); font-size: 1.18rem; }
.brand small { color: var(--slate-600); }
.main-navigation { border-color: #e3d9e8; background: var(--terra-50); }
.main-navigation a { color: var(--terra-800); }
.main-navigation a:hover, .main-navigation a:focus-visible { color: var(--terra-900); background: var(--terra-100); }
.main-navigation a.is-active { color: var(--white); background: var(--terra-600); box-shadow: 0 5px 13px rgba(122, 76, 153, 0.22); }
.header-status, .account-menu { color: var(--slate-600); }
.account-menu { padding-left: 0.85rem; border-left: 1px solid #e5dce9; }
.button-link { color: var(--terra-700); }
.status-dot { background: #2e9b72; box-shadow: 0 0 0 4px rgba(46, 155, 114, 0.13); }

.hero h1, .panel h2, .state-card h1, .state-card h2, .section-heading h2, .comparison-subheading h3 { color: var(--navy-950); }
.eyebrow { color: var(--terra-700); }
.period-badge, .metric-card--featured { background: linear-gradient(135deg, var(--terra-900), var(--terra-700)); }
.period-badge span, .metric-card--featured .metric-label, .metric-card--featured small { color: #eadff0; }
.metric-card--featured::after { background: rgba(196, 163, 216, 0.24); }
.filter-card, .panel, .state-card, .metric-card, .auth-card, .admin-user-card, .customer-identity-grid article, .customer-reference-grid article { border-color: #e2dce5; }
.filter-card, .panel, .state-card, .metric-card, .auth-card { box-shadow: 0 2px 5px rgba(38, 33, 43, 0.05), 0 14px 36px rgba(64, 38, 79, 0.045); }
.filter-icon, .customer-no-activity { color: var(--terra-700); background: var(--terra-100); }
input:focus, select:focus, .table-scroll:focus { border-color: var(--terra-600); box-shadow: 0 0 0 4px rgba(122, 76, 153, 0.16); }
.button--primary { color: var(--white); background: var(--terra-600); box-shadow: 0 7px 17px rgba(122, 76, 153, 0.24); }
.button--primary:hover, .button--primary:focus-visible { background: var(--terra-800); }
.button--secondary { color: var(--terra-800); border-color: #cdbdd7; }
.button--secondary:hover, .button--secondary:focus-visible { color: var(--terra-900); background: var(--terra-50); border-color: var(--terra-600); }
.customer-link, .customer-number { color: var(--terra-700); text-decoration-color: var(--terra-500); }
.customer-link:hover, .customer-link:focus-visible { color: var(--terra-900); }
.customer-table thead th, .comparison-table thead th { background: #eee8f1; }
.customer-table thead .sticky-col { background: #e5daeb; }
.customer-table tbody tr:hover td, .customer-table tbody tr:hover th, .comparison-table tbody tr:hover > * { background: #fbf8fc; }
.table-scroll { scrollbar-color: var(--terra-500) var(--terra-100); }
.table-scroll-frame::after { background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(101, 61, 128, 0.18)); }
.trend-sales { stroke: var(--terra-600); }
.trend-sales-key { background: var(--terra-600); }
.auth-card { position: relative; overflow: hidden; }
.auth-card::before { position: absolute; inset: 0 0 auto; height: 0.32rem; content: ""; background: var(--terra-600); }
.auth-form input, .admin-form-grid input, .admin-form-grid select, .inline-admin-form input, .inline-admin-form select { color: var(--slate-900); }
.site-footer { background: rgba(255, 255, 255, 0.82); border-top-color: #e2dce5; }
.comparison-scroll, .table-scroll, .table-scroll--top, .customer-trend, .category-list { max-width: 100%; }

@media (max-width: 64rem) {
    .header-inner { gap: 0.75rem; }
    .brand-logo { width: 3.85rem; }
    .account-menu { padding-left: 0; border-left: 0; }
}
@media (max-width: 52rem) {
    .header-inner { align-items: center; }
    .brand { order: 1; }
    .header-status { order: 2; }
    .main-navigation { order: 3; overflow-x: auto; }
    .account-menu { order: 4; width: 100%; justify-content: space-between; padding-top: 0.65rem; border-top: 1px solid #e7dfea; }
}
@media (max-width: 40rem) {
    .shell { width: min(calc(100% - 1.25rem), var(--shell)); }
    .header-inner { min-height: auto; padding-block: 0.65rem; }
    .brand-logo { width: 3.35rem; }
    .brand-copy { padding-left: 0.65rem; }
    .brand strong { font-size: 1.02rem; }
    .brand small { font-size: 0.64rem; }
    .header-status { font-size: 0.72rem; }
    .main-navigation a { min-width: max-content; padding-inline: 0.68rem; }
    .page-main { padding-block: 1.5rem 2.5rem; }
    .auth-shell { min-height: 54vh; padding-block: 1rem; }
    .auth-card { padding: 1.35rem; }
    .hero h1 { font-size: 2rem; }
}

/* Fase 14: vaste dashboardpagina's en responsieve bediening zonder bedrijfslogica. */
.page-main,
.page-main > *,
.filter-card,
.filter-fields,
.panel,
.panel-heading,
.customer-tools,
.attention-filters {
    min-width: 0;
}

.dashboard-destinations,
.category-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.3rem;
}

.destination-card,
.category-summary-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #e2dce5;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.destination-card {
    display: grid;
    gap: 0.25rem;
    color: var(--terra-800);
    text-decoration: none;
}

.destination-card:hover,
.destination-card:focus-visible {
    color: var(--terra-900);
    border-color: var(--terra-600);
    background: var(--terra-50);
}

.destination-card span,
.destination-card small {
    color: var(--slate-600);
    font-size: 0.78rem;
}

.destination-card strong {
    font-size: 1.18rem;
}

.category-summary-grid {
    margin-top: 0;
}

.category-summary-card {
    display: grid;
    gap: 0.8rem;
}

.category-summary-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.category-summary-heading h3 {
    min-width: 0;
    margin: 0;
    color: var(--navy-900);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.category-summary-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.8rem;
    margin: 0;
}

.category-summary-card dl div {
    min-width: 0;
}

.category-summary-card dt {
    color: var(--slate-600);
    font-size: 0.7rem;
    font-weight: 700;
}

.category-summary-card dd {
    margin: 0;
    color: var(--navy-950);
    font-size: 0.9rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.selection-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2dce5;
    border-radius: var(--radius-sm);
    color: var(--slate-600);
    background: var(--terra-50);
}

.selection-context strong {
    color: var(--terra-900);
}

.button,
.main-navigation a,
.button-link {
    min-height: 2.75rem;
}

.button-link {
    display: inline-flex;
    align-items: center;
}

.page-main--dashboard .metric-grid {
    grid-template-columns: repeat(20, minmax(0, 1fr));
}

.page-main--dashboard .metric-card {
    grid-column: span 4;
}

.page-main--dashboard .metric-card--compact {
    grid-column: span 5;
}

.page-main--dashboard .metric-card--compact:nth-last-child(4) {
    grid-column: 1 / span 5;
}

.page-main--dashboard .metric-card:nth-child(-n + 2) strong {
    font-size: clamp(1.2rem, 1.75vw, 1.85rem);
}

.comparison-scroll {
    overscroll-behavior-inline: contain;
}

.comparison-scroll:focus-visible {
    outline: 3px solid var(--terra-600);
    outline-offset: 3px;
}

@media (max-width: 64rem) {
    .header-inner {
        flex-wrap: wrap;
        padding-block: 0.75rem;
    }

    .main-navigation {
        order: 3;
        width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .account-menu {
        order: 4;
    }

    .page-main--dashboard .metric-grid,
    .dashboard-destinations,
    .category-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-main--dashboard .metric-card,
    .page-main--dashboard .metric-card--compact,
    .page-main--dashboard .metric-card--compact:nth-last-child(4) {
        grid-column: span 1;
    }

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

    .filter-fields label,
    .filter-fields select,
    .filter-fields .button {
        width: 100%;
    }
}

@media (max-width: 40rem) {
    .main-navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.2rem;
        overflow-x: visible;
    }

    .main-navigation a {
        min-width: 0;
        padding: 0.62rem 0.72rem;
        text-align: center;
    }

    .filter-card {
        padding: 0.85rem;
    }

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

    .filter-fields,
    .page-main--dashboard .metric-grid,
    .dashboard-destinations,
    .category-summary-grid,
    .category-summary-card dl,
    .customer-tools,
    .attention-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .filter-fields label,
    .filter-fields label:last-of-type,
    .filter-fields .button {
        grid-column: span 1;
    }

    .page-main--dashboard .metric-card,
    .page-main--dashboard .metric-card--compact,
    .page-main--dashboard .metric-card--compact:nth-last-child(4) {
        grid-column: span 1;
    }

    .customer-tools,
    .attention-filters {
        display: grid;
        width: 100%;
    }

    .customer-tools > *,
    .customer-tools input,
    .customer-tools select,
    .customer-tools .button,
    .attention-filters > *,
    .attention-filters input,
    .attention-filters select,
    .attention-filters .button,
    .page-actions .button {
        width: 100%;
    }

    .search-field input {
        width: 100%;
    }

    .page-actions,
    .state-card {
        align-items: stretch;
        flex-direction: column;
    }

    .state-card {
        padding: 1.2rem;
    }

    .auth-card {
        width: 100%;
    }
}

@media (max-width: 64rem) {
    .header-actions { order: 2; }
    .main-navigation { order: 3; }
}

@media (max-width: 52rem) {
    .header-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; }
    .header-actions .account-menu { order: initial; width: auto; padding-top: 0; border-top: 0; }
    .header-actions .header-status { order: initial; }
}

@media (max-width: 40rem) {
    .header-actions .language-selector { order: 1; }
    .header-actions .header-status { order: 2; max-width: calc(100% - 11.2rem); }
    .header-actions .account-menu { order: 3; width: 100%; padding-top: 0.55rem; border-top: 1px solid #e7dfea; }
}

/* Fase 16A: private importworkflow */
.import-upload-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.import-upload-form label {
    display: grid;
    min-width: 0;
    gap: 0.4rem;
    color: var(--slate-700);
    font-weight: 700;
}

.import-upload-form label span {
    min-height: 2.7em;
    color: var(--slate-500);
    font-size: 0.84rem;
    font-weight: 500;
}

.import-upload-form input[type="file"] {
    width: 100%;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.65rem;
    background: var(--white);
}

.import-upload-form .button { min-height: 2.75rem; }

.status-pill {
    display: inline-flex;
    max-width: 100%;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: var(--terra-100);
    color: var(--terra-900);
    font-size: 0.82rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.status-pill--validation_failed,
.status-pill--failed,
.status-pill--rejected { background: #fce8e6; color: #8b251d; }
.status-pill--awaiting_approval,
.status-pill--approved { background: #fff1d6; color: #714800; }
.status-pill--imported,
.control-result.is-valid { background: #e7f5ec; color: #17623a; }
.status-pill--cancelled,
.status-pill--expired { background: var(--slate-100); color: var(--slate-700); }

.import-meta-grid,
.import-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.import-meta-grid > div,
.import-summary-grid > div {
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid var(--terra-100);
    border-radius: 0.7rem;
    background: var(--terra-050);
}

.import-meta-grid span,
.import-summary-grid span { display: block; color: var(--slate-600); font-size: 0.8rem; }
.import-meta-grid strong,
.import-summary-grid strong { display: block; margin-top: 0.25rem; overflow-wrap: anywhere; }
.filename-cell { max-width: 22rem; overflow-wrap: anywhere; word-break: break-word; }
.control-result { margin-top: 1rem; padding: 0.85rem; border-radius: 0.65rem; font-weight: 800; }
.control-result.is-invalid { background: #fce8e6; color: #8b251d; }
.import-action-row { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: end; }
.import-action-row form { min-width: 12rem; }
.audit-list { display: grid; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }
.audit-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0.75rem; border-bottom: 1px solid var(--slate-200); }
.audit-list span { color: var(--slate-600); overflow-wrap: anywhere; }

@media (max-width: 52rem) {
    .import-meta-grid,
    .import-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
    .import-upload-form,
    .import-meta-grid,
    .import-summary-grid { grid-template-columns: minmax(0, 1fr); }
    .import-upload-form label span { min-height: 0; }
    .import-upload-form .button,
    .import-action-row,
    .import-action-row form,
    .import-action-row .button { width: 100%; }
    .audit-list li { flex-direction: column; }
}
