/* EDU fagværktøj — EDU's visual identity (docs/BRIEF.md "Design og stil", read off edu-danmark.dk 2026-10-12).
   Stand-in fonts (SIL OFL) until EDU's licence for Escrow Text / Helvetica Neue is confirmed. Mobile first; the
   adviser and admin screens widen on desktop. No shadows; thin grey borders; red pills. */
@import url("/fonts/fonts.css");

:root {
  --red: #D95751;          /* EDU-rød: logo, primary buttons, active, coloured sections (large/bold text only) */
  --red-dark: #B8413C;     /* error and status text on white (WCAG AA) */
  --ink: #141414;          /* headings */
  --body: #424242;         /* body text, navigation */
  --muted: #767676;        /* help text, labels (#999 on white fails AA for small text) */
  --rule: #DBDBDB;         /* borders, dividers, table grid */
  --rule-2: #D6D6D6;
  --bg-grey: #F4F4F4;      /* footer, secondary buttons, inputs, cards */
  --th: #F2F2F2;           /* table header */
  --white: #FFFFFF;
  --ok: #2E6B3F;
  --serif: "Source Serif 4", "Escrow Text", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius-pill: 25px;
  --radius-field: 4px;
  --wrap: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--body); font: 400 15px/24px var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 30px; } h2 { font-size: 24px; } h3 { font-size: 18px; }
@media (max-width: 640px) { h1 { font-size: 26px; } h2 { font-size: 21px; } }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
p { margin: 0 0 12px; }
code { font: 13px/1.4 ui-monospace, Menlo, monospace; background: var(--bg-grey); padding: 1px 5px; border-radius: 3px; word-break: break-all; }
.hidden { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* --- header --------------------------------------------------------------------------------------------- */
.mast { border-bottom: 1px solid var(--rule); background: var(--white); position: sticky; top: 0; z-index: 20; }
.mast-in { max-width: var(--wrap); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 42px; height: 42px; display: block; transition: transform .4s cubic-bezier(.25,.46,.45,.94); }
.brand:hover img { transform: scale(1.05); }
.brand-t { font: 600 15px/1 var(--sans); letter-spacing: .01em; }
.mast-r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg-grey); color: var(--body); display: inline-grid; place-items: center; cursor: pointer; position: relative; text-decoration: none; }
.icon-btn:hover { background: var(--rule); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: var(--white); font: 700 11px/18px var(--sans); text-align: center; }
.nav { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 10px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; text-decoration: none; padding: 7px 14px; border-radius: var(--radius-pill); font: 500 13px/1 var(--sans); color: var(--body); background: var(--bg-grey); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--white); }

/* --- layout --------------------------------------------------------------------------------------------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 24px 16px 64px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.page-head p { color: var(--muted); margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-field); padding: 18px; }
.card.grey { background: var(--bg-grey); border-color: var(--bg-grey); }
.card h3 { margin-bottom: 6px; }
.label { font: 600 11px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.band { background: var(--red); color: var(--white); padding: 28px 20px; border-radius: var(--radius-field); margin-bottom: 20px; }
.band h1, .band h2 { color: var(--white); }
/* white on EDU red is only approved for large or bold text (brief "Tilgængelighed") */
.band p { color: var(--white); font: 600 17px/26px var(--sans); }
.band .label { color: var(--white); font-weight: 700; }
footer.foot { background: var(--bg-grey); color: var(--muted); font-size: 13px; }
footer.foot div { max-width: var(--wrap); margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer.foot a { color: var(--muted); }

/* --- buttons and forms ---------------------------------------------------------------------------------- */
button, .btn { font: 700 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; border: 0; border-radius: var(--radius-pill); padding: 12px 24px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; }
button.primary, .btn.primary { background: var(--red); color: var(--white); }
button.primary:hover, .btn.primary:hover { background: var(--red-dark); color: var(--white); }
button.ghost, .btn.ghost { background: var(--bg-grey); color: var(--body); }
button.ghost:hover, .btn.ghost:hover { background: var(--rule); color: var(--ink); }
button.link { background: none; padding: 4px 6px; min-height: 0; text-transform: none; letter-spacing: 0; font: 500 13px/1.2 var(--sans); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
button.danger { background: var(--white); color: var(--red-dark); border: 1px solid var(--red-dark); }
button:disabled { opacity: .55; cursor: default; }
label { display: block; font: 600 13px/1.4 var(--sans); color: var(--ink); margin: 14px 0 6px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=url], input:not([type]), select, textarea {
  width: 100%; font: 400 15px/1.4 var(--sans); color: var(--ink); background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-field); padding: 10px 12px; min-height: 44px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font: 400 14px/1.5 var(--sans); color: var(--body); margin: 12px 0 0; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); }
.form-row { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-row.two { grid-template-columns: 1fr 1fr; } .form-row.three { grid-template-columns: 1fr 1fr 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.note { color: var(--muted); font-size: 14px; }
.note.err, .err { color: var(--red-dark); }
.note.ok, .ok { color: var(--ok); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); text-transform: none; letter-spacing: 0; }
.pw-eye:hover { background: var(--bg-grey); color: var(--ink); }

/* --- tables --------------------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-field); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { background: var(--th); text-align: left; font: 600 12px/1.3 var(--sans); color: var(--ink); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.off td { color: var(--muted); }
.pill { display: inline-block; font: 600 11px/1 var(--sans); padding: 5px 9px; border-radius: 12px; background: var(--bg-grey); color: var(--body); white-space: nowrap; }
.pill.red { background: #FBE9E8; color: var(--red-dark); }
.pill.green { background: #E6F1E9; color: var(--ok); }
.pill.dark { background: var(--ink); color: var(--white); }

/* lists turn into cards on a phone */
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  table.stack td { border: 0; padding: 4px 12px; }
  table.stack td[data-h]::before { content: attr(data-h); display: block; font: 600 11px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
}

/* --- dialog --------------------------------------------------------------------------------------------- */
dialog { border: 1px solid var(--rule); border-radius: var(--radius-field); padding: 0; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(20,20,20,.45); }
dialog .dlg { padding: 22px; }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* --- notifications -------------------------------------------------------------------------------------- */
.bell-panel { position: absolute; right: 16px; top: 58px; width: min(380px, calc(100vw - 32px)); background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-field); z-index: 30; max-height: 70vh; overflow: auto; }
.bell-panel header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.bell-item { display: block; padding: 12px 14px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--body); }
.bell-item.unread { border-left: 3px solid var(--red); }
.bell-item b { display: block; color: var(--ink); font-weight: 600; }
.bell-item small { color: var(--muted); }

/* --- auth pages ----------------------------------------------------------------------------------------- */
.auth { min-height: calc(100vh - 63px); display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth-side { background: var(--red); color: var(--white); padding: 40px 32px; display: none; flex-direction: column; justify-content: center; }
@media (min-width: 900px) { .auth-side { display: flex; } }
.auth-side h2 { color: var(--white); font-size: 34px; }
.auth-side ul { padding-left: 18px; margin: 18px 0 0; }
.auth-side li { margin: 0 0 8px; font-size: 16px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .primary, .auth-card .ghost { width: 100%; margin-top: 14px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.qr svg, .qr img { width: 180px; height: 180px; display: block; margin: 8px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 6px 0; }
.toggle-row { display: grid; grid-template-columns: 1fr; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) { .toggle-row { grid-template-columns: 1fr 140px 150px; align-items: center; } }
.toggle-row select { min-height: 38px; padding: 6px 10px; font-size: 14px; }
