/* Skifti. Lys, rolig flate med hvite kort; hver ansatt har sin egen farge
   (--c), og vaktkortene tegnes i en lys tone av den. Mobil først; fra 900 px
   får appen sidemeny og rutenett som bruker hele bredden. */

:root {
  color-scheme: light;
  --bg: #F4F5FA; --surface: #fff; --surface-2: #F7F8FC; --text: #1C2033; --muted: #6A6F85; --faint: #9AA0B4;
  --line: #E6E8F0; --line-2: #EEF0F6;
  --accent: #4F6BED; --accent-2: #3F58D6; --accent-soft: #EEF1FF; --accent-ink: #2F44B5;
  --danger: #E5484D; --danger-soft: #FDECEC; --warn-soft: #FFF6E3; --warn-ink: #7A4F07;
  --open: #94A3B8;
  --r: 12px; --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(22, 28, 61, .05);
  --shadow: 0 1px 2px rgba(22, 28, 61, .04), 0 8px 24px rgba(22, 28, 61, .07);
  --shadow-lg: 0 24px 64px rgba(22, 28, 61, .2);
  --ring: 0 0 0 4px rgba(79, 107, 237, .16);
  --tab-h: 64px; --side-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { letter-spacing: -.015em; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(79, 107, 237, .35); outline-offset: 2px; }

.ic { width: 20px; height: 20px; flex: none; display: block; }

/* ---- rammen: mobil -------------------------------------------------------- */

.sidebar { display: none; }
.content { min-width: 0; }
.topstack { position: sticky; top: 0; z-index: 20; }
.mobilebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(244, 245, 250, .86); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
}
.mobileme a { display: block; text-decoration: none; }
main { padding: 4px 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); max-width: 1600px; margin: 0 auto; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px; display: block; overflow: hidden; flex: none;
  background: linear-gradient(135deg, #4F6BED, #8B5CF6); box-shadow: 0 4px 12px rgba(91, 99, 240, .35);
}
.logo-mark svg { width: 100%; height: 100%; display: block; }
.wordmark { font-weight: 800; font-size: 19px; letter-spacing: -.035em; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--faint); font-size: 11px; font-weight: 600; text-decoration: none; min-width: 0;
}
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a.active { color: var(--accent); }
.tabbar a.active .ic { stroke-width: 2.2; }

body:not(.authed) .tabbar, body:not(.authed) .mobileme, body:not(.authed) .bell { display: none; }
.mobile-right { display: flex; align-items: center; gap: 6px; }
.bell {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  color: var(--muted); text-decoration: none; transition: background .15s, color .15s;
}
.bell:hover, .bell.active { background: var(--accent-soft); color: var(--accent-ink); }
.bell .ic { width: 21px; height: 21px; }
.bell-badge {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff;
}
body:not(.authed) main { padding-bottom: 40px; }

/* ---- rammen: desktop ------------------------------------------------------ */

@media (min-width: 900px) {
  body.authed .app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
  body.authed .sidebar {
    display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow: hidden auto;
    padding: 22px 14px 16px; color: #fff;
    background: radial-gradient(420px 320px at 0% 0%, rgba(99, 125, 255, .35), transparent 70%),
      radial-gradient(380px 300px at 100% 100%, rgba(255, 209, 102, .14), transparent 70%),
      linear-gradient(175deg, #272C86 0%, #33298A 55%, #452B8F 100%);
  }
  .side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 22px 8px; }
  .sidebar .logo-mark { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
  .sidebar .wordmark { color: #fff; }
  .sidebar .bell { color: rgba(255, 255, 255, .75); }
  .sidebar .bell:hover, .sidebar .bell.active { background: rgba(255, 255, 255, .12); color: #fff; }
  .sidebar .bell-badge { box-shadow: 0 0 0 2px #2A2C86; }
  /* Logoens piller, svakt nederst */
  body.authed .side-art { display: block; position: absolute; left: -40px; bottom: 56px; width: 300px; height: 190px; opacity: .07; pointer-events: none; }
  .side-art i { position: absolute; height: 56px; border-radius: 28px; background: #fff; }
  .side-art i:first-child { left: 0; top: 20px; width: 190px; }
  .side-art i:nth-child(2) { left: 56px; top: 100px; width: 190px; }
  @media (max-height: 820px) { body.authed .side-art { display: none; } }
  .side-art b { position: absolute; left: 210px; top: 26px; width: 42px; height: 42px; border-radius: 50%; background: #fff; }
.sidebar .logo { padding: 0; }
  .mobilebar, .tabbar { display: none; }
  main { padding: 30px 36px 56px; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  main { padding: 24px 20px 48px; }
  .wg-emp { padding-left: 12px; gap: 9px; }
  .wg-emp .av { width: 30px; height: 30px; font-size: 11px; }
}
/* Sidemenyen (PC): dyp blå-lilla bakgrunn som innloggingen, grupper, og
   aktiv side med lys bakgrunn, hvit ikonboks og gul markør. */
.sidenav { display: flex; flex-direction: column; gap: 18px; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label { padding: 0 12px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .42); }
.sidenav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 12px;
  color: rgba(255, 255, 255, .74); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background .15s, color .15s;
}
.sidenav .nav-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .08); transition: background .15s, color .15s; }
.sidenav .nav-ic .ic { width: 18px; height: 18px; }
.tabbar .nav-ic { display: contents; }
.sidenav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidenav a:hover .nav-ic { background: rgba(255, 255, 255, .14); }
.sidenav a.active { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.sidenav a.active .nav-ic { background: #fff; color: #4338CA; box-shadow: 0 4px 12px rgba(17, 12, 60, .3); }
.sidenav a.active::before { content: ""; position: absolute; left: -14px; top: 50%; width: 4px; height: 20px; margin-top: -10px; border-radius: 0 4px 4px 0; background: #FFD166; }
.sidenav .nav-badge { box-shadow: 0 0 0 2px rgba(23, 20, 70, .5); }
.side-new {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; margin-bottom: 2px; border: 0; border-radius: 12px;
  background: #fff; color: #3730A3; font: 700 14.5px var(--font); cursor: pointer; box-shadow: 0 8px 20px rgba(10, 8, 40, .28); transition: transform .08s, box-shadow .15s;
}
.side-new:hover { box-shadow: 0 10px 26px rgba(10, 8, 40, .36); }
.side-new:active { transform: translateY(1px); }
.side-new .ic { width: 18px; height: 18px; }
.side-user { margin-top: auto; position: relative; z-index: 1; }
.side-user-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 14px;
  background: rgba(255, 255, 255, .1); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: background .15s;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.side-user-btn:hover { background: rgba(255, 255, 255, .16); }
.side-user-btn .grow { min-width: 0; }
.side-user-btn > .ic { width: 16px; height: 16px; color: rgba(255, 255, 255, .55); }
.side-user-btn .av { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.side-art { display: none; }
.me-btn { display: block; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.me-btn:active { transform: scale(.95); }
.me-btn.active .av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.side-user:empty { display: none; }
.side-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-role { font-size: 12px; color: rgba(255, 255, 255, .6); }

/* ---- sidehode ------------------------------------------------------------- */

.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 16px; margin: 6px 0 18px; }
.pagehead h1 { font-size: 28px; line-height: 1.15; margin: 0; letter-spacing: -.025em; }
.pagehead p { margin: 3px 0 0; color: var(--muted); }
.pagehead-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 899px) {
  .pagehead { margin-top: 2px; }
  .pagehead h1 { font-size: 24px; }
  .pagehead-tools { width: 100%; justify-content: space-between; }
  .pagehead-tools.end { width: auto; }
  .hide-sm { display: none; }
}

/* ---- knapper -------------------------------------------------------------- */

a.btn { text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 650; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .06s;
}
.btn:hover { background: var(--surface-2); border-color: #D6DAE6; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(79, 107, 237, .3), 0 6px 16px rgba(79, 107, 237, .28); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--accent-ink); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #F5C6C8; }
.btn-block { width: 100%; height: 48px; }

.seg { display: inline-flex; padding: 3px; background: #E8EAF2; border-radius: 12px; }
.seg button {
  border: 0; background: transparent; height: 36px; padding: 0 16px; border-radius: 9px;
  font-weight: 650; color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(22, 28, 61, .1); }
.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.stepper button {
  border: 0; background: transparent; height: 34px; min-width: 34px; padding: 0 10px; border-radius: 9px;
  display: grid; place-items: center; font-weight: 650; cursor: pointer;
}
.stepper button:hover { background: var(--surface-2); }
.stepper .ic { width: 18px; height: 18px; }

/* ---- skjema --------------------------------------------------------------- */

.field { display: block; margin: 0 0 16px; min-width: 0; }
.label { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 7px; }
input:where(:not([type=checkbox]):not([type=radio]):not([type=hidden])), textarea {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 46px; padding: 0 14px; margin: 0;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
input:hover, textarea:hover { border-color: #D4D8E5; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=date], input[type=time] { display: flex; align-items: center; font-variant-numeric: tabular-nums; }
input::-webkit-date-and-time-value { text-align: left; }
input::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.time-wrap { position: relative; display: block; }
.time-wrap .ic { position: absolute; left: 14px; top: 23px; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
input.time-input { padding-left: 42px; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
input.time-input::placeholder { font-weight: 500; letter-spacing: 0; }
input.is-bad { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(229, 72, 77, .14); }
.time-wrap.open input.time-input { border-color: var(--accent); box-shadow: var(--ring); }
.time-wrap.open .ic { color: var(--accent); }

/* Tidsvelger under klokkeslettfeltene */
/* Datovelger */
.date-wrap { position: relative; display: block; }
.date-wrap > .ic { position: absolute; left: 14px; top: 23px; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
input.date-input { padding-left: 40px; padding-right: 46px; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
input.date-input::placeholder { font-weight: 500; letter-spacing: 0; }
input.date-input.is-bad { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.date-dow { position: absolute; right: 12px; top: 23px; transform: translateY(-50%); font-size: 13px; font-weight: 650; color: var(--muted); pointer-events: none; }
.date-wrap.open input.date-input { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 107, 237, .16); }
.datepop {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 304px; padding: 10px 10px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); animation: drop .14s ease-out;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px 8px; }
.dp-title { font-size: 15px; font-weight: 750; letter-spacing: -.01em; }
.dp-nav { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.dp-nav:hover { background: var(--surface-2); color: var(--text); }
.dp-nav .ic { width: 18px; height: 18px; }
.dp-grid { display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.dp-dowh { padding: 2px 0 6px; text-align: center; font-size: 11px; font-weight: 750; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.dp-wk { display: grid; place-items: center; font-size: 10.5px; font-weight: 650; color: var(--faint); font-variant-numeric: tabular-nums; }
.dp-dowh.dp-wk { font-size: 9.5px; }
.dp-day {
  position: relative; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--text);
  font: 600 14px var(--font); font-variant-numeric: tabular-nums; cursor: pointer;
}
.dp-day:hover:not(:disabled) { background: var(--surface-2); }
.dp-day.is-out { color: var(--faint); font-weight: 500; }
.dp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-ink); }
.dp-day.in-range { background: var(--accent-soft); border-radius: 0; }
.dp-day.r-start { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.dp-day.r-end { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.dp-day.is-sel, .dp-day.is-sel:hover { background: var(--accent); color: #fff; border-radius: 10px; box-shadow: 0 4px 10px rgba(79, 107, 237, .35); }
.dp-day:disabled { color: #C9CDD9; cursor: default; text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .15); }
.dp-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 6px 2px 0; border-top: 1px solid var(--line-2); }
.dp-link { border: 0; background: none; padding: 6px 8px; border-radius: 8px; color: var(--accent-ink); font: 650 13px var(--font); cursor: pointer; }
.dp-link:hover:not(:disabled) { background: var(--accent-soft); }
.dp-link:disabled { color: var(--faint); cursor: default; }
.row2 > .field:last-child .datepop { left: auto; right: 0; }

.timepop {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 100%; min-width: 200px;
  display: block; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: drop .14s ease-out;
}
.tp-list { position: relative; display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; overscroll-behavior: contain; }
.tp-list button {
  flex: none; height: 34px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text);
}
.tp-list button { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 12px; }
.tp-list button small { font-size: 12px; font-weight: 600; color: var(--faint); }
.tp-list button:hover { background: var(--surface-2); }
.tp-list button.on { background: var(--accent); color: #fff; }
.tp-list button.on small { color: rgba(255, 255, 255, .8); }
.tp-list button:disabled { color: #C8CCD8; cursor: default; background: transparent; }
.tp-sep { flex: none; padding: 6px 4px 2px; font-size: 10px; font-weight: 750; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; text-align: center; border-top: 1px dashed var(--line); margin-top: 2px; }
.hint { font-size: 13px; color: var(--muted); margin: -8px 0 16px; min-height: 1em; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; margin: 6px 0 0; }
.error:empty { display: none; }

/* Egen nedtrekksliste (erstatter <select>) */
.picker { position: relative; }
.picker-btn {
  width: 100%; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 10px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.picker-btn:hover { border-color: #D4D8E5; }
.picker-btn:focus-visible, .picker.open .picker-btn { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.picker-btn .chev { margin-left: auto; color: var(--faint); transition: transform .18s; }
.picker.open .chev { transform: rotate(180deg); }
.opt-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.opt-text span { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-text small { font-size: 12.5px; color: var(--muted); }
.picker-list {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); max-height: 300px; overflow: auto;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: drop .14s ease-out;
}
.picker-opt {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left;
}
.picker-opt:hover, .picker-opt:focus-visible { background: var(--surface-2); outline: none; }
.picker-opt[aria-selected="true"] { background: var(--accent-soft); }
.picker-opt[aria-selected="true"]::after {
  content: ""; margin-left: auto; width: 18px; height: 18px; flex: none; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 4px color-mix(in srgb, var(--c) 30%, #fff); margin: 0 4px; }

/* Brikker: hurtigvalg og pause */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; transition: all .15s;
}
.chip-btn:hover { border-color: #D4D8E5; background: var(--surface-2); }
.chip-btn.on { background: var(--accent-soft); border-color: rgba(79, 107, 237, .45); color: var(--accent-ink); }
.chips.even { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); }
.chips.even .chip-btn { padding: 0 6px; }

/* Fargevalg */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 2px; }
.swatch { position: relative; cursor: pointer; display: block; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); transition: transform .12s, box-shadow .12s; }
.swatch:hover span { transform: scale(1.08); }
.swatch input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); }
.swatch input:focus-visible + span { outline: 3px solid rgba(79, 107, 237, .4); outline-offset: 5px; }

/* Bryter */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.switch span { font-weight: 600; }
.switch small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.switch input { -webkit-appearance: none; appearance: none; position: relative; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: #D7DAE6; cursor: pointer; flex: none; transition: background .18s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

/* ---- generelle flater ----------------------------------------------------- */

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 14px; font-size: 16px; }
.card p { margin: 0 0 6px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #D9DCE6; border-radius: 16px; }
.loading { padding: 48px 0; text-align: center; color: var(--faint); animation: late-in .2s .35s both; }
/* «Laster…» vises bare om det tar litt tid, så raske sider ikke blinker. */
@keyframes late-in { from { opacity: 0; } to { opacity: 1; } }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.badge.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.badge.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }

/* Avatarer med initialer i den ansattes farge */
.av {
  --c: #64748B; display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: 750; letter-spacing: -.02em;
  background: #EEF0F6; background: color-mix(in srgb, var(--c) 20%, #fff);
  color: var(--c); color: color-mix(in srgb, var(--c) 78%, #0B0D17);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 32%, #fff);
}
.av-sm { width: 26px; height: 26px; font-size: 10.5px; }
.av-md { width: 36px; height: 36px; font-size: 13px; }
.av-lg { width: 48px; height: 48px; font-size: 16px; }
.av-xl { width: 72px; height: 72px; font-size: 24px; }
.av-open { background: #fff; color: var(--faint); box-shadow: none; border: 1.5px dashed var(--open); }
.stack { display: inline-flex; align-items: center; }
.stack .av { box-shadow: 0 0 0 2px #fff; }
.stack .av + .av { margin-left: -8px; }

/* ---- vaktkort ------------------------------------------------------------- */

.shift {
  --c: #64748B; display: block; width: 100%; text-align: left; padding: 8px 10px; margin: 0;
  font-size: 13px; line-height: 1.3; border-radius: 10px;
  background: #F3F4F8; background: color-mix(in srgb, var(--c) 14%, #fff);
  color: var(--text); color: color-mix(in srgb, var(--c) 58%, #0E1120);
  border: 1px solid color-mix(in srgb, var(--c) 20%, #fff);
}
button.shift { cursor: pointer; font: inherit; font-size: 13px; transition: transform .08s, box-shadow .15s, opacity .2s; }
button.shift:hover { transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 28%, transparent); }
.shift.is-draft {
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, #fff) 0 6px, #fff 6px 12px);
  border: 1.5px dashed color-mix(in srgb, var(--c) 60%, #fff);
}
.shift.is-open { border-style: dashed; border-color: #C3CBD8; }
.shift.is-dim { opacity: .25; }
.shift-time { font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift-time span { font-weight: 550; opacity: .8; }
.shift-time .ic { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; margin-left: 4px; opacity: .7; }
.shift-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift-meta { font-size: 12px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift .tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; vertical-align: 1px;
  background: #FFF1D6; color: var(--warn-ink); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.shift-list { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; font-size: 14px; }
.shift-list .shift-name { font-size: 15px; }
.shift-list .shift-meta, .tl-card .shift-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 13px; margin-top: 3px; white-space: normal; }
.shift-meta .ic { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.shift-note { margin-top: 8px; font-size: 13px; background: rgba(255, 255, 255, .65); border-radius: 9px; padding: 7px 9px; color: var(--text); }
.shift-go { color: color-mix(in srgb, var(--c) 50%, #8A90A6); }
.shift-go .ic { width: 18px; height: 18px; }

/* ---- planverktøy ---------------------------------------------------------- */

.banner {
  display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; margin-bottom: 14px;
  background: var(--warn-soft); border: 1px solid #F4DFB0; border-radius: 16px; color: var(--warn-ink);
}
.banner-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.banner-text span { font-size: 13px; opacity: .85; }
.subtools { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.legend { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; padding: 3px; margin: -3px; scrollbar-width: none; }
.legend::-webkit-scrollbar { display: none; }
.lchip {
  --c: var(--open); display: inline-flex; align-items: center; gap: 7px; flex: none; height: 36px; padding: 0 12px 0 5px;
  border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 650; font-size: 13px; white-space: nowrap; cursor: pointer;
  transition: all .15s;
}
.lchip small { color: var(--muted); font-weight: 550; }
.lchip:hover { border-color: #D4D8E5; }
.lchip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 28%, transparent); }

/* Ukerutenett (desktop): ansatte nedover, dager bortover */
.wgrid-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: auto; max-height: calc(100vh - 220px); }
.wgrid { display: grid; grid-template-columns: minmax(170px, 230px) repeat(7, minmax(92px, 1fr)); min-width: 820px; }
.wg-row { display: contents; }
.wg-corner, .wg-day { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.wg-corner { left: 0; z-index: 4; display: flex; align-items: flex-end; padding: 0 18px 14px; font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.wg-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border-left: 1px solid var(--line-2); }
.wg-dow { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.wg-date { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; font-weight: 750; letter-spacing: -.03em; }
.wg-day.is-today .wg-dow { color: var(--accent); }
.wg-day.is-today .wg-date { background: var(--accent); color: #fff; box-shadow: 0 6px 14px rgba(79, 107, 237, .35); }
.wg-count { font-size: 11.5px; color: var(--faint); }
.wg-emp {
  position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 11px; padding: 10px 12px 10px 16px;
  background: #fff; border-bottom: 1px solid var(--line-2); min-width: 0;
}
.wg-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-sub { font-size: 12px; color: var(--muted); }
.wg-cell { display: flex; flex-direction: column; gap: 6px; min-height: 78px; padding: 6px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transition: opacity .2s; }
.wg-cell.is-today { background: #FAFBFF; }
.wg-row.is-open > * { background: #FAFBFD; }
.wg-row:last-child > * { border-bottom: 0; }
.wg-row.is-dim > * { opacity: .28; }
.wg-row.is-dim > .wg-emp { opacity: .5; }
.wg-add, .mg-add {
  display: grid; place-items: center; border: 1px dashed transparent; border-radius: 9px; background: transparent;
  color: var(--faint); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s, color .15s, border-color .15s;
}
.wg-add { margin-top: auto; height: 28px; width: 100%; }
.wg-add:only-child { flex: 1; }
.wg-add .ic, .mg-add .ic { width: 16px; height: 16px; }
.wg-cell:hover .wg-add, .wg-add:focus-visible { opacity: 1; border-color: #D9DCE6; }
.wg-add:hover, .mg-add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Månedsrutenett (desktop) */
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.mg-dow { padding: 12px 12px 10px; font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.mg-cell { display: flex; flex-direction: column; gap: 5px; min-height: 148px; min-width: 0; padding: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.mgrid > :nth-child(7n) { border-right: 0; }
.mg-cell.is-out { background: #FAFBFD; }
.mg-cell.is-out .mg-num { color: var(--faint); }
.mg-head { display: flex; align-items: center; justify-content: space-between; height: 28px; }
.mg-num { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 13.5px; font-weight: 750; }
.mg-cell.is-today .mg-num { background: var(--accent); color: #fff; }
.mg-add { width: 28px; height: 28px; }
.mg-cell:hover .mg-add, .mg-add:focus-visible { opacity: 1; }
.shift-grid { padding: 7px 8px; }
.shift-grid .shift-time { white-space: normal; }
.shift-month { padding: 6px 8px; font-size: 12px; }
.shift-month .shift-time { font-size: 12px; }
.shift-month .shift-meta { font-size: 11.5px; }

/* Tidsrutenett for uken (PC): tidsakse for hele døgnet, vakter etter start og lengde */
.tgrid-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: auto; height: calc(100vh - 230px); min-height: 440px; overscroll-behavior: contain; }
.tgrid { display: grid; grid-template-columns: 58px repeat(var(--days, 7), minmax(96px, 1fr)); min-width: 760px; }
.tgrid.tgrid-day { min-width: 0; grid-template-columns: 52px minmax(0, 1fr); }
.tgrid-day .wg-day { flex-direction: row; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 10px; }
.tgrid-day .wg-unav { flex-basis: 100%; }
.tgrid-day .shift-slot { padding: 8px 12px; }
.tgrid-day .shift-slot .shift-time { font-size: 16px; }
@media (max-width: 899px) {
  .tgrid-wrap.is-day { height: calc(100vh - 300px); height: calc(100dvh - 300px); min-height: 380px; }
  .tgrid-day .tg-axis span { font-size: 10.5px; right: 6px; }
}
.tg-corner { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.tgrid .wg-day { z-index: 5; }
.tg-axis { position: relative; height: calc(var(--hh) * 24); }
.tg-axis span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; font-weight: 650; color: var(--faint); font-variant-numeric: tabular-nums; }
.tg-col {
  position: relative; height: calc(var(--hh) * 24); border-left: 1px solid var(--line-2);
  background-image:
    repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px var(--hh)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--hh) / 2), #F6F7FA calc(var(--hh) / 2) calc(var(--hh) / 2 + 1px), transparent calc(var(--hh) / 2 + 1px) var(--hh));
}
.tg-col.is-today { background-color: #FAFBFF; }
.tg-col.can-add { cursor: pointer; }
.tg-now { position: absolute; left: -1px; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.tg-ghost {
  position: absolute; left: 3px; right: 3px; height: calc(var(--hh) - 2px); z-index: 1; pointer-events: none;
  padding: 6px 8px; border: 1.5px dashed var(--accent); border-radius: 10px; background: rgba(238, 241, 255, .85);
  color: var(--accent-ink); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.shift-slot {
  position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 2px; overflow: hidden;
  padding: 6px 8px; border-radius: 10px; border-left: 3px solid var(--c); text-align: left;
}
.shift-slot.is-draft, .shift-slot.is-open { border-left-width: 1.5px; }
.shift-slot .shift-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.shift-slot .shift-head .ic { width: 13px; height: 13px; margin-left: auto; opacity: .7; flex: none; }
.shift-slot .shift-head .av { width: 22px; height: 22px; font-size: 9.5px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8); }
.shift-slot .shift-time { font-size: 14px; margin-top: 2px; }
.shift-slot-note { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-top: 4px; font-style: italic; }
.shift-slot.size-m .shift-meta { display: none; }
.shift-slot.size-m .shift-time { margin-top: 0; }
.shift-slot.size-s { flex-direction: row; align-items: center; gap: 6px; padding: 2px 6px; }
.shift-slot.size-s .av, .shift-slot.size-s .shift-meta, .shift-slot.size-s .shift-head .ic { display: none; }
.shift-slot.size-s .shift-time { order: -1; font-size: 12px; margin: 0; }
.shift-slot.is-cut { border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; }
.shift-slot.is-cont { border-top-left-radius: 2px; border-top-right-radius: 2px; }
button.shift-slot:hover { z-index: 4; }
.seg-icons button { padding: 0 11px; display: grid; place-items: center; }
.seg-icons .ic { width: 18px; height: 18px; }

/* Uken på mobil: én seksjon per dag, med dekningsstripe og en rad per vakt */
.agenda { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.ag-axis { display: grid; grid-template-columns: 52px 1fr 34px; align-items: end; gap: 10px; padding: 0 12px; margin-bottom: -6px; }
.ag-axis-lbl { font-size: 10.5px; font-weight: 750; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.ag-ticks { position: relative; height: 14px; }
.ag-ticks span { position: absolute; top: 0; transform: translateX(-50%); font-size: 10.5px; font-weight: 650; color: var(--faint); font-variant-numeric: tabular-nums; }
.ag-ticks span:first-child { transform: none; }
.ag-ticks span:last-child { transform: translateX(-100%); }
.ag-day { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.ag-day.is-today { border-color: rgba(79, 107, 237, .45); box-shadow: 0 0 0 3px rgba(79, 107, 237, .1), var(--shadow-sm); }
.ag-head { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; }
.ag-day:not(.is-empty) .ag-head { border-bottom: 1px solid var(--line-2); }
.ag-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 48px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.ag-day.is-today .ag-date { background: var(--accent); color: #fff; }
.ag-dow { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.ag-num { font-size: 19px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.ag-sum { min-width: 0; }
.ag-sum-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; font-size: 13px; font-weight: 650; color: var(--muted); }
.ag-sum-top .wg-unav { margin: 0; justify-content: flex-end; flex-wrap: nowrap; overflow: hidden; }
.ag-bar { position: relative; height: 12px; margin-top: 6px; border-radius: 4px; background: repeating-linear-gradient(90deg, #EEF0F5 0 1px, #F6F7FA 1px 100%); overflow: hidden; }
.ag-seg { position: absolute; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); }
.ag-seg.is-open { background: repeating-linear-gradient(135deg, #B9C2D0 0 3px, #E3E7EE 3px 6px); }
.ag-seg.is-draft { opacity: .45; }
.ag-seg.is-dim { opacity: .2; }
.ag-now { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--danger); border-radius: 1px; }
.ag-add { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--accent-ink); cursor: pointer; }
.ag-add .ic { width: 18px; height: 18px; }
.ag-day.is-empty .ag-sum-top > span { color: var(--faint); font-weight: 600; }

.shift.ag-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: stretch; gap: 10px; padding: 6px 12px; margin: 0; border: 0; border-radius: 0; background: none; color: var(--text); box-shadow: none; transform: none; }
.shift.ag-row:first-of-type { padding-top: 10px; }
.shift.ag-row:last-child { padding-bottom: 12px; }
button.shift.ag-row:hover { transform: none; box-shadow: none; }
button.shift.ag-row:active .ag-card { transform: scale(.985); }
.ag-time { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ag-time b { font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; }
.ag-time span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ag-time sup { font-size: 9px; margin-left: 1px; color: var(--accent-ink); font-weight: 800; }
.ag-card {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 11px; border-radius: 12px; border-left: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 11%, #fff); color: color-mix(in srgb, var(--c) 55%, #0E1120); transition: transform .08s;
}
.ag-row.is-me .ag-card { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, #fff); }
.ag-row.is-draft .ag-card { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 8%, #fff) 0 6px, #fff 6px 12px); border: 1.5px dashed color-mix(in srgb, var(--c) 60%, #fff); border-left: 4px solid var(--c); }
.ag-row.is-open .ag-card { background: #fff; border: 1.5px dashed #C3CBD8; border-left: 4px solid #94A3B8; color: var(--text); }
.ag-row.has-conflict .ag-card { box-shadow: inset 0 0 0 1.5px rgba(220, 38, 38, .45); }
.ag-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ag-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.ag-name .tag { margin-left: 2px; }
.ag-name .conflict-ic .ic { width: 15px; height: 15px; }
.ag-meta { font-size: 12.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-meta .ic { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.ag-meta em { font-style: italic; }
.ag-hrs { flex: none; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; opacity: .85; }
.shift .tag.tag-me { background: var(--accent); color: #fff; }

/* Mobilkalender for uke og måned: brikker med initialer i den ansattes farge */
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; padding: 10px 6px 8px; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.mcal-dow { text-align: center; font-size: 11px; font-weight: 750; color: var(--faint); padding-bottom: 6px; text-transform: uppercase; }
.mcal-cell {
  display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; min-height: 78px; padding: 4px 3px 5px;
  border: 0; border-radius: 11px; background: transparent; cursor: pointer; transition: background .15s;
}
.mcal-week .mcal-cell { min-height: 112px; }
.mcal-num { align-self: center; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 650; }
.mcal-cell.is-out { opacity: .4; }
.mcal-cell.is-today .mcal-num { color: var(--accent); font-weight: 800; }
.mcal-cell.is-sel { background: var(--accent-soft); }
.mcal-cell.is-sel .mcal-num { background: var(--accent); color: #fff; box-shadow: 0 4px 10px rgba(79, 107, 237, .35); }
.mcal-chips { display: flex; flex-direction: column; gap: 3px; }
.mchip {
  display: block; padding: 4px 0; border: 1px solid transparent; border-radius: 6px; font-style: normal; text-align: center;
  font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: .02em; white-space: nowrap; overflow: hidden;
  background: #EEF0F6; background: color-mix(in srgb, var(--c) 20%, #fff); color: color-mix(in srgb, var(--c) 72%, #0E1120);
}
.mchip small { display: block; margin-top: 3px; font-size: 9.5px; font-weight: 650; letter-spacing: 0; opacity: .85; }
.mcal-week .mchip { padding: 6px 0; }
.mchip.is-draft { background: #fff; border: 1px dashed color-mix(in srgb, var(--c) 65%, #fff); }
.mchip.is-open { background: #fff; border: 1px dashed var(--open); color: var(--muted); }
.mchip.is-dim { opacity: .25; }
.mchip-more { font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); z-index: 25;
  width: 58px; height: 58px; border: 0; border-radius: 19px; background: var(--accent); color: #fff;
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 28px rgba(79, 107, 237, .45);
}
.fab .ic { width: 26px; height: 26px; }

/* ---- mine vakter ---------------------------------------------------------- */

.mine { display: grid; gap: 22px; }
@media (min-width: 900px) {
  .mine { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: start; gap: 32px; }
  .mine-side { position: sticky; top: 30px; }
}
.hero {
  --c: var(--accent); position: relative; overflow: hidden; padding: 22px; border-radius: 24px; color: #fff;
  background: var(--c);
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 82%, #11142A) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 72%, #fff) 100%);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--c) 34%, transparent);
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.hero > * { position: relative; z-index: 1; }
.hero-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; opacity: .85; }
.hero-when { margin-top: 12px; font-size: 15px; font-weight: 600; opacity: .95; }
.hero-time { font-size: 38px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; font-variant-numeric: tabular-nums; }
.hero-meta { margin-top: 4px; opacity: .9; }
.hero-note { margin-top: 12px; padding: 9px 11px; border-radius: 11px; background: rgba(255, 255, 255, .18); font-size: 14px; }
.hero-with { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .25); font-size: 13.5px; }
.hw-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.hw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; min-width: 0; }
.hw-row .av { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.hw-row b { font-weight: 700; }
.hw-time { font-variant-numeric: tabular-nums; opacity: .85; }
.hw-tag { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 11.5px; font-weight: 750; white-space: nowrap; }
.hw-tag.is-same { background: rgba(255, 255, 255, .92); color: var(--c, #4F6BED); color: color-mix(in srgb, var(--c, #4F6BED) 80%, #000); }
.tl-with { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12.5px; opacity: .8; }
.tl-with .ic { width: 14px; height: 14px; flex: none; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stat { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.stat span { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.stat strong { display: block; font-size: 24px; letter-spacing: -.03em; line-height: 1.2; }
.stat small { color: var(--muted); }
.weeklabel { margin: 22px 4px 10px; font-size: 12.5px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; }
.mine-main > .weeklabel:first-child { margin-top: 0; }
.tl-row { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; margin-bottom: 10px; }
.tl-date { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tl-num { font-size: 24px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.tl-dow { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: capitalize; margin-top: 2px; }
.tl-date.is-today .tl-num, .tl-date.is-today .tl-dow { color: var(--accent); }
.tl-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; }
.tl-time { font-size: 17px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---- ansatte og posisjoner ------------------------------------------------ */

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pcard {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .08s, border-color .15s;
}
.pcard:hover { box-shadow: var(--shadow); border-color: #DCE0EA; transform: translateY(-1px); }
.pcard.inactive { opacity: .55; }
.pcard-name { font-weight: 750; }
.pcard-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.pcard-go { color: var(--faint); }
.pos-ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 16%, #fff); color: color-mix(in srgb, var(--c) 80%, #0B0D17); }
.pos-ico .ic { width: 22px; height: 22px; }

/* ---- meg ------------------------------------------------------------------ */

.meg { display: grid; gap: 14px; }
@media (min-width: 900px) { .meg { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; max-width: 1000px; } }
.profile { display: flex; align-items: center; gap: 16px; }
.profile-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

/* ---- innlogging ----------------------------------------------------------- */

/* Innlogging og passordsider: myk fargeovergang i bakgrunnen og et lyst,
   litt gjennomsiktig kort. Logoen står bare øverst til venstre. */
html:has(body:not(.authed)) { background: #EEF0FF; }
body:not(.authed) {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(900px 560px at -10% -5%, rgba(79, 107, 237, .32), transparent 62%),
    radial-gradient(760px 520px at 110% 12%, rgba(139, 92, 246, .26), transparent 60%),
    radial-gradient(720px 480px at 50% 108%, rgba(255, 209, 102, .30), transparent 64%),
    linear-gradient(170deg, #EEF1FF 0%, #F5F1FF 55%, #FFF8EC 100%);
}
body:not(.authed) .mobilebar { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.auth-brand { display: none; }
.login { max-width: 400px; margin: 7vh auto 0; }

/* PC: merkevarepanel til venstre, skjemaet midt i høyre side */
@media (min-width: 900px) {
  body:not(.authed) main { padding: 0; max-width: none; }
  .auth { display: grid; grid-template-columns: minmax(380px, 42%) 1fr; min-height: 100vh; min-height: 100dvh; }
  .auth-main { display: flex; align-items: center; justify-content: center; padding: 40px; }
  .auth-main .login { width: 100%; margin: 0; }
  .auth-brand {
    position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 34px 48px 30px; color: #fff;
    background: radial-gradient(700px 520px at 85% 110%, rgba(255, 209, 102, .22), transparent 60%),
      linear-gradient(155deg, #3E52D6 0%, #5B5CF0 45%, #7C4DE8 100%);
  }
  .auth-logo { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
  .auth-logo .logo-mark { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
  .auth-logo .wordmark { font-size: 22px; color: #fff; }
  .auth-pitch { position: relative; z-index: 1; margin: auto 0; max-width: 440px; }
  .auth-pitch h2 { margin: 0 0 22px; font-size: 40px; line-height: 1.12; letter-spacing: -.035em; font-weight: 800; }
  .auth-pitch ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
  .auth-pitch li { position: relative; padding-left: 22px; font-size: 15.5px; line-height: 1.45; color: rgba(255, 255, 255, .88); }
  .auth-pitch li::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: #FFD166; box-shadow: 0 0 0 4px rgba(255, 209, 102, .22); }
  .auth-foot { position: relative; z-index: 1; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
  /* Logoens to piller og gule prikk, stort og svakt nederst til høyre */
  .auth-art { position: absolute; right: -10px; bottom: -40px; width: 460px; height: 340px; opacity: .16; pointer-events: none; }
  .auth-art .pill { position: absolute; height: 92px; border-radius: 46px; background: #fff; }
  .auth-art .pill-1 { left: 0; top: 40px; width: 300px; }
  .auth-art .pill-2 { left: 90px; top: 172px; width: 300px; opacity: .65; }
  .auth-art .dot { position: absolute; left: 330px; top: 52px; width: 68px; height: 68px; border-radius: 50%; background: #FFD166; }
  body:not(.authed) .mobilebar { display: none; }
}

.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.label-row .label { margin: 0; }
.label-link { font-size: 13px; font-weight: 650; color: var(--accent-ink); text-decoration: none; }
.label-link:hover { text-decoration: underline; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--faint); cursor: pointer; }
.pw-eye:hover { color: var(--muted); background: var(--surface-2); }
.pw-eye .ic { width: 19px; height: 19px; }
.login .card {
  padding: 30px 28px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .75);
  background: rgba(255, 255, 255, .84); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 26px 60px rgba(79, 70, 229, .16), 0 2px 6px rgba(28, 32, 51, .05);
}
.login h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.035em; }
.login .lead { margin: 0 0 22px; color: var(--muted); }
.login-link { display: block; margin-top: 16px; text-align: center; font-size: 14px; font-weight: 650; color: var(--accent-ink); text-decoration: none; }
.login-link:hover { text-decoration: underline; }
.login .push-state { margin-bottom: 4px; }
.invite-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.invite-box > .ic { width: 19px; height: 19px; color: var(--accent); }
.invite-box .grow { min-width: 200px; }
.linkbox input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ---- dialoger ------------------------------------------------------------- */

dialog {
  border: 0; padding: 24px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  border-radius: 24px; color: var(--text); background: #fff; box-shadow: var(--shadow-lg);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
}
dialog[open] { animation: pop .18s ease-out; }
dialog::backdrop { background: rgba(17, 21, 43, .4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#confirm { width: min(440px, calc(100vw - 32px)); }
#confirm p { margin: 0; font-size: 16px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; outline: none; }
.sheet-head h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.actions .left { margin-right: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 899px) {
  dialog, #confirm {
    width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92vh; max-height: 92dvh; overflow: auto;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0;
  }
  dialog::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: #D9DCE6; }
  dialog[open] { animation: up .26s cubic-bezier(.2, .8, .2, 1); }
  .picker-list { position: static; margin-top: 6px; max-height: 260px; box-shadow: var(--shadow); animation: none; }
  .timepop { position: static; min-width: 0; margin-top: 6px; box-shadow: var(--shadow); animation: none; }
  .datepop { position: static; width: auto; margin-top: 6px; box-shadow: var(--shadow); animation: none; }
  /* To datofelt ved siden av hverandre: kalenderen bruker hele bredden under begge. */
  .row2 > .field:first-child .datepop { width: calc(200% + 12px); }
  .row2 > .field:last-child .datepop { width: calc(200% + 12px); margin-left: calc(-100% - 12px); }
  .dp-day { height: 40px; }
  .tp-list { max-height: 184px; }
  .tp-list button { height: 40px; }
  .actions .btn { flex: 1; }
  .actions .left { flex: 0 0 auto; }
}

/* ---- utilgjengelighet ----------------------------------------------------- */

.banner-danger { background: #FDEFEF; border-color: #F6CFD1; color: #9B2C2F; }
.banner .ic { flex: none; }
.shift.has-conflict { box-shadow: inset 0 0 0 1.5px var(--danger); }
.conflict-ic { display: inline-flex; color: var(--danger); }
.conflict-ic .ic { width: 14px !important; height: 14px !important; margin-left: 4px; opacity: 1 !important; }
.shift-slot .shift-head .conflict-ic { margin-left: auto; }
.shift-slot .shift-head .conflict-ic + .ic { margin-left: 4px; }
.shift-warn { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--danger); }
.shift-warn .ic { width: 15px; height: 15px; }
.warn-line { display: flex; align-items: center; gap: 8px; margin: -6px 0 16px; padding: 9px 12px; border-radius: 11px; background: #FDEFEF; color: #9B2C2F; font-size: 13.5px; font-weight: 600; }
.warn-line .ic { width: 17px; height: 17px; flex: none; }

/* Brikker i dagshodet: hvem som ikke kan den dagen */
.wg-unav { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 5px; max-width: 100%; }
.uchip {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border: 1px dashed #C9CDD9; border-radius: 6px;
  background: repeating-linear-gradient(135deg, #F4F5F8 0 4px, #fff 4px 8px); color: var(--muted);
  font-size: 10px; font-weight: 800; letter-spacing: .02em; cursor: default; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--c) 70%, #000);
}
button.uchip { cursor: pointer; font-family: inherit; }
button.uchip:hover { border-color: var(--muted); }
.uchip small { font-size: 9.5px; font-weight: 650; text-decoration: none; }
.uchip.is-dim { opacity: .3; }
.uchip-more { font-size: 10px; font-weight: 700; color: var(--muted); align-self: center; }
.tg-unav {
  position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(148, 163, 184, .16) 0 6px, transparent 6px 12px);
  border-top: 1px dashed #B8BFCC; border-bottom: 1px dashed #B8BFCC;
}
.tg-unav span { display: block; padding: 4px 6px; font-size: 10.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* Kort i måned og per ansatt */
.ucard-mini {
  display: block; width: 100%; padding: 5px 8px; text-align: left; border: 1px dashed #C9CDD9; border-radius: 9px;
  background: repeating-linear-gradient(135deg, #F5F6F9 0 5px, #fff 5px 10px); color: var(--muted); font: inherit; font-size: 11.5px; line-height: 1.3;
}
button.ucard-mini { cursor: pointer; }
button.ucard-mini:hover { border-color: var(--muted); }
.ucard-mini span { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard-mini b { display: block; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard-mini i { display: block; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard-mini.is-dim { opacity: .25; }

button
/* Siden for tilgjengelighet */
.filter-picker { width: 240px; }
.filter-picker .picker-btn { height: 42px; }
@media (max-width: 899px) { .filter-picker { width: auto; flex: 1; } }
.ulist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ugroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px 16px; align-items: start; }
.ulist-one { grid-template-columns: 1fr; }
.ugroup-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; font-weight: 750; }
.ugroup-head small { color: var(--muted); font-weight: 550; font-size: 13px; }
.ucard {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); font: inherit; color: var(--text);
  transition: box-shadow .15s, border-color .15s, transform .08s;
}
.ucard:hover { box-shadow: var(--shadow); border-color: #DCE0EA; transform: translateY(-1px); }
.ucard > .ic { color: var(--faint); }
.ucard-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: #F1F2F6; color: var(--muted); }
.ucard-ico.rep { background: var(--accent-soft); color: var(--accent-ink); }
.ucard-title { display: block; font-weight: 750; }
.ucard-sub { display: block; font-size: 13.5px; color: var(--muted); }
.ucard-next { display: block; margin-top: 3px; font-size: 12px; font-weight: 650; color: var(--faint); }
.empty-big { max-width: 460px; margin: 40px auto; padding: 32px 24px; text-align: center; background: #fff; border: 1px dashed #D3D7E4; border-radius: 22px; }
.empty-big > .ic { width: 40px; height: 40px; color: var(--faint); margin: 0 auto 10px; }
.empty-big h3 { margin: 0 0 6px; font-size: 18px; }
.empty-big p { margin: 0 0 18px; color: var(--muted); }

/* Dialogen */
.seg-full { display: flex; width: 100%; }
.seg-full button { flex: 1; }
.repeat-box { margin: -6px 0 16px; padding: 14px 14px 2px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.summary { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 0; padding: 10px 12px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; font-weight: 600; }
.summary:empty { display: none; }
.summary .ic { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.only-sm { display: none; }
@media (max-width: 899px) { .only-sm { display: inline-flex; } }

/* Unntak i gjentakelser */
.skipbox { display: flex; align-items: center; gap: 12px; margin: -4px 0 18px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; }
.skipbox > .ic { flex: none; }
.skipbox .btn { flex: none; height: 38px; }
@media (max-width: 899px) { .skipbox { flex-wrap: wrap; } .skipbox .btn { width: 100%; } }
.day-chip { height: 34px; padding: 0 12px; font-size: 13px; text-transform: capitalize; }
.day-chip.skip { background: #fff; border-style: dashed; color: var(--faint); text-decoration: line-through; }
.hint-inline { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* Ledige vakter */
.claim-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; vertical-align: 1px; }
.shift .tag.tag-open { background: var(--accent-soft); color: var(--accent-ink); }
.shift.claimable { cursor: pointer; }
.shift.claimable:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 107, 237, .15); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 650; font-size: 13.5px; cursor: pointer; }
.link-btn .ic { width: 16px; height: 16px; }
.link-btn:hover { text-decoration: underline; }
.claims { margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.claims-head { margin: 0 2px 8px; font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.claim-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.claim-row b { display: block; }
.claim-row small { display: block; color: var(--muted); font-size: 12px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.open-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.open-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px dashed rgba(79, 107, 237, .45); border-radius: 18px; background: #FBFCFF; }
.open-card .tl-date { width: 40px; flex: none; }
.open-card.is-off { border-color: var(--line); background: #fff; }
.open-card.is-off .tl-time { color: var(--muted); }
.open-mode { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.open-card.is-off .open-mode { color: var(--muted); }
.open-mode .ic { width: 14px; height: 14px; flex: none; }
@media (max-width: 899px) { .open-card { flex-wrap: wrap; } .open-card .btn { width: 100%; } }
@media (max-width: 899px) { .actions { flex-wrap: wrap; } }
.ncard-ico.ico-open_shift, .ncard-ico.ico-claim, .ncard-ico.ico-taken, .ncard-ico.ico-claim_accepted { background: var(--accent-soft); color: var(--accent-ink); }
.ncard-ico.ico-claim_declined { background: #F1F2F6; color: var(--muted); }

/* Varsler */
.nlist { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.ncard {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s;
}
.ncard:hover { box-shadow: var(--shadow); border-color: #DCE0EA; }
.ncard > .ic { color: var(--faint); }
.ncard.unread { border-color: rgba(79, 107, 237, .4); background: #FBFCFF; }
.ncard-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #FDEFEF; color: var(--danger); }
.ncard-title { display: block; font-weight: 750; }
.ncard.unread .ncard-title::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.ncard-body { display: block; font-size: 14px; color: var(--muted); }
.ncard-time { display: block; margin-top: 3px; font-size: 12px; font-weight: 650; color: var(--faint); }

/* ---- godkjenninger, bytter og historikk ----------------------------------- */

.sidenav a, .tabbar a { position: relative; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
.tabbar .nav-badge { position: absolute; top: 7px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; line-height: 18px; box-shadow: 0 0 0 2px #fff; }
.badge.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.uchip.is-pending, .ucard-mini.is-pending { border-color: #E9B44C; background: repeating-linear-gradient(135deg, #FFF6E3 0 4px, #fff 4px 8px); color: #8A5A00; }
.alist { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; margin-bottom: 8px; }
.acard { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.acard-head { display: flex; align-items: center; gap: 10px; }
.acard-head small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.acard-head .stack .av { box-shadow: 0 0 0 2px #fff; }
.acard-title { font-weight: 700; }
.acard-crash, .ucard-warn { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: #9B2C2F; }
.acard-crash .ic, .ucard-warn .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.ucard-warn { font-size: 12.5px; }
.acard-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 6px; }
@media (max-width: 899px) { .alist { grid-template-columns: 1fr; } .acard-actions .btn { flex: 1; } }
.crash { display: flex; gap: 10px; margin: 10px 0 0; padding: 11px 13px; border-radius: 12px; background: #FDEFEF; color: #9B2C2F; font-size: 13.5px; line-height: 1.45; }
.crash .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; font: inherit; color: var(--text); cursor: pointer; text-decoration: none; }
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice > .ic:first-child { width: 22px; height: 22px; color: var(--accent-ink); }
.choice > .ic:last-child { color: var(--faint); }
.choice b { display: block; }
.choice small { display: block; color: var(--muted); font-size: 13px; }
.trade-card { align-items: flex-start; }
.trade-card .ucard-ico { width: 38px; height: 38px; }
.trade-line { font-size: 14px; color: var(--muted); margin-top: 2px; }
.trade-btns { display: flex; gap: 6px; flex: none; }
@media (max-width: 899px) { .trade-btns { width: 100%; } .trade-btns .btn { flex: 1; } }
.trade-status { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 9px; border-radius: 8px; background: #FFF4DE; color: #8A5300; font-size: 13px; font-weight: 700; }

/* Varsler i iPhone-appen (under «Meg») */
.push-state { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.push-state .ic { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.push-state.on { background: #E6F7EF; color: #0F5C3D; }
.push-state.on .ic { color: #11734B; }
.push-state.off { background: #FFF4DE; color: #6B4100; }
.push-state.off .ic { color: #D27C00; }

/* Pågående bytte: banner øverst på alle sider */
.tradebar { padding: 0 16px 8px; background: rgba(244, 245, 250, .86); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
.tradebar[hidden] { display: none; }
.tradebar-in {
  display: flex; align-items: flex-start; gap: 12px; max-width: 1600px; margin: 0 auto; padding: 12px 14px;
  border: 1.5px solid #F2B35B; border-radius: 14px; background: #FFF4DE; color: #6B4100; text-decoration: none;
  box-shadow: 0 6px 18px rgba(214, 140, 30, .18);
}
.tradebar-in > .ic { width: 22px; height: 22px; color: #D27C00; margin-top: 1px; }
.tradebar-in > .ic:last-child { width: 18px; height: 18px; color: #B87A2A; align-self: center; }
.tradebar-row { font-size: 14px; line-height: 1.4; }
.tradebar-row + .tradebar-row { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(210, 124, 0, .2); }
.tradebar-row b { color: #8A3B00; }
.tradebar-foot { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: #9A6420; }
@media (min-width: 900px) {
  .tradebar { padding: 18px 36px 0; background: var(--bg); }
  body.has-tradebar main { padding-top: 18px; }
}
@media (min-width: 900px) and (max-width: 1199px) { .tradebar { padding: 14px 20px 0; } }
.trade-warn { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 4px; padding: 11px 13px; border-radius: 12px; background: #FFF4DE; border: 1px solid #F2C77F; color: #6B4100; font-size: 13.5px; line-height: 1.45; }
.trade-warn .ic { width: 19px; height: 19px; color: #D27C00; flex: none; margin-top: 1px; }
.trade-warn b { color: #8A3B00; }
.trade-status .ic { width: 15px; height: 15px; }
button.tl-card.is-action { width: 100%; text-align: left; font: inherit; cursor: pointer; }
button.tl-card.is-action:hover { box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 25%, transparent); }
.history { margin: 0 0 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.history summary { display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-weight: 650; cursor: pointer; list-style: none; }
.history summary::-webkit-details-marker { display: none; }
.history summary .ic { width: 17px; height: 17px; color: var(--muted); }
.history summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); transition: transform .15s; }
.history[open] summary::after { transform: rotate(-135deg); }
.hist-list { padding: 4px 14px 12px; max-height: 300px; overflow: auto; }
.hist-row { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.hist-row + .hist-row::before { content: ""; position: absolute; left: 4px; top: -8px; height: 16px; border-left: 2px solid var(--line); }
.hist-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 5px; box-shadow: 0 0 0 3px var(--accent-soft); }
.hist-title { font-weight: 650; font-size: 14px; }
.hist-line { font-size: 13px; color: var(--text); }
.hist-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.only-sm-block { display: none; }
@media (max-width: 899px) { .only-sm-block { display: block; } }

/* ---- ønsker --------------------------------------------------------------- */

/* Lagrestatus på Ønsker: alltid synlig nederst (over fanelinjen på mobil). */
.save-pill {
  position: fixed; z-index: 40; left: 50%; bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 9px 16px; border-radius: 999px; white-space: nowrap;
  font-size: 13.5px; font-weight: 700; box-shadow: 0 10px 28px rgba(28, 32, 51, .18); transition: background .2s, color .2s;
  background: rgba(255, 255, 255, .96); color: var(--muted); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.save-pill .ic { width: 16px; height: 16px; flex: none; }
.save-pill small { font-weight: 600; opacity: .75; }
.save-pill.is-saving { background: #1F2337; color: #fff; border-color: transparent; }
.save-pill.is-saved { background: #11734B; color: #fff; border-color: transparent; animation: pill-pop .3s ease-out; }
.save-pill.is-all { color: #11734B; border-color: #CBEBDD; }
.save-pill.is-error { background: var(--danger); color: #fff; border-color: transparent; }
.save-pill button { margin-left: 4px; padding: 4px 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .22); color: #fff; font: 700 12.5px var(--font); cursor: pointer; }
.spin { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pill-pop { 0% { transform: translateX(-50%) scale(.92); } 60% { transform: translateX(-50%) scale(1.05); } 100% { transform: translateX(-50%) scale(1); } }
@media (min-width: 900px) { .save-pill { bottom: 24px; left: calc(var(--side-w) + (100% - var(--side-w)) / 2); } }
.wish-grid { margin-bottom: 64px; }
.wish-grid .card { position: relative; }
.wish-grid .card.just-saved::after {
  content: "✓ Lagret"; position: absolute; top: 14px; right: 16px; padding: 3px 9px; border-radius: 999px;
  background: #DDF5EA; color: #11734B; font-size: 12px; font-weight: 800; animation: saved-tag 1.8s ease-out forwards;
}
@keyframes saved-tag { 0% { opacity: 0; transform: translateY(-3px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.wish-summary { margin-bottom: 14px; background: linear-gradient(135deg, #F3F5FF, #F7F2FF); border-color: rgba(79, 107, 237, .2); }
.wish-sum-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--accent-ink); }
.wish-sum-head .ic { width: 18px; height: 18px; }
.wchips { display: flex; flex-wrap: wrap; gap: 6px; }
.wchip { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.wish-note { margin: 10px 0 0; font-size: 14px; font-style: italic; color: var(--muted); }
.wish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 899px) { .wish-grid { grid-template-columns: 1fr; } }
.wish-grid .card h3 { margin-bottom: 14px; }
.wish-grid textarea { min-height: 96px; }

.slider { margin: 0 0 20px; }
.slider-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; min-height: 28px; }
.slider-top output { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--accent-ink); }
.slider.unset .slider-top output { font-size: 14.5px; font-weight: 600; color: var(--faint); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; cursor: pointer; --p: 50%; }
input[type=range]:focus { box-shadow: none; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p), #E3E6F0 var(--p)); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p), #E3E6F0 var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 10px rgba(79, 107, 237, .35); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 10px rgba(79, 107, 237, .35); }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(79, 107, 237, .2); }
.slider.unset input[type=range]::-webkit-slider-runnable-track { background: #E3E6F0; }
.slider.unset input[type=range]::-moz-range-track { background: #E3E6F0; }
.slider.unset input[type=range]::-webkit-slider-thumb { border-color: #B8BFCF; box-shadow: none; }
/* Merkene står rett under der tommelen havner: 14px inn fra hver kant. */
.ticks { position: relative; height: 18px; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.ticks span { position: absolute; top: 0; left: calc(14px + (100% - 28px) * var(--t)); transform: translateX(-50%); white-space: nowrap; }
.ticks span:first-child { left: 0; transform: none; }
.ticks span:last-child { left: auto; right: 0; transform: none; }

.lvl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.lvl-row:first-of-type { border-top: 0; }
.lvl-row b { font-weight: 650; }
.lvl-row small { margin-left: 6px; color: var(--muted); font-size: 12.5px; }
.lvl { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 10px; background: #EEF0F5; }
.lvl button { height: 32px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; font-weight: 650; font-size: 13px; color: var(--muted); cursor: pointer; }
.lvl button.on[data-v="yes"] { background: #DDF5EA; color: #11734B; }
.lvl button.on[data-v="ok"] { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.lvl button.on[data-v="no"] { background: #FDE7E7; color: #A3282C; }
.pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pick button { min-height: 46px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-weight: 650; font-size: 13px; cursor: pointer; line-height: 1.2; }
.pick button small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.pick button.on { border-color: rgba(79, 107, 237, .5); background: var(--accent-soft); color: var(--accent-ink); }
.pick button:hover { border-color: #D4D8E5; }
@media (max-width: 419px) { .pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.wish-cards { align-items: start; }
.wish-card { display: flex; flex-direction: column; gap: 12px; }
.acard-head b { display: block; }
.wdays { display: flex; gap: 4px; }
.wdays span { flex: 1; height: 26px; display: grid; place-items: center; border-radius: 7px; background: #F1F2F6; color: var(--muted); font-size: 11.5px; font-weight: 750; }
.wdays span.yes { background: #DDF5EA; color: #11734B; }
.wdays span.no { background: #FDE7E7; color: #A3282C; }

/* ---- rapporter ------------------------------------------------------------ */

.rp-bar { margin: -4px 0 16px; }
.rp-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-custom { max-width: 520px; margin-top: 12px; }
.rp-custom .field { margin-bottom: 0; }
.rp-range { margin: 10px 2px 0; font-size: 13px; font-weight: 650; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); min-width: 0; }
.kpi-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kpi-top .ic { width: 16px; height: 16px; color: var(--accent); }
.kpi-val { margin-top: 6px; white-space: nowrap; font-size: clamp(19px, 1.75vw, 26px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.rp-wide { grid-column: 1 / -1; }
@media (max-width: 899px) { .rp-grid { grid-template-columns: 1fr; } .kpis { grid-template-columns: 1fr 1fr; } .kpi-val { font-size: 22px; } }
.rp-grid .card h3 { margin-bottom: 14px; }

.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 96px; align-items: center; gap: 12px; }
.hbar-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 650; font-size: 14px; }
.hbar-name > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { display: flex; height: 14px; border-radius: 7px; background: #F1F2F7; overflow: hidden; }
.hbar-track i { display: block; height: 100%; }
.hbar-track .done { background: var(--c); }
.hbar-track .plan { background: color-mix(in srgb, var(--c) 35%, #fff); }
.hbar-val { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hbar-val b { font-size: 14px; }
.hbar-val small, .prow-val small, .prow small { font-size: 12px; color: var(--muted); }
@media (max-width: 599px) { .hbar { grid-template-columns: 84px minmax(0, 1fr) 76px; gap: 8px; } }
.legend-line { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.lg { display: inline-block; width: 12px; height: 8px; border-radius: 3px; background: var(--accent); margin-left: 8px; }
.lg:first-child { margin-left: 0; }
.lg-plan { background: color-mix(in srgb, var(--accent) 35%, #fff); }

.rp-table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-table th { padding: 8px 7px; text-align: right; font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.rp-table td { padding: 9px 7px; text-align: right; border-bottom: 1px solid var(--line-2); }
.rp-table th:first-child, .rp-table td:first-child { text-align: left; }
.rp-table tbody tr:hover td { background: var(--surface-2); }
.rp-table tfoot td { font-weight: 750; border-bottom: 0; border-top: 2px solid var(--line); }
.rp-who { display: flex; align-items: center; gap: 8px; font-weight: 650; }

.vbars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 8px; height: 170px; }
.vbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.vbar i { display: block; width: 100%; max-width: 42px; min-height: 2px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #6F86F5, var(--accent)); }
.vbar-val { margin-bottom: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.vbar-lbl { margin-top: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: capitalize; }

.plist { display: flex; flex-direction: column; }
.prow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.prow:first-child { border-top: 0; padding-top: 0; }
.prow .grow { display: flex; flex-direction: column; min-width: 0; }
.prow-val { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.prow .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

/* ---- filter --------------------------------------------------------------- */

.fbtn { position: relative; flex: none; }
.fbtn.on { background: var(--accent-soft); }
.fcount { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; }
.fpanel {
  position: fixed; z-index: 250; width: 340px; max-height: calc(100vh - 120px); overflow-y: auto; padding: 14px 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); animation: drop .14s ease-out;
}
@media (max-width: 899px) {
  .fpanel { left: 0; right: 0; bottom: 0; width: auto; max-height: 80vh; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: up .22s cubic-bezier(.2, .8, .2, 1); }
}
.fpanel-head { display: flex; align-items: center; justify-content: space-between; min-height: 30px; margin: 0 2px 10px; font-size: 16px; }
.fpanel-head .link-btn { margin: 0; }
.switch.compact { padding: 9px 12px; margin-bottom: 8px; }
.switch.compact span { font-size: 14px; }
.fsec { margin: 14px 2px 8px; font-size: 12px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchips.is-off { opacity: .45; }
.fchip {
  --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 4px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 650; font-size: 13px; cursor: pointer;
}
.fchip-pos { padding-left: 8px; }
.fchip-pos .dot { margin: 0 2px; width: 10px; height: 10px; }
.fchip:hover { border-color: #D4D8E5; }
.fchip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
.fnote { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.banner-info { background: var(--accent-soft); border-color: rgba(79, 107, 237, .25); color: var(--accent-ink); }

/* ---- høyreklikkmeny ------------------------------------------------------- */

.ctx {
  position: fixed; z-index: 300; min-width: 240px; max-width: 320px; max-height: min(520px, calc(100vh - 16px)); overflow-y: auto; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); animation: drop .12s ease-out;
}
.ctx-user { min-width: 260px; padding: 6px; }
.ctx-profile { display: flex; align-items: center; gap: 11px; padding: 8px 10px 10px; }
.ctx-profile .grow { min-width: 0; }
.ctx-profile b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-profile small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.ctx-user .ctx-item { padding-top: 9px; padding-bottom: 9px; font-size: 14.5px; }
.ctx-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
.ctx-head { padding: 6px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); font-size: 12px; font-weight: 750; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 9px;
  background: transparent; font: inherit; font-size: 14px; color: var(--text); text-align: left; cursor: pointer;
}
.ctx-item .ic { width: 17px; height: 17px; color: var(--muted); }
.ctx-item > .ic:last-child { width: 15px; height: 15px; color: var(--faint); }
.ctx-item .av { width: 22px; height: 22px; font-size: 9.5px; }
.ctx-item small { display: block; font-size: 12px; color: var(--muted); }
.ctx-item:hover, .ctx-item:focus-visible { background: var(--accent-soft); outline: none; }
.ctx-item:hover > .ic:first-child, .ctx-item:focus-visible > .ic:first-child { color: var(--accent-ink); }
.ctx-item.danger, .ctx-item.danger .ic { color: var(--danger); }
.ctx-item.danger:hover, .ctx-item.danger:focus-visible { background: var(--danger-soft); }
.ctx-item:disabled { opacity: .45; cursor: default; background: transparent; }
.ctx-back { font-weight: 650; }
.ctx-sep { height: 1px; margin: 4px 6px; background: var(--line-2); }

/* ---- dra og slipp --------------------------------------------------------- */

.tg-col.can-add .shift-slot, .can-drag .shift { cursor: grab; }
body.dragging, body.dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
body.dragging.drag-copy, body.dragging.drag-copy * { cursor: copy !important; }
body.dragging .shift { transition: none; }
.shift.is-dragsrc { opacity: .35; }
body.drag-copy .shift.is-dragsrc { opacity: 1; }
.drag-preview {
  z-index: 6; pointer-events: none; left: 3px; width: calc(100% - 6px);
  background: color-mix(in srgb, var(--c) 28%, #fff); border: 1.5px solid var(--c); border-left-width: 3px;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--c) 35%, transparent);
}
/* Håndtak for å endre lengden, øverst og nederst i vakta */
.rz { position: absolute; left: 0; right: 0; height: 9px; z-index: 3; cursor: ns-resize; }
/* Trykk og hold på berøringsskjerm: vakta krymper litt mens man holder, og løftes når den kan dras. */
.shift-slot { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.shift-slot.is-pressing { transition: transform .45s ease-out; transform: scale(.97); }
.shift-slot.is-lifted { transform: scale(1.03); z-index: 7; box-shadow: 0 14px 30px color-mix(in srgb, var(--c) 40%, transparent); transition: transform .12s ease-out; }
.rz-top { top: 0; }
.rz-bot { bottom: 0; }
.rz::after {
  content: ""; position: absolute; left: 50%; width: 22px; height: 4px; margin-left: -11px; border-radius: 2px;
  background: color-mix(in srgb, var(--c) 70%, #fff); opacity: 0; transition: opacity .12s;
}
.rz-top::after { top: 2px; }
.rz-bot::after { bottom: 2px; }
.shift-slot:hover .rz::after { opacity: 1; }
.shift-slot.size-s .rz { height: 6px; }
.shift-slot.size-s .rz::after { display: none; }
body.resizing, body.resizing * { cursor: ns-resize !important; }
@media (hover: none) {
  .rz { height: 16px; }
  .rz::after { opacity: .9; }
  .rz-top { top: -2px; }
  .rz-bot { bottom: -2px; }
}
.drag-tag { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; vertical-align: 1px; }
.drag-float { position: fixed; z-index: 200; margin: 0; pointer-events: none; transform: rotate(-1.5deg); box-shadow: var(--shadow-lg); opacity: .96; }
.drag-float.is-copy::after { content: "Kopi"; position: absolute; top: -9px; right: -9px; padding: 2px 7px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.drop-on { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent); }
.grid-hint { display: flex; align-items: center; gap: 8px; margin: 12px 4px 0; font-size: 13px; color: var(--muted); }
.grid-hint .ic { width: 16px; height: 16px; color: var(--faint); }
kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: #fff; font: 600 12px var(--font); color: var(--text); }

/* ---- toast ---------------------------------------------------------------- */

#toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translateX(-50%) translateY(16px); max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 14px; background: #1C2033; color: #fff; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#toast { display: flex; align-items: center; gap: 14px; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.has-action { pointer-events: auto; padding-right: 8px; }
.toast-btn { height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 750; cursor: pointer; }
.toast-btn:hover { background: rgba(255, 255, 255, .24); }
#toast.err { background: var(--danger); }
@media (min-width: 900px) { #toast { bottom: 28px; } }

/* ---- automatisk fordeling ---------------------------------------------- */
.ap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ap .card h3 { display: flex; align-items: center; gap: 10px; }
.ap-step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 800; }
.ap-lead { margin: -6px 0 14px !important; font-size: 13.5px; }
.ap-period { max-width: 520px; margin-bottom: 4px; }
.ap .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-week, .ap-days { display: grid; gap: 6px; }
.ap-wd, .ap-day { display: grid; grid-template-columns: 150px auto 1fr auto; align-items: center; gap: 10px 14px; padding: 7px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; }
.ap-wd { grid-template-columns: 150px auto 1fr; }
.ap-day.is-edited { border-color: rgba(79, 107, 237, .35); background: var(--accent-soft); }
.ap-open { display: flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ap-open input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.ap-open b { font-weight: 700; }
.ap-open span { font-weight: 500; }
.ap-times { display: flex; align-items: center; gap: 6px; }
.ap-times .time-wrap { width: 108px; }
.ap-times input { height: 38px; font-size: 14.5px; }
.ap-dash { color: var(--faint); }
.ap-closed { display: none; color: var(--faint); font-size: 13.5px; }
.ap-wd.is-closed .ap-times, .ap-day.is-closed .ap-times { opacity: .35; pointer-events: none; }
.ap-wd.is-closed .ap-closed { display: block; }
.ap-split { font-size: 13px; color: var(--muted); }
.ap-day.is-closed .ap-split { color: var(--faint); }
.ap-reset { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--accent-ink); cursor: pointer; }
.ap-reset:hover { background: rgba(79, 107, 237, .12); }
.ap-reset svg { width: 16px; height: 16px; }
.ap-settings { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4px 24px; margin-top: 20px; align-items: start; }
.ap-settings .slider { margin-bottom: 6px; }
.ap-settings .hint { margin: 0 0 8px; }
.ap-settings .switch { grid-column: 1 / -1; margin: 6px 0 0; }
.switch small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.ap-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 22px; }
.ap-person { padding: 12px 14px 0; border-radius: 14px; border: 1px solid var(--line); }
.ap-who { display: flex; align-items: center; gap: 10px; }
.ap-who .grow { min-width: 0; }
.ap-who b { display: block; }
.ap-who small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-weight { margin: 4px 0 10px; }
.ap-weight .slider-top { min-height: 22px; margin-bottom: 0; }
.ap-weight .slider-top output { font-size: 14.5px; }
.ap-weight.is-off .slider-top output { color: var(--faint); }
.ap-weight.is-off input[type=range]::-webkit-slider-runnable-track { background: #E3E6F0; }
.ap-go { display: flex; align-items: center; gap: 14px; }
.ap-go .hint { margin: 0; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
#apResult { margin-top: 16px; scroll-margin-top: 80px; }
.ap-result-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ap-result-head h3 { margin-bottom: 4px; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.warn-text { color: var(--warn-ink); }
.ap-fair { display: grid; gap: 8px; }
.ap-frow { display: grid; grid-template-columns: 140px 1fr 170px; align-items: center; gap: 12px; }
.ap-frow.is-off { opacity: .5; }
.ap-fname { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.ap-fname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-ftrack { position: relative; height: 12px; border-radius: 6px; background: var(--surface-2); }
.ap-ftrack i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--c); }
.ap-ftrack b { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text); }
.ap-fval b { font-size: 14.5px; }
.ap-fval small { display: block; font-size: 12px; color: var(--muted); }
.ap-fval small svg { width: 12px; height: 12px; vertical-align: -1px; color: var(--warn-ink); }
.lg-goal { display: inline-block; width: 3px; height: 12px; border-radius: 2px; background: var(--text); margin-left: 10px; }
.ap-plan { display: grid; gap: 4px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.ap-pday { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.ap-pday:last-child { border-bottom: 0; }
.ap-pdate b { display: block; font-size: 14px; }
.ap-pdate span { font-size: 12.5px; color: var(--muted); }
.ap-pslots { display: grid; gap: 6px; }
.ap-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; padding: 7px 10px; border-radius: 10px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }
.ap-slot.is-open { background: var(--warn-soft); border-left-color: #E5A13A; }
.ap-stime { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13.5px; min-width: 92px; }
.ap-why { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.ap-why i { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(28, 32, 51, .06); color: var(--muted); }
.ap-why i.warn { background: var(--warn-soft); color: var(--warn-ink); }
.ap-why i svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 3px; }
@media (max-width: 760px) {
  .ap-wd, .ap-day { grid-template-columns: 1fr auto; }
  .ap-wd .ap-closed { grid-column: 2; grid-row: 1; }
  .ap-wd.is-closed .ap-times { display: none; }
  .ap-day .ap-times { grid-column: 1 / -1; grid-row: 2; }
  .ap-day .ap-split { grid-column: 1 / -1; grid-row: 3; }
  .ap-day .ap-reset { grid-column: 2; grid-row: 1; }
  .ap-day.is-closed .ap-times { display: none; }
  .ap-wd .ap-times { grid-column: 1 / -1; }
  .ap-times .time-wrap { flex: 1; width: auto; }
  .ap-settings { grid-template-columns: 1fr; }
  .ap-people { grid-template-columns: minmax(0, 1fr); }
  .ap-frow { grid-template-columns: 96px 1fr 104px; gap: 8px; }
  .ap-why { margin-left: 0; width: 100%; }
  .ap-go .btn-lg { flex: 1; }
}
.ap-empty { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; border-radius: 12px; background: var(--surface-2); }
.ap-empty svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.ap-empty p { margin: 2px 0 0 !important; color: var(--muted); font-size: 13.5px; }

/* ---- flere vakter på en gang ------------------------------------------- */
#selBtn.on { background: var(--accent-soft); color: var(--accent-ink); border-color: rgba(79, 107, 237, .35); }
.shift.selectable { position: relative; }
.shift.selectable::after {
  content: ''; position: absolute; top: 5px; right: 5px; z-index: 3; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--c) 45%, #fff); background: #fff; box-sizing: border-box;
}
.shift.selectable.is-sel { box-shadow: 0 0 0 2.5px var(--accent), 0 6px 16px rgba(79, 107, 237, .25); }
.shift.selectable.is-sel::after {
  border-color: var(--accent); background: var(--accent) no-repeat center / 12px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E");
}
.shift.selectable .shift-go { visibility: hidden; }
.shift.selectable.is-dim { opacity: 1; }
.shift-slot.selectable .rz { display: none; }
.ag-row.selectable::after { top: 50%; margin-top: -9px; right: 10px; }
.ag-row.selectable.is-sel { box-shadow: none; }
.ag-row.selectable.is-sel .ag-card { box-shadow: 0 0 0 2.5px var(--accent); }
.ag-row.selectable .ag-hrs { margin-right: 26px; }
.shift-month.selectable::after, .shift-grid.selectable::after { width: 15px; height: 15px; top: 4px; right: 4px; background-size: 10px; }

.selbar {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 6px; border-radius: 16px;
  background: #1C2033; color: #fff; box-shadow: 0 16px 40px rgba(17, 20, 38, .35); animation: selbar-in .18s ease-out;
}
@keyframes selbar-in { from { transform: translateY(14px); opacity: 0; } }
.selbar-x { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 11px; background: transparent; color: #C9CDDC; cursor: pointer; }
.selbar-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.selbar-x .ic { width: 18px; height: 18px; }
.selbar-count { min-width: 0; flex: 1; line-height: 1.2; }
.selbar-count b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selbar-count small { display: block; font-size: 12px; color: #A9AEC2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selbar-quick { display: flex; gap: 6px; }
.selbar .chip-btn { height: 34px; white-space: nowrap; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.selbar .chip-btn:hover { background: rgba(255, 255, 255, .16); }
.selbar .chip-btn:disabled { opacity: .4; }
.selbar-acts { display: flex; gap: 6px; }
.selbar .btn { height: 38px; }
.selbar .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .22); color: #fff; }
.selbar .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.selbar .btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.selbar .btn-primary .ic:last-child { width: 15px; height: 15px; margin: 0 -2px 0 2px; }
main:has(.selbar) { padding-bottom: calc(var(--tab-h) + 100px + env(safe-area-inset-bottom)); }
@media (max-width: 899px) {
  .selbar-count small { display: none; }
  .selbar .hide-sm { display: none; }
  .selbar .btn-primary { padding: 0 12px; font-size: 14px; }
}
@media (max-width: 420px) {
  .selbar { gap: 6px; }
  .selbar .btn-primary { font-size: 0; gap: 0; padding: 0 12px; }
  .selbar .btn-primary::before { content: 'Gjør'; font-size: 14px; }
}
@media (min-width: 900px) {
  .selbar { left: calc(var(--side-w) + 24px); right: 24px; bottom: 20px; max-width: 980px; margin: 0 auto; padding: 8px 10px 8px 8px; }
  main:has(.selbar) { padding-bottom: 110px; }
}

/* ---- forespørsler som venter på svar fra meg --------------------------- */
.askbar { padding: 6px 16px 4px; }
.askbar[hidden] { display: none; }
.askbar-in, .ask-inline {
  max-width: 1600px; margin: 0 auto; padding: 12px 14px 6px; border-radius: 18px;
  background: linear-gradient(135deg, #4F6BED 0%, #6A55E0 100%); color: #fff;
  box-shadow: 0 12px 30px rgba(79, 107, 237, .32);
}
.askbar-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; letter-spacing: .01em; color: rgba(255, 255, 255, .85); }
.askbar-head .ic { width: 16px; height: 16px; animation: ask-ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes ask-ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .askbar-head .ic { animation: none; } }
.ask-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.ask-row + .ask-row { border-top: 1px solid rgba(255, 255, 255, .18); }
.ask-row .av { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.ask-title { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; }
.ask-line { font-size: 14px; color: rgba(255, 255, 255, .92); margin-top: 2px; }
.ask-line span { font-weight: 700; }
.ask-note { font-size: 13.5px; font-style: italic; color: rgba(255, 255, 255, .85); margin-top: 3px; }
.ask-btns { display: flex; gap: 8px; flex: none; }
.askbar .btn-ghost, .ask-inline .btn-ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); color: #fff; }
.askbar .btn-ghost:hover, .ask-inline .btn-ghost:hover { background: rgba(255, 255, 255, .2); }
.askbar .btn-primary, .ask-inline .btn-primary { background: #fff; border-color: #fff; color: var(--accent-ink); box-shadow: 0 4px 12px rgba(20, 24, 60, .18); }
.askbar .btn-primary:hover, .ask-inline .btn-primary:hover { background: #F1F3FF; }
.ask-more { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 0 6px; border-top: 1px solid rgba(255, 255, 255, .18); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.ask-more .ic { width: 16px; height: 16px; }
.ask-inline { margin-bottom: 20px; padding-bottom: 12px; }
.ask-inline .open-card { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; margin-top: 8px; box-shadow: none; }
.ask-inline .ucard-ico.rep { background: rgba(255, 255, 255, .18); color: #fff; }
.ask-inline .trade-line, .ask-inline .shift-note { color: rgba(255, 255, 255, .9); }
@media (max-width: 899px) {
  .ask-row { flex-wrap: wrap; align-items: flex-start; }
  .ask-row .grow { flex: 1; min-width: 0; }
  .ask-btns { width: 100%; padding-left: 52px; }
  .ask-btns .btn { flex: 1; }
  .ask-inline .trade-card { flex-wrap: wrap; }
  .ask-inline .trade-btns { width: 100%; }
  .ask-inline .trade-btns .btn { flex: 1; }
}
@media (min-width: 900px) {
  .askbar { padding: 18px 36px 0; }
  body.has-askbar main { padding-top: 18px; }
}
@media (min-width: 900px) and (max-width: 1199px) { .askbar { padding: 14px 20px 0; } }
.ask-inline .open-card { border-style: solid; }
.ask-inline .tl-time { color: #fff; }

/* Navnet på bedriften under «Skifti» */
.wordmark .org-name { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; line-height: 1.15; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.wordmark:has(.org-name) { line-height: 1.05; }

/* ---- banner: support-tilgang og prøveperiode ---- */
.noticebar { padding: 0 16px 8px; }
.noticebar[hidden] { display: none; }
.notice-in { display: flex; align-items: center; gap: 12px; max-width: 1600px; margin: 0 auto; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.4; text-decoration: none; }
.notice-in > .ic { width: 20px; height: 20px; flex: none; }
.notice-in > .ic:last-child:not(:first-child) { width: 18px; height: 18px; }
.notice-support { background: #23284A; color: #fff; box-shadow: 0 6px 18px rgba(20, 24, 60, .25); }
.notice-support .btn { flex: none; background: #fff; border-color: #fff; color: #23284A; }
.notice-trial { border: 1.5px solid #F2B35B; background: #FFF4DE; color: #6B4100; }
.notice-trial b { color: #8A3B00; }

/* ---- registrering: feltet roboter fyller ut ---- */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Skifti-admin ---- */
.adm { display: grid; gap: 14px; max-width: 1100px; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.adm-table tr[data-id] { cursor: pointer; }
.adm-table tr[data-id]:focus-visible td { background: var(--accent-soft); outline: none; }
.adm-name b { display: block; }
.adm-name small { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-weight: 500; }
.adm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.adm-head h3 { margin: 0; }
.adm-month { display: flex; align-items: center; gap: 4px; }
.adm-month b { min-width: 130px; text-align: center; }
.adm-log { display: grid; }
.adm-log-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.adm-log-row:last-child { border-bottom: 0; }
.adm-log-row small { flex: none; text-align: right; color: var(--muted); font-size: 12.5px; }
.adm-log-detail { margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.danger-text { color: var(--danger); }
