/* ═══════════════════════════════════════════════════════
   EXQUISE TOOLBOX - SHARED CSS
   Gedeelde huisstijl voor alle tools
   Basis: Paro Begroting kleurenpalet
   ═══════════════════════════════════════════════════════ */

/* ── VARIABELEN ── */
:root {
    --blauw:        #051c35;
    --blauw-hover:  #072847;
    --teal:         #0c575c;
    --teal-hover:   #094a4e;
    --teal-light:   #64aea3;
    --rood:         #cd3243;
    --rood-hover:   #b52a39;
    --grijs:        #f8f9fa;
    --grijs-border: #e9ecef;
    --wit:          #ffffff;
    --tekst:        #1a1a1a;
    --tekst-licht:  #666666;
    --tekst-muted:  #999999;
    --font:         'Segoe UI', Calibri, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--grijs);
    color: var(--tekst);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── HEADER ── */
.ex-header {
    background: var(--blauw);
    border-bottom: 3px solid var(--rood);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
}
.ex-header-title { font-weight: 700; color: #fff; font-size: 16px; }
.ex-header-sub   { font-size: 11px; color: var(--teal-light); }
.ex-header-right { display: flex; align-items: center; gap: 12px; }

/* ── KNOPPEN ── */
.ex-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}
.ex-btn:disabled          { opacity: 0.7; cursor: not-allowed; }
.ex-btn-blauw             { background: var(--blauw); color: #fff; }
.ex-btn-blauw:hover       { background: var(--blauw-hover); }
.ex-btn-teal              { background: var(--teal); color: #fff; }
.ex-btn-teal:hover        { background: var(--teal-hover); }
.ex-btn-rood              { background: var(--rood); color: #fff; }
.ex-btn-rood:hover        { background: var(--rood-hover); }
.ex-btn-wit               { background: #fff; color: var(--blauw); border: 1px solid var(--grijs-border); }
.ex-btn-wit:hover         { border-color: #ccc; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.ex-btn-ghost             { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); border: none; }
.ex-btn-ghost:hover       { background: rgba(255,255,255,0.18); color: #fff; }
.ex-btn-sm                { padding: 6px 12px; font-size: 12px; font-weight: 500; border-radius: 6px; }
.ex-btn-block             { width: 100%; justify-content: center; }

/* ── KAARTEN ── */
.ex-card {
    background: var(--wit);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--grijs-border);
}
.ex-card-title {
    font-weight: 600;
    color: var(--blauw);
    font-size: 14px;
    margin-bottom: 12px;
}

/* ── INVOER ── */
.ex-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--grijs-border);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--tekst);
    background: var(--wit);
    outline: none;
    transition: border-color 0.2s;
}
.ex-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(12,87,92,0.08);
}
.ex-input::placeholder { color: var(--tekst-muted); }

/* ── BADGES ── */
.ex-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ex-badge-groen  { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.ex-badge-teal   { background: #e8f4f5; color: var(--teal); border: 1px solid var(--teal-light); }
.ex-badge-rood   { background: #fdf2f3; color: var(--rood); border: 1px solid var(--rood); }
.ex-badge-blauw  { background: #f0f7ff; color: var(--blauw); border: 1px solid #bfdbfe; }
.ex-badge-grijs  { background: var(--grijs); color: #999; border: 1px solid var(--grijs-border); }

/* ── FASE KLEUREN (paro-specifiek, herbruikbaar) ── */
.ex-fase-intake      { background: #e8f4f5; border-color: var(--teal-light); color: var(--teal); }
.ex-fase-behandeling { background: #e8f4f5; border-color: var(--teal); color: var(--teal); }
.ex-fase-evaluatie   { background: #f0f7f6; border-color: var(--teal-light); color: var(--teal-light); }
.ex-fase-nazorg      { background: #fdf2f3; border-color: var(--rood); color: var(--rood); }

/* ── MELDINGEN ── */
.ex-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.ex-alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.ex-alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.ex-alert-info    { background: #f0f7ff; border: 1px solid #bfdbfe; color: var(--blauw); }

/* ── SPINNER ── */
.ex-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--grijs-border);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: ex-spin 0.6s linear infinite;
    display: inline-block;
}
@keyframes ex-spin { to { transform: rotate(360deg); } }

/* ── TABEL ── */
.ex-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ex-table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--tekst-licht);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--grijs-border);
}
.ex-table td { padding: 10px; border-bottom: 1px solid var(--grijs-border); }
.ex-table tr:last-child td { border-bottom: none; }
.ex-table tr:hover td { background: var(--grijs); }

/* ── MODAL ── */
.ex-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 16px;
    background: rgba(5, 28, 53, 0.6);
}
.ex-modal {
    background: var(--wit);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    overflow: hidden;
}
.ex-modal-header {
    padding: 20px 24px;
    border-bottom: 3px solid var(--blauw);
}
.ex-modal-body { padding: 24px; }
.ex-modal-footer {
    padding: 16px 24px;
    background: var(--grijs);
    border-top: 1px solid var(--grijs-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ── ZOEKBARE DROPDOWN ── */
.search-dropdown { position: relative; }
.search-dropdown input {
    width: 100%; padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #d1d5db; border-radius: 0.5rem; font-size: 0.95rem;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.search-dropdown input:focus { border-color: #0c575c; box-shadow: 0 0 0 3px rgba(12,87,92,0.15); }
.search-dropdown .dd-arrow {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    pointer-events: none; color: #9ca3af; transition: transform 0.2s;
}
.search-dropdown.open .dd-arrow { transform: translateY(-50%) rotate(180deg); }
.search-dropdown .dd-list {
    display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    max-height: 320px; overflow-y: auto; background: white; border: 1px solid #d1d5db;
    border-radius: 0.5rem; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 50;
}
.search-dropdown.open .dd-list { display: block; }
.search-dropdown .dd-item {
    padding: 0.5rem 1rem; cursor: pointer; font-size: 0.95rem; border-bottom: 1px solid #f3f4f6;
}
.search-dropdown .dd-item:last-child { border-bottom: none; }
.search-dropdown .dd-item:hover, .search-dropdown .dd-item.active { background: #f0fdfa; color: #0c575c; }
.search-dropdown .dd-item .dd-match { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.search-dropdown .dd-empty { padding: 1rem; text-align: center; color: #9ca3af; font-size: 0.9rem; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .ex-header { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
}

/* ── PRINT ── */
@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .ex-header, .ex-btn, .ex-overlay { display: none !important; }
    body { background: white !important; }
}
