/* SVM Beheer — tokens */
:root {
    --ink: #17303b;
    --ink-soft: #3d5560;
    --paper: #f2f4f2;
    --card: #ffffff;
    --line: #dde3e0;
    --green: #2f6b4f;
    --green-dark: #24543e;
    --amber: #b07d2b;
    --red: #a63d33;
    --text: #22323a;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0; font-family: var(--sans); background: var(--paper);
    color: var(--text); font-size: 15px; line-height: 1.5;
}

/* Topbar zoals de sales tool */
.topbar {
    display: flex; align-items: center; gap: 24px;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 10px 24px; position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 19px; }
.brand .mono { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.brand .sub { color: var(--green); margin-left: 4px; font-weight: 300; font-style: italic; }
.brand-lg { font-size: 26px; margin-bottom: 8px; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
    color: var(--ink-soft); text-decoration: none; padding: 7px 14px;
    border-radius: 6px; font-weight: 600; font-size: 14px;
}
.topbar nav a:hover { background: var(--paper); }
.topbar nav a.active { background: var(--ink); color: #fff; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-right .user { color: var(--ink-soft); font-size: 14px; margin-right: 4px; }

#app { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.laden { color: var(--ink-soft); padding: 40px; text-align: center; }

h1 { font-size: 24px; margin: 0 0 16px; color: var(--ink); font-weight: 650; }
h2 { font-size: 16px; margin: 28px 0 10px; color: var(--ink); }
h3 { font-size: 14px; margin: 12px 0 6px; }
a { color: var(--green-dark); }
code { font-family: var(--mono); font-size: 13px; background: #e8ede9; padding: 1px 5px; border-radius: 3px; }

/* Cards en stats */
.cards { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 14px; }
.stat { min-width: 150px; margin-bottom: 0; }
.stat-n { display: block; font-size: 24px; font-weight: 700; color: var(--ink); font-family: var(--mono); }
.stat-l { font-size: 13px; color: var(--ink-soft); }
.stat-attn { border-color: var(--amber); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfa; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.truncate { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--ink-soft); text-align: center; padding: 24px; }
.rij-klaar { opacity: .65; }

/* Status pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-pending  { background: #e7ecea; color: var(--ink-soft); }
.pill-running  { background: #dceaf5; color: #2b5d84; }
.pill-review   { background: #f5ead2; color: var(--amber); }
.pill-done     { background: #ddeee5; color: var(--green-dark); }
.pill-failed   { background: #f3ddda; color: var(--red); }
.pill-rejected { background: #e7e2ea; color: #6a5a78; }

/* Capability badges */
.cap { display: inline-block; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 6px; font-family: var(--mono); font-weight: 700; font-size: 14px; vertical-align: middle; }
.cap-A { background: var(--green); color: #fff; }
.cap-B { background: var(--amber); color: #fff; }
.cap-C { background: #90a19b; color: #fff; }

/* Formulieren */
label { display: block; margin: 12px 0; font-size: 14px; font-weight: 600; color: var(--ink); }
input, select, textarea {
    display: block; width: 100%; margin-top: 5px; padding: 8px 11px;
    border: 1px solid var(--line); border-radius: 6px; font: inherit; font-weight: 400;
    background: #fff;
}
.table input, .table select { margin: 3px 0; padding: 5px 8px; font-size: 13px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--green); outline-offset: 1px;
}

.btn {
    display: inline-block; padding: 8px 16px; border: 1px solid var(--line);
    border-radius: 6px; background: #fff; color: var(--ink); font: inherit;
    font-weight: 600; cursor: pointer; text-decoration: none; font-size: 14px;
}
.btn:hover { border-color: var(--ink-soft); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-full { width: 100%; margin-top: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-danger { background: none; border: none; color: var(--red); cursor: pointer; font-size: 12px; padding: 0 4px; }

.actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.actions-cel .btn { margin: 2px 0; display: block; width: 100%; text-align: center; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hint { color: var(--ink-soft); font-size: 13px; }

/* Flash en toasts */
.flash { padding: 11px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
.flash-ok { background: #ddeee5; color: var(--green-dark); }
.flash-error { background: #f3ddda; color: var(--red); }
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 16px rgba(23,48,59,.18); background: var(--ink); color: #fff; max-width: 380px; }
.toast-error { background: var(--red); }

/* Review / diff */
.review-card { border-left: 4px solid var(--amber); }
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.code {
    background: #10222b; color: #d5e3dd; padding: 14px; border-radius: 6px;
    font-family: var(--mono); font-size: 12.5px; overflow: auto; max-height: 480px;
    white-space: pre-wrap; word-break: break-word;
}

/* Log en notities */
.log { list-style: none; padding: 0; }
.log li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-time { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-right: 10px; }
.notes { list-style: none; padding: 0; }
.notes li { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; font-size: 14px; }

/* Modal */
.modal-achtergrond { position: fixed; inset: 0; background: rgba(23,48,59,.45); display: grid; place-items: center; z-index: 50; }
.modal { background: var(--card); border-radius: 10px; padding: 24px; width: 400px; max-width: 92vw; }

/* Login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--ink); }
.login-card { background: var(--card); border-radius: 10px; padding: 32px; width: 360px; }

@media (max-width: 900px) {
    .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
    .topbar-right { margin-left: 0; }
    #app { padding: 18px 14px 48px; }
    .cols, .diff-cols { grid-template-columns: 1fr; }
    .truncate { max-width: 160px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
