/* BK Replay portal. Colours follow bkitsolutions.nl; surfaces use Fluent tokens so light/dark come from FluentDesignTheme.
   data-theme on <html> (set by js/theme.js) covers what Fluent does not: logos and the pre-Blazor loading screen. */
:root {
    --bk-navy: #03243C;
    --bk-blue: #2A4EEF;
    --bk-orange: #FB782C;
    --side-external: #FB782C;   /* the other party: orange */
    --side-internal: #2A4EEF;   /* our employee: blue */
    --page-bg: #fff;
    --page-fg: #141414;
    --hint-fg: #5c6670;
    /* Type ramp (Fluent 2): these five sizes only, weights 400 and 600 */
    --fs-caption: 12px;
    --fs-body: 14px;
    --fs-subtitle: 16px;
    --fs-title: 20px;
    --fs-display: 28px;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --side-internal: #6f8cff;
    --page-bg: #0f1419;
    --page-fg: #f1f3f5;
    --hint-fg: #a3adb8;
    color-scheme: dark;
}

html, body { margin: 0; font-family: var(--body-font, "Segoe UI", system-ui, sans-serif);
    background: var(--neutral-layer-1, var(--page-bg)); color: var(--neutral-foreground-rest, var(--page-fg)); }
body { min-height: 100vh; }
a { color: var(--accent-foreground-rest, var(--bk-blue)); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: var(--fs-title); line-height: 28px; font-weight: 600; margin: 0; }
h3 { font-size: var(--fs-subtitle); font-weight: 600; margin: 1rem 0 .5rem; }
h3:first-child { margin-top: 0; }

/* Theme-dependent logos */
.logo-for-dark { display: none; }
:root[data-theme="dark"] .logo-for-light { display: none; }
:root[data-theme="dark"] .logo-for-dark { display: inline-block; }

/* Header: BK navy in both themes, white mark + product name */
.app-header { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; height: 52px;
    background: var(--bk-navy) !important; color: var(--bk-header-fg, #fff) !important; }
.app-header .brand { display: flex; align-items: center; gap: 10px; color: var(--bk-header-fg, #fff); font-weight: 600; font-size: var(--fs-subtitle); }
.app-header .brand:hover { text-decoration: none; opacity: .9; }
.app-header .brand img { height: 22px; width: auto; display: block; }
.app-header .brand img + span { padding-left: 10px; border-left: 1px solid rgba(var(--bk-header-fg-rgb, 255, 255, 255), .35); }
.app-header .user { color: var(--bk-header-fg, #fff); font-size: var(--fs-body); opacity: .85; margin-left: 4px; }
.app-header fluent-button::part(control) { color: var(--bk-header-fg, #fff); background: transparent; border-color: transparent; }
.app-header fluent-button:hover::part(control) { background: rgba(var(--bk-header-fg-rgb, 255, 255, 255), .12); }

.app-body { padding: 20px clamp(16px, 2.5vw, 40px); box-sizing: border-box; width: 100%; }
/* Sections are flat: a divider and whitespace, no box. Boxes are only for objects (player, dialog, popover). */
.panel { border-top: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); padding-top: 16px; }

.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.muted { color: var(--neutral-foreground-hint, var(--hint-fg)); }
.small { font-size: var(--fs-caption); }
.centered { display: flex; justify-content: center; align-items: center; padding: 48px 16px; }

/* Loading screen (before Blazor) and sign-in/out pages */
.app-loading, .brand-panel { display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 12vh 16px 48px; text-align: center; color: var(--hint-fg); font-family: "Segoe UI", system-ui, sans-serif; }
.app-loading img, .brand-panel img { width: 180px; max-width: 60vw; height: auto; margin-bottom: 8px; }
.brand-panel .product { font-size: var(--fs-title); font-weight: 600; color: var(--neutral-foreground-rest, var(--page-fg)); }
.brand-panel p { margin: 0; }
.brand-panel fluent-message-bar { max-width: 520px; text-align: left; }

.calls .preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pager { margin-top: 12px; gap: 8px; }

/* Filter bar: search on top, one tidy row of filters; everything applies immediately */
/* A plain toolbar above the table, no box. All controls share one height (32px) and radius (4px). */
.filterbar { margin-bottom: 16px; }
.filterbar-search { display: flex; gap: 8px; align-items: center; }
.filterbar-search .search-box { flex: 1; }
.filterbar-search fluent-search { width: 100%; }
.filterbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.filterbar-row .grow { flex: 1; }
/* Joined, flat button group; selected = light accent fill, no floating pill or shadow */
.seg { display: inline-flex; border: 1px solid var(--neutral-stroke-rest, #d1d1d1); border-radius: 4px; overflow: hidden; }
.seg button { font: inherit; font-size: var(--fs-body); line-height: 20px; border: 0; background: transparent; color: var(--neutral-foreground-rest, var(--page-fg));
    padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--neutral-stroke-rest, #d1d1d1); }
.seg button:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .05)); }
.seg button.active { background: color-mix(in srgb, var(--accent-fill-rest, var(--bk-blue)) 12%, transparent);
    color: var(--accent-foreground-rest, var(--bk-blue)); font-weight: 600; }
.filterbar .field { font: inherit; font-size: var(--fs-body); line-height: 20px; width: 150px; padding: 5px 10px; border-radius: 4px; box-sizing: border-box; height: 32px;
    border: 1px solid var(--neutral-stroke-rest, #d1d1d1); background: var(--neutral-fill-input-rest, #fff); color: inherit; }
.filterbar .field:focus { outline: 2px solid var(--accent-fill-rest, var(--bk-blue)); outline-offset: -1px; border-color: transparent; }
.chip { font: inherit; font-size: var(--fs-body); line-height: 20px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 4px; cursor: pointer;
    border: 1px solid var(--neutral-stroke-rest, #d1d1d1); background: transparent; color: var(--neutral-foreground-rest, var(--page-fg)); }
.chip:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .05)); }
.chip.on { background: color-mix(in srgb, var(--accent-fill-rest, var(--bk-blue)) 12%, transparent); border-color: var(--accent-fill-rest, var(--bk-blue));
    color: var(--accent-foreground-rest, var(--bk-blue)); font-weight: 600; }
.dates { display: inline-flex; align-items: center; gap: 6px; }
.link { font: inherit; font-size: var(--fs-body); border: 0; background: none; color: var(--accent-foreground-rest, var(--bk-blue)); cursor: pointer; padding: 4px; }
.link:hover { text-decoration: underline; }
.filter-toggle .count { margin-left: 4px; font-size: var(--fs-caption); background: var(--bk-blue); color: #fff; border-radius: 999px; padding: 0 6px; }
mark { background: color-mix(in srgb, var(--bk-orange) 35%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.match { display: flex; gap: 8px; color: inherit; }
.match:hover { text-decoration: none; }
.match:hover .preview { text-decoration: underline; }
.match .at { font-variant-numeric: tabular-nums; color: var(--accent-foreground-rest, var(--bk-blue)); white-space: nowrap; }

/* Call list: filters fold away and cards replace the table on narrow screens */
.filter-toggle { display: none; }
.call-cards { display: none; }
.call-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; margin-bottom: 8px; border-radius: 6px; color: inherit;
    background: var(--neutral-layer-1, #fff); border: 1px solid var(--neutral-stroke-rest, #e0e0e0); }
.call-card:hover { text-decoration: none; border-color: var(--accent-fill-rest, var(--bk-blue)); }
.call-card .row1 { display: flex; align-items: center; gap: 8px; }
.call-card .row1 strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-card .preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.call-card .at { color: var(--accent-foreground-rest, var(--bk-blue)); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
    .call-cards { display: block; }
    .calls { display: none !important; }
    .filter-toggle { display: inline-flex; }
    .filterbar-row { display: none; }
    .filterbar-row.open { display: flex; }
    .filterbar .field { width: 100%; }
    .seg { flex-wrap: wrap; }
}

/* Navigation */
.header-nav { display: flex; gap: 4px; margin-left: 16px; }
.header-nav a { color: rgba(var(--bk-header-fg-rgb, 255, 255, 255), .8); padding: 6px 10px; border-radius: 4px; font-size: var(--fs-body); }
.header-nav a:hover { color: var(--bk-header-fg, #fff); background: rgba(var(--bk-header-fg-rgb, 255, 255, 255), .1); text-decoration: none; }
.header-nav a.active { color: var(--bk-header-fg, #fff); background: rgba(var(--bk-header-fg-rgb, 255, 255, 255), .16); }
.teams-nav { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--neutral-stroke-rest, #e0e0e0); }
.teams-nav a { padding: 8px 12px; color: var(--neutral-foreground-rest, var(--page-fg)); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.teams-nav a:hover { text-decoration: none; background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .04)); }
.teams-nav a.active { border-bottom-color: var(--accent-fill-rest, var(--bk-blue)); font-weight: 600; }
@media (max-width: 760px) { .header-nav { margin-left: 4px; } .header-nav a { padding: 6px; font-size: var(--fs-caption); } .app-header .brand img + span { display: none; } }

/* Page actions, modal, destructive buttons */
.page-actions { display: flex; gap: 8px; margin-left: auto; }
.danger::part(control) { color: #c50f1f; border-color: #c50f1f; }
:root[data-theme="dark"] .danger::part(control) { color: #ff99a4; border-color: #ff99a4; }
.danger-fill::part(control) { background: #c50f1f; border-color: #c50f1f; color: #fff; }
.danger-fill[disabled]::part(control) { opacity: .5; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 900; }
.modal { position: fixed; z-index: 901; left: 50%; top: 18vh; transform: translateX(-50%); width: min(520px, calc(100vw - 32px));
    background: var(--neutral-layer-1, #fff); color: var(--neutral-foreground-rest, var(--page-fg)); border-radius: 8px; padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 12px; }
.modal h2 { margin: 0; font-size: var(--fs-title); }
.modal p { margin: 0; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Settings */
.settings-tabs { margin-top: 4px; }
.settings-card { padding: 16px 0 0; border-top: 0; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.settings-card h3 { margin: 12px 0 0; }
.settings-card h3:first-child { margin-top: 0; }
.settings-card p { margin: 0; }
.form-grid { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.field-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field-row .grow { flex: 1; min-width: 220px; }
.wide { width: 100%; }
.save-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.save-errors ul { margin: 0; padding-left: 1.2rem; }
.dict-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.simple-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.simple-table th { text-align: left; font-weight: 600; color: var(--neutral-foreground-hint, var(--hint-fg)); padding: 6px 8px; border-bottom: 1px solid var(--neutral-stroke-rest, #e0e0e0); }
.simple-table td { padding: 6px 8px; border-bottom: 1px solid var(--neutral-stroke-divider-rest, #f0f0f0); vertical-align: middle; }
.simple-table tr.inactive td { opacity: .55; }
.simple-table.numbers td:not(:first-child), .simple-table.numbers th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.actions-cell { text-align: right; white-space: nowrap; }

/* Transcript correction */
.correct-hint { margin-bottom: 8px; }
.transcript.correcting .phrase { cursor: text; }
.transcript.correcting .phrase:hover { outline: 1px dashed var(--accent-fill-rest, var(--bk-blue)); outline-offset: 1px; }
.phrase-quote { margin: 0; padding: 8px 12px; background: var(--neutral-layer-2, var(--page-bg)); border-radius: 4px; line-height: 1.5; }

/* Inside Teams: Teams draws the chrome, we only need tighter spacing */
.in-teams .app-body { padding-top: 12px; }

/* Call detail */
.back { margin: 0 0 8px; }
/* Transcript and summary are plain columns split by a divider; only the player keeps a (flat) box */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.detail-grid fluent-card { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.player-card { padding: 16px; box-shadow: none; border: 1px solid var(--neutral-stroke-rest, #e0e0e0); border-radius: 6px; }
.side-col { display: flex; flex-direction: column; gap: 24px; padding-left: 24px; border-left: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); }
.side-col > fluent-card + fluent-card { padding-top: 24px; border-top: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.transcript-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badges { margin-bottom: 8px; }
.participants { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.participants .muted.small { display: inline-block; min-width: 88px; }

/* Player */
.player-card { margin-bottom: 16px; }
.wave { position: relative; height: 96px; cursor: pointer; border-radius: 6px; user-select: none;
    background: var(--neutral-layer-2, var(--page-bg)); --progress: 0%; }
.wave svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave path { fill: none; stroke-width: .62; }
.wave .ch-external { stroke: var(--side-external); }
.wave .ch-internal { stroke: var(--side-internal); }
.wave-base { opacity: .35; }
.wave-played { clip-path: inset(0 calc(100% - var(--progress)) 0 0); }
.wave-head { position: absolute; top: 0; bottom: 0; left: var(--progress); width: 2px; margin-left: -1px;
    background: var(--neutral-foreground-rest, var(--page-fg)); pointer-events: none; }
.wave-loading { display: flex; height: 100%; align-items: center; justify-content: center; }
.player-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.audio { flex: 1; min-width: 0; height: 40px; }
.speed { display: flex; align-items: center; gap: 6px; }
.speed select { font: inherit; padding: 4px 6px; border-radius: 4px; border: 1px solid var(--neutral-stroke-rest, #ccc);
    background: var(--neutral-fill-input-rest, transparent); color: inherit; }
.legend { display: flex; gap: 16px; margin-top: 6px; color: var(--neutral-foreground-hint, var(--hint-fg)); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot.ch-external { background: var(--side-external); }
.dot.ch-internal { background: var(--side-internal); }

/* Transcript */
.transcript { position: relative; max-height: 62vh; overflow-y: auto; padding-right: 8px; line-height: 1.55; }
/* Two columns, as in the Teams transcript: speaker and time on the left, text on the right. Speaker colour on the name only. */
.turn { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); column-gap: 16px; margin-bottom: 12px; }
.turn-head { display: flex; flex-direction: column; font-size: var(--fs-caption); line-height: 16px; padding-top: 2px; min-width: 0; }
.turn-head .who { font-weight: 600; color: var(--side-internal); overflow-wrap: anywhere; }
.turn.external .turn-head .who { color: var(--side-external); }
.turn-head .at { color: var(--neutral-foreground-hint, var(--hint-fg)); font-variant-numeric: tabular-nums; }
.turn p { margin: 0; }
@media (max-width: 600px) {
    .turn { grid-template-columns: 1fr; }
    .turn-head { flex-direction: row; gap: 8px; }
}
.phrase { cursor: pointer; border-radius: 3px; transition: background-color .15s; }
.phrase:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .05)); }
.phrase.active { background: color-mix(in srgb, var(--side-internal) 18%, transparent); }
.turn.external .phrase.active { background: color-mix(in srgb, var(--side-external) 22%, transparent); }
.phrase.corrected { text-decoration: underline dotted; text-underline-offset: 3px; }
.note { margin: 8px 0 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.facts dt { color: var(--neutral-foreground-hint, var(--hint-fg)); }
.facts dd { margin: 0; }
.summary { white-space: pre-line; line-height: 1.5; }
.actions { padding-left: 1.2rem; margin: 0; }
.actions li { margin-bottom: 4px; }

@media (max-width: 900px) {
    .detail-grid { grid-template-columns: 1fr; }
    .side-col { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); }
    .app-body { padding: 12px 8px; }
    .transcript { max-height: none; overflow: visible; }
}
@media (max-width: 600px) {
    .app-header .user { display: none; }
}

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 8px 16px; background: #fde7e9; color: #141414; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* Tenant logo (white label): shown as uploaded, on the header colour and on the loading/sign-in screens */
.app-header .brand img.custom-logo { height: 30px; max-width: 180px; object-fit: contain; }
.app-loading img.custom-logo, .brand-panel img.custom-logo { width: auto; max-width: 240px; max-height: 96px; object-fit: contain; }
.brand-preview { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 6px 6px 0 0;
    color: #fff; font-weight: 600; font-size: var(--fs-subtitle); }
.brand-preview img { height: 30px; max-width: 180px; object-fit: contain; }
.brand-preview span { padding-left: 10px; border-left: 1px solid currentColor; }
.brand-preview-body { padding: 12px 16px; border: 1px solid var(--neutral-stroke-rest, #e0e0e0); border-top: none; border-radius: 0 0 6px 6px;
    display: flex; gap: 12px; align-items: center; }
.brand-preview-body .btn { padding: 6px 14px; border-radius: 4px; color: #fff; font-size: var(--fs-body); }
.color-row { display: flex; align-items: end; gap: 8px; }
.color-row input[type=color] { width: 40px; height: 32px; padding: 0; border: 1px solid var(--neutral-stroke-rest, #ccc); border-radius: 4px; background: none; }

/* Summary insights: one badge system. Status = dot + text; only "Urgent" (and the orange "Opvolgen") are filled, because they ask for action.
   Category and topics = one neutral 4px tag. Rounded pills are only for counts. */
.insight { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-caption); line-height: 20px; cursor: default; --status: var(--sent-neutral); }
.insight::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--status); flex: none; }
.sentiment-positive, .problem-solved { --status: var(--sent-positive); }
.sentiment-negative, .problem-open { --status: var(--sent-negative); }
.sentiment-mixed { --status: var(--sent-mixed); }
.insight.urgency-high { padding: 0 6px; border-radius: 4px; background: #c50f1f; color: #fff; font-weight: 600; }
.insight.urgency-high::before { display: none; }
.tag, .topic { display: inline-flex; align-items: center; height: 20px; box-sizing: border-box; padding: 0 6px; border-radius: 4px; font-size: var(--fs-caption);
    border: 1px solid var(--neutral-stroke-rest, #d1d1d1); color: var(--neutral-foreground-rest, var(--page-fg)); background: transparent; white-space: nowrap; }
.topics { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 4px; }

/* Teams app icon preview (Huisstijl): as Teams shows it, a rounded square */
.teams-icon-preview { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex: none; }
.teams-icon-preview img { max-width: 78%; max-height: 78%; object-fit: contain; }
/* Call list: follow-up flag and the company as a filter link */
.follow-up { display: inline-flex; align-items: center; }
.calls .link { padding: 0; font-size: inherit; text-align: left; }
/* summary.v3 title: one line in the list, a subtitle on the call page */
.preview.title { font-weight: 500; }
.call-title { margin: 2px 0 4px; font-size: var(--fs-subtitle); }
/* The call list uses the whole screen; other pages keep the readable maximum width */
.calls .preview, .calls .match { white-space: normal; }
/* Estimated caller: a small question mark next to the name, explained in its tooltip */
.ai-guess { display: inline-flex; margin-left: 4px; vertical-align: middle; cursor: help; color: var(--neutral-foreground-hint, var(--hint-fg)); }
/* Call list: column chooser and topic tags */
.topic-chips { display: inline-flex; gap: 4px; align-items: center; overflow: hidden; max-width: 100%; }
.topic-chip { font: inherit; font-size: var(--fs-caption); height: 20px; box-sizing: border-box; padding: 0 6px; border-radius: 4px; cursor: pointer; white-space: nowrap;
              border: 1px solid var(--neutral-stroke-rest, #d1d1d1); background: transparent; color: inherit;
              max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.topic-chip:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .05)); }
.topic-more { font-size: var(--fs-caption); color: var(--neutral-foreground-hint, #5c6670); }
/* Call list table: one CSS grid, rows as subgrids so header and cells share the same column tracks */
.calls-grid { display: grid; width: 100%; max-width: 100%; overflow-x: auto; font-size: var(--fs-body); border-top: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); }
.calls-grid > .tr { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center;
                    border-bottom: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); }
.calls-grid > .tr:not(.th-row):hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .04)); }
.calls-grid .th, .calls-grid .td { padding: 7px 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calls-grid .td.wrap { white-space: normal; }
.calls-grid .th.icon, .calls-grid .td.icon { padding-left: 4px; padding-right: 4px; text-align: center; text-overflow: clip; }
.calls-grid .th { position: relative; font-weight: 600; user-select: none; cursor: grab; }
.calls-grid .th:active { cursor: grabbing; }
.calls-grid .th.drop-target { box-shadow: inset 3px 0 0 var(--accent-fill-rest, var(--bk-blue)); }
/* Resize handle exactly on the column's right edge; visible on hover and while dragging */
.calls-grid .th .resizer { position: absolute; top: 4px; bottom: 4px; right: 0; width: 7px; cursor: col-resize; touch-action: none; }
.calls-grid .th .resizer::after { content: ''; position: absolute; top: 0; bottom: 0; right: 3px; width: 1px; background: var(--neutral-stroke-rest, #d0d0d0); opacity: 0; }
.calls-grid .th:hover .resizer::after { opacity: 1; }
.calls-grid .th .resizer:hover::after, .calls-grid .th .resizer.active::after { opacity: 1; width: 3px; right: 2px; background: var(--accent-fill-rest, var(--bk-blue)); }

/* Statistics page (managers): tiles, company bars, time columns and top-caller tables. Plain CSS, no chart library. */
.filterbar-row.first { margin-top: 0; padding-top: 0; border-top: 0; }
.stats-company { width: 200px; }
/* Summary strip instead of KPI boxes: figures in one row, split by thin dividers. The first four are the headline figures. */
.stat-tiles { display: flex; flex-wrap: wrap; row-gap: 16px; margin-bottom: 24px; }
.stat-tile { display: flex; flex-direction: column; gap: 4px; padding: 0 24px; border-left: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); }
.stat-tile:first-child { padding-left: 0; border-left: 0; }
.stat-tile strong { font-size: var(--fs-display); line-height: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-tile:nth-child(n+5) strong { font-size: var(--fs-title); line-height: 36px; }
.stat-tile strong .small { font-weight: 400; }
/* The statistics page uses the whole screen, like the call list */
/* Bands: one theme per row (when / who / what about), a heading above and a divider between bands */
.stats-band { border-top: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); padding-top: 20px; margin-top: 24px; }
.band-title { font-size: var(--fs-subtitle); font-weight: 600; margin: 0 0 16px; }
.band-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px 48px; align-items: start; }
.band-grid.band-main { grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr); }
.band-grid > .span-2 { grid-column: span 2; }
.stat-panel { min-width: 0; }
@media (max-width: 1200px) {
    .band-grid.band-main { grid-template-columns: minmax(0, 1fr); }
    .band-grid > .span-2 { grid-column: auto; }
}
.panel-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; min-height: 28px; }
.panel-head h2, .panel-head h3 { font-size: var(--fs-body); font-weight: 600; margin: 0; }
.panel-head .grow { flex: 1; }
.chart-foot { margin: 12px 0 0; }
/* View switch inside a chart: plain text options, the chosen one underlined (lighter than the toolbar's button group) */
.view-switch { display: inline-flex; gap: 12px; }
.view-switch button { font: inherit; font-size: var(--fs-caption); border: 0; background: none; padding: 2px 0; cursor: pointer;
    color: var(--neutral-foreground-hint, var(--hint-fg)); border-bottom: 2px solid transparent; }
.view-switch button:hover { color: var(--neutral-foreground-rest, var(--page-fg)); }
.view-switch button.active { color: var(--neutral-foreground-rest, var(--page-fg)); font-weight: 600; border-bottom-color: var(--accent-fill-rest, var(--bk-blue)); }
/* Time chart with a y-axis: round values at four gridlines */
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; }
.y-axis { position: relative; height: 240px; min-width: 2.5em; font-size: var(--fs-caption); color: var(--neutral-foreground-hint, var(--hint-fg)); font-variant-numeric: tabular-nums; }
.y-axis span { position: absolute; right: 0; transform: translateY(50%); line-height: 1; }
.vbars.gridded { height: 240px; background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--neutral-stroke-divider-rest, #ececec) calc(25% - 1px) 25%); }
/* Ranked list for long labels (questions): the full text, the count right-aligned */
.ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.ranked li { display: grid; grid-template-columns: 1.5em minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--neutral-stroke-divider-rest, #eef0f3);
    counter-increment: rank; align-items: baseline; }
.ranked li::before { content: counter(rank); color: var(--neutral-foreground-hint, var(--hint-fg)); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.ranked .link { padding: 0; text-align: left; overflow-wrap: anywhere; }
.ranked .num { font-variant-numeric: tabular-nums; }
/* Bars without a track: the bar is the data, the value sits in its own tabular column */
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 56px; align-items: center; gap: 10px; font-size: var(--fs-body); }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 0; }
.hbar-track { height: 8px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 0 2px 2px 0; background: var(--accent-fill-rest, var(--bk-blue)); transition: width .25s; }
.hbar.unknown .hbar-fill { background: var(--neutral-stroke-rest, #c8c8c8); }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; }
.vbars { display: grid; grid-template-columns: repeat(var(--bars), minmax(0, 1fr)); align-items: end; gap: 2px; height: 220px; margin-bottom: 20px;
    border-bottom: 1px solid var(--neutral-stroke-rest, #d1d1d1); }
.vbar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.vbar-fill { display: block; width: 100%; min-height: 0; border-radius: 2px 2px 0 0; background: var(--accent-fill-rest, var(--bk-blue)); }
.vbar:hover .vbar-fill { background: var(--accent-fill-hover, var(--bk-navy)); }
.vbar-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font-size: var(--fs-caption); white-space: nowrap; color: var(--neutral-foreground-hint, var(--hint-fg)); }
table.callers { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
table.callers th { text-align: left; font-weight: 600; font-size: var(--fs-caption); color: var(--neutral-foreground-hint, var(--hint-fg)); padding: 4px 6px;
    border-bottom: 1px solid var(--neutral-stroke-divider-rest, #eef0f3); }
table.callers td { padding: 6px; border-bottom: 1px solid var(--neutral-stroke-divider-rest, #eef0f3); vertical-align: top; }
table.callers .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
table.callers .strong { font-weight: 600; }
table.callers .link { padding: 0; font-size: inherit; }
.caller-name { display: block; overflow-wrap: anywhere; font-weight: 500; }
:root { --sent-positive: #2e9d5b; --sent-neutral: #a3acb9; --sent-mixed: #e3a32b; --sent-negative: #d64545; }
.legend { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-caption); color: var(--neutral-foreground-hint, var(--hint-fg)); }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.sent-positive { background: var(--sent-positive); }
.sent-neutral { background: var(--sent-neutral); }
.sent-mixed { background: var(--sent-mixed); }
.sent-negative { background: var(--sent-negative); }
.stack-col { display: flex; flex-direction: column-reverse; width: 100%; height: 100%; border-radius: 3px 3px 0 0; overflow: hidden; }
.stack-col > span { display: block; width: 100%; }
.vbars.short { height: 150px; }
table.heatmap { width: 100%; border-collapse: separate; border-spacing: 2px; margin-top: 18px; font-size: var(--fs-caption); table-layout: fixed; }
table.heatmap th { font-weight: 500; color: var(--neutral-foreground-hint, var(--hint-fg)); text-align: center; }
table.heatmap tbody th { width: 28px; text-align: left; }
table.heatmap td { height: 24px; text-align: center; border-radius: 3px; font-variant-numeric: tabular-nums;
    background: color-mix(in srgb, var(--accent-fill-rest, var(--bk-blue)) calc(var(--heat) * 85%), var(--neutral-layer-2, #f3f4f6));
    color: var(--neutral-foreground-rest, var(--page-fg)); }
table.heatmap td[style*="--heat:0.6"], table.heatmap td[style*="--heat:0.7"], table.heatmap td[style*="--heat:0.8"],
table.heatmap td[style*="--heat:0.9"], table.heatmap td[style*="--heat:1.00"] { color: #fff; }
.hbars.wide-labels .hbar { grid-template-columns: minmax(140px, 55%) 1fr 44px; }
.hbar-label.link { font-size: inherit; text-decoration: none; }
.hbar-label.link:hover { text-decoration: underline; }
.hbar-track.split { display: flex; }
.hbar-track.split > span { display: block; height: 100%; }
.hbar-value.wide { min-width: 56px; }
.bar-solved { background: var(--sent-positive); }
.bar-open { background: var(--sent-negative); opacity: .8; }
p.legend { margin: 10px 0 0; }
/* Calls popup on the statistics page (chart element -> its calls) */
.modal.wide { width: min(760px, calc(100vw - 32px)); top: 10vh; max-height: 80vh; }
.modal.wide .modal-actions { align-items: center; }
.modal-actions .grow { flex: 1; }
.popup-calls { list-style: none; margin: 0; padding: 0; overflow-y: auto; max-height: 55vh; border-top: 1px solid var(--neutral-stroke-divider-rest, #eef0f3); }
.popup-calls li a { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: baseline; padding: 8px 4px; color: inherit; text-decoration: none;
    border-bottom: 1px solid var(--neutral-stroke-divider-rest, #eef0f3); }
.popup-calls li a:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .04)); }
.popup-calls .when { font-size: var(--fs-caption); color: var(--neutral-foreground-hint, var(--hint-fg)); white-space: nowrap; }
.popup-calls .what { display: flex; flex-direction: column; min-width: 0; }
.popup-calls .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popup-calls .dur { font-variant-numeric: tabular-nums; font-size: var(--fs-caption); }
.vbar.clickable, .stack-col > .clickable { cursor: pointer; }
.stack-col > .clickable:hover { filter: brightness(1.1); outline: 1px solid var(--neutral-foreground-rest, #000); outline-offset: -1px; }
.legend-item { font: inherit; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 4px; border-radius: 4px;
    color: inherit; cursor: pointer; }
.legend-item:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .05)); }
@media (max-width: 600px) { .popup-calls li a { grid-template-columns: 1fr auto; } .popup-calls .when { grid-column: 1 / -1; } }
/* Columns narrower than their slot so bar charts read as separate bars, not one block */
.vbar { justify-content: center; }
.vbar-fill, .stack-col { width: 72%; }
.hbar:has(.hbar-value.wide) { grid-template-columns: minmax(90px, 34%) 1fr 6em; }
/* Hourly bars sit right above the heatmap, one bar per heatmap column (the heatmap header carries the hours) */
.vbars.hours { margin: 0 0 2px 30px; }
.vbars.hours + table.heatmap { margin-top: 0; }
/* Statistics: direction colours for the timeline, and every chart element opens a popup */
:root { --dir-in: var(--bk-blue); --dir-out: var(--bk-orange); }
.dir-in { background: var(--dir-in); }
.dir-out { background: var(--dir-out); }
.dir-other { background: var(--neutral-stroke-rest, #c8c8c8); }
.stack-col > span.dir-in, .stack-col > span.dir-out, .stack-col > span.dir-other { display: block; width: 100%; }
.hbar-track.split > .clickable, table.heatmap td.clickable { cursor: pointer; }
.hbar-track.split > .clickable:hover { filter: brightness(1.1); }
table.heatmap td.clickable:hover { outline: 1px solid var(--neutral-foreground-rest, #000); outline-offset: -1px; }
.ranked button.link { text-align: left; padding: 0; }
.caller-name.link { padding: 0; text-align: left; }
/* Autotask panel on the call page */
.autotask-form { display: flex; flex-direction: column; gap: 6px; }
.autotask-form .field { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--fs-body); padding: 5px 8px; border-radius: 4px;
    border: 1px solid var(--neutral-stroke-rest, #d0d0d0); background: var(--neutral-layer-1, #fff); color: inherit; }
.autotask-form textarea.field { resize: vertical; line-height: 1.45; }
.autotask-form .field-label { font-size: var(--fs-caption); color: var(--neutral-foreground-hint, var(--hint-fg)); margin-top: 6px; }
.autotask-form .seg { align-self: flex-start; margin-top: 8px; }
.autotask-form .search-row { display: flex; gap: 6px; }
.autotask-form .pick-list { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow-y: auto; border: 1px solid var(--neutral-stroke-divider-rest, #eef0f3); border-radius: 4px; }
.autotask-form .pick-list li button { width: 100%; text-align: left; padding: 6px 8px; }
.autotask-form .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.warning-text { color: var(--sent-negative, #c0392b); }
.autotask-form .call-info { margin: 4px 0 0; line-height: 1.4; overflow-wrap: anywhere; }
.autotask-form .call-info.details { margin-top: 0; white-space: pre-line; }
/* "Nummer koppelen": a calm nudge when Autotask does not know the caller's number */
.number-nudge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; padding: 8px 10px; border-radius: 6px;
    background: color-mix(in srgb, var(--accent-fill-rest, var(--bk-blue)) 7%, transparent); }
.number-nudge .link { padding: 0; font-weight: 600; }
.number-linked { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.number-link { margin-bottom: 12px; }
/* Correcting "problem resolved" on the call page */
.problem-switch { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg.small-seg button { font-size: var(--fs-caption); line-height: 18px; padding: 1px 8px; }

/* Call list on wide screens: filters in the column headers (funnel button, popover); active filters as chips above the list.
   Narrow screens keep the folding filter row instead (cards have no headers). */
.filterbar-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.filterbar-active .grow { flex: 1; }
.filterbar-row.mobile-filters { display: none; }
@media (max-width: 760px) { .filterbar-active { display: none; } }
.calls-grid .th { display: flex; align-items: center; gap: 2px; }
.calls-grid .th.icon { justify-content: center; }
.calls-grid .th .th-label { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.th-filter { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px;
             background: transparent; cursor: pointer; color: var(--neutral-foreground-hint, #8a8a8a); opacity: .55; }
.calls-grid .th:hover .th-filter, .th-filter:focus-visible { opacity: 1; }
.th-filter:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .06)); color: var(--neutral-foreground-rest, var(--page-fg)); }
.th-filter.on { opacity: 1; color: var(--accent-foreground-rest, var(--bk-blue)); }
.calls-grid.loading > .tr:not(.th-row) { opacity: .5; transition: opacity .15s; }
.calls-grid > .tr.empty > .td { grid-column: 1 / -1; color: var(--neutral-foreground-hint, var(--hint-fg)); padding: 16px 10px; }
.list-popover { z-index: 20; }
.list-popover .field { font: inherit; font-size: var(--fs-body); line-height: 20px; width: 100%; padding: 5px 10px; border-radius: 4px; box-sizing: border-box; height: 32px;
                       border: 1px solid var(--neutral-stroke-rest, #d1d1d1); background: var(--neutral-fill-input-rest, #fff); color: inherit; }
.col-filter { display: flex; flex-direction: column; gap: 8px; min-width: 220px; max-width: 320px; }
.col-filter-title { font-weight: 600; }
.col-filter p { margin: 0; }
.seg.wrap { flex-wrap: wrap; }
.column-menu { display: flex; flex-direction: column; gap: 2px; min-width: 220px; max-height: 60vh; overflow-y: auto; }
.column-option { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; border-radius: 4px; }
.column-option:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .05)); }
.column-option input { margin: 0; accent-color: var(--accent-fill-rest, var(--bk-blue)); }
.column-option .muted { margin-left: auto; }
.column-hint { max-width: 260px; margin: 8px 0 4px; }

/* Quality questions: settings choice and the call page card (managers) */
.radio-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.radio-list label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.radio-list input { margin-top: 3px; accent-color: var(--accent-fill-rest, var(--bk-blue)); }
.quality-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 10px; }
.quality-list li { display: flex; gap: 10px; align-items: flex-start; }
.quality-answer { flex: none; min-width: 44px; text-align: center; font-size: var(--fs-caption); font-weight: 600; padding: 2px 6px; border-radius: 4px;
                  background: var(--neutral-fill-secondary-rest, rgba(0, 0, 0, .06)); }
.quality-answer.ja { background: color-mix(in srgb, var(--sent-positive) 16%, transparent); color: var(--sent-positive); }
.quality-answer.nee { background: color-mix(in srgb, var(--sent-negative) 16%, transparent); color: var(--sent-negative); }
.bar-na { background: var(--neutral-stroke-rest, #c8c8c8); }
.quality-bars .hbar { grid-template-columns: minmax(160px, 45%) 1fr 64px; }
.quality-bars .hbar-label { white-space: normal; }
.stat-link { font-size: inherit; font-weight: inherit; padding: 0; }
/* Actions per colleague: a compact card, sortable headers */
.actions-panel { max-width: 760px; }
.actions-panel tr.no-actions td.num:not(:nth-child(2)) { color: var(--neutral-foreground-hint); }
table.sortable th button.sort { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
table.sortable th button.sort:hover { text-decoration: underline; }

/* Chart tooltip (js/charttip.js): appears right away and follows the pointer; text in text colours, the swatch carries identity */
.chart-tip { position: fixed; z-index: 1000; pointer-events: none; opacity: 0; transform: translateY(2px); transition: opacity .08s, transform .08s;
             min-width: 140px; max-width: 280px; padding: 8px 10px; border-radius: 6px; font-size: 12.5px; line-height: 1.35;
             background: var(--neutral-layer-floating, #ffffff); color: var(--neutral-foreground-rest, #242424);
             border: 1px solid var(--neutral-stroke-rest, #d1d1d1); box-shadow: 0 4px 16px rgba(0, 0, 0, .14); }
.chart-tip.show { opacity: 1; transform: none; }
.chart-tip-title { font-weight: 600; margin-bottom: 4px; }
.chart-tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip-row span { flex: 1; color: var(--neutral-foreground-hint, #5c6670); }
.chart-tip-row strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.chart-tip-row .sw { flex: none; }
.chart-tip-foot { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--neutral-stroke-divider-rest, #ececec); color: var(--neutral-foreground-hint, #5c6670); font-size: 11.5px; }
@media (prefers-color-scheme: dark) { .chart-tip { box-shadow: 0 4px 16px rgba(0, 0, 0, .5); } }
.sw.accent { background: var(--accent-fill-rest, var(--bk-blue)); }
.sw.neutral { background: var(--neutral-stroke-rest, #c8c8c8); }
/* Hover states for the chart tooltips: the hovered column, row or cell stands out, the rest stays as it is */
.vbars .vbar[data-tip] { border-radius: 3px; }
.vbars .vbar[data-tip]:hover { background: color-mix(in srgb, var(--accent-fill-rest, var(--bk-blue)) 9%, transparent); }
.hbars .hbar[data-tip] { border-radius: 4px; padding: 2px 4px; margin: 0 -4px; }
.hbars .hbar[data-tip]:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .04)); }
.ranked li[data-tip]:hover { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .04)); }
.heatmap td[data-tip]:hover { outline: 2px solid var(--accent-fill-rest, var(--bk-blue)); outline-offset: -2px; }

/* Relation pages (contact, company, number) and the "Eerdere gesprekken" panel on the call page */
.relation-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -8px 0 16px; }
.relation-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.relation-side { display: flex; flex-direction: column; gap: 20px; }
.relation-summary { padding: 12px 14px; margin-bottom: 20px; border-radius: 6px; border: 1px solid var(--neutral-stroke-rest, #e0e0e0); background: var(--neutral-layer-1, #fff); }
.relation-summary h4 { margin: 10px 0 4px; font-size: var(--fs-body); }
.relation-summary ul { margin: 0 0 4px; padding-left: 20px; }
.relation-calls { max-height: none; }
.relation-calls .title, .related-calls .title { display: inline-flex; gap: 6px; align-items: baseline; }
.pill-ticket { margin-left: 6px; font-size: var(--fs-caption); padding: 0 6px; border-radius: 4px; background: var(--neutral-fill-secondary-rest, rgba(0, 0, 0, .06)); }
.topic-chips.wrap { flex-wrap: wrap; overflow: visible; }
.related-calls { margin-top: 16px; }
.related-calls .popup-calls li a { grid-template-columns: 112px minmax(0, 1fr); }
@media (max-width: 900px) { .relation-grid { grid-template-columns: 1fr; } }
.profile-link { display: inline-flex; vertical-align: middle; margin-left: 4px; color: var(--neutral-foreground-hint, var(--hint-fg)); }
.profile-link:hover { color: var(--accent-foreground-rest, var(--bk-blue)); }
/* Call list: the company links to its page; filtering on it is the small funnel next to the name (shown on hover) */
.cell-link { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.cell-link a { overflow: hidden; text-overflow: ellipsis; }
.cell-filter { flex: none; display: inline-flex; padding: 2px; border: 0; border-radius: 4px; background: none; cursor: pointer; opacity: 0;
               color: var(--neutral-foreground-hint, var(--hint-fg)); }
.calls-grid .tr:hover .cell-filter, .cell-filter:focus-visible { opacity: .8; }
.cell-filter:hover { opacity: 1; background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .06)); color: var(--accent-foreground-rest, var(--bk-blue)); }

/* Relations overview and a company's contacts */
.relations-bar { margin-bottom: 12px; }
.relations-tabs { margin-top: 10px; }
.relation-list { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.relation-list th { text-align: left; font-weight: 600; font-size: var(--fs-caption); color: var(--neutral-foreground-hint, var(--hint-fg)); padding: 6px 8px;
                    border-bottom: 1px solid var(--neutral-stroke-divider-rest, #e8e8e8); }
.relation-list td { padding: 7px 8px; border-bottom: 1px solid var(--neutral-stroke-divider-rest, #f0f0f0); vertical-align: middle; }
.relation-list tr:hover td { background: var(--neutral-fill-stealth-hover, rgba(0, 0, 0, .03)); }
.relation-list .num { text-align: right; font-variant-numeric: tabular-nums; }
.relation-list .sentiment-col { width: 110px; }
.sentiment-bar { display: flex; gap: 2px; width: 100px; height: 8px; border-radius: 2px; overflow: hidden; }
.sentiment-bar > span { min-width: 3px; }
.sentiment-bar.empty { background: var(--neutral-fill-secondary-rest, rgba(0, 0, 0, .06)); }
.relation-side .relation-list .last-col { display: none; }
@media (max-width: 760px) { .relation-list .sentiment-col, .relation-list .last-col { display: none; } }
/* Collapsible card header (call page: Kwaliteit); the tally stays visible when collapsed */
.collapse-head { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.collapse-head h3 { margin: 0; }
.collapse-head:hover h3 { text-decoration: underline; }
.quality-card .collapse-head + * { margin-top: 10px; }
