:root {
  --navy: #17241f;
  --navy-2: #24352e;
  --ink: #1c1814;
  --muted: #6d6458;
  --line: #e6ddd2;
  --bg: #efe8de;
  --bg-2: #e4dbcf;
  --card: rgba(255,253,249,.82);
  --card-solid: #fffdf9;
  --accent: #c45c26;
  --accent-soft: #f4e0d1;
  --ok: #2c7a56;
  --bad: #b42318;
  --ferie: #2b5f8a;
  --shadow: 0 18px 46px rgba(28, 24, 20, .1);
  --glass: blur(22px) saturate(1.15);
  --page-bg: #cfdce8;
  --card-border: rgba(255,255,255,.72);
  --input-bg: #fff;
  --hover: #f4efe8;
  --btn-bg: #17241f;
  --btn-fg: #fff;
  --on-bg: #17241f;
  --on-fg: #fff;
  --amb-1: #d7e3ee;
  --amb-2: #e8eef4;
  --amb-3: #d5cfc6;
  --ios-link: #1a5fb4;
  --safe: env(safe-area-inset-top);
  --safe-b: env(safe-area-inset-bottom);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; background: var(--page-bg); color: var(--ink); overflow-x: hidden; }
body { padding-bottom: 0; position: relative; }
.ambiance {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 100% 0%, rgba(255,255,255,.7), transparent 50%),
    radial-gradient(700px 420px at 0% 100%, rgba(196,92,38,.12), transparent 55%),
    linear-gradient(180deg, var(--amb-1) 0%, var(--amb-2) 48%, var(--amb-3) 100%);
}
.ambiance i { position: absolute; border-radius: 50%; }
.ambiance .a1 {
  width: 50vw; height: 50vw; max-width: 520px; max-height: 520px;
  top: -12%; right: -8%;
  background: radial-gradient(circle, rgba(255,255,255,.55), transparent 70%);
}
.ambiance .a2 {
  width: 56vw; height: 56vw; max-width: 600px; max-height: 600px;
  bottom: -20%; left: -16%;
  background: radial-gradient(circle, rgba(44,122,86,.14), transparent 70%);
}
.ambiance .a3 { display: none; }
.shell { position: relative; z-index: 1; }
.app { position: relative; z-index: 0; }
a { color: var(--navy-2); text-decoration: none; }
h1, h2 { margin: 0 0 .35rem; font-size: 1.45rem; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; margin-top: .2rem; }

.app { max-width: 760px; margin: 0 auto; padding: calc(14px + var(--safe)) 18px 28px; flex: 1; min-width: 0; }
.shell .app { margin: 0; }

.shell {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(12px + var(--safe)) 12px 24px;
}
.sidemenu {
  width: 210px;
  flex-shrink: 0;
  position: sticky;
  top: calc(12px + var(--safe));
  z-index: 20;
}
.sidemenu-box {
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}
.sidemenu-brand {
  margin: 0 8px 2px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.sidemenu-logo {
  display: block;
  max-width: 148px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 8px;
}
.sidemenu-label {
  margin: 14px 8px 2px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.view-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #efe8de;
  border-radius: 12px;
  padding: 4px;
}
.view-switch a {
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
  padding: 8px 6px;
  border-radius: 10px;
  color: var(--muted);
}
.view-switch a.on {
  background: var(--on-bg);
  color: var(--on-fg);
}
.sidemenu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: visible;
}
.nav-fly { position: relative; }
.nav-fly-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-weight: 750;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.nav-fly-btn::after {
  content: "›";
  font-size: 1.1rem;
  color: var(--muted);
  transform: translateY(-1px);
}
.nav-fly-btn.on,
.nav-fly.is-on > .nav-fly-btn {
  background: var(--accent-soft);
  color: var(--accent);
}
.sidemenu-links .nav-fly-btn:hover { background: var(--hover); }
.nav-fly-pop {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  z-index: 90;
  padding: 0 0 0 10px;
}
.nav-fly-pop.is-open {
  display: block;
  position: fixed;
  left: auto;
  top: auto;
  z-index: 220;
  padding: 0;
  pointer-events: auto;
}
.nav-fly-card {
  min-width: 176px;
  padding: 10px 8px;
  background: var(--card-solid);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(8, 12, 10, .35);
}
.nav-fly-title {
  margin: 0 8px 6px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-fly-card a {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
}
.nav-fly.open > .nav-fly-pop { display: block; }
.sidemenu-links a,
.sidemenu-out {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  font-weight: 750;
  color: var(--ink);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.sidemenu-links a.on {
  background: var(--accent-soft);
  color: var(--accent);
}
.sidemenu-links a:hover,
.sidemenu-out:hover {
  background: #f4efe8;
}
.sidemenu-out {
  margin-top: 4px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
}

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.top h1 { margin: 0; }
.eyebrow { margin: 0; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.lead, .hint { color: var(--muted); font-size: .94rem; line-height: 1.5; }
.center { text-align: center; }
.link { font-weight: 700; color: var(--accent); }

.card, .status-card, .notice {
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.72);
  margin-bottom: 14px;
}

.status-card {
  text-align: center;
  padding: 28px 16px 22px;
  background:
    radial-gradient(400px 180px at 50% 0%, rgba(196,92,38,.16), transparent 70%),
    var(--card);
}
.status-card .hours { font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; }
.gps { color: var(--muted); font-size: .86rem; margin: 8px 0 0; }
.gps.off { color: var(--bad); font-weight: 700; }
.gps-box { margin: 12px 0 4px; }
.gps-links { display: flex; flex-direction: column; gap: 6px; }
.clock-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  margin: 4px 0 10px;
}
.clock-note input {
  font-weight: 500;
  min-height: 48px;
}
.span-list:empty { display: none; margin: 0; }
.span-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: .92rem;
}
.span-list li span { color: var(--muted); }
.span-list li strong { font-weight: 800; }
.job-list { margin: 4px 0 10px; }
.job-gps { display: flex; gap: 10px; font-weight: 700; }
.job-gps a { color: var(--ios-link); }
.gps-pin {
  display: inline-block;
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gps-map {
  display: block;
  width: 100%;
  height: 220px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2, #e8efe9);
}

.badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: #efe8de; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.badge.work { background: #d8f3e6; color: var(--ok); }
.badge.done { background: #ece7df; color: var(--navy); }
.badge.warn { background: var(--accent-soft); color: var(--accent); }

.btn, button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 50px; border: 0; border-radius: 16px;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 750; font-size: 1rem;
  padding: 12px 16px; box-shadow: 0 10px 22px rgba(23,36,31,.2);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  text-decoration: none;
}
.btn:hover, button.btn:hover { transform: translateY(-1px); }
.btn:active, button.btn:active { transform: translateY(0); }
.btn.danger { background: var(--bad); box-shadow: 0 8px 18px rgba(180,35,24,.22); }
.btn.ghost, button.ghost { background: rgba(255,253,249,.8); color: var(--navy); border: 1px solid var(--line); box-shadow: none; }
.btn.sm { width: auto; min-height: 40px; padding: 8px 14px; font-size: .9rem; border-radius: 12px; }
.actions, .row-btns, .grid2 { display: grid; gap: 10px; margin: 12px 0; }
.row-btns, .grid2 { grid-template-columns: 1fr 1fr; }

.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); font-weight: 550;
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  background: var(--input-bg);
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(196,92,38,.22); border-color: var(--accent);
}
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.check input { width: auto; }

.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.mini-stats div {
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.7);
}
.mini-stats span { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mini-stats strong { font-size: 1.2rem; }

.login-body { padding-bottom: 0; }
.login-body .app { padding-top: 24px; }
.login-screen { padding-top: 20px; text-align: center; max-width: 420px; margin: 0 auto; }
.site-body .app { max-width: 980px; padding-bottom: 40px; }
.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--navy);
}
.site-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 4px 8px;
}
.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  font-size: .86rem;
  font-weight: 750;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}
.site-nav a:hover { background: rgba(255,253,249,.7); color: var(--navy); }
.site-nav-in {
  background: var(--navy) !important;
  color: #fff !important;
}
.site-hero { overflow: hidden; padding: 0; }
.site-hero-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: center 35%;
  background: var(--navy-2);
}
.site-shots { display: grid; gap: 12px; }
.site-shot { margin: 0; overflow: hidden; padding: 0; }
.site-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--navy-2);
}
.site-shot figcaption { padding: 12px 16px 16px; }
.site-shot figcaption strong { display: block; margin-bottom: 4px; }
.site-shot figcaption .lead { margin: 0; font-size: .95rem; }
.site-hero-logo { padding: 22px 20px 0; }
.site-hero-logo img {
  display: block;
  max-width: min(260px, 82%);
  max-height: 88px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: 0 8px 20px rgba(28, 24, 20, .08);
}
.site-hero-copy { padding: 16px 20px 20px; }
.site-hero-copy h1 { font-size: 1.9rem; margin: 4px 0 8px; }
.site-hero-btns { margin-top: 16px; max-width: 380px; }
.site-block p:last-child { margin-bottom: 0; }
.site-secure .steps { margin-top: 10px; }
.site-secure-row { display: grid; gap: 14px; margin-top: 18px; }
.site-secure-intro h2 { margin: 4px 0 8px; }
.site-secure-grid { display: grid; gap: 12px; }
.site-secure-grid h2 { font-size: 1.08rem; margin: 0 0 8px; }
.site-secure-grid .steps { margin-top: 0; }
.site-split { display: grid; gap: 16px; align-items: start; }
.site-left, .site-right { display: grid; gap: 16px; }
.site-price-rows { display: grid; gap: 10px; margin: 12px 0; }
.site-price-rows div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 14px;
  background: var(--card-solid);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.site-price-rows span { font-size: .82rem; font-weight: 700; color: var(--muted); }
.site-price-rows strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.site-price-rows em { font-style: normal; font-size: .78rem; color: var(--muted); }
.site-feats { display: grid; gap: 16px; margin: 8px 0 0; }
.site-feats article + article { padding-top: 14px; border-top: 1px solid var(--line); }
.site-feats .gate-body { margin-bottom: 0; }
.site-how { margin-bottom: 0; }
.site-contact {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.site-contact p { margin: 0 0 8px; }
.site-mail { margin-top: 10px; }
.site-mail .btn { width: auto; }
.site-login { max-width: none; }
.site-login .card { margin-bottom: 0; }
.site-foot {
  margin-top: 20px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}
.gate-body { white-space: pre-wrap; color: var(--ink); margin: 0 0 12px; line-height: 1.55; }
.gate-preview { max-width: 100%; max-height: 140px; object-fit: cover; }
.brand { margin-bottom: 22px; }
.brand img { border-radius: 22px; box-shadow: 0 12px 28px rgba(23,36,31,.18); }
.brand img.logo {
  width: auto;
  height: auto;
  max-width: min(260px, 80vw);
  max-height: 96px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 10px 14px;
}
.logo-preview {
  display: block;
  max-width: 220px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 4px 0 8px;
}
.brand h1 { font-size: 1.7rem; margin-top: 12px; }
.brand p { color: var(--muted); margin: 6px 0 0; }
.pin-form {
  position: relative;
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
}
.pin-form > label { margin-bottom: 8px; }
.pin-form.stack { text-align: left; }
.pin-form.stack input { width: 100%; }
.pin-dots { display: flex; justify-content: center; gap: 10px; margin: 6px 0 16px; min-height: 16px; }
.pin-dots i {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #cfc4b6; display: inline-block;
}
.pin-dots i.on { background: var(--navy); border-color: var(--navy); }
.pin-form input#pin { position: absolute; opacity: 0; pointer-events: none; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button {
  min-height: 62px; border: 0; border-radius: 18px; background: #fff;
  font-size: 1.35rem; font-weight: 750; box-shadow: 0 6px 16px rgba(28,24,20,.06);
  border: 1px solid #f0e9e0;
}
.pad button.ok { background: var(--accent); color: #fff; border: 0; }
.admin-login {
  margin-top: 22px;
  text-align: left;
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  padding: 4px 16px 16px;
}
.admin-login summary { cursor: pointer; color: var(--muted); font-weight: 700; padding: 12px 0; }

.list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; width: 100%; max-width: 100%; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  position: relative;
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.person .who {
  display: block;
  min-width: 0;
}
.person .who-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.person .who-link > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: visible; }
.person:has(.note-mark:hover),
.person:has(.note-mark:focus-within) { z-index: 8; }
.person .note-mark { color: #fff !important; }
.person .who-link strong { overflow-wrap: anywhere; }
.avatar {
  width: 42px; height: 42px; border-radius: 14px; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 800;
  flex-shrink: 0; overflow: hidden;
}
img.avatar { object-fit: cover; padding: 0; background: var(--bg-2); }
.avatar.lg { width: 96px; height: 96px; border-radius: 28px; font-size: 2rem; }
.avatar.sm { width: 36px; height: 36px; border-radius: 12px; margin: 0 auto 6px; }
.profile-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.profile-card.compact { flex-direction: row; text-align: left; align-items: center; gap: 16px; }
.profile-card.compact label { flex: 1; margin: 0; }
.person span { color: var(--muted); font-size: .85rem; }
.person.on { box-shadow: inset 4px 0 0 var(--ok), var(--shadow); }
.person em { font-style: normal; color: var(--ok); font-size: .72rem; font-weight: 800; letter-spacing: .06em; }
.person-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.4;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(28, 24, 20, .08);
}
.person-meta strong { color: var(--ink); font-size: .86rem; font-weight: 700; overflow-wrap: anywhere; }
.person-meta .addr { display: block; line-height: 1.35; }
.person-meta span { color: var(--muted); font-size: .8rem; }
.person-meta em { display: block; margin-bottom: 2px; }
.person-meta .arsdag {
  color: var(--ink);
  font-size: inherit;
  font-weight: 700;
}
.person-meta .bday {
  color: var(--ink);
  font-size: inherit;
  font-weight: 800;
}
.bday-flag {
  display: inline-block;
  width: 22px;
  height: 16px;
  margin: 0 6px 0 0;
  border-radius: 2px;
  vertical-align: -2px;
  background-color: #c8102e;
  background-image: linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
  background-size: 100% 3.5px, 3.5px 100%;
  background-position: 0 6.5px, 7px 0;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.who .bday-flag { margin: 0 0 0 6px; }
.person:has(.bday-flag) {
  box-shadow: inset 4px 0 0 #c8102e, var(--shadow);
}
.person-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: .86rem;
  line-height: 1.35;
  color: var(--ink);
}
.person-contacts .call,
.person-contacts span {
  display: block;
  color: var(--ink);
  font-size: inherit;
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { color: var(--muted); font-size: .75rem; text-align: center; margin-bottom: 6px; font-weight: 700; }
.cal-cell {
  background: var(--card); border-radius: 12px; min-height: 58px; padding: 7px;
  display: flex; flex-direction: column; color: inherit; box-shadow: 0 4px 10px rgba(28,24,20,.04);
}
.cal-cell em { font-style: normal; font-weight: 750; }
.cal-cell small { color: var(--muted); }
.cal-cell.empty { background: transparent; box-shadow: none; }
.cal-cell.t-work { background: #e5f6ee; }
.cal-cell.t-ferie { background: #e4eef8; }
.cal-cell.t-sygdom { background: #fde8e6; }
.cal-cell.t-fridag { background: #eeeae4; }
.cal-cell.t-helligdag { background: #f4ead0; }
.cal-cell.review { outline: 2px solid var(--accent); }

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}
html:has(body.log-page), body.log-page { height: 100%; overflow: hidden; }
body.log-page .shell {
  height: calc(100vh - var(--safe));
  max-height: 100vh;
  overflow: hidden;
  align-items: stretch;
  padding-bottom: 12px;
}
body.log-page .app {
  max-width: 960px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding-bottom: 8px;
  overflow: hidden;
}
body.log-page .top { margin-bottom: 10px; flex-shrink: 0; }
.log-search { margin: 0 0 10px; flex-shrink: 0; }
.log-box {
  flex: 1;
  min-height: 0;
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.log-scroll { height: 100%; overflow: auto; }
.log-box table { margin: 0; }
.log-box thead th {
  position: sticky;
  top: 0;
  background: var(--card-solid);
  z-index: 1;
  box-shadow: 0 1px 0 var(--line);
}
.log-box td:last-child { white-space: normal; max-width: 28rem; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; }
tfoot td { font-weight: 800; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters input, .filters select { width: auto; }
.export-bar { align-items: center; margin: 12px 0 4px; }
.export-bar select { flex: 1; min-width: 180px; }
.row-btns.triple { grid-template-columns: 1fr 1fr 1fr; }
.row-btns.line {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}
.row-btns.line .btn {
  flex: 1;
  width: auto;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
  font-size: .88rem;
}

.tenant-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 8px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: 14px;
}
.tenant-pick .check { font-weight: 650; }

.dev-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #c45c12;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 9px 12px;
}
body.is-dev { --dev-pad: 36px; }

.flash-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.flash { background: var(--accent-soft); color: #7a3e00; padding: 12px 14px; border-radius: 14px; font-weight: 700; }
.notice pre { white-space: pre-wrap; font: inherit; font-size: .82rem; color: var(--muted); }
.steps { margin: 0; padding-left: 1.15rem; line-height: 1.55; }
code.copy {
  display: block; background: var(--navy); color: #f4f7fb; padding: 12px;
  border-radius: 12px; font-size: .78rem; word-break: break-all; margin: 8px 0;
}

.choice {
  display: flex; flex-direction: row; align-items: flex-start; gap: 10px;
  background: var(--input-bg); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px;
  color: var(--ink); cursor: pointer;
}
.choice input { width: auto; margin-top: 3px; }
.choice strong { display: block; font-size: .95rem; }
.choice em { font-style: normal; color: var(--muted); font-size: .82rem; font-weight: 500; }
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--on-bg);
  color: var(--on-fg);
}
.choice:has(input:checked) em { color: var(--on-fg); opacity: .85; }
#period-days.calendar-hide { display: none; }
#period-days .wrap-only { display: none; }
#period-days.wrap .wrap-only { display: flex; }

.setup-hero { text-align: center; margin-bottom: 8px; }
.setup-hero img { border-radius: 20px; }

.nav-arrow {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--card); border-radius: 14px; font-size: 1.4rem; font-weight: 700;
  box-shadow: var(--shadow); color: var(--ink);
}
.seg {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px;
  background: #efe8de; border-radius: 16px; padding: 4px; margin-bottom: 14px;
}
.seg a {
  text-align: center; font-weight: 800; font-size: .82rem; padding: 10px 6px;
  border-radius: 12px; color: var(--muted);
}
.seg a.on { background: var(--on-bg); color: var(--on-fg); }
.pay-hero {
  background: linear-gradient(160deg, #1c2e27 0%, #17241f 70%);
  color: #fff; border-radius: 24px; padding: 22px 16px 18px; text-align: center;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.pay-hero p { margin: 0; opacity: .75; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pay-hero .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; margin: 6px 0; }
.pay-hero .pay-meta { opacity: .85; text-transform: none; letter-spacing: 0; font-weight: 500; }
.day-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.day-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 16px; padding: 12px 14px;
  box-shadow: var(--shadow); color: inherit;
}
.day-row div { display: flex; flex-direction: column; gap: 2px; }
.day-row span { color: var(--muted); font-size: .85rem; }
.day-row em { font-style: normal; font-weight: 800; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.day-row em small {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0;
}
.day-row.today { outline: 2px solid var(--accent); }
.day-row.weekend {
  background: var(--weekend-bg, #d9d1c5);
  border-color: var(--weekend-line, rgba(28, 24, 20, .16));
  color: var(--weekend-ink, #1c1814);
}
.day-row.weekend strong,
.day-row.weekend span,
.day-row.weekend em small,
.day-row.weekend strong small {
  color: var(--weekend-ink, #1c1814);
}
.day-row.weekend span,
.day-row.weekend em small,
.day-row.weekend strong small {
  color: var(--weekend-muted, #3d362c);
}
.day-row.weekend.t-ferie { background: var(--weekend-ferie, #d2deea); }
.day-row.weekend.t-sygdom { background: var(--weekend-sygdom, #efd0cb); }
.day-row.weekend.t-fridag { background: var(--weekend-fridag, #d8d1c8); }
.day-row.t-work em { color: var(--ok); }
.day-row.t-ferie { background: var(--day-ferie, #eaf2fa); }
.day-row.t-sygdom { background: var(--day-sygdom, #fdecea); }
.day-row.t-fridag { background: var(--day-fridag, #eeeae4); }
.day-row.t-helligdag { background: var(--day-hellig, #f3e6c4); color: var(--weekend-ink, #1c1814); }
.day-row.t-helligdag em { color: #8a5a12; }
.day-row.weekend.t-helligdag { background: var(--weekend-hellig, #e4d4a8); }
.day-row form { margin: 0; flex: 0 0 auto; }
.day-row { position: relative; }
.day-row strong small {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
}
.week-head {
  margin: 14px 2px 4px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.note-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff !important;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: 1px;
}
.note-pop {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 10px 12px;
  background: #1c1814;
  color: #fffdf9 !important;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 550;
  line-height: 1.4;
  white-space: pre-wrap;
  z-index: 30;
  box-shadow: 0 12px 28px rgba(28, 24, 20, .28);
  pointer-events: none;
}
.note-pop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #1c1814;
}
.note-mark:hover .note-pop,
.note-mark:focus .note-pop,
.note-mark:focus-within .note-pop { display: block; }

.field-label { margin: 4px 0 0; font-size: .82rem; font-weight: 700; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  flex: 1 1 30%;
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 10px; margin: 0;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--input-bg); color: var(--ink); font-weight: 750; font-size: .92rem;
  cursor: pointer;
}
.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.chip:has(input:checked) {
  border-color: var(--on-bg);
  background: var(--on-bg);
  color: var(--on-fg);
}

.sheet-dim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}
.sheet-dim.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-b));
  z-index: 51;
  display: none;
  flex-direction: column;
  gap: 8px;
  transform: translateY(calc(100% + 28px));
  transition: transform .38s cubic-bezier(.32, .72, 0, 1);
}
.sheet:not([hidden]) { display: flex; }
.sheet.is-open { transform: translateY(0); }
.sheet-card {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 26px;
  box-shadow: 0 10px 36px rgba(16, 24, 40, .14);
  overflow: hidden;
  max-height: min(72vh, calc(100dvh - 160px));
  display: flex;
  flex-direction: column;
}
.sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: #c5c8cc;
  margin: 10px auto 6px;
  flex-shrink: 0;
}
.sheet-switch {
  margin: 2px 14px 10px;
  background: rgba(15, 23, 42, .06);
  border-radius: 12px;
  padding: 3px;
}
.sheet-switch a {
  color: var(--ios-link);
  font-size: .92rem;
  font-weight: 700;
}
.sheet-switch a.on {
  background: rgba(255, 255, 255, .92);
  color: var(--ios-link);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}
.sheet-links {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.sheet-links a {
  display: block;
  width: auto;
  margin: 0 16px;
  padding: 16px 4px;
  text-align: center;
  color: var(--ios-link);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  border-bottom: 1px solid #d0d4da;
}
.sheet-links a:last-child { border-bottom: 0; }
.sheet-links a.on { font-weight: 700; }
.sheet-links a.sheet-out { color: var(--ios-link); }
.sheet-links .nav-fly {
  margin: 0 16px;
  border-bottom: 1px solid #d0d4da;
}
.sheet-links .nav-fly-btn {
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 16px 4px;
  color: var(--ios-link);
  font-size: 17px;
  font-weight: 500;
}
.sheet-links .nav-fly-btn.on,
.sheet-links .nav-fly.is-on > .nav-fly-btn {
  background: transparent;
  color: var(--ios-link);
  font-weight: 700;
}
.sheet-links .nav-fly-btn::after { content: "▾"; font-size: .85rem; }
.sheet-links .nav-fly-pop {
  position: static;
  padding: 0 0 10px;
}
.sheet-links .nav-fly-card {
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.sheet-links .nav-fly-title { text-align: center; }
.sheet-links .nav-fly-card a {
  margin: 0;
  padding: 12px 4px;
  min-height: 0;
  text-align: center;
  font-size: 16px;
  border-bottom: 0;
}
.sheet-cancel {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 18px;
  color: var(--ios-link);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 16px 20px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .1);
  cursor: pointer;
}
.menu-launch { display: none !important; }
html:has(body.sheet-open),
body.sheet-open { overflow: hidden; }

@media (min-width: 900px) {
  .person {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-areas: "who contacts meta";
    align-items: start;
    gap: 16px;
  }
  .person .who { grid-area: who; }
  .person-contacts { grid-area: contacts; }
  .person-meta {
    grid-area: meta;
    text-align: right;
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 720px) {
  .shell { gap: 0; padding-left: 0; padding-right: 0; padding-bottom: 24px; display: block; max-width: 100%; }
  .sidemenu { display: none; }
  .app { padding-left: 16px; padding-right: 16px; max-width: 100%; overflow-x: hidden; }
  .top { padding-right: 52px; }
  .top h1 { overflow-wrap: anywhere; }
  .menu-launch {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: calc(10px + var(--safe));
    right: 12px;
    left: auto;
    bottom: auto;
    transform: none;
    z-index: 40;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,.72);
    color: var(--navy);
    font: inherit;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(16, 24, 40, .08);
    cursor: pointer;
  }
}

@media (min-width: 721px) {
  .sheet,
  .sheet-dim,
  .menu-launch { display: none !important; }
}

@media (min-width: 640px) and (max-width: 899px) {
  .site-shots { grid-template-columns: 1fr 1fr; }
  .site-secure-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .site-secure-grid { grid-template-columns: repeat(4, 1fr); }
  .period-grid { grid-template-columns: repeat(3, 1fr); }
  .login-screen { padding-top: 48px; }
  .site-split { grid-template-columns: 1fr 1fr; }
  .site-hero-copy h1 { font-size: 2.15rem; }
  .site-hero-img { max-height: 340px; }
}

body.system-body .app { max-width: 880px; }
body.report-body .app { max-width: 1120px; }
body.report-body .table-wrap { overflow-x: auto; }
body.report-body table { font-size: .82rem; }
body.report-body th, body.report-body td { padding: 9px 8px; white-space: nowrap; }
body.report-body td:first-child, body.report-body th:first-child { white-space: normal; }
.fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { margin: 0; flex: 1; }
.fold > summary::after {
  content: "▸";
  color: var(--muted);
  font-size: 1.1rem;
}
.fold[open] > summary::after { content: "▾"; }
.fold > summary + * { margin-top: 12px; }
.sys-tenant h3 { margin: 2px 0 4px; }
.sys-tenant > summary.sys-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  cursor: pointer;
  padding: 2px 0;
}
.sys-tenant > summary.sys-head::-webkit-details-marker { display: none; }
.sys-tenant > summary.sys-head::after {
  content: "▸";
  color: var(--muted);
  font-size: 1.1rem;
  margin-left: auto;
}
.sys-tenant[open] > summary.sys-head::after { content: "▾"; }
.sys-tenant > summary.sys-head:hover h3 { color: var(--accent); }
.sys-body { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.sys-tenant.over { border-color: rgba(180,35,24,.35); }
.sys-tenant.stopped { border-color: rgba(180,35,24,.5); background: rgba(255,245,244,.9); }
.log-box tr.lvl-error td { color: var(--bad); }
.log-detail { margin-top: 6px; }
.log-detail pre { white-space: pre-wrap; font-size: .76rem; color: var(--muted); margin: 8px 0 0; }
.legal-box {
  white-space: pre-wrap;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--ink);
}
textarea { min-height: 160px; resize: vertical; }
.demo-dim .note-box label { display: block; margin: 0 0 10px; font-weight: 700; font-size: .88rem; }
.demo-dim .note-box input {
  width: 100%;
  margin-top: 4px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: var(--input-bg);
  color: var(--ink);
}
.demo-dim .note-box {
  max-height: min(88dvh, calc(100dvh - 24px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.demo-dim .note-body {
  margin-bottom: 8px;
  overflow: visible;
  flex: none;
  min-height: auto;
  white-space: normal;
}
.note-dim[hidden] { display: none !important; }
.note-dim {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgba(23, 36, 31, .46);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.note-box {
  position: relative;
  width: min(440px, 100%);
  max-height: min(88dvh, calc(100dvh - 24px));
  margin: auto;
  display: flex;
  flex-direction: column;
  background: var(--card-solid);
  border-radius: 22px;
  padding: 22px 20px 16px;
  box-shadow: 0 22px 50px rgba(16, 24, 40, .28);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.note-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.note-x:active { background: var(--hover, rgba(0,0,0,.06)); }
.note-when {
  margin: 0 0 6px;
  padding-right: 40px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.note-box h2 { margin: 0 0 10px; padding-right: 40px; font-size: 1.2rem; flex-shrink: 0; }
.note-body {
  white-space: pre-wrap;
  margin: 0 0 16px;
  line-height: 1.45;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}
.note-box form { flex-shrink: 0; margin: 0; }
.note-box .note-close {
  min-height: 52px;
  font-size: 1.05rem;
}
body.note-open { overflow: hidden; }
body:has(.note-dim:not([hidden])) .menu-launch { display: none !important; }

.post-list { display: flex; flex-direction: column; gap: 8px; }
.post-month { margin-bottom: 14px; }
.post-month > summary span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
.post-month .post-item {
  background: var(--card-solid);
  box-shadow: none;
  border: 1px solid var(--line);
}
.post-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: center;
  padding: 13px 14px;
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: inherit;
}
.post-to { margin: 0; font-weight: 650; }
.post-subj { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.post-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
}
.post-kind {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  color: var(--navy-2);
}
.post-ok { color: var(--ok); font-weight: 650; }
.post-fail { color: var(--bad); font-weight: 650; }
.post-when { color: var(--muted); }
.letter-wrap {
  background: #d8cfc3;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.letter-frame {
  display: block;
  width: 100%;
  min-height: 78vh;
  border: 0;
  background: #fffdf9;
  border-radius: 4px;
}
@media (max-width: 640px) {
  .post-item { grid-template-columns: 1fr; }
  .post-meta { align-items: flex-start; }
}

.pick-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.pick-col { width: 2.2rem; text-align: center; }
.check.pick { margin: 0; justify-content: center; }
.check.pick input { margin: 0; }

.rate-hist {
  margin: 0 0 8px;
  padding: 0 0 0 1.1rem;
  color: var(--muted);
  font-size: .9rem;
}
.rate-hist li { margin: 2px 0; }

.plan-cycles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.plan-cycles form { margin: 0; }
.plan-nav { margin-bottom: 8px; }
.plan-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.plan-day { border: 2px solid var(--line); }
.plan-day.is-today { outline: 0; box-shadow: 0 0 0 2px var(--navy-2); }
.plan-day.is-weekend { opacity: .88; }
.plan-day.st-wait, .plan-col.st-wait, .plan-today.st-wait { border-color: #3d8bd4; }
.plan-day.st-ok, .plan-col.st-ok, .plan-today.st-ok { border-color: var(--ok); }
.plan-day.st-no, .plan-col.st-no, .plan-today.st-no { border-color: var(--bad); }
.plan-day.st-open, .plan-col.st-open, .plan-today.st-open { border-color: #c4892a; }
.plan-shifts { list-style: none; margin: 0; padding: 0; }
.plan-shifts li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.plan-shifts li:first-child { border-top: 0; padding-top: 0; }
.plan-shifts strong { display: block; color: var(--ink); }
.plan-shifts span, .plan-shifts em { display: block; color: var(--ink); font-style: normal; }
.staff-box textarea { min-height: 110px; }
.staff-docs { list-style: none; margin: 0; padding: 0; }
.staff-docs li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.staff-docs li:first-child { border-top: 0; }
.staff-docs span { color: var(--muted); font-size: .9rem; }
.plan-today { margin-top: 28px; border: 2px solid var(--line); }
.plan-today .span-list { margin: 8px 0 0; }
.plan-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.plan-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 5px 0 12px;
  vertical-align: -1px;
}
.dot.wait { background: #2b6cb0; }
.dot.ok { background: var(--ok); }
.dot.no { background: var(--bad); }
.dot.open { background: #b7791f; }
.roster-wrap {
  overflow: auto;
  margin: 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-solid);
}
.roster {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}
.roster th, .roster td {
  border: 1px solid var(--line);
  padding: 6px;
  vertical-align: top;
  min-width: 112px;
  height: 78px;
  background: var(--card-solid);
  color: var(--ink);
}
.roster thead th {
  text-align: center;
  font-weight: 700;
  height: auto;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-2);
}
.roster thead th strong { display: block; text-transform: capitalize; }
.roster thead th span { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; }
.roster .roster-name {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 148px;
  max-width: 180px;
  text-align: left;
  font-weight: 750;
  background: var(--card-solid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roster thead .roster-name { z-index: 4; background: var(--bg-2); }
.roster td.is-today, .roster thead th.is-today { box-shadow: inset 0 3px 0 var(--navy-2); }
.roster td.is-weekend, .roster thead th.is-weekend { background: var(--bg-2); }
.shift-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 16px 5px 7px;
  margin: 0 0 4px;
  color: var(--ink);
}
.shift-card strong {
  display: block;
  font-size: .78rem;
  font-weight: 800;
  color: var(--ink);
}
.shift-card em {
  display: block;
  font-style: normal;
  font-size: .68rem;
  color: var(--ink);
  opacity: .88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shift-card .st-mark {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--line);
}
.shift-card.wait { background: rgba(61, 139, 212, .22); border-color: #3d8bd4; }
.shift-card.ok { background: rgba(44, 122, 86, .22); border-color: var(--ok); }
.shift-card.no { background: rgba(180, 35, 24, .22); border-color: var(--bad); }
.shift-card.open, .shift-card.swap { background: rgba(196, 137, 42, .22); border-color: #c4892a; }
.shift-card.wait .st-mark { background: #3d8bd4; }
.shift-card.ok .st-mark { background: var(--ok); }
.shift-card.no .st-mark { background: var(--bad); }
.shift-card.open .st-mark, .shift-card.swap .st-mark { background: #c4892a; }
.shift-card .chip-acts { display: none; }
.shift-card:hover .chip-acts { display: flex; }
.plan-week-wrap { overflow-x: auto; padding-bottom: 8px; }
.plan-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 6px;
  min-width: 820px;
  margin-bottom: 12px;
}
.plan-col {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  min-height: 132px;
  box-shadow: var(--shadow);
}
.plan-col header {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  margin-bottom: 6px;
  text-transform: capitalize;
}
.plan-col.is-today { box-shadow: 0 0 0 2px var(--navy-2); }
.plan-col.is-weekend { opacity: .92; }
.plan-col.is-out { opacity: .5; }
.shift-chip {
  border-radius: 10px;
  padding: 6px 8px;
  margin-bottom: 6px;
  font-size: .8rem;
  background: transparent;
  border: 0;
  border-left: 4px solid var(--line);
  color: var(--ink);
}
.shift-chip.wait { border-left-color: #3d8bd4; background: transparent; }
.shift-chip.ok { border-left-color: var(--ok); background: transparent; }
.shift-chip.no { border-left-color: var(--bad); background: transparent; }
.shift-chip.open, .shift-chip.swap { border-left-color: #c4892a; background: transparent; }
.shift-chip strong,
.shift-chip span,
.shift-chip em {
  display: block;
  font-style: normal;
  color: var(--ink);
}
.chip-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-acts form { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip-acts .linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}
.plan-tools { margin-top: 12px; }
.plan-tools summary { cursor: pointer; font-weight: 700; }
.plan-add { padding: 10px 12px; margin: 0 0 10px; }
.plan-add-title {
  margin: 0 0 8px;
  font-size: .82rem;
  font-weight: 800;
}
.plan-add-title span { font-weight: 500; color: var(--muted); margin-left: 8px; }
.plan-add-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr .8fr .8fr;
  gap: 8px 10px;
  align-items: end;
}
.plan-add-grid label { margin: 0; font-size: .78rem; }
.plan-add-grid input, .plan-add-grid select { min-height: 38px; }
.plan-add.is-ready { box-shadow: 0 0 0 2px var(--navy-2); }
.plan-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 0 0 16px;
}
.plan-extra form { display: flex; gap: 8px; align-items: end; margin: 0; }
.plan-board { display: flex; flex-direction: column; gap: 8px; }
.plan-board-day {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px 4px;
}
.plan-board-day.is-today { box-shadow: inset 3px 0 0 var(--navy-2); }
.plan-board-day.is-weekend { background: var(--bg-2); }
.plan-board-head {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-transform: capitalize;
  cursor: pointer;
}
.plan-board-people { list-style: none; margin: 0; padding: 0; }
.plan-board-people li {
  display: grid;
  grid-template-columns: minmax(108px, 16%) 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.plan-board-who { font-size: .86rem; font-weight: 700; padding-top: 6px; color: var(--ink); }
.plan-board-slots { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; min-height: 36px; }
.plan-slot-add {
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
}
.plan-slot-add:hover, .plan-board-head:hover { color: var(--navy); border-color: var(--navy); }
.plan-month-pick { margin: 0 0 10px; max-width: 220px; }
.plan-month { display: flex; flex-direction: column; gap: 4px; }
.plan-month-head,
.plan-month-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.plan-month-head span {
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 0;
}
.plan-month-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 118px;
  max-height: 168px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-solid);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.plan-month-cell strong { font-size: .82rem; }
.plan-month-cell em {
  display: block;
  width: 100%;
  font-style: normal;
  font-size: .66rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
}
.plan-month-cell em.wait { color: #7eb6e8; }
.plan-month-cell em.ok { color: var(--ok); }
.plan-month-cell em.no { color: var(--bad); }
.plan-month-cell em.open, .plan-month-cell em.swap { color: #e0b15a; }
.plan-month-cell.is-today { box-shadow: inset 0 0 0 2px var(--navy-2); }
.plan-month-cell.is-weekend { background: var(--bg-2); }
.plan-month-cell.is-out { opacity: .38; }
.plan-month-cell:hover { border-color: var(--navy); }
@media (max-width: 720px) {
  .plan-add-grid { grid-template-columns: 1fr 1fr; }
  .plan-board-people li { grid-template-columns: 1fr; gap: 4px; }
}
.note-box { min-height: 88px; }
.note-pre { white-space: pre-wrap; margin: 8px 0 0; color: var(--ink); }
.price-fields {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 8px;
}
.price-line {
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.price-line .row-btns { margin-top: 8px; }
@media (max-width: 640px) {
  .staff-docs li { grid-template-columns: 1fr auto; }
  .staff-docs span { grid-column: 1 / -1; }
  .price-fields { grid-template-columns: 1fr 1fr; }
}
