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

:root {
  --bg:      #f5f6f8;
  --surface: #ffffff;
  --border:  #e2e4e9;
  --text:    #1a1d23;
  --muted:   #6b7280;
  --primary: #2563eb;
  --primary-h: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger:  #dc2626;
  --radius:  6px;
  --nav-h:   52px;
}

body { font-family: system-ui, -apple-system, sans-serif; font-size: 14px;
       background: var(--bg); color: var(--text); line-height: 1.5; }

/* ── Nav ── */
nav { height: var(--nav-h); background: var(--surface); border-bottom: 1px solid var(--border);
      display: flex; align-items: center; padding: 0 24px; gap: 4px; position: sticky; top: 0; z-index: 10; }
.nav-brand { font-weight: 700; color: var(--primary); margin-right: 16px; white-space: nowrap; }
nav a { padding: 6px 12px; border-radius: var(--radius); color: var(--muted);
        text-decoration: none; transition: background .15s; }
nav a:hover, nav a.active { background: var(--bg); color: var(--text); }
.nav-logout { margin-left: auto; }

/* ── Main ── */
main { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
h1 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }

/* ── Alerts ── */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Buttons ── */
.btn { display: inline-block; padding: 8px 16px; background: var(--primary); color: #fff;
       border: none; border-radius: var(--radius); cursor: pointer; font-size: 13px;
       text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--primary-h); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; background: var(--surface);
        border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
th { background: var(--bg); font-weight: 600; font-size: 12px; text-transform: uppercase;
     letter-spacing: .04em; color: var(--muted); padding: 10px 12px; text-align: left;
     border-bottom: 1px solid var(--border); }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }
.row-success { }
.row-unmapped td:first-child { border-left: 3px solid var(--warning); }
.row-error   td:first-child { border-left: 3px solid var(--danger); }
.row-skip td { color: var(--muted); }
.mono { font-family: 'SF Mono', 'Consolas', monospace; font-size: 12px; }
.small { font-size: 12px; }
.num  { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Badges ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.badge-success  { background: #dcfce7; color: #166534; }
.badge-unmapped { background: #fef3c7; color: #92400e; }
.badge-error    { background: #fee2e2; color: #991b1b; }
.badge-skip     { background: var(--bg); color: var(--muted); }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
             gap: 14px; margin-bottom: 16px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted);
        text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
label small { text-transform: none; font-weight: 400; }
input[type=text], input[type=password], input[type=file], select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px; background: var(--surface);
  transition: border-color .15s; }
input:focus, select:focus { outline: none; border-color: var(--primary); }

/* ── Login ── */
.login-box { max-width: 360px; margin: 80px auto; background: var(--surface);
             padding: 32px; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.login-box h1 { text-align: center; margin-bottom: 4px; }
.login-box .subtitle { text-align: center; color: var(--muted); margin-bottom: 24px; }
.login-box label { margin-top: 12px; }
.login-box button { width: 100%; margin-top: 20px; padding: 10px; font-size: 14px; }

/* ── Upload ── */
.upload-form { background: var(--surface); padding: 20px; border-radius: var(--radius);
               box-shadow: 0 1px 3px rgba(0,0,0,.06); max-width: 520px; margin-bottom: 20px; }
.upload-form .btn { margin-top: 12px; }
.result-box  { background: #dcfce7; border: 1px solid #86efac; border-radius: var(--radius);
               padding: 16px; margin-bottom: 16px; }
.warning-box { background: #fef3c7; border: 1px solid #fcd34d; border-radius: var(--radius);
               padding: 16px; }
.warning-box table { margin-top: 10px; }

/* ── Mapping ── */
.add-form { background: var(--surface); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.add-form summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.add-form form { margin-top: 14px; }
.mapping-table { margin-top: 4px; }

/* ── Settings ── */
.settings-section { background: var(--surface); border-radius: var(--radius);
                    box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 20px; margin-bottom: 20px; }

/* ── Misc ── */
.muted  { color: var(--muted); }
.empty  { color: var(--muted); padding: 32px 0; text-align: center; }
.actions { margin-top: 16px; }
code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* ── Extra buttons ── */
.btn-secondary { background: var(--muted); }
.btn-secondary:hover { background: #4b5563; }
.btn-post { background: #16a34a; }
.btn-post:hover { background: #15803d; }
.btn-warn-outline { background: transparent; border: 1px solid var(--warning);
                    color: var(--warning); padding: 6px 14px; }
.btn-warn-outline:hover { background: #fef3c7; }

/* ── Dashboard extra ── */
.badge-pending_review { background: #dbeafe; color: #1e40af; }
.badge-posted         { background: #dcfce7; color: #166534; }
.row-pending_review td:first-child { border-left: 3px solid #2563eb; }
.row-posted  td:first-child { border-left: 3px solid var(--success); }
.actions-cell { white-space: nowrap; }

/* ── Review page ── */
.review-meta { display: flex; gap: 24px; flex-wrap: wrap;
               background: var(--surface); border: 1px solid var(--border);
               border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.meta-item  { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; font-weight: 600; text-transform: uppercase;
              letter-spacing: .04em; color: var(--muted); }
.review-actions { display: flex; align-items: center; gap: 12px;
                  margin-top: 18px; flex-wrap: wrap; }
.row-mutatie td { color: var(--muted); font-style: italic; }
tfoot .total-row td { border-top: 2px solid var(--border);
                      font-weight: 600; padding-top: 10px; }

/* ── EOL settings status ── */
.eol-status { margin-bottom: 8px; }

/* ── Upload result: post button ── */
.upload-post-hint { margin-top: 12px; }
