/* IPMA Content Agent, in de huisstijl van ipma.nl: Montserrat, navy #0b1a3f, rood #e52526,
   witte tegels met een rode rand links en ronde knoppen. */

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/montserrat-latin.woff2") format("woff2");
}

:root {
    --navy: #0b1a3f;
    --navy-heading: #00215b;
    --red: #e52526;
    --text: #464646;
    --muted: #6b6b6b;
    --line: #e5dfdd;
    --bg: #f5f5f5;
    --white: #ffffff;
    --light-blue: #dee5f5;
    --shadow: 0 0 12px rgba(145, 145, 145, 0.45);
    --ok: #26704a;
    --ok-bg: #e3f2e8;
    --warn: #7a4d00;
    --warn-bg: #fff0d1;
    --err: #b3191a;
    --err-bg: #fde4e4;
    --pill: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--navy-heading); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 1em; }
code { background: #f1f1f1; padding: 1px 6px; border-radius: 3px; font-size: 13.5px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.nowrap { white-space: nowrap; }
.center { justify-content: center; }
.pre { white-space: pre-wrap; background: #fafafa; border: 1px solid var(--line); padding: 10px 12px; margin-top: 8px; max-height: 320px; overflow: auto; }

/* Kop en menu zoals ipma.nl */
.topbar { background: var(--white); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 18px; }
.brand:hover { text-decoration: none; }
.brand img { height: 54px; width: auto; display: block; }
.brand-app { color: var(--navy); font-weight: 700; font-size: 18px; padding-left: 18px; border-left: 3px solid var(--red); line-height: 1.2; }
.usermenu { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.usermenu > a { color: var(--navy); font-weight: 600; }
.usermenu > a:hover, .usermenu > a.active { color: var(--red); text-decoration: none; }
.menubar { background: var(--navy); }
.menubar-empty { height: 8px; }
.menubar .wrap { display: flex; flex-wrap: wrap; gap: 0 30px; }
.menubar a { color: #fff; display: inline-block; padding: 15px 0 12px; font-size: 16px; border-bottom: 3px solid transparent; transition: color 0.3s ease-out; }
.menubar a:hover { color: var(--red); text-decoration: none; }
.menubar a.active { border-bottom-color: var(--red); }
main.wrap { padding-top: 32px; padding-bottom: 40px; }
.footer { color: var(--muted); font-size: 13px; padding: 10px 0 40px; }

/* Tegels met rode rand links */
.tile { background: var(--white); border-left: 4px solid var(--red); box-shadow: var(--shadow); padding: 22px 26px; margin-bottom: 26px; }
.tile.blue { background: var(--light-blue); box-shadow: none; }
.tile.inner { border-left-color: var(--navy); padding: 16px 20px; margin: 4px 0 18px; }
.tile > :last-child { margin-bottom: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }

/* Knoppen */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
    padding: 10px 20px; border-radius: var(--pill); border: 1px solid var(--red);
    background: var(--red); color: #fff; cursor: pointer;
    transition: background 0.3s ease-out, border-color 0.3s ease-out, color 0.3s ease-out;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; text-decoration: none; }
.btn-outline { background: #fff; color: var(--red); }
.btn-outline:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-navy { background: var(--navy); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy); border-color: var(--navy); color: var(--red); }
.btn-small { padding: 6px 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.65; cursor: not-allowed; }
.btn.is-busy { cursor: wait; }
.linkbutton { background: none; border: 0; padding: 0; font: inherit; color: var(--red); cursor: pointer; }
.linkbutton:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.inline-form { display: inline; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 6px 0 0; }
.back { display: inline-block; font-size: 14px; margin-bottom: 8px; }

/* Formulieren */
label, legend { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: 15px; }
fieldset.plain { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.field { margin-bottom: 18px; }
.hint { font-size: 13.5px; color: var(--muted); margin: 5px 0 0; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="datetime-local"], input[type="number"], select, textarea {
    width: 100%; font: inherit; font-size: 15px; color: var(--text); background: #fff;
    border: 1px solid #c9c9c9; border-radius: 4px; padding: 9px 12px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="datetime-local"], input[type="number"], select { min-height: 42px; }
textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
textarea.tall { min-height: 440px; font-size: 14.5px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); margin-bottom: 8px; }
.check input { margin-top: 5px; flex: none; }
.prefix-input { display: flex; }
.prefix-input span { background: #eee; border: 1px solid #c9c9c9; border-right: 0; padding: 9px 10px; border-radius: 4px 0 0 4px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.prefix-input input { border-radius: 0 4px 4px 0; }
.counter { font-size: 13px; color: var(--muted); text-align: right; margin-top: 4px; }
.counter.over-soft { color: var(--warn); font-weight: 600; }
.counter.over-hard { color: var(--err); font-weight: 700; }
.secret-state { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: flex-end; }
.filters .field { min-width: 180px; margin-bottom: 12px; }
.filters .field.grow { flex: 1; }
.filters .actions { margin-bottom: 12px; }

/* Keuze soort tekst */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.choice { position: relative; display: block; border: 1px solid var(--line); border-left: 4px solid var(--line); padding: 12px 14px; cursor: pointer; background: #fff; font-weight: 400; color: var(--text); margin: 0; transition: border-color 0.2s ease-out; }
.choice:hover { border-left-color: var(--red); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice strong { display: block; color: var(--navy); margin-bottom: 2px; }
.choice span { font-size: 13.5px; line-height: 1.45; display: block; }
.choice:has(input:checked) { border-color: var(--red); border-left-color: var(--red); background: #fff6f6; }
.choice:has(input:focus-visible) { outline: 2px solid var(--navy); }

/* Meldingen */
.flash { padding: 12px 16px; margin-bottom: 18px; border-left: 4px solid; background: #fff; white-space: pre-line; }
.flash.success { border-color: var(--ok); background: var(--ok-bg); }
.flash.error { border-color: var(--err); background: var(--err-bg); }
.flash.info { border-color: var(--navy); background: var(--light-blue); }
.flash.warning { border-color: #d99a00; background: var(--warn-bg); }

/* Labels */
.badge { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: var(--pill); background: #eee; color: var(--text); white-space: nowrap; line-height: 1.6; }
.badge.status-concept, .badge.pub-concept { background: var(--light-blue); color: var(--navy); }
.badge.status-klaar, .badge.pub-gepland { background: var(--warn-bg); color: var(--warn); }
.badge.status-gepubliceerd, .badge.pub-gelukt { background: var(--ok-bg); color: var(--ok); }
.badge.status-fout, .badge.pub-mislukt { background: var(--err-bg); color: var(--err); }
.badge.status-bezig { background: var(--navy); color: #fff; }
.badge.status-archief { background: #eee; color: var(--muted); }
.badge.cat-publish { background: var(--ok-bg); color: var(--ok); }
.badge.cat-content { background: var(--light-blue); color: var(--navy); }
.badge.cat-auth { background: #f1f1f1; }
.badge.cat-settings, .badge.cat-user { background: var(--warn-bg); color: var(--warn); }
.badge.cat-mail, .badge.cat-topic { background: #fde9e9; color: #8a1d1e; }

/* Filters */
.pills, .subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pill { border: 1px solid var(--red); color: var(--red); background: #fff; border-radius: var(--pill); padding: 5px 14px; font-size: 14px; transition: background 0.3s ease-out, color 0.3s ease-out; }
.pill:hover, .pill.active { background: var(--red); color: #fff; text-decoration: none; }
.pill .n { opacity: 0.8; margin-left: 6px; }

/* Lijst met stukken */
.item-list { display: grid; gap: 14px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; background: #fff; border-left: 4px solid var(--red); box-shadow: var(--shadow); padding: 16px 22px; color: inherit; transition: box-shadow 0.2s ease-out; }
.item:hover { box-shadow: 0 0 18px rgba(11, 26, 63, 0.35); text-decoration: none; }
.item-title { color: var(--navy-heading); font-weight: 700; font-size: 17px; line-height: 1.35; }
.item-title em { font-weight: 600; color: var(--muted); }
.item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.item-pubs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.empty { text-align: center; padding: 40px 20px; }

/* Kolommen */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.cols-2 > section, .cols-2 > form { align-self: start; }

/* Voorbeeld van de blog, zoals op ipma.nl */
.preview { font-size: 16px; }
.preview h1 { font-size: 30px; color: var(--navy-heading); }
.preview h2 { font-size: 22px; font-weight: 400; color: var(--text); margin-top: 1.4em; }
.preview h3 { font-weight: 600; color: var(--text); }
.preview .lead { font-weight: 600; }
.preview ul, .preview ol { padding-left: 1.3em; }
.preview li { margin-bottom: 4px; }
.preview blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--red); color: var(--navy); font-style: italic; }
.linkedin-preview { white-space: pre-wrap; font-family: -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; line-height: 1.45; color: #191919; background: #fff; border: 1px solid #e0dfdc; border-radius: 8px; padding: 14px 16px; max-width: 560px; }

/* Tabellen */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; color: var(--navy); font-weight: 700; border-bottom: 2px solid var(--navy); padding: 8px 10px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: top; }
tbody tr:hover td { background: #fafafa; }
tr.inactive td { opacity: 0.55; }
td input[type="text"], td select { min-width: 140px; }

/* Bezig met schrijven */
.working { display: flex; gap: 20px; align-items: center; }
.working h2 { margin-bottom: 4px; }
.spinner { width: 38px; height: 38px; border: 4px solid var(--light-blue); border-top-color: var(--red); border-radius: 50%; animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }

/* Stappen, tijdlijn, lijstjes */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1em; }
.steps li { counter-increment: step; position: relative; padding-left: 38px; margin-bottom: 16px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.steps .actions { margin-top: 8px; }
.steps input[type="url"] { flex: 1; min-width: 220px; }
.timeline { list-style: none; padding: 0; margin: 0 0 1em; font-size: 14px; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.checklist { padding-left: 1.2em; margin: 0 0 1em; }
.checklist li { margin-bottom: 6px; }
details summary { cursor: pointer; color: var(--red); }
.auth-box { max-width: 460px; margin: 30px auto; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 18px; }

@media (max-width: 960px) {
    .cols, .cols-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .wrap { padding: 0 16px; }
    h1 { font-size: 25px; }
    .tile { padding: 18px 16px; }
    .brand img { height: 42px; }
    .brand-app { font-size: 16px; padding-left: 12px; }
    .menubar .wrap { gap: 0 18px; }
    .menubar a { font-size: 15px; padding: 12px 0 9px; }
    .item { grid-template-columns: minmax(0, 1fr); }
    .item-side { align-items: flex-start; }
    .item-pubs { justify-content: flex-start; }
}
