.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* NOOIT wrappen: logo links, acties rechts, altijd op een rij. Met wrap
       duwde de brede proefperiode-meter Menu/Uitloggen onder het logo en
       zweefde alles (10 jun). De meter wordt zelf compact op smal scherm. */
    flex-wrap: nowrap;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-spacious {
    padding: var(--space-5) var(--space-6);
    border-bottom: 0;
}
.topbar-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}
.topbar-actions > a,
.topbar-actions > button {
    white-space: nowrap;
}
@media (max-width: 480px) {
    .topbar { padding: var(--space-3) var(--space-4); }
    .topbar-spacious { padding: var(--space-3) var(--space-4); }
    .topbar-actions { gap: var(--space-2); }
}
@media (max-width: 400px) {
    .topbar { padding-inline: var(--space-3); gap: var(--space-2); }
    .topbar-actions { gap: var(--space-1); }
}
.brand {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--color-orange); }
.muted { color: var(--color-text-muted); font-weight: 400; }
.muted-strong { color: var(--color-text-secondary); font-weight: 500; }

.dashboard {
    max-width: var(--content-medium);
    margin: 0 auto;
    padding: var(--space-7) var(--space-5) var(--space-9);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.page-context {
    max-width: var(--content-medium);
    margin: 0 auto;
    padding: var(--space-3) var(--space-5) 0;
    color: var(--color-text-muted);
}

.auth-stage {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-5);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-7);
    align-items: center;
    min-height: 100vh;
}
@media (min-width: 900px) {
    .auth-stage {
        grid-template-columns: 1.1fr 0.9fr;
        gap: var(--space-9);
    }
}
.auth-brand .eyebrow { color: var(--color-orange); margin-bottom: var(--space-4); }
.auth-brand h1 { margin-bottom: var(--space-4); }
.auth-card {
    padding: var(--space-7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.tab-strip {
    display: flex;
    gap: 0;
    background: var(--color-bg-soft);
    padding: var(--space-1);
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-6);
}
.tab {
    flex: 1;
    background: transparent;
    border: 0;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-weight: 600;
    transition: background var(--motion-fast) var(--easing-out),
                color var(--motion-fast) var(--easing-out);
}
.tab.is-active {
    background: var(--color-white);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.subpage {
    max-width: var(--content-medium);
    margin: 0 auto;
    padding: var(--space-7) var(--space-5) var(--space-9);
}
.subpage-header {
    margin-bottom: var(--space-6);
}
.subpage-header .eyebrow { color: var(--color-orange); margin-bottom: var(--space-3); }
.subpage-header h1 { margin-bottom: var(--space-3); }
.subpage-header .lead { margin-bottom: 0; }

.subpage-section + .subpage-section {
    margin-top: var(--space-6);
}

.list-clean {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-5);
    display: grid;
    gap: var(--space-2);
}
.list-clean li {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}
.list-clean li.muted {
    background: var(--color-bg-soft);
    color: var(--color-text-muted);
    text-align: center;
}
.list-clean li.row-with-remove {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.provider-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}
.provider-tabs .tab-btn {
    padding: var(--space-2) var(--space-4);
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: var(--text-base);
    font-weight: 600;
    border-bottom: 2px solid transparent;
}
.provider-tabs .tab-btn.active {
    color: var(--color-orange);
    border-bottom-color: var(--color-orange);
}

/* === Integratie status-banner === */
.integration-status-ok {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: #ecfae9;
    color: #0a5d2c;
    border: 1px solid #b9e6b3;
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
}
.integration-status-todo {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-orange-soft);
    color: var(--color-text);
    border: 1px solid var(--color-orange);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
}

/* === Stap-voor-stap instructies === */
.integration-steps {
    list-style: none;
    counter-reset: instep;
    padding: 0;
    margin: 0 0 var(--space-4);
}
.integration-steps li {
    counter-increment: instep;
    position: relative;
    padding: var(--space-3) var(--space-3) var(--space-3) calc(var(--space-6) + 8px);
    margin-bottom: var(--space-2);
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
    line-height: var(--leading-normal);
}
.integration-steps li::before {
    content: counter(instep);
    position: absolute;
    left: var(--space-3);
    top: var(--space-3);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-orange);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
}
.integration-steps code {
    background: var(--color-bg);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    border: 1px solid var(--color-border);
}

/* === Success-state na verbinding === */
.integration-success {
    text-align: center;
    padding: var(--space-7) var(--space-5);
    background: var(--color-orange-soft);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-orange);
}
.integration-success h2 {
    color: var(--color-orange);
    font-size: 1.5rem;
}

.question-banner {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-orange-soft);
    border: 1px solid var(--color-orange-glow);
    color: var(--color-text);
    font-size: var(--text-base);
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.question-banner-label {
    font-size: var(--text-sm);
    color: var(--color-orange);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.live-transcript {
    margin-top: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-soft);
    min-height: 160px;
}
.live-transcript .live-final {
    color: var(--color-text);
    font-size: var(--text-base);
    line-height: 1.5;
    margin: 0 0 var(--space-2);
}
.live-transcript .live-interim {
    color: var(--color-text-muted);
    font-style: italic;
    font-size: var(--text-base);
    line-height: 1.5;
    margin: 0;
}

.invoice-row {
    display: grid;
    gap: var(--space-2);
}
.invoice-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}
.invoice-row-meta {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}
.invoice-row-right {
    flex-shrink: 0;
}
.invoice-row-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.invoice-check {
    margin-right: var(--space-2);
    width: 18px;
    height: 18px;
    accent-color: var(--color-orange);
    vertical-align: middle;
    cursor: pointer;
}

.invoice-select-all {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    user-select: none;
}
.invoice-select-all input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-orange);
    cursor: pointer;
}

.bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #eadfd6);
    border-radius: var(--radius-md, 12px);
    position: sticky;
    top: var(--space-2);
    z-index: 5;
}

.invoice-toolbar {
    display: grid;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.invoice-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.filter-chip {
    border: 1px solid var(--color-border);
    background: var(--color-bg-soft);
    color: var(--color-text-secondary);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
}
.filter-chip[aria-pressed="true"] {
    border-color: var(--color-orange);
    background: var(--color-orange-soft);
    color: var(--color-orange);
}
.filter-chip .chip-count {
    opacity: 0.7;
    font-weight: 500;
}

.state-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: var(--color-bg-soft);
    color: var(--color-text-secondary);
    white-space: nowrap;
}
.state-pill-success {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: var(--color-success);
}
.state-pill-warning {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: var(--color-warning);
}
.state-pill-error {
    background: #FEF2F2;
    border-color: #FECACA;
    color: var(--color-error);
}
.state-pill-info {
    background: var(--color-orange-soft);
    border-color: var(--color-orange-glow);
    color: var(--color-orange);
}
.state-pill-muted {
    color: var(--color-text-muted);
}

.speak-bar {
    margin: var(--space-5) 0;
}
.speak-hint {
    display: block;
    margin-top: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.form-stack {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-4);
}
.form-substack {
    margin-top: var(--space-4);
    padding-left: var(--space-4);
    border-left: 2px solid var(--color-orange-glow, rgba(255, 118, 54, 0.18));
}
.help-expander {
    margin-bottom: var(--space-3);
}
.help-expander > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-orange);
}
.help-expander > ol,
.help-expander > ul {
    margin-top: var(--space-3);
}
.onb-skip-row {
    margin-top: var(--space-4);
    text-align: center;
}
.onb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--space-4);
    padding: 0;
    color: var(--color-text-secondary);
    background: transparent;
    border: 0;
    font-size: var(--text-sm);
    cursor: pointer;
}
.onb-back-link:hover { color: var(--color-orange); }
.text-error { color: var(--color-error); }

/* Knop-rij onder de factuur-preview: 'Stuur naar Billit' + downloads.
   Verschijnt pas wanneer de extractie minstens één regel heeft én ready. */
.invoice-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-4);
    align-items: stretch;
    max-width: 480px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 600px) {
    .invoice-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    .invoice-actions .btn { width: auto; }
}

/* Foutmelding bovenaan onboarding — zelfde card-stijl, maar rode border. */
.onb-alert {
    margin: 0 auto var(--space-5);
    max-width: var(--content-medium);
    background: #fff;
    border: 1.5px solid var(--color-error);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: var(--color-error);
    font-size: var(--text-sm);
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}
.onb-alert:empty { display: none; }
.onb-alert::before {
    content: '!';
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-error);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
}
.platform-detail > * + * { margin-top: var(--space-4); }

/* === AI-naam suggestie-chips (stap 1: tekstvoorstellen, geen gezichten) === */
.onb-hint-spaced {
    margin: var(--space-4) 0 var(--space-2);
}
.ai-name-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.ai-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-2) var(--space-4);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color var(--motion-fast) var(--easing-out),
                background var(--motion-fast) var(--easing-out);
}
.ai-name-chip:hover {
    border-color: var(--color-border-strong);
}
.ai-name-chip.is-selected {
    border-color: var(--color-orange);
    background: var(--color-orange-soft, rgba(255, 118, 54, 0.10));
    color: var(--color-orange);
}

/* === agent avatar suggesties ===
   Cards en faces zijn fluid: ze krimpen mee met de kolombreedte i.p.v. een
   vaste pixel-grootte te forceren. Dat is essentieel voor het auto-fit
   grid — anders rekenen browsers de kolom op basis van de inherente kaart-
   breedte (face + padding) en blaast het grid op tot ie breder is dan de
   parent (zie iPhone SE bug, mei 2026). */
.ai-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: var(--space-2);
    width: 100%;
    max-width: 100%;
}
@media (min-width: 600px) {
    .ai-avatar-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        max-width: 720px;
    }
}
.ai-avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    min-width: 0;
    transition: border-color var(--motion-fast) var(--easing-out),
                box-shadow var(--motion-fast) var(--easing-out);
}
.ai-avatar-card:hover {
    border-color: var(--color-border-strong);
    box-shadow: 0 4px 14px rgba(15, 14, 13, 0.06);
}
.ai-avatar-card.is-selected {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 2px var(--color-orange-soft, rgba(255, 118, 54, 0.18));
}
.ai-avatar-face {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #FFF1EA;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-avatar-face svg {
    width: 100%;
    height: 100%;
    display: block;
}
.ai-avatar-face-photo {
    background: var(--color-orange);
}
.ai-avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--color-orange);
}
.ai-avatar-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}
/* Face-only variant: enkel het gezicht, geen label eronder
   (gebruikt in stap 2 — naam is al gekozen, dit is enkel een character-keuze) */
.ai-avatar-card-faceonly {
    padding: var(--space-2);
}
.ai-avatar-card-faceonly .ai-avatar-face {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 96px;
}
/* === Selection-card: gedeelde keuze-tegel layout (zelfde stijl als
       .platform-tile). Werkt voor radio én checkbox. De native input is
       visueel verborgen — het bolletje rechtsboven en de border tonen state. */
.option-row {
    display: block;
    position: relative;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5) var(--space-4) var(--space-4);
    cursor: pointer;
    transition: border-color var(--motion-fast) var(--easing-out),
                box-shadow var(--motion-fast) var(--easing-out);
}
.option-row:hover {
    border-color: var(--color-border-strong);
    box-shadow: 0 4px 14px rgba(15, 14, 13, 0.06);
}
.option-row:has(input:checked) {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 2px var(--color-orange-soft, rgba(255, 118, 54, 0.18));
}
.option-row input[type="radio"],
.option-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}
.option-row::after {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--color-border-strong);
    background: transparent;
    transition: background var(--motion-fast) var(--easing-out),
                border-color var(--motion-fast) var(--easing-out);
}
.option-row:has(input:checked)::after {
    background: var(--color-orange);
    border-color: var(--color-orange);
}
.option-row .option-text {
    display: block;
    padding-right: var(--space-5);
}
.option-row .option-text strong {
    display: block;
    font-size: var(--text-base);
    color: var(--color-text);
    margin-bottom: 2px;
}
.option-row .option-text .muted {
    display: block;
    color: var(--color-text-muted);
    line-height: 1.4;
}
/* Toeslag-rij (intake): zichtbare checkbox links met vinkje/kruisje i.p.v.
   het verborgen bolletje rechtsboven — de status moet expliciet leesbaar zijn. */
.option-row-check {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.option-row-check::after { display: none; }
.option-row-check input.pf-check {
    position: static;
    opacity: 1;
    width: 24px;
    height: 24px;
}
.option-row-check .option-text {
    flex: 1;
    padding-right: 0;
}
.option-row-check .option-text strong { margin-bottom: 0; }
/* Toeslag-multiplier: zichtbare "×" vóór de stepper, zodat "× 2" leesbaar is
   en het getal nooit als een leeg vakje oogt. */
.toeslag-mult {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.toeslag-mult-x {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text-muted);
    line-height: 1;
}
.toeslag-mult .pf-number-input {
    font-weight: 600;
    font-size: var(--text-lg);
}
.form-row-2 {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: var(--space-2);
}
.form-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    align-items: center;
    margin-top: var(--space-3);
}
.form-actions-or {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.stat-grid {
    display: grid;
    gap: var(--space-2);
    margin: var(--space-4) 0;
    padding: var(--space-5);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg-soft);
}
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
}
.stat-row:last-child { border-bottom: 0; }
.stat-label { font-size: var(--text-sm); }
.stat-value { font-weight: 600; color: var(--color-text); font-size: var(--text-base); }

.dashboard-hero {
    margin-bottom: var(--space-3);
}
.dashboard-hero .eyebrow {
    margin-bottom: var(--space-3);
    color: var(--color-orange);
}
.dashboard-hero h1 {
    margin-bottom: var(--space-3);
}

/* Proefperiode-stand op de abonnement-pagina: hoeveel actieve dagen gebruikt,
   hoeveel over, met balk. De tuinman ziet zo bij het kiezen van een plan
   exact waar hij staat in z'n trial. */
.trial-status {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-soft);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
}
.trial-status-line {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-3);
}
.trial-status-bar {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--color-border);
    overflow: hidden;
    margin-bottom: var(--space-3);
}
.trial-status-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: var(--radius-pill);
    background: var(--color-orange);
    transition: width .3s ease;
}
.trial-status-note { margin: 0; }

.pricing-toggle {
    display: flex;
    width: fit-content;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 4px;
    margin: 0 auto var(--space-5);
    gap: 4px;
}
.pricing-toggle-btn {
    border: 0;
    background: transparent;
    color: var(--color-text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--motion-fast) var(--easing-out),
                color var(--motion-fast) var(--easing-out);
}
.pricing-toggle-btn:hover:not(.is-active) { color: var(--color-text); }
.pricing-toggle-btn.is-active {
    background: var(--color-orange);
    color: var(--color-white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    max-width: 1080px;
    margin: 0 auto;
}
@media (min-width: 880px) {
    /* minmax(0, 1fr) i.p.v. 1fr: anders groeit een kolom mee met brede inhoud
       en worden de kaarten ongelijk breed. */
    .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pricing-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.pricing-card-featured {
    border-color: var(--color-orange);
    border-width: 2px;
    box-shadow: var(--shadow-glow-orange);
}
.pricing-card-special {
    background: var(--color-orange-soft);
    border-color: var(--color-orange);
}
.pricing-eyebrow {
    margin: 0 0 var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pricing-amount {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
}
.pricing-currency { font-size: 1.5rem; vertical-align: top; margin-right: 4px; }
.pricing-period { font-size: 1rem; font-weight: 500; color: var(--color-text-muted); margin-left: 4px; }
.pricing-yearly {
    margin: var(--space-2) 0 var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.pricing-followup {
    margin: var(--space-2) 0 var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-style: italic;
}
/* Incl.-btw-regel direct onder de (excl.) prijs: wat Mollie effectief afschrijft. */
.pricing-incl {
    margin: var(--space-2) 0 var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-5);
    flex: 1;
}
.pricing-features li {
    padding: var(--space-2) 0;
    border-top: 1px solid var(--color-border);
    font-size: var(--text-sm);
}
.pricing-features li:first-child { border-top: 0; padding-top: 0; }
.pricing-cta {
    width: 100%;
    text-align: center;
}

/* === Abonnementspagina === */
.sub-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    background: #fff;
    max-width: 560px;
}
.sub-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}
.sub-plan { margin: 0; font-size: 1.4rem; }
.sub-badge {
    font-size: var(--text-sm);
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
}
.sub-badge-ok { color: var(--color-orange); border-color: var(--color-orange); background: #fff4ee; }
.sub-badge-info { color: #1763c9; border-color: #1763c9; background: #eef4fd; }
.sub-badge-warn { color: #b07900; border-color: #e0a900; background: #fffae8; }
.sub-badge-error { color: #c0392b; border-color: #d23f3f; background: #fdeeee; }
.sub-details { display: flex; flex-direction: column; gap: var(--space-2); }
.sub-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-2) 0;
    border-top: 1px solid var(--color-border);
}
.sub-row:first-child { border-top: 0; }
.sub-row-label { color: var(--color-text-muted); }
.sub-row-value { font-weight: 600; text-align: right; }
.sub-actions { margin-top: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.sub-actions .muted.small { flex-basis: 100%; margin: var(--space-1) 0 0; }
.sub-danger {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}
.sub-danger-note { margin: 0 0 var(--space-3); color: var(--color-text-muted); font-size: var(--text-sm); }
.btn-ghost.sub-cancel { color: #c0392b; border-color: #f0c4be; }
.btn-ghost.sub-cancel:hover { background: #fdeeee; border-color: #d23f3f; }
.sub-faq p { margin: 0 0 var(--space-3); color: var(--color-text-muted); font-size: var(--text-sm); }
.sub-faq strong { color: var(--color-text); }

.trial-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-orange-soft);
    border: 1px solid var(--color-orange);
}
.trial-banner[data-state="expired"] {
    background: #fdecea;
    border-color: var(--color-error);
}
.trial-banner-content { flex: 1; min-width: 0; }
.trial-banner-title {
    margin: 0;
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--color-text);
}
.trial-banner-meta {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.trial-banner-cta {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 var(--space-4);
    font-size: var(--text-sm);
}
@media (max-width: 600px) {
    .trial-banner { flex-direction: column; align-items: stretch; }
    .trial-banner-cta { width: 100%; text-align: center; }
}

.user-dashboard {
    margin-bottom: var(--space-5);
}
.user-dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}
@media (min-width: 600px) {
    .user-dash-grid { grid-template-columns: repeat(3, 1fr); }
}
.user-dash-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--space-4);
}
.user-dash-label {
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.user-dash-value {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
}
.user-dash-hint {
    margin: var(--space-2) 0 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.user-dash-recent {
    margin-top: var(--space-4);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--space-4);
}
.user-dash-section-label {
    margin: 0 0 var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.user-dash-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.user-dash-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    border-top: 1px solid var(--color-border);
    font-size: var(--text-sm);
}
.user-dash-list li:first-child { border-top: 0; }
.user-dash-list .dash-customer { font-weight: 600; color: var(--color-text); }
.user-dash-list .dash-meta { color: var(--color-text-muted); font-size: 0.8rem; }
.user-dash-list .dash-amount { font-weight: 600; }

/* Winst-strook: wat Pinflo de gebruiker opleverde (tijd + cashflow).
   Transparant met enkel een oranje rand: onderscheid zonder gevuld vlak. */
.winst-strook {
    background: transparent;
    border: 1px solid var(--color-orange);
    border-radius: 12px;
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}
.winst-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}
.winst-label {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.winst-tabs {
    display: flex;
    gap: 2px;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 3px;
}
.winst-tab {
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.winst-tab.is-active {
    background: var(--color-orange);
    color: #fff;
}
.winst-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.winst-value {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
}
.winst-hint {
    margin: var(--space-2) 0 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.winst-hint .accent { color: var(--color-orange); font-weight: 600; white-space: nowrap; }
.winst-trend {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: 2px;
}
.winst-trend.is-up { color: var(--color-success); }
.winst-trend.is-down { color: var(--color-error); }
.winst-rate {
    color: var(--color-orange);
    border-bottom: 1px dotted var(--color-orange);
    cursor: pointer;
    font-weight: 600;
}
.winst-rate-input {
    width: 64px;
    border: 1px solid var(--color-orange);
    border-radius: 6px;
    padding: 0 4px;
    font: inherit;
    color: var(--color-text);
}
.winst-cumulatief {
    margin: var(--space-3) 0 0;
    padding-top: var(--space-3);
    border-top: 1px solid rgba(255, 118, 54, 0.25);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
/* De saldo-zin is de kern van het verhaal: donkerder en net iets groter dan
   de cumulatief-regel, met het saldo-bedrag in oranje. */
.winst-saldo-zin {
    display: block;
    margin-top: var(--space-1);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text);
}
.winst-saldo-zin .accent { color: var(--color-orange); white-space: nowrap; }
.winst-projectie {
    display: block;
    margin-top: var(--space-1);
}
.winst-projectie .accent { color: var(--color-orange); white-space: nowrap; }
.btw-toggle-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-2);
}
.btw-toggle-row .winst-tab { padding: 3px 10px; font-size: 0.75rem; }

.tile-hero {
    padding: var(--space-7) var(--space-6);
}
.tile-hero .tile-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}

.tile-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .tile-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (min-width: 1080px) {
    .dashboard {
        max-width: var(--content-wide);
    }
    .tile-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.page {
    max-width: 720px;
    margin: 24px auto;
    padding: 0 20px;
    display: grid;
    gap: 20px;
}

.call-body {
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-soft) 100%);
    min-height: 100vh;
}

.call-stage {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* ── Orb ── */
.orb-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.orb {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 200ms ease;
}
.orb-inner {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--color-orange) 0%, var(--color-orange-hover) 70%, #B8421A 100%);
    box-shadow: 0 12px 40px rgba(255, 118, 54, 0.35);
    overflow: hidden;
}
.orb-avatar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--color-orange);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
.orb-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
}

/* OFF: rustig, geen animatie. Foto blijft op volle sterkte;
   het onderscheid met "actief" zit puur in de afwezigheid van animatie/ring. */
.orb-off .orb-inner {
    background: radial-gradient(circle at 30% 30%, #C9CDD3 0%, #8E94A0 70%, #5A6070 100%);
    box-shadow: none;
}

/* IDLE: gentle breathing */
.orb-idle .orb-inner {
    animation: orb-breathe 3.2s ease-in-out infinite;
}
@keyframes orb-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* LISTENING: faster pulse + glow ring */
.orb-listening .orb-inner {
    animation: orb-pulse 0.8s ease-in-out infinite;
}
.orb-listening .orb-ring {
    animation: orb-glow 0.8s ease-in-out infinite;
}
@keyframes orb-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@keyframes orb-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 118, 54, 0.55); }
    50% { box-shadow: 0 0 0 18px rgba(255, 118, 54, 0); }
}

/* THINKING: spinning ring */
.orb-thinking .orb-ring {
    border-top-color: var(--color-orange);
    border-right-color: var(--color-orange);
    animation: orb-spin 1.1s linear infinite;
}
@keyframes orb-spin {
    to { transform: rotate(360deg); }
}

/* SPEAKING: dynamic pulse driven by audio (CSS fallback) */
.orb-speaking .orb-inner {
    animation: orb-speak 0.55s ease-in-out infinite;
}
@keyframes orb-speak {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* READY: success state */
.orb-ready .orb-inner {
    background: radial-gradient(circle at 30% 30%, #34D399 0%, #10B981 70%, #047857 100%);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.35);
}

.orb-label {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-text);
    margin-top: 8px;
}
.orb-status {
    color: var(--color-text-muted);
    font-size: 1rem;
    text-align: center;
    min-height: 1.5em;
    max-width: 320px;
}

/* ── Action area ── */
.action-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}
.btn-pill {
    width: 100%;
    min-height: 64px;
    border-radius: var(--radius-pill);
    font-size: 1.05rem;
    font-weight: 600;
    transition: transform 100ms ease, background 120ms ease, box-shadow 120ms ease;
}
.btn-pill:active { transform: scale(0.98); }

.btn-record {
    background: var(--color-orange);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    user-select: none;
    touch-action: none;
}
.btn-record .record-hint {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
}
.btn-record.is-active {
    background: #B8421A;
    box-shadow: 0 0 0 6px rgba(255, 118, 54, 0.25);
}
.btn-record:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-success {
    background: var(--color-success);
}
.btn-success:hover { background: #059669; }

.secondary-actions {
    display: flex;
    gap: 16px;
}

/* ── Invoice fold ── */
.invoice-fold {
    width: 100%;
    max-width: 480px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.invoice-fold > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    font-weight: 600;
}
.invoice-fold > summary::-webkit-details-marker { display: none; }
.invoice-fold > summary::after {
    content: 'Open';
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-orange);
    font-weight: 600;
    padding: 4px 12px;
    border: 1px solid var(--color-orange);
    border-radius: var(--radius-pill);
}
.invoice-fold[open] > summary::after { content: 'Sluit'; }
.invoice-fold > .invoice-preview,
.invoice-fold > .small,
.invoice-fold > p {
    margin: 0 16px 16px;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}
.invoice-fold > .invoice-preview {
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-soft);
}
.small { font-size: 0.875rem; }

.transcript {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 12px;
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
    margin: 0 16px 16px;
}
.transcript .bubble {
    padding: 8px 12px;
    border-radius: var(--radius-md);
    max-width: 88%;
    line-height: 1.4;
    font-size: 0.92rem;
}
.transcript .bubble-user {
    background: var(--color-orange);
    color: var(--color-white);
    align-self: flex-end;
}
.transcript .bubble-ai {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    align-self: flex-start;
    /* Daphne mag in de afrond/voorstel-beurt een korte opsomming met • op aparte
       regels tonen. textContent bewaart de newlines; pre-wrap rendert ze. */
    white-space: pre-wrap;
}
.transcript .bubble-time {
    font-size: 0.7rem;
    opacity: 0.65;
    margin-top: 2px;
}

.chat {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
    margin: 0 16px var(--space-4);
    max-height: 320px;
    overflow-y: auto;
}
.chat-empty {
    text-align: center;
    margin: var(--space-4) 0;
}

/* Instructie-blok op het idle voice-scherm: leert hoe je tegen de agent praat
   (altijd subtiel zichtbaar, geen icons — typografie + ruimte). */
.call-guide {
    width: 100%;
    max-width: 360px;
    margin: var(--space-4) auto 0;
    text-align: center;
}
.call-guide-lead {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 var(--space-3);
}
.call-guide-lead strong { color: var(--color-text); font-weight: 600; }
.call-guide-examples {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-orange-soft);
    border-radius: var(--radius-md, 14px);
    text-align: left;
}
.call-guide-examples li {
    position: relative;
    padding-left: 14px;
    margin: 6px 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    font-style: italic;
}
.call-guide-examples li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-orange);
}
.call-guide-tip {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
    margin: 0;
}
.call-guide-incall {
    text-align: center;
    max-width: 320px;
    margin: var(--space-2) auto 0;
}
.action-hint {
    text-align: center;
    max-width: 360px;
    margin: var(--space-2) auto 0;
    line-height: 1.45;
}
.chat-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 78%;
    line-height: 1.4;
    font-size: 0.95rem;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.invoice-feedback {
    align-self: stretch;
    margin-top: var(--space-2);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.invoice-feedback-question {
    font-size: 0.95rem;
    color: var(--color-text);
}
.invoice-feedback-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.invoice-feedback-comment {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font: inherit;
    resize: vertical;
}
.invoice-feedback-thanks {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.invoice-feedback-sub {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: calc(-1 * var(--space-1));
}
.invoice-feedback-stars {
    display: flex;
    gap: 4px;
}
.invoice-feedback-star {
    background: none;
    border: none;
    padding: 2px;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-border);
    transition: color 0.1s ease, transform 0.1s ease;
}
.invoice-feedback-star:hover {
    transform: scale(1.1);
}
.invoice-feedback-star.is-on {
    color: var(--color-orange);
}
.invoice-feedback-star:disabled {
    cursor: default;
}
.invoice-feedback-star:disabled:hover {
    transform: none;
}
.chat-bubble-user {
    background: var(--color-orange);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-bubble-ai {
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-bubble-interim {
    opacity: 0.6;
    font-style: italic;
}
/* Live "aan het luisteren"-ballon: geen ruwe gok-tekst, maar pulserende
   bolletjes. Wordt bij commitUserFinal vervangen door de juiste tekst. */
.chat-bubble-listening {
    opacity: 1;
    font-style: normal;
}
/* "Begrepen, even verwerken"-ballon: label + pulserende bolletjes, subtiel. */
.chat-bubble-thinking {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted, #6b7280);
    font-style: italic;
}
.chat-thinking-label { white-space: nowrap; }
.chat-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 2px 0;
}
.chat-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    animation: chat-typing 1.2s infinite ease-in-out;
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-typing {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}

.voice-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}
.voice-toggle input { width: auto; margin: 0; }

.recording-pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #DC2626;
    animation: legacy-pulse 1s ease-in-out infinite;
    margin-right: 6px;
}
@keyframes legacy-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.4); }
}

.invoice-preview {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--color-white);
}
.invoice-preview .muted { color: var(--color-text-muted); }
.invoice-preview .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}
.invoice-preview .preview-header .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}
.invoice-preview .preview-header .value { font-weight: 600; }
.invoice-preview .preview-header .value.missing { color: var(--color-warning); font-weight: 500; }
.invoice-preview .preview-header address {
    font-style: normal;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}
/* Klant typveld-vangnet (naam/e-mail typen i.p.v. spellen) */
.customer-edit-link {
    margin-top: 4px;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8rem;
    color: var(--color-orange);
    text-decoration: underline;
    cursor: pointer;
}
.customer-edit-input {
    display: block;
    width: 100%;
    max-width: 280px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2, 8px);
    font-size: 0.95rem;
}
.customer-edit-input:focus { outline: none; border-color: var(--color-orange); }
.customer-edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.customer-edit-save {
    background: var(--color-orange);
    color: #fff;
    border: none;
    border-radius: var(--radius-2, 8px);
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
}
.customer-edit-save:disabled { opacity: 0.6; cursor: default; }
.customer-edit-cancel {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2, 8px);
    padding: 8px 14px;
    cursor: pointer;
}
/* Contextuele naam-typebalk in de chat (alleen bij twijfel) */
.chat-name-bar {
    align-self: stretch;
    margin: 4px 0;
    padding: 12px 14px;
    border: 1px solid var(--color-orange);
    background: var(--color-orange-soft);
    border-radius: var(--radius-md, 10px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-name-bar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}
.chat-name-bar .customer-edit-input { max-width: none; margin-top: 0; }
/* Aandacht-flits als de gebruiker doorpraat terwijl de mic uit staat (popup gemist). */
.chat-name-bar-attention {
    animation: nameBarPulse 0.5s ease-in-out 3;
}
@keyframes nameBarPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 118, 54, 0); }
    50% { box-shadow: 0 0 0 4px rgba(255, 118, 54, 0.45); }
}

/* Verstuur-bevestiging in de chat (Bevestigen / Nog niet) */
.send-confirm {
    align-self: stretch;
    margin: 6px 0;
    padding: 14px 16px;
    border: 2px solid var(--color-orange);
    background: var(--color-white, #fff);
    border-radius: var(--radius-md, 10px);
    box-shadow: var(--shadow-sm);
}
.send-confirm-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.send-confirm-body { font-size: 0.9rem; color: var(--color-text-secondary); margin-bottom: 8px; }
.send-confirm-lines { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 3px; }
.send-confirm-lines li { font-size: 0.85rem; color: var(--color-text); }
.send-confirm-unpriced { color: var(--color-warning, #b45309); font-weight: 600; }
.send-confirm-total { font-weight: 700; margin-bottom: 10px; }
.send-confirm-actions { display: flex; gap: 10px; }
.send-confirm-yes {
    flex: 1; background: var(--color-orange); color: #fff; border: none;
    border-radius: var(--radius-2, 8px); padding: 12px; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.send-confirm-yes:disabled { opacity: 0.6; cursor: default; }
.send-confirm-no {
    flex: 1; background: none; border: 1px solid var(--color-border);
    border-radius: var(--radius-2, 8px); padding: 12px; font-weight: 600; cursor: pointer;
}

.invoice-preview-table-wrap {
    width: 100%;
    margin-bottom: 12px;
}
.invoice-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: auto;
}
.invoice-preview td.cell-desc {
    word-break: break-word;
    overflow-wrap: anywhere;
}
.invoice-preview th {
    text-align: left;
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 8px;
    border-bottom: 1px solid var(--color-border);
}
.invoice-preview td {
    padding: 8px;
    border-bottom: 1px solid var(--color-bg-soft);
}
.invoice-preview td.right, .invoice-preview th.right { text-align: right; }
.invoice-preview tr.low-confidence td { background: #FEF3C7; }
.invoice-preview tr.low-confidence td::before { color: var(--color-warning); }
.invoice-preview .preview-hint-low {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--color-warning);
}

.invoice-preview td.nowrap, .invoice-preview th.nowrap { white-space: nowrap; }

.invoice-preview .line-remove-col {
    width: 28px;
    padding-left: 0;
    padding-right: 4px;
    text-align: center;
}
.invoice-preview .line-remove {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: background 120ms, color 120ms, border-color 120ms;
}
.invoice-preview .line-remove:hover {
    background: var(--color-error);
    border-color: var(--color-error);
    color: #fff;
}

@media (max-width: 600px) {
    .invoice-preview thead { display: none; }
    .invoice-preview table,
    .invoice-preview tbody,
    .invoice-preview tr,
    .invoice-preview td { display: block; width: 100%; box-sizing: border-box; }
    .invoice-preview tr {
        position: relative;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        margin-bottom: var(--space-3);
        padding: var(--space-3) var(--space-4);
        background: var(--color-bg);
    }
    .invoice-preview td {
        padding: 2px 0;
        border: 0;
        text-align: left !important;
        white-space: normal !important;
    }
    .invoice-preview td.cell-desc {
        font-weight: 600;
        font-size: var(--text-base);
        margin-bottom: var(--space-2);
        padding-right: 32px;
    }
    .invoice-preview td[data-label]:not(.cell-desc):not(.line-remove-col)::before {
        content: attr(data-label) ': ';
        color: var(--color-text-muted);
        font-size: var(--text-sm);
        margin-right: var(--space-2);
    }
    .invoice-preview td.line-remove-col {
        position: absolute;
        top: var(--space-2);
        right: var(--space-2);
        width: auto;
        padding: 0;
    }
}

.invoice-preview .totals {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    max-width: 280px;
    margin-left: auto;
    font-size: 0.875rem;
}
.invoice-preview .totals .label { color: var(--color-text-muted); }
.invoice-preview .totals .grand-total {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-orange);
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--color-border);
    padding-top: 8px;
    margin-top: 4px;
}

.invoice-preview .empty {
    color: var(--color-text-muted);
    text-align: center;
    padding: 12px;
}

/* === Custom Pinflo dropdown (intake-flow + andere settings) === */
.pf-dropdown {
    position: relative;
    width: 100%;
}
.pf-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: var(--hit-target);
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-text);
    font: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--motion-fast) var(--easing-out),
                box-shadow var(--motion-fast) var(--easing-out);
}
.pf-dropdown-trigger:hover { border-color: var(--color-border-strong); }
.pf-dropdown.is-open .pf-dropdown-trigger,
.pf-dropdown-trigger:focus {
    outline: none;
    border-color: var(--color-orange);
    box-shadow: 0 0 0 4px var(--color-orange-glow);
}
.pf-dropdown-value { flex: 1; }
.pf-dropdown-value.is-placeholder { color: var(--color-text-muted); }
.pf-dropdown-caret {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: var(--space-3);
    flex-shrink: 0;
    position: relative;
    transition: transform var(--motion-fast) var(--easing-out);
}
.pf-dropdown-caret::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-orange);
    border-bottom: 2px solid var(--color-orange);
    transform: rotate(45deg);
}
.pf-dropdown.is-open .pf-dropdown-caret { transform: rotate(180deg) translateY(2px); }
.pf-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin: 0;
    padding: var(--space-2);
    list-style: none;
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(15, 14, 13, 0.08);
    z-index: 20;
    max-height: 320px;
    overflow-y: auto;
}
/* CSS-vangnet bovenop de hidden-attribute van de menu (defense-in-depth) */
.pf-dropdown.is-open .pf-dropdown-menu { display: block; }
.pf-dropdown-option {
    padding: var(--space-3) var(--space-3);
    border-radius: calc(var(--radius-md) - 4px);
    cursor: pointer;
    transition: background var(--motion-fast) var(--easing-out);
}
.pf-dropdown-option:hover { background: var(--color-orange-soft); }
.pf-dropdown-option[aria-selected="true"] {
    background: var(--color-orange-soft);
    color: var(--color-orange-hover);
    font-weight: 600;
}

/* === Custom Pinflo number-input met − / + knoppen === */
.pf-number {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    overflow: hidden;
    transition: border-color var(--motion-fast) var(--easing-out),
                box-shadow var(--motion-fast) var(--easing-out);
}
.pf-number:focus-within {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 4px var(--color-orange-glow);
}
.pf-number-btn {
    flex: 0 0 var(--hit-target);   /* nooit meegroeien met de balk */
    width: var(--hit-target);
    min-width: var(--hit-target);
    border: none;
    background: var(--color-orange-soft);
    color: var(--color-orange);
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background var(--motion-fast) var(--easing-out);
}
/* Hover enkel op apparaten met een echte muis. Op touch blijft :hover anders
   'plakken' na een tap — de min/plus kleurde dan oranje alsof de hele balk
   gehoverd werd. */
@media (hover: hover) and (pointer: fine) {
    .pf-number-btn:hover { background: var(--color-orange); color: var(--color-white); }
}
.pf-number-btn:active { background: var(--color-orange-hover); color: var(--color-white); }

/* Suggestie-chips (uurtarief) + werknemer-rij in de onboarding */
.pf-rate-suggestions { margin-top: var(--space-2); }
.pf-worker-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.pf-worker-row .input { flex: 1 1 140px; min-width: 0; }
/* Twee 56px-knoppen + leesbaar getal: 150px liet maar ~36px over voor de
   cijfers ("45" werd afgekapt → leek leeg). 188px geeft ~76px tekstruimte.
   flex-wrap op de rij vangt smalle schermen op (number zakt onder de naam). */
.pf-worker-row .pf-number { flex: 1 0 188px; }

/* VIES: bevestiging van wat automatisch werd ingevuld */
.vies-card-done { border-color: var(--color-success, #1a8a4a); }
.vies-filled-list { margin: var(--space-2) 0 0; padding-left: var(--space-4); }
.vies-filled-list li { font-size: var(--text-sm); color: var(--color-text); margin-top: 2px; }
.pf-number-input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: var(--space-3) var(--space-4);
    font: inherit;
    color: var(--color-text);
    text-align: center;
    background: transparent;
    cursor: text;
    font-variant-numeric: tabular-nums;
}
.pf-number-input:focus {
    outline: none;
    background: var(--color-bg-soft);
}
/* Hide native browser spinners */
.pf-number-input::-webkit-outer-spin-button,
.pf-number-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pf-number-input[type="number"] { -moz-appearance: textfield; }

/* Vaste eenheid-aanduiding in de stepper (× voor toeslag, € voor prijs) zodat
   het getal nooit betekenisloos oogt. */
.pf-number-affix {
    display: flex;
    align-items: center;
    color: var(--color-text-muted, #6b6b6b);
    font: inherit;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    white-space: nowrap;
}
.pf-number-prefix { padding-left: var(--space-2); }
.pf-number-suffix { padding-right: var(--space-2); }
.pf-number-prefix + .pf-number-input,
.pf-number-affix + .pf-number-input { text-align: left; padding-left: 2px; }

/* === Pinflo-chips: radio-stijl keuze uit gefixeerde set (BE-BTW etc.) === */
.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.pf-chip {
    flex: 0 0 auto;
    min-width: 64px;
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-white);
    color: var(--color-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--motion-fast) var(--easing-out),
                background var(--motion-fast) var(--easing-out),
                color var(--motion-fast) var(--easing-out);
}
.pf-chip:hover { border-color: var(--color-border-strong); }
.pf-chip.is-selected {
    background: var(--color-orange);
    border-color: var(--color-orange);
    color: var(--color-white);
}

/* === Onboarding section-divider — visuele scheiding tussen subsecties
       binnen één step (bijv. "Of vul handmatig in" tussen VIES en handmatig). === */
.onb-section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    margin: var(--space-5) 0 var(--space-2) 0;
}
.onb-section-divider::before,
.onb-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}
.onb-section-divider::before { margin-right: var(--space-3); }
.onb-section-divider::after { margin-left: var(--space-3); }

/* === VIES auto-fill preview-card === */
.vies-preview {
    margin-top: var(--space-4);
}
.vies-card {
    padding: var(--space-4);
    background: var(--color-orange-soft);
    border: 1.5px solid var(--color-orange);
    border-radius: var(--radius-md);
}
.vies-card-name {
    margin: 0 0 var(--space-1) 0;
    font-weight: 700;
    color: var(--color-text);
}
.vies-card-addr {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

/* === Microfoon-toegang stap (onboarding) === */
.mic-explain-card {
    padding: var(--space-4);
    background: var(--color-orange-soft);
    border: 1.5px solid var(--color-orange);
    border-radius: var(--radius-md);
}
.mic-explain-title {
    margin: 0 0 var(--space-3) 0;
    font-weight: 700;
    color: var(--color-text);
}
.mic-explain-list {
    margin: 0;
    padding-left: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}
.mic-status {
    margin: var(--space-3) 0 0 0;
}
.mic-status.is-ok { color: var(--color-orange); font-weight: 600; }
.mic-status.is-error { color: #B91C1C; }

/* === Inline veld-error (onder label, voor banned-word / validation) === */
.field-inline-error {
    margin: var(--space-2) 0 0 0;
    font-size: var(--text-sm);
    color: #B91C1C;
}

/* Verplicht-markering + ongeldig-veld-staat: maakt doorheen de hele intake
   duidelijk wát ingevuld moet worden en wélk veld blokkeert. */
.field-required-mark {
    color: #B91C1C;
    font-weight: 700;
    margin-left: 1px;
}
.input.onb-invalid,
.textarea.onb-invalid,
.select.onb-invalid,
.pf-number.onb-invalid {
    border-color: #B91C1C;
}
.input.onb-invalid:focus,
.textarea.onb-invalid:focus,
.select.onb-invalid:focus,
.pf-number.onb-invalid:focus-within {
    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.15);
}

/* === Avatar-card variant: "Geen gezicht" — witte bol met subtiel
       gezicht-silhouet + diagonale verbods-streep. Past in Pinflo's
       "rust + typografie"-richtlijn (geen luide iconen). === */
.ai-avatar-face-pinflo {
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    color: var(--color-text-muted);
    position: relative;
    overflow: hidden;
}
.ai-avatar-face-pinflo::before {
    /* gezicht-silhouet (hoofd + schouders) in licht grijs */
    content: '';
    position: absolute;
    left: 18%;
    right: 18%;
    top: 18%;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 26%, #E5E7EB 24%, transparent 24.5%),
        radial-gradient(ellipse 60% 30% at 50% 90%, #E5E7EB 70%, transparent 70.5%);
}
.ai-avatar-face-pinflo::after {
    /* diagonale verbods-streep over silhouet */
    content: '';
    position: absolute;
    left: 14%;
    right: 14%;
    top: 50%;
    height: 3px;
    background: var(--color-text-muted);
    transform: translateY(-50%) rotate(-32deg);
    border-radius: 2px;
}
.ai-avatar-card[data-slug="none"] .ai-avatar-face-pinflo {
    transition: border-color var(--motion-fast) var(--easing-out);
}
.ai-avatar-card[data-slug="none"].is-selected .ai-avatar-face-pinflo {
    border-color: var(--color-orange);
}

/* Groene verstuur-bevestiging (receipt), zoals op de marketing-site. */
.chat-receipt {
    align-self: flex-start;
    max-width: 85%;
    background: #ecfae9;
    color: #0a5d2c;
    padding: 12px 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #b9e6b3;
    animation: receipt-pop 0.35s ease;
}
.chat-receipt-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2a8c4a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex: 0 0 auto;
    animation: receipt-check 0.4s ease 0.1s both;
}
.chat-receipt-title { margin: 0; font-weight: 700; font-size: 0.95rem; }
.chat-receipt-meta { margin: 2px 0 0; font-size: 0.78rem; opacity: 0.8; }
@keyframes receipt-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes receipt-check { from { transform: scale(0); } 60% { transform: scale(1.2); } to { transform: scale(1); } }

/* White-label-toggle in de prijskaart (ambassadeur vs white-label) */
.card-wl-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-3) 0;
    font-size: var(--text-sm);
    cursor: pointer;
    line-height: 1.3;
}
.card-wl-toggle [data-wl-surcharge] { white-space: nowrap; }

/* iOS-stijl schakelaar: afgeronde baan + schuivend bolletje. Grijs = uit
   (ambassadeur, vermelding aan), oranje = aan (white-label, vermelding weg). */
.card-wl-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    margin: 0;
    border-radius: 999px;
    background: var(--color-border, #d8d2cc);
    cursor: pointer;
    transition: background 0.2s ease;
}
.card-wl-toggle input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}
.card-wl-toggle input[type="checkbox"]:checked {
    background: var(--color-orange);
}
.card-wl-toggle input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}
.card-wl-toggle input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--color-orange);
    outline-offset: 2px;
}

/* Werknemer-seat-stepper op de pakketkaart */
.card-seats {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin: var(--space-3) 0;
}
.card-seats-label {
    font-size: var(--text-sm);
    font-weight: 600;
}
.card-seats-control {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}
.card-seats-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-size: var(--text-lg);
    line-height: 1;
    cursor: pointer;
}
.card-seats-btn:hover {
    border-color: var(--color-orange);
}
.card-seats-btn:focus-visible {
    outline: 2px solid var(--color-orange);
    outline-offset: 2px;
}
.card-seats-count {
    min-width: 1.5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.card-seats-hint {
    min-height: 1.2em;
}

.coupling-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin: 0 var(--space-5) var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-orange-soft);
    border: 1px solid var(--color-orange-glow);
    border-radius: var(--radius-md);
}
.coupling-banner-text { font-size: 0.9rem; line-height: 1.4; }
.coupling-banner-link { white-space: nowrap; color: var(--color-orange); font-weight: 600; }
@media (max-width: 600px) {
    .coupling-banner { margin: 0 var(--space-4) var(--space-4); }
}
