/* Omsorgspartner kurs – visuell profil: dyp rød, varme gråtoner, kondensert fet overskrift */
:root {
  --red: #9b1f2b; --red-strong: #b41e29; --red-dark: #7a1722; --red-tint: #f8e9eb; --red-line: #e7c3c8;
  --ink: #3d3e40; --ink-soft: #58595b; --muted: #6f7072;
  --grey-1: #b0b0b0; --grey-2: #d9dad9; --grey-3: #ececeb; --bg: #f5f5f3; --card: #fff;
  --green: #2f7d4f; --green-bg: #e2f1e7; --green-line: #8ec7a2;
  --yellow: #7a5a00; --yellow-bg: #fff3c4; --yellow-line: #e8c547;
  --blue: #2c5d8a; --blue-bg: #e6eef6;
  --org: var(--red); --ind: #4a4b4e;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --head: 'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--bg); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(30px, 4.4vw, 44px); } h2 { font-size: clamp(24px, 3vw, 30px); } h3 { font-size: 21px; } h4 { font-size: 18px; }
p { margin: 0 0 1em; } a { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid #2c5d8a; outline-offset: 2px; }

/* Topp */
.preview-bar { background: #2b2c2e; color: #fff; font-size: 14px; padding: 7px 0; }
.preview-bar .wrap { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.preview-bar b { color: #ffd7dc; }
.preview-bar label { display: inline-flex; gap: 8px; align-items: center; }
.preview-bar select { max-width: 330px; }
.preview-bar select, .preview-bar button { background: #45464a; color: #fff; border: 1px solid #5c5d61; border-radius: 999px; padding: 4px 12px; font-size: 14px; cursor: pointer; }
header.site { background: #fff; border-bottom: 1px solid var(--grey-2); position: sticky; top: 0; z-index: 30; }
header.site .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand img { height: 52px; width: auto; display: block; }
.brand .tag { border-left: 1px solid var(--grey-2); padding-left: 14px; font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; }
nav.main { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a { font-family: var(--head); font-weight: 700; font-size: 17px; text-decoration: none; color: var(--ink-soft); padding: 9px 14px; border-radius: 999px; }
nav.main a:hover { background: var(--grey-3); color: var(--ink); }
nav.main a.active { color: var(--red); background: var(--red-tint); }
nav.main a.cta { background: var(--ink); color: #fff; } nav.main a.cta:hover { background: #222; }
@media (max-width: 860px) {
  header.site .wrap { flex-wrap: wrap; gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .brand img { height: 40px; } .brand .tag { display: none; }
  nav.main { margin-left: 0; width: 100%; } nav.main a { font-size: 15px; padding: 6px 10px; }
}
main { min-height: 62vh; padding-bottom: 64px; }
footer.site { border-top: 1px solid var(--grey-2); background: #fff; padding: 26px 0; font-size: 14px; color: var(--muted); }
footer.site .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--ink-soft); }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid transparent; border-radius: 999px; padding: 10px 22px; font-family: var(--head); font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; line-height: 1.15; white-space: nowrap; }
.btn-primary { background: var(--red); color: #fff; } .btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: #fff; color: var(--red); border-color: var(--red); } .btn-secondary:hover { background: var(--red-tint); }
.btn-dark { background: var(--ink); color: #fff; } .btn-dark:hover { background: #222; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--grey-2); } .btn-ghost:hover { border-color: var(--grey-1); color: var(--ink); background: #fff; }
.btn-danger { background: #fff; color: #a3262a; border-color: #e3b3b6; } .btn-danger:hover { background: #fbecec; }
.btn-sm { padding: 6px 14px; font-size: 15px; } .btn-xs { padding: 3px 10px; font-size: 14px; border-width: 1px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--red); text-decoration: underline; cursor: pointer; font: inherit; }

/* Seksjoner, kort */
.hero { background: #fff; border-bottom: 1px solid var(--grey-2); padding: 44px 0 40px; position: relative; overflow: hidden; }
.hero .eyebrow { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); font-size: 15px; margin-bottom: 8px; }
.hero .lead { font-size: 20px; max-width: 720px; color: var(--ink-soft); }
.hero .deco { position: absolute; right: -40px; bottom: -60px; width: 300px; opacity: .08; pointer-events: none; }
.page-head { padding: 30px 0 8px; }
.crumbs { font-size: 15px; margin-bottom: 10px; color: var(--muted); } .crumbs a { color: var(--ink-soft); }
.block { padding: 28px 0; }
.card { background: var(--card); border: 1px solid var(--grey-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 16px; }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.section-head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; margin: 6px 0 14px; }
.section-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Veivalg */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: -8px; }
@media (max-width: 760px) { .paths { grid-template-columns: 1fr; } }
.path { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; background: #fff; border: 2px solid var(--grey-2); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; position: relative; }
.path:hover { border-color: var(--red); transform: translateY(-2px); }
.path .ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; }
.path.ind .ic { background: var(--grey-3); color: var(--ind); } .path.org .ic { background: var(--red-tint); color: var(--red); }
.path h2 { margin: 6px 0 0; }
.path ul { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.path .go { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; font-family: var(--head); font-weight: 700; color: var(--red); font-size: 18px; }
.path .num { font-size: 15px; color: var(--muted); font-family: var(--body); font-weight: 400; }

/* Chips og merker */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--grey-3); color: var(--ink-soft); white-space: nowrap; line-height: 1.6; }
.chip.org { background: var(--red-tint); color: var(--red-dark); } .chip.ind { background: #e9e9ea; color: #333; }
.chip.green { background: var(--green-bg); color: var(--green); } .chip.yellow { background: var(--yellow-bg); color: var(--yellow); }
.chip.blue { background: var(--blue-bg); color: var(--blue); } .chip.red { background: #fbe3e4; color: #9c1c22; } .chip.grey { background: var(--grey-3); color: var(--muted); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Kurskort */
.course-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.ccard { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: relative; border-top: 5px solid var(--ind); }
.ccard.org { border-top-color: var(--red); }
.ccard h3 { margin: 4px 0 0; font-size: 22px; } .ccard h3 a { color: inherit; text-decoration: none; } .ccard h3 a:hover { color: var(--red); }
.ccard .meta { display: grid; gap: 3px; font-size: 15px; color: var(--ink-soft); }
.ccard .meta span { display: flex; gap: 8px; align-items: flex-start; } .ccard .meta svg { flex: none; margin-top: 3px; color: var(--muted); }
.ccard .foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); background: #fff; border: 1px dashed var(--grey-1); border-radius: var(--radius); }

/* Filter */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; }
.filters .grow { flex: 1 1 200px; }
.seg { display: inline-flex; background: var(--grey-3); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--ink-soft); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button.on.org { color: var(--red); }

/* Skjema */
label.f { display: block; margin-bottom: 16px; }
label.f > span, .flabel { display: block; font-weight: 600; margin-bottom: 5px; }
label.f > span .req, .flabel .req { color: var(--red); }
.help { display: block; font-size: 14px; color: var(--muted); margin: -2px 0 6px; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--grey-1); border-radius: 8px; padding: 9px 12px; background: #fff; min-height: 42px; }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--red); outline: 2px solid var(--red-tint); }
.filters input, .filters select { width: auto; min-height: 38px; padding: 6px 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin: 6px 0; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.yn { display: inline-flex; border: 1px solid var(--grey-1); border-radius: 999px; overflow: hidden; }
.yn label { cursor: pointer; } .yn input { position: absolute; opacity: 0; pointer-events: none; }
.yn span { display: block; padding: 6px 18px; font-weight: 600; } .yn label + label span { border-left: 1px solid var(--grey-1); }
.yn input:checked + span { background: var(--red); color: #fff; } .yn input:focus-visible + span { outline: 3px solid #2c5d8a; }
.qrow { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--grey-3); }
.qrow .q { flex: 1; } @media (max-width: 600px) { .qrow { flex-direction: column; align-items: flex-start; } }
fieldset { border: 0; padding: 0; margin: 0 0 18px; } legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.form-section { margin-bottom: 26px; } .form-section > h3 { border-bottom: 2px solid var(--grey-3); padding-bottom: 8px; margin-bottom: 16px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; } @media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } }
.fgrid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; } @media (max-width: 640px) { .fgrid3 { grid-template-columns: 1fr; } }
.err-box { background: #fbecec; border: 1px solid #e3b3b6; color: #8a1d22; padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; border: 1px solid; }
.alert.info { background: var(--blue-bg); border-color: #c6d6e6; color: #22496c; }
.alert.warn { background: var(--yellow-bg); border-color: var(--yellow-line); color: #5b4300; }
.alert.ok { background: var(--green-bg); border-color: var(--green-line); color: #1f5a37; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; } .toggle .tr { width: 44px; height: 26px; border-radius: 999px; background: var(--grey-1); position: relative; transition: background .15s; flex: none; }
.toggle .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .tr { background: var(--green); } .toggle input:checked + .tr::after { left: 21px; }
.toggle input:focus-visible + .tr { outline: 3px solid #2c5d8a; outline-offset: 2px; }

/* Kursside */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .course-layout { grid-template-columns: 1fr; } }
.prose h3 { margin-top: 1.4em; } .prose ul { padding-left: 22px; } .prose li { margin-bottom: 4px; }
.facts { display: grid; gap: 12px; margin: 0 0 18px; }
.facts > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; font-size: 16px; }
.facts dt { font-weight: 600; color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; } .facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sticky { position: sticky; top: 96px; }
.sessions { list-style: none; padding: 0; margin: 0; }
.sessions li { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--grey-3); }
.datebox { text-align: center; border-radius: 10px; background: var(--grey-3); padding: 6px 0; font-family: var(--head); font-weight: 700; line-height: 1.05; }
.datebox .d { font-size: 26px; } .datebox .m { font-size: 13px; text-transform: uppercase; color: var(--muted); } .datebox.org { background: var(--red-tint); color: var(--red-dark); }
@media (max-width: 560px) { .sessions li { grid-template-columns: 60px 1fr; } .sessions li .btn-row { grid-column: 1 / -1; } }
.cal-menu { position: relative; display: inline-block; }
.dept-bars { display: grid; gap: 6px; } .dept-bars .row { display: grid; grid-template-columns: 130px 1fr 34px; gap: 8px; align-items: center; font-size: 15px; }
.dept-bars .bar { height: 10px; background: var(--grey-3); border-radius: 999px; overflow: hidden; } .dept-bars .bar i { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.seatbar { height: 8px; background: var(--grey-3); border-radius: 999px; overflow: hidden; margin: 6px 0 4px; } .seatbar i { display: block; height: 100%; background: var(--green); }

/* Avdelingsmatrise */
.matrix-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius); box-shadow: var(--shadow); }
table.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; }
table.matrix th, table.matrix td { padding: 8px 10px; border-bottom: 1px solid var(--grey-3); text-align: center; white-space: nowrap; }
table.matrix thead th { background: #fafaf8; font-family: var(--head); font-size: 14px; vertical-align: bottom; white-space: normal; min-width: 104px; max-width: 150px; }
table.matrix th:first-child, table.matrix td:first-child { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; border-right: 1px solid var(--grey-2); font-weight: 600; min-width: 150px; }
table.matrix thead th:first-child { background: #fafaf8; }
.cnt { display: inline-grid; place-items: center; min-width: 30px; height: 28px; border-radius: 8px; font-weight: 700; padding: 0 6px; }
.cnt.y { background: var(--green-bg); color: var(--green); } .cnt.n { background: var(--yellow-bg); color: var(--yellow); } .cnt.na { color: var(--grey-1); font-weight: 400; }
table.matrix tr.hl td { background: #fff9e6; } table.matrix tfoot td { font-weight: 700; background: #fafaf8; }

/* Kalender */
.cal-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal-toolbar h2 { margin: 0 8px; min-width: 210px; text-transform: capitalize; }
.cal { background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal .dow, .cal .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .dow div { padding: 8px; font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--muted); text-transform: uppercase; background: #fafaf8; border-bottom: 1px solid var(--grey-2); }
.cal .day { min-height: 118px; border-right: 1px solid var(--grey-3); border-bottom: 1px solid var(--grey-3); padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal .day:nth-child(7n) { border-right: 0; } .cal .day.out { background: #fafaf8; } .cal .day.out .n { color: var(--grey-1); }
.cal .day .n { font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--ink-soft); }
.cal .day.today .n { background: var(--red); color: #fff; border-radius: 999px; width: 26px; height: 26px; display: grid; place-items: center; }
.ev { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--ind); background: #efefef; border-radius: 5px; padding: 3px 6px; font-size: 13px; line-height: 1.25; cursor: pointer; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.org { border-left-color: var(--red); background: var(--red-tint); }
.ev.dl { border: 1px dashed var(--grey-1); border-left: 4px dashed var(--yellow-line); background: #fff; }
.ev.cx { text-decoration: line-through; opacity: .6; }
.ev:hover { filter: brightness(.96); } .ev b { font-weight: 600; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; background: #efefef; border-left: 4px solid var(--ind); }
.legend i.org { background: var(--red-tint); border-left-color: var(--red); } .legend i.dl { background: #fff; border: 1px dashed var(--grey-1); border-left: 4px dashed var(--yellow-line); }
@media (max-width: 760px) { .cal .day { min-height: 70px; padding: 3px; } .ev { font-size: 0; height: 8px; padding: 0; } .cal .dow div { font-size: 11px; padding: 6px 3px; } }
.agenda .month { font-family: var(--head); font-weight: 700; font-size: 20px; margin: 22px 0 8px; text-transform: capitalize; }
.agenda .item { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--grey-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
@media (max-width: 560px) { .agenda .item { grid-template-columns: 60px 1fr; } .agenda .item > .btn-row { grid-column: 1 / -1; } }

/* Tabeller */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
table.t th { text-align: left; font-family: var(--head); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px; border-bottom: 2px solid var(--grey-2); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--grey-3); vertical-align: top; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: #fafaf8; }
table.t tr.open td { background: #fbf7f7; }
table.t td.c, table.t th.c { text-align: center; } table.t td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Modal og toast */
.modal-bg { position: fixed; inset: 0; background: rgba(30,30,32,.5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 14px; overflow-y: auto; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 920px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; gap: 12px; } .modal-h h3 { margin: 0; }
.modal-b { padding: 16px 22px; } .modal-f { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.x { border: 0; background: var(--grey-3); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; flex: none; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
#toast div { background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-weight: 600; animation: tin .2s ease; }
#toast div.err { background: #9c1c22; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
pre.code { background: #2b2c2e; color: #f2f2f2; padding: 12px; border-radius: 8px; font-size: 13px; overflow: auto; max-height: 360px; white-space: pre-wrap; word-break: break-all; }
.copy-field { display: flex; gap: 8px; } .copy-field input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }

/* Suksess */
.success { text-align: center; padding: 40px 24px; }
.success .big { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--green-bg); color: var(--green); }
.success .big.wait { background: var(--yellow-bg); color: var(--yellow); } .success .big.app { background: var(--blue-bg); color: var(--blue); }

/* Massepåmelding */
table.bulk { width: 100%; border-collapse: collapse; } table.bulk th { text-align: left; font-size: 14px; color: var(--muted); padding: 6px; font-weight: 600; }
table.bulk td { padding: 4px; vertical-align: top; } table.bulk td.n { color: var(--muted); font-weight: 700; padding-top: 14px; width: 28px; }
table.bulk input, table.bulk select { min-height: 38px; padding: 6px 9px; }
table.bulk tr.bad input { border-color: #c4373e; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; } .steps span { font-family: var(--head); font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 999px; background: var(--grey-3); color: var(--muted); }
.steps span.on { background: var(--red); color: #fff; } .steps span.done { background: var(--green-bg); color: var(--green); }

/* Admin */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; padding-top: 24px; }
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } }
.side { position: sticky; top: 96px; align-self: start; }
@media (max-width: 900px) { .side { position: static; } }
.side .who { background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; font-size: 14px; }
.side .who b { display: block; font-size: 16px; }
.side .who { overflow-wrap: anywhere; }
.side nav { display: grid; gap: 2px; } @media (max-width: 900px) { .side nav { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-soft); font-family: var(--head); font-weight: 700; font-size: 17px; }
.side nav a:hover { background: #fff; color: var(--ink); } .side nav a.on { background: var(--red); color: #fff; }
.side nav a svg { flex: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 16px; text-decoration: none; color: inherit; display: block; }
.tile .v { font-family: var(--head); font-weight: 700; font-size: 34px; line-height: 1; } .tile .l { font-size: 14px; color: var(--muted); margin-top: 6px; }
a.tile:hover { border-color: var(--red); } .tile.attn { border-color: var(--yellow-line); background: #fffbea; }
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--grey-2); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-soft); font-family: var(--head); font-weight: 700; font-size: 16px; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--red); border-bottom-color: var(--red); } .tabs a:hover { color: var(--ink); }
.tabs .badge { background: var(--red); color: #fff; border-radius: 999px; font-size: 12px; padding: 0 7px; margin-left: 4px; }
.savebar { position: sticky; bottom: 0; background: rgba(245,245,243,.95); backdrop-filter: blur(4px); padding: 12px 0; border-top: 1px solid var(--grey-2); display: flex; gap: 10px; justify-content: flex-end; z-index: 5; margin-top: 10px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--grey-2); border-radius: 10px; }
.checklist .ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grey-3); color: var(--muted); flex: none; font-weight: 700; }
.checklist .ok.y { background: var(--green); color: #fff; } .checklist li .grow { flex: 1; }
.howto { background: #fff; border: 1px solid var(--grey-2); border-left: 5px solid var(--red); border-radius: var(--radius); padding: 18px 20px; }
.howto ol { margin: 6px 0 0; padding-left: 22px; } .howto li { margin-bottom: 6px; }

/* Skjemabygger */
.fb { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1060px) { .fb { grid-template-columns: 1fr; } }
.fb-std { background: var(--grey-3); border-radius: 10px; padding: 10px 14px; font-size: 15px; margin-bottom: 12px; color: var(--ink-soft); }
.fb-item { background: #fff; border: 1px solid var(--grey-2); border-radius: 10px; margin-bottom: 8px; }
.fb-item .top { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.fb-item .top .lbl { flex: 1; min-width: 0; } .fb-item .top .lbl b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.3; }
.fb-item .kind { width: 34px; height: 34px; border-radius: 8px; background: var(--grey-3); display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.fb-item .acts { display: flex; gap: 4px; } .fb-item .acts button { border: 1px solid var(--grey-2); background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; }
.fb-item .acts button:hover { border-color: var(--grey-1); background: var(--grey-3); }
.fb-item.editing { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); } .fb-item .edit { padding: 4px 14px 14px; border-top: 1px solid var(--grey-3); }
.fb-item.heading { background: #fafaf8; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.palette button { border: 1px dashed var(--grey-1); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.palette button:hover { border-color: var(--red); color: var(--red); border-style: solid; }
.fb-preview { background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 20px; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; }
.fb-preview .ptag { font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }

/* E-post */
.rule { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--grey-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.rule .txt { flex: 1; } .rule .txt b { display: block; } .rule.off .txt { opacity: .55; }
.vars { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 12px; }
.vars button { border: 1px solid var(--grey-2); background: #fafaf8; border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; padding: 3px 7px; cursor: pointer; }
.vars button:hover { border-color: var(--red); color: var(--red); }
.mail-frame { width: 100%; height: 520px; border: 1px solid var(--grey-2); border-radius: 10px; background: #f5f5f3; }
.user { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: start; background: #fff; border: 1px solid var(--grey-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--grey-3); display: grid; place-items: center; font-family: var(--head); font-weight: 700; color: var(--ink-soft); }
.role-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--grey-3); border-radius: 8px; padding: 3px 4px 3px 10px; font-size: 14px; margin: 4px 6px 0 0; }
.role-pill.super { background: var(--red-tint); color: var(--red-dark); } .role-pill.admin { background: var(--blue-bg); color: var(--blue); } .role-pill.leader { background: var(--green-bg); color: var(--green); }
.role-pill button { border: 0; background: rgba(0,0,0,.06); border-radius: 6px; width: 22px; height: 22px; cursor: pointer; }
.role-pill.noedit { padding-right: 10px; }
.rcards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; } @media (max-width: 600px) { .rcards { grid-template-columns: 1fr; } }
.rcard { display: block; border: 2px solid var(--grey-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; position: relative; }
.rcard input { position: absolute; opacity: 0; } .rcard b { display: block; font-family: var(--head); font-size: 18px; } .rcard span { font-size: 14px; color: var(--muted); }
.rcard:has(input:checked) { border-color: var(--red); background: var(--red-tint); } .rcard.dis { opacity: .4; cursor: not-allowed; }
.summary-line { background: var(--grey-3); border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.statusdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--grey-1); margin-right: 6px; } .statusdot.on { background: var(--green); } .statusdot.warn { background: var(--yellow-line); }
