.next-board, .next-board *, .next-editor, .next-editor * { box-sizing: border-box; }
body.next-active {
  background: #10181c !important;
  color: #edf4f2;
}
body.next-active .sidebar,
body.next-active .topbar,
body.next-active .summary,
body.next-active .planner-panel,
body.next-active .bottom-panels,
body.next-active .page-footer,
body.next-active #export-pdf { display: none !important; }
body.next-active .workspace {
  margin: 0 auto !important;
  width: min(1040px, 100%) !important;
  min-width: 0 !important;
}
body.next-active .workspace > main {
  max-width: none !important;
  padding: max(14px, env(safe-area-inset-top)) clamp(12px,4vw,36px) calc(86px + env(safe-area-inset-bottom)) !important;
}
body.next-active .page-heading {
  display: grid !important;
  grid-template-columns: minmax(0,1fr);
  gap: 10px 14px !important;
  margin-bottom: 14px !important;
  align-items: center;
}
body.next-active .page-heading h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 12px;
  font: 750 clamp(24px,5vw,36px)/1.05 system-ui, sans-serif !important;
  color: #edf4f2 !important;
  margin: 0;
}
body.next-active .page-heading h1 small { color: #a7c1bb; font: 600 12px/1.25 system-ui,sans-serif; }
body.next-active .heading-actions { grid-column: 1 / -1; margin: 0 !important; }
body.next-active #spv-top-controls { gap: 6px; }
body.next-active #spv-top-controls :is(.spv-top-button, .spv-save-indicator) { min-height: 38px; font-size: 11px; padding: 6px 8px; }
.next-board, .next-editor {
  --next-panel: #1a272c;
  --next-line: #3a5055;
  --next-text: #edf4f2;
  --next-muted: #b0c4c4;
  --next-accent: #a9ebc9;
}
.next-board { font: 500 15px/1.4 system-ui, sans-serif; color: var(--next-text); }
.next-board button, .next-editor button, .next-tools button, .next-back {
  appearance: none;
  border: 1px solid #3a5055;
  border-radius: 11px;
  min-height: 44px;
  padding: 7px 11px;
  background: #223338;
  color: #edf4f2;
  font: 650 14px/1.2 system-ui, sans-serif;
  cursor: pointer;
}
.next-board button:disabled, .next-editor button:disabled { opacity: .55; cursor: default; }
.next-board button:focus-visible, .next-editor button:focus-visible, .next-board input:focus-visible {
  outline: 2px solid #a9ebc9; outline-offset: 2px;
}
.next-board button[aria-pressed="true"], .next-editor button[aria-pressed="true"],
.next-board .next-primary, .next-editor .next-primary {
  background: #a9ebc9; color: #10251f; border-color: #a9ebc9;
}
.next-calendar { background: var(--next-panel); border: 1px solid var(--next-line); border-radius: 18px; padding: 8px; }
.next-week-nav { display: grid; grid-template-columns: 44px 1fr 44px; gap: 5px; margin-bottom: 6px; }
.next-week-nav button { background: transparent; border-color: transparent; }
.next-week-nav button:first-child, .next-week-nav button:last-child { font-size: 26px; }
.next-days, .next-views { display: grid; gap: 5px; }
.next-days { grid-template-columns: repeat(7,minmax(0,1fr)); }
.next-days button { padding: 4px 1px; min-height: 47px; font-size: 11px; }
.next-days strong { display: block; font-size: 15px; }
.next-views { grid-template-columns: repeat(4,minmax(0,1fr)); margin: 11px 0 14px; }
.next-views button { padding-inline: 4px; }
.next-summary { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.next-summary h2 { margin: 0; color: var(--next-text); font: 740 23px/1.2 system-ui,sans-serif; }
.next-summary span, .next-board small { color: var(--next-muted); }
.next-search, .next-editor input {
  display: block;
  width: 100%;
  min-height: 44px;
  background: #18262b;
  color: #edf4f2;
  border: 1px solid #465f66;
  border-radius: 10px;
  padding: 8px 12px;
  font: 500 16px/1.2 system-ui,sans-serif;
}
.next-search::placeholder, .next-editor input::placeholder { color: #afc3c5; opacity: 1; }
.next-list { display: grid; gap: 10px; margin-top: 12px; }
.next-list h3 { color: var(--next-text); margin: 0 0 6px; font: 720 15px/1.25 system-ui,sans-serif; }
.next-person, .next-week-card, .next-site-card {
  border: 1px solid var(--next-line);
  background: var(--next-panel);
  border-radius: 13px;
  padding: 9px 12px;
  min-width: 0;
}
.next-person { display: flex; align-items: center; gap: 10px; margin: 5px 0 0; }
.next-person-main { min-width: 0; flex: 1; }
.next-board .next-name { color: var(--next-text); background: transparent; border: 0; padding: 4px 0; min-height: 44px; text-align: left; font-size: 16px; }
.next-board .next-name:disabled { opacity: 1; }
.next-person-fields, .next-choices { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.next-board .next-location, .next-board .next-status { padding: 5px 8px; font-size: 12px; overflow-wrap: anywhere; min-height: 44px; }
.next-status::before { content: ''; background: #a9b9bc; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.next-status[data-status="site"]::before { background: #a9ebc9; }
.next-status[data-status="travel"]::before { background: #9bc9fb; }
.next-status[data-status="office"]::before { background: #cbbaf7; }
.next-status[data-status="off"]::before, .next-status[data-status="leave"]::before { background: #f1b6ca; }
.next-review, .next-extra { color: #ffce92; font-size: 12px; }
.next-person small { display: block; margin-top: 6px; overflow-wrap: anywhere; }
.next-site-card > p, .next-week-card > p { margin: 0 0 6px; }
.next-site-card a { display: block; color: #a9ebc9; width: fit-content; padding: 10px 0; }
.next-week-card button { margin-top: 8px; display: block; }
.next-site-card .next-person { background: #142025; }
.next-board .next-pick { min-width: 44px; }
.next-dock {
  position: fixed;
  z-index: 28;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px max(10px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
  background: #142025;
  border-top: 1px solid #3a5055;
}
.next-dock button { flex: 1; max-width: 200px; padding-inline: 5px; font-size: 13px; }
.next-editor, .next-tools { display: grid; gap: 10px; }
.next-editor label { display: grid; gap: 5px; }
.next-editor :is(label,.next-choices)[hidden], .next-board[hidden], .next-back[hidden] { display: none !important; }
.next-editor p { margin: 0; }
.next-editor .error-message:empty { display: none; }
.next-back { margin-bottom: 10px; }
@media (min-width: 740px) {
  .next-list:has(.next-site-card), .next-list:has(.next-week-card) { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .next-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .next-group > h3 { grid-column: 1 / -1; }
  .next-group .next-person { margin: 0; }
}

/* Test Version 3 entry and manager controls. */
html body #spv-demo-login { background: #17221f !important; }
html body #spv-demo-login .spv-login-card,
html body .spv-demo-auth-panel {
  background: #293a34 !important;
  border-color: #526b60 !important;
}
html body #spv-demo-login .spv-role-card {
  background: #30453d !important;
  border-color: #5b7468 !important;
}
html body #spv-demo-login .spv-login-card > .spv-test-title,
html body #spv-demo-login .spv-login-meta .spv-version-indicator,
html body #spv-demo-login .spv-role-card b { color: #d2e7d8 !important; }
html body #spv-demo-login #spv-worker-enter:not(:disabled),
html body .spv-demo-auth-panel button[type=submit] {
  background: #b6cebf !important;
  border-color: #b6cebf !important;
  color: #172921 !important;
}
html body #spv-user-menu #spv-menu-publish {
  background: #d9e7db !important;
  border: 1px solid #acc5b1 !important;
  color: #294b37 !important;
}
html body #spv-user-menu #spv-menu-publish:hover,
html body #spv-user-menu #spv-menu-publish:focus-visible { background: #c8decc !important; }

body:has(#spv-menu-publish) .toolbar-stack #spv-publish-main { display: none !important; }

.spv-save-exit-dialog > button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  margin: 8px 0 0;
}

.spv-release-dialog { width: min(520px, calc(100vw - 24px)); }
.spv-release-guide { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
.spv-release-guide :is(th,td) {
  padding: 9px 6px;
  border-bottom: 1px solid #667b75;
  text-align: left;
  vertical-align: top;
}

.spv-release-dialog > button { display: block; margin: 14px 0 0; width: 100%; min-height: 44px; }
