:root {
  --ink: #123e2d;
  --muted: #52665c;
  --paper: #fafbf7;
  --card: #ffffff;
  --line: #dce4d6;
  --field: #bdcbbc;
  --rail: #0b3d38;
  --rail-ink: #edf7f1;
  --teal: #123e2d;
  --lime: #c7ed73;
  --ok: #62851e;
  --ok-bg: #edf2e6;
  --warn: #8a5a12;
  --warn-bg: #f8efd8;
  --alert: #9c2424;
  --alert-bg: #f8e8e6;
  --focus: #79a427;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--teal); }

.skip {
  position: absolute;
  left: -999px;
  background: white;
  padding: 8px;
}

.skip:focus { left: 8px; top: 8px; z-index: 3; }

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

aside {
  background: var(--rail);
  color: var(--rail-ink);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 52px;
  height: auto;
  flex: none;
}

.brand-words {
  font-size: 28px;
  letter-spacing: -1.4px;
  font-weight: 800;
  line-height: 1;
}

.brand-words span {
  display: block;
  margin-top: 5px;
  color: var(--lime);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.brand-note {
  color: #c5ddd4;
  font-size: 14px;
  margin: 10px 0 18px;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 420px);
  gap: 28px;
  align-items: end;
}

.welcome-frog {
  width: 100%;
  height: auto;
}

nav { display: grid; gap: 4px; margin-bottom: 22px; }

nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}

nav a:hover,
nav a:focus-visible { background: rgba(255, 255, 255, 0.08); }

aside nav a[aria-current="page"],
aside nav a[aria-current="page"]:hover,
aside nav a[aria-current="page"]:focus-visible {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

aside nav a[aria-current="page"] .count {
  background: var(--ink);
  color: var(--lime);
}

.count {
  background: var(--lime);
  color: var(--ink);
  border-radius: 999px;
  min-width: 1.4em;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 6px;
}

.duty-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 18px;
}

.duty-card h2 { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }

.on-duty-list { list-style: none; padding: 0; margin: 8px 0; }

.on-duty-list li { margin: 0 0 6px; }

.muted,
.hint,
.guide,
.empty { color: var(--muted); }

.guide {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.guide li { margin: 0 0 4px; }

aside .muted { color: #c5ddd4; }

.text-link { color: var(--lime); }

.user-form {
  color: var(--ink);
  background: var(--card);
}

.user-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.user-form select,
.user-form button { width: 100%; }

.user-form select {
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  background: #fff;
  font-size: 16px;
  font-weight: 650;
  min-height: 42px;
}

.user-form button.text-button,
button.text-button {
  width: auto;
  background: transparent;
  color: var(--teal);
  padding: 6px 0;
  font-weight: 650;
}

main { padding: 28px 32px 72px; max-width: 1180px; }

.entry-with-log {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  align-items: start;
}

.sidelogg {
  position: sticky;
  top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.sidelogg h2 { margin-top: 0; }

.sidelogg ol { list-style: none; padding: 0; margin: 0; }

.sidelogg li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.sidelogg p { margin: 0 0 6px; }

.sidelogg time { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }

h1 {
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 8px;
}

h2 { font-size: 18px; margin: 22px 0 8px; }
h3 { font-size: 16px; margin: 18px 0 8px; }

.shift-line {
  display: grid;
  grid-template-columns: 11rem 8rem 8rem auto auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.shift-length,
.shift-slot {
  min-height: 2.4rem;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.task-line { grid-template-columns: 11rem minmax(0, 1fr); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

textarea { width: 100%; min-height: 4.5rem; }

.page-head { margin-bottom: 18px; }

.kicker { margin: 0 0 6px; color: var(--muted); }

.page-head p { margin: 0; max-width: 62ch; }

.register-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.75fr);
  gap: 18px;
  align-items: stretch;
  margin: 8px 0 8px;
}

.register-row > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.register-row h2 { margin-top: 0; }

.register-row .type-grid {
  flex: 1;
  margin-bottom: 0;
  grid-template-rows: repeat(3, minmax(112px, 1fr));
}

.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 8px;
}

.type-grid a {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  min-height: 112px;
}

.type-grid a:hover { border-color: var(--teal); }

.type-grid a.type-alert {
  background: var(--alert-bg);
  border-color: var(--alert);
}

.type-grid a.type-alert strong { color: var(--alert); }

.type-grid a.type-alert:hover { border-color: var(--alert); }

.type-grid span { color: var(--muted); font-size: 14px; }

.registered-panel {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 8px;
}

.stats-form {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 8px;
}

.registered-panel .stats {
  background: transparent;
  border: 0;
  margin: 0;
  width: 100%;
}

.registered-panel .stats td {
  font-size: 20px;
  font-weight: 700;
}

.banner,
.report,
form,
.facts,
table,
.note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.banner,
.report,
form,
.note { padding: 14px; margin: 0 0 16px; }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.choice-row .choice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

label { display: grid; gap: 4px; font-size: 14px; font-weight: 650; }

input,
select,
textarea,
button {
  font: inherit;
  color: var(--ink);
  color-scheme: light;
}

input,
select,
textarea {
  font-weight: 450;
  padding: 8px 10px;
  border: 1px solid var(--field);
  border-radius: 9px;
  background: white;
}

textarea { width: 100%; resize: vertical; }

button {
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  background: var(--ok-bg);
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button.primary,
.user-form button { background: var(--teal); color: white; }

button:disabled { opacity: 0.55; cursor: wait; }

table form,
.log-row form,
.inline-action,
.logo-actions form {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

table button,
.log-row button { white-space: nowrap; }

#brukere tbody td {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#brukere .logger-row { flex: 1 1 100%; margin: 0; }

#brukere .inline-action { width: auto; margin: 0; }

aside .logout-form {
  background: transparent;
  border: 0;
  padding: 0;
}

aside .logout-form button {
  background: transparent;
  color: var(--rail-ink);
  border: 1px solid rgba(237, 247, 241, 0.45);
}

aside .switch-form button {
  background: var(--lime);
  color: var(--ink);
}

.downloads { display: flex; gap: 8px; margin: 0 0 16px; }
.downloads a {
  display: inline-block;
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--teal);
  color: white;
  text-decoration: none;
}
.logo-actions { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.logo-actions .filters { margin: 0; }

.row-2,
.row-3 { display: grid; gap: 12px; margin-bottom: 12px; }

.row-2 { grid-template-columns: 1fr 1fr; }
.row-2[hidden] { display: none; }
.row-3 { grid-template-columns: 1.2fr 1fr 1fr; }

fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 12px;
}

.check { display: flex; gap: 8px; align-items: center; font-weight: 550; margin: 8px 0; }

.note-flags { display: grid; gap: 2px; margin: 8px 0 12px; }
.note-flags .check { margin: 0; }
.check-important {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 3px solid var(--alert);
  border-radius: 12px;
  background: var(--alert-bg);
  color: var(--alert);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.check-important input {
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--alert);
  flex: none;
}
.check-important span { display: grid; gap: 2px; }
.check-important-note {
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0;
}
.check-important:has(input:checked) {
  background: var(--alert);
  color: white;
  margin-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.js-viktig-tid[hidden] { display: none; }
.js-viktig-tid {
  margin: 0 0 14px;
  padding: 10px 14px 12px;
  border: 3px solid var(--alert);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--alert-bg);
}
.check-important:has(input:checked) .check-important-note { color: #ffe8e8; }
.important-board {
  margin: 0 0 22px;
  padding: 4px 16px 8px;
  border: 3px solid var(--alert);
  border-radius: 14px;
  background: var(--alert-bg);
}
.important-board h2 {
  color: var(--alert);
  font-size: 28px;
  margin-bottom: 4px;
}
.important-board .log-row {
  background: var(--card);
  border: 0;
  border-left: 6px solid var(--alert);
  border-radius: 8px;
  margin: 8px 0;
  padding: 12px;
}
.mark-important {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--alert);
  color: white;
  font-weight: 700;
}
.js-varsel-epost[hidden] { display: none; }
.gsp-choice { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.cover-form .gsp-choice { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin: 0; }
.cover-form .gsp-choice legend { float: left; width: auto; margin: 0 12px 0 0; padding: 0; }
.gsp-choice .check { margin: 4px 0; }
.js-gsp-wrap[hidden] { display: none; }
.note-marks { margin: 8px 0 16px; }

.shift-row[hidden],
#use-estimated[hidden],
#estimated-hint[hidden],
#shift-hint-delay[hidden] { display: none; }

.shift-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr 0.8fr 0.9fr;
  gap: 8px;
  margin-bottom: 8px;
}

.cover-terms {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.cover-note { flex: 1; min-width: 12rem; }

.pin-form { max-width: 22rem; }

.pin-form input { letter-spacing: 0.3em; font-size: 20px; }

.secret-field { position: relative; display: block; }

.secret-field input { width: 100%; padding-right: 46px; }

.secret-field .eye {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.secret-field .eye:hover,
.secret-field .eye[aria-pressed="true"] {
  background: var(--ok-bg);
  color: var(--ink);
}

.secret-field .eye .shut { display: none; }

.secret-field .eye[aria-pressed="true"] .open { display: none; }

.secret-field .eye[aria-pressed="true"] .shut { display: block; }

.signed-in { margin: 12px 0 8px; font-weight: 650; }

.logo-preview { max-height: 72px; max-width: 240px; background: #fff; display: block; }

.logger-row,
.inline-action {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0;
  margin: 0 0 6px;
  border: 0;
  background: transparent;
}

.logger-row input,
.logger-row select { width: auto; }

.save-note {
  color: var(--ok);
  font-size: 14px;
  font-weight: 650;
}
.save-note.warn { color: var(--alert); }

.stats td,
.stats th { text-align: right; }

.stats th:first-child,
.stats td:first-child,
.stats tbody th { text-align: left; }

.log-list,
.notice-list { list-style: none; padding: 0; margin: 0; }

.log-row,
.notice-list li {
  display: grid;
  grid-template-columns: 11.5rem 1.5fr 0.9fr 0.9fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.notice-list li { grid-template-columns: auto 1fr auto; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.facts div { margin: 0; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.facts dd { margin: 2px 0 0; }

.pill,
.status-banner {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
}

.status-banner { padding: 8px 14px; letter-spacing: 0.03em; text-transform: uppercase; margin: 0 0 14px; }

.dekket { background: var(--ok-bg); color: var(--ok); }
.delvis { background: var(--warn-bg); color: var(--warn); }
.apen { background: var(--alert-bg); color: var(--alert); }

.flash { padding: 10px 12px; border-radius: 10px; margin: 0 0 14px; }
.flash.ok { background: var(--ok-bg); }
.flash.warn { background: var(--alert-bg); }
.flash ul { margin: 0; padding-left: 18px; }

.period-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.period-links a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--card);
}
.period-links a.is-on { background: var(--teal); color: white; }

table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
tr.apen-rad td { background: var(--alert-bg); }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }

.cover-edit td { background: var(--ok-bg); padding-top: 10px; padding-bottom: 10px; }

.cover-form {
  display: grid;
  grid-template-columns: 8rem 10rem minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.cover-form-extra {
  grid-template-columns: 8rem 11rem 16rem max-content;
}

.cover-form-extra button { width: auto; justify-self: start; }

.cover-form input { width: 100%; min-width: 0; }

.cover-form .js-gsp-wrap,
.cover-form .pay-choices {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.cover-form .check { margin: 0; font-size: 14px; white-space: nowrap; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.duty-prompt {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 24, 22, 0.48);
}

.duty-prompt form { width: min(420px, 100%); margin: 0; }

.duty-prompt h2 { margin-top: 0; }

dialog.sheet {
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: var(--ink);
  background: var(--card);
  width: min(520px, calc(100vw - 32px));
}

dialog.sheet::backdrop { background: rgba(20, 24, 22, 0.48); }

dialog.sheet form { margin: 0; }

dialog.sheet fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 12px 0;
}

.gate { max-width: 420px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.stat-card,
.analysis {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.stat-card strong {
  display: block;
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1;
}

.stat-card span,
.stat-card .hint { color: var(--muted); font-size: 14px; }

.stat-card .hint { margin: 8px 0 0; }

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.analysis h2 { margin-top: 0; }

.bar-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1.1fr) minmax(0, 2fr) 2.4rem;
  gap: 8px;
  align-items: center;
  margin: 7px 0;
  font-size: 14px;
}

.bar {
  height: 8px;
  background: var(--ok-bg);
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
}

.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }

.dialog-error {
  color: var(--alert);
  background: var(--alert-bg);
  border-radius: 8px;
  padding: 8px 10px;
}

.modules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.modules a {
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 650;
}

.modules a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.handover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}

.handover-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
}

.handover-card h2,
.handover-card h3 { margin-top: 0; }

.handover-card h3 { margin-top: 16px; }

.handover-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.handover-list li {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.handover-list a { font-weight: 650; }

.handover-list span,
.handover-list time { color: var(--muted); font-size: 13px; }

.shift-form h3 { margin-top: 0; }

.shift-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.holiday-years {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.holiday-list { margin: 0; padding-left: 18px; }

.holiday-list li { margin: 0 0 4px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .register-row, .entry-with-log, .stat-grid, .analysis-grid, .handover-grid, .holiday-years, .welcome { grid-template-columns: 1fr; }
  .welcome-frog { width: 140px; }
  .sidelogg { position: static; }
  aside { position: static; height: auto; }
  main { padding: 18px 14px 48px; }
  .row-2, .row-3, .shift-row, .shift-line, .task-line, .log-row, .notice-list li, .cover-form { grid-template-columns: 1fr 1fr; }
  .cover-form input[name="cover_note"],
  .cover-form button { grid-column: 1 / -1; }
  h1 { font-size: 28px; }
}
