/* =========================================================================
   sign.nl.legal — huisstijl nl.legal
   Palet en typografie overgenomen van nl.legal.
   ========================================================================= */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/assets/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --purple:        #4F2C75;
    --purple-dark:   #3B2058;
    --purple-light:  #6B3D9B;
    --purple-wash:   #F3EFF8;

    --green:         #428628;
    --green-dark:    #356B20;
    --green-fresh:   #8FC47A;
    --green-wash:    #EFF6EC;

    --dark:          #1a1a1a;
    --light:         #f4f4f4;

    --ink:           #1a1a1a;
    --ink-soft:      #55555f;
    --ink-faint:     #85858f;
    --line:          #e2e2e8;
    --line-soft:     #eeeef2;
    --surface:       #ffffff;
    --canvas:        #f7f7f9;

    --amber:         #B8860B;
    --amber-wash:    #FDF6E3;
    --red:           #A8322B;
    --red-wash:      #FBEFEE;

    --radius:        10px;
    --radius-sm:     6px;
    --shadow:        0 1px 2px rgba(26, 26, 26, .05), 0 4px 16px rgba(26, 26, 26, .05);
    --shadow-lg:     0 4px 12px rgba(26, 26, 26, .07), 0 16px 48px rgba(26, 26, 26, .09);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 600; letter-spacing: -.011em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p  { margin: 0 0 1em; }
a  { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--purple-light); }

.muted   { color: var(--ink-soft); }
.faint   { color: var(--ink-faint); }
.small   { font-size: .85rem; }
.mono    { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .82em; }
.nowrap  { white-space: nowrap; }
.right   { text-align: right; }
.center  { text-align: center; }

/* ── Applicatieschil ─────────────────────────────────────────────────────── */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px;
    flex: 0 0 232px;
    background: var(--purple);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 22px 0;
}

.sidebar__brand {
    padding: 0 22px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar__brand img { width: 34px; height: auto; filter: brightness(0) invert(1); }
.sidebar__brand span { font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; }
.sidebar__brand small { display: block; font-weight: 400; font-size: .74rem; opacity: .65; letter-spacing: .02em; }

.sidebar__nav { flex: 1; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar__nav a {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    font-size: .93rem;
    font-weight: 500;
    transition: background .12s, color .12s;
}
.sidebar__nav a:hover      { background: rgba(255, 255, 255, .09); color: #fff; }
.sidebar__nav a.is-active  { background: rgba(255, 255, 255, .15); color: #fff; }

.sidebar__foot { padding: 14px 22px 0; border-top: 1px solid rgba(255, 255, 255, .13); margin-top: 12px; }
.sidebar__user { font-size: .85rem; line-height: 1.4; }
.sidebar__user strong { display: block; font-weight: 600; }
.sidebar__user span   { opacity: .62; font-size: .78rem; }
.sidebar__logout {
    margin-top: 10px; background: none; border: 0; padding: 0;
    color: rgba(255, 255, 255, .62); font: inherit; font-size: .82rem;
    cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.sidebar__logout:hover { color: #fff; }

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

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.topbar h1 { margin: 0; font-size: 1.25rem; }

.content { padding: 26px 32px 60px; max-width: 1240px; width: 100%; }

/* ── Kaarten ─────────────────────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card__head {
    padding: 15px 20px;
    border-bottom: 1px solid var(--line-soft);
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.card__head h2 { margin: 0; font-size: 1rem; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }

/* ── Kerncijfers ─────────────────────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--purple);
    border-radius: var(--radius);
    padding: 15px 18px;
    box-shadow: var(--shadow);
}
.stat--green  { border-left-color: var(--green); }
.stat--amber  { border-left-color: var(--amber); }
.stat--faint  { border-left-color: var(--ink-faint); }
.stat__value  { font-size: 1.75rem; font-weight: 650; line-height: 1.1; letter-spacing: -.02em; }
.stat__label  { font-size: .8rem; color: var(--ink-soft); margin-top: 3px; }

/* ── Knoppen ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 17px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit; font-size: .92rem; font-weight: 550;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s, border-color .12s, color .12s;
    white-space: nowrap;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.btn--primary   { background: var(--purple); color: #fff; }
.btn--primary:hover:not(:disabled)  { background: var(--purple-light); color: #fff; }

.btn--go        { background: var(--green); color: #fff; }
.btn--go:hover:not(:disabled)       { background: var(--green-dark); color: #fff; }

.btn--ghost     { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover:not(:disabled)    { background: var(--light); color: var(--ink); }

.btn--danger    { background: var(--surface); color: var(--red); border-color: #e6cdcb; }
.btn--danger:hover:not(:disabled)   { background: var(--red-wash); }

.btn--lg        { padding: 13px 26px; font-size: 1rem; }
.btn--sm        { padding: 6px 12px; font-size: .84rem; }
.btn--block     { width: 100%; }

/* ── Formulieren ─────────────────────────────────────────────────────────── */

.field { margin-bottom: 17px; }
.field > label {
    display: block; margin-bottom: 6px;
    font-size: .87rem; font-weight: 550; color: var(--ink);
}
.field__hint { font-size: .8rem; color: var(--ink-faint); margin-top: 5px; }

.input, .select, .textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit; font-size: .94rem;
    color: var(--ink);
    transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(79, 44, 117, .12);
}
.textarea { min-height: 88px; resize: vertical; }

.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.checkline input[type="checkbox"] { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--green); }

/* ── Meldingen ───────────────────────────────────────────────────────────── */

.alert {
    padding: 11px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: .9rem;
    margin-bottom: 16px;
}
.alert--fout    { background: var(--red-wash);   border-color: #e6cdcb; color: #7d2620; }
.alert--goed    { background: var(--green-wash); border-color: #cfe3c7; color: var(--green-dark); }
.alert--let-op  { background: var(--amber-wash); border-color: #ecdcae; color: #7a5c08; }
.alert--info    { background: var(--purple-wash); border-color: #ddd2ea; color: var(--purple-dark); }

/* ── Tabellen ────────────────────────────────────────────────────────────── */

.table { width: 100%; border-collapse: collapse; font-size: .91rem; }
.table th {
    text-align: left; padding: 10px 20px;
    font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    color: var(--ink-faint);
    border-bottom: 1px solid var(--line);
    background: #fafafb;
}
.table td { padding: 12px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfcfd; }
.table a { font-weight: 550; text-decoration: none; }
.table a:hover { text-decoration: underline; }

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

/* ── Statuslabels ────────────────────────────────────────────────────────── */

.pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}
.pill--concept            { background: var(--light);        color: var(--ink-soft); }
.pill--verzonden          { background: var(--purple-wash);  color: var(--purple-dark); }
.pill--deels_ondertekend  { background: var(--amber-wash);   color: #7a5c08; }
.pill--verzegelen         { background: var(--purple-wash);  color: var(--purple-dark); }
.pill--voltooid           { background: var(--green-wash);   color: var(--green-dark); }
.pill--geweigerd,
.pill--mislukt            { background: var(--red-wash);     color: #7d2620; }
.pill--verlopen,
.pill--ingetrokken        { background: var(--light);        color: var(--ink-faint); }

/* ── Voortgang partijen ──────────────────────────────────────────────────── */

.progress { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-soft); }
.progress__bar { width: 54px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; flex: 0 0 auto; }
.progress__fill { height: 100%; background: var(--green); border-radius: 3px; }

/* ── Lege staat ──────────────────────────────────────────────────────────── */

.empty { padding: 54px 20px; text-align: center; color: var(--ink-soft); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p  { margin-bottom: 20px; font-size: .93rem; }

/* ── Los scherm (inloggen, foutpagina's) ─────────────────────────────────── */

.solo {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background:
        radial-gradient(1100px 500px at 50% -8%, rgba(79, 44, 117, .09), transparent 62%),
        var(--canvas);
}
.solo__box { width: 100%; max-width: 396px; }
.solo__brand { text-align: center; margin-bottom: 26px; }
.solo__brand img { width: 62px; height: auto; }
.solo__brand h1 { font-size: 1.28rem; margin: 12px 0 3px; }
.solo__brand p  { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.solo .card__body { padding: 26px; }
.solo__foot { text-align: center; margin-top: 20px; font-size: .8rem; color: var(--ink-faint); }
.solo__foot a { color: var(--ink-faint); }

/* ── Responsief ──────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .sidebar {
        width: 100%; flex: none;
        flex-direction: row; align-items: center;
        padding: 12px 16px; gap: 14px;
        overflow-x: auto;
    }
    .sidebar__brand { padding: 0; flex: 0 0 auto; }
    .sidebar__brand small { display: none; }
    .sidebar__nav { flex-direction: row; padding: 0; gap: 4px; }
    .sidebar__foot { border-top: 0; margin: 0; padding: 0; flex: 0 0 auto; }
    .sidebar__user strong, .sidebar__user span { display: none; }
    .topbar  { padding: 14px 18px; }
    .content { padding: 18px 18px 44px; }
}

/* ── Nieuw document ──────────────────────────────────────────────────────── */

.two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
@media (max-width: 940px) { .two-col { grid-template-columns: 1fr; } }

.formbar {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 18px; padding-top: 18px;
    border-top: 1px solid var(--line);
}

.dropzone {
    position: relative;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius);
    background: #fbfbfc;
    padding: 26px 18px;
    text-align: center;
    transition: border-color .12s, background .12s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--purple); background: var(--purple-wash); }
.dropzone.is-tegroot { border-color: #d9b3b0; background: var(--red-wash); }
.dropzone input[type="file"] {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}
.dropzone strong { display: block; font-weight: 600; margin-bottom: 3px; }
.dropzone span   { display: block; }

.partij {
    display: grid;
    grid-template-columns: 4px 74px 1fr 26px;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
}
.partij:first-child { padding-top: 0; }
.partij__kleur { width: 4px; height: 38px; border-radius: 2px; }
.partij__rol   { font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: var(--ink-soft); }
.partij__velden { display: grid; gap: 6px; min-width: 0; }
.partij__weg {
    background: none; border: 0; padding: 0;
    font-size: 1.3rem; line-height: 1; color: var(--ink-faint); cursor: pointer;
}
.partij__weg:hover { color: var(--red); }

.radioline {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 0; cursor: pointer;
}
.radioline + .radioline { border-top: 1px solid var(--line-soft); }
.radioline input { margin-top: 3px; accent-color: var(--purple); width: 16px; height: 16px; flex: 0 0 auto; }
.radioline strong { display: block; font-weight: 600; font-size: .92rem; }
.radioline em     { display: block; font-style: normal; font-size: .84rem; color: var(--ink-soft); margin-top: 1px; }

/* ── Documentdetail ──────────────────────────────────────────────────────── */

.doc-kop {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 18px; flex-wrap: wrap;
}
.doc-kop__acties { display: flex; gap: 8px; }

.rolstip {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    margin-right: 6px; vertical-align: middle;
}
.rolcel { white-space: nowrap; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 14px; margin: 0; font-size: .89rem; }
.kv dt { color: var(--ink-faint); font-size: .82rem; }
/* Afbreken op woordgrenzen, niet middenin een woord. Alleen hashes mogen
   overal breken — dat zijn geen woorden. */
.kv dd { margin: 0; overflow-wrap: break-word; }
.kv--hash { grid-template-columns: 82px 1fr; }
.kv--hash dd { font-size: .7rem; line-height: 1.5; word-break: break-all; color: var(--ink-soft); }

.tijdlijn { list-style: none; margin: 0; padding: 16px 20px; }
.tijdlijn li { position: relative; padding: 0 0 16px 20px; }
.tijdlijn li:last-child { padding-bottom: 0; }
.tijdlijn li::before {
    content: ''; position: absolute; left: 4px; top: 12px; bottom: -4px;
    width: 1px; background: var(--line);
}
.tijdlijn li:last-child::before { display: none; }
.tijdlijn__stip {
    position: absolute; left: 0; top: 6px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--purple);
}
.tijdlijn__inhoud strong { font-size: .88rem; font-weight: 600; }
.tijdlijn__meta {
    margin-top: 5px; padding: 5px 8px;
    background: var(--light); border-radius: 4px;
    font-size: .7rem; color: var(--ink-soft);
    word-break: break-all;
}
