.page-customers {
    --customers-accent: #5547ed;
    --customers-accent-strong: #4638dc;
    --customers-accent-soft: #efedff;
    --customers-ink: var(--os-color-ink);
    --customers-muted: #8b93a7;
    --customers-line: var(--os-color-border);
    --customers-canvas: var(--os-color-canvas);
    --catalog-ink: var(--customers-ink);
    --catalog-muted: var(--customers-muted);
    --catalog-line: var(--customers-line);
    --catalog-brand: var(--customers-accent);
    --catalog-canvas: var(--customers-canvas);
    background: var(--customers-canvas);
}

.page-customers [hidden] {
    display: none !important;
}

.page-customers .app-content,
.page-customers .main.main-uniform-page {
    background: var(--customers-canvas);
}

.page-customers .customers-heading {
    margin-bottom: 20px;
}

.page-customers .customers-primary-action,
.page-customers .customer-detail-actions .btn,
.page-customers .customer-save-card .btn {
    border-radius: 12px;
    box-shadow: none;
}

.page-customers .customers-primary-action {
    min-height: 44px !important;
    padding-inline: 18px !important;
    background: var(--customers-accent);
}

.page-customers .customers-primary-action:hover,
.page-customers .customer-save-card .btn:hover {
    background: var(--customers-accent-strong);
}

.metric-violet { background: #eeeaff; color: #6653ef; }
.metric-green { background: #e4f8ef; color: #1aa779; }
.metric-orange { background: #fff1df; color: #ed7e1e; }
.metric-slate { background: #eef1f6; color: #697286; }

.customers-directory {
    overflow: hidden;
    border: 1px solid var(--customers-line);
    border-radius: 20px;
    background: var(--os-color-surface);
}

.customers-directory-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 22px;
    border-bottom: 1px solid var(--os-color-border);
}

.customers-directory-header h2,
.customers-directory-header p {
    margin: 0;
}

.customers-directory-header h2 {
    color: var(--customers-ink);
    font-size: 17px;
    letter-spacing: -.02em;
}

.customers-directory-header p {
    margin-top: 3px;
    color: var(--customers-muted);
    font-size: 11px;
}

.customers-directory-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customers-search {
    width: min(330px, 30vw);
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid #dfe3eb;
    border-radius: 12px;
    background: #f9fafc;
    color: #9299aa;
}

.customers-search:focus-within {
    border-color: #aaa3f7;
    background: var(--os-color-surface);
    box-shadow: 0 0 0 3px #eeecff;
}

.customers-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--customers-ink);
    font: inherit;
    font-size: 12px;
}

.customers-filter-tabs {
    display: flex;
    gap: 2px;
    padding: 3px;
    border: 0;
    border-radius: 12px;
    background: #f4f5f8;
}

.customers-filter-tabs button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #7c8498;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.customers-filter-tabs button span {
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--os-color-surface);
    color: #8b93a7;
    font-size: 9px;
}

.customers-filter-tabs button.active {
    background: var(--customers-accent);
    color: #fff;
}

.customers-filter-tabs button.active span {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.customers-list-head,
.customer-directory-row {
    display: grid;
    grid-template-columns: minmax(230px, 1.55fr) minmax(210px, 1.15fr) minmax(130px, .72fr) 90px 110px 90px 14px;
    align-items: center;
    gap: 14px;
}

.customers-list-head {
    min-height: 39px;
    padding: 0 20px;
    border-bottom: 1px solid var(--os-color-border);
    background: #fafafd;
    color: #949cad;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.customer-directory-row {
    min-height: 88px;
    padding: 0 20px;
    border-bottom: 1px solid var(--os-color-border);
    color: inherit;
    transition: background .15s ease;
}

.customer-directory-row:last-child {
    border-bottom: 0;
}

.customer-directory-row:hover {
    background: #faf9ff;
}

.customer-directory-row:hover .customer-row-identity strong,
.customer-directory-row:hover .customer-row-arrow {
    color: var(--customers-accent);
}

.customer-row-identity {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.customer-row-avatar {
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #5f52ef, #8176f7);
    color: #fff;
    font-weight: 820;
    letter-spacing: -.02em;
}

.customer-row-avatar {
    width: 44px;
    height: 44px;
    font-size: 13px;
}

.catalog-row-icon.customer-row-avatar {
    background: linear-gradient(145deg, #5f52ef, #8176f7);
    color: #fff;
}

.customer-row-identity > span:last-child,
.customer-row-identity strong,
.customer-row-identity small {
    min-width: 0;
    display: block;
}

.customer-row-identity strong {
    overflow: hidden;
    color: var(--customers-ink);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .15s ease;
}

.customer-row-tags {
    min-height: 20px;
    margin-top: 5px;
    overflow: hidden;
    white-space: nowrap;
}

.customer-row-tags em {
    display: inline-flex;
    margin-right: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f0efff;
    color: #6658d9;
    font-size: 9px;
    font-style: normal;
    font-weight: 750;
}

.customer-row-tags > span {
    color: #a0a7b7;
    font-size: 10px;
}

.customer-row-contact,
.customer-row-date,
.customer-row-visits,
.customer-row-value {
    min-width: 0;
}

.customer-row-contact > span,
.customer-row-contact > small,
.customer-row-date > strong,
.customer-row-date > small,
.customer-row-visits > strong,
.customer-row-visits > small,
.customer-row-value > strong,
.customer-row-value > small {
    display: block;
}

.customer-row-contact > span,
.customer-row-contact > small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-row-contact > span {
    color: #586176;
    font-size: 11px;
}

.customer-row-contact > small {
    margin-top: 5px;
    color: #969eaf;
    font-size: 10px;
}

.customer-row-contact i {
    width: 14px;
    color: #a3aabb;
}

.customer-row-date strong,
.customer-row-visits strong,
.customer-row-value strong {
    color: #31394c;
    font-size: 12px;
    font-weight: 780;
}

.customer-row-date small,
.customer-row-visits small,
.customer-row-value small {
    margin-top: 4px;
    color: #9aa1b2;
    font-size: 9px;
}

.customer-status {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 27px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.customer-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.customer-status.is-active { background: #e5f8ed; color: #218d58; }
.customer-status.is-archived { background: #eef0f4; color: #737b8e; }
.customer-status.is-blocked { background: #fff0ed; color: #d95445; }
.catalog-status.customer-status.is-blocked { background: #fff0ed; color: #d95445; }

.customer-row-arrow {
    color: #c1c6d1;
    font-size: 9px;
    transition: color .15s ease, transform .15s ease;
}

.customer-directory-row:hover .customer-row-arrow {
    transform: translateX(2px);
}

.customers-filter-empty,
.customers-empty-state {
    min-height: 280px;
    display: grid;
    justify-items: center;
    align-content: center;
    padding: 34px;
    text-align: center;
}

.customers-filter-empty > span,
.customers-empty-state > span {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: var(--customers-accent-soft);
    color: var(--customers-accent);
    font-size: 19px;
}

.customers-filter-empty strong,
.customers-empty-state h2 {
    margin: 14px 0 0;
    color: var(--customers-ink);
    font-size: 17px;
}

.customers-filter-empty p,
.customers-empty-state p {
    max-width: 420px;
    margin: 5px 0 0;
    color: var(--customers-muted);
    font-size: 12px;
}

.customers-empty-state .btn {
    margin-top: 18px;
}

/* Nieuwe klant: vaste modal met meerstappenwizard */
body.customer-modal-open {
    overflow: hidden;
}

.customer-create-modal[hidden] {
    display: none;
}

.customer-create-modal {
    position: fixed;
    z-index: 1500;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.customer-create-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(19, 26, 48, .58);
    backdrop-filter: blur(6px);
    cursor: default;
}

.customer-create-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    height: min(760px, calc(100vh - 40px));
    min-height: 600px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--customers-line);
    border-radius: 24px;
    background: var(--os-color-surface);
    box-shadow: 0 30px 90px rgba(23, 30, 58, .28);
}

.customer-create-header {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--customers-line);
}

.customer-create-header > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.customer-create-icon,
.customer-wizard-review section > span {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--customers-accent-soft);
    color: var(--customers-accent);
    font-size: 17px;
}

.customer-create-header h2,
.customer-create-header p {
    margin: 0;
}

.customer-create-header h2 {
    color: var(--customers-ink);
    font-size: 22px;
    letter-spacing: -.025em;
}

.customer-create-header p {
    margin-top: 3px;
    color: var(--customers-muted);
    font-size: 12px;
}

.customer-create-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--customers-line);
    border-radius: 12px;
    background: var(--os-color-surface);
    color: var(--customers-muted);
    cursor: pointer;
}

.customer-create-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 24px;
    border-bottom: 1px solid var(--customers-line);
    background: #fafbfe;
}

.customer-create-progress button {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 8px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #8a93a7;
    cursor: pointer;
}

.customer-create-progress button:disabled {
    cursor: default;
    opacity: .72;
}

.customer-create-progress button > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #d7dce7;
    border-radius: 50%;
    background: var(--os-color-surface);
    font-size: 11px;
    font-weight: 800;
}

.customer-create-progress button > em {
    overflow: hidden;
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-create-progress button.is-active {
    border-bottom-color: var(--customers-accent);
    color: var(--customers-ink);
}

.customer-create-progress button.is-active > span,
.customer-create-progress button.is-complete > span {
    border-color: var(--customers-accent);
    background: var(--customers-accent);
    color: #fff;
}

.customer-create-form {
    position: relative;
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.customer-create-error {
    margin: 14px 24px 0;
}

.customer-create-body {
    min-height: 0;
    overflow: auto;
    padding: 26px 42px 104px;
}

.customer-wizard-panel[hidden] {
    display: none;
}

.customer-wizard-intro {
    margin-bottom: 22px;
}

.customer-wizard-intro > span {
    color: var(--customers-accent);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.customer-wizard-intro h3,
.customer-wizard-intro p {
    margin: 0;
}

.customer-wizard-intro h3 {
    margin-top: 5px;
    color: var(--customers-ink);
    font-size: 24px;
    letter-spacing: -.025em;
}

.customer-wizard-intro p {
    margin-top: 5px;
    color: var(--customers-muted);
    font-size: 12px;
}

.customer-wizard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.customer-wizard-grid .field {
    min-width: 0;
    margin: 0;
}

.customer-wizard-grid .field > span,
.customer-wizard-grid .field > small {
    display: block;
}

.customer-wizard-grid .field > span {
    margin-bottom: 7px;
    color: #4d5669;
    font-size: 11px;
    font-weight: 760;
}

.customer-wizard-grid .field > small {
    margin-top: 5px;
    color: #9299aa;
    font-size: 9px;
}

.customer-wizard-grid .input {
    width: 100%;
    min-height: 46px;
    border-color: #dfe3eb;
    border-radius: 12px;
    background: #fbfbfd;
    font-size: 12px;
}

.customer-wizard-grid textarea.input {
    min-height: 88px;
    padding-top: 12px;
    resize: vertical;
}

.customer-wizard-grid .input:focus {
    border-color: #aaa3f7;
    background: var(--os-color-surface);
    box-shadow: 0 0 0 3px #eeecff;
}

.customer-wizard-grid .span-2 {
    grid-column: 1 / -1;
}

.customer-wizard-validation {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 15px 0 0;
    color: #c7334d;
    font-size: 11px;
    font-weight: 700;
}

.customer-wizard-validation[hidden] {
    display: none;
}

.customer-wizard-address-status {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--customers-accent-soft);
    color: #665e94;
    font-size: 11px;
}

.customer-wizard-address-status[data-state="summary"] {
    background: #e9f8f1;
    color: #187c5d;
}

.customer-wizard-address-status[data-state="manual"] {
    background: #fff4e7;
    color: #976222;
}

.customer-wizard-address-status .address-lookup-edit {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 10px;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.customer-wizard-manual-address {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.customer-wizard-manual-address[hidden],
.customer-wizard-address-status[hidden] {
    display: none;
}

.customer-wizard-review {
    display: grid;
    gap: 10px;
}

.customer-wizard-review section {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border: 1px solid var(--customers-line);
    border-radius: 15px;
}

.customer-wizard-review section > span {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
}

.customer-wizard-review section > span.is-green { background: #e4f8ef; color: #1aa779; }
.customer-wizard-review section > span.is-orange { background: #fff1df; color: #ed7e1e; }

.customer-wizard-review section > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.customer-wizard-review small,
.customer-wizard-review strong,
.customer-wizard-review p {
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-wizard-review small { color: var(--customers-muted); font-size: 9px; }
.customer-wizard-review strong { color: var(--customers-ink); font-size: 12px; }
.customer-wizard-review p { color: var(--customers-muted); font-size: 10px; }
.customer-wizard-review button {
    margin-left: auto;
    padding: 6px;
    border: 0;
    background: transparent;
    color: var(--customers-accent);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.customer-wizard-consent {
    margin-top: 18px;
    padding: 16px;
    border-radius: 15px;
    background: #fafbfe;
}

.customer-wizard-consent h4,
.customer-wizard-consent > p {
    margin: 0;
}

.customer-wizard-consent h4 { color: var(--customers-ink); font-size: 13px; }
.customer-wizard-consent > p { margin-top: 3px; color: var(--customers-muted); font-size: 10px; }
.customer-wizard-consent .customer-consent-row { margin-top: 11px; padding: 10px 0 0; border-top: 1px solid var(--customers-line); }

.customer-create-footer {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid var(--customers-line);
    background: var(--os-color-surface);
}

.customer-create-footer > span {
    margin-right: auto;
    color: var(--customers-muted);
    font-size: 10px;
    font-weight: 700;
}

.customer-create-footer .btn {
    min-width: 132px;
}

.customer-create-footer [hidden] {
    display: none;
}

html[data-theme="dark"] .customer-create-dialog,
html[data-theme="dark"] .customer-create-header,
html[data-theme="dark"] .customer-create-footer,
html[data-theme="dark"] .customer-create-close {
    border-color: var(--os-color-border);
    background: var(--os-color-surface);
}

html[data-theme="dark"] .customer-create-progress,
html[data-theme="dark"] .customer-wizard-consent {
    border-color: var(--os-color-border);
    background: var(--os-color-surface-muted);
}

html[data-theme="dark"] .customer-wizard-grid .input,
html[data-theme="dark"] .customer-create-progress button > span,
html[data-theme="dark"] .customer-wizard-review section {
    border-color: var(--os-color-border);
    background: var(--os-color-surface-strong);
    color: var(--os-color-text);
}

/* Klantdossier: gerichte bewerkmodals */
.customer-edit-modal[hidden] {
    display: none;
}

.customer-edit-modal {
    position: fixed;
    z-index: 1510;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.customer-edit-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(19, 26, 48, .58);
    backdrop-filter: blur(6px);
    cursor: default;
}

.customer-edit-dialog {
    --customer-edit-footer-height: 64px;
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--customers-line);
    border-radius: 22px;
    background: var(--os-color-surface);
    box-shadow: 0 30px 90px rgba(23, 30, 58, .28);
}

.customer-edit-header {
    flex: 0 0 auto;
    min-height: 88px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 13px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--customers-line);
}

.customer-edit-header > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--customers-accent-soft);
    color: var(--customers-accent);
    font-size: 16px;
}

.customer-edit-header h2,
.customer-edit-header p {
    margin: 0;
}

.customer-edit-header h2 {
    color: var(--customers-ink);
    font-size: 19px;
    letter-spacing: -.02em;
}

.customer-edit-header p {
    margin-top: 3px;
    color: var(--customers-muted);
    font-size: 11px;
}

.customer-edit-header > button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--customers-line);
    border-radius: 12px;
    background: var(--os-color-surface);
    color: var(--customers-muted);
    cursor: pointer;
}

.customer-edit-dialog > form {
    flex: 0 1 auto;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.customer-edit-error {
    margin: 14px 20px 0;
}

.customer-edit-body {
    flex: 0 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 20px 24px 22px;
}

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

.customer-edit-grid.one-column {
    grid-template-columns: 1fr;
}

.customer-edit-grid > label {
    min-width: 0;
}

.customer-edit-grid > label > span,
.customer-edit-grid > label > small {
    display: block;
}

.customer-edit-grid > label > span {
    margin-bottom: 7px;
    color: #4d5669;
    font-size: 11px;
    font-weight: 760;
}

.customer-edit-grid > label > small {
    margin-top: 5px;
    color: #9299aa;
    font-size: 9px;
}

.customer-edit-grid .input {
    width: 100%;
    min-height: 46px;
    border-color: #dfe3eb;
    border-radius: 12px;
    background: #fbfbfd;
    font-size: 12px;
}

.customer-edit-grid textarea.input {
    min-height: 100px;
    padding-top: 11px;
    resize: vertical;
}

.customer-edit-grid textarea.customer-edit-notes {
    min-height: 190px;
}

.customer-edit-grid .input:focus {
    border-color: #aaa3f7;
    background: var(--os-color-surface);
    box-shadow: 0 0 0 3px #eeecff;
}

.customer-edit-grid .span-2 {
    grid-column: 1 / -1;
}

.customer-edit-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 0 0;
    padding: 11px 13px;
    border-radius: 11px;
    background: var(--customers-accent-soft);
    color: #68618d;
    font-size: 10px;
}

.customer-edit-footer {
    position: sticky;
    z-index: 3;
    bottom: 0;
    flex: 0 0 var(--customer-edit-footer-height);
    width: 100%;
    height: var(--customer-edit-footer-height);
    min-height: var(--customer-edit-footer-height);
    max-height: var(--customer-edit-footer-height);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 8px 18px;
    border-top: 1px solid var(--customers-line);
    background: var(--os-color-surface);
}

.customer-edit-footer .btn {
    min-width: 132px;
    min-height: 44px;
}

html[data-theme="dark"] .customer-edit-dialog,
html[data-theme="dark"] .customer-edit-header,
html[data-theme="dark"] .customer-edit-footer,
html[data-theme="dark"] .customer-edit-header > button {
    border-color: var(--os-color-border);
    background: var(--os-color-surface);
}

html[data-theme="dark"] .customer-edit-grid .input {
    border-color: var(--os-color-border);
    background: var(--os-color-surface-strong);
    color: var(--os-color-text);
}

/* Klant toevoegen en wijzigen */
.customer-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 18px;
    align-items: start;
}

.customer-editor-main,
.customer-editor-side {
    display: grid;
    gap: 16px;
}

.customer-editor-side {
    position: sticky;
    top: 88px;
}

.customer-form-card,
.customer-consent-card,
.customer-save-card,
.customer-profile-card {
    overflow: hidden;
    border: 1px solid var(--customers-line);
    border-radius: 19px;
    background: var(--os-color-surface);
}

.customer-card-heading {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--os-color-border);
}

.customer-card-heading > span,
.customer-consent-card > header > span,
.customer-contact-grid > div > span {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--customers-accent-soft);
    color: var(--customers-accent);
}

.customer-card-heading > span.is-green,
.customer-contact-grid > div > span.is-green { background: #e4f8ef; color: #1aa779; }
.customer-card-heading > span.is-orange,
.customer-contact-grid > div > span.is-orange { background: #fff1df; color: #ed7e1e; }
.customer-card-heading > span.is-slate,
.customer-contact-grid > div > span.is-slate { background: #eef1f6; color: #697286; }

.customer-card-heading h2,
.customer-card-heading p,
.customer-consent-card h2,
.customer-consent-card p {
    margin: 0;
}

.customer-card-heading h2,
.customer-consent-card h2 {
    color: var(--customers-ink);
    font-size: 15px;
    letter-spacing: -.015em;
}

.customer-card-heading p,
.customer-consent-card p {
    margin-top: 3px;
    color: #9299aa;
    font-size: 10px;
}

.customer-card-heading > em {
    min-width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    margin-left: auto;
    border-radius: 999px;
    background: #f0efff;
    color: #6357dc;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.customer-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px 18px;
    padding: 20px;
}

.customer-form-grid .field {
    margin-bottom: 16px;
}

.customer-form-grid .field:nth-last-child(-n+2) {
    margin-bottom: 0;
}

.customer-form-grid label {
    color: #4d5669;
    font-size: 11px;
    font-weight: 760;
}

.customer-form-grid .input {
    height: 45px;
    border-color: #dfe3eb;
    border-radius: 11px;
    background: #fbfbfd;
    font-size: 12px;
}

.customer-form-grid .input:focus {
    border-color: #aaa3f7;
    background: var(--os-color-surface);
    box-shadow: 0 0 0 3px #eeecff;
}

.customer-form-grid .field small {
    color: #989faf;
    font-size: 9px;
}

.customer-form-grid .customer-notes-input {
    min-height: 110px;
    height: 110px;
    resize: vertical;
}

.customer-consent-card > header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid var(--os-color-border);
}

.customer-consent-card > div {
    padding: 5px 18px;
}

.customer-consent-row {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 15px 0;
    border-bottom: 1px solid #eef0f4;
    cursor: pointer;
}

.customer-consent-row:last-child {
    border-bottom: 0;
}

.customer-consent-row > input {
    position: absolute;
    opacity: 0;
}

.customer-toggle {
    position: relative;
    width: 36px;
    height: 21px;
    border-radius: 999px;
    background: #d9dde5;
    transition: background .15s ease;
}

.customer-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--os-color-surface);
    transition: transform .15s ease;
}

.customer-consent-row > input:checked + .customer-toggle {
    background: var(--customers-accent);
}

.customer-consent-row > input:checked + .customer-toggle::after {
    transform: translateX(15px);
}

.customer-consent-row > input:focus-visible + .customer-toggle {
    outline: 3px solid #dcd8ff;
    outline-offset: 2px;
}

.customer-consent-row strong,
.customer-consent-row small {
    display: block;
}

.customer-consent-row strong {
    color: #30384b;
    font-size: 11px;
}

.customer-consent-row small {
    margin-top: 3px;
    color: #969eaf;
    font-size: 9px;
}

.customer-save-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
}

.customer-save-card > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #e4f8ef;
    color: #1aa779;
}

.customer-save-card strong {
    color: var(--customers-ink);
    font-size: 12px;
}

.customer-save-card p {
    margin: 3px 0 0;
    color: #969eaf;
    font-size: 9px;
    line-height: 1.5;
}

.customer-save-card .btn {
    min-height: 44px;
    grid-column: 1 / -1;
    margin-top: 5px;
    background: var(--customers-accent);
}

/* Klantdetail */
.customer-detail-hero {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding: 22px 24px;
    border: 1px solid var(--customers-line);
    border-radius: 21px;
    background: var(--os-color-surface);
}

.customer-detail-heading {
    min-width: 0;
}

.customer-detail-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.customer-detail-kicker {
    color: var(--customers-accent);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.customer-detail-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-detail-name h1 {
    margin: 2px 0 0;
    color: var(--customers-ink);
    font-size: 27px;
    letter-spacing: -.035em;
}

.customer-detail-name .customer-status {
    min-height: 30px;
    font-size: 11px;
}

.customer-detail-identity p {
    margin: 4px 0 0;
    color: #8e96a8;
    font-size: 11px;
}

.customer-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

.customer-detail-actions .btn {
    min-height: 44px;
    font-size: 14px;
    white-space: nowrap;
}

.customer-more-actions > summary {
    width: 54px;
    padding: 0;
}

.customer-profile-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.customer-profile-metrics article {
    min-height: 82px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    border: 1px solid var(--customers-line);
    border-radius: 16px;
    background: var(--os-color-surface);
}

.customer-profile-metrics article > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.customer-profile-metrics strong,
.customer-profile-metrics small {
    display: block;
}

.customer-profile-metrics strong {
    overflow: hidden;
    color: var(--customers-ink);
    font-size: 19px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-profile-metrics small {
    margin-top: 4px;
    color: #7f889b;
    font-size: 12px;
}

.customer-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(270px, .62fr);
    gap: 16px;
    align-items: start;
}

.customer-detail-main,
.customer-detail-side {
    display: grid;
    gap: 16px;
}

.customer-detail-layout .customer-card-heading h2 {
    font-size: 17px;
}

.customer-detail-layout .customer-card-heading p {
    margin-top: 4px;
    color: #7f889b;
    font-size: 12px;
}

.customer-detail-layout .customer-card-heading > em {
    font-size: 11px;
}

.customer-card-heading.compact {
    min-height: 70px;
    padding: 13px 16px;
}

.customer-card-heading.compact > span {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.customer-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--os-color-border);
}

.customer-contact-grid > div {
    min-width: 0;
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 20px;
    background: var(--os-color-surface);
}

.customer-contact-grid > div > span {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.customer-contact-grid small,
.customer-contact-grid strong {
    min-width: 0;
    display: block;
}

.customer-contact-grid small {
    color: #7f889b;
    font-size: 12px;
}

.customer-contact-grid strong {
    margin-top: 4px;
    overflow: hidden;
    color: #31394c;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-timeline-list > a {
    min-height: 72px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto 90px 10px;
    align-items: center;
    gap: 13px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--os-color-border);
    color: inherit;
}

.customer-timeline-list > a:last-child {
    border-bottom: 0;
}

.customer-timeline-list > a:hover {
    background: #faf9ff;
}

.customer-timeline-list time strong,
.customer-timeline-list time small,
.customer-timeline-list > a > span:nth-child(2) strong,
.customer-timeline-list > a > span:nth-child(2) small {
    display: block;
}

.customer-timeline-list time strong {
    color: var(--customers-accent);
    font-size: 13px;
}

.customer-timeline-list time small,
.customer-timeline-list > a > span:nth-child(2) small {
    margin-top: 3px;
    color: #7f889b;
    font-size: 11px;
}

.customer-timeline-list > a > span:nth-child(2) strong,
.customer-timeline-list > a > strong {
    color: #30384b;
    font-size: 14px;
}

.customer-timeline-list > a > strong {
    text-align: right;
}

.customer-timeline-list > a > i {
    color: #c2c7d2;
    font-size: 11px;
}

.customer-history-status {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.customer-history-status.is-success { background: #e5f8ed; color: #218d58; }
.customer-history-status.is-info { background: #eeedff; color: #6256dc; }
.customer-history-status.is-muted { background: #eef0f4; color: #737b8e; }

.customer-history-empty {
    min-height: 180px;
    display: grid;
    justify-items: center;
    align-content: center;
    padding: 28px;
    text-align: center;
}

.customer-history-empty > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #f0efff;
    color: var(--customers-accent);
}

.customer-history-empty strong {
    margin-top: 10px;
    font-size: 14px;
}

.customer-history-empty p {
    margin: 4px 0 0;
    color: #7f889b;
    font-size: 12px;
}

.customer-preference-list,
.customer-loyalty-list,
.customer-notes-body {
    padding: 8px 16px 16px;
}

.customer-direct-preferences .customer-card-heading {
    flex-wrap: wrap;
}

.customer-preference-save-state {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f0ff;
    color: #6558dd;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.customer-preference-save-state em {
    font-style: normal;
}

.customer-preference-save-state.is-saving {
    background: #fff5e8;
    color: #cf7421;
}

.customer-preference-save-state.is-saved {
    background: #e5f8ed;
    color: #218d58;
}

.customer-preference-save-state.is-error {
    background: #fff0ed;
    color: #d95445;
}

.customer-preference-save-state.is-readonly {
    background: #eef0f4;
    color: #737b8e;
}

.customer-preference-switch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    background: #fafafd;
}

.customer-preferences-sidebar .customer-card-heading {
    gap: 10px;
}

.customer-preferences-sidebar .customer-card-heading > div:nth-child(2) {
    flex: 1 1 150px;
}

.customer-preferences-sidebar .customer-preference-save-state {
    flex: 0 0 auto;
    margin: 0 0 0 48px;
}

.customer-preferences-sidebar .customer-preference-switch-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    background: var(--os-color-surface);
}

.customer-preferences-sidebar .customer-inline-preference {
    min-height: 70px;
    grid-template-columns: 34px minmax(0, 1fr) 38px;
    gap: 10px;
    padding: 11px 14px;
    border: 0;
    border-top: 1px solid var(--os-color-border);
    border-radius: 0;
}

.customer-preferences-sidebar .customer-inline-preference:hover {
    border-color: var(--os-color-border);
    background: #fafaff;
}

.customer-preferences-sidebar .customer-inline-preference.is-blocking {
    background: #fffafa;
}

.customer-preferences-sidebar .customer-preference-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
}

.customer-preferences-sidebar .customer-inline-toggle {
    width: 38px;
    height: 22px;
}

.customer-preferences-sidebar .customer-inline-toggle::after {
    width: 16px;
    height: 16px;
}

.customer-preferences-sidebar .customer-inline-preference > input:checked ~ .customer-inline-toggle::after {
    transform: translateX(16px);
}

.customer-preferences-sidebar .customer-preference-copy strong {
    font-size: 13px;
}

.customer-preferences-sidebar .customer-preference-copy small {
    font-size: 11px;
    line-height: 1.4;
}

.customer-inline-preference {
    position: relative;
    min-width: 0;
    min-height: 82px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid #e4e7ef;
    border-radius: 14px;
    background: var(--os-color-surface);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.customer-inline-preference:hover {
    border-color: #cfcaf8;
    background: #fdfcff;
}

.customer-inline-preference.is-wide {
    grid-column: 1 / -1;
}

.customer-inline-preference.is-blocking {
    background: #fffafa;
}

.customer-inline-preference.is-blocking:hover {
    border-color: #f1c9c3;
}

.customer-inline-preference > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.customer-preference-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-size: 13px;
}

.customer-preference-icon.is-violet { background: #efedff; color: #6558dd; }
.customer-preference-icon.is-green { background: #e5f8ef; color: #1a9c70; }
.customer-preference-icon.is-orange { background: #fff1df; color: #e67a1d; }
.customer-preference-icon.is-slate { background: #eef1f6; color: #697286; }
.customer-preference-icon.is-danger { background: #fff0ed; color: #d95445; }

.customer-preference-copy {
    min-width: 0;
}

.customer-preference-copy strong,
.customer-preference-copy small {
    display: block;
}

.customer-preference-copy strong {
    color: #30384b;
    font-size: 11px;
    line-height: 1.3;
}

.customer-preference-copy small {
    margin-top: 3px;
    color: #949cad;
    font-size: 9px;
    line-height: 1.45;
}

.customer-inline-toggle {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #d9dde5;
    transition: background .15s ease, opacity .15s ease;
}

.customer-inline-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--os-color-surface);
    box-shadow: 0 1px 2px rgba(18, 25, 45, .18);
    transition: transform .17s ease;
}

.customer-inline-preference > input:checked ~ .customer-inline-toggle {
    background: var(--customers-accent);
}

.customer-inline-preference.is-blocking > input:checked ~ .customer-inline-toggle {
    background: #dc5b4c;
}

.customer-inline-preference > input:checked ~ .customer-inline-toggle::after {
    transform: translateX(18px);
}

.customer-inline-preference > input:focus-visible ~ .customer-inline-toggle {
    outline: 3px solid #dcd8ff;
    outline-offset: 3px;
}

.customer-inline-preference:has(input:disabled) {
    cursor: default;
}

.customer-inline-preference.is-saving .customer-inline-toggle {
    opacity: .55;
}

.customer-inline-preference.is-saved {
    border-color: #bfe8d2;
}

.customer-inline-preference.is-error {
    border-color: #efbcb4;
    background: #fffafa;
}

.customer-preference-list > div,
.customer-loyalty-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef0f4;
}

.customer-preference-list > div:last-child,
.customer-loyalty-list > div:last-child {
    border-bottom: 0;
}

.customer-preference-list span,
.customer-loyalty-list span {
    color: #687185;
    font-size: 12px;
}

.customer-preference-list span i {
    width: 17px;
    color: #9ba2b2;
}

.customer-preference-list strong,
.customer-loyalty-list strong {
    color: #8b93a4;
    font-size: 12px;
}

.customer-preference-list strong.is-yes {
    color: #218d58;
}

.customer-loyalty-balance {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 17px 16px 8px;
}

.customer-loyalty-balance span {
    color: #687185;
    font-size: 12px;
}

.customer-loyalty-balance strong {
    color: var(--customers-ink);
    font-size: 23px;
}

.customer-loyalty-list p {
    margin: 8px 0 0;
    color: #7f889b;
    font-size: 12px;
}

.customer-notes-body {
    padding-top: 16px;
}

.customer-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.customer-tag-cloud span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f0efff;
    color: #6658d9;
    font-size: 11px;
    font-weight: 750;
}

.customer-tag-cloud span.is-empty {
    background: #f0f1f4;
    color: #8e96a8;
}

.customer-notes-body > p {
    margin: 14px 0 0;
    color: #687185;
    font-size: 13px;
    line-height: 1.65;
}

@media (max-width: 1180px) {
    .customers-list-head,
    .customer-directory-row {
        grid-template-columns: minmax(190px, 1.25fr) minmax(170px, 1fr) 80px 112px 92px 14px;
    }

    .customers-list-head > span:nth-child(3),
    .customer-row-date {
        display: none;
    }

    .customer-editor-layout,
    .customer-detail-layout {
        grid-template-columns: 1fr;
    }

    .customer-editor-side {
        position: static;
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 980px) {
    .customers-list-head,
    .customer-directory-row {
        grid-template-columns: minmax(220px, 1.7fr) 90px 110px 90px 14px;
    }

    .customers-list-head > span:nth-child(2),
    .customers-list-head > span:nth-child(3),
    .customer-directory-row > .customer-row-contact,
    .customer-directory-row > .customer-row-date {
        display: none;
    }
}

@media (max-width: 800px) {
    .customer-editor-side {
        grid-template-columns: 1fr;
    }

    .customer-detail-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-detail-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .customer-contact-grid {
        grid-template-columns: 1fr;
    }

    .customer-preference-switch-grid {
        grid-template-columns: 1fr;
    }

    .customer-inline-preference.is-wide {
        grid-column: 1;
    }
}

@media (max-width: 720px) {
    .customers-hero-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .customers-directory {
        border-radius: 16px;
    }

    .customers-directory-header {
        padding: 15px;
    }

    .customers-filter-tabs {
        width: 100%;
    }

    .customers-filter-tabs button {
        flex: 1;
        justify-content: center;
    }

    .customer-form-grid {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    .customer-form-grid .span-2 {
        grid-column: 1;
    }

    .customer-form-grid .field,
    .customer-form-grid .field:nth-last-child(-n+2) {
        margin-bottom: 14px;
    }

    .customer-form-grid .field:last-child {
        margin-bottom: 0;
    }

    .customer-card-heading {
        padding: 14px 16px;
    }

    .customer-preference-save-state {
        width: auto;
        margin-left: 55px;
    }

    .customer-preference-switch-grid {
        gap: 8px;
        padding: 10px;
    }

    .customer-inline-preference {
        min-height: 76px;
        padding: 11px 12px;
    }

    .customer-detail-hero {
        padding: 18px;
        border-radius: 17px;
    }

    .customer-detail-name {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .customer-detail-name h1 {
        font-size: 22px;
    }

    .customer-detail-actions .btn {
        flex: 1 1 auto;
    }

    .customer-profile-metrics {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .customer-profile-metrics article {
        min-height: 72px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
        padding: 11px;
    }

    .customer-profile-metrics article > span {
        width: 34px;
        height: 34px;
    }

    .customer-profile-metrics strong {
        font-size: 14px;
    }

    .customer-timeline-list > a {
        grid-template-columns: 46px minmax(0, 1fr) 9px;
        gap: 10px;
        padding: 11px 14px;
    }

    .customer-timeline-list .customer-history-status,
    .customer-timeline-list > a > strong {
        display: none;
    }
}

/* Klantenoverzicht — volledige, rustige werkruimte. */
.page-customers .main.customers-index-main {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100dvh - 68px) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--os-color-surface) !important;
    box-sizing: border-box;
}

.customers-index-workspace {
    min-height: calc(100dvh - 68px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    background: var(--os-color-surface);
}

.page-customers .customers-index-hero {
    min-height: 176px !important;
    margin: 0 !important;
    padding: 30px 32px 28px !important;
    border-bottom: 1px solid var(--customers-line) !important;
    background: var(--os-color-surface) !important;
    box-sizing: border-box;
}

.page-customers .customers-index-hero::before {
    display: none;
}

.page-customers .customers-index-hero > div:first-child {
    align-self: center;
}

.page-customers .customers-index-hero h1 {
    margin-top: 8px;
    font-size: clamp(34px, 3vw, 44px);
    letter-spacing: -.045em;
}

.page-customers .customers-index-hero p {
    margin-top: 5px;
    font-size: 15px;
}

.page-customers .customers-index-hero .settings-kicker {
    color: var(--customers-accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.page-customers .customers-index-hero .customers-primary-action {
    min-height: 52px !important;
    padding-inline: 22px !important;
    border-radius: 11px;
    background: var(--customers-accent);
    font-size: 14px;
    font-weight: 800;
}

.customers-index-alert {
    margin: 16px 32px 0;
}

.page-customers .customers-index-directory {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(360px, 1fr) auto;
    margin: 0;
    padding: 0 32px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: var(--os-color-surface);
}

.page-customers .customers-index-toolbar {
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 194px 194px minmax(310px, auto);
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 0;
}

.page-customers .customers-index-toolbar .customers-search,
.customers-select-filter {
    width: 100%;
    height: 48px;
    border: 1px solid #dde2ea;
    border-radius: 11px;
    background: var(--os-color-surface);
    color: #778198;
}

.page-customers .customers-index-toolbar .customers-search {
    padding-inline: 15px;
}

.page-customers .customers-index-toolbar .customers-search input {
    font-size: 13px;
}

.customers-select-filter {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 12px;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
}

.customers-select-filter > span:first-child {
    display: grid;
    place-items: center;
}

.customers-select-filter > span:first-child i {
    font-size: 13px;
}

.customers-select-filter > i:last-child {
    font-size: 9px;
    pointer-events: none;
}

.customers-select-filter select {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    appearance: none;
    background: transparent;
    color: #30384b;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.page-customers .customers-index-toolbar .customers-filter-tabs {
    justify-self: end;
    min-height: 48px;
    padding: 3px;
    border: 1px solid #e3e6ed;
    border-radius: 11px;
    background: var(--os-color-surface);
    box-shadow: none;
}

.page-customers .customers-index-toolbar .customers-filter-tabs button {
    min-width: 94px;
    min-height: 40px;
    justify-content: center;
    border-radius: 9px;
    color: #3f485d;
    font-size: 12px;
}

.page-customers .customers-index-toolbar .customers-filter-tabs button.active {
    background: var(--customers-accent);
    color: #fff;
    box-shadow: none;
}

.customers-index-table {
    min-height: 0;
    display: grid;
    grid-template-rows: 58px minmax(300px, 1fr);
    border-top: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
}

.customers-index-workspace .customers-list-head,
.customers-index-workspace .customer-directory-row {
    grid-template-columns: 38px minmax(180px, 1.2fr) minmax(210px, 1.25fr) minmax(125px, .8fr) minmax(105px, .68fr) minmax(110px, .72fr) minmax(135px, .85fr) 52px;
    gap: 16px;
}

.customers-index-workspace .customers-list-head {
    min-height: 58px;
    padding: 0 12px;
    border-bottom: 1px solid #edf0f4;
    background: #fbfcfe;
    color: #202a42;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
}

.customers-index-workspace .customers-list-head > span,
.customers-index-workspace .customers-list-head > button {
    min-width: 0;
    color: inherit;
    font: inherit;
    font-weight: 800;
    text-align: left;
}

.customers-index-workspace .customers-list-head > button {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.customers-index-workspace .customers-list-head > button i {
    color: #94a0b5;
    font-size: 9px;
}

.customers-index-workspace .customers-list-head > button.active,
.customers-index-workspace .customers-list-head > button.active i {
    color: var(--customers-accent);
}

.customers-select-cell {
    display: grid;
    place-items: center;
}

.customers-select-cell input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--customers-accent);
    cursor: pointer;
}

.customers-index-workspace .customers-list {
    min-height: 0;
    overflow-y: auto;
}

.customers-index-workspace .customer-directory-row {
    min-height: 76px;
    padding: 0 12px;
    background: var(--os-color-surface);
}

.customers-index-workspace .customer-directory-row:hover {
    background: #fbfaff;
}

.customers-index-workspace .customer-row-identity {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.customers-index-workspace .customer-row-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #efedff;
    color: var(--customers-accent);
}

.customers-index-workspace .customer-row-identity small {
    margin-top: 3px;
    color: #939bad;
    font-size: 10px;
}

.customers-index-workspace .customer-row-date small,
.customers-index-workspace .customer-row-visits small,
.customers-index-workspace .customer-row-value small {
    display: none;
}

.customers-index-workspace .customer-row-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.customers-index-workspace .customer-row-tags em {
    margin: 0;
}

.customers-index-workspace .customer-row-tags b {
    color: #8c94a7;
    font-size: 10px;
}

.customer-row-action {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    justify-self: end;
    border-radius: 9px;
    color: #8992a5;
    text-decoration: none;
}

.customer-row-action:hover {
    background: #eeecff;
    color: var(--customers-accent);
}

.page-customers .customers-index-table .customers-empty-state,
.page-customers .customers-index-table .customers-filter-empty {
    min-height: 100%;
    align-self: stretch;
    padding: 52px 24px;
}

.page-customers .customers-index-table .customers-empty-state > span,
.page-customers .customers-index-table .customers-filter-empty > span {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 23px;
}

.page-customers .customers-index-table .customers-empty-state h2,
.page-customers .customers-index-table .customers-filter-empty strong {
    margin-top: 18px;
    font-size: 19px;
}

.page-customers .customers-index-table .customers-empty-state p,
.page-customers .customers-index-table .customers-filter-empty p {
    margin-top: 7px;
    font-size: 13px;
}

.page-customers .customers-index-table .customers-empty-state .btn {
    min-height: 48px;
    margin-top: 22px;
    padding-inline: 22px;
    border-radius: 11px;
    background: var(--customers-accent);
}

.customers-index-pagination {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #758097;
    font-size: 12px;
}

.customers-index-pagination > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customers-index-pagination label {
    position: relative;
    min-width: 146px;
    height: 44px;
    display: flex;
    align-items: center;
    border: 1px solid #dfe3eb;
    border-radius: 10px;
    background: var(--os-color-surface);
}

.customers-index-pagination label select {
    width: 100%;
    height: 100%;
    padding: 0 34px 0 14px;
    border: 0;
    outline: 0;
    appearance: none;
    background: transparent;
    color: #344056;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.customers-index-pagination label > i {
    position: absolute;
    right: 13px;
    font-size: 9px;
    pointer-events: none;
}

.customers-index-pagination button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe3eb;
    border-radius: 10px;
    background: var(--os-color-surface);
    color: #748097;
    cursor: pointer;
}

.customers-index-pagination button:hover:not(:disabled) {
    border-color: #bcb6fa;
    color: var(--customers-accent);
    background: #f7f6ff;
}

.customers-index-pagination button:disabled {
    opacity: .42;
    cursor: not-allowed;
}

@media (max-width: 1240px) {
    .page-customers .customers-index-toolbar {
        grid-template-columns: minmax(260px, 1fr) 176px 176px;
    }

    .page-customers .customers-index-toolbar .customers-filter-tabs {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .customers-index-workspace .customers-list-head,
    .customers-index-workspace .customer-directory-row {
        grid-template-columns: 36px minmax(170px, 1.2fr) minmax(180px, 1fr) 95px 105px 46px;
    }

    .customers-index-workspace .customers-list-head > :nth-child(4),
    .customers-index-workspace .customers-list-head > :nth-child(7),
    .customers-index-workspace .customer-directory-row > :nth-child(4),
    .customers-index-workspace .customer-directory-row > :nth-child(7) {
        display: none;
    }
}

@media (max-width: 800px) {
    .page-customers .main.customers-index-main,
    .customers-index-workspace {
        min-height: calc(100dvh - 58px);
    }

    .page-customers .customers-index-hero {
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        padding: 24px 18px;
    }

    .page-customers .customers-index-hero .customers-primary-action {
        width: 100%;
        justify-content: center;
    }

    .page-customers .customers-index-directory {
        padding: 0 16px 82px;
    }

    .page-customers .customers-index-toolbar {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding-block: 14px;
    }

    .page-customers .customers-index-toolbar .customers-search,
    .page-customers .customers-index-toolbar .customers-filter-tabs {
        grid-column: 1 / -1;
    }

    .page-customers .customers-index-toolbar .customers-filter-tabs {
        width: 100%;
    }

    .page-customers .customers-index-toolbar .customers-filter-tabs button {
        min-width: 0;
        flex: 1;
    }

    .customers-index-workspace .customers-list-head,
    .customers-index-workspace .customer-directory-row {
        grid-template-columns: 32px minmax(160px, 1fr) 72px 42px;
        gap: 10px;
    }

    .customers-index-workspace .customers-list-head > :nth-child(3),
    .customers-index-workspace .customers-list-head > :nth-child(4),
    .customers-index-workspace .customers-list-head > :nth-child(6),
    .customers-index-workspace .customers-list-head > :nth-child(7),
    .customers-index-workspace .customer-directory-row > :nth-child(3),
    .customers-index-workspace .customer-directory-row > :nth-child(4),
    .customers-index-workspace .customer-directory-row > :nth-child(6),
    .customers-index-workspace .customer-directory-row > :nth-child(7) {
        display: none;
    }

    .customers-index-pagination {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }
}

@media (max-width: 520px) {
    .page-customers .customers-index-toolbar {
        grid-template-columns: 1fr;
    }

    .page-customers .customers-index-toolbar > * {
        grid-column: 1;
    }

    .customers-index-pagination > div {
        width: 100%;
    }

    .customers-index-pagination label {
        flex: 1;
    }
}

/* Klantdetail — dossierwerkplek met vaste profielkop en voorkeurenkolom. */
.page-customers .main.customer-detail-main-shell {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100dvh - 68px) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f8f9fc !important;
    box-sizing: border-box;
}

.customer-detail-workspace {
    min-height: calc(100dvh - 68px);
    padding-bottom: 28px;
    background: #f8f9fc;
}

.customer-detail-top {
    padding: 0 32px;
    border-bottom: 1px solid var(--customers-line);
    background: var(--os-color-surface);
}

.page-customers .customer-detail-top .customer-detail-hero {
    min-height: 105px !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 !important;
    padding: 8px 0 12px !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}

.page-customers .customer-detail-top .customer-detail-hero::before {
    display: none;
}

.customer-detail-top .customer-detail-name h1 {
    margin: 0;
    font-size: clamp(27px, 2.4vw, 34px);
    font-weight: 830;
}

.customer-detail-top .customer-detail-name .customer-status {
    min-height: 27px;
    padding-inline: 9px;
    font-size: 10px;
}

.customer-detail-top .customer-detail-identity p {
    margin-top: 4px;
    color: #718099;
    font-size: 12px;
}

.customer-detail-top .customer-detail-actions .btn {
    min-height: 44px;
    padding-inline: 17px;
    border-radius: 9px;
    font-size: 12px;
}

.customer-detail-top .customer-more-actions > summary {
    width: 48px;
    padding: 0;
}

.customer-detail-tabs {
    min-height: 47px;
    display: flex;
    align-items: end;
    gap: 8px;
}

.customer-detail-tabs a {
    min-height: 47px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 2px solid transparent;
    color: #647087;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.customer-detail-tabs a:hover,
.customer-detail-tabs a.active {
    border-bottom-color: var(--customers-accent);
    color: var(--customers-accent);
}

.customer-detail-workspace > .profile-alert {
    margin: 18px 32px 0;
}

.customer-detail-panels {
    margin: 18px 32px 0;
}

.customer-detail-panel[hidden] {
    display: none !important;
}

.customer-detail-panel.is-active {
    animation: customer-detail-panel-in .18s ease-out;
}

@keyframes customer-detail-panel-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

.customer-detail-panel > .customer-profile-metrics {
    margin-bottom: 18px;
}

.customer-detail-panel-stack {
    display: grid;
    gap: 16px;
}

.customer-detail-workspace .customer-profile-metrics {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--customers-line);
    border-radius: 13px;
    background: var(--os-color-surface);
}

.customer-detail-workspace .customer-profile-metrics article {
    min-height: 78px;
    padding: 12px 26px;
    border: 0;
    border-right: 1px solid var(--customers-line);
    border-radius: 0;
}

.customer-detail-workspace .customer-profile-metrics article:last-child {
    border-right: 0;
}

.customer-detail-workspace .customer-profile-metrics article > span {
    width: 42px;
    height: 42px;
    border-radius: 11px;
}

.customer-detail-workspace .customer-profile-metrics strong {
    font-size: 18px;
}

.customer-detail-workspace .customer-profile-metrics small {
    margin-top: 2px;
    font-size: 10px;
}

.customer-detail-workspace > .customer-detail-layout {
    grid-template-columns: minmax(0, 1.72fr) minmax(355px, .95fr);
    gap: 18px;
    margin: 0 32px;
}

.customer-detail-panel > .customer-profile-card {
    width: 100%;
}

.customer-detail-panel[data-customer-detail-panel="voorkeuren"] .customer-preference-switch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-detail-panel[data-customer-detail-panel="voorkeuren"] .customer-preference-group-title,
.customer-detail-panel[data-customer-detail-panel="voorkeuren"] .customer-inline-preference.is-blocking {
    grid-column: 1 / -1;
}

.customer-detail-panel[data-customer-detail-panel="voorkeuren"] .customer-inline-preference:nth-of-type(even) {
    border-left: 1px solid var(--customers-line);
}

.customer-detail-workspace .customer-detail-main,
.customer-detail-workspace .customer-detail-side {
    gap: 16px;
}

.customer-detail-workspace .customer-profile-card {
    overflow: hidden;
    border: 1px solid var(--customers-line);
    border-radius: 13px;
    background: var(--os-color-surface);
    box-shadow: none;
}

.customer-detail-workspace .customer-card-heading,
.customer-detail-workspace .customer-card-heading.compact {
    min-height: 59px;
    gap: 11px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--customers-line);
}

.customer-detail-workspace .customer-card-heading > span,
.customer-detail-workspace .customer-card-heading.compact > span {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
}

.customer-detail-workspace .customer-card-heading h2,
.customer-detail-workspace .customer-detail-layout .customer-card-heading h2 {
    font-size: 14px;
}

.customer-detail-workspace .customer-card-heading p,
.customer-detail-workspace .customer-detail-layout .customer-card-heading p {
    margin-top: 2px;
    font-size: 10px;
}

.customer-card-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    padding: 0 13px;
    border: 1px solid #dfe3eb;
    border-radius: 8px;
    color: #3e4960;
    background: var(--os-color-surface);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.customer-card-action:hover {
    border-color: #c6c0fa;
    color: var(--customers-accent);
    background: #f8f7ff;
}

.customer-detail-workspace .customer-contact-grid > div {
    min-height: 70px;
    padding: 11px 20px;
}

.customer-detail-workspace .customer-contact-grid > div > span {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.customer-detail-workspace .customer-contact-grid small {
    font-size: 10px;
}

.customer-detail-workspace .customer-contact-grid strong {
    margin-top: 2px;
    font-size: 12px;
}

.customer-detail-workspace .customer-history-empty {
    min-height: 170px;
    padding: 20px;
}

.customer-detail-workspace .customer-history-empty > span {
    width: 42px;
    height: 42px;
    border-radius: 11px;
}

.customer-detail-workspace .customer-history-empty .btn {
    min-height: 34px;
    margin-top: 12px;
    padding-inline: 15px;
    border-radius: 8px;
    font-size: 10px;
}

.customer-detail-workspace .customer-notes-body {
    padding: 8px 16px 14px;
}

.customer-notes-empty {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #6f7b91;
}

.customer-notes-empty > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef1f6;
    color: #9aa3b5;
}

.customer-notes-empty strong,
.customer-notes-empty p {
    display: block;
    margin: 0;
}

.customer-notes-empty strong {
    color: #313a4d;
    font-size: 11px;
}

.customer-notes-empty p {
    margin-top: 2px;
    font-size: 9px;
}

.customer-detail-workspace .customer-detail-side {
    position: sticky;
    top: 84px;
}

.customer-detail-workspace .customer-preferences-sidebar .customer-card-heading {
    min-height: 62px;
}

.customer-detail-workspace .customer-preferences-sidebar .customer-preference-switch-grid {
    padding: 0;
}

.customer-detail-workspace .customer-preferences-sidebar .customer-inline-preference {
    min-height: 55px;
    grid-template-columns: 34px minmax(0, 1fr) 38px;
    padding: 7px 15px;
}

.customer-detail-workspace .customer-preferences-sidebar .customer-inline-preference.is-blocking {
    min-height: 62px;
    border-top: 0;
    background: #fffafa;
}

.customer-detail-workspace .customer-preferences-sidebar .customer-preference-copy strong {
    font-size: 11px;
}

.customer-detail-workspace .customer-preferences-sidebar .customer-preference-copy small {
    margin-top: 1px;
    font-size: 9px;
    line-height: 1.25;
}

.customer-preference-group-title {
    min-height: 28px;
    display: flex;
    align-items: end;
    margin: 0;
    padding: 7px 15px 4px;
    border-top: 1px solid var(--customers-line);
    color: #6e7890;
    background: var(--os-color-surface);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

@media (max-width: 1050px) {
    .customer-detail-workspace > .customer-detail-layout {
        grid-template-columns: 1fr;
    }

    .customer-detail-workspace .customer-detail-side {
        position: static;
    }
}

@media (max-width: 800px) {
    .customer-detail-top {
        padding: 0 18px;
    }

    .page-customers .customer-detail-top .customer-detail-hero {
        align-items: stretch;
        flex-direction: column;
        padding-block: 14px !important;
    }

    .customer-detail-top .customer-detail-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .customer-detail-tabs {
        overflow-x: auto;
    }

    .customer-detail-workspace > .profile-alert,
    .customer-detail-panels,
    .customer-detail-workspace > .customer-detail-layout {
        margin-right: 16px;
        margin-left: 16px;
    }

    .customer-detail-workspace .customer-profile-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-detail-workspace .customer-profile-metrics article:nth-child(2) {
        border-right: 0;
    }

    .customer-detail-workspace .customer-profile-metrics article:nth-child(-n+2) {
        border-bottom: 1px solid var(--customers-line);
    }

    .customer-detail-panel[data-customer-detail-panel="voorkeuren"] .customer-preference-switch-grid {
        grid-template-columns: 1fr;
    }

    .customer-detail-panel[data-customer-detail-panel="voorkeuren"] .customer-inline-preference:nth-of-type(even) {
        border-left: 0;
    }
}

@media (max-width: 560px) {
    .customer-detail-top .customer-detail-name {
        align-items: flex-start;
    }

    .customer-detail-top .customer-detail-name h1 {
        font-size: 24px;
    }

    .customer-detail-top .customer-detail-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .customer-detail-workspace .customer-profile-metrics article {
        padding: 10px 12px;
    }

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

    .customer-card-action {
        padding-inline: 10px;
    }
}

/* Uitgebreid klantdossier met JavaScript-subpagina's. */
.customer-dossier .customer-detail-top {
    padding-top: 16px;
}

.customer-detail-back {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 8px;
    color: #334057;
    background: #f4f6fa;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}

.page-customers .customer-dossier .customer-detail-hero {
    min-height: 138px !important;
    padding-block: 10px 14px !important;
}

.customer-profile-labels {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}

.customer-profile-labels span,
.customer-profile-labels a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-radius: 8px;
    color: #5f6c83;
    background: #f3f5f9;
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}

.customer-profile-labels span:first-child i {
    color: #e7a712;
}

.customer-profile-labels a:hover {
    color: var(--customers-accent);
    background: #efedff;
}

.customer-detail-toolbar {
    display: grid;
    justify-items: end;
    gap: 12px;
}

.customer-loyalty-callout {
    min-width: 216px;
    min-height: 61px;
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border-radius: 12px;
    color: #4f5c73;
    background: linear-gradient(105deg, #fff0f8, #faf1ff);
    text-decoration: none;
}

.customer-loyalty-callout > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #df3f83;
    background: #ffd5e8;
}

.customer-loyalty-callout small,
.customer-loyalty-callout strong {
    display: block;
}

.customer-loyalty-callout small {
    font-size: 10px;
}

.customer-loyalty-callout strong {
    margin-top: 1px;
    color: #151d35;
    font-size: 15px;
}

.customer-dossier .customer-detail-tabs {
    gap: 12px;
}

.customer-dossier .customer-detail-tabs a {
    padding-inline: 13px;
    white-space: nowrap;
}

.customer-dossier-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible !important;
    border: 0 !important;
    gap: 12px !important;
    background: transparent !important;
}

.customer-dossier .customer-dossier-metrics article {
    min-height: 106px;
    align-items: flex-start;
    padding: 17px 18px;
    border: 1px solid var(--customers-line);
    border-radius: 11px;
    background: var(--os-color-surface);
}

.customer-dossier .customer-dossier-metrics article:last-child {
    border-right: 1px solid var(--customers-line);
}

.customer-dossier-metrics article > div {
    min-width: 0;
}

.customer-dossier-metrics article a,
.customer-dossier-metrics article em {
    display: block;
    margin-top: 8px;
    color: var(--customers-accent);
    font-size: 10px;
    font-style: normal;
    font-weight: 750;
    text-decoration: none;
}

.customer-dossier-metrics article em {
    color: #8791a4;
    font-weight: 600;
}

.customer-overview-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.customer-overview-contact { grid-column: span 7; }
.customer-overview-notes { grid-column: span 5; }
.customer-overview-appointments,
.customer-overview-purchases,
.customer-overview-preferences { grid-column: span 4; }

.customer-contact-list {
    padding: 5px 16px 10px;
}

.customer-contact-list > div {
    min-height: 44px;
    display: grid;
    grid-template-columns: 20px 135px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #edf0f5;
}

.customer-contact-list > div:last-child {
    border-bottom: 0;
}

.customer-contact-list > div > span {
    color: #78849a;
    text-align: center;
}

.customer-contact-list small {
    color: #778399;
    font-size: 10px;
}

.customer-contact-list strong {
    color: #172039;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.customer-contact-list a {
    color: var(--customers-accent);
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}

.customer-overview-empty {
    min-height: 174px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    color: #78849a;
    text-align: center;
}

.customer-overview-empty.compact {
    min-height: 150px;
}

.customer-overview-empty > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 50%;
    color: #7b86a0;
    background: #f0f2f7;
}

.customer-overview-empty strong {
    color: #283149;
    font-size: 12px;
}

.customer-overview-empty p {
    max-width: 420px;
    margin: 4px 0 0;
    font-size: 10px;
}

.customer-overview-empty .btn {
    min-height: 34px;
    margin-top: 12px;
    font-size: 10px;
}

.customer-overview-note-copy {
    min-height: 174px;
    padding: 18px;
    color: #4f5d74;
    font-size: 11px;
    line-height: 1.65;
    white-space: normal;
}

.customer-compact-list > a,
.customer-activity-list > a,
.customer-activity-list > article {
    min-height: 58px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid #edf0f5;
    color: inherit;
    text-decoration: none;
}

.customer-compact-list > a:last-child,
.customer-activity-list > a:last-child,
.customer-activity-list > article:last-child {
    border-bottom: 0;
}

.customer-compact-list > a > span,
.customer-activity-list > :is(a, article) > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--customers-accent);
    background: #efedff;
}

.customer-compact-list > a > span.is-green,
.customer-activity-list > :is(a, article) > span.is-green {
    color: #15946d;
    background: #e5f8ef;
}

.customer-activity-list > :is(a, article) > span.is-slate {
    color: #6e7990;
    background: #eff2f6;
}

.customer-compact-list strong,
.customer-compact-list small,
.customer-activity-list strong,
.customer-activity-list small {
    display: block;
}

.customer-compact-list strong,
.customer-activity-list strong {
    color: #263049;
    font-size: 11px;
}

.customer-compact-list small,
.customer-activity-list small {
    margin-top: 2px;
    color: #818ba0;
    font-size: 9px;
}

.customer-profile-preference-list {
    padding: 7px 14px 12px;
}

.customer-profile-preference-list > div {
    min-height: 36px;
    display: grid;
    grid-template-columns: 18px minmax(130px, .85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid #edf0f5;
    color: #727e94;
    font-size: 10px;
}

.customer-profile-preference-list > div:last-child {
    border-bottom: 0;
}

.customer-profile-preference-list strong {
    color: #59657b;
    font-size: 10px;
    font-weight: 650;
    text-align: right;
    white-space: pre-line;
}

.customer-profile-preference-list.expanded > div {
    min-height: 56px;
    grid-template-columns: 28px minmax(180px, .7fr) minmax(0, 1.3fr);
    padding-inline: 10px;
    font-size: 12px;
}

.customer-profile-preference-list.expanded strong {
    font-size: 12px;
    text-align: left;
}

.customer-appointment-filters {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 3px;
    border: 1px solid #e0e4ec;
    border-radius: 9px;
    background: #f7f8fb;
}

.customer-appointment-filters button {
    min-height: 31px;
    padding: 0 11px;
    border: 0;
    border-radius: 7px;
    color: #6f7b90;
    background: transparent;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.customer-appointment-filters button.active {
    color: #fff;
    background: var(--customers-accent);
}

.customer-appointment-filters b {
    margin-left: 3px;
}

.customer-appointment-filter-empty[hidden] {
    display: none !important;
}

.customer-dossier [data-customer-detail-panel="communicatie"],
.customer-dossier [data-customer-detail-panel="geschiedenis"] {
    display: grid;
    gap: 14px;
}

/* Klantdossier: communicatievoorkeuren */
.customer-communication-workspace {
    --communication-row-height: 58px;
    overflow: hidden;
}

.customer-communication-heading {
    min-height: 76px;
    display: grid;
    grid-template-columns: 44px minmax(220px, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--customers-line);
}

.customer-communication-heading-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--customers-accent-soft);
    color: var(--customers-accent);
    font-size: 17px;
}

.customer-communication-heading h2,
.customer-communication-heading p,
.customer-communication-group h3,
.customer-communication-group p {
    margin: 0;
}

.customer-communication-heading h2 {
    color: var(--customers-ink);
    font-size: 17px;
    letter-spacing: -.02em;
}

.customer-communication-heading p {
    margin-top: 2px;
    color: var(--customers-muted);
    font-size: 10px;
}

.customer-communication-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.customer-communication-heading .customer-preference-save-state {
    min-height: 30px;
    margin: 0 10px 0 0;
    padding-inline: 12px;
    background: #f3f5f8;
    color: #6d778b;
    font-size: 9px;
}

.customer-communication-heading .customer-preference-save-state > i {
    color: #22a76f;
}

.customer-communication-count,
.customer-communication-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-style: normal;
    font-weight: 800;
}

.customer-communication-count {
    min-height: 30px;
    gap: 6px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 9px;
}

.customer-communication-count i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.customer-communication-count.is-active {
    color: #17855b;
    background: #e8f8ef;
}

.customer-communication-count.is-active i {
    background: #1ca36d;
}

.customer-communication-count.is-inactive {
    color: #5f697e;
    background: #f0f2f6;
}

.customer-communication-count.is-inactive i {
    background: #7e8799;
}

.customer-communication-workspace .customer-communication-block {
    min-height: 66px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto 44px;
    gap: 12px;
    margin: 12px 14px;
    padding: 9px 16px;
    border: 1px solid #f5d3d0;
    border-radius: 11px;
    background: #fff8f8;
}

.customer-communication-workspace .customer-communication-block:hover {
    border-color: #efc3bf;
    background: #fff5f4;
}

.customer-communication-workspace .customer-communication-block .customer-preference-copy strong,
.customer-communication-workspace .customer-communication-row .customer-preference-copy strong {
    color: #222b41;
    font-size: 11px;
}

.customer-communication-workspace .customer-communication-block .customer-preference-copy small,
.customer-communication-workspace .customer-communication-row .customer-preference-copy small {
    margin-top: 1px;
    color: #7f899d;
    font-size: 9px;
    line-height: 1.35;
}

.customer-communication-state {
    min-width: 43px;
    min-height: 25px;
    padding: 0 10px;
    border-radius: 999px;
    color: #727c90;
    background: #eff1f5;
    font-size: 9px;
}

.customer-communication-state.is-on {
    color: #168457;
    background: #e1f7e9;
}

.customer-communication-groups {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}

.customer-communication-group {
    display: grid;
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--customers-line);
    border-radius: 11px;
    background: var(--os-color-surface);
}

.customer-communication-group > header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-content: start;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
}

.customer-communication-group > header .customer-preference-icon,
.customer-communication-workspace .customer-communication-block .customer-preference-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 13px;
}

.customer-communication-group h3 {
    color: #20283d;
    font-size: 12px;
}

.customer-communication-group p {
    margin-top: 2px;
    color: #8a93a6;
    font-size: 9px;
    line-height: 1.35;
}

.customer-communication-options {
    border-left: 1px solid var(--customers-line);
}

.customer-communication-workspace .customer-communication-row {
    min-height: var(--communication-row-height);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 44px 14px;
    gap: 11px;
    padding: 7px 14px;
    border: 0;
    border-bottom: 1px solid var(--customers-line);
    border-radius: 0;
}

.customer-communication-workspace .customer-communication-row:last-child {
    border-bottom: 0;
}

.customer-communication-workspace .customer-communication-row:hover {
    border-color: var(--customers-line);
    background: #fafaff;
}

.customer-communication-workspace .customer-communication-row .customer-preference-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 12px;
}

.customer-communication-workspace .customer-inline-toggle {
    width: 40px;
    height: 23px;
}

.customer-communication-workspace .customer-inline-toggle::after {
    width: 17px;
    height: 17px;
}

.customer-communication-workspace .customer-inline-preference > input:checked ~ .customer-inline-toggle::after {
    transform: translateX(17px);
}

.customer-communication-chevron {
    color: #738099;
    font-size: 9px;
    text-align: right;
}

html[data-theme="dark"] .customer-communication-heading .customer-preference-save-state,
html[data-theme="dark"] .customer-communication-count.is-inactive,
html[data-theme="dark"] .customer-communication-state {
    background: var(--os-color-surface-strong);
}

html[data-theme="dark"] .customer-communication-workspace .customer-communication-block {
    border-color: #5e3a3a;
    background: #2f2326;
}

/* Klantdossier: ruimere, beter leesbare typografie binnen de tabpanelen. */
.customer-detail-panels .customer-card-heading h2,
.customer-detail-panels .customer-detail-layout .customer-card-heading h2 {
    font-size: 16px;
}

.customer-detail-panels .customer-card-heading p,
.customer-detail-panels .customer-detail-layout .customer-card-heading p {
    font-size: 11px;
}

.customer-detail-panels .customer-profile-metrics strong {
    font-size: 20px;
}

.customer-detail-panels .customer-profile-metrics small,
.customer-detail-panels .customer-dossier-metrics article a,
.customer-detail-panels .customer-dossier-metrics article em {
    font-size: 11px;
}

.customer-detail-panels .customer-contact-list small,
.customer-detail-panels .customer-contact-list a {
    font-size: 11px;
}

.customer-detail-panels .customer-contact-list strong {
    font-size: 13px;
}

.customer-detail-panels .customer-overview-empty strong,
.customer-detail-panels .customer-history-empty strong {
    font-size: 14px;
}

.customer-detail-panels .customer-overview-empty p,
.customer-detail-panels .customer-history-empty p,
.customer-detail-panels .customer-overview-empty .btn {
    font-size: 11px;
}

.customer-detail-panels .customer-overview-note-copy,
.customer-detail-panels .customer-notes-body > p {
    font-size: 13px;
}

.customer-detail-panels .customer-compact-list strong,
.customer-detail-panels .customer-activity-list strong,
.customer-detail-panels .customer-timeline-list > a > span:nth-child(2) strong,
.customer-detail-panels .customer-timeline-list > a > strong {
    font-size: 13px;
}

.customer-detail-panels .customer-compact-list small,
.customer-detail-panels .customer-activity-list small,
.customer-detail-panels .customer-timeline-list time small,
.customer-detail-panels .customer-timeline-list > a > span:nth-child(2) small {
    font-size: 11px;
}

.customer-detail-panels .customer-timeline-list time strong {
    font-size: 15px;
}

.customer-detail-panels .customer-history-status,
.customer-detail-panels .customer-tag-cloud span,
.customer-detail-panels .customer-appointment-filters button {
    font-size: 11px;
}

.customer-detail-panels .customer-profile-preference-list > div,
.customer-detail-panels .customer-profile-preference-list strong {
    font-size: 11px;
}

.customer-detail-panels .customer-profile-preference-list.expanded > div,
.customer-detail-panels .customer-profile-preference-list.expanded strong {
    font-size: 14px;
}

.customer-detail-panels .customer-communication-heading p,
.customer-detail-panels .customer-communication-group p,
.customer-detail-panels .customer-communication-workspace .customer-communication-block .customer-preference-copy small,
.customer-detail-panels .customer-communication-workspace .customer-communication-row .customer-preference-copy small {
    font-size: 11px;
}

.customer-detail-panels .customer-communication-group h3,
.customer-detail-panels .customer-communication-workspace .customer-communication-block .customer-preference-copy strong,
.customer-detail-panels .customer-communication-workspace .customer-communication-row .customer-preference-copy strong {
    font-size: 13px;
}

.customer-detail-panels .customer-communication-count,
.customer-detail-panels .customer-communication-state,
.customer-detail-panels .customer-communication-heading .customer-preference-save-state {
    font-size: 10px;
}

@media (max-width: 1120px) {
    .customer-communication-heading {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .customer-communication-heading-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 57px;
    }

    .customer-communication-heading .customer-preference-save-state {
        margin-right: auto;
    }

    .customer-overview-contact,
    .customer-overview-notes { grid-column: span 6; }
    .customer-overview-appointments,
    .customer-overview-purchases { grid-column: span 6; }
    .customer-overview-preferences { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
    .customer-create-modal { padding: 10px; }
    .customer-create-dialog { height: calc(100vh - 20px); min-height: 0; border-radius: 19px; }
    .customer-create-header { min-height: 78px; padding: 14px 18px; }
    .customer-create-header p { display: none; }
    .customer-create-progress { padding: 0 12px; }
    .customer-create-progress button { gap: 5px; padding-inline: 4px; }
    .customer-create-progress button > em { font-size: 9px; }
    .customer-create-body { padding: 22px 20px; }
    .customer-create-footer { padding: 12px 18px; }
    .customer-edit-modal { padding: 10px; }
    .customer-edit-dialog { height: auto; min-height: 0; max-height: calc(100dvh - 20px); border-radius: 19px; }
    .customer-edit-body { padding: 20px; }
    .customer-dossier .customer-detail-top { padding-top: 12px; }
    .customer-detail-toolbar { justify-items: stretch; }
    .customer-loyalty-callout { justify-self: start; }
    .customer-dossier-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .customer-dossier .customer-dossier-metrics article { border: 1px solid var(--customers-line) !important; }
    .customer-overview-grid { grid-template-columns: 1fr; }
    .customer-overview-grid > * { grid-column: 1; }
    .customer-contact-list > div { grid-template-columns: 20px 105px minmax(0, 1fr) auto; }
    .customer-communication-group {
        grid-template-columns: 1fr;
    }

    .customer-communication-group > header {
        min-height: 64px;
    }

    .customer-communication-options {
        border-top: 1px solid var(--customers-line);
        border-left: 0;
    }
}

@media (max-width: 560px) {
    .customer-communication-heading {
        grid-template-columns: 38px minmax(0, 1fr);
        padding-inline: 13px;
    }

    .customer-communication-heading-icon {
        width: 38px;
        height: 38px;
    }

    .customer-communication-heading-actions {
        gap: 6px;
        padding-left: 0;
    }

    .customer-communication-heading .customer-preference-save-state {
        width: 100%;
        margin: 0;
    }

    .customer-communication-count {
        flex: 1;
        padding-inline: 8px;
    }

    .customer-communication-workspace .customer-communication-block {
        grid-template-columns: 36px minmax(0, 1fr) 40px;
        padding-inline: 11px;
    }

    .customer-communication-block .customer-communication-state {
        display: none;
    }

    .customer-communication-workspace .customer-communication-row {
        grid-template-columns: 34px minmax(0, 1fr) 40px;
        padding-inline: 11px;
    }

    .customer-communication-row .customer-communication-state,
    .customer-communication-chevron {
        display: none;
    }

    .customer-create-modal { padding: 0; }
    .customer-create-dialog { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
    .customer-create-icon { display: none; }
    .customer-create-header h2 { font-size: 19px; }
    .customer-create-progress button > em { display: none; }
    .customer-create-progress button > span { width: 30px; height: 30px; }
    .customer-wizard-grid,
    .customer-wizard-manual-address { grid-template-columns: 1fr; }
    .customer-wizard-grid .span-2 { grid-column: 1; }
    .customer-create-footer > span { display: none; }
    .customer-create-footer .btn { min-width: 0; flex: 1; }
    .customer-edit-modal { padding: 0; }
    .customer-edit-dialog { width: 100%; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
    .customer-edit-dialog > form { flex: 1 1 auto; }
    .customer-edit-header { grid-template-columns: 1fr 40px; }
    .customer-edit-header > span { display: none; }
    .customer-edit-header h2 { font-size: 17px; }
    .customer-edit-grid,
    .customer-edit-grid.one-column { grid-template-columns: 1fr; }
    .customer-edit-grid .span-2 { grid-column: 1; }
    .customer-edit-footer .btn { min-width: 0; flex: 1; }
    .customer-dossier-metrics { grid-template-columns: 1fr !important; }
    .customer-contact-list > div { grid-template-columns: 20px 1fr auto; padding-block: 8px; }
    .customer-contact-list > div strong { grid-column: 2 / -1; }
    .customer-appointment-filters { width: 100%; margin: 8px 0 0; }
    .customer-appointment-filters button { flex: 1; }
}
