/* === Custom Properties === */
:root {
  --rse-red:        #E30613;
  --rse-red-dark:   #B30410;
  --rse-red-light:  #FFE5E7;
  --rse-black:      #0E0E10;
  --rse-ink:        #1A1A1D;
  --rse-ink-2:      #3A3A40;
  --rse-muted:      #6B6B73;
  --rse-line:       #E5E5EA;
  --rse-line-2:     #EFEFF2;
  --rse-bg:         #F6F6F4;
  --rse-card:       #FFFFFF;
  --rse-yellow:     #F5C518;
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      18px;
  --radius-xl:      28px;
  --shadow-sm:      0 1px 0 rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.05);
  --shadow:         0 6px 24px -8px rgba(15,15,20,0.12), 0 2px 6px rgba(15,15,20,0.04);
  --shadow-lg:      0 24px 60px -20px rgba(15,15,20,0.25);
  --font-display:   "Mulish", "Archivo", system-ui, -apple-system, sans-serif;
  --font-sans:      "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
  --topbar-h:       60px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--rse-bg);
  color: var(--rse-ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font-sans); }
input, select, textarea { font-family: var(--font-sans); }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: 52px; font-weight: 900; letter-spacing: -0.04em; }
h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
h3 { font-size: 20px; font-weight: 800; }
h4 { font-size: 15px; font-weight: 800; }
p  { margin: 0; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rse-line); border-radius: 999px; border: 2px solid var(--rse-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--rse-red); }

/* === Focus === */
:focus-visible {
  outline: 2px solid var(--rse-red);
  outline-offset: 2px;
}

/* === Utility === */
.row   { display: flex; align-items: center; gap: 12px; }
.col   { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--rse-muted); }
.mono  { font-family: ui-monospace, 'Cascadia Mono', 'Fira Code', monospace; font-size: 0.9em; }
.dot   { color: var(--rse-red);font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 1.6em; line-height: 0; }
.divider { height: 1px; background: var(--rse-line); border: none; margin: 0; }
.req   { color: var(--rse-red); }
.hint-inline { font-weight: 400; color: var(--rse-muted); text-transform: none; letter-spacing: 0; }

/* === Logo === */
.rse-logo {
  display: inline-flex;
  align-items: center;
  background: var(--rse-red);
  color: white;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  padding: 6px 12px 6px 14px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}
.rse-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
}
.rse-logo .rse { font-size: 20px; letter-spacing: -0.05em; }
.rse-logo .ict {
  font-size: 14px; font-weight: 700; margin-left: 8px;
  padding-left: 8px; border-left: 1.5px solid rgba(255,255,255,0.4);
  letter-spacing: 0; line-height: 1;
}
.rse-logo.lg .rse { font-size: 30px; }
.rse-logo.lg .ict { font-size: 13px; }
.rse-logo:hover { opacity: 0.92; transition: opacity 0.15s; }

/* === Topbar === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--rse-black);
  color: white;
  padding: 0 32px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: backdrop-filter 0.3s, box-shadow 0.3s;
}
.topbar.scrolled {
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 8px 32px -8px rgba(0,0,0,0.4);
  background: rgba(14,14,16,0.92);
}
.topbar-pill {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 3px 8px;
  background: rgba(255,255,255,0.08); border-radius: 4px;
  color: rgba(255,255,255,0.6);
}
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500;
}
.crumbs a { color: rgba(255,255,255,0.9); text-decoration: none; }
.crumbs a:hover { color: white; }
.crumbs .sep { opacity: 0.4; }
.spacer { flex: 1; }
.topbar-admin-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.75);
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.15s;
}
.topbar-admin-link:hover { background: rgba(255,255,255,0.08); color: white; }
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,0.85); font-weight: 600;
}
.topbar-username { display: none; }
@media (min-width: 768px) { .topbar-username { display: block; } }
/* === Topbar user info: gebruikersnaam + rol onder elkaar ============ */
.topbar-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Rol-regel: muted */
.topbar-userrole {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.5);
}

a.topbar-userrole--link {
    text-decoration: none;
    transition: color 0.15s;
}

a.topbar-userrole--link:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* SVG verticaal centreren */
.topbar-userrole .icon-wrapper {
    display: inline-flex;
    align-items: center;
}

.topbar-userrole .icon-wrapper svg {
    display: block;
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.topbar-logout {
  background: none; border: none; color: rgba(255,255,255,0.5);
  padding: 6px; border-radius: 6px; display: grid; place-items: center;
  transition: all 0.15s;
}
.topbar-logout:hover { color: var(--rse-red); background: rgba(227,6,19,0.1); }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer;
  transition: all 0.15s ease;
  background: white; color: var(--rse-ink);
  text-decoration: none; white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--rse-red); color: white; border-color: var(--rse-red); }
.btn-primary:hover { background: var(--rse-red-dark); border-color: var(--rse-red-dark); }
.btn-dark { background: var(--rse-black); color: white; }
.btn-dark:hover { background: #25252b; }
.btn-ghost { background: transparent; border-color: var(--rse-line); color: var(--rse-ink); }
.btn-ghost:hover { background: white; }
.btn-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-danger-ghost { color: #dc2626; }
.btn-danger-ghost:hover { background: #fee2e2; border-color: #fecaca; }
.btn.lg { padding: 13px 24px; font-size: 15px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.icon { padding: 9px; aspect-ratio: 1; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-pdf {
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    color: #fff;
    border: none;
}
.btn-pdf:hover {
    background: linear-gradient(135deg, #3a52d4 0%, #5e07a0 100%);
    color: #fff;
}

/* === FAB === */
.fab {
  position: fixed; bottom: 28px; right: 28px;
  width: 60px; height: 60px; border-radius: 999px;
  background: var(--rse-red); color: white;
  display: grid; place-items: center;
  border: none; cursor: pointer;
  box-shadow: 0 12px 32px -8px rgba(227,6,19,0.5), 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  z-index: 100;
  overflow: visible;
}
.fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 20px 40px -8px rgba(227,6,19,0.6); }
.fab:active { transform: scale(0.96); }
.fab.is-open .fab-icon svg { transform: rotate(45deg); }
.fab-ring {
  position: absolute; inset: -8px;
  border-radius: 999px;
  border: 2px solid rgba(227,6,19,0.3);
  animation: fabPulse 2.5s ease-out infinite;
  pointer-events: none;
}
.fab-icon { display: grid; place-items: center; }
.fab-icon svg { transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes fabPulse {
  0%   { opacity: 1; transform: scale(1); }
  70%  { opacity: 0; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* === Cards === */
.card {
  background: var(--rse-card); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--rse-line-2);
}
.card.flat { box-shadow: none; }

/* === Tags/Badges === */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: var(--rse-line-2); color: var(--rse-ink-2);
}
.tag.red { background: var(--rse-red-light); color: var(--rse-red-dark); }
.tag.dark { background: var(--rse-black); color: white; }
.sla-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
}
.sla-platinum { background: linear-gradient(135deg,#7c3aed,#4c1d95); color: white; }
.sla-gold     { background: linear-gradient(135deg,#f59e0b,#b45309); color: white; }
.sla-silver   { background: #e2e8f0; color: #475569; }
.sla-bronze   { background: linear-gradient(135deg,#b45309,#92400e); color: white; }
.sla-default  { background: var(--rse-line-2); color: var(--rse-ink-2); }
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
    white-space: nowrap;
}

/* User — neutraal */
.role-badge[data-role-level="user"] {
    background: var(--rse-line-2);
    color: var(--rse-ink-2);
}

/* Admin — rood/amber gradient */
.role-badge[data-role-level="admin"] {
    background: linear-gradient(135deg, #E30613 0%, #be020e 100%);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

/* Super — paars gradient */
.role-badge[data-role-level="super"] {
    background: linear-gradient(135deg, #7c3aed, #4c1d95);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

/* ─── Base ─────────────────────────────────────────────── */
.role-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 4px 26px 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.4;
    transition: filter .15s;
}

.role-select:hover {
    filter: brightness(1.05);
}

.role-select:focus {
    outline: 2px solid rgba(124, 58, 237, .35);
    outline-offset: 1px;
}

/* ─── User — neutraal grijs ────────────────────────────── */
.role-select[data-role-level="user"] {
    background-color: var(--rse-line-2);
    color: var(--rse-ink-2);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='%234a5568' d='M0 0l5 6 5-6z'/></svg>");
    background-size: 10px 6px;
    background-position: right 9px center;
    background-repeat: no-repeat;
}

/* ─── Admin — rood gradient ────────────────────────────── */
.role-select[data-role-level="admin"] {
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='white' d='M0 0l5 6 5-6z'/></svg>"),
        linear-gradient(135deg, #E30613 0%, #be020e 100%);
    background-size: 10px 6px, 100% 100%;
    background-position: right 9px center, 0 0;
    background-repeat: no-repeat, no-repeat;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

/* ─── Super — paars gradient ───────────────────────────── */
.role-select[data-role-level="super"] {
    background-image:
        url("data:image/svg+xml;utf8,<svg viewBox='0 0 10 6'><path fill='white' d='M0 0l5 6 5-6z'/></svg>"),
        linear-gradient(135deg, #7c3aed, #4c1d95);
    background-size: 10px 6px, 100% 100%;
    background-position: right 9px center, 0 0;
    background-repeat: no-repeat, no-repeat;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

/* ─── Open lijst — leesbare opties ─────────────────────── */
.role-select option,
.role-select option:checked,
.role-select option:hover {
    background-color: #fff !important;
    color: black;
    font-weight: 600;
}

/* === Forms === */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--rse-muted);
}
.field input, .field select, .field textarea {
  font-size: 15px; padding: 11px 14px;
  border: 1.5px solid var(--rse-line);
  border-radius: var(--radius); background: white; color: var(--rse-ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.field input[type="date"] { cursor: pointer; }
.autocomplete-wrap { position: relative; }
.autocomplete-wrap input { width: 100%; box-sizing: border-box; }
.autocomplete-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: white; border: 1.5px solid var(--rse-line);
  border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  list-style: none; margin: 0; padding: 4px 0; max-height: 220px; overflow-y: auto;
}
.autocomplete-suggestions li {
  padding: 9px 14px; font-size: 14px; color: var(--rse-ink); cursor: pointer;
  transition: background 0.1s;
}
.autocomplete-suggestions li:hover { background: var(--rse-line-2); }
.autocomplete-suggestions li mark {
  background: none; color: var(--rse-red); font-weight: 700;
}
.autocomplete-hint { color: var(--rse-muted, #888); font-style: italic; }
.field input:disabled, .field select:disabled, .field textarea:disabled {
  background: var(--rse-line-2); opacity: 0.7; cursor: not-allowed;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-section-title {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--rse-muted); margin: 20px 0 12px;
}
.form-divider { height: 1px; background: var(--rse-line-2); border: none; margin: 4px 0; }
.form-error {
  background: var(--rse-red-light); color: var(--rse-red-dark);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  border: 1px solid rgba(227,6,19,0.2);
}

/* === Chip input === */
.chip-input-wrap { display: flex; flex-direction: column; gap: 10px; }
.chip-list {
  display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px;
  padding: 6px; background: var(--rse-bg); border-radius: var(--radius);
  border: 1.5px solid var(--rse-line);
}
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: white; color: var(--rse-ink);
  border: 1px solid var(--rse-line);
  transition: all 0.15s;
}
.chip--removable { padding-right: 6px; }
.chip-remove {
  background: none; border: none; padding: 0 2px;
  color: var(--rse-muted); font-size: 16px; line-height: 1;
  cursor: pointer; border-radius: 999px; transition: all 0.1s;
  display: flex; align-items: center;
}
.chip-remove:hover { color: var(--rse-red); background: var(--rse-red-light); }
.chip-add-row { display: flex; gap: 8px; align-items: center; }
.chip-input {
  flex: 1; padding: 8px 12px;
  border: 1.5px solid var(--rse-line); border-radius: var(--radius);
  font-size: 13px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.chip-input:focus { border-color: var(--rse-red); box-shadow: 0 0 0 3px rgba(227,6,19,0.08); }
.chip--new { animation: chipIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes chipIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.chip--removing { animation: chipOut 0.2s ease forwards; }
@keyframes chipOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.7); max-width: 0; padding: 0; margin: 0; }
}
.chip-list-display { display: flex; flex-wrap: wrap; gap: 7px; }
/* .chip--service { background: rgba(59,130,246,0.1); color: #1e40af; border-color: rgba(59,130,246,0.2); } */
.chip--service {
    /* Fallback: jouw originele blauw (#3B82F6) voor chips zonder --product-color */
    background:    color-mix(in srgb, var(--product-color, #3B82F6) 10%, transparent);
    color:         color-mix(in srgb, var(--product-color, #3B82F6) 80%, #000);
    border-color:  color-mix(in srgb, var(--product-color, #3B82F6) 20%, transparent);
}
.chip--app     { background: rgba(16,185,129,0.1); color: #065f46; border-color: rgba(16,185,129,0.2); }

/* === Search === */
.search-hero-wrap {
  position: relative;
  z-index: 10;
}
.search-hero {
  display: flex; align-items: center;
  background: white; border-radius: 999px;
  padding: 6px 10px 6px 20px;
  border: 1.5px solid var(--rse-line);
  box-shadow: 0 12px 40px -16px rgba(15,15,20,0.18);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-hero:focus-within {
  border-color: var(--rse-red);
  box-shadow: 0 12px 40px -16px rgba(227,6,19,0.25), 0 0 0 4px rgba(227,6,19,0.08);
}
.search-hero .icon { width: 20px; height: 20px; color: var(--rse-muted); flex-shrink: 0; }
.search-hero input {
  flex: 1; border: none; outline: none;
  padding: 12px 10px; font-size: 16px;
  font-weight: 500; background: transparent; color: var(--rse-ink);
}
.search-hero input::placeholder { color: var(--rse-muted); }
.kbd {
  padding: 3px 7px; font-size: 11px; font-weight: 700;
  font-family: ui-monospace, monospace;
  background: var(--rse-line-2); border-radius: 5px;
  color: var(--rse-muted); white-space: nowrap;
}

/* === Keyboard shortcut hint binnen search-bar === */
.search-kbd {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    background: var(--rse-line-2);
    border: 1px solid var(--rse-line);
    border-bottom-width: 2px;          /* subtiel 3D "key cap" effect */
    border-radius: 5px;
    font-family: ui-monospace, 'Cascadia Mono', 'Fira Code', monospace;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: var(--rse-ink-2);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;              /* niet klikbaar, puur indicatief */
    flex-shrink: 0;
    margin-right: 4px;
}

.search-kbd-key {
    display: inline-block;
    letter-spacing: 0.02em;
}

.search-kbd-plus {
    color: var(--rse-muted);
    font-weight: 500;
    font-size: 9px;
    opacity: 0.75;
}

/* Op smalle schermen: verbergen (geen fysiek toetsenbord verwacht) */
@media (max-width: 640px) {
    .search-kbd {
        display: none;
    }
}

/* Topbar-variant: lichte toets-stijl op donkere achtergrond */
.search-hero--topbar .search-kbd {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    border-bottom-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
    font-size: 9px;
    padding: 2px 5px;
}

.search-hero--topbar .search-kbd-plus {
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   KB Customer Articles Search (Livewire component)
   ============================================================ */

/* Container — strakke flow, geen positioning trucs */
.kb-customer-search {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 280px;
    max-width: 100%;
}

/* Search-mini input: full-width binnen container i.p.v. fixed 180px */
.kb-customer-search .search-mini { width: 100%; }
.kb-customer-search .search-mini input { width: 100%; flex: 1; min-width: 0; }

/* Clear-knop — consistent met chip-remove styling */
.search-mini-clear {
    background: none;
    border: none;
    padding: 0;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: var(--rse-muted);
    font-size: 18px;
    line-height: 1;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.12s, background 0.12s;
    flex-shrink: 0;
}
.search-mini-clear:hover {
    color: var(--rse-red);
    background: var(--rse-red-light);
}

/* Results-paneel — inline, vervangt visueel de artikelenlijst */
.kb-search-results {
    margin-top: 16px;
}

/* ================================================================
   Search variants
   ================================================================ */

/* Topbar variant — compact */
.search-hero--topbar {
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.15s;
}

.search-hero--topbar:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.search-hero--topbar .search-input {
    font-size: 13px;
    color: white;
}

.search-hero--topbar .search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-hero--topbar .search-icon {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Topbar-search wrapper — beperk breedte */
.topbar-search-wrap {
    max-width: 600px;
    min-width: 280px;
    flex: 1 1 470px;
    margin-left: 16px;
}

/* Search results dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--rse-line);
    color: var(--rse-ink);
    max-height: 60vh;
    overflow: auto;
    z-index: 300;
    padding: 8px;
    animation: dropIn 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scaleY(0.95); }
  to   { opacity: 1; transform: translateY(0) scaleY(1); }
}
/* Groepslabel: kleur ongewijzigd, nu met lijn ernaast en klikbaar */
.search-group-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rse-muted);
    padding: 10px 12px 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: color 0.12s;
}

.search-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rse-line);
}

.search-group-label:hover {
    color: var(--rse-red);
}

.search-group-label:hover::after {
    background: var(--rse-red-light);
}

/* Actief gefilterde groep — subtiel rood accent */
.search-group-label.is-active {
    color: var(--rse-red);
}

.search-group-label.is-active::after {
    background: var(--rse-red);
    opacity: 0.4;
}

/* "Toon alles" reset-knopje (alleen zichtbaar bij actieve filter) */
.search-scope-reset {
    margin-left: auto;
    background: none;
    border: 0;
    padding: 0 4px;
    color: var(--rse-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
}

.search-scope-reset:hover {
    color: var(--rse-red);
    background: var(--rse-red-light);
}

.search-wrap {
    position: relative;
    width: 100%;
}

.search-result {
  padding: 9px 12px; border-radius: var(--radius);
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: background 0.1s ease;
  animation: resultIn 0.2s ease both;
}
.search-result:hover, .search-result.active { background: var(--rse-bg); }
.search-result .sr-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--rse-ink);
}
.search-result .sr-meta  {
  font-size: 12px;
  color: var(--rse-muted);
}
.search-result mark { background: rgba(245,197,24,0.4); color: inherit; padding: 0 2px; border-radius: 2px; }
@keyframes resultIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.search-skeleton {
  padding: 10px 12px; display: flex; align-items: center; gap: 10px;
}
.skeleton-block {
  background: linear-gradient(90deg, var(--rse-line-2) 25%, var(--rse-line) 50%, var(--rse-line-2) 75%);
  background-size: 200% 100%; border-radius: var(--radius-sm);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.search-empty { padding: 20px; text-align: center; color: var(--rse-muted); font-size: 14px; }

/* Button-variant van search-result (KB-artikelen) erft styling van <a> */
button.search-result {
    background: none;
    border: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

/* Mini search */
.search-mini {
  display: flex; align-items: center; gap: 8px;
  background: white; border-radius: 999px;
  padding: 7px 14px;
  border: 1.5px solid var(--rse-line);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-mini:focus-within { border-color: var(--rse-red); box-shadow: 0 0 0 3px rgba(227,6,19,0.08); }
.search-mini svg { color: var(--rse-muted); flex-shrink: 0; }
.search-mini input { border: none; outline: none; font-size: 14px; background: transparent; width: 180px; }

/* ═══════════════════════════════════════════════════════════════
   KB Article Form Modal — alle styling
   ═══════════════════════════════════════════════════════════════ */

/* ─── Klant veld: label links, picker rechts ─────────────────── */
.kb-customer-field {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    align-items: center;
}

.kb-customer-field__label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.kb-customer-field__label-sub {
    font-size: 11px;
    color: var(--muted, #888);
    font-weight: normal;
    margin-top: 2px;
}

.kb-customer-field__picker {
    min-width: 0;
}

/* ─── Klant picker (compact, full-width) ─────────────────────── */
.kb-customer-picker {
    position: relative;
    width: 100%;
}

.kb-customer-picker__field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border, #d8d8d8);
    transition: border-color 120ms, background-color 120ms;
    min-height: 36px;
}

.kb-customer-picker__field--general {
    background: #f3f7fb;
    border-color: #c8d8e8;
}

.kb-customer-picker__field--customer {
    background: #fff8e6;
    border-color: #e8d090;
}

.kb-customer-picker__icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.kb-customer-picker__customer-name {
    font-weight: 600;
    font-size: 14px;
    flex: 1;
}

.kb-customer-picker__input {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 14px;
    outline: none;
    padding: 0;
}

.kb-customer-picker__clear {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--muted, #888);
    flex-shrink: 0;
}

.kb-customer-picker__clear:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text, #222);
}

.kb-customer-picker__results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border, #d8d8d8);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
}

.kb-customer-picker__result {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-bottom: 1px solid var(--border-soft, #f0f0f0);
}

.kb-customer-picker__result:last-child {
    border-bottom: 0;
}

.kb-customer-picker__result:hover {
    background: #f6f8fa;
}

.kb-customer-picker__result-name {
    font-weight: 500;
    font-size: 14px;
}

.kb-customer-picker__result-meta {
    font-size: 12px;
    color: var(--muted, #888);
    margin-top: 2px;
}

.kb-customer-picker__empty {
    padding: 14px;
    text-align: center;
    color: var(--muted, #888);
    font-size: 13px;
}

/* ─── Categorie + Onderwerp grid (1:2) ───────────────────────── */
.form-grid-category-title {
    display: grid;
    grid-template-columns: 1fr 4fr;
    gap: 12px;
}

/* ─── Draft-restore banner ───────────────────────────────────── */
.kb-draft-banner {
    background: #fff8e6;
    border: 1px solid #e8d090;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kb-draft-banner__text {
    font-size: 13px;
    color: #5a4a1a;
}

.kb-draft-banner__actions {
    display: flex;
    gap: 6px;
}

/* ─── Duplicate-warning blok ─────────────────────────────────── */
.kb-duplicate-warning {
    margin: 12px 0 16px;
    padding: 12px 14px;
    background: #fff8e6;
    border: 1px solid #f0d273;
    border-left: 3px solid #d99b00;
    border-radius: 6px;
    color: #5a4500;
    font-size: 13px;
}

.kb-duplicate-warning__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.kb-duplicate-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kb-duplicate-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ecdfb8;
    border-radius: 5px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.kb-duplicate-item:hover {
    border-color: #d99b00;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.kb-duplicate-item__cat {
    flex-shrink: 0;
}

.kb-duplicate-item__main {
    flex: 1;
    min-width: 0;
}

.kb-duplicate-item__title {
    font-weight: 600;
    color: #2c2c2c;
    font-size: 13px;
    line-height: 1.3;
    word-break: break-word;
}

.kb-duplicate-item__sub {
    margin-top: 2px;
    font-size: 12px;
    color: #6a6a6a;
    line-height: 1.3;
}

.kb-duplicate-item__dot {
    margin: 0 4px;
    color: #b0b0b0;
}

.kb-duplicate-item__action {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ─── Validatie-error onder een veld ─────────────────────────── */
.field-error {
    color: #c33;
    font-size: 12px;
    margin-top: 4px;
}

/* === Login page === */
.login-body { background: var(--rse-black); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-bg {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(227,6,19,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(100,50,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.login-card {
  background: rgba(255,255,255,0.03); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl); padding: 40px;
  width: 100%; box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}
.login-logo { margin-bottom: 28px; display: flex; justify-content: center; }
.login-title { font-size: 32px; font-weight: 900; color: white; text-align: center; margin-bottom: 8px; }
.login-subtitle { color: rgba(255,255,255,0.5); text-align: center; margin-bottom: 28px; font-size: 14px; }
.login-form .field label { color: rgba(255,255,255,0.6); }
.login-form .field input {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1);
  color: white;
}
.login-form .field input::placeholder { color: rgba(255,255,255,0.3); }
.login-form .field input:focus { border-color: var(--rse-red); background: rgba(255,255,255,0.08); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; width: 100%; }
.password-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.4); padding: 4px;
  cursor: pointer; display: grid; place-items: center;
}
.password-toggle:hover { color: rgba(255,255,255,0.8); }
.login-error {
  display: flex; align-items: center; gap: 8px;
  background: rgba(227,6,19,0.15); border: 1px solid rgba(227,6,19,0.3);
  color: #fca5a5; border-radius: var(--radius); padding: 10px 14px;
  font-size: 13px; font-weight: 500; margin-bottom: 16px;
}
.login-footer { color: rgba(255,255,255,0.25); font-size: 12px; text-align: center; }
.login-card.shake { animation: shakeAnim 0.5s ease; }
@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* === Landing page === */
.landing { padding-bottom: 80px; }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--rse-black) 0%, #14141a 100%);
  padding: 48px 0 52px;
  animation: heroIn 0.6s ease both;
  position: relative;
  z-index: 10;
}
@keyframes heroIn { from { opacity: 0; } to { opacity: 1; } }
.hero-inner {
  max-width: 860px; margin: 0 auto; padding: 0 32px;
  display: flex; flex-direction: column; gap: 24px;
}
.hero-text { animation: slideUpIn 0.5s ease both; }
.hero-title {
  font-size: 52px; font-weight: 900; color: white;
  letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 12px;
}
.hero-title-sep {
    display: inline-block;
    margin: 0 0.25em;
    font-weight: 300;
    opacity: 0.3;
}
.hero-subtitle { color: rgba(255,255,255,0.55); font-size: 17px; line-height: 1.5; }
.hero-actions-row { display: flex; gap: 10px; animation: slideUpIn 0.5s 0.1s ease both; }
.search-hero-wrap { animation: slideUpIn 0.5s 0.2s ease both; }
@keyframes slideUpIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stats */
.stats-section { max-width: 1200px; margin: 0 auto; padding: 40px 32px 0; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: white; border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow);
  border: 1px solid var(--rse-line-2);
  display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  display: grid; place-items: center; flex-shrink: 0;
}
.stat-icon--blue   { background: rgba(59,130,246,0.1); color: #2563eb; }
.stat-icon--green  { background: rgba(16,185,129,0.1); color: #059669; }
.stat-icon--orange { background: rgba(249,115,22,0.1); color: #ea580c; }
.stat-icon--red    { background: rgba(227,6,19,0.1);   color: var(--rse-red); }
.stat-value { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.stat-label { font-size: 12px; color: var(--rse-muted); font-weight: 600; margin-top: 3px; }

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon > * {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Customers section */
.customers-section {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.customers-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.section-title { font-size: 24px; font-weight: 800; }
.section-count { font-size: 16px; font-weight: 600; color: var(--rse-muted); }
.customers-controls { display: flex; align-items: center; gap: 12px; }
.sector-select {
  padding: 8px 12px; border: 1.5px solid var(--rse-line);
  border-radius: 999px; font-size: 13px; font-weight: 600;
  background: white; color: var(--rse-ink); outline: none;
  cursor: pointer; transition: border-color 0.15s;
}
.sector-select:focus { border-color: var(--rse-red); }
.view-toggle {
  display: flex; background: white;
  border: 1.5px solid var(--rse-line); border-radius: 999px;
  padding: 3px; gap: 2px; overflow: hidden;
}
.view-btn {
  padding: 6px 10px; border-radius: 999px; border: none;
  background: transparent; color: var(--rse-muted);
  cursor: pointer; transition: all 0.2s; display: grid; place-items: center;
}
.view-btn.active { background: var(--rse-black); color: white; }
.view-btn:hover:not(.active) { background: var(--rse-line-2); color: var(--rse-ink); }

/* ============================================================
   Pagination
   ============================================================ */
.pagination-nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    display: flex;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1.5px solid var(--rse-line);
    background: white;
    color: var(--rse-ink-2);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.page-link:hover {
    border-color: var(--rse-red);
    color: var(--rse-red);
}

.page-item.active .page-link {
    background: var(--rse-red);
    border-color: var(--rse-red);
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-link svg {
    flex-shrink: 0;
}

/* Nummer-bar (boven de letter-bar) */
.number-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

/* Subtiele scheiding tussen nummer- en letter-bar */
.number-bar + .letter-bar {
    margin-top: 0;
    padding-top: 8px;
    border-top: 1px solid var(--rse-line-2);
}

/* Letter bar */
.letter-bar {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 28px;
}
.letter-btn {
  min-width: 36px; padding: 5px 10px;
  border-radius: 999px; border: 1.5px solid var(--rse-line);
  background: white; color: var(--rse-ink-2);
  font-size: 13px; font-weight: 800; cursor: pointer;
  transition: all 0.15s;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  /* whitespace lock */
  white-space: nowrap;
}
/* Verwijder eventuele anchor-specifieke browser styling */
a.letter-btn {
    text-decoration: none;
    color: inherit;
}
.letter-btn:hover { border-color: var(--rse-red); color: var(--rse-red); }
.letter-btn.active {
  background: var(--rse-red); border-color: var(--rse-red);
  color: white;
  animation: letterPop 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes letterPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Letters zonder klanten — visueel uitgegrijsd, niet klikbaar */
.letter-btn--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    /* Optioneel: nog wat zachter maken */
    color: var(--color-text-muted, #9CA3AF);
}

/* Hover op disabled (defensief — pointer-events: none vangt dit al af) */
.letter-btn--disabled:hover {
    background: transparent;
}

/* Letter group */
.letter-group { margin-bottom: 32px; }
.letter-heading {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--rse-muted);
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1.5px solid var(--rse-line);
}
.customer-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* Customer card */
.customer-card {
  background: white; border-radius: var(--radius-lg);
  padding: 20px; border: 1.5px solid var(--rse-line-2);
  box-shadow: var(--shadow-sm); cursor: pointer;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.customer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px -12px rgba(15,15,20,0.18);
  border-color: var(--rse-line);
}
.customer-card {
    position: relative;
}
.customer-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
.customer-card-badges {
    position: relative;
    z-index: 2;
}
.customer-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.customer-card-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.customer-card-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: break-word;
    min-width: 0;
}
.customer-card-sector {
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.customer-card-stats {
  display: flex; gap: 14px; font-size: 12px; color: var(--rse-muted); font-weight: 600;
}
.customer-card-stats span { display: flex; align-items: center; gap: 4px; }
.customer-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.customer-card-badges .tag--brand {
    font-size: 11px;
    padding: 3px 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.customer-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--rse-line-2);
  color: var(--rse-muted); font-size: 13px; font-weight: 600;
}
.customer-card-am { display: flex; align-items: center; gap: 5px; }

/* Customer row (list view) */
.customer-row {
  display: flex; align-items: center; gap: 14px;
  background: white; border-radius: var(--radius-lg);
  padding: 14px 18px; border: 1.5px solid var(--rse-line-2);
  box-shadow: var(--shadow-sm); cursor: pointer;
  text-decoration: none; color: inherit; margin-bottom: 10px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.customer-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow); border-color: var(--rse-line);
}
.customer-row-info { flex: 1; min-width: 0; }
.customer-row-name { font-weight: 800; font-size: 15px; }
.customer-row-meta { font-size: 12px; }
.customer-row-right { display: flex; align-items: center; gap: 8px; }
/* ============================================================
   Customer row — uitgebreid met badges + stats
   ============================================================ */

/* Row wordt een container met absolute link-overlay (zelfde patroon als card) */
.customer-row {
    position: relative;
}

.customer-row-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

/* Logo + info + right blijven boven de link-overlay */
.customer-row > .cust-logo,
.customer-row > .customer-row-info,
.customer-row > .customer-row-right {
    position: relative;
    z-index: 2;
    pointer-events: none; /* klik gaat naar overlay, behalve op interactive children */
}

/* Interactive children mogen wél klikbaar zijn */
.customer-row-badges,
.customer-row-badges a {
    pointer-events: auto;
}

/* Info-top: naam + badges op één regel (desktop), wrap op mobile */
.customer-row-info-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

/* Badges rij — compact en strak naast de naam */
.customer-row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.customer-row-badges .tag--brand {
    font-size: 10px;
    padding: 2px 6px;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Right-side stats — icon + getal compact */
.customer-row-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--rse-muted);
    font-weight: 600;
}

.customer-row-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Chevron arrow rechts — visueel consistent */
.customer-row-arrow {
    color: var(--rse-muted);
    flex-shrink: 0;
}

/* Responsive: op smalle schermen badges onder naam, stats compacter */
@media (max-width: 768px) {
    .customer-row-info-top {
        gap: 6px;
    }

    .customer-row-badges {
        flex-basis: 100%;
        order: 2;
    }

    .customer-row-stats {
        display: none; /* op mobile te druk — alleen op desktop tonen */
    }
}

@media (max-width: 480px) {
    .customer-row-badges .tag--brand {
        font-size: 9px;
        padding: 1px 5px;
    }
}

/* View transitions */
.customers-list-view.visible { animation: fadeSlideIn 0.3s ease; }
.customers-grid { transition: opacity 0.2s; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.customer-card.filtered-out { animation: cardFilterOut 0.2s ease forwards; }
@keyframes cardFilterOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.95); height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* === Customer logo placeholder === */
.cust-logo {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900;
  font-size: 17px; color: white; letter-spacing: -0.02em;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 8px rgba(0,0,0,0.15);
}
.cust-logo.xs { width: 36px; height: 36px; font-size: 13px; border-radius: 9px; }
.cust-logo.lg { width: 88px; height: 88px; font-size: 28px; border-radius: 20px; }

/* === Category filter chips === */
.category-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cat-chip {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--rse-line); background: white; color: var(--rse-ink-2);
  cursor: pointer; transition: all 0.15s;
}
.cat-chip:hover { border-color: var(--rse-red); color: var(--rse-red); }
.cat-chip.active {
  background: var(--rse-red); border-color: var(--rse-red); color: white;
  animation: chipBounce 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes chipBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* === Article category tag colors === */
.article-cat-tag {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; white-space: nowrap;
}
.cat-telefonie    { background: rgba(239,68,68,0.12);  color: #b91c1c; }
.cat-netwerk      { background: rgba(6,182,212,0.12);  color: #0e7490; }
.cat-microsoft-365 { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.cat-applicaties  { background: rgba(139,92,246,0.12); color: #5b21b6; }
.cat-mobiel       { background: rgba(232,202,5,0.18);  color: #854d0e; }
.cat-devices      { background: rgba(16,185,129,0.12); color: #047857; }
.cat-security     { background: rgba(20,184,166,0.12); color: #0f766e; }
.cat-backup       { background: rgba(5,150,105,0.14);  color: #064e3b; }
.cat-overig       { background: rgba(107,114,128,0.12); color: #374151; }

/* === Scope pill (Algemeen / Klantgebonden) ============================
   Zelfde maatvoering als .article-cat-tag (3px 9px / 11px / 999px).
   Wordt gebruikt op het dashboard (statisch) en in de article-view modal
   (klikbaar, met building-icoon + chevron).
   ===================================================================== */

.article-scope-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}

/* Varianten */
.scope-general {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.scope-customer {
    background: var(--rse-line-2);
    color: var(--rse-ink-2);
}

/* Klikbare variant (anchor in modal-header) */
a.article-scope-tag {
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

a.article-scope-tag.scope-customer:hover {
    background: var(--rse-line);
    color: var(--rse-ink);
}

/* Icon + chevron binnen klikbare pill */
.article-scope-tag .scope-pill-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    display: block;
}

.article-scope-tag .scope-pill-chevron {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    display: block;
    opacity: 0.7;
    transition: transform 0.15s, opacity 0.15s;
}

a.article-scope-tag:hover .scope-pill-chevron {
    transform: translateX(2px);
    opacity: 1;
}

/* Label — ellipsis op de tekst-span zelf, niet op de pill-container.
   Daardoor blijft padding-right intact en krijg je netjes een …  */
.article-scope-tag .scope-pill-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
    min-width: 0;
}
.article-scope-tag .scope-pill-icon,
.article-scope-tag .scope-pill-chevron {
    line-height: 1;
}

.article-trashed-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
    background: hsl(0, 85%, 93%);
    color: hsl(0, 68%, 38%);
    border: 1px solid hsl(0, 70%, 80%);
}

/* In de view-modal context iets groter, net als andere meta-pills */
.modal--article-view .modal-header-meta .article-trashed-pill {
    font-size: 14px;
}

.modal--article-view .modal-header-meta .article-trashed-pill svg {
    width: 14px;
    height: 14px;
}

/* ─── Modal-header context: pill identiek aan cat-pill ─────────────────
   Cat-pill krijgt daar font-size: 14px via bestaande regel. Padding blijft
   gelijk aan basis (3px 9px) — geen override hier — zodat hoogte exact
   matcht met de cat-pill.
   ───────────────────────────────────────────────────────────────────── */
.modal--article-view .modal-header-meta .article-scope-tag {
    font-size: 14px;
}

.modal--article-view .modal-header-meta .article-scope-tag .scope-pill-icon {
    width: 14px;
    height: 14px;
}

.modal--article-view .modal-header-meta .article-scope-tag .scope-pill-chevron {
    width: 12px;
    height: 12px;
}

.modal--article-view .modal-header-meta .article-scope-tag .scope-pill-label {
    max-width: 280px;
}

/* === Article row === */
.article-row {
  display: flex; align-items: center; gap: 14px;
  background: white; border-radius: var(--radius-lg);
  padding: 16px 18px; border: 1.5px solid var(--rse-line-2);
  box-shadow: var(--shadow-sm); cursor: pointer; margin-bottom: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, border-left-color 0.15s;
  border-left: 3px solid transparent;
  position: relative; overflow: hidden;
}
.article-row:hover {
  border-color: var(--rse-line); box-shadow: var(--shadow);
  border-left-color: var(--rse-red);
}

/* article-row-left: kolom voor categorie-pill + scope-pill onder elkaar */
.article-row-left {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.article-row-left .article-cat-tag,
.article-row-left .article-scope-tag {
  max-width: 100%;
}

.article-row-body { flex: 1; min-width: 0; }
.article-row-title { font-weight: 800; font-size: 15px; margin-bottom: 3px; }
.article-row-excerpt { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-row-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  white-space: nowrap; flex-shrink: 0;
}
.article-row-arrow { color: var(--rse-muted); flex-shrink: 0; }
.article-row.highlighted { animation: rowHighlight 1.5s ease forwards; }
@keyframes rowHighlight {
  0%, 100% { background: white; }
  30% { background: rgba(227,6,19,0.05); border-color: rgba(227,6,19,0.3); }
}

/* === Customer detail page === */
.customer-main { padding-bottom: 80px; }
.customer-header-wrap {
  /* background: linear-gradient(160deg, var(--rse-black) 0%, #14141a 100%); */
  /* padding: 0 32px 32px; */
  background: linear-gradient(160deg, #14141a 0%, #1e1e1e 100%);
  padding: 16px 32px 32px;
}
.customer-header { max-width: 1200px; margin: 0 auto; }
.back-btn { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.12); margin-top: 24px; margin-bottom: 24px; }
.back-btn:hover { color: white; background: rgba(255,255,255,0.06); }
.customer-header-main { display: flex; align-items: flex-start; gap: 20px; }
.customer-header-info { flex: 1; min-width: 0; }
.customer-header-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.customer-header-badges .tag { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); }
.customer-name { color: white; font-size: 36px; letter-spacing: -0.03em; }
.customer-notes { color: rgba(255,255,255,0.5); font-size: 14px; margin-top: 8px; }
.customer-header-actions { display: flex; gap: 10px; flex-shrink: 0; align-items: flex-start; padding-top: 40px; }
.customer-header-actions .btn-ghost { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.9); }
.customer-header-actions .btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); color: #fff; }

.hero-actions-row .btn-ghost { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.9); }
.hero-actions-row .btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); color: #fff; }

.tag--brand {
    border: 1px solid var(--brand);
    color: var(--brand);
    transition: background 0.15s, color 0.15s;
}
.tag--brand:hover {
    background: var(--brand);
    color: #fff;
}

.customer-layout {
  max-width: 1200px; margin: 32px auto 0;
  padding: 0 32px;
  display: grid; grid-template-columns: 340px 1fr; gap: 28px;
  align-items: start;
}
.customer-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.sidebar-card { padding: 18px; }
.card-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rse-muted); margin-bottom: 14px; }
.info-rows { display: flex; flex-direction: column; gap: 14px; }
.info-row { display: flex; gap: 10px; align-items: flex-start; }
.info-icon {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: var(--rse-line-2); display: grid; place-items: center;
  flex-shrink: 0; color: var(--rse-muted);
}
.info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--rse-muted); }
.info-value { font-size: 14px; font-weight: 600; color: var(--rse-ink); margin-top: 2px; }
.info-value a { color: var(--rse-muted); text-decoration: none; transition: color 0.15s; }
.info-value a:hover { color: var(--rse-red); }
.contact-person { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.contact-avatar {
  width: 40px; height: 40px; border-radius: 999px;
  background: linear-gradient(135deg, var(--rse-red), var(--rse-red-dark));
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: white; flex-shrink: 0;
}
.contact-name  { font-weight: 800; font-size: 14px; }
.contact-role  { font-size: 12px; margin-top: 1px; }
.contact-detail {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--rse-muted); text-decoration: none;
  padding: 5px 0; transition: color 0.15s;
}
.contact-detail:hover { color: var(--rse-red); }
.contact-detail span { font-family: ui-monospace, monospace; font-size: 12px; }

/* Articles */
.articles-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.articles-search-wrap { flex-shrink: 0; }

.articles-header .section-title {
    flex: 1 1 auto;
    min-width: 0;
}

.articles-search-wrap {
    flex: 0 0 auto;
    max-width: 100%;
}

/* ============================================================
   Autotask-style alert banner
   ============================================================ */
.at-alert {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: #fdf3d4;
    color: #2b2b2b;
    border: 1px solid #e8c97a;
    border-left: 5px solid #deb54c;
    border-radius: 2px;
    padding: 10px 14px;
    margin-bottom: 1.25rem;
    width: 100%;
    font-size: 0.85rem;
    line-height: 1.45;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

.at-alert__icon-wrap {
    color: #7f5a00;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-top: 1px;
}

.at-alert__icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.at-alert__body {
    flex: 1;
    min-width: 0;
}

.at-alert__title {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0 0 4px 0;
    color: #2b2b2b;
}

.at-alert__text {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #2b2b2b;
}

.at-alert__text > :first-child {
    margin-top: 0;
}

.at-alert__text > :last-child {
    margin-bottom: 0;
}

/* SharePoint tree-specifieke styling */
.sp-name-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: calc(var(--sp-depth, 0) * 1.25rem);
}


.sp-extlink:hover {
    color: #EF2C1E;                /* Vodafone rood */
    background: rgba(239,44,30,.08);
}

.sp-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

.sp-truncated-warning {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5em;
    color: #d90606;
    font-size: 0.9em;
    cursor: help;
    user-select: none;
}

.sp-truncated-warning--mild {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5em;
    color: #d97706;
    font-size: 0.9em;
    cursor: help;
    user-select: none;
}

/* Folder-rijen ietsje uitstaan van file-rijen */
.sp-row[data-toggle-children] .sn-cell-primary {
    font-weight: 500;
}

.sp-row .sn-toggle-cell {
    padding-left: calc(var(--sp-depth, 0) * 1.25rem);
}

.empty [data-sp-retry-link] {
    color: var(--rse-red, #B30410);
    text-decoration: underline;
    cursor: pointer;
}

.empty [data-sp-retry-link]:hover {
    text-decoration: none;
}

/* Refresh icon spinner */
.sp-refresh-icon.is-spinning {
    animation: sp-spin 1s linear infinite;
}

.sp-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: sp-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes sp-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Header layout */
.sp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.sp-header-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sp-subtitle {
    font-size: 0.85em;
    color: var(--muted, #6b7280);
}

.sp-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.sp-header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-last-synced {
    font-size: 0.85em;
    color: var(--muted, #6b7280);
}

.sp-file-count:empty {
    display: none;
}

.empty--warning {
    border-left: 3px solid var(--warning, #f59e0b);
    padding-left: 12px;
}

/* ============================================================
   HTML hidden attribuut respecteren — wint van class display
   ============================================================ */
[hidden] { display: none !important; }

/* ============================================================
   KB Customer Articles Search (Livewire)
   ============================================================ */

/* Input wrapper — gebruikt bestaande .search-mini als basis */
.kb-customer-search {
    width: 100%;
    max-width: 320px;
}

.kb-customer-search .search-mini {
    width: 100%;
}

.kb-customer-search .search-mini input {
    flex: 1;
    width: auto;
    min-width: 0;
}

.kb-customer-search .search-mini input::-webkit-search-cancel-button,
.kb-customer-search .search-mini input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

/* ============================================================
   KB Article View Modal
   ============================================================ */

.modal.modal--article-view {
    width: min(1200px, 96vw);
    max-width: min(1200px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Override de generieke .modal-body (die op flex staat) door
   onze body als block te gebruiken voor de grid eronder. */
.modal--article-view .kb-view-body {
    flex: 1;
    display: block;
    overflow-y: auto;
    padding: 24px 28px 28px;
}

/* Header rechter-acties */
.modal--article-view .modal-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Header iets groter */
.modal--article-view .modal-header-meta .article-cat-tag,
.modal--article-view .modal-header-meta .modal-customer-name {
    font-size: 14px;
}

.modal--article-view .modal-header-meta .modal-customer-name {
    font-weight: 700;
}

/* ─── 2-koloms layout ───────────────────────────────────── */

.kb-view-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}

.kb-view-content {
    min-width: 0;
}

.kb-view-content .modal-article-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 800;
    color: var(--rse-ink);
    line-height: 1.3;
}

/* Meer ademruimte boven secties (behalve direct na titel) */
.kb-view-content .modal-section {
    margin-top: 26px;
}

.kb-view-content .modal-section:first-of-type {
    margin-top: 0;
}

.kb-view-content .modal-section-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rse-muted);
    margin-bottom: 10px;
}

/* Markdown-gerenderde content (Str::markdown output) */
.article-body-html {
    font-size: 14px;
    line-height: 1.6;
    color: var(--rse-ink);
}

.article-body-html > *:first-child {
    margin-top: 0;
}

.article-body-html > *:last-child {
    margin-bottom: 0;
}

.article-body-html p {
    margin: 0 0 12px;
}

.article-body-html h1,
.article-body-html h2,
.article-body-html h3,
.article-body-html h4 {
    margin: 22px 0 10px;
    font-weight: 800;
    color: var(--rse-ink);
    line-height: 1.3;
}

.article-body-html h1 { font-size: 20px; }
.article-body-html h2 { font-size: 17px; }
.article-body-html h3 { font-size: 15px; }
.article-body-html h4 { font-size: 14px; }

.article-body-html ul,
.article-body-html ol {
    margin: 0 0 12px;
    padding-left: 22px;
}

.article-body-html li {
    margin: 4px 0;
}

.article-body-html code {
    background: var(--rse-bg);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: ui-monospace, 'Cascadia Mono', monospace;
    font-size: 12.5px;
}

.article-body-html pre {
    background: var(--rse-bg);
    border: 1px solid var(--rse-line-2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    overflow-x: auto;
    margin: 0 0 12px;
}

.article-body-html pre code {
    background: transparent;
    padding: 0;
    font-size: 12.5px;
    line-height: 1.5;
}

.article-body-html a {
    color: var(--rse-red);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body-html blockquote {
    border-left: 3px solid var(--rse-line-2);
    padding: 4px 14px;
    margin: 0 0 12px;
    color: var(--rse-ink-2);
    font-style: italic;
}

.article-body-html hr {
    border: 0;
    border-top: 1px solid var(--rse-line-2);
    margin: 18px 0;
}

.article-body-html img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* ─── Sidebar ────────────────────────────────────────────── */

.kb-view-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
}

.kb-view-card {
    background: var(--rse-bg);
    border: 1px solid var(--rse-line-2);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.kb-view-card-title {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rse-muted);
}

/* Metadata-rijen */
.kb-view-meta-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kb-view-meta-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kb-view-meta-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rse-muted);
}

.kb-view-meta-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--rse-ink);
}

.kb-view-meta-value.muted {
    color: var(--rse-muted);
    font-weight: 500;
}

.kb-view-meta-sub {
    font-size: 12px;
    color: var(--rse-muted);
}

/* ─── KB Timeline (versie-historie) ────────────────────── */

.kb-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    max-height: 420px;
    overflow-y: auto;
}

.kb-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--rse-line-2);
    border-radius: 1px;
}

.kb-timeline-item {
    position: relative;
    padding-left: 22px;
    padding-bottom: 14px;
}

.kb-timeline-item:last-child {
    padding-bottom: 0;
}

.kb-timeline-dot {
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: white;
    border: 2px solid var(--rse-muted);
    z-index: 1;
    transition: border-color 0.12s, background 0.12s, transform 0.12s;
}

.kb-timeline-item.is-created .kb-timeline-dot {
    background: var(--rse-muted);
}

.kb-timeline-item.is-active .kb-timeline-dot {
    border-color: var(--rse-red);
    background: var(--rse-red);
    transform: scale(1.15);
}

.kb-timeline-item:not(.is-created):not(.is-active):hover .kb-timeline-dot {
    border-color: var(--rse-red);
}

.kb-timeline-entry {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    font-family: var(--font-sans);
    color: var(--rse-ink);
}

.kb-timeline-entry:hover:not(:disabled) {
    background: white;
    border-color: var(--rse-line-2);
}

.kb-timeline-item.is-active .kb-timeline-entry {
    background: var(--rse-red-light);
    border-color: var(--rse-red);
}

.kb-timeline-entry:disabled {
    cursor: default;
    color: var(--rse-muted);
}

.kb-timeline-time {
    font-size: 11px;
    font-weight: 700;
    color: var(--rse-muted);
    letter-spacing: 0.02em;
}

.kb-timeline-causer {
    font-weight: 700;
    font-size: 13px;
    margin-top: 1px;
    color: var(--rse-ink);
}

.kb-timeline-item.is-created .kb-timeline-causer {
    color: var(--rse-muted);
}

.kb-timeline-summary {
    font-size: 12px;
    color: var(--rse-ink-2);
    margin-top: 2px;
    line-height: 1.4;
}

.kb-timeline-summary strong {
    color: var(--rse-ink);
    font-weight: 700;
}

/* ─── KB Diff Panel (overlay binnen view-modal) ────────── */

.kb-diff-panel {
    position: absolute;
    inset: 0;
    background: white;
    z-index: 5;
    display: flex;
    flex-direction: column;
    animation: slideRightIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kb-diff-panel-header {
    padding: 16px 28px 12px;
    border-bottom: 1px solid var(--rse-line);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-shrink: 0;
}

.kb-diff-panel-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--rse-ink);
}

.kb-diff-panel-subtitle {
    font-size: 13px;
    margin-top: 2px;
}

.kb-diff-panel-body {
    padding: 18px 28px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kb-diff-field-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rse-muted);
    margin-bottom: 8px;
}

/* jfcherng/php-diff side-by-side output styling */
.kb-diff-rendered table.diff {
    width: 100%;
    border-collapse: collapse;
    font-family: ui-monospace, 'Cascadia Mono', monospace;
    font-size: 12.5px;
    line-height: 1.55;
    border: 1px solid var(--rse-line-2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.kb-diff-rendered table.diff td,
.kb-diff-rendered table.diff th {
    padding: 2px 8px;
    vertical-align: top;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Linenummer-kolommen (th.n-old en th.n-new) */
.kb-diff-rendered table.diff th.n-old,
.kb-diff-rendered table.diff th.n-new {
    width: 36px;
    text-align: right;
    background: var(--rse-bg);
    color: var(--rse-muted);
    font-size: 11px;
    user-select: none;
    border-right: 1px solid var(--rse-line-2);
    font-weight: 600;
}

/* Lege linenummer-kolommen bij ins/del rijen */
.kb-diff-rendered table.diff th:empty {
    background: var(--rse-bg);
    border-right: 1px solid var(--rse-line-2);
}

/* Hele nieuwe regel — change-ins tbody → groene rij */
.kb-diff-rendered table.diff tbody.change-ins td.new {
    background: rgba(34, 197, 94, 0.22);
    color: #14532d;
    font-weight: 500;
}

/* Hele verwijderde regel — change-del tbody → rode rij */
.kb-diff-rendered table.diff tbody.change-del td.old {
    background: rgba(239, 68, 68, 0.22);
    color: #7f1d1d;
    font-weight: 500;
}

/* Lege tegenhanger (td.old.none of td.new.none) — gestreepte/lege achtergrond */
.kb-diff-rendered table.diff td.none {
    background: repeating-linear-gradient(
        45deg,
        var(--rse-bg),
        var(--rse-bg) 4px,
        var(--rse-line-2) 4px,
        var(--rse-line-2) 8px
    );
}

/* Gewijzigde regel (beide kanten inhoud) — change-rep tbody */
.kb-diff-rendered table.diff tbody.change-rep td.old {
    background: rgba(239, 68, 68, 0.08);
}

.kb-diff-rendered table.diff tbody.change-rep td.new {
    background: rgba(34, 197, 94, 0.08);
}

/* Inline word-level markers binnen change-rep */
.kb-diff-rendered table.diff del,
.kb-diff-rendered table.diff ins {
    text-decoration: none;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 700;
}

.kb-diff-rendered table.diff del {
    background: rgba(239, 68, 68, 0.40);
    color: #7f1d1d;
}

.kb-diff-rendered table.diff ins {
    background: rgba(34, 197, 94, 0.40);
    color: #14532d;
}

/* Ongewijzigde context-regels — neutraal */
.kb-diff-rendered table.diff tbody.change-eq td.old,
.kb-diff-rendered table.diff tbody.change-eq td.new {
    background: white;
    color: var(--rse-ink);
}

/* Skip-blok (samengevouwen context) */
.kb-diff-rendered table.diff tbody.skipped {
    background: var(--rse-line-2);
}

.kb-diff-rendered table.diff tbody.skipped td {
    color: var(--rse-muted);
    font-style: italic;
    text-align: center;
    padding: 4px 8px;
}

/* Responsive */
@media (max-width: 960px) {
    .kb-view-grid {
        grid-template-columns: 1fr;
    }
    .kb-view-sidebar {
        position: static;
    }
    .modal--article-view {
        width: 96vw;
    }
}

/* Clear-knop — consistent met chip-remove styling */
.search-mini-clear {
    background: none;
    border: none;
    padding: 0;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: var(--rse-muted);
    font-size: 18px;
    line-height: 1;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.12s, background 0.12s;
    flex-shrink: 0;
}

.search-mini-clear:hover {
    color: var(--rse-red);
    background: var(--rse-red-light);
}

/* Results-container — inline, vervangt visueel de articles-list */
.kb-search-results {
    margin-top: 0;
}

.kb-search-results .empty {
    padding: 40px 24px;
}

.kb-loadmore-wrap {
    display: flex;
    justify-content: center;
    padding: 16px 0 8px;
}

/* Dashboard: ruimere search-balk in algemene artikelen sectie */
body.page-dashboard .articles-search-wrap .search-mini {
    min-width: 360px;
    padding: 8px 14px;
}

body.page-dashboard .articles-search-wrap .search-mini input {
    flex: 1;
    width: 100%;
    font-size: 14px;
    height: 24px;
}

body.page-dashboard .articles-search-wrap .search-mini svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Verberg native search-clear knop op dashboard (we hebben eigen × knop) */
body.page-dashboard .articles-search-wrap .search-mini input[type="search"]::-webkit-search-cancel-button,
body.page-dashboard .articles-search-wrap .search-mini input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

/* Search bar */
[data-sp-section] [hidden] {
    display: none !important;
}

.sp-search-wrap {
    margin: 16px 0 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sp-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 10px 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sp-search:focus-within {
    border-color: var(--accent, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sp-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 4px 10px;
    font-size: 1em;
    min-width: 0;
}

.sp-search-input::-webkit-search-cancel-button {
    display: none;
}

.sp-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted, #6b7280);
    padding: 2px;
    display: flex;
    align-items: center;
    border-radius: 3px;
}

.sp-search-clear:hover {
    background: var(--surface-3, #e5e7eb);
    color: var(--text, #111827);
}

.sp-search-meta {
    font-size: 0.85em;
    color: var(--muted, #6b7280);
}

/* Filter states op rijen */
.sp-row.is-filtered-out {
    display: none !important;
}

.sp-row.is-filter-match .sn-cell-primary {
    /* Optioneel: hooglight de matching rij subtiel */
    font-weight: 600;
}

/* Service Navigator */
.sn-section { margin-top: 2rem; }

.sn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* --- Tabel --------------------------------------------------- */
.sn-table { width: 100%; border-collapse: collapse; }

.sn-table th,
.sn-table td {
    padding: .55rem .75rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.sn-row--expandable { cursor: pointer; transition: background-color .15s ease; }
.sn-row--expandable:hover,
.sn-row.is-open      { background: var(--hover, #f8fafc); }

.sn-cell-primary   { font-weight: 600; line-height: 1.3; }
.sn-cell-secondary { font-size: .85em; line-height: 1.3; color: var(--muted, #6b7280); margin-top: 2px; }

/* --- Chevron toggle ----------------------------------------- */
.sn-toggle-cell { width: 64px; }

.sn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: none;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    color: var(--muted, #6b7280);
    font-size: .8rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.sn-toggle:hover { background: rgba(0,0,0,.05); color: inherit; }

/* Beide kinderen krijgen dezelfde vaste hoogte + centrering */
.sn-chevron,
.sn-linecount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 16px;          /* vaste hoogte = optisch perfect uitgelijnd */
    line-height: 1;
}

.sn-chevron {
    width: 16px;           /* vierkant voor het icoon */
    transition: transform .15s ease;
}
.sn-row.is-open .sn-chevron { transform: rotate(90deg); }

.sn-linecount {
    min-width: 12px;       /* houdt 1- en 2-cijferige tellingen netjes uitgelijnd */
}

/* --- Externe link ------------------------------------------- */
.sn-link-cell { text-align: right; }

.sn-extlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    color: var(--muted, #6b7280);
    transition: color .15s ease, background-color .15s ease;
}
.sn-extlink:hover {
    color: #EF2C1E;                /* Vodafone rood */
    background: rgba(239,44,30,.08);
}

/* --- Status tooltip (* naast 'Status') ---------------------- */
.sn-info {
    position: relative;
    display: inline-block;
    margin-left: 4px;
    cursor: help;
}
.sn-info-asterisk {
    position: relative;
    display: inline-block;
    margin-left: 4px;
    font-weight: 600;
    color: var(--muted, #E30613);
    cursor: help;
}
.sn-info:focus { outline: none; }

.sn-info::before,
.sn-info::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 10;
}
.sn-info::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 6px);
    padding: 6px 10px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: .75rem;
    font-weight: 500;
    white-space: nowrap;
}
.sn-info::before {
    content: '';
    bottom: calc(100% + 1px);
    border: 5px solid transparent;
    border-top-color: #111827;
}
.sn-info:hover::before, .sn-info:hover::after,
.sn-info:focus::before, .sn-info:focus::after { opacity: 1; }

/* --- Sub-tabel met lijnen ----------------------------------- */
.sn-lines-row > td { padding: 0; background: var(--subtle, #fafafa); }

.sn-lines-table {
    width: 100%;
    border-collapse: collapse;
}
.sn-lines-table th,
.sn-lines-table td {
    padding: .45rem .75rem;
    text-align: left;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: .9em;
}
.sn-lines-table thead th {
    font-size: .7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted, #6b7280);
}
.sn-lines-table tr:last-child td { border-bottom: 0; }

/* --- Netwerk status badges (LED stijl, conform Service Navigator) --- */
.tag--status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,.25);
    white-space: nowrap;
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 rgba(0,0,0,.15);
}

/* Up — groen */
.tag--status-up {
    background: linear-gradient(to bottom, #bbd000, #8d9d00);
    border-color: #8d9d00;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #5f6a00;
}

/* Down — rood */
.tag--status-down {
    background: linear-gradient(to bottom, #ff1a1a, #e60000);
    border-color: #e60000;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #b30000;
}

/* LAN down — oranje */
.tag--status-lan-down {
    background: linear-gradient(to bottom, #ff8c15, #e17200);
    border-color: #e17200;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #ae5800;
}

/* Niet monitored — geel (donkere tekst voor contrast) */
.tag--status-niet-monitored {
    background: linear-gradient(to bottom, #ffed00, #ffd900);
    border-color: #ffd900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #eab400;
    color: #5a4a00;
    text-shadow: 0 1px 0 rgba(255,255,255,.35);
}

/* New installation — paars */
.tag--status-new-installation {
    background: linear-gradient(to bottom, #9a22a1, #721977);
    border-color: #721977;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #4a104d;
}

/* ============================================================
   Order status tags — fel gekleurd, donkere tekst voor contrast
   ============================================================ */
.tag--order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
    background: var(--order-bg, var(--rse-line-2));
    color: var(--order-fg, var(--rse-ink));
    border-color: var(--order-border, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 rgba(0,0,0,.06);
}

/* Per-statuscode varianten */
.tag--order-statuscode-1 {        /* Nieuw */
    --order-bg:     #37DAF0;
    --order-fg:     #073A45;
    --order-border: #1FB8CC;
}
.tag--order-statuscode-2 {        /* In behandeling */
    --order-bg:     #23F74D;
    --order-fg:     #0C4D1A;
    --order-border: #1CC73E;
}
.tag--order-statuscode-3 {        /* Wordt uitgevoerd */
    --order-bg:     #4DA3FF;
    --order-fg:     #07335C;
    --order-border: #2E7DD9;
}
.tag--order-statuscode-100001 {   /* Voltooid */
    --order-bg:     #00FF48;
    --order-fg:     #0A4D1A;
    --order-border: #00CC3A;
}
.tag--order-statuscode-100002 {   /* Gedeeltelijk */
    --order-bg:     #FFC800;
    --order-fg:     #4D3B00;
    --order-border: #D6A800;
}
.tag--order-statuscode-100003 {   /* Gefactureerd */
    --order-bg:     #2BC285;
    --order-fg:     #073A28;
    --order-border: #1F9968;
}

/* Geannuleerde statussen — alle codes, één kleur */
.tag--order-statuscode-4,
.tag--order-statuscode-650010001,
.tag--order-statuscode-650010002,
.tag--order-statuscode-650010003,
.tag--order-statuscode-650010004,
.tag--order-statuscode-650010005 {
    --order-bg:     #FF6640;
    --order-fg:     #FFFFFF;
    --order-border: #E04A26;
}

/* ============================================================
   Contract-tabel: visuele hiërarchie tweaks
   - Omschrijving blijft prominent
   - Periode wordt subtiel/secondair
   - Omzet wordt subtiel maar bedrag iets prominenter
   ============================================================ */

/* Periode-cel: kleiner, muted, monospaced voor uitlijning */
.sn-table--contracts td:nth-child(3) .sn-cell-primary,
.sn-lines-table--contracts td:nth-child(2) {
    font-size: 12px;
    font-weight: 500;
    color: var(--rse-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* Omzet-cel: muted, maar bedrag krijgt iets meer aandacht */
.sn-table--contracts td:nth-child(4) .sn-cell-primary {
    font-size: 13px;
    font-weight: 600;
    color: var(--rse-ink-2);
    font-variant-numeric: tabular-nums;
}

/* Em-dash / streepje binnen periode subtieler maken */
.sn-table--contracts td:nth-child(3) .sn-cell-primary,
.sn-lines-table--contracts td:nth-child(2) {
    /* De en-dash " — " wordt al door je $periode string ingevoegd;
       deze regel is enkel voor consistente styling */
}

/* Sub-tabel headers iets meer ruimte */
.sn-lines-table--contracts thead th {
    font-size: 10px;
    letter-spacing: 0.06em;
}

/* Sub-tabel cellen — over de hele linie iets ingetogen */
.sn-lines-table--contracts td {
    font-size: 12.5px;
    color: var(--rse-ink-2);
}

/* Sub-tabel: eerste kolom (naam) blijft de "primaire" info */
.sn-lines-table--contracts td:first-child {
    font-weight: 600;
    color: var(--rse-ink);
}

/* Aantal- en prijs-kolom: monospace voor nette uitlijning */
.sn-lines-table--contracts td:nth-child(3),
.sn-lines-table--contracts td:nth-child(4) {
    font-variant-numeric: tabular-nums;
    color: var(--rse-muted);
    font-weight: 500;
}

/* Prijs zelf iets prominenter dan aantal */
.sn-lines-table--contracts td:nth-child(4) {
    color: var(--rse-ink-2);
    font-weight: 600;
}

/* ============================================================
   KPN IRMA Orders
   Erft volledig van .sn-table — alleen aanvullingen specifiek
   voor de boom-structuur en chevron-animatie.
   ============================================================ */

/* Chevron-animatie voor de irma-rij (sn-row.is-open match niet) */
.irma-row.is-open .sn-chevron { transform: rotate(90deg); }

/* Tree-wrapper */
.irma-tree {
    display: flex;
    align-items: flex-start;
}

/* Sub-orders krimpen per diepte. Geldt voor de hele rij (alle cellen). */
.irma-row {
    font-size: max(0.65rem, calc(1rem - var(--row-depth, 0) * 0.15rem));
}

/* Subtiele indicator dat child-rijen bij een parent horen */
.irma-row[data-parent-of] {
    background: var(--subtle, #fafafa);
}
.irma-row[data-parent-of]:hover {
    background: var(--hover, #f0f4f8);
}

/* === Modals === */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(14,14,16,0.6);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 1000; padding: 16px;
  animation: backdropIn 0.2s ease;
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: white; border-radius: var(--radius-xl);
  width: min(700px, 92vw); max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
.modal-backdrop--confirm { z-index: 1100; }
/* Scrollbar binnen modal: houd 'm visueel weg van afgeronde hoeken */
.modal::-webkit-scrollbar {
    width: 8px;
}

.modal::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 28px;       /* gelijk aan border-radius */
    margin-bottom: 28px;    /* gelijk aan border-radius */
}

.modal::-webkit-scrollbar-thumb {
    background: var(--rse-line);
    border-radius: 999px;
    border: 2px solid white;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: var(--rse-red);
}
.modal--wide { width: min(800px, 92vw); }
.modal--article { width: min(720px, 92vw); }
.modal--form { width: min(780px, 94vw); }
.modal--slide-right { animation: slideRightIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal-tabs { display: flex; gap: 4px; margin-top: 12px; }
.modal-tab { padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1.5px solid var(--rse-line); background: none; cursor: pointer; color: var(--rse-muted); transition: all 0.15s; }
.modal-tab:hover { border-color: var(--rse-red); color: var(--rse-red); }
.modal-tab.active { background: var(--rse-red); border-color: var(--rse-red); color: white; }
.modal-tab-panel[hidden] { display: none; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideRightIn {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
.modal-closing {
  animation: modalOut 0.2s ease forwards !important;
}
@keyframes modalOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.95); }
}
.modal-header {
  padding-top: 12px;
  padding-bottom: 8px;
  padding-left: 28px;
  padding-right: 28px;
  border-bottom: 1px solid var(--rse-line);
  display: flex; align-items: flex-start; justify-content: space-between;
  position: sticky; top: 0; background: white; z-index: 1;
}
.modal-header-meta { display: flex; align-items: center; gap: 12px; }
.modal-customer-name { font-size: 13px; font-weight: 700; color: var(--rse-muted); }
.modal-body { padding: 16px 28px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer {
  padding-top: 8px;
  padding-bottom: 12px;
  padding-left: 28px;
  padding-right: 28px;
  border-top: 1px solid var(--rse-line);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  position: sticky; bottom: 0; background: white;
}
.modal-article-title { font-size: 22px; margin-bottom: 8px; }
.modal-section { display: flex; flex-direction: column; gap: 8px; }
.modal-section-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--rse-muted);
}
.modal-excerpt { font-size: 15px; line-height: 1.6; color: var(--rse-ink-2); }
.article-body-pre {
  background: var(--rse-bg); border-radius: var(--radius);
  padding: 16px; font-size: 13px; font-family: ui-monospace, 'Cascadia Mono', monospace;
  white-space: pre-wrap; word-break: break-word; line-height: 1.7;
  margin: 0; border: 1px solid var(--rse-line-2);
}
.article-notes-callout {
  background: rgba(245,197,24,0.12); border-left: 3px solid var(--rse-yellow);
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 14px; line-height: 1.6; color: var(--rse-ink-2);
}

/* === Article HTML body (output rendered in view modal) === */
.article-body-html {
  font-size: 15px; line-height: 1.7; color: var(--rse-ink);
}
.article-body-html h2 {
  font-size: 17px; font-weight: 800; margin: 20px 0 6px;
  padding-bottom: 6px; border-bottom: 1px solid var(--rse-line-2);
}
.article-body-html h3 { font-size: 15px; font-weight: 700; margin: 16px 0 4px; }
.article-body-html p  { margin: 0 0 10px; }
.article-body-html p:last-child { margin-bottom: 0; }
.article-body-html ul, .article-body-html ol { padding-left: 22px; margin: 0 0 10px; }
.article-body-html li { margin-bottom: 4px; }
.article-body-html strong { font-weight: 700; }
.article-body-html em { font-style: italic; }
.article-body-html u  { text-decoration: underline; }
.article-body-html blockquote {
  background: rgba(245,197,24,0.1); border-left: 3px solid var(--rse-yellow);
  border-radius: var(--radius-sm); margin: 12px 0; padding: 10px 14px;
  color: var(--rse-ink-2); font-size: 14px;
}
.article-body-html pre {
  background: var(--rse-bg); border: 1px solid var(--rse-line-2);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 13px; font-family: ui-monospace, 'Cascadia Mono', monospace;
  white-space: pre-wrap; word-break: break-all; margin: 0 0 10px;
}
.article-body-html code {
  background: var(--rse-line-2); border-radius: 4px;
  padding: 1px 5px; font-size: 12.5px;
  font-family: ui-monospace, 'Cascadia Mono', monospace;
}
.article-body-html img {
  max-width: 100%; border-radius: var(--radius);
  margin: 8px 0; display: block;
  border: 1px solid var(--rse-line-2);
}
.article-body-html a { color: var(--rse-red); text-decoration: underline; }

/* === Toast === */
#toast-container {
  position: fixed;
  top: calc(var(--topbar-height, 64px) + 16px);
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--rse-black); /* fallback */
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: 360px;
  overflow: hidden;
}

.toast > span {
  text-wrap: balance;
  white-space: pre-line;
}

/* Donkere rust-kleuren per type (eind-state na de flash) */
.toast.success { background: #14532d; }            /* donkergroen */
.toast.error   { background: #7f1d1d; }            /* donkerrood  */
.toast.info    { background: #1e3a8a; }            /* donkerblauw */
.toast.warning { background: #78350f; }

/* Flash overlay: felle kleur die wegschuift naar de donkere achtergrond.
   Geen border-left meer, dus left: 0. */
.toast::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  bottom: -2px;
  right: -2px;
  z-index: 2;
  transform-origin: left center;
  animation: toastFlash 0.85s cubic-bezier(0.4, 0, 0.2, 1) 0s forwards;
  pointer-events: none;
  border-radius: calc(var(--radius-lg) + 1px);
}

/* Felle kleuren voor de flash (zoals voorheen) */
.toast.success::after { background: #22c55e; }
.toast.error::after   { background: var(--rse-red); }
.toast.info::after    { background: #3b82f6; }
.toast.warning::after { background: #f59e0b; }

/* Content faded in tijdens de reveal */
.toast > * {
  position: relative;
  z-index: 3;
  opacity: 0;
  animation: toastContentIn 0.3s ease 0.55s forwards;
}

/* Progress bar: start na de flash */
.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.45);
  transform-origin: left center;
  opacity: 0;
  animation:
    toastProgressFade 0.15s ease 0.85s forwards,
    toastProgress var(--toast-duration, 5000ms) linear 0.85s forwards;
  z-index: 3;
}
.toast:hover .toast-progress {
  animation-play-state: paused;
}

.toast-out { animation: toastOut 0.3s ease forwards; }

/* Keyframes ongewijzigd */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) translateY(-8px); }
  to   { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}
@keyframes toastFlash {
  0%   { transform: scaleX(1); }
  12%  { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}
@keyframes toastContentIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes toastProgressFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* === Flash message === */
.flash-message {
  background: rgba(227,6,19,0.08); border: 1px solid rgba(227,6,19,0.2);
  color: var(--rse-red-dark); border-radius: var(--radius);
  padding: 12px 16px; font-size: 14px; font-weight: 600;
  margin-bottom: 20px;
}

/* === Empty state === */
.empty {
  padding: 30px 24px; text-align: center;
  color: var(--rse-muted); display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}
.empty p { font-size: 15px; }

/* === Admin page === */
.admin-main { max-width: 960px; margin: 40px auto; padding: 0 32px 80px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.admin-sidebar {
    display: flex;
    flex-direction: column;
}
.admin-sidebar-logo {
    margin-top: auto;        /* duwt naar onderkant sidebar */
    padding: 16px;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--rse-line-2);
}
.admin-sidebar-logo img {
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    display: block;
}
.admin-title { font-size: 36px; font-weight: 900; margin-bottom: 4px; }
.admin-card { padding: 0; overflow: hidden; }
.users-table { width: 100%; border-collapse: collapse; }
.users-table th {
  text-align: left; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--rse-muted); padding: 14px 20px;
  border-bottom: 1px solid var(--rse-line-2);
  background: var(--rse-bg);
}
.users-table td { padding: 14px 20px; border-bottom: 1px solid var(--rse-line-2); vertical-align: middle; }
.user-row { animation: rowFadeIn 0.4s ease both; }
@keyframes rowFadeIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.users-table tr:last-child td { border-bottom: none; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: white; flex-shrink: 0;
}
.user-name { font-weight: 700; font-size: 14px; }
.action-btns { display: flex; gap: 6px; }

/* ============================================================
   Admin layout — sidebar + content grid
   ============================================================ */

.admin-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
}

.admin-nav {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--rse-line-2);
    box-shadow: var(--shadow-sm);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-nav-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-nav-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rse-muted);
    padding: 4px 10px 8px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--rse-ink-2);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.admin-nav-link:hover {
    background: var(--rse-line-2);
    color: var(--rse-ink);
}

.admin-nav-link.is-active {
    background: var(--rse-red-light);
    color: var(--rse-red-dark);
}

.admin-nav-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: block;
}

.admin-nav-external {
    margin-left: auto;
    opacity: 0.4;
    width: 12px !important;
    height: 12px !important;
}

/* Content area override op admin-main behavior */
.admin-content {
    min-width: 0;
}

/* Admin-stats: gebruik bestaande stats-row maar tighter */
.admin-stats {
    margin-bottom: 32px;
}

.admin-section {
    margin-top: 40px;
}

.admin-section:first-of-type {
    margin-top: 0;
}

.admin-section-header {
    margin-bottom: 16px;
}

.admin-section-header .section-title {
    margin-bottom: 4px;
}

/* Online indicator (pulsing dot + tekst) */
.online-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: hsl(140, 60%, 35%);
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: hsl(140, 70%, 45%);
    box-shadow: 0 0 0 0 hsla(140, 70%, 45%, 0.5);
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    0%   { box-shadow: 0 0 0 0 hsla(140, 70%, 45%, 0.5); }
    70%  { box-shadow: 0 0 0 6px hsla(140, 70%, 45%, 0); }
    100% { box-shadow: 0 0 0 0 hsla(140, 70%, 45%, 0); }
}

/* Responsive: stack sidebar boven content op mobile */
@media (max-width: 960px) {
    .admin-layout {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-nav {
        padding: 12px;
    }

    .admin-nav-section {
        gap: 0;
    }
}
/* Inline rol-dropdown in users-tabel */
.role-form {
    display: inline-block;
}

.role-select {
    padding: 5px 28px 5px 10px;
    border-radius: 999px;
    border: 1.5px solid var(--rse-line);
    background: white;
    font-size: 12px;
    font-weight: 700;
    color: var(--rse-ink-2);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 6l5 5 5-5' stroke='%236B6B73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.role-select:focus,
.role-select:hover {
    border-color: var(--rse-red);
}

/* ============================================================
   Admin sync-cards
   ============================================================ */

.sync-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.sync-card {
    background: white;
    border: 1px solid var(--rse-line-2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.sync-card:hover {
    border-color: var(--rse-line);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.sync-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sync-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--rse-line-2);
    display: grid;
    place-items: center;
    color: var(--rse-ink-2);
}

.sync-card-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.sync-card-source {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rse-muted);
    padding: 3px 8px;
    background: var(--rse-line-2);
    border-radius: 999px;
}

.sync-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sync-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--rse-ink);
    margin: 0;
    line-height: 1.3;
}

.sync-card-description {
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.sync-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--rse-line-2);
    gap: 10px;
}

.sync-card-last-run {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
}

.sync-card-last-run svg {
    flex-shrink: 0;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .customer-items { grid-template-columns: repeat(2, 1fr); }
  .customer-layout { grid-template-columns: 300px 1fr; }
  h1 { font-size: 40px; }
  .hero-title { font-size: 40px; }
}
@media (max-width: 768px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .topbar-pill { display: none; }
  .crumbs { min-width: 0; overflow: hidden; }
  .crumbs a, .crumbs > span:not(.sep) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .hero-inner { padding: 0 16px; }
  .hero-actions-row { flex-wrap: wrap; }
  .stats-section, .customers-section { padding: 0 16px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .customer-items { grid-template-columns: 1fr 1fr; }
  .customer-layout { grid-template-columns: 1fr; }
  .customer-sidebar { position: static; }
  .customer-header-wrap { padding: 0 16px 24px; }
  .hero-title { font-size: 34px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
  .customer-main .customer-layout { padding: 0 16px; }
  .files-header { flex-wrap: wrap; }
  .admin-header { flex-wrap: wrap; gap: 12px; }
  .admin-card { overflow-x: auto; }
  .admin-main { margin: 24px auto; }
}
@media (max-width: 480px) {
  .customer-items { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .modal { width: 96vw; }
  .hero-title { font-size: 28px; }
  .letter-bar { gap: 3px; }
  .letter-btn { min-width: 30px; padding: 5px 7px; font-size: 12px; }
  .customer-header-main { flex-direction: column; }
  .customer-header-actions { padding-top: 0; flex-wrap: wrap; }
  .customer-name { font-size: 26px; }
  .article-row { flex-wrap: wrap; }
  .article-row-left { width: auto; flex-shrink: 1; }
  .article-row-meta { flex-direction: row; }
  .admin-main { padding: 0 16px 80px; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .articles-search-wrap { width: 100%; }
  .search-mini { width: 100%; }
  .search-mini input { flex: 1; width: 0; }
  .file-row-actions .btn { font-size: 0; padding: 8px; gap: 0; }
  .file-row-actions .btn svg { display: block; }
  #toast-container { bottom: 100px; right: 16px; left: 16px; }
}

/* === Animations utility === */
.fade-in  { animation: fadeIn 0.25s ease; }
.slide-in { animation: slideUpIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === Scrollbar fine-tune for body === */
body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-thumb { background: var(--rse-line); }
body::-webkit-scrollbar-thumb:hover { background: var(--rse-red); }

/* ============================================================
   Page transitions — landing ↔ customer
   ============================================================ */

/* --- Exit: landing → customer --- */
@keyframes cardLaunch {
  0%   { transform: scale(1);    box-shadow: var(--shadow); opacity: 1; }
  40%  { transform: scale(1.06); box-shadow: 0 20px 60px -10px rgba(227,6,19,0.35); opacity: 1; }
  100% { transform: scale(1.12) translateY(-8px); opacity: 0; }
}
@keyframes cardsFadeBlur {
  from { opacity: 1; filter: blur(0);    transform: scale(1)    translateY(0); }
  to   { opacity: 0; filter: blur(4px);  transform: scale(0.97) translateY(6px); }
}
@keyframes pageOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Dark overlay that sweeps in over the landing page on navigate */
body.page-leaving::after {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--rse-black);
  z-index: 9999;
  animation: pageOverlayIn 0.28s 0.2s cubic-bezier(0.4,0,1,1) both;
  pointer-events: none;
}

/* The card the user clicked — launches toward the viewer */
.customer-card.card-launching,
.customer-row.card-launching {
  animation: cardLaunch 0.42s cubic-bezier(0.4,0,0.6,1) forwards !important;
  z-index: 10;
  position: relative;
}

/* All OTHER cards blur-collapse */
body.page-leaving .customer-card:not(.card-launching),
body.page-leaving .customer-row:not(.card-launching),
body.page-leaving .hero-section,
body.page-leaving .stats-section,
body.page-leaving .customers-section .section-header {
  animation: cardsFadeBlur 0.3s cubic-bezier(0.4,0,1,1) forwards;
}
body.page-leaving .customers-section .section-header { animation-delay: 0ms; }
body.page-leaving .stats-section                     { animation-delay: 20ms; }
body.page-leaving .hero-section                      { animation-delay: 40ms; }


/* --- Enter: customer page --- */
@keyframes headerSwoop {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes logoPopIn {
  0%   { opacity: 0; transform: scale(0.55) rotate(-6deg); }
  60%  { opacity: 1; transform: scale(1.08) rotate(1deg); }
  80%  { transform: scale(0.97) rotate(0deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes nameFadeIn {
  from { opacity: 0; letter-spacing: 0.04em; }
  to   { opacity: 1; letter-spacing: -0.04em; }
}

/* Trigger only on customer-page body */
.customer-page .customer-header-wrap {
  animation: headerSwoop 0.55s cubic-bezier(0.16,1,0.3,1) both;
}
.customer-page .cust-logo.lg {
  animation: logoPopIn 0.65s 0.12s cubic-bezier(0.34,1.56,0.64,1) both;
}
.customer-page .customer-name {
  animation: nameFadeIn 0.5s 0.18s cubic-bezier(0.16,1,0.3,1) both;
}
.customer-page .customer-header-badges {
  animation: slideFromLeft 0.4s 0.1s cubic-bezier(0.16,1,0.3,1) both;
}
.customer-page .customer-header-actions {
  animation: slideFromRight 0.4s 0.15s cubic-bezier(0.16,1,0.3,1) both;
}

/* Sidebar cards stagger from left */
.customer-page .sidebar-card:nth-child(1) { animation: slideFromLeft 0.48s 0.18s cubic-bezier(0.16,1,0.3,1) both; }
.customer-page .sidebar-card:nth-child(2) { animation: slideFromLeft 0.48s 0.26s cubic-bezier(0.16,1,0.3,1) both; }
.customer-page .sidebar-card:nth-child(3) { animation: slideFromLeft 0.48s 0.34s cubic-bezier(0.16,1,0.3,1) both; }
.customer-page .sidebar-card:nth-child(4) { animation: slideFromLeft 0.48s 0.42s cubic-bezier(0.16,1,0.3,1) both; }
.customer-page .sidebar-card:nth-child(5) { animation: slideFromLeft 0.48s 0.50s cubic-bezier(0.16,1,0.3,1) both; }

/* Articles section slides from right */
.customer-page .customer-content {
  animation: slideFromRight 0.5s 0.22s cubic-bezier(0.16,1,0.3,1) both;
}

/* Back button subtle entrance */
.customer-page .back-btn {
  animation: slideFromLeft 0.4s 0.05s cubic-bezier(0.16,1,0.3,1) both;
}

/* ================================================================
   Files section
   ================================================================ */
.files-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--rse-line);
}

.files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--rse-line-2);
  background: var(--rse-card);
  margin-bottom: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.file-row:hover { border-color: var(--rse-line); box-shadow: var(--shadow-sm); }

.file-row-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--rse-line-2);
  display: grid; place-items: center;
  font-size: 9px; font-weight: 900; letter-spacing: 0.04em;
  color: var(--rse-muted);
  flex-shrink: 0;
  text-transform: uppercase;
}
.file-ext-pdf  { background: #fee2e2; color: #991b1b; }
.file-ext-doc, .file-ext-docx { background: #dbeafe; color: #1d4ed8; }
.file-ext-xls, .file-ext-xlsx { background: #dcfce7; color: #15803d; }
.file-ext-ppt, .file-ext-pptx { background: #ffedd5; color: #c2410c; }
.file-ext-zip, .file-ext-rar  { background: #f3e8ff; color: #7e22ce; }
.file-ext-txt, .file-ext-csv  { background: var(--rse-line-2); color: var(--rse-muted); }
.file-ext-jpg, .file-ext-jpeg,
.file-ext-png, .file-ext-gif,
.file-ext-webp { background: #fef9c3; color: #a16207; }

.file-row-body { flex: 1; min-width: 0; }
.file-row-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row-desc { font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row-meta { font-size: 12px; margin-top: 3px; }

.file-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* File upload drop zone */
.file-drop-zone {
  border: 2px dashed var(--rse-line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
}
.file-drop-zone:hover,
.file-drop-zone.drag-over { border-color: var(--rse-red); background: rgba(227,6,19,0.03); }
.file-drop-zone.drag-over { background: rgba(227,6,19,0.06); }

.file-drop-inner {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 20px;
  text-align: center;
}
.file-drop-label { font-weight: 700; font-size: 14px; color: var(--rse-ink-2); }
.file-drop-hint  { font-size: 12px; }
.file-input-hidden { display: none; }

.file-selected-info {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
}
.file-selected-name { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-footer { text-align: center; padding: 18px 0 14px; font-size: 11px; color: var(--rse-ink-3, #aaa); margin-top: auto; }
.app-footer a { color: inherit; text-decoration: none; }
.app-footer a:hover { text-decoration: underline; }

/* === Delete Confirmation Modal === */
.modal--confirm { width: min(380px, 92vw); overflow: hidden; }
.modal--confirm { will-change: transform; }
.delete-icon-zone {
  padding: 36px 28px 22px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
  position: relative; overflow: hidden;
}
.delete-icon-rings {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.delete-icon-ring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(227, 6, 19, 0.18);
  animation: deleteRingPulse 2.4s ease-in-out infinite;
}
.delete-icon-ring:nth-child(1) { width: 90px;  height: 90px;  animation-delay: 0s; }
.delete-icon-ring:nth-child(2) { width: 130px; height: 130px; animation-delay: 0.55s; }
.delete-icon-ring:nth-child(3) { width: 172px; height: 172px; animation-delay: 1.1s; }
@keyframes deleteRingPulse {
  0%, 100% { opacity: 0;   transform: scale(0.8); }
  40%       { opacity: 1;   transform: scale(1); }
  70%       { opacity: 0.3; transform: scale(1.05); }
}
.delete-icon-badge {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #E30613 0%, #9a0010 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(227, 6, 19, 0.4), 0 2px 8px rgba(227, 6, 19, 0.2);
  position: relative; z-index: 1;
  animation: deleteIconPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) 0.06s both;
}
@keyframes deleteIconPop {
  from { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1)   rotate(0deg);   opacity: 1; }
}
.delete-modal-content {
  padding: 2px 28px 4px; text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.delete-modal-title { font-size: 19px; font-weight: 800; color: var(--rse-black); line-height: 1.3; margin: 0; }
.delete-modal-subtitle { font-size: 14px; color: var(--rse-muted); line-height: 1.5; margin: 0; }
.delete-modal-subtitle {
    white-space: pre-line;
}
.delete-modal-warning {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 11px; font-weight: 800; color: var(--rse-red);
  text-transform: uppercase; letter-spacing: 0.07em; margin-top: 2px;
}
.delete-modal-footer { padding: 20px 28px 24px; display: flex; gap: 10px; }
.delete-modal-footer .btn { flex: 1; justify-content: center; }
.btn-danger-solid {
  background: linear-gradient(135deg, #E30613 0%, #b00010 100%);
  color: white; border-color: transparent;
  box-shadow: 0 4px 14px rgba(227, 6, 19, 0.32);
}
.btn-danger-solid:hover {
  background: linear-gradient(135deg, #c8050f 0%, #90000e 100%);
  box-shadow: 0 6px 18px rgba(227, 6, 19, 0.45);
  transform: translateY(-1px);
}
.btn-danger-solid:active { transform: translateY(0) scale(0.97); box-shadow: 0 2px 8px rgba(227, 6, 19, 0.3); }
.btn-danger-solid:disabled { opacity: 0.65; transform: none; cursor: not-allowed; box-shadow: none; }
.btn-spin-icon { animation: btnSpin 0.7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* === Contract expiry chips === */
.expiry-chip {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  vertical-align: middle;
}
.expiry-chip--warning { background: hsl(38,95%,90%); color: hsl(30,82%,34%); }
.expiry-chip--expired  { background: hsl(0,85%,93%);  color: hsl(0,68%,38%); }
.info-row--warning {
  background: hsl(38,95%,97%); border-radius: var(--radius-sm);
  margin: -6px; padding: 6px;
}

/* === Expiring contracts stat card === */
.stat-card--warning { border-color: hsl(38,80%,80%); background: hsl(38,95%,99%); }
.stat-icon--amber   { background: hsl(38,95%,90%); color: hsl(30,82%,34%); }
.stat-value--amber  { color: hsl(30,82%,34%); }

/* === Contacts card title row (title + button inline) === */
.card-title-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
.card-title-row .card-title { margin-bottom: 0; }

/* === Contact list items === */
.contact-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--rse-line);
}
.contact-item:last-child { border-bottom: none; }
.contact-item .contact-avatar {
  width: 32px; height: 32px; border-radius: 50%; font-size: 11px; font-weight: 800;
}
.contact-info { flex: 1; min-width: 0; }
.contact-item .contact-name { font-size: 13px; font-weight: 700; }
.contact-actions {
  display: flex; gap: 2px; flex-shrink: 0;
  opacity: 0; transition: opacity 0.15s;
}
.contact-item:hover .contact-actions { opacity: 1; }
.primary-badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.03em;
  background: var(--rse-red-light); color: var(--rse-red); margin-left: 6px;
  vertical-align: middle;
}

/* === Checkbox label === */
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
