:root {
  --navy: #07206D; --blue: #0063D4; --ink: #07206D; --ink-2: #4A5A8A; --bg: #FFFFFF; --surface: #F4F6FB; --surface-2: #E9EDF6; --line: #DDE3F0;
  --pink-a: #F29DB1; --pink-b: #F6B7BC; --pink-c: #FFF4D7;
  --dag-bg: #DCF3E5; --dag-ink: #0E6B3B; --dag-line: #7ED2A2;
  --kveld-bg: #FFE9C4; --kveld-ink: #7A4B00; --kveld-line: #F0BE60;
  --nei-bg: #FBDCDC; --nei-ink: #9B2323; --nei-line: #EE9C9C;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: "Figtree", "Circular-Pro", system-ui, sans-serif; font-size: 16px; line-height: 1.5; }
h1, h2, h3 { font-family: "Outfit", "Degular-Display", system-ui, sans-serif; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; }
h2 { font-size: 22px; margin-bottom: 6px; }
p { margin: 0 0 12px; max-width: 62ch; }
.muted { color: var(--ink-2); }
small, .small { font-size: 13px; }
.muted.small { line-height: 1.4; margin: 6px 0 0; }
[hidden] { display: none !important; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; font-family: "Outfit", system-ui, sans-serif; font-weight: 500; font-size: 16px; color: var(--ink-2); text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }
.hero { background: linear-gradient(46deg, var(--pink-a) 0%, var(--pink-b) 55%, var(--pink-c) 100%); padding-block: 40px 44px; }
.hero p { font-size: 17px; margin-top: 10px; }
.hero .deadline { display: inline-block; margin-top: 10px; padding: 6px 14px; border-radius: 9999px; background: #fff; font-weight: 700; font-size: 15px; }
.hero .deadline.late { background: var(--nei-bg); color: var(--nei-ink); }
.wrap { max-width: 900px; margin: 0 auto; padding-inline: 20px; }
.wrap.wide { max-width: 1400px; }
main { padding-block: 28px 120px; }
main.admin { padding-bottom: 60px; max-width: none; padding-inline: 24px; }
main.admin p { max-width: 90ch; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 20px; }
.card.soft { background: var(--surface); border-color: transparent; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 9999px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; text-decoration: none; display: inline-block; }
.pill.on, .pill.primary { background: var(--navy); color: #fff; }
.pill:disabled { opacity: .5; cursor: not-allowed; }
.pill.small { padding: 6px 14px; font-size: 14px; }
.pill.ghost { border-color: var(--line); color: var(--ink-2); }
.pill.danger { border-color: var(--nei-line); color: var(--nei-ink); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
input[type=text], input[type=password], input[type=date], textarea { font: inherit; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
textarea { width: 100%; min-height: 90px; resize: vertical; }
textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; min-height: 240px; white-space: pre; }
label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 4px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); font-weight: 600; cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--navy); }
select { font: inherit; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
input[type=number].n { font: inherit; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line); width: 100%; }
.full-w { width: 100%; }
/* Hjelpetekst som kan foldes ut */
details.help { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
details.help summary { cursor: pointer; font-weight: 600; color: var(--blue); list-style: none; display: inline-block; }
details.help summary::-webkit-details-marker { display: none; }
details.help summary::before { content: '▸ '; }
details.help[open] summary::before { content: '▾ '; }
details.help .body { padding: 8px 0 0; }
details.help .body p { max-width: 90ch; margin-bottom: 8px; }

/* Ansatt-skjema */
.week { margin-bottom: 28px; }
.week h3 { display: flex; align-items: baseline; gap: 10px; font-size: 20px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--navy); }
.week h3 small { font-family: "Figtree", system-ui, sans-serif; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dayrow { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; align-items: center; padding: 14px 16px; margin-bottom: 8px; background: var(--surface); border-radius: 14px; border: 1.5px solid transparent; }
.dayrow.is-K { border-color: var(--kveld-line); background: #FFF8EC; }
.dayrow.is-F { border-color: var(--nei-line); background: #FFF3F3; }
.dayrow.is-B { border-color: var(--navy); background: #EEF2FF; }
.dayrow .lbl { font-weight: 700; font-size: 17px; line-height: 1.2; }
.dayrow .lbl small { display: block; color: var(--ink-2); font-weight: 500; font-size: 13px; margin-top: 2px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 560px; }
.seg.two { grid-template-columns: repeat(2, 1fr); max-width: 300px; }
.seg button { font: inherit; font-weight: 700; font-size: 14px; line-height: 1.15; padding: 8px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.seg button small { display: block; font-size: 11px; font-weight: 500; opacity: .8; margin-top: 2px; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.seg button.on { box-shadow: 0 0 0 2px currentColor inset; }
.seg button.on.dag { background: var(--dag-bg); color: var(--dag-ink); border-color: var(--dag-line); }
.seg button.on.kveld { background: var(--kveld-bg); color: var(--kveld-ink); border-color: var(--kveld-line); }
.seg button.on.both { background: #E0E7FF; color: var(--navy); border-color: var(--navy); }
.seg button.on.nei { background: var(--nei-bg); color: var(--nei-ink); border-color: var(--nei-line); }
@media (max-width: 640px) { .seg { grid-template-columns: repeat(2, 1fr); } }
.from { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--kveld-ink); }
.from button { font: inherit; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 9999px; border: 1.5px solid var(--kveld-line); background: #fff; color: var(--kveld-ink); cursor: pointer; }
.from button.on { background: var(--kveld-ink); color: #fff; border-color: var(--kveld-ink); }
.from .sub { font-weight: 700; margin-right: 2px; }
.from.day { color: var(--dag-ink); }
.from.day button { border-color: var(--dag-line); color: var(--dag-ink); }
.from.day button.on { background: var(--dag-ink); color: #fff; border-color: var(--dag-ink); }
.from .hours select { font: inherit; font-size: 13px; padding: 3px 6px; border-radius: 8px; border: 1.5px solid var(--dag-line); margin: 0 2px; }
.when { grid-column: 2; font-size: 14px; color: var(--ink); }
.note, .others { grid-column: 2; font-size: 13px; color: var(--ink-2); }
.others.all b { color: var(--dag-ink); }
.others .nudge { display: block; color: var(--navy); font-weight: 600; margin-top: 2px; }
@media (max-width: 520px) { .dayrow { grid-template-columns: 1fr; gap: 6px; } .from, .note, .others, .when { grid-column: 1; } }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 24px rgba(7,32,109,.08); }
.bottombar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.summary { display: flex; gap: 14px; font-weight: 600; font-size: 15px; flex-wrap: wrap; }
.summary .dag { color: var(--dag-ink); } .summary .kveld { color: var(--kveld-ink); } .summary .nei { color: var(--nei-ink); } .summary .both { color: var(--navy); }
.status { font-weight: 600; margin-top: 12px; }
.status.ok { color: var(--dag-ink); } .status.err { color: var(--nei-ink); }
.done-head { background: var(--dag-bg); border: 1px solid var(--dag-line); color: var(--dag-ink); border-radius: 16px; padding: 18px 22px; margin-bottom: 20px; }
.done-head h2 { color: var(--dag-ink); }
.sum-week { margin-bottom: 18px; }
.sum-week h3, .pd-week h3, .pl-week h3, .tp-week h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; font-family: "Figtree", system-ui, sans-serif; }
.sum-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; }
.sum-row .lbl { font-weight: 600; }
.sum-row .lbl small { color: var(--ink-2); font-weight: 500; margin-left: 6px; }
.sum-row > div:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sum-row .muted { font-size: 13px; }
.sum-row .tag { margin-right: 0; }
@media (max-width: 520px) { .sum-row { grid-template-columns: 1fr; gap: 4px; } }
.totals { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.totals span { padding: 6px 14px; border-radius: 9999px; font-weight: 700; font-size: 14px; }
.totals .dag { background: var(--dag-bg); color: var(--dag-ink); } .totals .kveld { background: var(--kveld-bg); color: var(--kveld-ink); } .totals .nei { background: var(--nei-bg); color: var(--nei-ink); } .totals .both { background: #E0E7FF; color: var(--navy); }
.hint { background: var(--surface); border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.hint.changes { background: #E6EFFF; color: var(--navy); }
.plan-card { border-color: var(--navy); }
.plan-card .row .cal-btn { font-size: 13px; }
.pd-week { margin-bottom: 14px; }
details.pd { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; background: #fff; }
details.pd.in { border-left: 4px solid var(--dag-line); }
details.pd.partial { border-left: 4px solid var(--kveld-line); }
details.pd.out { border-left: 4px solid var(--nei-line); background: #FFF8F8; }
details.pd.off { border-left: 4px solid var(--line); background: var(--surface); }
details.pd.changed { box-shadow: inset 0 0 0 2px var(--blue); }
details.pd summary { list-style: none; cursor: pointer; padding: 10px 12px; display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; align-items: center; }
details.pd summary::-webkit-details-marker { display: none; }
details.pd summary .d { font-weight: 700; }
details.pd summary .d small { display: block; font-weight: 500; color: var(--ink-2); }
details.pd summary .what { font-size: 14px; }
details.pd summary .what .me { display: block; font-size: 13px; margin-top: 2px; }
details.pd summary .what .me.ok { color: var(--dag-ink); font-weight: 600; }
details.pd summary .what .me.warn { color: var(--nei-ink); font-weight: 600; }
details.pd summary .what .me.cu { color: var(--blue); font-weight: 600; }
details.pd .body { padding: 0 12px 12px; display: grid; gap: 4px; }
details.pd .b { display: grid; grid-template-columns: 96px 1fr; gap: 8px; font-size: 13px; padding: 4px 8px; border-radius: 6px; }
details.pd .b.dim { opacity: .45; }
details.pd .b .t { font-variant-numeric: tabular-nums; color: var(--ink-2); }
details.pd .b.opplaering { background: var(--dag-bg); } details.pd .b.praksis { background: #FFD9C2; } details.pd .b.drift { background: #E3E7EE; }
details.pd .b.pause { background: #FFF1C2; } details.pd .b.oppsummering { background: #FAD5F5; } details.pd .b.gjest { background: #D6E4FF; }
@media (max-width: 520px) { details.pd summary { grid-template-columns: 1fr; } }
.my-tp { display: grid; gap: 2px; font-size: 13px; color: var(--ink-2); margin-top: 2px; flex-basis: 100%; }
.my-tp strong { color: var(--ink); }
.my-tp .miss { color: var(--nei-ink); font-weight: 600; }

/* Leder */
.login { max-width: 420px; }
.card.head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 0; border-radius: 16px 16px 0 0; }
.card.head .publish { margin-top: 0; flex: 1 1 380px; }
.admin-tabs { display: flex; gap: 4px; margin: 0 0 20px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; overflow-x: auto; }
.admin-tabs button { font: inherit; font-weight: 600; font-size: 14px; padding: 9px 16px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.admin-tabs button:hover { color: var(--navy); background: #fff; }
.admin-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.topbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.intake-switch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.intake-switch .lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-right: 4px; }
.publish { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.publish .st { font-weight: 600; font-size: 14px; }
.publish .st.live { color: var(--dag-ink); }
.publish .st.stale { color: var(--kveld-ink); }
.publish .st small { display: block; font-weight: 500; color: var(--ink-2); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border-radius: 12px; padding: 12px 14px 12px 46px; position: relative; font-size: 14px; color: var(--ink-2); }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.steps li b { color: var(--ink); }
.emp-list { display: grid; gap: 6px; }
.emp { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.emp .n { font-weight: 700; }
.emp .n small { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-weight: 500; color: var(--ink-2); }
.emp .n small .tag { margin: 0; }
.emp.st-ok { border-left: 4px solid var(--dag-line); }
.emp.st-wait { border-left: 4px solid var(--kveld-line); }
.emp.st-none { border-left: 4px solid var(--nei-line); background: #FFF8F8; }
.emp .views { color: var(--ink-2); }
.emp .views.none { color: var(--kveld-ink); font-weight: 600; }
.emp .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.emp .acts .pill.small { padding: 5px 12px; font-size: 13px; }
.emp-comment { font-weight: 500; font-size: 13px; color: var(--ink); background: #FFF8EC; border-left: 3px solid var(--kveld-line); padding: 4px 10px; border-radius: 0 8px 8px 0; margin-top: 6px; white-space: pre-wrap; }
td.name .cmt { cursor: help; font-size: 12px; }
.linkbtn { border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; text-decoration: underline; }
@media (max-width: 520px) { .emp { grid-template-columns: 1fr; } .emp .acts { justify-content: flex-start; } }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; width: 100%; }
th, td { border: 1px solid var(--line); padding: 6px 4px; text-align: center; min-width: 36px; }
th { background: var(--surface); font-weight: 600; }
th.wk { font-size: 11px; color: var(--ink-2); letter-spacing: .05em; }
th.dt small { display: block; font-weight: 500; color: var(--ink-2); font-size: 10px; }
td.name, th.name { text-align: left; min-width: 150px; font-weight: 700; position: sticky; left: 0; background: #fff; }
th.name { background: var(--surface); }
td.name small { display: block; font-size: 11px; color: var(--ink-2); font-weight: 500; }
td.D { background: var(--dag-bg); color: var(--dag-ink); font-weight: 700; }
td.K { background: var(--kveld-bg); color: var(--kveld-ink); font-weight: 700; }
td.B { background: #E0E7FF; color: var(--navy); font-weight: 700; }
td.F { background: var(--nei-bg); color: var(--nei-ink); font-weight: 700; }
td small { display: block; font-size: 10px; font-weight: 600; }
tr.sum td { background: var(--surface); font-weight: 700; }
tr.sum td.felles { background: var(--navy); color: #fff; }
tr.sum td.K { background: var(--kveld-bg); color: var(--kveld-ink); }
tr.sum td.off { color: var(--ink-2); background: #fff; }
tr.sum td.ov { box-shadow: inset 0 0 0 2px var(--blue); }
tr.sep td { background: var(--surface-2); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; text-align: left; padding: 4px 6px; }
tr.trainer td.name small { color: #4B2A8A; }
td.cell { cursor: pointer; }
td.cell:hover, td.cell:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
td.cell.partial { box-shadow: inset 0 -3px 0 var(--kveld-ink); }
td.cell.missed { box-shadow: inset 0 -3px 0 var(--nei-ink); }
td.cell.cu { box-shadow: inset 0 0 0 2px var(--blue); }
td.cell .cu-mark { display: block; margin-top: 3px; font-size: 10px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 9999px; padding: 1px 5px; line-height: 1.3; white-space: nowrap; }
td.cell .cu-mark.sug { background: #fff; color: var(--blue); border: 1px dashed var(--blue); }
td.cell.runs { box-shadow: inset 0 0 0 2px #7A4FC9; position: relative; }
td.cell.runs::after { content: 'G'; position: absolute; top: 1px; right: 2px; font-size: 9px; font-weight: 800; color: #fff; background: #7A4FC9; border-radius: 4px; padding: 0 3px; line-height: 1.4; }
.cellmenu { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(7,32,109,.18); padding: 10px; display: grid; gap: 6px; min-width: 230px; max-width: 360px; }
.cellmenu .cm-head { font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 0 4px 4px; }
.cellmenu .cm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cellmenu .cm { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 9999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; text-decoration: none; text-align: center; display: block; }
.cellmenu .cm.dag.on, .cellmenu .cm.dag:hover { background: var(--dag-bg); color: var(--dag-ink); border-color: var(--dag-line); }
.cellmenu .cm.kveld.on, .cellmenu .cm.kveld:hover { background: var(--kveld-bg); color: var(--kveld-ink); border-color: var(--kveld-line); }
.cellmenu .cm.nei.on, .cellmenu .cm.nei:hover { background: var(--nei-bg); color: var(--nei-ink); border-color: var(--nei-line); }
.cellmenu .cm.both.on, .cellmenu .cm.both:hover { background: #E0E7FF; color: var(--navy); border-color: var(--navy); }
.cellmenu .cm-hours { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 4px; flex-wrap: wrap; }
.cellmenu .cm-hours select { font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 8px; border: 1.5px solid var(--line); }
.cellmenu .cm-sep { border-top: 1px solid var(--line); margin: 2px 0; }
.cellmenu .muted.small { font-size: 11px; padding: 0 4px; margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; margin: 10px 0 14px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 9999px; margin-right: 6px; }
.tag.dag { background: var(--dag-bg); color: var(--dag-ink); } .tag.kveld { background: var(--kveld-bg); color: var(--kveld-ink); }
.tag.nei { background: var(--nei-bg); color: var(--nei-ink); } .tag.felles { background: var(--navy); color: #fff; }
.tag.both { background: #E0E7FF; color: var(--navy); }
.tag.off { background: var(--surface); color: var(--ink-2); border: 1px dashed var(--line); }
.tag.adj { background: #E0F4EE; color: #0B5C48; }
.tag.par { background: #E6EFFF; color: var(--blue); }
.tag.trainer { background: #F1E6FF; color: #4B2A8A; }
.tag.sug { background: #E6EFFF; color: var(--blue); border: 1px dashed var(--blue); }
.tag.gjest { background: #D6E4FF; color: var(--navy); }
.tag.abs { background: var(--nei-bg); color: var(--nei-ink); }
.tag.changed { background: var(--blue); color: #fff; margin-left: 6px; }
.tag.partial { background: var(--kveld-bg); color: var(--kveld-ink); }
.warn { color: var(--nei-ink); font-weight: 700; }
/* Plan: uker med økter per dag */
.pl-week { margin-bottom: 18px; }
.pl-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pl-day { border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 8px; align-content: start; background: #fff; }
.pl-day.off { background: var(--surface); border-style: dashed; }
.pl-day.felles { border-color: var(--navy); }
.pl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.pl-date { font-weight: 700; } .pl-theme { font-size: 12px; color: var(--ink-2); font-weight: 600; text-align: right; }
.pl-sess { border-radius: 10px; padding: 8px 10px; border: 1px solid; font-size: 13px; line-height: 1.35; }
.pl-sess-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pl-sess-head .tag { margin: 0; } .pl-sess-head b { font-variant-numeric: tabular-nums; }
.pl-sess-head .x { margin-left: auto; border: 0; background: transparent; color: var(--ink-2); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
.pl-sess-head .x:hover { color: var(--nei-ink); }
.pl-sess-body { margin-top: 4px; }
.pl-sess.group { background: var(--surface); border-color: var(--line); }
.pl-sess.group.warn { background: var(--nei-bg); border-color: var(--nei-line); }
.pl-sess.none { background: transparent; border-style: dashed; border-color: var(--line); display: grid; gap: 4px; }
.pl-sess.none .tag { width: fit-content; }
.pl-sess.catch { background: #E0F4EE; border-color: #7FCDB5; }
.pl-sess.catch.clickable { cursor: pointer; }
.pl-sess.catch.clickable:hover { outline: 2px solid var(--blue); outline-offset: -2px; }
.pl-sess.sug { background: #fff; border: 1.5px dashed var(--blue); }
.pl-sess.sug .pill, .pl-sess.move .pill { display: block; width: fit-content; margin-top: 6px; }
.pl-sess.move { background: #EEF3FF; border-color: #8FB0F0; }
.pl-missing { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; font-size: 12px; color: var(--ink-2); }
.pl-miss { padding: 0 7px; border-radius: 9999px; background: var(--nei-bg); color: var(--nei-ink); font-weight: 700; }
.pl-miss.ok { background: #E0F4EE; color: #0B5C48; font-weight: 600; }
.pl-topics { margin-top: 4px; font-size: 12px; color: var(--ink); display: grid; gap: 2px; }
.pl-topics b { color: var(--ink-2); font-weight: 600; }
.pl-ctl select { font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 9999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; width: 100%; }
.plan-none { background: var(--nei-bg); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }
@media (max-width: 1000px) { .pl-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pl-days { grid-template-columns: 1fr; } }
.pp-row { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.pp-name { font-weight: 700; } .pp-name small { display: block; font-weight: 500; color: var(--ink-2); } .pp-name small.ok { color: var(--dag-ink); }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { font-size: 12.5px; padding: 4px 10px; border-radius: 9999px; border: 1px solid; font-variant-numeric: tabular-nums; }
.pp-chip b { font-weight: 700; }
.pp-chip.drift { background: var(--surface); border-color: var(--line); } .pp-chip.adj { background: #E0F4EE; border-color: #7FCDB5; color: #0B5C48; } .pp-chip.par { background: #E6EFFF; border-color: #9DB9F5; color: var(--navy); }
.pp-chip.bad { background: var(--nei-bg); border-color: var(--nei-line); color: var(--nei-ink); font-weight: 600; }
.pp-topics { font-size: 12px; color: var(--ink-2); margin-top: 4px; display: grid; gap: 2px; }
.pp-topics b { color: var(--ink); font-weight: 600; }
.pp-topics .m { color: var(--nei-ink); font-weight: 600; }
@media (max-width: 900px) { .pp-row { grid-template-columns: 1fr; } }
/* Timeplan */
.tp-week { margin-bottom: 18px; }
.tp-days { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.tp-day { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 6px; align-content: start; background: #fff; }
.tp-day.off { background: var(--surface); border-style: dashed; }
.tp-day .tp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-weight: 700; }
.tp-day .tp-theme-ro { font-weight: 700; font-size: 15px; }
.tp-day input.tp-theme { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 8px; border: 1.5px solid var(--line); width: 100%; }
.tp-block { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; border: 1px solid; font-size: 13px; cursor: pointer; position: relative; }
/* Dra og slipp (timeplan-blokker og økter) */
.tp-block[draggable="true"], .pl-sess.catch[draggable="true"] { cursor: grab; }
.tp-block.dragging, .pl-sess.dragging { opacity: .4; }
.tp-day.over, .pl-day.over { outline: 2px dashed var(--blue); outline-offset: 1px; background: #F3F7FF; }
.tp-block.drop-before::before, .tp-block.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--blue); }
.tp-block.drop-before::before { top: -5px; }
.tp-block.drop-after::after { bottom: -5px; }
.tp-block:hover, .tp-block.clickable:hover { outline: 2px solid var(--blue); outline-offset: -2px; }
.tp-block .t { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.tp-block .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-block.wrap .n { white-space: normal; }
.tp-block .n.theme { font-style: italic; }
.tp-block .n .tr { display: block; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.tp-block .n .abs { display: block; font-size: 11px; font-weight: 700; color: var(--nei-ink); white-space: normal; }
.tp-block.missed { outline: 2px dashed var(--nei-ink); outline-offset: -2px; }
.tp-trainers { font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.tp-trainers b { color: var(--ink); font-weight: 700; }
.tp-trainers .none { color: var(--nei-ink); font-weight: 700; }
.tp-block .p { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9999px; background: rgba(255,255,255,.7); }
.tp-block .p.low { background: var(--nei-bg); color: var(--nei-ink); }
.tp-block.opplaering { background: var(--dag-bg); border-color: var(--dag-line); }
.tp-block.praksis { background: #FFD9C2; border-color: #F0A070; }
.tp-block.drift { background: #E3E7EE; border-color: #B8C0CC; }
.tp-block.pause { background: #FFF1C2; border-color: #E8CC6A; }
.tp-block.pause .n, .tp-block.pause .t { color: #6B5300; }
.tp-block.oppsummering { background: #FAD5F5; border-color: #E39BD9; }
.tp-block.gjest { background: #D6E4FF; border-color: #8FB0F0; }
.tp-edit, .sess-edit { display: grid; gap: 6px; padding: 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.sess-edit { background: #fff; border: 1.5px solid var(--navy); }
.tp-edit .r, .sess-edit .r { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tp-edit input, .tp-edit select, .sess-edit input, .sess-edit select { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 8px; border: 1.5px solid var(--line); width: 100%; }
.tp-edit .durs { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-edit .durs button { font: inherit; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.tp-edit .durs button:hover { border-color: var(--blue); color: var(--blue); }
.tp-ins { border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 12px; font-weight: 700; padding: 0; margin: -4px 0; height: 12px; line-height: 12px; cursor: pointer; opacity: .3; display: flex; align-items: center; gap: 6px; }
.tp-ins::before, .tp-ins::after { content: ''; flex: 1; border-top: 1px dashed var(--blue); }
.tp-ins:hover, .tp-ins:focus-visible { opacity: 1; }
.tp-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tp-empty { font-size: 13px; color: var(--ink-2); padding: 6px 0; }
@media (max-width: 900px) { .tp-days { grid-template-columns: repeat(5, 220px); } }
.sess-edit .who { display: grid; gap: 2px; max-height: 200px; overflow: auto; }
.sess-edit .who label, .tp-abs label { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 500; color: var(--ink); margin: 0; cursor: pointer; }
.sess-edit .who label.off, .tp-abs label.off { color: var(--ink-2); }
.sess-edit .who label small, .tp-abs label small { color: var(--nei-ink); font-weight: 600; }
.sess-edit .hd, .tp-abs .hd { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tp-abs { border-top: 1px solid var(--line); padding-top: 6px; display: grid; gap: 4px; }
.sh-people { font-size: 12px; color: var(--ink-2); display: grid; gap: 2px; margin-top: 4px; }
.sh-people b { color: var(--ink); font-weight: 600; }
.sh-people .cu { color: var(--blue); }
.sh-people .warn { color: var(--nei-ink); font-weight: 600; }
.cal-btn { border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 2px 4px; white-space: nowrap; text-decoration: underline; }
/* Innstillinger */
.sgroup { display: grid; grid-template-columns: 300px 1fr; gap: 12px 28px; padding: 18px 0; border-top: 1px solid var(--line); }
.sgroup .sg-head h3 { font-size: 17px; margin-bottom: 4px; }
.sgroup .sg-head p { font-size: 14px; color: var(--ink-2); margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 800px) { .sgroup { grid-template-columns: 1fr; } .form-grid.three { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
.rules { display: grid; gap: 6px; }
.rules .r { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; align-items: center; }
.rules .r span { font-size: 12px; color: var(--ink-2); }
.rules input { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 8px; border: 1.5px solid var(--line); width: 100%; }
.rules .r-n { width: 70px !important; }
.rules .x, .chip .x { border: 0; background: transparent; color: var(--ink-2); font-size: 16px; cursor: pointer; }
.rules .x:hover, .chip .x:hover { color: var(--nei-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 9999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.settings-saved { font-size: 13px; color: var(--dag-ink); font-weight: 600; }
/* I dag / fortid */
.today-badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 9999px; background: var(--blue); color: #fff; margin-left: 6px; vertical-align: middle; }
th.today, td.today { box-shadow: inset 2px 0 0 var(--blue), inset -2px 0 0 var(--blue); }
th.dt.today { background: #E6EFFF; color: var(--blue); }
td.cell.today.cu, td.cell.today.missed, td.cell.today.partial { box-shadow: inset 2px 0 0 var(--blue), inset -2px 0 0 var(--blue), inset 0 -3px 0 currentColor; }
th.dt.past, td.cell.past { opacity: .6; }
.pl-day.today, .tp-day.today { outline: 2px solid var(--blue); outline-offset: 1px; }
.pl-day.past, .tp-day.past { background: var(--surface); }
.dayrow.today, details.pd.today { outline: 2px solid var(--blue); outline-offset: 1px; }
.sum-row.today { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 8px; padding-inline: 6px; }
.day-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin: 0 0 14px; flex-wrap: wrap; }
.day-progress b { color: var(--ink); }
.day-progress .bar { flex: 1 1 160px; height: 6px; border-radius: 9999px; background: var(--line); overflow: hidden; max-width: 320px; }
.day-progress .bar i { display: block; height: 100%; background: var(--blue); }
/* Kapasitet per halvtime (opplæring i drift) */
.cap-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; margin: 2px 0; }
.cap-cell { height: 14px; font-size: 0; border-radius: 3px; background: var(--surface-2); color: var(--ink-2); overflow: hidden; }
.cap-cell:hover { outline: 2px solid var(--blue); outline-offset: 0; }
.cap-cell.ok { background: var(--dag-bg); } .cap-cell.tight { background: var(--kveld-bg); } .cap-cell.bad { background: var(--nei-bg); }
.cap-cell.sess { box-shadow: inset 0 -3px 0 var(--navy); }
.cap-legend { font-size: 11px; color: var(--ink-2); display: flex; justify-content: space-between; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 9999px; font-weight: 600; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 5; }
.toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Utskrift (delelenka) */
@media print {
  .topbar, .no-print, .cal-btn, .legend, .toast, .day-progress, #sh-tools { display: none !important; }
  .hero { background: none; padding: 0 0 10px; border-bottom: 2px solid #000; }
  .hero h1 { font-size: 24px; }
  main { padding: 10px 0; }
  .wrap.wide { max-width: none; padding: 0; }
  .tp-week { break-inside: avoid; margin-bottom: 10px; }
  .tp-days { grid-template-columns: repeat(5, 1fr); overflow: visible; gap: 6px; }
  .tp-day { padding: 6px; border-color: #999; }
  .tp-block { padding: 3px 5px; font-size: 11px; border-color: #bbb; cursor: default; }
  .tp-block .t { font-size: 10px; }
  .tp-day.today { outline: 2px solid #000; }
  .today-badge { background: #000; }
  body { color: #000; font-size: 12px; }
}
