/* Shared presentation layer. Supplier logic and page-specific states stay intact. */
@font-face {
    font-family: Inter;
    src: url('../fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #c81e50;
    --color-primary-dark: #a8173f;
    --color-primary-soft: #fef0f4;
    --color-success: #15803d;
    --color-danger: #b42332;
    --color-warning: #955207;
    --color-bg: #f4f5f7;
    --color-surface: #ffffff;
    --color-border: #dfe1e7;
    --color-text: #23262f;
    --color-muted: #626673;
    --color-sidebar-text: #f6f7fa;
    --color-sidebar-muted: #aeb2bd;
    --color-teal: #1f7d83;
    --shadow-card: none;
    --sidebar-width: 224px;
    --radius-card: 6px;
}

body { font-family: Inter, 'Segoe UI', sans-serif; font-size: 14px; }
* { letter-spacing: 0; }
::selection { background: #fde8ee; color: #891136; }
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--color-teal);
    outline-offset: 3px;
}
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 9999; padding: 12px 18px; background: #fff; color: #23262f; }
.skip-link:focus { top: 12px; }
.sidebar { display: flex; flex-direction: column; background: #14151c; box-shadow: none; border-right: 1px solid #23262f; overflow-y: auto; }
.sidebar__brand, .sidebar__nav { flex-shrink: 0; }
.sidebar__account { margin-top: auto; padding: 12px; border-top: 1px solid #2f323d; flex-shrink: 0; }
.sidebar__logout { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; }
.sidebar__brand { padding: 26px 22px; border-bottom-color: #2f323d; }
.sidebar__logo { font-size: 18px; font-weight: 750; }
.sidebar__subtitle { font-size: 12px; color: #aeb2bd; }
.sidebar__nav { gap: 6px; padding: 22px 12px; }
.nav-item { min-height: 44px; border-radius: 6px; font-size: 13px; font-weight: 550; color: #c9ccd4; }
.nav-item svg { color: #9b9faa; flex-shrink: 0; }
.nav-item:hover { background: #23262f; color: #fff; }
.nav-item.is-active { background: #30202b; color: #ffb5cb; }
.nav-item.is-active svg { color: #ffb5cb; }
.nav-item.is-active::before { background: #ea5a82; }
.topbar { min-height: 88px; padding: 20px 28px; gap: 20px; }
.topbar h1 { font-size: 23px; line-height: 1.3; font-weight: 700; }
.topbar__eyebrow { font-size: 10px; color: var(--color-teal); margin-bottom: 5px; }
.topbar__time { font-size: 12px; color: var(--color-muted); }
.content-shell { padding: 26px 28px 48px; min-width: 0; }
.content-shell > *, .app-main, .form-field { min-width: 0; }
.form-field { align-content: start; gap: 8px; }
#warnings-section { margin-top: 22px; padding: 18px; border: 1px solid #e4d6b9; border-radius: 6px; background: #fff; }
#warnings-title { font-size: 16px; margin: 0 0 14px; }
#warnings-list { max-height: 228px; overflow-y: auto; }
#warnings-list .activity-row { border: 0; border-bottom: 1px solid #eceef2; border-radius: 0; padding: 12px 0; }
.activity-card .activity-row { border: 0; border-bottom: 1px solid #eceef2; border-radius: 0; }
.dashboard-supplier-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.dashboard-supplier-card:nth-child(n + 4) { grid-column: auto; }
.beheer-page-header { margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.beheer-page-header h2, .section-heading h2, .settings-card__header h2 { font-size: 17px; }
.beheer-page-header p, .settings-card__header p { font-size: 13px; line-height: 1.6; font-weight: 400; }
.card, .supplier-panel { border-color: var(--color-border); box-shadow: none; }
.button { min-height: 38px; padding: 9px 14px; border-radius: 6px; font-size: 12px; font-weight: 650; line-height: 1.4; white-space: normal; text-align: center; }
.button:hover { transform: none; }
.button--primary { background: var(--color-primary); border: 1px solid var(--color-primary); color: #fff; }
.button--primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.button--success { background: var(--color-teal); border: 1px solid var(--color-teal); color: #fff; }
.button--success:hover { background: #19676c; }
.button--secondary { background: #fff; border: 1px solid #d5d8df; color: #414550; }
.button--secondary:hover { background: #f4f5f7; border-color: #9b9faa; }
.button--danger { background: #b42332; color: #fff; border: 1px solid #b42332; }
.button--small { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.status-badge, .method-badge, .filter-badge, .change-reason-badge { font-size: 11px; line-height: 1.4; font-weight: 600; }
.status-badge--success, .filter-badge--success { background: #eaf7ef; color: #166534; }
.status-badge--danger { background: #fff0f0; color: #a11e2a; }
.status-badge--warning, .filter-badge--warning { background: #fff5df; color: #875006; }
.status-badge--info, .filter-badge--info { background: #e5f4f4; color: #19676c; }
.method-badge { background: #f4f5f7; border-color: #dfe1e7; color: #626673; }
.dashboard-stats-grid, .magento-sync-stats { gap: 14px; }
.dashboard-stat { min-height: 116px; padding: 18px; border-left-width: 3px; }
.dashboard-stat strong { font-size: 28px; font-variant-numeric: tabular-nums; }
.dashboard-stat__label, .dashboard-stat__subtext { font-size: 12px; font-weight: 500; }
.dashboard-stat__icon { background: #f4f5f7; border-radius: 6px; }
.dashboard-supplier-card { border-top: 2px solid #dfe1e7; padding: 18px; }
.dashboard-supplier-card:hover { border-color: #b9bdc7; box-shadow: none; }
.dashboard-supplier-card h3 { font-size: 15px; }
.dashboard-supplier-card__stats { background: #f8f9fa; }
.scheduler-overview { background: #edf7f6; border-color: #c7e2df; border-radius: 6px; }
.scheduler-overview.is-stopped { background: #fff5f5; border-color: #edcbd0; }
.supplier-accordion {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
.supplier-panel { min-width: 0; }
.supplier-panel__header { position: relative; }
.supplier-card-link::after { content: ''; position: absolute; inset: 0; border-radius: 6px; }
.supplier-card-link:focus-visible { outline: none; }
.supplier-card-link:focus-visible::after { outline: 3px solid var(--color-teal); outline-offset: -3px; }
.supplier-panel__header .toggle-switch { z-index: 1; }
.supplier-back-link { display: inline-flex; margin-bottom: 20px; color: var(--color-teal); font-size: 13px; font-weight: 600; }
.supplier-back-link[hidden] { display: none; }
body[data-supplier-view='detail'] #scheduler-overview,
body[data-supplier-view='detail'] .beheer-page-header > button,
body[data-supplier-view='detail'] .supplier-panel__header { display: none; }
body[data-supplier-view='detail'] .supplier-accordion { display: block; }
body[data-supplier-view='detail'] .supplier-panel { border: 0; border-radius: 0; background: transparent; }
body[data-supplier-view='detail'] .supplier-panel__body { border: 0; }
body[data-supplier-view='detail'] .supplier-tabs { padding-left: 0; }
body[data-supplier-view='detail'] .supplier-tab-panel { padding: 24px 0; }
body[data-supplier-view='detail'] .supplier-settings-form { max-width: 1280px; }
.supplier-panel:not(.is-open):hover { border-color: #b9bdc7; }
.supplier-panel.is-open { grid-column: 1 / -1; border-color: #c9ccd4; }
.supplier-panel__header { min-height: 64px; padding: 16px 20px; }
.supplier-panel:not(.is-open) .supplier-panel__header {
    height: 196px;
    min-height: 196px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 62px;
    gap: 16px;
    padding: 22px;
}
.supplier-panel:not(.is-open) .supplier-panel__identity { align-items: flex-start; }
.supplier-panel:not(.is-open) .supplier-active-dot { margin-top: 5px; }
.supplier-panel:not(.is-open) .supplier-panel__identity > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.supplier-panel:not(.is-open) .supplier-panel__identity strong {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 16px;
}
.supplier-panel:not(.is-open) .supplier-panel__header-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px 14px;
    grid-template-rows: 18px 28px;
    align-items: center;
    gap: 6px 10px;
    padding-top: 10px;
    border-top: 1px solid #eceef2;
}
.supplier-panel:not(.is-open) .supplier-panel__header-meta > span:first-child { grid-column: 1 / -1; margin: 0; }
.supplier-panel:not(.is-open) .supplier-panel__header-meta .status-badge { justify-self: start; max-width: 100%; }
.supplier-panel:not(.is-open) .supplier-panel__header-meta .toggle-switch { grid-column: 2; }
.supplier-panel:not(.is-open) .supplier-panel__chevron { width: 14px; }
.supplier-panel__header:hover { background: #fafafb; }
.supplier-panel__identity strong { font-size: 15px; }
.supplier-panel__header-meta { font-size: 12px; font-weight: 500; }
.supplier-panel__chevron { color: #626673; }
.supplier-panel.is-open .supplier-panel__body { max-height: none; }
.supplier-tabs { gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--color-border); }
.supplier-tabs button { min-height: 46px; padding: 10px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; font-size: 12px; font-weight: 600; }
.supplier-tabs button.is-active { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.supplier-tabs button:hover { color: var(--color-primary); }
.supplier-stat-tile { border: 0; border-left: 2px solid #dfe1e7; border-radius: 0; background: transparent; padding: 8px 14px; }
.supplier-stat-tile strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.supplier-chart { height: 86px; background: #fafafb; border-color: #eceef2; }
.chart-bar--success { background: #1f7d83; }
.progress-bar { height: 6px; background: #e8eaef; }
.progress-bar span { background: #1f7d83; }
.upload-panel, .match-config-card, .match-test-panel { border: 0; border-top: 1px solid var(--color-border); border-radius: 0; background: transparent; padding-top: 20px; }
.drop-zone { min-height: 84px; background: #fafafb; border-color: #c9ccd4; border-radius: 6px; }
.drop-zone:hover, .drop-zone.is-dragging { background: #fef4f7; border-color: #c81e50; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { font-size: 12px; }
th { background: #f6f7f9; color: #626673; font-size: 11px; font-weight: 650; padding: 12px 14px; }
td { padding: 13px 14px; border-color: #eceef2; line-height: 1.55; }
tbody tr:nth-child(even) { background: #fafafb; }
tbody tr:hover { background: #fef4f7; }
.sku-code { color: #1f7d83; }
.form-field > span { font-size: 12px; font-weight: 600; color: #414550; }
.form-field input:not([type='checkbox']):not([type='radio']), .form-field select,
.form-field textarea, .runs-filter-bar input, .runs-filter-bar select,
.magento-product-filters input, .magento-product-filters select,
.schedule-grid input, .schedule-grid select, .magento-sync-supplier-refresh select {
    min-width: 0; max-width: 100%; min-height: 40px; height: auto;
    padding: 9px 12px; border: 1px solid #c9ccd4; border-radius: 6px;
    color: #23262f; background: #fff; font-size: 13px; align-self: start;
}
.form-field input:not([type='checkbox']):not([type='radio']), .form-field select { height: 40px; }
.form-field textarea { min-height: 96px; }
input[type='checkbox'], input[type='radio'] { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; accent-color: #1f7d83; }
.auto-push-types { background: #fafafb; border-radius: 6px; padding: 16px; }
.inline-check { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.inline-check input { width: 16px; height: 16px; margin: 0; }
.form-field small { font-weight: 400; font-size: 11px; color: #626673; }
.settings-toc { background: #fff; box-shadow: none; border: 1px solid var(--color-border); border-radius: 6px; }
.settings-section-card, .mapping-editor-card, .mapping-preview-card, .magento-product-card, .full-report-card, .runs-workbench, .uitsluitingen-workbench { box-shadow: none; }
.magento-sync-stat { padding: 18px; }
.magento-sync-page { grid-template-columns: minmax(0,1fr); }
.magento-sync-page > *, .magento-product-card > * { min-width: 0; }
.magento-sync-stat strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.magento-sync-supplier-refresh { flex-wrap: wrap; gap: 16px; }
.magento-sync-banner--info { color: #19676c; background: #edf7f6; border-color: #c7e2df; }
.modal-backdrop { background: rgba(14,15,20,.48); backdrop-filter: blur(3px); padding: 20px; }
.modal-card { border-radius: 8px; box-shadow: 0 18px 70px #14151c30; max-width: 100%; }
.modal-card > header { padding: 20px 24px; }
.modal-card h2 { font-size: 18px; }
.mapping-supplier-tabs button { font-size: 12px; }
.mapping-supplier-tabs button.is-active { border-bottom-color: #c81e50; color: #c81e50; }
.bulk-actions { background: #f6f7f9; border-color: #dfe1e7; border-radius: 6px; }
.toggle-switch input:checked + span { background: #1f7d83; }
.toggle-switch:focus-within { outline: 3px solid #1f7d83; outline-offset: 4px; border-radius: 20px; }

@media (min-width: 781px) {
    .sidebar__brand, .topbar { height: 96px; min-height: 96px; box-sizing: border-box; }
    .sidebar__brand { display: flex; flex-direction: column; justify-content: center; padding: 12px 22px; }
    .topbar { padding-block: 12px; }
}
@media (min-width: 781px) and (max-width: 1100px) {
    .sidebar__brand, .topbar { height: 112px; min-height: 112px; }
    .topbar { flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; }
}
@media (max-width: 1799px) {
    .supplier-accordion { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1250px) {
    .supplier-accordion { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .dashboard-stats-grid, .magento-sync-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .topbar { flex-wrap: wrap; }
    .topbar__time { white-space: normal; }
    .magento-sync-supplier-refresh { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
    .supplier-accordion { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; width: 100%; overflow: visible; }
    .sidebar__brand { text-align: left; padding: 16px 18px 10px; border: 0; }
    .sidebar__logo { font-size: 17px; }
    .sidebar__subtitle { display: block; }
    .sidebar__nav { display: flex; flex-direction: row; overflow-x: auto; padding: 10px 12px; gap: 6px; }
    .nav-item { flex: 0 0 auto; padding: 10px 12px; min-height: 44px; gap: 8px; }
    .nav-item span { display: inline; }
    .nav-item::before { display: none; }
    .app-main { margin-left: 0; }
    .topbar { padding: 18px; min-height: 0; gap: 8px; }
    .topbar h1 { font-size: 22px; }
    .content-shell { padding: 20px 16px 32px; }
    .supplier-tabs { flex-direction: row; flex-wrap: wrap; gap: 14px; }
    .scheduler-overview { flex-direction: column; align-items: stretch; gap: 16px; }
    .scheduler-overview__main { align-items: flex-start; }
    .scheduler-overview__actions { flex-wrap: wrap; justify-content: flex-start; }
    .scheduler-dot { flex-shrink: 0; }
    .section-heading { flex-wrap: wrap; gap: 12px; }
    .supplier-panel__identity, .supplier-panel__identity > div, .supplier-panel__header-meta { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .supplier-panel__header { gap: 12px; }
    .supplier-run-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .supplier-tab-panel { padding: 16px; }
    .dashboard-two-column, .settings-page-layout { grid-template-columns: minmax(0,1fr); }
    .dashboard-supplier-grid { grid-template-columns: minmax(0,1fr); }
    .dashboard-stat { padding: 14px; min-height: 108px; gap: 8px; }
    .dashboard-stat strong, .magento-sync-stat strong { font-size: 24px; }
    .dashboard-stat__icon { display: none; }
    .dashboard-stat .dashboard-stat__time { font-size: 18px; }
    .magento-sync-actions, .form-actions, .mapping-header-actions { flex-direction: row; flex-wrap: wrap; }
    .modal-backdrop { padding: 10px; }
    .modal-card { width: 100%; }
    .modal-card > header { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Supplier detail uses a local navigation rail and full-width form sections. */
body[data-supplier-view='detail'] .supplier-panel.is-open .supplier-panel__body {
    display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 24px; align-items: start;
}
body[data-supplier-view='detail'] .supplier-tabs {
    display: flex; flex-direction: column; gap: 4px; padding: 8px;
    border: 1px solid var(--color-border); border-radius: 6px; background: #fff;
    position: sticky; top: 20px;
}
body[data-supplier-view='detail'] .supplier-tabs button {
    display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
    padding: 14px 12px; border: 0; border-radius: 4px; text-align: left; color: #23262f;
}
body[data-supplier-view='detail'] .supplier-tabs button small {
    color: #717684; font-size: 12px; font-weight: 400; line-height: 1.5;
}
body[data-supplier-view='detail'] .supplier-tabs button.is-active { background: #fceaf0; color: #b51946; }
body[data-supplier-view='detail'] .supplier-tab-panel { padding: 0; min-width: 0; grid-column: 2; grid-row: 1; }
body[data-supplier-view='detail'] .supplier-settings-form { display: flex; flex-direction: column; gap: 20px; max-width: none; }
.supplier-enable-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; margin-bottom: 20px; background: #fff; border-block: 1px solid var(--color-border); }
.supplier-enable-band small { display: block; color: #717684; margin-top: 5px; font-size: 12px; }
.supplier-settings-section { background: #fff; border-block: 1px solid var(--color-border); min-width: 0; }
.supplier-settings-section > h3 { margin: 0; padding: 15px 20px; background: #fafafb; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.supplier-section-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 22px; padding: 22px 20px; }
.supplier-section-fields > * { min-width: 0; margin: 0; }
.supplier-section-fields .schedule-ui, .supplier-section-fields .auto-push-types { grid-column: 1 / -1; }
.supplier-section-fields .auto-push-types { background: transparent; border: 0; padding: 0; }
.supplier-section-fields .auto-push-types legend { margin-bottom: 12px; font-size: 12px; }
.supplier-connection-body { padding: 20px; }
body[data-supplier-view='detail'] .supplier-save-bar { position: sticky; bottom: 16px; z-index: 2; display: flex; justify-content: flex-end; background: #fff; padding: 14px 20px; border: 1px solid var(--color-border); border-radius: 6px; box-shadow: 0 4px 18px #14151c0b; }
body[data-supplier-view='detail'] .match-config-card { margin-top: 0; }
@media (max-width: 1050px) {
    body[data-supplier-view='detail'] .supplier-panel.is-open .supplier-panel__body { grid-template-columns: minmax(0,1fr); gap: 20px; }
    body[data-supplier-view='detail'] .supplier-tabs { position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    body[data-supplier-view='detail'] .supplier-tab-panel { grid-column: 1; grid-row: 2; }
}
@media (max-width: 600px) {
    .supplier-section-fields { grid-template-columns: minmax(0,1fr); padding: 18px 16px; }
    body[data-supplier-view='detail'] .supplier-tabs button { padding: 12px 8px; font-size: 12px; }
    body[data-supplier-view='detail'] .supplier-tabs button small { font-size: 11px; }
}
@media print {
    .sidebar, .skip-link { display: none; }
    .app-main { margin-left: 0; }
}
