/* Gedeelde portaalvormgeving.
 *
 * Overgenomen uit het User Management-prototype van Niels
 * (modules/users/outputs/index.html, import 26/08/2026) zodat beide modules
 * er hetzelfde uitzien. Wijzig hier, niet in een module.
 */


    :root {
      --ink: #202124;
      --muted: #6d7175;
      --line: #e4e5e6;
      --surface: #ffffff;
      --canvas: #f5f5f3;
      --brand: #f00046;
      --brand-dark: #20232a;
      --brand-deep: #a90058;
      --brand-soft: #fff0f5;
      --lime: #f00046;
      --amber: #a9640a;
      --amber-soft: #fff1d8;
      --blue: #2369a8;
      --blue-soft: #e8f2fb;
      --red: #b13e36;
      --shadow: 0 16px 42px rgba(23, 35, 29, .08);
      --radius: 18px;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--ink);
      background: var(--canvas);
    }
    * { box-sizing: border-box; }
    body { margin: 0; min-width: 320px; background: var(--canvas); }
    button, input, select, textarea { font: inherit; }
    button { cursor: pointer; }
    button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(13,107,79,.2); outline-offset: 2px; }
    .app { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
    .sidebar { background: linear-gradient(165deg, #20232a 0%, #17191f 72%, #450025 150%); color: #fff; padding: 28px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
    .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; font-weight: 850; letter-spacing: -.055em; font-size: 25px; text-transform: lowercase; }
    .brand-mark { width: 39px; height: 39px; border-radius: 11px; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(240,0,70,.25)); }
    .brand-x { color: var(--brand); }
    .nav-label { margin: 12px 10px 8px; color: #9fc4b6; font-size: 11px; text-transform: uppercase; letter-spacing: .11em; font-weight: 700; }
    .nav { display: grid; gap: 5px; }
    .nav button { width: 100%; border: 0; color: #d9ebe4; background: transparent; border-radius: 11px; padding: 11px 12px; display: flex; align-items: center; gap: 11px; text-align: left; }
    .nav button:hover { background: rgba(255,255,255,.07); }
    .nav button.active { color: #fff; background: rgba(255,255,255,.12); }
    .nav svg { width: 18px; height: 18px; flex: none; }
    .side-foot { margin-top: auto; padding: 16px 10px 4px; border-top: 1px solid rgba(255,255,255,.13); }
    .side-customer { display: flex; gap: 10px; align-items: center; }
    .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--brand); flex: none; }
    .side-customer strong { display: block; font-size: 13px; font-weight: 650; }
    .side-customer span { display: block; margin-top: 2px; font-size: 11px; color: #9fc4b6; }
    .main { min-width: 0; }
    .topbar { height: 76px; padding: 0 38px; display: flex; justify-content: space-between; align-items: center; background: rgba(244,246,242,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
    .crumb { color: var(--muted); font-size: 13px; }
    .top-actions { display: flex; align-items: center; gap: 10px; }
    .icon-btn { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--ink); }
    .icon-btn svg { width: 17px; }
    .profile { display: flex; align-items: center; gap: 10px; margin-left: 5px; }
    .profile .avatar { background: var(--brand); color: #fff; }
    .profile strong { display: block; font-size: 13px; }
    .profile span { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
    .content { max-width: 1220px; margin: 0 auto; padding: 38px; }
    .view { display: none; animation: enter .24s ease-out; }
    .view.active { display: block; }
    @keyframes enter { from { opacity: 0; transform: translateY(5px); } }
    .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 27px; }
    h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; letter-spacing: -.04em; margin: 0; font-weight: 760; }
    h2 { font-size: 20px; letter-spacing: -.02em; margin: 0; }
    h3 { font-size: 16px; margin: 0; }
    .page-head p, .section-head p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
    .primary, .secondary, .ghost, .danger { border-radius: 11px; min-height: 42px; padding: 0 16px; font-weight: 700; border: 1px solid transparent; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
    .primary { background: var(--brand); color: #fff; }
    .primary:hover { background: var(--brand-dark); }
    .secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
    .secondary:hover, .ghost:hover { background: #eef2ed; }
    .ghost { background: transparent; color: var(--ink); }
    .danger { background: #fff; color: var(--red); border-color: #efcac6; }
    .primary svg, .secondary svg, .ghost svg { width: 17px; height: 17px; }
    .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
    .stat { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
    .stat-top { display: flex; align-items: center; justify-content: space-between; }
    .stat-label { font-size: 13px; color: var(--muted); font-weight: 650; }
    .stat-icon { width: 35px; height: 35px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
    .stat-icon svg { width: 17px; }
    .stat-value { font-size: 32px; font-weight: 780; letter-spacing: -.04em; margin-top: 10px; }
    .stat-note { color: var(--muted); font-size: 12px; margin-top: 4px; }
    .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(23,35,29,.02); }
    .section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
    .panel-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
    .filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .search { height: 38px; min-width: 210px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 12px; color: var(--ink); }
    .filter-select { height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 30px 0 11px; color: var(--ink); }
    .table-wrap { overflow-x: auto; }
    table { width: 100%; border-collapse: collapse; }
    th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; padding: 12px 22px; text-align: left; background: #fafbf9; white-space: nowrap; }
    td { padding: 16px 22px; border-top: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
    tbody tr { transition: background .15s; }
    tbody tr:hover { background: #fafcf9; }
    .person { display: flex; align-items: center; gap: 11px; min-width: 180px; }
    .person-avatar { width: 36px; height: 36px; border-radius: 12px; color: var(--brand); background: var(--brand-soft); font-weight: 800; display: grid; place-items: center; flex: none; }
    .person strong { display: block; font-size: 13px; }
    .person span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
    .status { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 6px 9px; font-size: 11px; font-weight: 750; white-space: nowrap; }
    .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
    .status.new { color: var(--blue); background: var(--blue-soft); }
    .status.progress { color: var(--amber); background: var(--amber-soft); }
    .status.waiting { color: #6d548f; background: #f0eafb; }
    .status.done { color: var(--brand); background: var(--brand-soft); }

    /* Generieke badge voor waarden die niet in de vaste status-enum passen
       (bijv. confidence-niveaus, issue-tags): dezelfde vormtaal als .status,
       maar met een neutrale/ok/warn/danger-as in plaats van new/progress/
       waiting/done. Ontbrak hier tot 26/08/2026 -- .pill werd in beide
       modules gebruikt maar had nergens CSS, dus die badges waren onopgemaakte
       platte tekst. */
    .pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 10px; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--canvas); color: var(--muted); border: 1px solid var(--line); }
    .pill.ok { color: var(--brand); background: var(--brand-soft); border-color: transparent; }
    .pill.warn { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
    .pill.danger { color: var(--red); background: #fbeaea; border-color: transparent; }

    /* Zelfde verhaal als .pill: gebruikt in de assetmodule voor gedimde
       tekst, maar --muted was alleen een kleurvariabele, geen klasse. */
    .muted { color: var(--muted); }

    /* Uitlegkader naast een formulier, bijv. "Wat gebeurt er daarna?".
       Hergebruikt de .step-number-stijl uit het klantaanmaak-formulier. */
    .sidebar-help { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
    .sidebar-help h3 { margin: 0 0 14px; font-size: 15px; }
    .sidebar-help ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
    .sidebar-help li { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
    .sidebar-help li span.step-number { margin-top: 1px; }
    .sidebar-help p.hint { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
    .table-action { border: 0; background: transparent; color: var(--brand); font-weight: 750; padding: 6px 0; }
    .table-action:hover { text-decoration: underline; }
    .empty { text-align: center; padding: 50px 20px; color: var(--muted); display: none; }
    .empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 5px; }
    .form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
    .form-panel { padding: 28px; }
    .form-section { padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
    .form-section:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
    .form-section-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
    .step-number { width: 27px; height: 27px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
    .form-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
    .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
    .field.full { grid-column: 1 / -1; }
    label { display: block; font-weight: 680; font-size: 12px; margin-bottom: 7px; }
    .required { color: var(--red); }
    input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #d7ded8; border-radius: 10px; padding: 10px 12px; min-height: 42px; }
    textarea { min-height: 92px; resize: vertical; }
    input::placeholder, textarea::placeholder { color: #9ba49d; }
    .hint { color: var(--muted); font-size: 11px; margin-top: 6px; }
    .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .check { position: relative; }
    .check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
    .check label { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
    .check label::before { content: ""; width: 17px; height: 17px; border: 1.5px solid #abb6ad; border-radius: 5px; flex: none; }
    .check input:checked + label { border-color: var(--brand); background: var(--brand-soft); }
    .check input:checked + label::before { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 4px var(--brand-soft); }
    .form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
    .aside-card { position: sticky; top: 98px; padding: 20px; }
    .aside-card h3 { margin-bottom: 13px; }
    .aside-list { display: grid; gap: 15px; }
    .aside-item { display: flex; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
    .aside-item span:first-child { width: 22px; height: 22px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); display: grid; place-items: center; font-weight: 800; flex: none; }
    .aside-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
    .modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(7, 24, 17, .55); display: none; align-items: center; justify-content: center; padding: 20px; }
    .modal-backdrop.open { display: flex; }
    .modal { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
    .modal-head { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
    .modal-head p { color: var(--muted); font-size: 12px; margin: 5px 0 0; }
    .close { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 19px; }
    .modal-body { padding: 24px; }
    .detail-person { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
    .detail-person .person-avatar { width: 48px; height: 48px; font-size: 15px; }
    .detail-person h2 { font-size: 22px; }
    .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
    .detail { padding: 13px 0; border-bottom: 1px solid var(--line); }
    .detail span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
    .detail strong { font-size: 13px; font-weight: 650; }
    .timeline { margin-top: 25px; }
    .timeline h3 { margin-bottom: 14px; }
    .timeline-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding-bottom: 17px; position: relative; }
    .timeline-row:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 23px; bottom: 0; width: 1px; background: var(--line); }
    .timeline-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 900; z-index: 1; }
    .timeline-row.pending .timeline-dot { background: #eef1ee; color: #98a29a; }
    .timeline-row strong { font-size: 12px; display: block; }
    .timeline-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
    .timeline-row time { color: var(--muted); font-size: 11px; }
    .modal-actions { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
    .modal-actions > div { display: flex; flex-wrap: wrap; gap: 10px; }
    .toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; background: var(--ink); color: #fff; padding: 14px 17px; border-radius: 12px; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .24s ease; font-size: 13px; }
    .toast.show { transform: translateY(0); opacity: 1; }
    .success-screen { text-align: center; padding: 55px 24px; }
    .success-mark { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 18px; color: var(--brand); background: var(--brand-soft); font-size: 26px; }
    .success-screen h2 { font-size: 26px; }
    .success-screen p { color: var(--muted); line-height: 1.55; max-width: 510px; margin: 10px auto 22px; }
    .ticket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 430px; margin: 0 auto 24px; text-align: left; }
    .ticket { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
    .ticket span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
    .ticket strong { display: block; margin-top: 5px; font-size: 13px; }
    .mobile-menu { display: none; }
    .role-switch { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
    .role-switch button { min-height: 31px; border: 0; background: transparent; border-radius: 8px; padding: 0 10px; color: var(--muted); font-size: 11px; font-weight: 750; }
    .role-switch button.active { background: var(--brand-dark); color: #fff; }
    .notification-wrap { position: relative; }
    .alert-btn { position: relative; font-size: 18px; font-weight: 900; }
    .alert-badge { position: absolute; right: -4px; top: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: #fff; border: 2px solid var(--canvas); font-size: 9px; font-weight: 800; }
    .notification-popover { display: none; position: absolute; right: 0; top: 47px; width: min(360px, calc(100vw - 35px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; z-index: 120; }
    .notification-popover.open { display: block; }
    .notification-head { padding: 16px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
    .notification-head button { border: 0; color: var(--brand); background: transparent; font-size: 11px; font-weight: 750; }
    .notification-list { max-height: 340px; overflow-y: auto; }
    .notification-item { padding: 14px 17px; display: grid; grid-template-columns: 26px 1fr; gap: 10px; border-bottom: 1px solid var(--line); }
    .notification-item:last-child { border-bottom: 0; }
    .notification-item.unread { background: var(--brand-soft); }
    .notice-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 12px; font-weight: 900; }
    .notification-item strong { display: block; font-size: 12px; }
    .notification-item p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
    .notification-item time { display: block; color: #999; font-size: 10px; margin-top: 5px; }
    .admin-only { display: none; }
    .nav button.admin-only { display: none !important; }
    body.admin-mode .admin-only { display: block; }
    body.admin-mode .nav button.admin-only { display: flex !important; }
    body.admin-mode .customer-only { display: none !important; }
    .contact-person { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; }
    .contact-person span { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 850; }
    .contact-person.unassigned { color: var(--muted); font-weight: 650; }
    .contact-person.unassigned span { color: #7e8881; background: #eef1ee; }
    .admin-kicker { color: var(--brand); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 800; margin-bottom: 8px; }
    .customer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .customer-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); text-align: left; }
    .customer-card:hover { border-color: var(--brand); transform: translateY(-1px); }
    .customer-card-top { display: flex; justify-content: space-between; gap: 10px; }
    .customer-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); font-weight: 850; }
    .customer-card h3 { margin-top: 14px; }
    .customer-card p { margin: 4px 0 13px; color: var(--muted); font-size: 11px; }
    .customer-metrics { display: flex; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
    .customer-metrics strong { display: block; font-size: 14px; }
    .customer-metrics span { color: var(--muted); font-size: 10px; }
    .config-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 18px; align-items: start; }
    .customer-selector { padding: 16px; }
    .customer-selector h3 { margin-bottom: 12px; }
    .customer-option { width: 100%; padding: 11px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
    .customer-option:hover { background: #f7f7f5; }
    .customer-option.active { background: var(--brand-soft); color: var(--brand); }
    .customer-option span:first-child { width: 29px; height: 29px; border-radius: 9px; background: #ececea; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
    .customer-option.active span:first-child { background: var(--brand); color: #fff; }
    .customer-option strong { display: block; font-size: 12px; }
    .customer-option small { display: block; color: var(--muted); margin-top: 2px; }
    .config-main { min-width: 0; }
    .config-toolbar { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
    .config-tabs { display: flex; gap: 6px; }
    .config-tab { border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
    .config-tab.active { background: var(--brand-dark); color: #fff; }

    /* Instellingenscherm: twee tabrijen (categorie, dan sectie eronder).
       Voorstel Miguel 26/08/2026, structuur naar de servicedesk-planning-app
       maar in de eigen vormtaal van dit portaal (zelfde recept als
       .config-tab hierboven, niet hun stijl). */
    .settings-groups { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); margin-bottom: 16px; }
    .settings-group { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
    .settings-group:hover { background: #f2f3f1; }
    .settings-group.active { background: var(--brand-dark); color: #fff; }
    .settings-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
    .settings-tab { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; }
    .settings-tab:hover { border-color: #c9cec9; }
    .settings-tab.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }
    .profile-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #fafafa; }
    .profile-tab { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: var(--surface); text-align: left; }
    .profile-tab.active { border-color: var(--brand); background: var(--brand-soft); }
    .profile-tab strong { display: block; font-size: 12px; }
    .profile-tab span { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; margin-top: 3px; }
    .config-pane { display: none; padding: 20px; }
    .config-pane.active { display: block; }
    .config-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 16px; }
    .config-intro p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
    .config-subsection { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 18px 0 10px; }
    .config-subsection strong { font-size: 13px; }
    .config-subsection span { color: var(--muted); font-size: 11px; }
    .assign-list { display: grid; gap: 8px; }
    .assign-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
    .assign-row.disabled { opacity: .62; background: #fafafa; }
    .drag { color: #a6aaa7; font-size: 17px; text-align: center; }
    .assign-row strong { display: block; font-size: 12px; }
    .assign-row small { display: block; color: var(--muted); margin-top: 3px; }
    .switch { position: relative; width: 38px; height: 22px; }
    .switch input { opacity: 0; width: 1px; height: 1px; position: absolute; }
    .switch span { position: absolute; inset: 0; border-radius: 11px; background: #d7dad7; transition: .18s; }
    .switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
    .switch input:checked + span { background: var(--brand); }
    .switch input:checked + span::after { transform: translateX(16px); }
    .small-action { border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; padding: 7px; }
    .small-action:hover { color: var(--red); }
    .config-actions { display: inline-flex; align-items: center; gap: 6px; }
    .catalog-section + .catalog-section { margin-top: 26px; }
    .catalog-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
    .product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
    .product-item { padding: 12px; border: 1px solid var(--line); border-radius: 11px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; }
    .catalog-actions { grid-column: 2 / -1; justify-self: start; }
    .product-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
    .product-item strong { display: block; font-size: 12px; }
    .product-item small { display: block; color: var(--muted); margin-top: 3px; }
    .inline-builder { display: none; padding: 16px; margin-bottom: 14px; border-radius: 12px; background: #f8f8f6; border: 1px solid var(--line); }
    .inline-builder.open { display: block; }
    .builder-grid { display: grid; grid-template-columns: 1.4fr .8fr .6fr auto; gap: 10px; align-items: end; }
    .builder-grid label { margin-bottom: 5px; }
    .builder-grid input, .builder-grid select { min-height: 39px; }
    .dynamic-fields { margin-top: 0; }
    .choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .choice-card { position: relative; }
    .choice-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
    .choice-card label { margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; display: flex; gap: 10px; align-items: center; cursor: pointer; }
    .choice-card label span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #f0f1ef; color: var(--brand); font-weight: 800; }
    .choice-card label strong { display: block; font-size: 12px; }
    .choice-card label small { display: block; color: var(--muted); margin-top: 2px; }
    .choice-card input:checked + label { border-color: var(--brand); background: var(--brand-soft); }
    .offboarding-banner { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 16px; margin-bottom: 22px; border: 1px solid #f2c3d1; border-radius: 14px; background: var(--brand-soft); }
    .offboarding-banner img { width: 56px; height: 56px; object-fit: contain; }
    .offboarding-banner strong { display: block; }
    .offboarding-banner p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
    .radio-stack { display: grid; gap: 8px; }
    .radio-option { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
    .radio-option input { width: 16px; min-height: 16px; margin-top: 1px; accent-color: var(--brand); }
    .radio-option span { font-size: 12px; line-height: 1.4; }
    .request-type { display: inline-flex; padding: 5px 8px; border-radius: 7px; font-size: 10px; font-weight: 800; white-space: nowrap; }
    .request-type.onboard { background: var(--blue-soft); color: var(--blue); }
    .request-type.offboard { background: var(--brand-soft); color: var(--brand-deep); }
    .employee-state { display: grid; gap: 5px; justify-items: start; }
    .action-group { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
    .offboard-action { color: var(--brand-deep); }
    .offboard-action[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
    .success-mark.offboard { color: #fff; background: linear-gradient(135deg,var(--brand),var(--brand-deep)); }
    .field-note { padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); color: var(--muted); font-size: 11px; line-height: 1.5; margin-bottom: 12px; }
    .page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
    .customer-modal { width: min(880px,100%); }
    .logo-upload { display: grid; grid-template-columns: 76px 1fr; gap: 15px; align-items: center; }
    .logo-preview { width: 76px; height: 76px; border-radius: 16px; display: grid; place-items: center; object-fit: contain; background: #f0f1ef; border: 1px solid var(--line); color: var(--muted); font-weight: 800; }
    .repeat-section { margin-top: 25px; }
    .repeat-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 11px; }
    .repeat-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
    .repeat-list { display: grid; gap: 9px; }
    .location-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
    .user-row { display: grid; grid-template-columns: 1fr 1.25fr 1fr 1fr auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
    .user-row input, .user-row select, .location-row input { min-height: 39px; }
    .remove-row { width: 36px; height: 36px; border: 0; border-radius: 9px; background: #f4f4f2; color: var(--red); font-weight: 800; }
    .access-badge { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 7px; color: var(--brand-deep); background: var(--brand-soft); font-size: 10px; font-weight: 750; }
    .customer-logo img, .customer-option img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
    @media (max-width: 760px) { .user-row { grid-template-columns: 1fr; } .user-row .remove-row { justify-self: end; } .logo-upload { grid-template-columns: 1fr; } }
    @media (max-width: 900px) { .customer-grid { grid-template-columns: 1fr 1fr; } .config-layout { grid-template-columns: 1fr; } .customer-selector { display: flex; gap: 5px; overflow-x: auto; } .customer-selector h3 { display:none; } .customer-option { min-width: 180px; } }
    @media (max-width: 660px) { .role-switch { display:none; } .customer-grid, .product-grid, .choice-grid, .builder-grid, .profile-tabs { grid-template-columns: 1fr; } .config-toolbar, .config-intro { align-items: stretch; flex-direction: column; } .assign-row { grid-template-columns: 26px 1fr auto; } .assign-row .small-action { grid-column: 2 / -1; justify-self: start; } }
    @media (max-width: 900px) {
      .app { grid-template-columns: 1fr; }
      .sidebar { position: fixed; z-index: 80; width: 248px; transform: translateX(-100%); transition: transform .22s; }
      .sidebar.open { transform: translateX(0); }
      .mobile-menu { display: grid; }
      .topbar { padding: 0 20px; }
      .content { padding: 28px 20px; }
      .form-layout { grid-template-columns: 1fr; }
      .aside-card { position: static; }
    }
    @media (max-width: 660px) {
      .profile div:last-child { display: none; }
      .page-head { flex-direction: column; }
      .page-head .primary { width: 100%; }
      .stats { grid-template-columns: 1fr; }
      .fields, .checks, .detail-grid, .ticket-grid { grid-template-columns: 1fr; }
      .field.full { grid-column: auto; }
      .form-panel { padding: 20px; }
      .panel-head { align-items: stretch; flex-direction: column; }
      .filters { display: grid; grid-template-columns: 1fr; }
      .search { min-width: 0; }
      .topbar .crumb { display: none; }
      .modal-actions { flex-direction: column-reverse; }
      .modal-actions > div { display: flex; gap: 8px; }
      .modal-actions button { flex: 1; }
    }
