/* Look en feel overgenomen van de COW-portal (claude/ad-portal, css/style.css):
   kleuren, kopbalk, oranje titelbalk, knoppen, tabellen, meldingen en badges.
   Zonder de logo's van die portal. */
:root {
    --primair: #154273;
    --primair-donker: #0e2f54;
    --accent: #cc6c0b;
    --grijs-50: #f9fafb;
    --grijs-100: #f3f4f6;
    --grijs-200: #e5e7eb;
    --grijs-300: #d1d5db;
    --grijs-500: #6b7280;
    --grijs-700: #374151;
    --grijs-900: #111827;
    --succes: #16a34a;
    --waarschuwing: #d97706;
    --fout: #dc2626;
    --schaduw: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0; background: var(--grijs-50); color: var(--grijs-900); line-height: 1.5;
}
a { color: var(--primair); }

/* Beheerlayout: donkere zijbalk links, inhoud rechts (zoals het beheerportaal van de COW-portal). */
body.admin-shell { margin: 0; background: var(--grijs-100); }
.admin-wrap { display: flex; min-height: 100vh; align-items: stretch; }
.admin-sidebar { width: 232px; flex: 0 0 232px; background: #0f172a; color: #e2e8f0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-logo { padding: 1.15rem 1.25rem 0.95rem; border-bottom: 1px solid #1e293b; }
.admin-logo .titel { display: block; font-weight: 800; font-size: 1.55rem; letter-spacing: 0.1em; color: #f8fafc; line-height: 1.1; text-decoration: none; font-style: italic; }
.admin-merk-onder { display: block; color: #7db8ff; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.64rem; line-height: 1.25; margin-top: 0.3rem; }
.beheer-badge { display: inline-block; margin-top: 0.5rem; background: #c2410c; color: #fff7ed; border-radius: 99px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.15rem 0.6rem; }
.admin-nav { flex: 1; padding: 0.6rem 0; }
.admin-nav a, .admin-zij-voet a, .admin-zij-voet button { display: flex; align-items: center; gap: 0.65rem; padding: 0.58rem 1.25rem; color: #94a3b8; text-decoration: none; font-size: 0.92rem; border: 0; border-left: 3px solid transparent; transition: background 0.12s, color 0.12s; background: none; width: 100%; font-family: inherit; cursor: pointer; text-align: left; }
.admin-nav a:hover, .admin-zij-voet a:hover, .admin-zij-voet button:hover { background: #1e293b; color: #f1f5f9; }
.admin-nav a.actief { background: #1e293b; color: #ffffff; border-left-color: #c2410c; font-weight: 600; }
.zij-icoon { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.zij-badge { margin-left: auto; background: #c2410c; color: #fff7ed; border-radius: 10px; font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.5rem; line-height: 1.5; }
.admin-zij-voet { border-top: 1px solid #1e293b; padding: 0.6rem 0 0.9rem; }
.admin-zij-voet .ingelogd-als { padding: 0.35rem 1.25rem 0.55rem; font-size: 0.78rem; color: #64748b; }
.admin-zij-voet .ingelogd-als strong { color: #cbd5e1; }
.admin-main { flex: 1; min-width: 0; padding: 1.6rem 2rem 2.5rem; }
.dash-titel { margin: 0 0 1.2rem; font-size: 1.45rem; font-weight: 700; color: var(--grijs-900); }
.dash-kop { font-size: 1.15rem; margin: 1.6rem 0 0.7rem; }
.admin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin-bottom: 1.6rem; }
.kpi-kaart { background: white; border-radius: 8px; padding: 0.85rem 1.1rem; box-shadow: var(--schaduw); text-decoration: none; display: block; border-bottom: 3px solid transparent; transition: transform 0.1s; }
a.kpi-kaart:hover { transform: translateY(-2px); }
.kpi-kaart .label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grijs-500); margin-bottom: 0.2rem; }
.kpi-kaart .waarde { font-size: 1.7rem; font-weight: 700; color: var(--grijs-900); line-height: 1.1; }
.kpi-kaart.kpi-oranje { border-bottom-color: #c2410c; } .kpi-kaart.kpi-oranje .waarde { color: #c2410c; }
.kpi-kaart.kpi-geel { border-bottom-color: #d97706; } .kpi-kaart.kpi-geel .waarde { color: #b45309; }
.kpi-kaart.kpi-groen { border-bottom-color: #16a34a; } .kpi-kaart.kpi-groen .waarde { color: #15803d; }
.kpi-kaart.kpi-blauw { border-bottom-color: #2563eb; } .kpi-kaart.kpi-blauw .waarde { color: #1d4ed8; }
body.login .admin-main { max-width: 460px; margin: 0 auto; padding-top: 12vh; }
body.login .dash-titel { text-align: center; }

h2 { margin-top: 0; }
h3 { margin: 2rem 0 0.75rem; }
form { background: white; border: 1px solid var(--grijs-200); border-radius: 8px; padding: 1.5rem 2rem; box-shadow: var(--schaduw); max-width: 700px; margin-bottom: 1.5rem; }
form.breed { max-width: none; }
form.rij { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
form.rij .veld { margin-bottom: 0; flex: 1 1 150px; }
form.rij .veld label { text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; font-weight: 600; }
.veld { margin-bottom: 1.25rem; }
.veld label { display: block; font-weight: 500; margin-bottom: 0.35rem; color: var(--grijs-700); font-size: 0.9rem; }
.veld input[type="text"], .veld input[type="password"], .veld input[type="number"], .veld select {
    width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--grijs-300); border-radius: 6px; font-size: 0.95rem; font-family: inherit; background: white;
}
.veld textarea { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--grijs-300); border-radius: 6px; font-size: 0.95rem; font-family: inherit; background: white; resize: vertical; }
.veld textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.veld .naast { display: flex; gap: 0.5rem; }
.veld .naast input { flex: 1 1 0; }
.veld .naast select { flex: 1 1 0; }
.veld textarea:focus, .veld input:focus, .veld select:focus { outline: none; border-color: var(--primair); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.veld .uitleg { color: var(--grijs-500); font-size: 0.8rem; margin-top: 0.25rem; }
.voorbeeld { width: 100%; height: 720px; border: 1px solid var(--grijs-200); border-radius: 8px; background: white; box-shadow: var(--schaduw); }
.tips { margin: 0 0 1.25rem; padding: 0.75rem 1rem 0.75rem 2rem; background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; color: #92400e; font-size: 0.88rem; }
.tips li { margin: 0.15rem 0; }
h3.eerste { margin-top: 0; }
.vinkjes label { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 1rem; font-weight: 400; }

.knop { display: inline-block; background: var(--primair); color: white; border: none; padding: 0.65rem 1.5rem; border-radius: 6px; font-size: 0.95rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.15s; font-family: inherit; }
.knop:hover { background: var(--primair-donker); }
.knop:disabled { opacity: 0.6; cursor: default; }
.knop.secundair { background: white; color: var(--grijs-700); border: 1px solid var(--grijs-300); }
.knop.secundair:hover { background: var(--grijs-100); }
.knop.fout { background: var(--fout); }
.knop.fout:hover { background: #b91c1c; }
.knop.klein { padding: 0.32rem 0.7rem; font-size: 0.82rem; white-space: nowrap; }
.acties { display: flex; gap: 0.5rem; }

.melding { padding: 1rem; border-radius: 6px; margin-bottom: 1.5rem; }
.melding.succes { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.melding.fout { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.melding.info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.geheim { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }
code { background: var(--grijs-100); border: 1px solid var(--grijs-200); border-radius: 4px; padding: 0.1rem 0.35rem; font-size: 0.85rem; word-break: break-all; }

table { width: 100%; background: white; border-collapse: collapse; border-radius: 8px; overflow: hidden; box-shadow: var(--schaduw); margin-bottom: 1.5rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--grijs-200); font-size: 0.9rem; vertical-align: top; }
th { background: var(--grijs-100); font-weight: 600; color: var(--grijs-700); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--grijs-50); }
tr.klikbaar { cursor: pointer; }
.detail-tabel th { width: 30%; }
.leeg { color: var(--grijs-500); padding: 1.5rem; text-align: center; background: white; border-radius: 8px; box-shadow: var(--schaduw); margin-bottom: 1.5rem; }
.klein-grijs { color: var(--grijs-500); font-size: 0.8rem; }

.statusbalk { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.statusbalk a { background: white; border: 1px solid var(--grijs-200); border-radius: 8px; padding: 1rem 1.5rem; text-decoration: none; color: var(--grijs-700); box-shadow: var(--schaduw); flex: 1; min-width: 150px; }
.statusbalk a:hover, .statusbalk a.actief { border-color: var(--primair); background: #eff6ff; }
.statusbalk .getal { font-size: 1.75rem; font-weight: 600; color: var(--primair); }
.statusbalk .label { font-size: 0.85rem; color: var(--grijs-500); }

.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 99px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.badge.wachtend { background: #fef3c7; color: #92400e; }
.badge.goed { background: #dcfce7; color: #166534; }
.badge.fout { background: #fee2e2; color: #991b1b; }
.badge.info { background: #dbeafe; color: #1e40af; }
.badge.oranje { background: #ffedd5; color: #9a3412; }
.badge.grijs { background: var(--grijs-100); color: var(--grijs-700); }

.login-box { max-width: 420px; margin: 0 auto; }
.login-box form { max-width: none; }
.noodingang { margin-top: 1rem; }
.noodingang summary { color: var(--grijs-500); font-size: 0.85rem; cursor: pointer; margin-bottom: 0.75rem; }
@media (max-width: 800px) {
    .admin-wrap { flex-direction: column; }
    .admin-sidebar { width: auto; flex: none; height: auto; position: static; }
    .admin-nav { display: flex; flex-wrap: wrap; }
    .admin-nav a { width: auto; }
    .admin-main { padding: 1rem; }
}
@media (max-width: 1150px) {
    table { display: block; overflow-x: auto; }
}
