/* Flekkerøy bedehus – arrangementsapp, rev 2 */
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ink: #10242c; --ink-2: #3c5560; --muted: #6b7f88; --line: #e2e8eb; --line-2: #cfd9dd;
  --bg: #f2f5f6; --card: #fff;
  --navy: #123c4a; --teal: #0f8b8d; --teal-2: #e3f4f3; --coral: #ff6b4a; --coral-2: #fff0eb; --sun: #f6b73c; --green: #2f9e6a; --green-2: #e5f6ee; --red: #d64933; --red-2: #fdecea;
  --r: 16px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16,36,44,.05), 0 6px 20px rgba(16,36,44,.06);
  --shadow-lg: 0 2px 4px rgba(16,36,44,.06), 0 14px 34px rgba(16,36,44,.12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink);
  background: radial-gradient(1200px 400px at 85% -120px, rgba(15,139,141,.10), transparent 60%), var(--bg); min-height: 100vh; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 1.9rem; font-weight: 800; margin: .1em 0 .3em; }
h2 { font-size: 1.2rem; font-weight: 700; margin: 1.6em 0 .7em; }
h3 { font-size: 1.02rem; margin: 0 0 .6em; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; }
code { font-size: .82em; word-break: break-all; background: #eef2f3; padding: 1px 5px; border-radius: 5px; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* ---------- Topp ---------- */
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px 22px; padding: 10px 22px;
  background: linear-gradient(115deg, #0d2f3b 0%, var(--navy) 45%, #0f6e73 100%); color: #fff; box-shadow: 0 4px 18px rgba(13,47,59,.25); }
header.top a { color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.brand small { display: block; font-size: .72rem; opacity: .75; margin-top: -2px; letter-spacing: .04em; text-transform: uppercase; }
.logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--coral), var(--sun)); color: #fff; box-shadow: 0 4px 12px rgba(255,107,74,.35); }
.logo .ic { width: 22px; height: 22px; }
.logo.big { width: 64px; height: 64px; border-radius: 20px; } .logo.big .ic { width: 36px; height: 36px; }
nav.main { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav.main a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; font-weight: 600; font-size: .92rem; opacity: .85; transition: .15s; }
nav.main a:hover { background: rgba(255,255,255,.12); opacity: 1; }
nav.main a.active { background: #fff; color: var(--navy); opacity: 1; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.user { margin-left: auto; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.12); }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--sun), var(--coral)); color: #fff; font-weight: 800; font-size: .8rem; }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; background: linear-gradient(135deg, #8fd3cf, var(--teal)); }
.usermenu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; }
.usermenu .menu a { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 9px; color: var(--ink); font-weight: 500; }
.usermenu .menu a:hover { background: var(--bg); }
main { max-width: 1240px; margin: 0 auto; padding: 26px 22px 70px; }
body { overflow-x: hidden; }

/* ---------- Knapper ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  border-radius: 999px; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; line-height: 1.2; transition: transform .1s, box-shadow .15s, background .15s; }
.btn:hover { border-color: var(--teal); box-shadow: 0 3px 10px rgba(15,139,141,.15); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--coral), #ff8a4c); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(255,107,74,.35); }
.btn.primary:hover { box-shadow: 0 6px 18px rgba(255,107,74,.45); }
.btn.ghost { background: transparent; }
.btn.glass { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff; }
.btn.glass:hover { background: rgba(255,255,255,.26); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { padding: 6px 12px; font-size: .84rem; }
.btn.block { width: 100%; padding: 12px; }
.btn.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,107,74,.25); } }
.iconbtn { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: .95rem; flex: none; }
.iconbtn:hover { background: var(--red-2); color: var(--red); }
.linkbtn { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; font-size: .86rem; padding: 0; text-decoration: underline; }
.linkbtn.plain { color: var(--teal); }

/* ---------- Kort og meldinger ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); border: 1px solid rgba(16,36,44,.04); }
.card.narrow { max-width: 440px; }
.card.empty { text-align: center; color: var(--muted); padding: 28px; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; background: var(--green-2); color: #1d5e40; font-weight: 500; border-left: 4px solid var(--green); }
.flash.err { background: var(--red-2); color: #8f2a1c; border-color: var(--red); }
.flash.warn { background: #fff6e0; color: #7a5300; border-color: var(--sun); }
.flash ul { margin: .4em 0; }
.crumbs { margin: 0 0 4px; font-size: .88rem; }
.crumbs a { color: var(--muted); }

/* ---------- Skjema ---------- */
label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); font: inherit; font-weight: 400; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,139,141,.15); }
input[type=checkbox], input[type=radio] { display: inline; width: auto; margin: 0 7px 0 0; accent-color: var(--teal); }
input[type=color] { padding: 3px; height: 40px; width: 64px; }
label.check { display: inline-flex; align-items: center; font-weight: 500; margin: 0 16px 8px 0; color: var(--ink); }
label.check.strong { font-weight: 700; } label.check.sub { padding-left: 16px; }
fieldset { border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); padding: 12px 16px 6px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; font-size: .9rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 18px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 18px; }
.rooms { display: flex; flex-wrap: wrap; }
.endout { display: flex; align-items: center; margin-top: 5px; height: 42px; padding: 0 14px; border-radius: var(--r-sm); background: var(--teal-2); color: var(--navy); font-weight: 700; }
.formactions { display: flex; gap: 10px; margin-top: 10px; }
.formactions.sticky { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 5; }
form.inline { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
form.inline label { margin: 0; } form.inline input:not([type=checkbox]):not([type=color]), form.inline select { min-width: 140px; }
.inline-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.inline-label select { margin: 0; width: auto; max-width: 280px; }

/* Avkrysningsbrikker (rom og grupper) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips.disabled, #rooms.disabled { opacity: .35; pointer-events: none; }
.chipcheck { margin: 0; --c: var(--teal); }
.chipcheck input { position: absolute; opacity: 0; pointer-events: none; }
.chipcheck span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); transition: .15s; user-select: none; }
.chipcheck span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); opacity: .35; transition: .15s; }
.chipcheck:hover span { border-color: var(--c); }
.chipcheck input:checked + span { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 35%, transparent); }
.chipcheck input:checked + span::before { background: #fff; opacity: 1; content: ""; }
.chipcheck input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent); }
.chipcheck.sub span { font-size: .84rem; padding: 6px 12px; }
.showall { margin-top: 4px; }

/* ---------- Sidehode og filtre ---------- */
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pagehead h1, .pagehead h2 { margin-bottom: .2em; }
.pagehead p { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 16px; }
.filters select, .filters input { width: auto; margin: 0; border-radius: 999px; padding: 8px 14px; }
.filters label.check { margin: 0 6px; }
.sec { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 1.08rem; }
.sec .ic { color: var(--teal); width: 20px; height: 20px; }
.sec-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.sec-row .sec { margin: 0; }

/* ---------- Merker ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--green-2); color: #1d6b47; }
.badge.ok::before { content: "✓"; }
.badge.miss { background: var(--coral-2); color: #c1381a; }
.badge.miss::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.tag { display: inline-block; font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: #e9eef0; color: var(--ink-2); font-weight: 700; vertical-align: middle; }
.tag.lead { background: #fff1d6; color: #8a5a00; }
.dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--c, var(--teal)); margin-right: .45em; flex: none; }
.missing { color: var(--coral); font-weight: 600; font-style: normal; }

/* ---------- Oversikt ---------- */
.welcome { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.welcome h1 { font-size: 2.1rem; margin: 0; }
.welcome p { margin: 2px 0 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 8px; }
.statcard { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); color: var(--ink-2); text-decoration: none; font-weight: 500; transition: transform .15s, box-shadow .15s; }
.statcard::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--c); opacity: .12; }
.statcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.statcard .n { font-size: 2.3rem; font-weight: 800; color: var(--c); line-height: 1.05; }
.statcard.alert { background: linear-gradient(135deg, #fff, var(--coral-2)); }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.twocol.wide-left { grid-template-columns: 1.6fr 1fr; }
.twocol > section > h2:first-child, .twocol > aside > h2:first-child { margin-top: .9em; }
.evlist { display: flex; flex-direction: column; gap: 10px; }
.evcard { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border-left: 5px solid var(--c); transition: transform .15s, box-shadow .15s; }
.evcard:hover { transform: translateX(3px); box-shadow: var(--shadow-lg); }
.ev-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ev-body b { font-size: 1.02rem; }
.dateblock { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; min-width: 58px; height: 62px; border-radius: 14px; background: var(--teal-2); color: var(--navy); line-height: 1.05; }
.dateblock b { font-size: 1.45rem; font-weight: 800; }
.dateblock small { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; opacity: .75; }
.gdots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.gdot { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: color-mix(in srgb, var(--c) 80%, black); background: color-mix(in srgb, var(--c) 14%, white); }
.taskcard { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; margin-bottom: 10px; border-radius: var(--r); background: linear-gradient(135deg, var(--navy), #0f6e73); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.taskcard .muted { color: rgba(255,255,255,.75); }
.tc-role { align-self: flex-start; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--sun); color: #4a3200; padding: 2px 9px; border-radius: 999px; margin-bottom: 4px; }
.needrow { display: flex; align-items: center; gap: 6px; padding: 9px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.needrow:last-child { border-bottom: 0; }
.needrow .badge { margin-left: auto; }

/* ---------- Kalender ---------- */
.monthnav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.monthnav h2 { margin: 0 10px; min-width: 190px; text-align: center; font-size: 1.35rem; font-weight: 800; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.month .wd { padding: 9px 10px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #f8fafb; }
.day { position: relative; min-height: 118px; padding: 6px; background: #fff; overflow: hidden; }
.day.other { background: #fafbfc; } .day.other .num { color: #b5c0c5; }
.day.today { background: linear-gradient(180deg, var(--teal-2), #fff 70%); }
.day.today .num > :first-child, .day.today .num { color: var(--teal); }
.day .num { display: flex; align-items: center; justify-content: space-between; font-size: .88rem; font-weight: 800; margin: 0 2px 4px; }
.wdm { display: none; }
.addday { opacity: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--teal-2); color: var(--teal) !important; text-decoration: none; font-weight: 800; transition: .15s; }
.day:hover .addday { opacity: 1; }
.chip { display: block; font-size: .78rem; line-height: 1.3; padding: 4px 7px; margin-bottom: 4px; border-radius: 8px; text-decoration: none; color: color-mix(in srgb, var(--c) 70%, black);
  background: color-mix(in srgb, var(--c) 16%, white); border-left: 3px solid var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; transition: .12s; }
.chip:hover { background: var(--c); color: #fff; }
.chip.miss { box-shadow: inset -4px 0 0 var(--coral); }
.chip b { font-weight: 800; }
.chip { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mytask { display: block; font-size: .72rem; font-weight: 800; color: var(--coral); white-space: normal; }
.list h3 { margin: 22px 0 8px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.list .row { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; margin-bottom: 8px; background: #fff; border-left: 5px solid var(--c); border-radius: 12px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.list .row:hover { box-shadow: var(--shadow-lg); }
.list .time { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--navy); }
.list .title { font-weight: 600; } .list .meta { color: var(--muted); font-size: .88rem; display: flex; gap: 8px; align-items: center; }

/* ---------- Møteside ---------- */
.hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; padding: 26px 28px; margin-bottom: 20px; border-radius: 22px; color: #fff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 92%, black), color-mix(in srgb, var(--c) 70%, #0f8b8d)); box-shadow: var(--shadow-lg); }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero::before { content: ""; position: absolute; right: 120px; top: -70px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.06); }
.hero .dateblock { background: rgba(255,255,255,.95); width: 72px; height: 78px; color: var(--navy); }
.hero .dateblock b { font-size: 1.9rem; }
.hero-text { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.hero h1 { margin: 0 0 6px; font-size: 2rem; }
.hero .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0; font-weight: 500; }
.hero .meta > span { display: inline-flex; align-items: center; gap: 6px; }
.hero .meta .dot { background: #fff; }
.hero .sub { margin: 6px 0 0; opacity: .8; font-size: .9rem; }
.hero .sub a { color: #fff; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero.slim { padding: 22px 26px; }
.subchips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.chip-link { padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff !important; text-decoration: none; font-weight: 600; font-size: .85rem; }
.chip-link:hover { background: rgba(255,255,255,.3); }
.desc { white-space: normal; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 63px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 36px; padding: 7px 0; }
.timeline li::before { content: ""; position: absolute; left: 55px; top: 9px; box-sizing: border-box; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); }
.timeline li.end::before { border-color: var(--coral); }
.timeline time { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.timeline .resp { font-size: .86rem; color: var(--teal); font-weight: 600; }
.timeline .note { font-size: .84rem; color: var(--muted); }
.gview { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--c) 6%, white); border: 1px solid color-mix(in srgb, var(--c) 18%, white); }
.gb-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.gb-head .dot { background: var(--c); }
.gb-head a { color: var(--ink); text-decoration: none; }
.gb-head .badge { margin-left: auto; }
.slots { list-style: none; margin: 0; padding: 0; }
.slots li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 6px 0; border-top: 1px dashed color-mix(in srgb, var(--c) 25%, white); }
.slots li:first-child { border-top: 0; }
.slots .role { min-width: 110px; font-size: .84rem; color: var(--muted); font-weight: 600; }
.slots .who { font-weight: 600; } .slots .note { font-size: .84rem; color: var(--muted); }
.slots li.me .who { color: var(--coral); }
.tel { font-weight: 500; font-size: .84rem; margin-left: 6px; }
.danger-zone { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 18px; border-top: 1px dashed var(--line-2); }

/* ---------- Møteskjema ---------- */
.eventform .card { padding: 22px 24px; }
.groupblock { margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--c, #8a96a3) 30%, white); background: color-mix(in srgb, var(--c, #8a96a3) 5%, white); animation: pop .2s ease-out; }
.groupblock.other { --c: #8a96a3; border-style: dashed; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.gb-count { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--green); }
.gb-count.miss { color: var(--coral); }
.taskrow { display: grid; grid-template-columns: 1fr 1.3fr 1fr 32px; gap: 8px; margin-bottom: 8px; align-items: center; }
.taskrow select, .taskrow input { margin: 0; }
.proghead, .progrow { display: grid; grid-template-columns: 52px 72px 2fr 1.3fr 1.3fr 104px; gap: 8px; align-items: center; }
.proghead { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 2px 4px; }
.progrow { margin-bottom: 8px; }
.progrow input { margin: 0; }
.pr-time { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; text-align: center; background: var(--teal-2); border-radius: 8px; padding: 8px 0; }
.pr-move { display: flex; }
.pr-move .iconbtn:not(.p-del):hover { background: var(--teal-2); color: var(--teal); }
.prog-foot { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
#prog_total.miss { color: var(--coral); font-weight: 700; }

/* ---------- Grupper ---------- */
.groupgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.gcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--c); }
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gcard.mine { box-shadow: 0 0 0 2px var(--c), var(--shadow); }
.gcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 1.2rem; }
.gcard-top b { font-weight: 800; }
.gcard-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .88rem; color: var(--muted); }
.gcard-stats .stat b { color: var(--ink); font-size: 1.05rem; }
.gcard-stats .lead { flex-basis: 100%; font-size: .84rem; }
.gcard-subs { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.subrow { display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; }
.subrow .muted { font-weight: 400; }
.subrow .badge { margin-left: auto; }
.staff { display: flex; flex-direction: column; gap: 10px; }
.staffrow { display: grid; grid-template-columns: 58px 210px 1fr; gap: 16px; align-items: center; padding: 12px 16px 12px 12px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); border-left: 5px solid var(--green); }
.staffrow.missing { border-left-color: var(--coral); }
.sr-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.sr-info a { color: var(--ink); text-decoration: none; }
.sr-slots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.slot { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 12px; background: var(--green-2); }
.slot.empty { background: var(--coral-2); }
.slot .role { font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.slot select { margin: 0; width: auto; min-width: 170px; padding: 6px 10px; }
.slot select.changed { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(246,183,60,.25); }
.members { list-style: none; margin: 0 0 12px; padding: 0; }
.members li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.m-name { font-weight: 600; min-width: 200px; } .m-contact { flex: 1; }
.addmember { padding-top: 6px; }

/* ---------- Administrasjon ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 3px; background: #fff; border-radius: var(--r); padding: 18px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; overflow: hidden; }
.tile::after { content: "→"; position: absolute; right: 18px; bottom: 14px; color: var(--teal); font-weight: 800; opacity: 0; transition: .15s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } .tile:hover::after { opacity: 1; right: 14px; }
.tile strong { font-size: 1.05rem; } .tile .n { font-size: 1.8rem; font-weight: 800; color: var(--teal); line-height: 1; min-height: 1.8rem; } .tile small { color: var(--muted); }
.typegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.typecard { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border-top: 5px solid var(--c); }
.typecard:hover { box-shadow: var(--shadow-lg); }
.typecard b { font-size: 1.08rem; }
.editcard { border: 2px solid var(--teal); }

/* ---------- Tabeller ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #f8fafb; }
.tbl tbody tr:hover td { background: #fafcfc; }
.tbl tr.me td { background: var(--teal-2); font-weight: 600; }
.tbl tr.inactive td { color: #9aa8ae; }
.tbl.compact td { padding: 5px 10px; } .tbl.compact select { margin: 0; }
.tbl tr.editing td { background: #f6fbfb; }
.nowrap { white-space: nowrap; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 14px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; }
.feeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.feed h3 { margin-top: 0; } .feed.hl { box-shadow: 0 0 0 2px var(--teal), var(--shadow); }
.copyline { display: flex; gap: 6px; flex-wrap: wrap; } .copyline input { flex: 1; min-width: 180px; margin: 0; font-size: .8rem; }
.help ul { margin: .5em 0 0; }
.linkrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; }

/* ---------- Innlogging ---------- */
.loginwrap { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: center; max-width: 960px; margin: 30px auto; }
.loginart h1 { font-size: 2.6rem; margin: 18px 0 8px; }
.loginart p { font-size: 1.15rem; color: var(--ink-2); max-width: 380px; }
.logincard { padding: 28px; }
.logincard h2 { margin-top: 0; }
.sso { display: flex; flex-direction: column; gap: 10px; }
.sso .btn { padding: 12px; font-size: .98rem; }
.sso-apple { background: #000; color: #fff; border-color: #000; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .84rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .twocol, .twocol.wide-left, .loginwrap { grid-template-columns: 1fr; }
  .loginart { text-align: center; } .loginart p { margin: 0 auto; } .loginart h1 { font-size: 2rem; }
  .staffrow { grid-template-columns: 58px 1fr; }
  .sr-slots { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  main { padding: 16px 14px 70px; }
  header.top { padding: 8px 12px; gap: 8px 10px; flex-wrap: wrap; }
  nav.main { order: 3; flex: 1 0 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  nav.main a { white-space: nowrap; padding: 7px 12px; }
  .usermenu .who { display: none; }
  h1, .welcome h1 { font-size: 1.6rem; }
  .hero { padding: 20px; } .hero h1 { font-size: 1.5rem; }
  .month { display: block; background: none; border: 0; box-shadow: none; }
  .month .wd { display: none; }
  .day { min-height: 0; border-radius: 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
  .day.other { display: none; }
  .day:not(:has(.chip)):not(.today) { display: none; }
  .wdm { display: inline; font-weight: 500; color: var(--muted); }
  .addday { opacity: 1; }
  .chip { white-space: normal; font-size: .88rem; padding: 7px 10px; }
  .list .row { grid-template-columns: 1fr; gap: 2px; }
  .taskrow { grid-template-columns: 1fr 1fr 32px; } .taskrow input { grid-column: 1 / 3; grid-row: 2; }
  .proghead { display: none; }
  .progrow { grid-template-columns: 52px 64px 1fr; padding: 10px; border-radius: 12px; background: #f7fafa; }
  .progrow input[name="prog_title[]"] { grid-column: 3; }
  .progrow input[name="prog_resp[]"], .progrow input[name="prog_note[]"] { grid-column: 1 / -1; }
  .pr-move { grid-column: 1 / -1; justify-content: flex-end; }
  .feeds { grid-template-columns: 1fr; }
  .slot { width: 100%; } .slot select { flex: 1; min-width: 0; }
  .evcard { gap: 12px; } .evcard .badge { display: none; }
}
@media print {
  header.top, .filters, .actions, .hero-actions, .monthnav .btn, .danger-zone, .formactions, .addday { display: none !important; }
  body { background: #fff; font-size: 12px; } main { padding: 0; max-width: none; }
  .card, .evcard, .staffrow, .tbl { box-shadow: none; border: 1px solid #ccc; }
  .hero { background: none !important; color: var(--ink); box-shadow: none; border: 2px solid #333; padding: 12px; }
  .hero::before, .hero::after { display: none; } .hero .dot { background: #333; } .hero .sub a { color: var(--ink); }
  .twocol { grid-template-columns: 1fr 1fr; }
  .day { min-height: 80px; }
}

/* =====================================================================
   Egne visninger per enhet
   PC (fra 1181 px): sidemeny med tekst · iPad (701–1180 px): smal ikonlist
   Mobil (til 700 px): app-linje øverst, fanelinje nederst og «+»-knapp
   ===================================================================== */
.sidenav, .tabbar, header.top.appbar, .fab { display: none; }
body.auth header.top:not(.appbar) { display: none; }

/* Felles for sidemeny (PC og iPad) */
@media (min-width: 701px) {
  body.auth .sidenav { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30; color: #fff;
    background: linear-gradient(170deg, #0d2f3b 0%, var(--navy) 55%, #0f6e73 100%); box-shadow: 4px 0 24px rgba(13,47,59,.18); }
  .sidenav a { color: #fff; text-decoration: none; }
  .sidenav .brand { padding: 4px 4px 18px; }
  .sn-main { display: flex; flex-direction: column; gap: 4px; }
  .sn-main a { display: flex; align-items: center; border-radius: 14px; opacity: .82; font-weight: 600; transition: background .15s, opacity .15s; }
  .sn-main a:hover { background: rgba(255,255,255,.12); opacity: 1; }
  .sn-main a.active { background: #fff; color: var(--navy); opacity: 1; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
  .sn-user { margin-top: auto; position: relative; }
  .sn-user summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; border-radius: 14px; }
  .sn-user summary::-webkit-details-marker { display: none; }
  .sn-user summary:hover { background: rgba(255,255,255,.1); }
  .sn-name b { display: block; font-size: .9rem; } .sn-name small { display: block; font-size: .72rem; opacity: .7; }
  .sn-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
}

/* ---------- PC ---------- */
@media (min-width: 1181px) {
  body.auth .sidenav { width: 250px; padding: 20px 14px 16px; }
  .sn-main a { gap: 12px; padding: 11px 14px; font-size: .95rem; }
  .sn-main a .ic { width: 20px; height: 20px; }
  .sn-user summary { padding: 8px; }
  .sn-user[open] .sn-menu { margin-top: 4px; }
  .sn-menu a:hover { background: rgba(255,255,255,.12); }
  body.auth main { margin-left: 250px; max-width: 1480px; padding: 32px 44px 70px; }
  body.auth .formactions.sticky { margin: 0 -4px; }
  /* Kalender: månedsrutenett med agenda ved siden av */
  .calwrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
  .calwrap .calside { display: block; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; }
  .day { min-height: 130px; }
  .hjem-grid { grid-template-columns: 1.7fr 1fr; }
}

/* ---------- iPad ---------- */
@media (min-width: 701px) and (max-width: 1180px) {
  body.auth .sidenav { width: 92px; padding: 16px 8px 12px; align-items: stretch; }
  .sidenav .brand { justify-content: center; padding: 2px 0 16px; }
  .sidenav .brand-text { display: none; }
  .sn-main a { flex-direction: column; justify-content: center; gap: 4px; padding: 10px 4px; min-height: 64px; font-size: .68rem; text-align: center; line-height: 1.15; }
  .sn-main a .ic { width: 24px; height: 24px; }
  .sn-user summary { justify-content: center; padding: 8px 0; }
  .sn-user .sn-name { display: none; }
  .sn-menu { position: absolute; left: calc(100% + 6px); bottom: 0; min-width: 220px; padding: 6px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); }
  .sn-menu a { color: var(--ink) !important; }
  .sn-menu a:hover { background: var(--bg); }
  body.auth main { margin-left: 92px; max-width: none; padding: 26px 28px 70px; }
  .calside { display: none; }
  /* Berøringsvennlig */
  .btn { min-height: 44px; } .btn.small { min-height: 36px; }
  .iconbtn { width: 40px; height: 40px; }
  input, select, textarea { min-height: 44px; font-size: 16px; }
  .chipcheck span { padding: 10px 16px; }
  .addday { opacity: 1; width: 28px; height: 28px; }
  .day { min-height: 112px; }
  .chip { font-size: .8rem; padding: 6px 7px; }
  .twocol.wide-left { grid-template-columns: 1fr 1fr; }
  .staffrow { grid-template-columns: 58px 1fr; } .sr-slots { grid-column: 1 / -1; }
  .fab { display: grid; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
/* iPad stående */
@media (min-width: 701px) and (max-width: 900px) {
  .twocol, .twocol.wide-left { grid-template-columns: 1fr; }
  .month .wd { font-size: .66rem; padding: 8px 6px; }
  .chip b { display: block; }
}

/* ---------- Mobil ---------- */
@media (max-width: 700px) {
  body.auth header.top.appbar { display: flex; position: sticky; top: 0; z-index: 25; justify-content: space-between; align-items: center;
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: linear-gradient(115deg, #0d2f3b, var(--navy) 50%, #0f6e73); }
  .appbar .avatar { text-decoration: none; }
  .appbar .brand small { display: none; }
  body.auth .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: #fff;
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16,36,44,.08); }
  .tabbar > a, .tb-more > summary { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border-radius: 12px; color: var(--muted);
    text-decoration: none; font-size: .68rem; font-weight: 700; list-style: none; cursor: pointer; }
  .tb-more > summary::-webkit-details-marker { display: none; }
  .tabbar .ic { width: 24px; height: 24px; }
  .tabbar > a.active, .tb-more > summary.active { color: var(--teal); }
  .tabbar > a.active .ic, .tb-more > summary.active .ic { background: var(--teal-2); border-radius: 10px; padding: 2px 10px; width: 44px; box-sizing: content-box; margin: -2px 0; }
  .tb-more[open]::before { content: ""; position: fixed; inset: 0; background: rgba(13,47,59,.35); z-index: -1; }
  .tb-sheet { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 10px; border-radius: 20px; background: #fff; box-shadow: 0 -10px 40px rgba(16,36,44,.25); animation: sheet .18s ease-out; }
  @keyframes sheet { from { transform: translateY(14px); opacity: 0; } }
  .tb-sheet a { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
  .tb-sheet a.active { background: var(--teal-2); color: var(--teal); }
  .tb-who { display: flex; align-items: center; gap: 10px; padding: 6px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
  .fab { display: grid; }
  body.auth main { padding: 16px 14px calc(110px + env(safe-area-inset-bottom)); }
  body.auth .formactions.sticky { bottom: calc(64px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px; } /* hindrer zoom på iPhone */
  .btn { min-height: 42px; }
  .calside { display: none; }
  .welcome .actions { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .statcard { padding: 14px; } .statcard .n { font-size: 1.8rem; }
  .stats .statcard:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pagehead .actions .btn.primary { display: none; }
  /* Tabeller blir kort */
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl { background: none; box-shadow: none; border-radius: 0; }
  .tbl thead { display: none; }
  .tbl tr { background: #fff; border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 10px; padding: 8px 4px; }
  .tbl td { display: flex; gap: 12px; border: 0; padding: 5px 12px; }
  .tbl td[data-label]::before { content: attr(data-label); flex: 0 0 34%; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
  .tbl td:empty { display: none; }
  .tbl tr.editing td { display: block; }
  .tbl tbody tr:hover td { background: none; }
  .hero { border-radius: 18px; }
  .hero .dateblock { width: 60px; height: 66px; }
}
.fab { position: fixed; right: 20px; bottom: 24px; z-index: 35; width: 58px; height: 58px; place-items: center; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, var(--coral), #ff8a4c); box-shadow: 0 10px 24px rgba(255,107,74,.45); }
.fab .ic { width: 28px; height: 28px; }
@media (max-width: 700px) { .fab { bottom: calc(84px + env(safe-area-inset-bottom)); right: 16px; } }
.calside { display: none; }
.calside h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.calside h3:first-child { margin-top: 0; }
.calside .agenda-item { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 8px 6px; border-radius: 10px; text-decoration: none; color: var(--ink); border-left: 3px solid var(--c); margin-bottom: 4px; }
.calside .agenda-item:hover { background: var(--bg); }
.calside .agenda-item time { font-weight: 800; color: var(--navy); font-size: .85rem; }
.calside .agenda-item small { display: block; color: var(--muted); }
@media (hover: none) { .addday { opacity: 1; } .tile::after { opacity: 1; right: 14px; } }
@media print { .sidenav, .tabbar, .fab, .appbar { display: none !important; } body.auth main { margin: 0 !important; padding: 0 !important; } }

/* =====================================================================
   Rev 3: dag/uke-visning, romoversikt, privat utleie, publisering
   ===================================================================== */
:root { --priv: #7a5c99; --hatch: repeating-linear-gradient(135deg, rgba(122,92,153,.16) 0 7px, rgba(122,92,153,.05) 7px 14px); }
.calbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin: 4px 0 6px; }
.calbar .monthnav { margin: 0; }
.calbar .monthnav h2 { min-width: 0; font-size: 1.25rem; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: #e4ebee; gap: 2px; }
.seg a { padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink-2); text-decoration: none; transition: .15s; }
.seg a:hover { background: rgba(255,255,255,.6); }
.seg a.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(16,36,44,.12); }
.btn.iconnav { width: 40px; height: 40px; padding: 0; font-size: 1.2rem; }
.legend-private { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--priv); font-weight: 600; margin-left: auto; }
.legend-private .ic { width: 14px; height: 14px; }
.daylink { color: inherit; text-decoration: none; border-radius: 6px; padding: 0 3px; }
.daylink:hover { background: var(--teal-2); }
.hint { margin-top: 8px; }

/* Privat utleie: skravert lilla */
.chip.private, .list .row.private, .agenda-item.private, .evcard.private { background-image: var(--hatch); }
.chip.private { color: #4b3463; background-color: #f3eef8; }
.chip .ic, .list .title .ic, .agenda-item .ic, .evcard .ic { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }
.hero.private { background: linear-gradient(120deg, #4b3463, #7a5c99 70%, #9b7bbd); }
.hero h1 .ic { width: 26px; height: 26px; margin-right: 6px; vertical-align: -3px; }
.rentalbox { border-left: 5px solid var(--priv); background-image: var(--hatch); }
.typecard.private { background-image: var(--hatch); }
.pubflags { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.pf { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: rgba(255,255,255,.12); opacity: .7; }
.pf.on { background: rgba(255,255,255,.25); opacity: 1; }
.pf .ic { width: 14px; height: 14px; }

/* Skjema: velg møte eller privat utleie */
.kindswitch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.kindopt { margin: 0; }
.kindopt input { position: absolute; opacity: 0; }
.kindopt span { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 14px 16px; border-radius: 16px; background: #fff; border: 2px solid var(--line-2); cursor: pointer; transition: .15s; box-shadow: var(--shadow); }
.kindopt .ic { grid-row: 1 / 3; width: 30px; height: 30px; color: var(--teal); }
.kindopt b { font-size: 1rem; color: var(--ink); } .kindopt small { color: var(--muted); font-weight: 500; }
.kindopt input:checked + span { border-color: var(--teal); background: var(--teal-2); }
.kindopt.private .ic { color: var(--priv); }
.kindopt.private input:checked + span { border-color: var(--priv); background-color: #f3eef8; background-image: var(--hatch); }
.kindopt input:focus-visible + span { outline: 3px solid rgba(15,139,141,.3); }
.eventform:not(.is-private) .only-private, .pagehead:has(+ .flash + .eventform:not(.is-private)) .only-private { display: none; }
.eventform.is-private .only-meeting { display: none; }
body:has(.eventform.is-private) .pagehead .only-meeting, body:has(.eventform:not(.is-private)) .pagehead .only-private { display: none; }
.publish label.check .ic { margin-right: 4px; }
.rental { border-left: 5px solid var(--priv); }

/* Tidsrutenett (dag og uke) */
.tgrid-scroll { overflow-x: auto; border-radius: var(--r); box-shadow: var(--shadow); background: #fff; }
.tgrid { --hh: 52px; min-width: 100%; }
.tgwrap.uke .tgrid { min-width: 820px; }
.tg-head, .tg-body { display: grid; grid-template-columns: 58px repeat(var(--days), minmax(0, 1fr)); }
.tg-head { position: sticky; top: 0; z-index: 3; background: #f8fafb; border-bottom: 1px solid var(--line); }
.tg-day { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; text-decoration: none; color: var(--ink); border-left: 1px solid var(--line); }
.tg-day small { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tg-day b { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.tg-day.today b { color: #fff; background: var(--coral); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; }
.tg-day:hover { background: var(--teal-2); }
.tg-times { display: grid; grid-template-rows: repeat(var(--hours), var(--hh)); }
.tg-times span { font-size: .72rem; font-weight: 700; color: var(--muted); text-align: right; padding: 0 8px; transform: translateY(-.6em); }
.tg-times span:first-child { transform: none; }
.tg-col { position: relative; height: calc(var(--hours) * var(--hh)); border-left: 1px solid var(--line); cursor: copy;
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--hh) - 1px), var(--line) calc(var(--hh) - 1px) var(--hh)),
                    repeating-linear-gradient(to bottom, transparent 0 calc(var(--hh) / 2 - 1px), #f3f6f7 calc(var(--hh) / 2 - 1px) calc(var(--hh) / 2)); }
.tg-col.today { background-color: #fbfefe; }
.tg-ev { position: absolute; padding: 4px 7px; margin: 1px 2px; border-radius: 8px; overflow: hidden; text-decoration: none; color: color-mix(in srgb, var(--c) 72%, black);
  background: color-mix(in srgb, var(--c) 16%, white); border-left: 4px solid var(--c); font-size: .78rem; line-height: 1.25; box-shadow: 0 1px 3px rgba(16,36,44,.1); cursor: pointer; transition: box-shadow .15s, transform .1s; z-index: 1; }
.tg-ev:hover { z-index: 2; box-shadow: var(--shadow-lg); transform: scale(1.01); }
.tg-ev b { display: block; font-weight: 800; font-size: .74rem; }
.tg-ev .t { display: block; font-weight: 700; color: var(--ink); }
.tg-ev .r { display: block; color: var(--muted); }
.tg-ev .ic { width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; }
.tg-ev.private { background-color: #f3eef8; background-image: var(--hatch); }
.tg-ev.miss { box-shadow: inset -4px 0 0 var(--coral), 0 1px 3px rgba(16,36,44,.1); }
.tgwrap.dag .tg-ev { font-size: .88rem; padding: 6px 10px; }
.tgwrap.dag .tg-ev b { font-size: .82rem; }
.tg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--coral); z-index: 2; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }

/* Romoversikt */
.rv-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 10px 0 14px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.rv-legend select { width: auto; margin: 0 0 0 auto; border-radius: 999px; padding: 7px 14px; }
.lg { display: inline-block; width: 22px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.lg.meet { background: color-mix(in srgb, var(--teal) 25%, white); border-left: 3px solid var(--teal); }
.lg.private { background: #f3eef8 var(--hatch); border-left: 3px solid var(--priv); }
.lg.whole { background: #fff; border: 2px dashed var(--navy); }
.lg.conflict { background: var(--red-2); border: 2px solid var(--red); }
.rv-scroll { overflow-x: auto; border-radius: var(--r); box-shadow: var(--shadow); background: #fff; }
.rv { --label: 170px; --lh: 30px; min-width: 100%; }
.rv.uke { min-width: 980px; } .rv.maned { min-width: 1250px; } .rv.dag { min-width: 760px; }
.rv-head, .rv-row { display: grid; grid-template-columns: var(--label) 1fr; }
.rv-head { position: sticky; top: 0; z-index: 4; background: #f8fafb; border-bottom: 1px solid var(--line); }
.rv-label { position: sticky; left: 0; z-index: 3; background: #fff; padding: 10px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.rv-label.head { background: #f8fafb; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rv-label a { color: var(--ink); text-decoration: none; } .rv-label small { color: var(--muted); font-size: .76rem; }
.rv-axis { position: relative; height: 40px; }
.rv-axis > span { position: absolute; top: 12px; font-size: .74rem; font-weight: 700; color: var(--muted); transform: translateX(-50%); }
.rv-axis > span:first-child { transform: none; padding-left: 4px; }
.rv-dayhead { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 3px; font-size: .8rem; font-weight: 800; color: var(--ink-2); text-decoration: none; border-left: 1px solid var(--line); }
.rv-dayhead small { font-weight: 600; color: var(--muted); }
.rv-dayhead.weekend { background: #f1f4f5; } .rv-dayhead.today { background: var(--teal-2); color: var(--teal); }
.rv-dayhead:hover { background: var(--teal-2); }
.rv.maned .rv-dayhead { flex-direction: column; gap: 0; line-height: 1.1; font-size: .78rem; }
.rv-row { border-bottom: 1px solid var(--line); }
.rv-row:last-child { border-bottom: 0; }
.rv-row.has-conflict .rv-label { box-shadow: inset 4px 0 0 var(--red); }
.rv-track { position: relative; min-height: calc(var(--lanes) * var(--lh) + 14px); cursor: copy;
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / var(--days))); }
.rv.dag .rv-track { background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / var(--hours))); }
.rv-bar { position: absolute; top: calc(7px + var(--lane) * var(--lh)); height: calc(var(--lh) - 4px); display: flex; align-items: center; gap: 4px; padding: 0 7px; overflow: hidden; white-space: nowrap;
  border-radius: 7px; font-size: .76rem; text-decoration: none; color: color-mix(in srgb, var(--c) 75%, black); background: color-mix(in srgb, var(--c) 20%, white); border-left: 3px solid var(--c); z-index: 1; transition: box-shadow .15s; }
.rv-bar:hover { z-index: 2; box-shadow: var(--shadow-lg); overflow: visible; }
.rv-bar b { font-weight: 800; }
.rv-bar .ic { width: 12px; height: 12px; flex: none; }
.rv-bar.private { background-color: #f3eef8; background-image: var(--hatch); color: #4b3463; }
.rv-bar.whole { outline: 2px dashed color-mix(in srgb, var(--c) 60%, white); outline-offset: -2px; }
.rv-bar.conflict { box-shadow: 0 0 0 2px var(--red); background-color: var(--red-2); }
.rv-bar.conflict::after { content: "!"; display: grid; place-items: center; flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: .7rem; margin-left: auto; }
.rv.maned .rv-bar { padding: 0; border-left-width: 0; justify-content: center; border-radius: 4px; background: var(--c); }
.rv.maned .rv-bar.private { background: var(--priv) var(--hatch); }
.rv.maned .rv-bar .ic { display: none; }
.rv.maned .rv-bar.conflict::after { margin: 0; width: 11px; height: 11px; font-size: .55rem; }
.conflicts .conf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.conflicts .conf-row:last-child { border-bottom: 0; }
.tbl tfoot td { background: #f8fafb; border-top: 2px solid var(--line); }

/* Publisering */
.copyrow { margin-bottom: 12px; } .cr-label { display: block; font-size: .84rem; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; }

@media (max-width: 700px) {
  .kindswitch { grid-template-columns: 1fr; gap: 8px; }
  .kindopt span { padding: 10px 14px; }
  .calbar { flex-direction: column; align-items: stretch; }
  .seg { justify-content: space-between; } .seg a { flex: 1; text-align: center; padding: 8px 6px; }
  .calbar .monthnav { justify-content: space-between; }
  .calbar .monthnav h2 { font-size: 1.05rem; text-align: center; flex: 1; }
  .legend-private { margin-left: 0; }
  .rv { --label: 112px; } .rv-label { padding: 8px 10px; } .rv-label small { display: none; }
  .rv-legend select { margin-left: 0; width: 100%; }
  .tgrid { --hh: 46px; }
  .tg-head, .tg-body { grid-template-columns: 46px repeat(var(--days), minmax(0, 1fr)); }
  .tgwrap.uke .tgrid { min-width: 700px; }
  .tg-times span { padding: 0 4px; font-size: .66rem; }
}
@media print { .calbar .seg, .rv-legend select, .hint { display: none !important; } .rv-scroll, .tgrid-scroll { overflow: visible; box-shadow: none; } }

/* Romoversikt: uke og måned som rutenett (rom × dager) */
.rv.uke { min-width: 900px; } .rv.maned { min-width: 1080px; }
.rv-axis.cells { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); height: auto; }
.rv-axis.cells .rv-dayhead { position: static; padding: 10px 2px; }
.rv-cells { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); }
.rv-cell { display: flex; flex-direction: column; gap: 4px; padding: 6px 5px; min-height: 64px; border-left: 1px solid var(--line); cursor: copy; min-width: 0; }
.rv-cell.weekend { background: #f8fafb; } .rv-cell.today { background: #f2fbfa; }
.rv-cell:hover { background-color: var(--teal-2); }
.rv-chip { display: block; padding: 4px 7px; border-radius: 7px; font-size: .74rem; line-height: 1.25; text-decoration: none; overflow: hidden; cursor: pointer;
  color: color-mix(in srgb, var(--c) 72%, black); background: color-mix(in srgb, var(--c) 18%, white); border-left: 3px solid var(--c); }
.rv-chip b { display: block; font-weight: 800; font-size: .7rem; white-space: nowrap; }
.rv-chip span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-weight: 600; }
.rv-chip .ic { width: 11px; height: 11px; margin-right: 2px; vertical-align: -1px; }
.rv-chip.private { background-color: #f3eef8; background-image: var(--hatch); }
.rv-chip.whole { outline: 2px dashed color-mix(in srgb, var(--c) 55%, white); outline-offset: -2px; }
.rv-chip.conflict { background-color: var(--red-2); box-shadow: 0 0 0 2px var(--red); }
.rv-chip.conflict b::after { content: " ⚠"; color: var(--red); }
.rv-chip:hover { box-shadow: var(--shadow-lg); }
.rv.maned .rv-cell { padding: 4px 2px; gap: 3px; min-height: 54px; align-items: stretch; }
.rv.maned .rv-chip { padding: 2px 0; text-align: center; font-weight: 800; font-size: .7rem; border-left: 0; border-radius: 5px; color: #fff; background: var(--c); }
.rv.maned .rv-chip.private { background: var(--priv) var(--hatch); }
.rv.maned .rv-chip.conflict { background: var(--red); box-shadow: none; }
.rv.maned .rv-chip.whole { outline-color: rgba(255,255,255,.7); }
@media (max-width: 700px) { .rv.uke { min-width: 760px; } .rv.maned { min-width: 900px; } }

.week-agenda { display: none; }
@media (max-width: 700px) {
  .tgwrap.uke, .tgwrap.uke + .week-agenda + .hint, .tgwrap.uke ~ .hint { display: none; }
  .week-agenda { display: block; }
  .week-agenda h3 a { color: inherit; text-decoration: none; }
  .week-agenda h3.today { color: var(--coral); }
}

/* Velg person direkte på møtesiden */
.slots .who { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.assign { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 10px; margin: -3px 0; border-radius: 999px; border: 1.5px solid transparent; background: transparent;
  font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; transition: .15s; }
.assign .ic { width: 15px; height: 15px; opacity: .45; }
.assign:hover, .assign:focus-visible { border-color: var(--c, var(--teal)); background: #fff; }
.assign:hover .ic { opacity: 1; }
.assign.empty { color: var(--coral); border: 1.5px dashed color-mix(in srgb, var(--coral) 55%, white); background: #fff; }
.assign.empty:hover { background: var(--coral-2); border-style: solid; }
.assign.saving { opacity: .5; pointer-events: none; }
.assign-msg { flex-basis: 100%; font-size: .78rem; font-weight: 600; }
.assign-msg:empty { display: none; }
.assign-msg.ok { color: var(--green); } .assign-msg.warn { color: #9a6700; } .assign-msg.err { color: var(--red); }
.assign-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: 270px; max-width: 80vw; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 12px 34px rgba(16,36,44,.22); border: 1px solid var(--line); }
.slots .who:has(.assign-pop) { z-index: 60; }
.gview:has(.assign-pop) { position: relative; z-index: 5; }
.assign-pop input { margin: 0 0 6px; padding: 8px 10px; }
.ap-list { max-height: 280px; overflow: auto; }
.ap-list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 9px; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
.ap-list button:hover, .ap-list button:focus-visible { background: var(--teal-2); }
.ap-list button.cur { background: var(--teal-2); font-weight: 700; }
.ap-list button.cur::after { content: " ✓"; color: var(--teal); }
.ap-list .ap-more { color: var(--teal); font-weight: 700; font-size: .86rem; }
.ap-head { padding: 8px 10px 3px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ap-none { padding: 6px 10px; color: var(--muted); font-size: .86rem; }
@media (max-width: 700px) { .assign-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); width: auto; max-width: none; } .ap-list { max-height: 45vh; } }
.ap-busy { display: inline-block; margin-left: 4px; font-size: .7rem; font-weight: 700; color: #9a6700; background: #fff6e0; padding: 1px 6px; border-radius: 99px; }
.ispost { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-left: 4px solid var(--teal); }
.ispost.expired { opacity: .6; border-left-color: var(--line-2); }
.ispost form { margin-top: 4px; }

/* Infoskjerm-panelet */
.small-n { font-size: 1.15rem !important; line-height: 1.3 !important; }
.statcard form { margin-top: 6px; position: relative; z-index: 1; }
.istabs { margin-bottom: 14px; }
.istabs .cnt { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--teal-2); color: var(--teal); font-size: .74rem; }
.isgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.iscard { display: flex; flex-direction: column; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.iscard.st-ferdig, .iscard.st-fjernet { opacity: .65; }
.is-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(140deg, #0b2530, #123c4a 55%, #0f5a60) center/cover no-repeat; color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 16px 20px; gap: 4px; }
.is-thumb b { font-size: 1.25rem; line-height: 1.15; } .is-thumb span:not(.is-st) { font-size: .8rem; opacity: .85; }
.is-st { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 99px; font-size: .72rem; font-weight: 800; background: rgba(255,255,255,.92); color: var(--navy); }
.st-aktiv .is-st { background: var(--green); color: #fff; } .st-planlagt .is-st { background: #2d7dd2; color: #fff; }
.is-body { display: flex; flex-direction: column; gap: 5px; padding: 12px 16px 14px; }
.is-title { font-size: 1.02rem; }
.is-body .ic { width: 14px; height: 14px; }
.is-progress { display: block; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.is-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); }
.is-chans { display: flex; flex-wrap: wrap; gap: 4px; }
.is-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.is-ev { display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.is-ev .dateblock { width: 50px; min-width: 50px; height: 52px; } .is-ev .dateblock b { font-size: 1.2rem; }
.is-ev b { display: block; font-size: .92rem; } .is-ev small { display: block; }
.is-ev .badge { text-decoration: none; }
.onscreen summary { cursor: pointer; } .onscreen h3 { margin: 14px 0 4px; font-size: .95rem; }
.chanposts { list-style: none; margin: 0; padding: 0; }
.chanposts li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.isform { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ispreview { position: sticky; top: 20px; }
.ispreview h3 { margin-top: 0; }
.isp-screen { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 8px solid #1d2a30; box-shadow: var(--shadow-lg); background: #000; }
.isp-screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.is-thumbimg { display: block; max-width: 220px; border-radius: 10px; margin: 4px 0 10px; }
.quickdur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 14px; font-size: .86rem; color: var(--muted); }
@media (max-width: 900px) { .isform { grid-template-columns: 1fr; } .ispreview { position: static; order: -1; } }

/* Kjøreplan-elementer */
.progpalette { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 14px; padding: 10px 12px; border-radius: 12px; background: #f6f9f9; border: 1px dashed var(--line-2); }
.pchip { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; font: inherit; font-weight: 600; font-size: .86rem; color: var(--ink); cursor: pointer; transition: .15s; }
.pchip small { color: var(--muted); font-weight: 600; font-size: .74rem; }
.pchip::before { content: "+"; color: var(--teal); font-weight: 800; }
.pchip:hover { border-color: var(--teal); background: var(--teal-2); }
.progrow.flash-in { animation: flashin .9s ease-out; border-radius: 10px; }
@keyframes flashin { from { background: var(--teal-2); box-shadow: 0 0 0 6px var(--teal-2); } }

/* ---------- Import av møter ---------- */
.impsteps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.impsteps .card { position: relative; margin: 0; }
.impsteps h2 { margin-top: 6px; }
.stepno { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--teal-2); color: var(--teal, #0f8b8d); font-weight: 800; }
.impsteps input[type=file] { width: 100%; padding: 14px; border: 2px dashed var(--line); border-radius: 12px; background: #fafcfc; }
.impstat { display: flex; flex-wrap: wrap; gap: 8px; }
.impactions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
.badge.warn { background: #fff1cc; color: #7a5300; }
.badge.muted { background: #eef2f3; color: var(--muted); }
.tblwrap { overflow-x: auto; }
.imptbl td.nowrap { white-space: nowrap; }
.imptbl tr.st-err td { background: #fff7f5; }
.imptbl tr.st-dup td { color: #8a9aa1; }
.imptbl td:last-child { min-width: 220px; }

/* ---------- Logo: strektegning av bedehuset ---------- */
.brand .house { display: none; }
.house { height: auto; overflow: visible; }
.loginart .house.big { display: block; width: min(100%, 420px); color: var(--navy); margin-bottom: 4px; }
header.top.guest .brand .logo { display: none; }
header.top.guest .brand .house { display: block; width: 92px; color: #fff; }
@media (min-width: 1181px) {
  .sidenav .brand { flex-direction: column; align-items: stretch; gap: 10px; padding: 6px 8px 22px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .sidenav .brand .logo { display: none; }
  .sidenav .brand .house { display: block; width: 100%; color: #fff; opacity: .95; }
  .sidenav .brand b { font-size: 1.12rem; }
  .sidenav .sn-main { margin-top: 10px; }
}
@media (max-width: 700px) {
  .appbar .brand .logo { display: none; }
  .appbar .brand .house { display: block; width: 74px; color: #fff; }
  .loginart .house.big { margin: 0 auto 4px; width: min(100%, 300px); }
}
