/* Shared visual foundation. Legacy page layouts stay in app.css; all application
   controls, typography and surfaces use these tokens. Club accents remain themed.
   No remote fonts, icon libraries or additional runtime are required. */
:root {
    --ui-font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --ui-text: var(--c-text, #202924);
    --ui-muted: var(--c-muted, #606c64);
    --ui-border: #dde4dd;
    --ui-surface: var(--c-surface, #f5f7f4);
    --ui-card: var(--c-card, #fff);
    --ui-primary: var(--c-action, #b84c00);
    --ui-on-primary: var(--c-primary-contrast, #fff);
    --ui-focus: #226b59;
    --ui-radius: 14px;
    --ui-control-radius: 9px;
    --ui-shadow: 0 2px 6px #20332805;
    --ui-warning: #81520e;
    --ui-warning-surface: #fff7e6;
    --ui-danger: #a52a28;
    --ui-danger-surface: #fff0ef;
    --ui-success: #226b49;
    --ui-success-surface: #eaf5ee;
    --ui-gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    --font-heading: var(--ui-font);
    --font-body: var(--ui-font);
    --font-body-style: normal;
    --radius: var(--ui-radius);
    font-family: var(--ui-font);
    font-style: normal;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ui-text);
    background: var(--ui-surface);
    -webkit-font-smoothing: antialiased;
}
body :is(button, input, select, textarea) { font-family: var(--ui-font); font-style: normal; }
body :is(h1, h2, h3, h4) { font-family: var(--ui-font); font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
body h1 { font-size: clamp(28px, 3vw, 36px); }
body h2 { font-size: 26px; }
body h3 { font-size: 18px; }
body :is(.form-card, .overzicht-card, .op-card, .op-panel, .sponsor-card, .team-card, .flow-side-card) h3 { font-size: 18px; }
body h4 { font-size: 16px; }
body :is(.muted, .muted-i, .hint) { font-style: normal; line-height: 1.55; color: var(--ui-muted); }
body :is(.hint, .muted-i) { font-size: 13px; }
body a { text-underline-offset: 3px; }
body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--ui-focus);
    outline-offset: 3px;
    box-shadow: none;
}
body :is(button, input, select, textarea):disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* Primary, secondary and compact actions share one shape and hit area. */
body :is(.btn-choose, .btn-op, .btn-op-primary, .btn-op-secondary, .btn-primary-lg, .btn-secondary-lg, .btn-primary, .mode-chip, .pak-tab, .pak-sportchip) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    height: auto;
    max-width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-control-radius);
    background: var(--ui-card);
    color: var(--ui-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
body :is(.btn-choose-primary, .btn-op-primary, .btn-primary-lg, .btn-primary),
.landing-hero-light .btn-primary-lg {
    color: var(--ui-on-primary);
    background: var(--ui-primary);
    border-color: var(--ui-primary);
}
body :is(.btn-choose, .btn-op, .btn-op-secondary, .btn-secondary-lg):hover:not(:disabled) {
    background: color-mix(in srgb, var(--ui-card) 90%, var(--ui-primary));
    border-color: color-mix(in srgb, var(--ui-border) 65%, var(--ui-primary));
    color: var(--ui-text);
}
body :is(.btn-choose-primary, .btn-op-primary, .btn-primary-lg, .btn-primary):hover:not(:disabled) {
    background: color-mix(in srgb, var(--ui-primary) 90%, #000);
    border-color: color-mix(in srgb, var(--ui-primary) 90%, #000);
    color: var(--ui-on-primary);
}
body :is(.btn-demo, .btn-small) { min-height: 44px; font-size: 13px; padding: 8px 12px; }
body .btn-choose { margin-top: 0; }
body .btn-demo { border-style: dashed; color: var(--ui-muted); background: transparent; }
body .order-step-btn { flex-direction: column; align-items: flex-start; text-align: left; }
body :is(.mode-chip.selected, .pak-tab.is-active, .pak-sportchip.is-active) {
    color: var(--ui-text);
    border-color: var(--ui-primary);
    background: color-mix(in srgb, var(--ui-card) 93%, var(--ui-primary));
    box-shadow: inset 0 0 0 1px var(--ui-primary);
}
body :is(.mode-chip, .pak-tab, .pak-sportchip):hover { border-color: var(--ui-primary); }
body :is(.squad-row-actions button, .kit-gallery-arrow, .kit-gallery-thumb, .alert-dismiss) { min-height: 44px; min-width: 44px; }
body .kit-tegel { min-height: 44px; min-width: 44px; border-radius: var(--ui-control-radius); }
body .club-picker-missing { min-height: 44px; font: 600 14px var(--ui-font); border-radius: var(--ui-control-radius); }
body .overzicht-wijzig { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.sponsor-card-mode, .sponsor-card-head, .sponsor-logo-thumb-wrap { flex-wrap: wrap; gap: 12px; }
.sponsor-card-title { min-width: 0; overflow-wrap: anywhere; }

/* Form controls never fall back to a different browser font or smaller hit area. */
body :is(.customer-shell, .operator-shell, .ui-login-card, .werkorder-editor) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]), select, textarea) {
    min-height: 44px;
    border: 1px solid #b9c5bb;
    border-radius: var(--ui-control-radius);
    background: var(--ui-card);
    color: var(--ui-text);
    padding: 9px 12px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    max-width: 100%;
    min-width: 0;
}
body textarea { resize: vertical; }
body input::placeholder, body textarea::placeholder { color: #737f76; opacity: 1; }
body input:is([type="checkbox"], [type="radio"]) {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    accent-color: var(--ui-primary);
    vertical-align: middle;
    flex: none;
}
body input[type="color"] { height: 44px; min-width: 44px; border: 1px solid var(--ui-border); border-radius: var(--ui-control-radius); }
body input[type="file"] { max-width: 100%; font-size: 14px; padding: 8px 0; }
body input[type="file"]::file-selector-button {
    min-height: 44px;
    padding: 10px 14px;
    margin-right: 12px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-control-radius);
    background: var(--ui-card);
    color: var(--ui-text);
    font: 600 14px var(--ui-font);
    cursor: pointer;
}
body :is(.sponsor-visible-toggle, .werklijst-toggle, .pak-check) { min-height: 44px; gap: 12px; }

/* A common card and spacing scale, with denser rows inside staff tools. */
body :is(.op-card, .op-panel, .order-card, .form-card, .overzicht-card, .sponsor-card, .team-card, .team-choice-card, .thema-preview, .pak-editor) {
    padding: 24px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-card);
    box-shadow: var(--ui-shadow);
    min-width: 0;
}
body :is(.package-card, .landing-card, .vereniging-card, .alert-card) {
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow);
    border-color: var(--ui-border);
}
body :is(.op-card, .op-panel) { gap: 16px; }
body :is(.op-card, .form-card, .overzicht-card, .sponsor-card) > :last-child { margin-bottom: 0; }
body :is(.op-panel-head, .vandaag-head, .werklijst-head, .thema-head) { gap: 16px; flex-wrap: wrap; }
body :is(.vandaag-head, .werklijst-head, .thema-head) { margin-bottom: 24px; }
body :is(.order-detail-columns, .overzicht-layout, .thema-grid, .team-grid, .vereniging-grid) { gap: 24px; }
body :is(.best-filters, .werklijst-filters, .pak-toolbar, .pak-acties, .of-akkoordknoppen, .step-actions) { gap: 12px; }
body :is(.best-filters, .werklijst-filters) { margin-bottom: 24px; }
body :is(.op-task-row, .op-delivery-row) { padding: 12px 16px; border-radius: var(--ui-control-radius); font-size: 14px; }
body :is(.stock-table-head, .jaarlagen-table td, .jaarlagen-table th) { border-color: var(--ui-border); }
body :is(.of-tabel, .best-tabel, .jaarlagen-table, .squad-table) { font-variant-numeric: tabular-nums; }
body :is(.of-tabel th, .best-tabel th, .squad-table th) { letter-spacing: .025em; font-size: 12px; font-weight: 650; }
body :is(.overzicht-row, .best-tabel td, .of-tabel td) { overflow-wrap: anywhere; }
body .overzicht-row { gap: 16px; }
body .overzicht-row > :last-child { text-align: right; }
body :is(.of-kop, .of-totalen) { margin-bottom: 24px; }
body .of-tabel .of-kort { min-width: 70px; }
body :is(.status-pill, .best-status, .best-onhold, .pak-badge) { display: inline-flex; align-items: center; border-radius: 99px; padding: 5px 10px; font-size: 12px; font-weight: 600; line-height: 1.4; }
body .pak-badge-tip { background: var(--ui-primary); color: var(--ui-on-primary); }
body :is(.status-OnHold, .best-onhold, .pak-badge-let) { color: var(--ui-warning); background: var(--ui-warning-surface); }
body :is(.error-text, .validation-message) { color: var(--ui-danger); }
body :is(.op-onhold-banner, .werklijst-selectie) { color: var(--ui-warning); background: var(--ui-warning-surface); border: 1px solid #e6d2a7; border-radius: var(--ui-radius); padding: 16px 24px; }
body :is(.pak-notice, .of-verstuurd, .voorraad-notice, .squad-prijsinfo) { border-radius: var(--ui-control-radius); padding: 16px; line-height: 1.55; }

/* Navigation belongs to the same application, with a quiet staff sidebar. */
.customer-topbar { min-height: 76px; height: auto; padding: 16px 32px; gap: 24px; }
.customer-nav a { min-height: 44px; display: inline-flex; align-items: center; border-radius: 8px; }
.customer-nav a:not(.customer-supplier):hover { color: var(--ui-primary); }
.customer-content { padding-bottom: 48px; }
.customer-content > :is(.mijn-header, .ui-state-card) { margin-top: 32px; }
.customer-content > :is(.order-card, .form-card, .overzicht-card) { width: calc(100% - 2 * var(--ui-gutter)); max-width: calc(var(--wrap) - 2 * var(--ui-gutter)); }
.customer-content > .flow-header { padding-block: 32px; }
.customer-content > .overzicht-layout { padding-inline: var(--ui-gutter); }
.customer-content > :is(.hero, .flow-header) {
    background: color-mix(in srgb, var(--ui-card) 95%, var(--c-primary, #f16c03));
    color: var(--ui-text);
    border-bottom: 1px solid var(--ui-border);
}
.hero-text p, .hero-stat, .flow-intro { color: var(--ui-muted); opacity: 1; }
.hero-stat-value, .flow-eyebrow { color: var(--ui-primary); }
.flow-header .order-stepper-dot { background: var(--ui-card); border-color: #a9b6ac; color: var(--ui-muted); }
.flow-header .order-stepper-dot:is(.done, .current) { background: var(--ui-primary); border-color: var(--ui-primary); color: var(--ui-on-primary); }
.flow-header .order-stepper-label { color: var(--ui-muted); }
.flow-header .order-stepper-label.current { color: var(--ui-text); }
.flow-header .order-stepper-line { background: var(--ui-border); }
.flow-header .order-stepper-line.done { background: var(--ui-primary); }
.start-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
.start-grid .team-panel { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: center; gap: 24px; }
.start-grid .team-panel h2 { margin: 0; }
.start-grid .team-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 8px 24px; }
.start-grid .team-choice { display: grid; grid-row: span 2; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); max-width: none; }
.package-grid { gap: 24px; }
.package-name { font-size: 22px; line-height: 1.3; }
.package-badge { background: var(--ui-primary); color: var(--ui-on-primary); }
.flow-header h1 { font-size: clamp(26px, 3vw, 34px); }
.landing-hero-light .landing-hero-text h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; letter-spacing: -.035em; }
.landing-hero-light .landing-hero-text p { font-size: 17px; line-height: 1.7; }
.customer-footer { background: #202e27; color: #e4ede7; padding: 32px; }
.operator-sidebar { width: 232px; background: #202e27; border-color: #35463b; padding: 24px 12px; }
.operator-brand { padding: 0 12px 24px; }
.operator-account { margin: 0 0 20px; padding: 0 12px 20px; border-color: #405145; }
.operator-account button { min-height: 44px; padding: 8px 12px; border: 1px solid #617267; border-radius: var(--ui-control-radius); font: 600 13px var(--ui-font); }
.operator-nav { gap: 4px; }
.operator-nav a { min-height: 44px; padding: 10px 14px; border-radius: var(--ui-control-radius); color: #d8e3db; font-weight: 500; }
.operator-nav a.active { background: #354b3d; color: #fff; border-left-color: #f6ab65; }
.operator-nav a:hover { background: #2c4033; }
.operator-sidebar :is(a, button):focus-visible { outline-color: #ffd8ad; }
.operator-content { min-width: 0; padding: 32px; flex: 1; }
.operator-content > :is(h1, h2) { margin-bottom: 24px; }
.operator-content > .op-card + .op-card { margin-top: 24px; }
.ui-state-card { max-width: 720px; }
.ui-state-card p { max-width: 65ch; }
.ui-support-reference { overflow-wrap: anywhere; }
.ui-state-card .step-actions { margin-top: 24px; }
.thema-preview-card { border-radius: var(--ui-radius); }
.ui-theme-type { margin: 0; font-size: 14px; color: var(--ui-muted); }

@media (max-width: 1100px) and (min-width: 901px) {
    .operator-content { padding: 24px; }
    .operator-content .vandaag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .operator-content .thema-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .start-grid .team-panel { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .operator-sidebar { width: 100%; padding: 12px 16px; flex-wrap: wrap; gap: 12px; position: static; }
    .operator-brand { padding: 0; }
    .operator-account { margin: 0 0 0 auto; padding: 0; border: 0; }
    .operator-nav { flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 4px; scrollbar-width: thin; padding-bottom: 4px; }
    .operator-nav a { flex: none; padding: 10px 14px; border-bottom-width: 2px; }
    .operator-nav a.active { border-bottom-color: #f6ab65; }
    .operator-content { padding: 24px; }
    .customer-topbar { padding: 12px 24px; gap: 16px; flex-wrap: wrap; }
    .customer-brand-bar { flex: 1 1 auto; }
}
@media (max-width: 640px) {
    .start-grid .team-card { grid-template-columns: minmax(0, 1fr); }
    .start-grid .team-choice { grid-row: auto; }
    :root { --ui-gutter: 16px; }
    body { font-size: 15px; }
    body h2 { font-size: 24px; }
    body :is(.op-card, .op-panel, .order-card, .form-card, .overzicht-card, .sponsor-card, .team-card, .team-choice-card, .thema-preview, .pak-editor) { padding: 16px; }
    body :is(.order-detail-columns, .overzicht-layout, .thema-grid, .team-grid, .vereniging-grid) { gap: 16px; }
    body :is(.customer-shell, .operator-shell, .werkorder-editor) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 16px; }
    .customer-topbar { padding: 12px 16px; gap: 4px 16px; }
    .customer-brand-bar { width: 100%; }
    .customer-nav { width: 100%; justify-content: space-between; gap: 12px; font-size: 13px; }
    .customer-brand-name { font-size: 17px; }
    .customer-content > .flow-header { padding-block: 24px; }
    .flow-header .order-stepper { gap: 0; }
    .flow-header .order-stepper-item { gap: 6px; }
    .flow-header .order-stepper-line { flex: 1 1 8px; min-width: 4px; width: auto; margin-inline: 4px; }
    .customer-content > .mijn-header { margin-top: 24px; }
    .customer-footer { padding: 24px 16px; }
    .operator-content { padding: 24px 16px; }
    .operator-account-naam { max-width: 170px; font-size: 11px; }
    .operator-brand img { width: 112px; }
    .operator-content .op-table-scroll > .of-tabel { min-width: 0; }
    .of-tabel { table-layout: fixed; }
    .of-tabel tbody { display: block; }
    .of-tabel td { min-width: 0; overflow-wrap: anywhere; }
    .of-tabel td[data-label="Omschrijving"] { align-items: flex-start; }
    .of-tabel input { min-width: 0; }
    .of-tabel tr { padding-block: 16px; }
    body .of-tabel .of-kort { min-width: 0; }
    body .overzicht-row { gap: 12px; font-size: 14px; }
    body .overzicht-row > span:first-child { flex: 1 1 auto; min-width: 80px; overflow-wrap: normal; }
    body .overzicht-row > span:last-child { flex: 0 1 auto; max-width: 62%; min-width: 0; }
    body .order-card-head { align-items: flex-start; gap: 16px; }
    body :is(.of-akkoordknoppen, .pak-acties) { flex-wrap: wrap; }
    body .of-akkoordknoppen > button { flex: 1 1 100%; }
    body .op-onhold-banner { padding: 16px; flex-wrap: wrap; }
    .thema-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
    body { font-family: var(--ui-font); font-size: 11px; background: #fff; color: #111; }
    .werkorder-acties { display: none; }
}

/* Progressive disclosure keeps returning customers focused on today's information. */
body :is(.recovery-options, .quote-agreement, .sponsor-billing) > summary {
    min-height: 44px; cursor: pointer; font-weight: 600; line-height: 1.5; padding-block: 10px;
}
body :is(.recovery-options, .quote-agreement, .sponsor-billing) > summary:focus-visible {
    outline: 3px solid var(--ui-focus); outline-offset: 3px; border-radius: var(--ui-control-radius);
}
body .quote-agreement > .of-klant { border: 0; padding: 16px 0 0; margin: 0; box-shadow: none; }
body .my-contributions .hint { display: block; }
body .recovery-options .form-card { margin-top: 20px; }
