/* Sales-pagina (/sales): het interne verkoopdashboard. Eén stylesheet voor de pagina en de
   widgets onder Shared/Widgets/Sales/, zodat elk blok dezelfde kaart, kop en tabel tekent.
   Ontwerp: curr/mockups/verkoop-prestaties.html. Kleuren volgen het donkere thema:
   wit met doorzichtigheid, en het accent uit --mud-palette-primary. */

.sl-wrap { display: flex; flex-direction: column; gap: 22px; }

/* ── Sectiekop: een kleine kop met een lijn ernaast ── */
.sl-section { display: flex; align-items: center; gap: 11px; margin: 6px 2px 0; }
.sl-section .t { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); white-space: nowrap; }
.sl-section .rule { height: 1px; flex: 1; background: rgba(255, 255, 255, 0.08); }

/* ── Kaart ── */
.sl-card { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; min-width: 0; }
.sl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sl-head > .mud-icon-root:first-child { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: color-mix(in srgb, currentColor 15%, transparent); box-sizing: border-box; flex-shrink: 0; }
.sl-title { font-size: 1rem; font-weight: 700; color: rgba(255, 255, 255, 0.9); }
.sl-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sl-scope { font-size: 0.68rem; font-weight: 600; color: rgba(255, 255, 255, 0.45); border: 1px solid rgba(255, 255, 255, 0.06); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.sl-more { font-size: 0.74rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); background: none; border: none; cursor: pointer; padding: 0; }
.sl-more:hover { color: rgba(255, 255, 255, 0.85); }
.sl-note { font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); line-height: 1.5; margin-top: 10px; }
.sl-note b { color: rgba(255, 255, 255, 0.7); }
.sl-empty { font-size: 0.8rem; color: rgba(255, 255, 255, 0.4); padding: 18px 0; text-align: center; }

/* ── Filterbalk ── */
.sl-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sl-filt { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 3px 4px 3px 12px; }
.sl-filt .l { font-size: 0.69rem; font-weight: 500; color: rgba(255, 255, 255, 0.42); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.sl-filt select { border: none; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.8); border-radius: 8px; padding: 6px 10px; font-size: 0.76rem; outline: none; min-width: 120px; font-family: inherit; }
.sl-filt select option { background: #27293d; color: rgba(255, 255, 255, 0.9); }

/* ── Hero: doelring en vier kerncijfers ── */
.sl-hero { display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
.sl-score { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.sl-ring { position: relative; width: 150px; height: 150px; }
.sl-ring svg { transform: rotate(-90deg); }
.sl-ring .v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sl-ring .v b { font-size: 2.2rem; font-weight: 800; color: rgba(255, 255, 255, 0.9); line-height: 1; letter-spacing: -0.03em; }
.sl-ring .v span { font-size: 0.7rem; color: rgba(255, 255, 255, 0.45); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.sl-verdict { font-size: 0.85rem; font-weight: 600; color: var(--mud-palette-primary); }
.sl-verdict-sub { font-size: 0.72rem; color: rgba(255, 255, 255, 0.45); text-align: center; line-height: 1.45; }
.sl-sub-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sl-ss { padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sl-ss .l { font-size: 0.7rem; color: rgba(255, 255, 255, 0.45); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.sl-ss .n { font-size: 1.25rem; font-weight: 800; color: rgba(255, 255, 255, 0.9); letter-spacing: -0.02em; white-space: nowrap; }
.sl-ss .n small { font-size: 0.75rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); margin-left: 3px; }
.sl-ss .bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.sl-ss .bar i { display: block; height: 100%; border-radius: 3px; }
.sl-ss .why { font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); line-height: 1.4; }

/* ── KPI-tegels ── */
.sl-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.sl-kpi { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sl-kpi .kl { font-size: 0.7rem; color: rgba(255, 255, 255, 0.45); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.sl-kpi .kn { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: rgba(255, 255, 255, 0.9); white-space: nowrap; }
.sl-kpi .kn small { font-size: 0.8rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); margin-left: 3px; }
.sl-kpi .kd { font-size: 0.72rem; }
.sl-kpi .kt { font-size: 0.7rem; color: rgba(255, 255, 255, 0.35); line-height: 1.4; }

/* Toon van een verschil of een cijfer. */
.sl-pos { color: #34D399; }
.sl-neg { color: #F87171; }
.sl-warn { color: var(--mud-palette-primary); }
.sl-flat { color: rgba(255, 255, 255, 0.45); }

/* ── Rasters ── */
.sl-g2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.sl-g2e { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ── Grafiek ── */
.sl-chart { width: 100%; height: auto; display: block; }
.sl-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); margin-top: 8px; align-items: center; }
.sl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sl-axis { fill: rgba(255, 255, 255, 0.35); font-size: 9px; font-family: inherit; }
.sl-axis-strong { fill: rgba(255, 255, 255, 0.7); font-size: 9px; font-weight: 700; font-family: inherit; }
.sl-gridline { stroke: rgba(255, 255, 255, 0.06); }

/* ── Funnel ── */
.sl-funnel { display: flex; flex-direction: column; gap: 10px; }
.sl-fstep { display: grid; grid-template-columns: 150px 1fr 120px; align-items: center; gap: 14px; }
.sl-fstep .fl { font-size: 0.78rem; color: rgba(255, 255, 255, 0.7); font-weight: 600; }
.sl-fstep .fl small { display: block; font-size: 0.68rem; color: rgba(255, 255, 255, 0.45); font-weight: 500; }
.sl-fstep .fb { height: 28px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); position: relative; overflow: hidden; }
.sl-fstep .fb i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.sl-fstep .fb b { position: absolute; left: 12px; top: 0; bottom: 0; display: flex; align-items: center; font-size: 0.86rem; color: rgba(255, 255, 255, 0.9); font-weight: 800; }
.sl-fstep .fr { font-size: 0.74rem; color: rgba(255, 255, 255, 0.55); text-align: right; }
.sl-fstep .fr b { color: rgba(255, 255, 255, 0.9); }
.sl-leak { display: flex; flex-direction: column; gap: 9px; }
.sl-leak .lr { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 0.78rem; }
.sl-leak .lr b { color: rgba(255, 255, 255, 0.9); }
.sl-leak .lr .sl-hbar { margin-top: 5px; }
.sl-leak .lr .r { color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.sl-leak .lr .r span { color: rgba(255, 255, 255, 0.45); }

/* ── Tabellen ── */
.sl-table-wrap { overflow-x: auto; }
table.sl-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
table.sl-table th { text-align: left; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.45); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); white-space: nowrap; }
table.sl-table td { padding: 9px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.7); vertical-align: middle; white-space: nowrap; }
table.sl-table td.n, table.sl-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.sl-table td b { color: rgba(255, 255, 255, 0.9); }
table.sl-table td .sub { color: rgba(255, 255, 255, 0.45); font-size: 0.72rem; margin-left: 4px; }
table.sl-table tbody tr.pick { cursor: pointer; }
table.sl-table tbody tr.pick:hover td { background: rgba(255, 255, 255, 0.03); }
table.sl-table tbody tr.on td { background: rgba(var(--mud-palette-primary-rgb), 0.06); }
/* Tabellen met veel kolommen: de koppen mogen op twee regels, anders past de laatste kolom niet. */
table.sl-table.sl-wrap-heads th { white-space: normal; line-height: 1.25; }
table.sl-table.sl-wrap-heads td { padding: 9px 6px; }
table.sl-table tfoot td { color: rgba(255, 255, 255, 0.55); font-weight: 600; border-bottom: none; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.sl-hbar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; min-width: 90px; }
.sl-hbar i { display: block; height: 100%; border-radius: 3px; }

/* Verkoper: rondje met initialen en naam. */
.sl-who { display: inline-flex; align-items: center; gap: 9px; }
.sl-av { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; color: #1b1b2a; flex-shrink: 0; }
.sl-who .nm { color: rgba(255, 255, 255, 0.9); font-weight: 600; }
.sl-who .nm small { display: block; font-size: 0.66rem; color: rgba(255, 255, 255, 0.45); font-weight: 500; }
.sl-rank { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.55); }
.sl-rank.r1 { background: rgba(var(--mud-palette-primary-rgb), 0.18); color: var(--mud-palette-primary); }
.sl-spark { width: 70px; height: 20px; display: block; }
.sl-delta { font-size: 0.68rem; margin-left: 4px; }
.sl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.sl-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sl-heat { display: inline-block; min-width: 34px; height: 20px; padding: 0 6px; border-radius: 4px; text-align: center; font-size: 0.7rem; line-height: 20px; font-weight: 700; color: rgba(255, 255, 255, 0.9); }

/* ── Verkoper-detail ── */
.sl-vd { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.sl-prof { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.sl-prof .sl-av { width: 56px; height: 56px; font-size: 1.2rem; }
.sl-prof h3 { margin: 0; font-size: 1.15rem; color: rgba(255, 255, 255, 0.9); }
.sl-prof .role { font-size: 0.76rem; color: rgba(255, 255, 255, 0.45); line-height: 1.4; }
.sl-prof .sl-kpi-grid { width: 100%; grid-template-columns: 1fr 1fr; }
.sl-prof .sl-kpi { padding: 10px 12px; }
.sl-prof .sl-kpi .kn { font-size: 1.15rem; }
.sl-cmp { display: flex; flex-direction: column; gap: 10px; }
.sl-cmp .cr { display: grid; grid-template-columns: 150px 1fr 120px; gap: 12px; align-items: center; font-size: 0.78rem; }
.sl-cmp .cr .cl { color: rgba(255, 255, 255, 0.55); }
.sl-cmp .cr .cb { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); }
.sl-cmp .cr .cb i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.sl-cmp .cr .cb s { position: absolute; top: -4px; bottom: -4px; width: 2px; background: rgba(255, 255, 255, 0.55); text-decoration: none; }
.sl-cmp .cr .cv { text-align: right; color: rgba(255, 255, 255, 0.9); font-weight: 700; font-variant-numeric: tabular-nums; }
.sl-cmp .cr .cv small { display: block; font-size: 0.66rem; color: rgba(255, 255, 255, 0.45); font-weight: 500; }
.sl-list { display: flex; flex-direction: column; gap: 4px; font-size: 0.76rem; color: rgba(255, 255, 255, 0.6); }
.sl-list .row { display: flex; gap: 8px; align-items: baseline; cursor: pointer; padding: 3px 0; }
.sl-list .row:hover .nm { color: rgba(255, 255, 255, 0.95); }
.sl-list .nm { color: rgba(255, 255, 255, 0.8); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-list .amt { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.9); font-weight: 600; }
.sl-list .meta { color: rgba(255, 255, 255, 0.4); font-size: 0.7rem; white-space: nowrap; }

@media (max-width: 980px) {
    .sl-hero, .sl-g2, .sl-g2e, .sl-vd { grid-template-columns: 1fr; }
    .sl-sub-scores { grid-template-columns: repeat(2, 1fr); }
    .sl-fstep { grid-template-columns: 110px 1fr 90px; }
}
