:root {
    --s360-bg: #f4f6fb;
    --s360-surface: #ffffff;
    --s360-surface-soft: #f8f9fd;
    --s360-text: #182338;
    --s360-muted: #6b7894;
    --s360-primary: #2f6fed;
    --s360-primary-dark: #1f54bc;
    --s360-secondary: #7f5bff;
    --s360-warning: #f1ad12;
    --s360-success: #27b787;
    --s360-border: #e2e8f4;
    --s360-slate-50: #f8fafc;
    --s360-slate-100: #f1f5f9;
    --s360-slate-200: #e2e8f0;
    --s360-slate-400: #94a3b8;
    --s360-slate-500: #64748b;
    --s360-slate-600: #475569;
    --s360-slate-700: #334155;
    --s360-slate-800: #1e293b;
    --s360-slate-900: #0f172a;
    --s360-page-bg: var(--s360-bg);
    --s360-radius-card: 12px;
    --s360-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* —— Gedeelde UI (overal te gebruiken) —— */

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #d5deef;
    color: #355078;
    font-size: 0.72rem;
    font-weight: 700;
    background: #f8faff;
    cursor: help;
    line-height: 1;
    user-select: none;
    vertical-align: middle;
}

.label-with-info .info-icon {
    flex-shrink: 0;
}

.status-chip {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid #dbe4f4;
    background: #f8faff;
    color: #34445c;
}

.status-chip.ok {
    color: #0f6d3f;
    border-color: #bae6ce;
    background: #effcf4;
}

.status-chip.warn {
    color: #8a5712;
    border-color: #f8d7a8;
    background: #fff9ef;
}

.status-chip.error {
    color: #9f1239;
    border-color: #fecdd3;
    background: #fff1f2;
}

.s360-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.s360-panel {
    border: 1px solid #e1e8f5;
    border-radius: 14px;
    background: var(--s360-slate-50);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.s360-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.s360-panel-title-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.s360-panel-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.s360-panel-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.s360-panel-title-row .s360-panel-title {
    min-width: 0;
}

/* Platformlogo naast titel (accountkoppelingen) */
.s360-platform-connect-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--s360-slate-200);
    background: #fff;
    color: var(--s360-slate-700);
}

.s360-platform-connect-logo svg {
    display: block;
}

.s360-platform-connect-logo__letter {
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    color: inherit;
}

.s360-platform-connect-logo--linkedin {
    color: #0a66c2;
    border-color: #bfdbfe;
    background: #f0f7ff;
}

.s360-platform-connect-logo--facebook {
    color: #1877f2;
    border-color: #c7d2fe;
    background: #eef2ff;
}

.s360-platform-connect-logo--instagram {
    color: #c026d3;
    border-color: #fbcfe8;
    background: #fdf2f8;
}

.s360-platform-connect-logo--x {
    color: #0f172a;
    border-color: #e5e7eb;
    background: #fafafa;
}

.s360-platform-connect-logo--youtube {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

.s360-platform-connect-logo--wordpress {
    color: #21759b;
    border-color: #d1d5db;
    background: #f0f9fc;
}

.s360-platform-connect-logo--office365 {
    color: #0078d4;
    border-color: #bfdbfe;
    background: #f0f7ff;
}

.s360-platform-connect-logo--google-workspace,
.s360-platform-connect-logo--google-analytics,
.s360-platform-connect-logo--google-business-profile {
    border-color: #e2e8f0;
    background: #fff;
    color: #4285f4;
}

.s360-platform-connect-logo--openai-mcp {
    color: #047857;
    border-color: #bbf7d0;
    background: #ecfdf5;
}

.s360-platform-connect-logo--bluesky {
    color: #0284c7;
    border-color: #bae6fd;
    background: #f0f9ff;
}

.s360-platform-connect-logo--pinterest {
    color: #bd081c;
    border-color: #fecaca;
    background: #fff1f2;
}

.s360-platform-connect-logo--mailchimp {
    color: #241c15;
    border-color: #e7e5e4;
    background: #fffbeb;
}

/* Platformkolommen accountkoppelingen — zelfde taal als sidebar .menu-card */
.s360-panel.s360-panel--menu {
    border-radius: 10px;
    padding: 12px;
    gap: 10px;
}

.s360-panel-tint--social {
    background: #f5f9ff;
    border-color: #d8e8ff;
}

.s360-panel-tint--video {
    background: #fef2f2;
    border-color: #fecaca;
}

.s360-panel-tint--platform {
    background: #f7fbff;
    border-color: #d8e8f6;
}

.s360-panel-tint--build {
    background: #f0f9f0;
    border-color: #cde9d4;
}

.s360-panel-tint--insight {
    background: #f5f3ff;
    border-color: #e4dcff;
}

.s360-panel-tint--issues {
    background: #fff5eb;
    border-color: #f3dfc2;
}

.s360-panel-tint--neutral {
    background: var(--s360-surface-soft);
    border-color: var(--s360-border);
}

.s360-connect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid #d4deef;
    padding: 6px 10px;
    color: #1d3a6a;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    background: #f9fbff;
}

.s360-connect-btn.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.s360-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--s360-slate-200);
    background: var(--s360-surface);
    color: var(--s360-slate-600);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.s360-icon-btn:hover {
    background: var(--s360-slate-50);
    border-color: #cbd5e1;
    color: var(--s360-slate-900);
}

.s360-icon-btn--danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.s360-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.s360-inline-toggle__label {
    font-size: 0.78rem;
    color: var(--s360-slate-500);
    font-weight: 500;
}

.s360-switch {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #e2e8f0;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, border-color 0.15s;
}

.s360-switch.is-on {
    background: #c7d2fe;
    border-color: #a5b4fc;
}

.s360-switch__knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s;
    pointer-events: none;
}

.s360-switch.is-on .s360-switch__knob {
    transform: translateX(20px);
}

/* —— Accountkoppelingen: kaarten —— */

.conn-card {
    position: relative;
    border: 1px solid var(--s360-slate-200);
    border-radius: 14px;
    background: var(--s360-surface);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.conn-card__top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 14px 12px;
}

.conn-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--s360-slate-200);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--s360-slate-700);
    background: var(--s360-surface);
}

.conn-card__badge svg {
    flex-shrink: 0;
}

.conn-card__badge--linkedin {
    border-color: #bfdbfe;
    color: #0a66c2;
    background: #f0f7ff;
}

.conn-card__badge--facebook {
    border-color: #c7d2fe;
    color: #1877f2;
    background: #eef2ff;
}

.conn-card__badge--instagram {
    border-color: #fbcfe8;
    color: #c026d3;
    background: #fdf2f8;
}

.conn-card__badge--x {
    border-color: #e5e7eb;
    color: #111;
    background: #fafafa;
}

.conn-card__badge--wordpress {
    border-color: #d1d5db;
    color: #21759b;
    background: #f0f9fc;
}

.conn-card__badge--youtube {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}

.conn-card__badge--default {
    border-color: var(--s360-slate-200);
    color: var(--s360-slate-600);
    background: var(--s360-slate-50);
}

.conn-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    border: 2px solid #e0f2fe;
    text-transform: uppercase;
}

.conn-avatar--linkedin {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-color: #bae6fd;
}

.conn-avatar--facebook {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #bfdbfe;
}

.conn-avatar--instagram {
    background: linear-gradient(135deg, #ec4899 0%, #9333ea 100%);
    border-color: #f9a8d4;
}

.conn-avatar--x {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #cbd5e1;
}

.conn-avatar--wordpress {
    background: linear-gradient(135deg, #21759b 0%, #135e96 100%);
    border-color: #93c5fd;
}

.conn-avatar--youtube {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-color: #fecaca;
}

.conn-avatar--default {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border-color: var(--s360-slate-200);
}

.conn-card__body {
    min-width: 0;
    flex: 1;
}

.conn-card__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--s360-slate-900);
    line-height: 1.25;
}

.conn-card__meta {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--s360-slate-500);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.conn-card__meta svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.conn-card__by {
    margin: 6px 0 0;
    font-size: 0.75rem;
    color: var(--s360-slate-400);
}

.conn-card__divider {
    height: 1px;
    background: #e8edf4;
    margin: 0;
}

.conn-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px 12px;
}

.conn-expiry {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.conn-expiry--ok {
    color: #15803d;
}

.conn-expiry--ok svg {
    color: #22c55e;
}

.conn-expiry--warn {
    color: #b45309;
}

.conn-expiry--muted {
    color: var(--s360-slate-400);
    font-weight: 500;
}

.conn-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.conn-card__error {
    padding: 0 14px 8px;
    font-size: 0.72rem;
    color: #b42318;
}

.conn-card__wp {
    padding: 0 14px 8px;
    font-size: 0.72rem;
    color: var(--s360-slate-500);
}

.conn-card details {
    border-top: 1px solid var(--s360-slate-100);
    padding: 10px 14px 12px;
    font-size: 0.8rem;
}

.conn-card details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--s360-slate-600);
}

@media (max-width: 520px) {
    .conn-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .conn-actions {
        margin-left: 0;
        justify-content: flex-end;
    }
}

/* Accountkoppelingen: max. 3 platformkolommen; smallere gaps */
.s360-grid-cards--connections {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 900px) {
    .s360-grid-cards--connections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .s360-grid-cards--connections {
        grid-template-columns: 1fr;
    }
}

.s360-grid-cards--connections .s360-panel-title-stack {
    gap: 3px;
}

.s360-grid-cards--connections .s360-panel-head {
    gap: 4px;
    flex-wrap: wrap;
}

.s360-grid-cards--connections .s360-panel.s360-panel--menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    padding: 6px 7px;
    gap: 6px;
    border-radius: 8px;
}

/* Paneelkop altijd over beide kolommen */
.s360-grid-cards--connections .s360-panel.s360-panel--menu > .s360-panel-head {
    grid-column: 1 / -1;
}

/* Eén koppelkaart: volle breedte i.p.v. half lege kolom */
.s360-grid-cards--connections .s360-panel.s360-panel--menu > article.conn-card:only-of-type {
    grid-column: 1 / -1;
}

.s360-grid-cards--connections .s360-panel-title-row {
    gap: 6px;
}

.s360-grid-cards--connections .s360-platform-connect-logo {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.s360-grid-cards--connections .s360-platform-connect-logo svg {
    width: 14px;
    height: 14px;
}

.s360-grid-cards--connections .s360-platform-connect-logo__letter {
    font-size: 0.72rem;
}

.s360-grid-cards--connections .s360-panel-title {
    font-size: 0.75rem;
}

.s360-grid-cards--connections .status-chip {
    font-size: 0.62rem;
    padding: 2px 6px;
}

.s360-grid-cards--connections .s360-connect-btn {
    padding: 3px 7px;
    font-size: 0.68rem;
    border-radius: 6px;
}

.s360-grid-cards--connections .conn-card {
    border-radius: 9px;
}

.s360-grid-cards--connections .conn-card__top {
    gap: 6px;
    padding: 7px 8px 6px;
}

.s360-grid-cards--connections .conn-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
    border-width: 1px;
}

.s360-grid-cards--connections .conn-card__name {
    font-size: 0.78rem;
}

.s360-grid-cards--connections .conn-card__meta {
    margin-top: 2px;
    font-size: 0.68rem;
    gap: 4px;
}

.s360-grid-cards--connections .conn-card__meta svg {
    width: 11px;
    height: 11px;
}

.s360-grid-cards--connections .conn-card__by {
    margin-top: 3px;
    font-size: 0.65rem;
}

.s360-grid-cards--connections .conn-card__footer {
    padding: 6px 8px 7px;
    gap: 6px;
}

.s360-grid-cards--connections .conn-expiry {
    font-size: 0.68rem;
    gap: 4px;
}

.s360-grid-cards--connections .conn-expiry--ok svg {
    width: 12px;
    height: 12px;
}

.s360-grid-cards--connections .s360-inline-toggle {
    gap: 4px;
}

.s360-grid-cards--connections .s360-inline-toggle__label {
    font-size: 0.69rem;
}

.s360-grid-cards--connections .s360-switch {
    width: 32px;
    height: 18px;
}

.s360-grid-cards--connections .s360-switch__knob {
    width: 14px;
    height: 14px;
    top: 1px;
    left: 2px;
}

.s360-grid-cards--connections .s360-switch.is-on .s360-switch__knob {
    transform: translateX(14px);
}

.s360-grid-cards--connections .s360-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.s360-grid-cards--connections .s360-icon-btn svg {
    width: 14px;
    height: 14px;
}

.s360-grid-cards--connections .conn-actions {
    gap: 4px;
}

.s360-grid-cards--connections .conn-card__error,
.s360-grid-cards--connections .conn-card__wp {
    padding: 0 8px 5px;
    font-size: 0.65rem;
}

.s360-grid-cards--connections .conn-card details {
    padding: 6px 8px 8px;
    font-size: 0.72rem;
}

/* —— Dashboard & algemene kaart-grids —— */

.s360-grid-cards--sm {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.s360-grid-cards--md {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.s360-grid-cards--kanban {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.s360-grid-cards--rag {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.s360-hero {
    border: 1px solid var(--s360-border);
    border-radius: 14px;
    background: var(--s360-surface);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.s360-hero h1 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.s360-stat-tile {
    border: 1px solid #e5ebf7;
    border-radius: 12px;
    padding: 12px;
    background: var(--s360-surface-soft);
}

.s360-stat-tile .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--s360-muted);
    margin: 0 0 4px;
}

.s360-stat-tile .value {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    color: var(--s360-slate-900);
}

.s360-module-card {
    border: 1px solid var(--s360-border);
    border-radius: 12px;
    padding: 12px;
    background: var(--s360-surface);
}

.s360-module-card h2 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.s360-module-card p {
    margin: 0 0 10px;
    color: var(--s360-muted);
    font-size: 0.88rem;
}

/* —— App-shell: zelfde taal als sidebar (main, kaarten, formulieren, tabellen) —— */

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    background: var(--s360-page-bg);
    color: var(--s360-text);
    -webkit-font-smoothing: antialiased;
}

.shell {
    width: min(1320px, 96%);
    margin: 14px auto;
}

.app-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: 14px;
}

main#main-content {
    min-width: 0;
}

main#main-content h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--s360-slate-900);
}

main#main-content h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--s360-slate-800);
}

.card {
    background: var(--s360-surface);
    border: 1px solid var(--s360-border);
    border-radius: var(--s360-radius-card);
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: var(--s360-shadow-card);
}

.card h1,
.card h2 {
    margin-top: 0;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.grid-two > * {
    min-width: 0;
}

.card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
}

.label-with-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card h1 .info-icon,
.card h2 .info-icon {
    margin-inline-start: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #cfd8ea;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
    background: #fff;
    line-height: 1.3;
    box-sizing: border-box;
}

.field input,
.field select {
    min-height: 42px;
}

.field textarea {
    min-height: 112px;
    resize: vertical;
}

.field input[type="checkbox"],
.field input[type="radio"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
}

.field label.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.field select[multiple] {
    min-height: 120px;
    padding: 8px;
}

.field-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.setup-notice {
    color: #9b4d00;
    font-weight: 600;
}

.status {
    margin-bottom: 12px;
    background: #e8f4eb;
    border: 1px solid #b8e0c3;
    border-radius: 10px;
    padding: 10px;
    color: #1b5b2d;
}

.errors {
    margin-bottom: 12px;
    background: #fff0f0;
    border: 1px solid #ffc9c9;
    border-radius: 10px;
    padding: 10px;
    color: #7a2222;
}

.btn-primary {
    border: 1px solid var(--s360-primary);
    border-radius: 10px;
    background: var(--s360-primary);
    color: #fff;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.79rem;
    line-height: 1.2;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(47, 111, 237, 0.2);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    background: var(--s360-primary-dark);
    border-color: #1a4aad;
    color: #fff;
}

.btn-danger {
    border: 1px solid #7f1d1d;
    border-radius: 10px;
    background: #7f1d1d;
    color: #fff;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.79rem;
    line-height: 1.2;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-danger:hover {
    background: #991b1b;
    border-color: #7f1d1d;
}

.btn-link-danger {
    border: 0;
    background: transparent;
    color: #7f1d1d;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 0.82rem;
}

.btn-secondary {
    border: 1px solid var(--s360-border);
    border-radius: 10px;
    background: #fff;
    color: var(--s360-slate-800);
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.79rem;
    line-height: 1.2;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
    background: var(--s360-slate-50);
    border-color: #cfd8ea;
}

.btn-xs {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.table th,
.table td {
    border-bottom: 1px solid #e8edf7;
    padding: 7px 6px;
    text-align: left;
    vertical-align: top;
}

.table td form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.table-wide {
    width: 100%;
    border-collapse: collapse;
}

.table-medium {
    font-size: 0.9rem;
}

.table-wide th,
.table-wide td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--s360-border);
    text-align: left;
    vertical-align: top;
}

.table-wide td.tight,
.table-wide th.tight {
    padding: 8px 4px;
}

.row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.row-actions-sm {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.mt-4 {
    margin-top: 4px;
}

.mt-6 {
    margin-top: 6px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-14 {
    margin-top: 14px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-2 {
    margin-bottom: 2px;
}

.mb-6 {
    margin-bottom: 6px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-14 {
    margin-bottom: 14px;
}

.text-sm {
    font-size: 0.85rem;
}

.text-md {
    font-size: 1rem;
}

.lh-17 {
    line-height: 1.7;
}

.list-reset {
    margin: 0;
    padding-left: 18px;
}

.chip-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip-muted {
    border: 1px solid var(--s360-border);
    border-radius: 9px;
    padding: 6px 10px;
    background: var(--s360-surface-soft);
}

.max-w-480 {
    max-width: 480px;
}

.max-w-640 {
    max-width: 640px;
}

.error-text {
    color: #b91c1c;
}

.overflow-x-auto {
    overflow-x: auto;
}

.pre-wrap {
    white-space: pre-wrap;
}

.mr-6 {
    display: inline-block;
    margin-right: 6px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-day-card {
    border: 1px solid var(--s360-border);
    border-radius: 10px;
    padding: 8px;
    background: #fff;
}

.calendar-day-card.is-today {
    background: #eef5ff;
}

.calendar-day-chip {
    font-size: 12px;
    margin-top: 5px;
    padding: 4px 6px;
    border-radius: 6px;
    background: var(--s360-surface-soft);
}

.kanban-dropzone {
    margin: 0;
    background: var(--s360-surface-soft);
}

.kanban-col-title {
    margin-top: 0;
}

.task-card {
    border: 1px solid var(--s360-border);
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
}

.hidden-form {
    display: none;
}

.m-0 {
    margin: 0;
}

.legend-strong {
    font-weight: 600;
    padding: 0 4px;
}

.fieldset-soft {
    border: 1px solid #e5ebf7;
    border-radius: 10px;
    padding: 10px 12px;
}

.stack-col-6 {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.thumb-image {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dbe3f1;
}

.thumb-audio {
    max-width: 170px;
}

.thumb-video {
    width: 170px;
    border-radius: 8px;
}

.pl-18 {
    padding-left: 18px;
}

.lh-15 {
    line-height: 1.5;
}

.max-w-190 {
    max-width: 190px;
}

.align-self-end {
    align-self: end;
}

.grid-col-full {
    grid-column: 1 / -1;
}

.pt-12 {
    padding-top: 12px;
}

.border-top-soft {
    border-top: 1px solid #e8edf7;
}

.grid-gap-8 {
    display: grid;
    gap: 8px;
}

.row-between {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.row-between-start {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.text-right {
    text-align: right;
}

.badge-soft {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #dbe4f4;
    background: #f8faff;
}

.text-xs {
    font-size: 0.75rem;
}

.text-xxs {
    font-size: 0.72rem;
}

.text-danger {
    color: #b42318;
}

.card-soft {
    border: 1px solid #e5ebf7;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.inline-check-card {
    border: 1px solid #e5ebf7;
    border-radius: 10px;
    padding: 8px;
    background: #fff;
}

.w-56 {
    width: 56px;
}

.w-58 {
    width: 58px;
}

.ml-auto {
    margin-left: auto;
}

.min-w-0 {
    min-width: 0;
}

.muted {
    color: var(--s360-muted);
}

.agent-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid var(--s360-primary-dark);
    background: var(--s360-primary);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(47, 111, 237, 0.28);
    z-index: 1200;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.agent-fab:hover {
    background: var(--s360-primary-dark);
    border-color: #1a4aad;
}

.agent-fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .grid-two {
        grid-template-columns: 1fr;
    }
}

/* Focus: sidebar + hoofdinhoud (één set) */
.sidebar a:focus-visible,
.sidebar button:focus-visible,
.sidebar select:focus-visible,
.menu-accordion summary:focus-visible,
.btn-primary:focus-visible,
.btn-danger:focus-visible,
.btn-link-danger:focus-visible,
.btn-secondary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}
