:root {
  color-scheme: light dark;
  --cream: light-dark(#f4f2ee, #11161c);
  --paper: light-dark(#ffffff, #1c232c);
  --lift: light-dark(#ffffff, #262e39);
  --ink: light-dark(#1c2430, #f3efe8);
  --muted: light-dark(#5d6774, #b4bbc5);
  --quiet: light-dark(#8a93a0, #8b939f);
  --line: light-dark(#e6e4e0, #343c48);
  --coral: light-dark(#3a5f9a, #6a8fd0);
  --coral-ink: #f4f8fc;
  --teal: light-dark(#2f7a9a, #5cb8d4);
  --lavender: light-dark(#5b6eae, #9aabd8);
  --gold: light-dark(#cfc8bc, #8a8378);
  --ok: var(--teal);
  --bad: light-dark(#d4534a, #f07a72);
  --ok-ink: light-dark(#0f4c47, #b7f0e6);
  --ready: light-dark(#2a9d8f, #4ec9b8);
  --ready-ink: light-dark(#0f4c47, #b7f0e6);
  --bad-ink: light-dark(#8a2a24, #ffc4bf);
  --warn-bg: light-dark(#fff7ed, #3a2a1a);
  --warn-ink: light-dark(#9a3412, #ffd0a8);
  --warn-line: light-dark(#b45309, #d97706);
  --linked-bg: light-dark(#fff3bf, #5c4e18);
  --linked-ink: light-dark(#6b5d1e, #f5e7a3);
  --card-border: light-dark(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.07));
  --shadow: light-dark(0 14px 36px rgba(28, 36, 48, 0.06), 0 18px 44px rgba(0, 0, 0, 0.38));
  --page-spot-1: light-dark(rgba(58, 95, 154, 0.10), rgba(106, 143, 208, 0.18));
  --page-spot-2: light-dark(rgba(47, 122, 154, 0.08), rgba(92, 184, 212, 0.16));
  --page-spot-3: light-dark(rgba(91, 110, 174, 0.08), rgba(154, 171, 216, 0.12));
  --radius: 20px;
  --font: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --theme-color: light-dark(#3a5f9a, #11161c);
  --store-accent: var(--coral);
  --btn-primary-from: #5b82c4;
  --btn-primary-shadow: 0 10px 22px rgba(58, 95, 154, 0.28);
  --masthead-spot-1: light-dark(rgba(58, 95, 154, 0.16), rgba(106, 143, 208, 0.28));
  --masthead-spot-2: light-dark(rgba(47, 122, 154, 0.12), rgba(80, 176, 210, 0.22));
  --masthead-wash: linear-gradient(165deg, light-dark(#f4f7fb, #121820) 0%, light-dark(#e8eef6, #1a2433) 46%, light-dark(#dce8f4, #0f2a3d) 100%);
  --masthead-kicker: light-dark(#1e3a5c, #c5dcff);
}

html[data-store="narvesen-602"] {
  --store-accent: light-dark(#3a5f9a, #6a8fd0);
}

html[data-store="narvesen-347"] {
  --coral: light-dark(#d85d50, #e7786c);
  --coral-ink: #fff8f5;
  --teal: light-dark(#2a9d8f, #4ec9b8);
  --lavender: light-dark(#7b6cb0, #b4a6e0);
  --page-spot-1: light-dark(rgba(216, 93, 80, 0.08), rgba(229, 107, 91, 0.16));
  --page-spot-2: light-dark(rgba(42, 157, 143, 0.07), rgba(62, 201, 184, 0.14));
  --page-spot-3: light-dark(rgba(123, 108, 176, 0.08), rgba(180, 166, 224, 0.12));
  --theme-color: light-dark(#e56b5b, #11161c);
  --store-accent: var(--coral);
  --btn-primary-from: #ef7b6c;
  --btn-primary-shadow: 0 10px 22px rgba(229, 107, 91, 0.25);
  --masthead-spot-1: light-dark(rgba(229, 107, 91, 0.14), rgba(229, 107, 91, 0.28));
  --masthead-spot-2: light-dark(rgba(46, 184, 166, 0.12), rgba(46, 184, 166, 0.22));
  --masthead-wash: linear-gradient(165deg, light-dark(#f6f7f6, #141a22) 0%, light-dark(#eef3f1, #1a2c33) 46%, light-dark(#e7eeeb, #0f3d38) 100%);
  --masthead-kicker: light-dark(#5c221c, #ffd2c8);
}

html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 50% at 8% -10%, var(--page-spot-1), transparent 55%),
    radial-gradient(ellipse 55% 45% at 96% 8%, var(--page-spot-2), transparent 50%),
    var(--cream);
}

a { color: var(--teal); }
.ok { color: var(--ok); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }

.shell {
  width: min(1080px, calc(100% - 1.6rem));
  margin: 0 auto;
  padding: 1.1rem 0 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.store-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  color: var(--store-accent);
}
.store-share {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--store-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.store-share svg {
  width: 0.95rem;
  height: 0.95rem;
}
.store-share:hover {
  background: color-mix(in srgb, var(--store-accent) 12%, var(--paper));
  color: var(--ink);
}
.store-share.is-copied {
  color: var(--ready);
}
.store-switch-field {
  position: relative;
  display: inline-grid;
  align-items: center;
  min-width: 0;
}
.store-switch select,
.store-switch-sizer {
  grid-area: 1 / 1;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.05rem 0.1rem 0.05rem 0.95rem;
  margin: 0;
  white-space: nowrap;
}
.store-switch-sizer {
  visibility: hidden;
  pointer-events: none;
  line-height: 1.2;
}
.store-switch select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  max-width: 16rem;
  color: inherit;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
}
.store-switch-field::before {
  content: "";
  position: absolute;
  left: 0.08rem;
  top: 50%;
  width: 0.34rem;
  height: 0.34rem;
  border-right: 1.55px solid currentColor;
  border-bottom: 1.55px solid currentColor;
  color: inherit;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.store-switch select:hover,
.store-switch select:focus {
  color: var(--ink);
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.16rem;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav-pills a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 520;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
}

.nav-pills a.nav-home {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  padding: 0.42rem 1.1rem;
}

.nav-pills a.is-on {
  background: var(--ink);
  color: var(--paper);
  font-weight: 720;
}

.nav-pills a.nav-home.is-on {
  font-size: 1.42rem;
  padding: 0.72rem 1.55rem;
}

.nav-pills a.is-on:not(.nav-home) {
  font-size: 1.05rem;
  padding: 0.52rem 1.15rem;
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


.ghost {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.theme-toggle {
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--lift);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.theme-toggle svg {
  width: 1.12rem;
  height: 1.12rem;
  grid-area: 1 / 1;
}
html[data-theme="light"] .theme-icon-sun,
html:not([data-theme]) .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
.login-theme {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.hero-single { grid-template-columns: 1fr; justify-items: center; }
.hero-card {
  max-width: 36rem;
  width: 100%;
  text-align: center;
}
.actions-center { justify-content: center; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
}

.kicker {
  margin: 0 0 0.3rem;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }

.stat {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.shell:has(.start-page) {
  width: min(1160px, calc(100% - 1.2rem));
}

body:has(.start-page) {
  background:
    radial-gradient(ellipse 80% 55% at 0% -8%, var(--page-spot-1), transparent 52%),
    radial-gradient(ellipse 70% 50% at 100% 0%, var(--page-spot-2), transparent 48%),
    radial-gradient(ellipse 50% 40% at 70% 90%, var(--page-spot-3), transparent 55%),
    var(--cream);
}

.start-page { padding-bottom: 0.4rem; }

.start-hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1rem;
  margin: 0 0 1.1rem;
  align-items: stretch;
}

.start-masthead {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.2rem 1.2rem 1.15rem;
  border-radius: 28px;
  color: light-dark(#1c2430, #fff8f5);
  isolation: isolate;
  background:
    radial-gradient(ellipse 55% 70% at 100% 0%, var(--masthead-spot-1), transparent 48%),
    radial-gradient(ellipse 45% 55% at 0% 100%, var(--masthead-spot-2), transparent 52%),
    var(--masthead-wash);
  box-shadow: var(--shadow);
  border: 1px solid light-dark(rgba(28, 36, 48, 0.08), rgba(255, 248, 245, 0.1));
}
.start-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: light-dark(0.035, 0.07);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 11px,
      light-dark(rgba(28, 36, 48, 0.45), rgba(255, 248, 245, 0.7)) 11px,
      light-dark(rgba(28, 36, 48, 0.45), rgba(255, 248, 245, 0.7)) 12px
    );
  mask-image: linear-gradient(180deg, transparent 0 28%, #000 40%, #000 52%, transparent 68%);
}

.start-masthead-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid light-dark(rgba(28, 36, 48, 0.1), rgba(255, 248, 245, 0.16));
}
.start-masthead-top .kicker {
  margin: 0;
  color: var(--masthead-kicker);
  font-size: 1rem;
  letter-spacing: 0.05em;
  font-weight: 760;
}
.start-masthead .last-return-value {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  margin: 0;
  color: inherit;
  font-size: clamp(2.15rem, 7.2vw, 3rem);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1;
}
.last-return-day,
.last-return-date {
  display: block;
  font-size: 1em;
  font-weight: 720;
}
.start-masthead .last-return-value.is-unknown {
  font-size: clamp(1.65rem, 6vw, 2.35rem);
}

.start-masthead-sheets {
  position: absolute;
  z-index: 0;
  inset: 0.7rem -0.6rem auto auto;
  width: 6.4rem;
  height: 5.2rem;
  pointer-events: none;
  opacity: 0.88;
}
.start-masthead-sheets span {
  position: absolute;
  inset: 0;
  border-radius: 4px 8px 6px 3px;
  background:
    repeating-linear-gradient(
      180deg,
      #f7f1e6 0 3px,
      #efe6d6 3px 4px
    );
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}
.start-masthead-sheets span:nth-child(1) { transform: rotate(-16deg) translate(0.85rem, -0.15rem); opacity: 0.72; }
.start-masthead-sheets span:nth-child(2) { transform: rotate(-5deg) translate(0.15rem, 0.2rem); opacity: 0.86; }
.start-masthead-sheets span:nth-child(3) {
  transform: rotate(10deg) translate(-0.1rem, 0.45rem);
  background:
    linear-gradient(180deg, rgba(255, 248, 245, 0.2), transparent 40%),
    repeating-linear-gradient(180deg, #fff8f5 0 3px, #f0d2cc 3px 4px);
}

.paper-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}
.paper-chips li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 6.4rem;
  width: 6.4rem;
  height: 2.4rem;
  padding: 0.22rem 0.28rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(28, 36, 48, 0.08);
  box-shadow: 0 4px 10px rgba(28, 36, 48, 0.06);
  overflow: hidden;
}
.paper-chips img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.paper-chips li.is-fill {
  padding: 0.22rem 0.28rem;
  border: 0;
}
.paper-chips li.paper-chip-vg.is-fill {
  background: #ec2027;
}
.paper-chips li.paper-chip-dagbladet.is-fill {
  background: #ed1c24;
}
.paper-chips li.paper-chip-itromso {
  background: #282d37;
  border-color: transparent;
}
.paper-chips li.paper-chip-adresseavisen {
  flex-basis: 7.6rem;
  width: 7.6rem;
  background: #fff;
  border-color: rgba(0, 83, 121, 0.12);
}
.paper-chips li.is-fill img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.paper-chips li span {
  font-size: 0.78rem;
  font-weight: 680;
  color: #1c2430;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.start-panel { margin: 0; }
.start-panel .fetch-block { margin-top: 0; }

.start-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  margin-bottom: 0.9rem;
}
.start-overview-head h2 { margin: 0; }
.start-overview .overview-window { margin-top: 0; max-width: 16rem; }
.start-overview .table-wrap { margin: 0 -0.15rem; overflow-x: auto; }
.start-overview .reg-grid {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 0.18rem 0;
}
.start-overview .reg-grid-head,
.start-overview .reg-grid-row {
  display: grid;
  grid-template-columns: minmax(4.4rem, 5.4rem) repeat(var(--n, 6), minmax(0, 1fr));
  align-items: center;
}
.start-overview .reg-grid-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 0.28rem;
  background: var(--paper);
}
.start-overview .reg-grid-head > :first-child,
.start-overview .reg-grid-row > :first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 0.2rem 0.45rem 0.2rem 0.1rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 620;
  line-height: 1.15;
}
.start-overview .reg-grid-head > :first-child {
  color: var(--muted);
  font-size: 0.75rem;
}
.start-overview .reg-grid-row .day-name,
.start-overview .reg-grid-row .day-num {
  display: block;
}
.start-overview .reg-grid-row .day-name {
  text-transform: lowercase;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}
.start-overview .reg-grid-head > :not(:first-child),
.start-overview .reg-grid-row > :not(:first-child) {
  display: grid;
  place-items: center;
  justify-items: center;
  min-width: 0;
}
.start-overview .reg-col {
  display: grid;
  place-items: center;
  min-width: 0;
}
.start-overview .reg-paper {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 2.55rem;
  height: 1.7rem;
  padding: 0.12rem 0.14rem;
  border-radius: 7px;
  background: #fff;
  border: 1px solid rgba(28, 36, 48, 0.08);
  overflow: hidden;
}
.start-overview .reg-paper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.start-overview .reg-paper span {
  font-size: 0.62rem;
  font-weight: 680;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.start-overview .reg-paper.is-fill { border: 0; }
.start-overview .reg-paper.paper-chip-vg.is-fill { background: #ec2027; }
.start-overview .reg-paper.paper-chip-dagbladet.is-fill { background: #ed1c24; }
.start-overview .reg-paper.paper-chip-itromso {
  background: #282d37;
  border-color: transparent;
}
.start-overview .reg-paper.paper-chip-adresseavisen {
  background: #fff;
  border-color: rgba(0, 83, 121, 0.12);
}
.start-overview .reg-mark {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 7px;
}
.start-overview .is-on .reg-mark {
  color: var(--ok-ink);
  background: color-mix(in srgb, var(--teal) 28%, var(--paper));
}
.start-overview .is-off .reg-mark {
  background: color-mix(in srgb, var(--ink) 7%, var(--paper));
}
.start-overview .is-on .reg-mark::before {
  content: "";
  width: 0.92rem;
  height: 0.92rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' d='M3 8.2 6.6 11.6 13 4.6'/%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 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' d='M3 8.2 6.6 11.6 13 4.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (min-width: 861px) {
  .start-overview .reg-grid-head,
  .start-overview .reg-grid-row {
    grid-template-columns: 5.6rem repeat(var(--n, 6), minmax(0, 1fr));
  }
  .start-overview .reg-paper {
    width: 3rem;
    height: 1.9rem;
  }
  .start-overview .reg-mark {
    width: 1.85rem;
    height: 1.85rem;
  }
  .start-masthead {
    justify-content: flex-end;
    min-height: 24rem;
    padding: 1.5rem 1.5rem 1.55rem;
  }
  .start-masthead-top .kicker {
    font-size: 1.5rem;
    letter-spacing: 0.08em;
  }
  .start-masthead .last-return-value {
    font-size: 3.5rem;
    gap: 0.28rem;
  }
  .start-masthead .last-return-value.is-unknown {
    font-size: 2.75rem;
  }
  .paper-chips {
    margin-top: 1.25rem;
    padding-bottom: 0.1rem;
  }
  .start-masthead-sheets {
    inset: auto -1.2rem 38% auto;
    width: 11rem;
    height: 8.5rem;
  }
  .start-page .fetch-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }
  .start-page .field-week {
    width: auto;
    min-width: 0;
  }
  .start-page .fetch-bar .field {
    min-width: 0;
  }
}

@media (max-width: 860px) {
  .start-hero { grid-template-columns: 1fr; }
  .start-hero > * { min-width: 0; }
  .start-page .fetch-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .start-page .field-week {
    width: auto;
    grid-column: 1 / -1;
  }
  .start-overview-head {
    flex-direction: column;
    align-items: stretch;
  }
  .start-overview .overview-window { max-width: none; }
}

@media (max-width: 720px) {
  .shell,
  .shell:has(.start-page) {
    width: calc(100% - 1rem);
    padding: 0.7rem 0 2.2rem;
  }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand tools"
      "nav nav";
    align-items: center;
    gap: 0.55rem 0.65rem;
    margin-bottom: 0.9rem;
  }
  .topbar .brand-block { grid-area: brand; }
  .topbar .nav-pills { grid-area: nav; width: 100%; }
  .topbar .top-tools { grid-area: tools; }
  .nav-pills a {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.45rem;
  }
  .nav-pills a.nav-home {
    font-size: 1.05rem;
    padding: 0.45rem 0.65rem;
  }
  .nav-pills a.nav-home.is-on {
    font-size: 1.22rem;
    padding: 0.55rem 0.7rem;
  }
  .nav-pills a.is-on:not(.nav-home) {
    font-size: 0.98rem;
    padding: 0.48rem 0.55rem;
  }
  .card {
    padding: 1rem 0.95rem;
    border-radius: 18px;
  }
  .start-masthead {
    padding: 1rem 1rem 1.05rem;
    border-radius: 22px;
  }
  .start-page .fetch-bar .field :is(input[type="date"], select),
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
  }
}

.lede {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.lede + .lede { margin-top: 0.35rem; }

.break-url { word-break: break-all; }

.chips { margin-top: 0.8rem; }

.week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.9rem;
}

.week-pos {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--muted);
}

.btn-quiet.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.fetch-bar,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: end;
}

.fetch-bar { margin-top: 1rem; }
.fetch-block { margin-top: 0.15rem; }
.fetch-block .fetch-bar { margin-top: 0; }
.start-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 0.9rem;
}
.start-actions-more { margin-top: 0; }
.btn-autopilot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  min-height: 2.35rem;
  margin: 0.95rem auto 0.55rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.btn-autopilot[hidden] { display: none; }
.autopilot-fast-badge {
  font-size: 0.66rem;
  font-weight: 740;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 24%, var(--paper));
  color: var(--ok-ink);
}
.autopilot-fast-badge[hidden] { display: none; }
.btn-autopilot.is-fast {
  border-color: color-mix(in srgb, var(--teal) 38%, var(--line));
}
.autopilot-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.autopilot-dialog {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1.15rem 1.2rem 1.1rem;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.autopilot-dialog::backdrop {
  background: rgba(16, 18, 22, 0.46);
}
.autopilot-dialog h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}
.autopilot-dialog .checkbox-field { margin-top: 0.95rem; }
.autopilot-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.ntfy-field {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--lift);
  overflow: hidden;
}
.ntfy-field input,
.ntfy-field input:not([type="checkbox"]):not([type="radio"]) {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.52rem 0.55rem 0.52rem 0.7rem;
}
.ntfy-field input[readonly] {
  color: var(--store-accent);
  cursor: default;
}
.ntfy-copy-infield {
  flex: 0 0 auto;
  align-self: center;
  margin: 0.22rem 0.22rem 0.22rem 0;
  padding: 0.32rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--teal) 16%, transparent);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.ntfy-copy-infield:hover:not(:disabled) {
  background: color-mix(in srgb, var(--teal) 26%, transparent);
}
.ntfy-copy-infield:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ntfy-copy-infield.is-copied {
  background: color-mix(in srgb, var(--ok) 22%, transparent);
  color: var(--ok-ink);
}
.ntfy-field.is-empty .ntfy-copy-infield { opacity: 0.4; }
.btn-start {
  width: 100%;
  min-height: 3.2rem;
  font-size: 1.08rem;
  padding: 0.85rem 1.3rem;
}
.btn-start[hidden] { display: none; }
.today-gate {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--coral) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--coral) 24%, var(--line));
}
.today-gate[hidden] { display: none; }
.today-gate-title {
  margin: 0 0 0.15rem;
  font-weight: 720;
}
.today-gate-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.includes-today {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 620;
  color: var(--muted);
}
.includes-today[hidden] { display: none; }
.sync-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.sync-refresh {
  margin: 0;
  padding: 0.48rem 0.2rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}
.sync-refresh:hover { color: var(--ink); }
.sync-refresh[hidden] { display: none; }
.actions { margin-top: 1rem; }

.stack { margin-top: 0.85rem; }
.stack-sm { margin-top: 0.6rem; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.field-week { width: 16rem; }
.field-wide { grid-column: 1 / -1; }

.field span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

input, select, textarea, button { font: inherit; }

input:not([type="checkbox"]):not([type="radio"]),
select, textarea {
  border: 1px solid var(--line);
  background: var(--lift);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.52rem 0.7rem;
  width: 100%;
}

.fetch-bar .field :is(input[type="date"], select),
.fetch-bar > .btn {
  box-sizing: border-box;
  height: 2.75rem;
  min-height: 2.75rem;
  max-height: 2.75rem;
}
.fetch-bar .field :is(input[type="date"], select) {
  padding: 0 0.75rem;
  line-height: 1.2;
}
.fetch-bar .field select {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--lift);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235d6774' d='M1.4 1.2 6 5.8 10.6 1.2' stroke='%235d6774' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.7rem;
  padding-right: 2rem;
}
.fetch-bar .field input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}
.fetch-bar .field input[type="date"]::-webkit-datetime-edit,
.fetch-bar .field input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}
.fetch-bar > .btn {
  padding-top: 0;
  padding-bottom: 0;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--btn-primary-from), var(--coral));
  color: var(--coral-ink);
  box-shadow: var(--btn-primary-shadow);
}

.btn-primary:disabled { opacity: 0.55; cursor: wait; }

.btn-teal {
  background: linear-gradient(180deg, #39b3a4, var(--teal));
  color: #f4fffc;
}

.btn-quiet {
  background: var(--lift);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-edit {
  background: transparent;
  color: var(--muted);
  border: 0;
  gap: 0.4rem;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}
.btn-edit:hover {
  color: var(--ink);
  background: var(--lift);
}
.btn-edit svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.job-progress {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.job-progress.is-done { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.job-progress.is-error { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.job-progress.is-mfa { border-color: color-mix(in srgb, var(--lavender) 55%, var(--line)); }

.job-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.job-progress-step {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  max-height: 4.8rem;
  overflow: auto;
}
.job-progress-pct { font-size: 0.75rem; color: var(--muted); }

.job-progress-track {
  height: 6px;
  background: color-mix(in srgb, var(--line) 70%, var(--paper));
  border-radius: 99px;
  overflow: hidden;
}

.job-progress-track > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--coral), var(--teal));
  transition: width 0.35s ease;
}

.job-progress-path {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: var(--quiet);
}
.job-progress-path .path-step { font-weight: 500; }
.job-progress-path .path-step.is-done {
  font-weight: 620;
  color: var(--ink);
}
.job-progress-path .path-step.is-current {
  font-weight: 780;
  color: var(--ink);
}

.job-mfa {
  margin-top: 0.75rem;
  padding: 0.8rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--lavender) 14%, var(--paper));
}

.job-mfa-number {
  margin: 0.15rem 0 0.3rem;
  font-size: 2.2rem;
  font-weight: 720;
  letter-spacing: 0.1em;
}

.job-mfa-code-form[hidden],
.job-mfa-number[hidden],
.job-mfa[hidden] {
  display: none !important;
}

.shot-grid,
.shot-previews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 0.9rem;
}

.shot-previews { margin-bottom: 1rem; }

.shot-groups {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.2rem;
  min-width: 0;
}

.shot-group {
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--cream) 70%, var(--paper));
}

.shot-group.is-current {
  padding: 1.05rem 1.15rem 1.2rem;
  border-color: color-mix(in srgb, var(--teal) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 14%, transparent);
}

.shot-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.9rem;
  margin-bottom: 0.75rem;
}

.shot-group-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 720;
}

.shot-group-period {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.shot-group-rel {
  margin: 0 0 0 auto;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--quiet);
}

.shot-group-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16.5rem, 100%), 1fr));
  gap: 0.85rem;
  align-items: start;
  padding: 0.45rem 0.15rem;
  overflow: visible;
  min-width: 0;
}

.shot-preview.is-current {
  box-shadow: var(--shadow);
}
.shot-frame {
  position: relative;
  display: block;
  overflow: visible;
  margin: 0;
  padding: 0.55rem 0.45rem;
}
.shot-preview.is-current .shot-zoom {
  outline: 2.5px solid var(--teal);
  outline-offset: 6px;
  border-radius: 10px;
}

.shot-kind {
  margin: 0;
  padding: 0.55rem 0.8rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.shot-wrap {
  margin: 0 0 1rem;
  overflow: visible;
  min-width: 0;
}
.shot-wrap .shot-zoom {
  overflow: hidden;
  display: block;
  width: 100%;
  border-radius: 10px;
}
.shot-group-row .shot-wrap { margin-bottom: 0; }

.shot-empty { padding: 1.2rem 0.4rem; }

.reg-table td.is-on { color: var(--ready); font-weight: 700; }
.reg-table td.is-off { color: var(--quiet); }
.reg-table th .day-name,
.reg-table th .day-num {
  display: block;
  line-height: 1.15;
}
.reg-table th .day-name { text-transform: lowercase; font-weight: 650; color: var(--ink); }
.overview-window { margin-top: 0.8rem; max-width: 16rem; }

.job-progress-quiet .job-progress-track,
.job-progress-quiet .job-progress-pct { display: none; }

.sync-status { margin-top: 1.1rem; }
.sync-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}
.sync-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
  border: 1px solid var(--line);
  background: var(--lift);
}
.sync-pill::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--quiet);
}
.sync-pill.is-ready {
  border-color: color-mix(in srgb, var(--ready) 45%, var(--line));
  background: color-mix(in srgb, var(--ready) 14%, var(--paper));
  color: var(--ready-ink);
}
.sync-pill.is-ready::before { background: var(--ready); }
.sync-pill.is-wait { color: var(--muted); }
.sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.48rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--lift);
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(28, 36, 48, 0.04);
}
.sync-toggle:hover {
  border-color: color-mix(in srgb, var(--ink) 16%, var(--line));
  background: color-mix(in srgb, var(--cream) 60%, var(--paper));
}
.sync-toggle[aria-expanded="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.sync-toggle-chevron {
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.22s ease;
}
.sync-toggle[aria-expanded="true"] .sync-toggle-chevron {
  transform: rotate(-135deg) translateY(-1px);
}
.sync-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}
.sync-details.is-open { grid-template-rows: 1fr; }
.sync-details-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.sync-details.is-open .sync-details-inner {
  opacity: 1;
  transform: none;
  padding-top: 0.75rem;
}
.sync-table th:first-child,
.sync-table td:first-child { white-space: nowrap; }

.shot-wrap img { display: block; width: 100%; height: auto; }
.shot-cap { margin: 0; padding: 0.75rem 0.8rem 0.55rem; font-size: 0.78rem; color: var(--muted); }

.shot-to-table {
  display: none;
}
@media (max-width: 860px) {
  .shot-to-table {
    position: fixed;
    left: 50%;
    bottom: 1.15rem;
    transform: translateX(-50%);
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.2rem;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 680;
    box-shadow: 0 12px 28px rgba(28, 36, 48, 0.22);
  }
  .shot-to-table[hidden] { display: none !important; }
  .shot-to-table-chevron {
    width: 0.46rem;
    height: 0.46rem;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
  }
}
body.is-zoomed .shot-to-table { display: none !important; }

#retur-tabell {
  scroll-margin-top: 1rem;
}

.shot-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--lift);
  cursor: zoom-in;
}

.zoom-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.2rem 1.2rem;
  background: rgba(16, 18, 22, 0.78);
  cursor: zoom-out;
}

.zoom-layer[hidden] { display: none !important; }

.zoom-layer img {
  max-width: min(96vw, 1400px);
  max-height: calc(100dvh - 4rem);
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.zoom-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: var(--lift);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
}

.zoom-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  min-width: 3.2rem;
  min-height: 3.2rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--lift);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
}

.zoom-prev { left: 0.6rem; }
.zoom-next { right: 0.6rem; }

.zoom-cap {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 620;
  white-space: nowrap;
}

.zoom-layer img { touch-action: pan-y; }

@media (max-width: 640px) {
  .zoom-nav {
    min-width: 2.8rem;
    min-height: 2.8rem;
    font-size: 0.78rem;
    padding: 0.45rem 0.55rem;
  }
  .zoom-prev { left: 0.35rem; }
  .zoom-next { right: 0.35rem; }
}

body.is-zoomed { overflow: hidden; }

.pbi-matrix { min-width: 40rem; }

.pbi-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  vertical-align: bottom;
  min-width: 4.4rem;
  text-align: center;
  background: var(--paper);
}

.pbi-matrix thead th:first-child {
  left: 0;
  z-index: 4;
  min-width: 8.6rem;
}

.pbi-matrix th .day-name,
.pbi-matrix th .day-num {
  display: block;
  line-height: 1.2;
}

.pbi-matrix th .day-name { color: var(--ink); font-weight: 650; }
.pbi-matrix th .day-num { font-weight: 520; }

.pbi-matrix .paper-head th {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
  padding: 1rem 0.4rem 0.25rem;
  border-bottom: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 680;
  background: var(--paper);
  white-space: nowrap;
}

.pbi-matrix .paper-head td {
  padding: 1rem 0.4rem 0.25rem;
  border-bottom: 0;
  background: var(--paper);
}

.pbi-matrix tbody tr:first-child.paper-head th { padding-top: 0.2rem; }

.pbi-matrix .m-row th,
.pbi-matrix .m-row td {
  padding: 0.28rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.pbi-matrix .m-row th {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 8.6rem;
  width: 8.6rem;
  text-align: left;
  font-weight: 520;
  color: var(--muted);
  background: var(--paper);
}

.pbi-matrix .m-row td {
  text-align: center;
  font-weight: 650;
  color: var(--ink);
}

.pbi-matrix .m-row td.is-empty {
  color: var(--quiet);
  font-weight: 520;
}

.pbi-matrix .m-row-lev th,
.pbi-matrix .m-row-lev td {
  background: color-mix(in srgb, var(--teal) 14%, var(--paper));
  border-bottom-color: color-mix(in srgb, var(--teal) 22%, var(--line));
}

.pbi-matrix .m-row-lev th { color: var(--ok-ink); font-weight: 680; }
.pbi-matrix .m-row-lev td { color: var(--ok-ink); font-weight: 720; }
.pbi-matrix .m-row-lev td.is-empty { color: color-mix(in srgb, var(--ok-ink) 45%, var(--muted)); font-weight: 520; }

.pbi-matrix .m-row-ret th,
.pbi-matrix .m-row-ret td {
  background: color-mix(in srgb, var(--coral) 10%, var(--paper));
  border-bottom-color: color-mix(in srgb, var(--coral) 20%, var(--line));
}

.pbi-matrix .m-row-ret th { color: color-mix(in srgb, var(--coral) 70%, var(--ink)); font-weight: 620; }
.pbi-matrix .m-row-ret td { font-weight: 700; }
.pbi-matrix .m-row-ret td.is-empty { color: color-mix(in srgb, var(--coral) 40%, var(--muted)); font-weight: 520; }

.pbi-matrix .m-val {
  position: relative;
  display: inline-block;
}
.pbi-matrix .m-val.is-linked .m-num {
  background: var(--linked-bg);
  padding: 0.08em 0.28em;
  border-radius: 4px;
}
.pbi-matrix .link-hint {
  font-size: 0.68rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: var(--linked-ink);
  white-space: nowrap;
}
.pbi-matrix .m-val .link-hint {
  position: absolute;
  left: calc(100% + 0.2em);
  top: 50%;
  transform: translateY(-50%);
}

.pbi-matrix.is-edit td {
  vertical-align: middle;
}
.pbi-matrix .m-edit {
  width: 3.4rem;
  min-width: 3.4rem;
  padding: 0.22rem 0.28rem;
  border-radius: 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.pbi-matrix .m-edit::-webkit-outer-spin-button,
.pbi-matrix .m-edit::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.review-qa-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.review-qa-lede { margin-top: 0; }

.table-wrap { overflow-x: auto; }
.table-wrap:has(.pbi-matrix) {
  overflow: auto;
  max-height: min(72dvh, 46rem);
  overscroll-behavior: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 0.58rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

th {
  text-align: right;
  color: var(--muted);
  font-weight: 620;
  font-size: 0.78rem;
}

th:first-child, td:first-child { text-align: left; }
td { text-align: right; font-variant-numeric: tabular-nums; }
td.zero { color: var(--quiet); }
.total-row td { font-weight: 700; }
.ean { color: var(--quiet); font-size: 0.74rem; }
.empty { color: var(--muted); }
.fill-warn {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--warn-line);
  border-radius: 10px;
  background: var(--warn-bg);
}
.fill-warn p { margin: 0 0 0.7rem; color: var(--warn-ink); font-weight: 620; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.metric {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.metric b {
  display: block;
  font-size: 1.45rem;
  font-weight: 720;
}

.metric span { color: var(--muted); font-size: 0.78rem; }

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 650;
  background: var(--lift);
  border: 1px solid var(--line);
}

.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }

.section {
  margin: 0 0 1rem;
  scroll-margin-top: 1rem;
}

.section .hint {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.split {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.venue-list { display: grid; gap: 0.6rem; }

.venue {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: var(--lift);
  border: 1px solid var(--line);
}

.venue .actions { margin-top: 0; }

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.supplier-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 0.35rem;
}
.supplier-flags .checkbox-field { margin-top: 0.35rem; }

.settings-page-head { margin: 0 0 1.15rem; }
.settings-page-head h1 { margin: 0 0 0.35rem; }

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.5rem;
  position: sticky;
  top: 0.4rem;
  z-index: 4;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 92%, var(--cream));
  box-shadow: var(--shadow);
}

.settings-tabs a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.settings-tabs a:hover,
.settings-tabs a:focus-visible {
  color: var(--ink);
  border-color: var(--store-accent);
}

.settings-tabs a[aria-current="location"] {
  color: var(--store-accent);
  border-color: var(--store-accent);
  background: color-mix(in srgb, var(--store-accent) 10%, var(--paper));
}

.settings-section {
  margin: 0 0 2.25rem;
  scroll-margin-top: 4.6rem;
}

.settings-section-head { margin: 0 0 0.9rem; }
.settings-section-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.settings-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.form-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.05rem 1.1rem 1.15rem;
  margin: 0 0 0.85rem;
}

.form-block-head { margin: 0 0 0.85rem; }
.form-block-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
}
.form-block-head .meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}
.form-block-head.with-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: flex-start;
  justify-content: space-between;
}
.form-block-head.with-badge > div { min-width: 0; flex: 1 1 12rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.paper-sync-status { margin: 0.85rem 0 0.55rem; }
.paper-sync-catalog {
  display: grid;
  gap: 0.75rem 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 0 0 0.95rem;
}
.paper-sync-group h4 {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.paper-sync-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.28rem;
}
.paper-sync-group li {
  display: grid;
  gap: 0.28rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: var(--lift);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 620;
}
.paper-sync-map select,
.paper-sync-code input {
  width: 100%;
  min-height: 2rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: inherit;
  font: inherit;
}
.paper-sync-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.ops-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-top: 0.1rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  background: var(--lift);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
}
.ops-badge.is-shared {
  border-color: color-mix(in srgb, var(--ok) 55%, var(--line));
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--paper));
}
.ops-badge.is-local {
  border-color: color-mix(in srgb, var(--warn-line) 45%, var(--line));
  color: var(--warn-ink);
  background: color-mix(in srgb, var(--warn-bg) 70%, var(--paper));
}
a.ops-badge:hover { border-color: var(--teal); color: var(--teal); }
.board-form-sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.1rem 0 0.95rem;
}
.reboot-now-lead {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}
#reboot-schedule .checkbox-field {
  width: 100%;
  margin: 0 0 0.85rem;
  flex-direction: row-reverse;
  justify-content: space-between;
}
.reboot-schedule-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.reboot-schedule-fields > .field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.reboot-schedule-fields > .field:last-child { margin-bottom: 0; }
.reboot-schedule-fields > .field > span:first-child,
.reboot-cond-slot > .field > span:first-child {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.reboot-schedule-fields input,
.reboot-schedule-fields select {
  width: 100%;
  height: 2.4rem;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--lift);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.reboot-cond-slot {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-bottom: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    margin-bottom 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.reboot-cond-slot > .field {
  display: grid;
  gap: 0.35rem;
  min-height: 0;
  overflow: hidden;
}
.reboot-cond-slot.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 0.85rem;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .reboot-cond-slot { transition-duration: 0.01ms; }
}
.actions.is-end { justify-content: flex-end; }
.btn-danger {
  background: linear-gradient(180deg, #e06a62, var(--bad));
  color: #fff8f6;
}
.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.board-status-layout {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  gap: 1rem;
  align-items: center;
}
@media (max-width: 560px) {
  .board-status-layout { grid-template-columns: 1fr; }
}
.board-pulse {
  position: relative;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.board-pulse-glow {
  position: absolute;
  inset: 18% 22%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 35%, transparent);
  filter: blur(10px);
}
.board-status-card.is-online .board-pulse-glow {
  animation: board-pulse-glow 4.8s ease-in-out infinite;
}
.board-status-card.is-unknown .board-pulse-glow {
  background: color-mix(in srgb, var(--quiet) 40%, transparent);
}
.board-ekg { width: 100%; height: 2.6rem; overflow: visible; }
.board-ekg-line {
  fill: none;
  stroke: var(--ok);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.board-status-card.is-unknown .board-ekg-line {
  stroke: var(--quiet);
  opacity: 0.7;
}
.board-status-card.is-online .board-ekg-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: board-ekg-draw 4.8s ease-in-out infinite;
}
@keyframes board-ekg-draw {
  0% { stroke-dashoffset: 100; opacity: 0.45; }
  32% { stroke-dashoffset: 0; opacity: 1; }
  62% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0.4; }
}
@keyframes board-pulse-glow {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  40%, 60% { opacity: 1; transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .board-status-card.is-online .board-ekg-line,
  .board-status-card.is-online .board-pulse-glow {
    animation: none;
  }
  .board-status-card.is-online .board-ekg-line {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}
.board-status-pill {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ok);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.board-status-host { margin: 0 0 0.65rem; font-size: 0.95rem; }
.board-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  margin: 0;
}
.board-status-grid dt { font-size: 0.72rem; color: var(--muted); margin: 0; }
.board-status-grid dd { margin: 0.1rem 0 0; font-size: 0.88rem; color: var(--ink); }
.board-status-rel { display: block; color: var(--muted); font-size: 0.78rem; }

.board-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.metric-gauge { text-align: center; }
.metric-ring {
  --p: 0;
  width: 4.6rem;
  height: 4.6rem;
  margin: 0 auto 0.4rem;
  border-radius: 50%;
  background: conic-gradient(var(--store-accent) calc(var(--p) * 1%), var(--line) 0);
  display: grid;
  place-items: center;
}
.metric-ring::before {
  content: "";
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 50%;
  background: var(--paper);
  grid-area: 1 / 1;
}
.metric-ring-value {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}
.metric-title { margin: 0; font-size: 0.82rem; font-weight: 600; }
.metric-sub { margin: 0.15rem 0 0; font-size: 0.72rem; color: var(--muted); }

.mgr-toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  width: min(28rem, calc(100vw - 1.5rem));
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.mgr-toast.ok {
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
  background: color-mix(in srgb, var(--teal) 14%, var(--paper));
  color: var(--ok-ink);
}
.mgr-toast.err {
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line));
  background: color-mix(in srgb, var(--bad) 14%, var(--paper));
  color: var(--bad-ink);
}
.mgr-toast-msg { flex: 1; margin: 0; }
.mgr-toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
}
.mgr-toast.is-hiding {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.login-wrap {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card { width: min(100%, 24rem); }
.login-card p { margin: 0 0 1rem; color: var(--muted); }

.page-flash {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--teal) 14%, var(--paper));
  color: var(--ok-ink);
}

.page-flash.is-err {
  background: color-mix(in srgb, var(--bad) 14%, var(--paper));
  color: var(--bad-ink);
}
