/* Kevin AI Portal — dark premium product theme */
:root {
    --portal-bg: #070b12;
    --portal-bg-elevated: #0f1623;
    --portal-surface: #141c2b;
    --portal-surface-hover: #1a2436;
    --portal-border: rgba(148, 163, 184, 0.14);
    --portal-border-strong: rgba(148, 163, 184, 0.28);
    --portal-text: #f1f5f9;
    --portal-text-muted: #94a3b8;
    --portal-text-dim: #64748b;
    --portal-accent: #38bdf8;
    --portal-accent-soft: rgba(56, 189, 248, 0.12);
    --portal-accent-2: #818cf8;
    --portal-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 55%, #c084fc 100%);
    --portal-success: #34d399;
    --portal-warning: #fbbf24;
    --portal-danger: #f87171;
    --portal-radius: 12px;
    --portal-radius-sm: 8px;
    --portal-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --portal-sidebar-w: 260px;
    --portal-sidebar-w-collapsed: 4.5rem;
    --portal-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --portal-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

html {
    box-sizing: border-box;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body,
button,
input,
select,
textarea,
h1, h2, h3, h4, p, a {
    font-family: var(--portal-font);
}

body {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--portal-text);
    background: var(--portal-bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(129, 140, 248, 0.08), transparent);
    min-height: 100dvh;
}

a {
    color: var(--portal-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: var(--portal-mono);
    font-size: 0.85em;
    word-break: break-all;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--portal-border);
}

/* —— App shell —— */
.portal-app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    max-width: 100vw;
}

.portal-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--portal-border);
    background: rgba(15, 22, 35, 0.85);
    backdrop-filter: blur(10px);
    min-height: 3.25rem;
}

.portal-topbar__label {
    font-size: 0.8rem;
    color: var(--portal-text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.portal-content {
    padding: 1rem 1rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .portal-content {
        padding: 1.5rem 1.75rem 2.5rem;
    }
}

/* —— Sidebar —— */
.portal-sidebar {
    flex-shrink: 0;
    max-width: 100%;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(12, 18, 32, 0.98) 0%, rgba(6, 8, 14, 0.99) 100%);
    border-bottom: 1px solid var(--portal-border);
    position: relative;
    z-index: 1050;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
}

.portal-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--portal-border);
}

.portal-sidebar__head-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.portal-sidebar-collapse-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--portal-border-strong);
    border-radius: var(--portal-radius-sm);
    background: var(--portal-surface);
    color: var(--portal-text-muted);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.portal-sidebar-collapse-toggle:hover {
    color: var(--portal-text);
    background: var(--portal-surface-hover);
}

.portal-sidebar-collapse-toggle:focus-visible {
    outline: 2px solid var(--portal-accent);
    outline-offset: 2px;
}

.portal-sidebar-collapse-toggle__chevron {
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 600;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--portal-text);
    min-width: 0;
}

.portal-brand__text {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.portal-logo-mark {
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.35));
}

.portal-brand:hover {
    text-decoration: none;
    color: var(--portal-text);
}

.portal-brand__title {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.portal-brand__sub {
    font-size: 0.7rem;
    color: var(--portal-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--portal-border-strong);
    border-radius: var(--portal-radius-sm);
    background: var(--portal-surface);
    color: var(--portal-text);
    cursor: pointer;
}

.portal-nav-toggle:focus-visible {
    outline: 2px solid var(--portal-accent);
    outline-offset: 2px;
}

.portal-nav-toggle__icon {
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.portal-nav {
    display: none;
    padding: 0.5rem 0.75rem 1rem;
}

.portal-nav.is-open {
    display: block;
}

.portal-nav__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.2rem;
    border-radius: var(--portal-radius-sm);
    color: var(--portal-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid transparent;
}

.portal-nav__link:hover {
    background: var(--portal-surface-hover);
    color: var(--portal-text);
    text-decoration: none;
}

.portal-nav__link.active,
.portal-nav a.active {
    background: var(--portal-accent-soft);
    color: var(--portal-text);
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: inset 3px 0 0 var(--portal-accent);
}

.portal-nav__icon {
    width: 1.5rem;
    text-align: center;
    font-size: 1rem;
    opacity: 0.85;
    flex-shrink: 0;
}

.portal-nav__divider {
    height: 1px;
    background: var(--portal-border);
    margin: 0.65rem 0.5rem;
}

.portal-nav__link--muted {
    opacity: 0.9;
}

.portal-sidebar__account {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    max-width: 100%;
    padding: 0.4rem 0.85rem;
    margin-bottom: 0.35rem;
    color: var(--portal-text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.25;
}

.portal-sidebar__account-icon {
    width: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.85;
    flex-shrink: 0;
}

.portal-sidebar__account-email {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
    border: none;
    padding: 0;
    cursor: pointer;
}

.portal-app.nav-open .portal-backdrop {
    display: block;
}

@media (min-width: 641px) {
    .portal-app {
        flex-direction: row;
    }

    .portal-sidebar {
        width: var(--portal-sidebar-w);
        min-height: 100dvh;
        border-bottom: none;
        border-right: 1px solid var(--portal-border);
        position: sticky;
        top: 0;
        align-self: flex-start;
    }

    .portal-nav-toggle {
        display: none;
    }

    .portal-nav {
        display: block;
    }

    .portal-backdrop {
        display: none !important;
    }

    .portal-sidebar-collapse-toggle {
        display: flex;
    }

    .portal-sidebar--collapsed,
    html.portal-sidebar-collapsed-pending .portal-sidebar {
        width: var(--portal-sidebar-w-collapsed);
    }

    .portal-sidebar--collapsed .portal-brand__text,
    .portal-sidebar--collapsed .portal-nav__label,
    html.portal-sidebar-collapsed-pending .portal-brand__text,
    html.portal-sidebar-collapsed-pending .portal-nav__label {
        display: none;
    }

    .portal-sidebar--collapsed .portal-sidebar__head,
    html.portal-sidebar-collapsed-pending .portal-sidebar__head {
        flex-direction: column;
        align-items: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .portal-sidebar--collapsed .portal-brand,
    html.portal-sidebar-collapsed-pending .portal-brand {
        justify-content: center;
    }

    .portal-sidebar--collapsed .portal-nav__link,
    html.portal-sidebar-collapsed-pending .portal-nav__link {
        justify-content: center;
        gap: 0;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .portal-sidebar--collapsed .portal-nav__divider,
    html.portal-sidebar-collapsed-pending .portal-nav__divider {
        margin-left: 0.35rem;
        margin-right: 0.35rem;
    }

    .portal-sidebar--collapsed .portal-sidebar__head-actions,
    html.portal-sidebar-collapsed-pending .portal-sidebar__head-actions {
        flex-direction: column;
    }

    .portal-sidebar--collapsed .portal-sidebar__account,
    html.portal-sidebar-collapsed-pending .portal-sidebar__account {
        justify-content: center;
        gap: 0;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .portal-sidebar--collapsed .portal-sidebar__account-icon,
    html.portal-sidebar-collapsed-pending .portal-sidebar__account-icon {
        display: none;
    }

    .portal-sidebar--collapsed .portal-sidebar__account-email,
    html.portal-sidebar-collapsed-pending .portal-sidebar__account-email {
        flex: 0 1 auto;
        max-width: 100%;
        font-size: 0.62rem;
        text-align: center;
    }
}

/* —— Auth layout —— */
.auth-shell {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    max-width: 100vw;
    box-sizing: border-box;
}

.auth-shell__grid {
    display: grid;
    gap: 2rem;
    width: 100%;
    max-width: 960px;
    align-items: center;
}

@media (min-width: 900px) {
    .auth-shell__grid {
        grid-template-columns: 1fr minmax(320px, 420px);
    }
}

.auth-preview {
    padding: 0.5rem 0.25rem;
}

.auth-preview__kicker {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--portal-text-dim);
    font-weight: 600;
}

.auth-preview__lead {
    margin: 0;
    color: var(--portal-text-muted);
    font-size: 0.95rem;
    max-width: 22rem;
    line-height: 1.55;
}

@media (max-width: 899px) {
    .auth-preview {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .auth-preview__lead {
        margin-left: auto;
        margin-right: auto;
    }
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: calc(var(--portal-radius) + 4px);
    padding: 2rem 1.75rem;
    box-shadow: var(--portal-shadow);
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-brand__logo {
    display: inline-block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--portal-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-brand__tagline {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    color: var(--portal-text-muted);
}

.portal-oauth-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.25rem;
}

.portal-btn--oauth {
    width: 100%;
    justify-content: center;
    background: var(--portal-bg-elevated);
    border: 1px solid var(--portal-border-strong);
    color: var(--portal-text);
}

.portal-btn--oauth:hover {
    background: var(--portal-surface-hover);
    text-decoration: none;
}

.portal-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.15rem 0;
    color: var(--portal-text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.portal-auth-divider::before,
.portal-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--portal-border);
}

.portal-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.portal-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.35rem 0 0.85rem;
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    cursor: pointer;
}

.portal-alert {
    padding: 0.65rem 0.85rem;
    border-radius: var(--portal-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--portal-border);
}

.portal-alert--danger {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

/* —— Typography —— */
.portal-page-title {
    font-size: clamp(1.4rem, 4vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
    line-height: 1.2;
}

.portal-page-lead {
    color: var(--portal-text-muted);
    margin: 0 0 1.5rem;
    max-width: 42rem;
}

.portal-page-lead--flush {
    margin-bottom: 0;
}

.portal-page-lead--hero {
    margin-bottom: 0;
}

.portal-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.75rem 0 0.85rem;
    color: var(--portal-text);
}

.portal-section-title--flush {
    margin-top: 0;
}

.portal-section-title--home {
    margin-top: 1.25rem;
}

/* —— Cards —— */
.portal-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    padding: 1.1rem 1.15rem;
    margin-bottom: 0.75rem;
}

.portal-card--muted {
    opacity: 0.85;
}

.portal-card__title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.portal-card__meta {
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    margin-bottom: 0.85rem;
    line-height: 1.45;
}

.portal-card-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.portal-hero {
    background: linear-gradient(145deg, rgba(20, 28, 43, 0.95), rgba(15, 22, 35, 0.98));
    border: 1px solid var(--portal-border);
    border-radius: calc(var(--portal-radius) + 2px);
    padding: 1.35rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--portal-shadow);
}

.portal-hero__eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--portal-accent);
    margin-bottom: 0.5rem;
}

.portal-feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.portal-feature-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.45rem;
    color: var(--portal-text-muted);
    font-size: 0.95rem;
}

.portal-feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--portal-accent);
}

/* —— Buttons —— */
.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--portal-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.portal-btn:active {
    transform: translateY(1px);
}

.portal-btn--primary {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.portal-btn--primary:hover {
    filter: brightness(1.06);
    color: #fff;
    text-decoration: none;
}

.portal-btn--ghost {
    background: transparent;
    border-color: var(--portal-border-strong);
    color: var(--portal-text);
}

.portal-btn--ghost:hover {
    background: var(--portal-surface-hover);
    text-decoration: none;
}

.portal-btn--warning {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

.portal-btn--danger {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.portal-btn--success {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

.portal-btn--sm {
    min-height: 2.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
}

.portal-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portal-btn-row .portal-btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 8.5rem;
}

@media (min-width: 480px) {
    .portal-btn-row .portal-btn {
        flex: 0 1 auto;
    }
}

/* —— Forms —— */
.portal-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--portal-text-muted);
    margin-bottom: 0.35rem;
}

.portal-input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.85rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--portal-text);
    background: var(--portal-bg-elevated);
    border: 1px solid var(--portal-border-strong);
    border-radius: var(--portal-radius-sm);
    margin-bottom: 1rem;
}

.portal-input:focus {
    outline: none;
    border-color: var(--portal-accent);
    box-shadow: 0 0 0 3px var(--portal-accent-soft);
}

.portal-form-grid {
    display: grid;
    gap: 0.25rem 1rem;
    margin-bottom: 1rem;
    min-width: 0;
}

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

@media (min-width: 768px) {
    .portal-form-grid {
        grid-template-columns: repeat(3, 1fr);
        align-items: end;
    }

    .portal-form-grid__full {
        grid-column: 1 / -1;
    }
}

.portal-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 1rem;
    color: var(--portal-text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.portal-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--portal-accent);
}

/* —— Badges —— */
.portal-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--portal-border);
    color: var(--portal-text-muted);
    box-sizing: border-box;
    line-height: 1.25;
}

/* Connection status chips (Verbonden / Fout / Niet afgerond, …) — uniform box */
.portal-badge--status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 9.75rem;
    min-height: 1.625rem;
    padding: 0.2rem 0.5rem;
    text-align: center;
    vertical-align: middle;
}

.portal-badge--active {
    border-color: rgba(52, 211, 153, 0.35);
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.1);
}

.portal-badge--disabled {
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--portal-text-dim);
}

.portal-badge--live {
    border-color: rgba(52, 211, 153, 0.35);
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.08);
}

.portal-badge--accent {
    border-color: rgba(129, 140, 248, 0.45);
    color: #c7d2fe;
    background: rgba(129, 140, 248, 0.12);
}

.portal-badge--warning {
    border-color: rgba(251, 191, 36, 0.4);
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.1);
}

.portal-badge--error {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
}

.portal-badge--clickable {
    cursor: pointer;
    appearance: none;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.25;
}

.portal-badge--clickable:hover:not(:disabled) {
    filter: brightness(1.08);
    text-decoration: underline;
}

.portal-link-action {
    background: none;
    border: none;
    color: var(--portal-accent, #7dd3fc);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    text-decoration: underline;
}

.portal-link-action:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* —— Alerts —— */
.portal-alert {
    padding: 0.85rem 1rem;
    border-radius: var(--portal-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid;
}

.portal-alert--info {
    background: var(--portal-accent-soft);
    border-color: rgba(56, 189, 248, 0.3);
    color: #e0f2fe;
}

.portal-alert--danger {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

/* —— Tables —— */
.portal-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
}

.portal-filter-bar__field {
    flex: 1 1 12rem;
    min-width: 0;
}

.portal-filter-bar__field--narrow {
    flex: 1 1 9rem;
    max-width: 100%;
}

.verjaardag-filters__label {
    display: block;
    margin-bottom: 0.35rem;
}

.verjaardag-filters .portal-input {
    margin-bottom: 0;
}

.portal-data-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.portal-data-list__item {
    padding: 0.65rem 0;
    border-top: 1px solid var(--portal-border);
}

.portal-data-list__item:first-child {
    border-top: none;
}

.portal-data-list__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    min-width: 0;
}

.portal-data-list__body {
    flex: 1 1 auto;
    min-width: 0;
}

.portal-data-list__primary {
    font-weight: 600;
    word-break: break-word;
    line-height: 1.3;
}

.portal-data-list__meta {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--portal-text-muted);
    line-height: 1.35;
    word-break: break-word;
}

.portal-data-list__aside {
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.88rem;
    text-align: right;
    max-width: 42%;
    word-break: break-word;
}

.verjaardag-mobile-card {
    min-width: 0;
    max-width: 100%;
}

.verjaardag-mobile-card .portal-card__meta {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.verjaardag-mobile-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.verjaardag-mobile-card__reminder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--portal-text-dim);
}

.verjaardag-mobile-card__name {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

.verjaardag-entry-notes {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--portal-text-dim);
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.vault-accounts-mobile__fields {
    margin: 0.5rem 0 0.65rem;
}

.vault-accounts-mobile__actions {
    margin-top: 0.35rem;
}

.vault-accounts-mobile__id {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    word-break: break-all;
}

.portal-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    margin-bottom: 1rem;
    background: var(--portal-surface);
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 36rem;
    font-size: 0.9rem;
}

.portal-table th,
.portal-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--portal-border);
    vertical-align: top;
}

.portal-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--portal-text-dim);
    background: rgba(0, 0, 0, 0.2);
}

.portal-table tr:last-child td {
    border-bottom: none;
}

.portal-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* —— Impersonation —— */
.portal-impersonation {
    position: sticky;
    top: 0;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, #78350f 0%, #b45309 45%, #d97706 100%);
    color: #fffbeb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(180, 83, 9, 0.35);
    font-size: 0.9rem;
}

.portal-impersonation__badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.portal-impersonation__email {
    opacity: 0.92;
    word-break: break-all;
}

.portal-impersonation__stop {
    width: 100%;
    min-height: 2.75rem;
    font-weight: 700;
    background: #fff;
    color: #78350f !important;
    border: none;
    border-radius: var(--portal-radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
}

@media (min-width: 480px) {
    .portal-impersonation {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .portal-impersonation__stop {
        width: auto;
        flex-shrink: 0;
        max-width: 20rem;
        padding: 0 1rem;
    }
}

/* —— Connection actions grid —— */
.portal-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .portal-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .portal-action-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* —— Responsive visibility —— */
.show-desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .show-mobile-only {
        display: none !important;
    }

    .show-desktop-only {
        display: block;
    }
}

.portal-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--portal-text-dim);
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* —— Blazor reconnect (deploy / server restart) —— */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

#components-reconnect-modal.components-reconnect-hide {
    display: none;
}

.portal-reconnect-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 11, 18, 0.72);
    backdrop-filter: blur(4px);
}

.portal-reconnect-panel {
    position: relative;
    z-index: 1;
    max-width: 22rem;
    padding: 1.35rem 1.5rem;
    border-radius: var(--portal-radius);
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: linear-gradient(145deg, rgba(20, 28, 48, 0.95), rgba(8, 12, 22, 0.98));
    box-shadow: var(--portal-shadow);
    color: var(--portal-text);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.45;
}

.portal-reconnect-message {
    display: none;
    margin: 0;
}

#components-reconnect-modal.components-reconnect-show .portal-reconnect-message--active,
#components-reconnect-modal.components-reconnect-retrying .portal-reconnect-message--active,
#components-reconnect-modal.components-reconnect-failed .portal-reconnect-message--failed,
#components-reconnect-modal.components-reconnect-rejected .portal-reconnect-message--failed {
    display: block;
}

/* —— Blazor error UI —— */
#blazor-error-ui {
    background: #451a1a;
    color: #fecaca;
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: rgba(127, 29, 29, 0.9);
    padding: 1rem;
    color: #fecaca;
    border-radius: var(--portal-radius-sm);
}

/* —— Glass panels —— */
.glass-panel {
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--portal-radius);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        var(--portal-shadow);
}

.glass-panel--hero {
    padding: 1.5rem 1.25rem;
    margin-bottom: 1.25rem;
    border-color: rgba(56, 189, 248, 0.2);
    background: linear-gradient(145deg, rgba(20, 28, 48, 0.72), rgba(8, 12, 22, 0.88));
}

/* Compact page chrome (Koppelingen header, MCP panel) */
.portal-page-intro {
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.portal-panel-compact {
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.portal-panel-compact .portal-section-title--flush {
    margin-bottom: 0.5rem;
}

.portal-mcp-teaser {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--portal-text-muted);
}

.portal-details-help {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    color: var(--portal-text-dim);
}

.portal-details-help summary {
    cursor: pointer;
    color: var(--portal-accent);
    font-weight: 500;
    list-style: none;
    user-select: none;
}

.portal-details-help summary::-webkit-details-marker {
    display: none;
}

.portal-details-help__body {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--portal-border);
    line-height: 1.45;
    color: var(--portal-text-muted);
}

.portal-help--block {
    margin-top: 0;
}

.portal-inline-actions {
    margin: 0.65rem 0 0.25rem;
}

.portal-home-connectors-lead {
    margin-top: -0.35rem;
    margin-bottom: 0.75rem;
}

.portal-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

/* —— MCP copy block —— */
.mcp-endpoint {
    padding: 1.1rem 1.15rem;
    margin-bottom: 1.5rem;
}

.mcp-endpoint__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--portal-accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.mcp-endpoint__row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 520px) {
    .mcp-endpoint__row {
        flex-direction: row;
        align-items: center;
    }
}

.mcp-endpoint__url {
    flex: 1;
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: var(--portal-radius-sm);
    background: rgba(7, 11, 18, 0.65);
    border: 1px solid var(--portal-border-strong);
    font-size: 0.82rem;
    color: #e2e8f0;
    word-break: break-all;
}

/* —— Provider grid —— */
.provider-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (min-width: 540px) {
    .provider-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .provider-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.provider-card {
    padding: 1rem 1.05rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: border-color 0.15s, transform 0.15s;
}

.provider-card:hover {
    border-color: rgba(56, 189, 248, 0.28);
    transform: translateY(-2px);
}

.provider-card__head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.provider-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.provider-card__icon--wa { background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; }
.provider-card__icon--tg { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #fff; }
.provider-card__icon--tr { background: linear-gradient(135deg, #0079bf, #005a8f); color: #fff; }
.provider-card__icon--ki { background: linear-gradient(135deg, #ea0029, #bb162b); color: #fff; }
.provider-card__icon--graph { background: linear-gradient(135deg, #f59e0b, #2563eb); color: #fff; }
.provider-card__icon--auth { background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; }
.provider-card__icon--vault { background: linear-gradient(135deg, #a855f7, #6366f1); color: #fff; }
.provider-card__icon--banking { background: linear-gradient(135deg, #0ea5e9, #0369a1); color: #fff; }

/* —— Banking (/banking) —— */
.banking-page__intro {
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.banking-page .portal-card.banking-accounts-card {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.85rem 0.65rem;
}

.banking-connection-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--portal-border, rgba(255, 255, 255, 0.08));
}

.banking-connection-bar__consent {
    font-size: 0.78rem;
    line-height: 1.25;
    flex: 1 1 auto;
    min-width: 0;
}

.banking-connection-bar__actions {
    flex-shrink: 0;
}

.banking-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--portal-border, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.banking-icon-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
}

.banking-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.banking-icon-btn__svg {
    width: 1.1rem;
    height: 1.1rem;
}

.banking-account__brand {
    flex-shrink: 0;
}

.banking-account__detail {
    margin-top: 0.75rem;
}

.banking-account__account-actions {
    margin-bottom: 0.75rem;
}

.banking-account__remove-account {
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
}

.banking-bank-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    flex-shrink: 0;
    color: #fff;
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: -0.02em;
    line-height: 1;
}

.banking-bank-mark__text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.banking-bank-mark--ing { background: linear-gradient(135deg, #ff6200, #cc4e00); }
.banking-bank-mark--rabo { background: linear-gradient(135deg, #0055a4, #003d75); }
.banking-bank-mark--sns { background: linear-gradient(135deg, #e3007b, #9b0052); }
.banking-bank-mark--handels { background: linear-gradient(135deg, #005eb8, #003f7a); }
.banking-bank-mark--default { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.banking-account {
    border-top: 1px solid var(--portal-border, rgba(255, 255, 255, 0.08));
    padding: 0.45rem 0;
}

.banking-account__toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    background: none;
    border: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0.15rem 0;
}

.banking-account__label {
    min-width: 0;
    flex: 1 1 auto;
}

.banking-account__primary {
    display: block;
    font-size: 0.92rem;
    line-height: 1.25;
    word-break: break-word;
}

.banking-account__secondary {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.78rem;
    line-height: 1.2;
}

.banking-account__summary {
    text-align: right;
    flex-shrink: 0;
}

.banking-account__balance {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.banking-account__synced {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.72rem;
    white-space: nowrap;
}

.banking-account__chevron {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.75rem;
    opacity: 0.85;
}

@media (max-width: 640px) {
    .banking-page__intro {
        padding: 0.85rem 0.9rem;
        margin-bottom: 0.65rem;
    }

    .banking-page__intro .portal-page-title {
        font-size: 1.35rem;
    }

    .banking-page__intro .portal-page-lead {
        font-size: 0.85rem;
    }

    .banking-page .portal-card.banking-accounts-card {
        padding: 0.35rem 0.55rem 0.45rem;
        margin-bottom: 0.4rem;
    }

    .banking-bank-mark {
        width: 1.65rem;
        height: 1.65rem;
        border-radius: 6px;
        font-size: 0.55rem;
    }

    .banking-connection-bar__consent {
        font-size: 0.7rem;
    }

    .banking-icon-btn {
        width: 2rem;
        height: 2rem;
    }

    .banking-account {
        padding: 0.28rem 0;
    }

    .banking-account__toggle {
        gap: 0.45rem;
        padding: 0.1rem 0;
    }

    .banking-account__primary {
        font-size: 0.84rem;
    }

    .banking-account__secondary,
    .banking-account__synced {
        font-size: 0.68rem;
    }

    .banking-account__balance {
        font-size: 0.82rem;
    }

    .banking-account__chevron {
        margin-left: 0.2rem;
    }
}

.provider-brand-icon svg {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
}

.provider-brand-icon--sm {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
}

.provider-brand-icon--sm svg {
    width: 1.05rem;
    height: 1.05rem;
}

.connection-card__head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.connection-card__head .portal-card__title {
    margin: 0;
    min-width: 0;
}

.connection-provider-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* —— Icon buttons (compact actions) —— */
.portal-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.portal-icon-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.portal-icon-btn__svg {
    width: 0.95rem;
    height: 0.95rem;
    display: block;
}

.portal-icon-btn--danger {
    border-color: rgba(248, 113, 113, 0.38);
    background: rgba(127, 29, 29, 0.22);
    color: #fca5a5;
}

.portal-icon-btn--danger:hover:not(:disabled) {
    background: rgba(185, 28, 28, 0.38);
    border-color: rgba(252, 165, 165, 0.55);
    color: #fecaca;
}

.portal-back-link {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
}

.portal-back-link a {
    color: var(--portal-accent);
    text-decoration: none;
    font-weight: 500;
}

.portal-back-link a:hover {
    text-decoration: underline;
}

/* —— Koppelingen (/connections) —— */
.connections-page {
    min-width: 0;
    max-width: 100%;
}

.connections-mcp-endpoint {
    margin-bottom: 1rem;
}

.connections-mcp-endpoint__url {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border-radius: var(--portal-radius-sm);
    background: rgba(7, 11, 18, 0.65);
    border: 1px solid var(--portal-border-strong);
    font-size: 0.82rem;
    color: #e2e8f0;
    word-break: break-all;
}

.connections-mcp-endpoint__link {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
}

.connections-mcp-endpoint__link a {
    color: var(--portal-accent);
    font-weight: 500;
    text-decoration: none;
}

.connections-mcp-endpoint__link a:hover {
    text-decoration: underline;
}

.mcp-clients-page {
    min-width: 0;
    max-width: 100%;
}

.connections-mobile-list,
.connections-mcp-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.65rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    background: var(--portal-surface);
    overflow: hidden;
}

.connections-row,
.connections-mcp-row {
    padding: 0.5rem 0.7rem;
    border-top: 1px solid var(--portal-border);
}

.connections-row--link {
    display: block;
    color: inherit;
    text-decoration: none;
    min-height: 2.75rem;
}

.connections-row--link:focus-visible {
    outline: 2px solid var(--portal-accent);
    outline-offset: -2px;
}

.connections-row--link:active {
    background: color-mix(in srgb, var(--portal-accent) 8%, transparent);
}

.connections-table-row--link {
    cursor: pointer;
}

.connections-table-row--link:hover {
    background: color-mix(in srgb, var(--portal-accent) 6%, transparent);
}

.connections-table__remove {
    width: 2.75rem;
    text-align: right;
    white-space: nowrap;
}

.connection-detail__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.connection-detail__title-text {
    flex: 1 1 12rem;
    min-width: 0;
}

.connection-detail__facts {
    margin: 0;
    display: grid;
    gap: 0.55rem;
}

.connection-detail__facts dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--portal-text-dim);
    margin: 0;
}

.connection-detail__facts dd {
    margin: 0.1rem 0 0;
    word-break: break-word;
}

.connection-detail__error dd {
    color: var(--portal-text-muted);
    font-size: 0.88rem;
}

.connection-detail__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

.connection-detail__action,
.connections-row--link {
    min-height: 2.75rem;
}

.connection-detail__rename-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.connection-detail__rename-row .portal-input {
    flex: 1 1 12rem;
    min-width: 0;
}

.connection-detail__section {
    margin-top: 0.75rem;
}

.connections-row:first-child,
.connections-mcp-row:first-child {
    border-top: none;
}

.connections-row__head,
.connections-mcp-row__head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.connections-row__name,
.connections-mcp-row__name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.25;
    word-break: break-word;
}

.connections-row__status {
    flex-shrink: 0;
    max-width: 46%;
}

.connections-row__status .portal-badge--status {
    min-width: 0;
    max-width: 100%;
    font-size: 0.72rem;
    min-height: 1.45rem;
    padding: 0.15rem 0.4rem;
}

.connections-row__body {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--portal-text-muted);
}

.connections-row__line + .connections-row__line {
    margin-top: 0.15rem;
}

.connections-row__detail {
    color: var(--portal-text-dim);
}

.connections-row__linked {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    line-height: 1.3;
}

.connections-row__actions {
    margin-top: 0.35rem;
    display: flex;
    justify-content: flex-end;
}

.connections-mcp-row__revoke {
    flex-shrink: 0;
}

.connections-mcp-row__meta {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--portal-text-dim);
    word-break: break-word;
}

.connections-banking-accounts {
    margin: 0.35rem 0 0;
    padding-left: 1rem;
    list-style: disc;
}

.connections-banking-accounts__item {
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.connections-banking-accounts__remove {
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    min-height: 2rem;
}

.connections-page .connections-mcp-empty {
    margin-bottom: 0;
}

.portal-btn--with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.provider-card__name {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.provider-card__desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--portal-text-muted);
    line-height: 1.45;
    flex: 1;
}

.provider-card__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--portal-accent);
}

.portal-main {
    background: var(--portal-bg);
}

.portal-content {
    background: transparent;
}

/* —— Vault (Wachtwoordkluis) —— */
.vault-layout {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
}

@media (min-width: 900px) {
    .vault-layout {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        align-items: start;
    }
}

.vault-layout__main {
    min-width: 0;
}

.vault-layout__sidebar {
    padding: 1rem 1.1rem;
    min-width: 0;
}

@media (max-width: 767px) {
    .vault-layout__sidebar,
    .vault-layout__main .portal-card.glass-panel {
        padding: 0.9rem 0.85rem;
    }

    /* Dashboard / Koppelingen — tighter vertical rhythm on phones */
    .portal-content {
        padding: 0.75rem 0.85rem 1.5rem;
    }

    .portal-page-intro {
        padding: 0.35rem 0 0.5rem;
        margin-bottom: 0.5rem;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .portal-page-intro .portal-page-title {
        font-size: 1.3rem;
        margin-bottom: 0.15rem;
    }

    .portal-page-intro .portal-page-lead {
        font-size: 0.8125rem;
        line-height: 1.35;
    }

    .portal-panel-compact {
        padding: 0.75rem 0.85rem;
        margin-bottom: 0.65rem;
    }

    .portal-panel-compact .portal-section-title--flush {
        margin-bottom: 0.35rem;
        font-size: 0.95rem;
    }

    .portal-section-title {
        margin: 0.85rem 0 0.5rem;
        font-size: 0.95rem;
    }

    .portal-section-title--home {
        margin-top: 0.75rem;
    }

    .portal-home-connectors-lead {
        margin-top: -0.25rem;
        margin-bottom: 0.55rem;
        font-size: 0.8125rem;
    }

    .glass-panel--hero,
    .portal-hero {
        padding: 0.85rem 0.9rem;
        margin-bottom: 0.65rem;
    }

    .portal-hero__eyebrow {
        margin-bottom: 0.35rem;
    }

    .portal-hero__actions {
        margin-top: 0.65rem;
        gap: 0.5rem;
    }

    .portal-page-lead--hero {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .mcp-endpoint {
        padding: 0.7rem 0.8rem;
        margin-bottom: 0.75rem;
    }

    .mcp-endpoint__label {
        margin-bottom: 0.35rem;
    }

    .mcp-endpoint .portal-help {
        margin-top: 0.35rem;
        font-size: 0.8125rem;
    }

    .provider-grid {
        gap: 0.55rem;
    }

    .portal-content .portal-card {
        padding: 0.85rem 0.9rem;
        margin-bottom: 0.55rem;
    }

    .verjaardag-filters.portal-card.glass-panel {
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        margin-bottom: 0.45rem;
    }

    .verjaardag-filters .portal-filter-bar {
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.45rem;
    }

    .verjaardag-filters .verjaardag-filters__label {
        display: none;
    }

    .verjaardag-filters .portal-filter-bar__field {
        flex: 1 1 auto;
        min-width: 0;
    }

    .verjaardag-filters .portal-filter-bar__field--narrow {
        flex: 0 0 5.75rem;
        max-width: 5.75rem;
    }

    .verjaardag-filters .portal-input {
        min-height: 2.25rem;
        padding: 0.45rem 0.5rem;
        font-size: 0.875rem;
    }

    .portal-card-grid {
        gap: 0.5rem;
        margin-bottom: 0.65rem;
    }

    .portal-card__meta {
        margin-bottom: 0.55rem;
    }

    .portal-table-wrap {
        overflow-x: visible;
    }

    .portal-table {
        min-width: 0;
    }

    .portal-table th,
    .portal-table td {
        padding: 0.5rem 0.45rem;
        word-break: break-word;
    }

    .portal-btn-row .portal-btn {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
    }

    .portal-mcp-teaser code {
        word-break: break-all;
    }

    .connections-mcp-endpoint {
        padding: 0.65rem 0.75rem;
        margin-bottom: 0.65rem;
    }

    .connections-mcp-endpoint__url {
        font-size: 0.78rem;
        padding: 0.45rem 0.5rem;
    }

    .connections-row__status {
        max-width: 38%;
    }

    .connections-row--link,
    .connection-detail__action,
    .connections-link-grid .connections-link-btn {
        min-height: 2.75rem;
    }

    .connections-mobile-list,
    .connections-mcp-list {
        margin-bottom: 0.5rem;
    }

    .connections-row,
    .connections-mcp-row {
        padding: 0.4rem 0.55rem;
    }

    .connections-row__name,
    .connections-mcp-row__name {
        font-size: 0.84rem;
    }

    .connections-row__linked {
        display: none;
    }

    .connections-link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .connections-link-grid .connections-link-btn {
        min-height: 2.2rem;
        padding: 0.28rem 0.4rem;
        font-size: 0.76rem;
        gap: 0.3rem;
        justify-content: flex-start;
        text-align: left;
    }

    .connections-link-cell {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
    }

    .connections-share-btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.65rem;
    }

    .connect-links-revoke-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .connect-links-revoke-list__item {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.65rem 0.85rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .connect-links-revoke-list__meta {
        font-size: 0.9rem;
        color: var(--portal-text-muted, #9fb0c4);
        word-break: break-word;
    }

    .connections-link-grid .connections-link-btn__suffix {
        display: none;
    }

    .connections-page .portal-section-title {
        margin: 0.65rem 0 0.4rem;
    }

    .banking-account__summary {
        max-width: 42%;
    }

    .banking-account__balance,
    .banking-account__synced {
        white-space: normal;
        word-break: break-word;
    }

    .vault-layout__main .portal-form-grid {
        gap: 0.35rem 0;
    }

    .vault-layout__main .portal-input {
        margin-bottom: 0.5rem;
    }

    .vault-layout__main .portal-help {
        margin-top: 0.35rem;
        line-height: 1.45;
    }

    .vault-extra-fields__header {
        flex-direction: column;
        align-items: stretch;
    }

    .vault-extra-fields__row {
        grid-template-columns: 1fr;
    }

    .vault-extra-fields__actions .portal-btn {
        width: 100%;
    }
}

.vault-tree-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.vault-tree__label {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--portal-text);
    padding: 0.35rem 0.5rem;
    border-radius: var(--portal-radius-sm);
    cursor: pointer;
    font: inherit;
}

.vault-tree__label--root {
    font-weight: 600;
}

.vault-tree__label--active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--portal-accent);
}

.vault-tree__row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.vault-tree__toggle {
    width: 1.25rem;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--portal-text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
}

.vault-tree__toggle--spacer {
    display: inline-block;
}

.vault-revealed-password {
    font-size: 0.9rem;
    margin-right: 0.35rem;
    word-break: break-all;
}

.vault-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 6, 23, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.vault-modal {
    width: min(420px, 100%);
    padding: 1.25rem;
}

.vault-extra-fields__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.vault-extra-fields__row {
    display: grid;
    gap: 0.5rem 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--portal-border);
    min-width: 0;
}

@media (min-width: 768px) {
    .vault-extra-fields__row {
        grid-template-columns: 1fr 1fr auto;
        align-items: end;
    }
}

.vault-extra-fields__actions {
    display: flex;
    align-items: flex-end;
}

.vault-extra-fields__revealed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.portal-table-wrap--vault {
    overflow-x: auto;
}

.portal-table--vault {
    min-width: 52rem;
    table-layout: fixed;
}

.portal-table--vault th,
.portal-table--vault td {
    overflow: hidden;
}

.portal-table--vault .vault-table__col-id {
    width: 9.5rem;
}

.portal-table--vault .vault-table__col-actions {
    width: 11rem;
}

.vault-table__cell-text,
.vault-table__cell-id,
.vault-table__cell-updated {
    max-width: 0;
}

.vault-table__truncate {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.vault-table__truncate--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
}

.vault-table__cell-fields {
    min-width: 12rem;
}

.vault-table__fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}

.vault-table__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    min-width: 9.5rem;
}

@media (min-width: 1100px) {
    .vault-table__actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 10.5rem;
    }
}

.vault-table__btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.vault-table__cell-updated .vault-table__updated {
    white-space: nowrap;
    font-size: 0.85rem;
}

.vault-modal__actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Remote PC — connection screen + loading */
@keyframes portal-spin {
    to {
        transform: rotate(360deg);
    }
}

.portal-spinner {
    display: inline-block;
    width: 2.25rem;
    height: 2.25rem;
    border: 3px solid rgba(129, 140, 248, 0.22);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: portal-spin 0.85s linear infinite;
    flex: 0 0 auto;
}

.portal-spinner--sm {
    width: 1.1rem;
    height: 1.1rem;
    border-width: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .portal-spinner {
        animation-duration: 1.4s;
    }
}

.rpc-pc-screen {
    margin-bottom: 1.25rem;
    padding: 0;
    overflow: hidden;
    min-height: min(42vw, 220px);
}

.rpc-pc-screen__connecting,
.rpc-pc-screen__error,
.rpc-pc-screen__offline,
.rpc-pc-screen__online {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: min(42vw, 220px);
    padding: 1.25rem 1rem;
    text-align: center;
}

.rpc-pc-screen__text {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.rpc-pc-screen__text--dim {
    font-weight: 500;
    color: var(--portal-text-dim);
}

.rpc-pc-screen__hint {
    margin: 0;
    max-width: 26rem;
    font-size: 0.8125rem;
}

.rpc-pc-screen__error .rpc-pc-screen__text {
    color: var(--portal-danger, #f87171);
}

.rpc-pc-screen__retry {
    min-height: 44px;
    min-width: 11rem;
    touch-action: manipulation;
}

.rpc-pc-screen__offline {
    background: rgba(248, 113, 113, 0.06);
    border-top: 1px solid rgba(248, 113, 113, 0.2);
}

.rpc-pc-screen__online {
    min-height: 4.5rem;
    background: rgba(52, 211, 153, 0.05);
    border-top: 1px solid rgba(52, 211, 153, 0.18);
}

.rpc-pc-skeleton {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0;
}

/* Remote PC worker toggles */
.rpc-workers {
    padding: 0.85rem 0.85rem 0.95rem;
    margin-bottom: 1rem;
}

.rpc-workers__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.rpc-workers__count {
    margin: 0;
    font-size: 0.75rem;
    color: var(--portal-text-dim);
    white-space: nowrap;
}

.rpc-workers__lead {
    margin: 0.35rem 0 0.65rem;
    font-size: 0.8125rem;
}

.rpc-workers__account {
    margin: 0.85rem 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--portal-text-dim);
}

.rpc-workers__account:first-of-type {
    margin-top: 0.15rem;
}

.rpc-worker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
}

.rpc-worker__label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 44px;
    margin: 0;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius-sm);
    background: rgba(15, 22, 35, 0.45);
    cursor: pointer;
    touch-action: manipulation;
}

.rpc-worker__label:has(input:disabled) {
    cursor: default;
    opacity: 0.72;
}

.rpc-worker__label input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #818cf8;
}

.rpc-worker__name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rpc-worker__state {
    flex: 0 0 auto;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--portal-text-dim);
}

.rpc-worker__state.is-on {
    color: var(--portal-success);
}

@media (min-width: 640px) {
    .rpc-worker-list {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem 0.5rem;
    }
}
