/* Plaatsingsassistent — Maria Mediatrix */

.pa-page .pa-container {
    max-width: 920px;
}

.pa-header-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
}

.pa-nav-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
}

.pa-nav-link:hover {
    background: var(--surface-2);
}

/* Capaciteit */
.pa-capacity-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pa-capacity-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.pa-capacity-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.pa-capacity-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.pa-capacity-nums {
    text-align: right;
    font-size: 14px;
}

.pa-cap-used {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
}

.pa-cap-sep,
.pa-cap-max {
    color: var(--text-muted);
    font-weight: 600;
}

.pa-cap-remaining {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    margin-top: 2px;
}

.pa-cap-remaining.full {
    color: var(--gauge-full);
}

.pa-cap-bar-wrap {
    height: 10px;
    background: var(--line-2);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.pa-cap-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-bright), var(--gold));
    border-radius: 999px;
    transition: width 0.35s ease, background 0.2s;
}

.pa-cap-bar-fill.warn {
    background: linear-gradient(90deg, var(--gauge-warn), var(--status-iv));
}

.pa-cap-bar-fill.full {
    background: linear-gradient(90deg, var(--status-niet-gereed), var(--gauge-full));
}

.pa-cap-foot {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 14px;
}

.pa-cap-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pa-stat-card {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
}

.pa-stat-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
}

.pa-stat-lbl {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.35;
}

/* Modus */
.pa-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.pa-mode-btn {
    min-height: 48px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pa-mode-btn.active {
    background: var(--primary);
    border-color: transparent;
    color: #fff;
}

.pa-mode-icon {
    font-size: 16px;
}

.pa-info-banner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--accent-ink);
    margin-bottom: 16px;
    line-height: 1.45;
}

.pa-info-icon {
    font-weight: 700;
    flex-shrink: 0;
}

.pa-alert {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.pa-alert-danger {
    background: color-mix(in srgb, var(--gauge-full) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--gauge-full) 25%, var(--line));
    color: var(--gauge-full);
}

/* Secties */
.pa-section {
    margin-bottom: 20px;
}

.pa-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.pa-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.pa-section-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.45;
}

.pa-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--line-2);
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.pa-btn-text {
    border: none;
    background: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
}

/* Instroom kaarten */
.pa-instroom-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.pa-instroom-card {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pa-instroom-card:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.pa-instroom-card.selected {
    border-color: var(--status-vrij-map);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-vrij-map) 20%, transparent);
}

.pa-instroom-name {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.pa-instroom-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Chips */
.pa-chip {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pa-chip-nieuw {
    background: color-mix(in srgb, var(--status-nieuw) 15%, var(--surface));
    color: var(--status-nieuw);
}

.pa-chip-sh {
    background: color-mix(in srgb, var(--status-sh) 12%, var(--surface));
    color: var(--status-sh);
}

.pa-chip-bestaand {
    background: color-mix(in srgb, var(--status-bestaand) 12%, var(--surface));
    color: var(--accent-ink);
}

.pa-chip-pers {
    background: var(--surface-2);
    color: var(--text-muted);
    text-transform: none;
}

/* Bewoner detail */
.pa-bewoner-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.pa-bewoner-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.pa-bewoner-name {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 6px;
}

.pa-bewoner-q {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.pa-bewoner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px 20px;
    margin: 0;
}

.pa-bewoner-grid dt {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 2px;
    font-weight: 600;
}

.pa-bewoner-grid dd {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* Suggesties */
.pa-floor-filter {
    min-width: 140px;
    font-size: 13px;
}

.pa-suggest-list,
.pa-beschikbaar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pa-beschikbaar-card {
    border-color: var(--status-gereed);
}

.pa-room-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color 0.15s;
}

.pa-room-card.best {
    border-color: var(--status-vrij-map);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--status-vrij-map) 15%, transparent);
}

.pa-room-card.blocked {
    opacity: 0.92;
}

.pa-room-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.pa-room-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 4px;
}

.pa-room-meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.pa-match-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.pa-match-beste {
    background: color-mix(in srgb, var(--status-nieuw) 15%, var(--surface));
    color: var(--status-nieuw);
}

.pa-match-goed {
    background: color-mix(in srgb, var(--status-bestaand) 12%, var(--surface));
    color: var(--accent-ink);
}

.pa-match-mogelijk {
    background: var(--gold-soft);
    color: var(--accent-ink);
}

.pa-match-nee {
    background: color-mix(in srgb, var(--gauge-full) 8%, var(--surface));
    color: var(--gauge-full);
}

.pa-room-reasons {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
}

.pa-room-reasons li {
    padding: 2px 0 2px 22px;
    position: relative;
}

.pa-reason-ok::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--status-gereed);
    font-weight: 700;
}

.pa-reason-warn::before {
    content: '⚠';
    position: absolute;
    left: 0;
    color: var(--gauge-warn);
}

.pa-reason-block::before {
    content: '⊘';
    position: absolute;
    left: 0;
    color: var(--gauge-full);
    font-weight: 700;
}

.pa-place-btn {
    min-height: 40px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pa-place-btn:disabled {
    background: var(--line);
    cursor: not-allowed;
    opacity: 0.85;
}

.pa-place-btn::before {
    content: '⊕';
    font-size: 14px;
}

/* Gereedmaken */
.pa-gereed-section {
    margin-top: 28px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.pa-gereed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pa-gereed-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.pa-gereed-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
}

.pa-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.pa-check-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 12px;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.pa-check-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pa-check-pill .pa-check-box {
    width: 16px;
    height: 16px;
    border: 2px solid var(--line);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
}

.pa-check-pill.checked {
    background: color-mix(in srgb, var(--status-gereed) 10%, var(--surface));
    border-color: var(--status-gereed);
}

.pa-check-pill.checked .pa-check-box {
    border-color: var(--status-gereed);
    background: var(--status-gereed);
    color: #fff;
}

.pa-check-pill.checked .pa-check-box::after {
    content: '✓';
}

.pa-gereed-btn {
    width: 100%;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--line);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pa-gereed-btn.ready {
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.pa-gereed-btn.ready::before {
    content: '✓';
}

/* Form / modal */
.pa-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pa-modal[hidden] {
    display: none !important;
}

.pa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.pa-modal-card {
    position: relative;
    background: var(--surface);
    border-radius: 14px;
    padding: 20px 22px;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.pa-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 14px;
}

.pa-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.pa-form .pa-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 10px 0 4px;
}

.pa-input,
.pa-select,
.pa-textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.pa-textarea {
    min-height: 64px;
    resize: vertical;
}

.pa-btn {
    min-height: 42px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.pa-btn-primary {
    background: var(--primary);
    color: #fff;
}

.pa-btn-outline {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
}

.pa-impact-body {
    font-size: 14px;
    line-height: 1.55;
}

.pa-impact-body ul {
    margin: 8px 0;
    padding-left: 18px;
}

.pa-impact-body strong {
    color: var(--primary-dark);
}

.pa-verhuizing-pick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.pa-empty {
    color: var(--text-muted);
    font-size: 13px;
    margin: 8px 0;
}

.pa-status {
    font-size: 13px;
    min-height: 20px;
    margin-top: 8px;
}

.pa-status.ok {
    color: var(--status-gereed);
}

.pa-status.err {
    color: var(--gauge-full);
}

@media (max-width: 600px) {
    .pa-cap-stats {
        grid-template-columns: 1fr;
    }

    .pa-verhuizing-pick {
        grid-template-columns: 1fr;
    }

    .pa-header-nav {
        display: none;
    }
}
