:root {
  --ems-royal: #1a56a8;
  --ems-royal-dark: #0c2d5c;
  --ems-royal-darker: #071a33;
  --amber: #e8a317;
  --text: #212121;
  --muted: #546e7a;
  --card: #ffffff;
  --page: #eef4fc;
  --ok: #1b5e20;
  --bad: #b71c1c;
  --wait: #e65100;
  --radius: 16px;
  --font-display: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --tap: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--page);
  line-height: 1.45;
}

.shell {
  background: linear-gradient(180deg, var(--ems-royal-darker), var(--ems-royal-dark));
  color: #fff;
  padding: 1.15rem 1.2rem 1.6rem;
}

.shell h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.02em;
  margin: 0.15rem 0 0;
  color: #fff;
}

.shell p {
  margin: 0.25rem 0 0;
  color: #d6e6ff;
}

.brand {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}

.dash-body .brand {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
  line-height: 1.25;
  max-width: 16rem;
}

main {
  margin: -0.85rem 1rem 2rem;
  display: grid;
  gap: 0.9rem;
}

.card {
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: 0 8px 24px rgb(10 22 40 / 0.12);
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.card p,
.card li {
  color: var(--text);
  font-size: 0.95rem;
}

.muted {
  color: var(--muted);
}

.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--wait);
}

.dot.ok {
  background: var(--ok);
}

.dot.bad {
  background: var(--bad);
}

.scheme-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.scheme-list li {
  background: #e8f0fb;
  color: var(--ems-royal-dark);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-weight: 600;
  font-size: 0.9rem;
}

code {
  font-size: 0.85rem;
  background: #eef2f6;
  color: var(--text);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.install {
  display: none;
}

.install.show {
  display: block;
}

.a2hs-card {
  color: var(--text);
}

.a2hs-card h2,
.a2hs-card p,
.a2hs-card strong {
  color: var(--text);
}

.a2hs-card .muted,
.a2hs-help {
  color: var(--muted);
}

.a2hs-card #a2hs-btn {
  width: 100%;
  margin-top: 0.45rem;
  background: var(--ems-royal);
  color: #fff;
}

button {
  appearance: none;
  border: 0;
  background: var(--ems-royal);
  color: #fff;
  font: inherit;
  font-weight: 700;
  min-height: var(--tap);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.shell-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #7eb8ff;
  color: #fff;
  min-height: 2.4rem;
  padding: 0.4rem 0.75rem;
  flex-shrink: 0;
}

.btn-secondary {
  background: #455a64;
  color: #fff;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.tab {
  background: #e8f0fb;
  color: var(--ems-royal-dark);
  min-height: var(--tap);
}

.tab.is-active {
  background: var(--ems-royal);
  color: #fff;
}

.tabs-card {
  color: var(--text);
}

.tabs-card form > button {
  width: 100%;
  margin-top: 0.35rem;
}

label {
  display: block;
  margin: 0.7rem 0;
  font-weight: 600;
  color: var(--text);
}

input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  min-height: var(--tap);
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

textarea {
  min-height: 5rem;
}

.form-error {
  color: var(--bad);
  font-weight: 700;
}

.form-ok {
  color: var(--ok);
  font-weight: 700;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.stats-summary-row {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.stat-card {
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.7rem 0.65rem;
  box-shadow: 0 8px 24px rgb(10 22 40 / 0.12);
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stat-value {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.05;
  color: var(--text);
}

.btn-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

#period-nav {
  align-items: center;
}

#period-nav strong {
  flex: 1 1 8rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text);
}

.rota-week-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
}

.rota-week-nav.btn-row button {
  flex: 0 0 auto;
  width: auto;
  min-height: 2.25rem;
  padding: 0.32rem 0.7rem;
  background: #fff;
  color: #212121;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.2;
  white-space: nowrap;
}

.rota-week-nav strong {
  flex: 1 1 auto;
  margin: 0;
  text-align: center;
  font-size: clamp(0.75rem, 2.6vw, 0.95rem);
  font-weight: 700;
  line-height: 1.25;
  color: #212121;
  white-space: nowrap;
}

.btn-row button {
  flex: 1 1 8rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.wait-banner {
  background: #fff8e1;
  color: #5d4037;
  font-weight: 700;
}

.choice-set {
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  margin: 0.35rem 0 0.75rem;
  padding: 0.45rem 0.7rem 0.65rem;
  background: #fff;
}

.choice-set legend,
.choice {
  color: #212121;
}

.choice-set legend {
  font-weight: 800;
  padding: 0 0.25rem;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.28rem 0;
  font-weight: 600;
}

.choice-set .choice {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: 0.7rem;
  align-items: start;
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.4rem 0.15rem;
  border-radius: 8px;
  font-weight: 600;
  line-height: 1.35;
  color: #212121;
  cursor: pointer;
}

.choice-set .choice + .choice {
  margin-top: 0.2rem;
}

.choice-set .choice span {
  min-width: 0;
  color: #212121;
  overflow-wrap: break-word;
}

.choice-set .choice input[type="radio"] {
  -webkit-appearance: radio;
  appearance: auto;
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  max-width: 1.25rem;
  min-height: 1.25rem;
  max-height: 1.25rem;
  margin: calc((1.35em - 1.25rem) / 2) 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  justify-self: start;
  align-self: start;
  accent-color: #1a56a8;
  cursor: pointer;
}

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

.incident-list li {
  border-bottom: 1px solid #eceff1;
  padding: 0.5rem 0;
  color: var(--text);
}

.incident-list li:last-child {
  border-bottom: 0;
}

.incident-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.incident-actions button {
  flex: 0 0 auto;
  min-height: 2.2rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  background: #eceff1;
  color: #212121;
}

.incident-actions .incident-delete {
  color: #b71c1c;
}

.dash-body {
  padding-bottom: 1rem;
}

.dash-chrome {
  position: sticky;
  top: 0;
  z-index: 8;
}

.shell-compact {
  padding: 0.7rem 1rem 0.85rem;
}

.shell-compact h1 {
  font-size: 1.45rem;
}

.dash-main {
  margin: 0.75rem 1rem 2rem;
  display: grid;
  gap: 0.75rem;
}

[hidden] {
  display: none !important;
}

.tab-panel {
  display: grid;
  gap: 0.7rem;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
  margin: 0;
}

.panel-lead {
  margin: -0.25rem 0 0;
  font-size: 0.9rem;
}

.dash-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0.37rem 0.58rem 0.53rem;
  background: var(--card);
  color: var(--text);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 18px rgb(10 22 40 / 0.1);
}

.dash-tab-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.25rem;
}

.tab-handle {
  display: none;
  align-self: center;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  min-height: 1.21rem;
  height: 1.21rem;
  padding: 0;
  background: transparent;
  color: #546e7a;
}

.tab-chevron {
  width: 1.21rem;
  height: 1.21rem;
  display: block;
}

.dash-tabs.is-expanded .tab-chevron {
  transform: rotate(180deg);
}

.tab-handle.has-more {
  position: relative;
  color: #1a56a8;
}

.tab-handle.has-more::after {
  content: "";
  position: absolute;
  top: 0.05rem;
  right: 0.55rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #1a56a8;
}

.dash-tab {
  flex: 1 1 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 46px;
  min-width: 0;
  padding: 0.37rem 0.47rem;
  background: transparent;
  color: var(--ems-royal-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.tab-icon {
  width: 1.26rem;
  height: 1.26rem;
  display: block;
}

.dash-tab.is-active {
  background: var(--ems-royal);
  color: #fff;
}

.stats-row-2 {
  grid-template-columns: 1fr 1fr;
  margin: 0.55rem 0 0;
}

.chip {
  background: #e8f0fb;
  color: var(--ems-royal-dark);
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  min-height: 2.4rem;
  flex: 1 1 auto;
}

.chip.is-active {
  background: var(--ems-royal);
  color: #fff;
}

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

.bar-list li {
  margin: 0.4rem 0;
  color: var(--text);
}

.bar-list .bar {
  display: block;
  height: 8px;
  margin-top: 0.2rem;
  background: var(--ems-royal);
  border-radius: 99px;
}

.coming-list {
  color: var(--text);
}

.check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.check-label input {
  width: auto;
  min-height: 1.25rem;
  margin: 0.2rem 0 0;
}

.rota-day {
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.55rem;
  box-shadow: 0 8px 24px rgb(10 22 40 / 0.12);
  border: 2px solid transparent;
}

.rota-day.has-shifts {
  border-color: var(--amber);
  background: #fff8e6;
}

.rota-shift {
  border-top: 1px solid #eceff1;
  padding: 0.5rem 0.5rem;
  margin-top: 0.3rem;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  border-left: 6px solid var(--ems-royal);
}

.rota-shift.is-open {
  border-left-color: var(--amber);
  background: #fff3cd;
}

.rota-shift.is-mine {
  border-left-color: #1b5e20;
  background: #e8f5e9;
}

.rota-day h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #212121;
}

.rota-shift button {
  margin-top: 0.35rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  min-height: 2.4rem;
}

.rota-day h3,
.rota-shift strong {
  color: #212121;
}

.rota-day p,
.rota-shift p,
.rota-length {
  color: #546e7a;
}

.rota-length strong,
#duration-out {
  color: #212121;
}

.rota-desk {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #212121;
}

.more-links {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.more-link {
  width: 100%;
  background: #e8f0fb;
  color: var(--ems-royal-dark);
  text-align: left;
}

#past-events-wrap {
  margin-top: 0;
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  box-shadow: 0 8px 24px rgb(10 22 40 / 0.12);
}

#past-events-wrap summary {
  cursor: pointer;
  font-weight: 700;
  color: #212121;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}

.event-title-btn {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #212121;
  font-weight: 800;
  text-align: left;
}

.event-when {
  color: var(--muted);
}

.event-counts {
  color: var(--muted);
  font-size: 0.9rem;
}

.rsvp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.rsvp-row button {
  background: #e8f0fb;
  color: var(--ems-royal-dark);
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  min-height: 2.4rem;
}

.rsvp-row button.is-active {
  background: var(--ems-royal);
  color: #fff;
}

.rsvp-row button:disabled {
  opacity: 0.65;
  cursor: default;
}

.rag-green {
  border-left: 6px solid #1b5e20;
}

.rag-amber {
  border-left: 6px solid #e65100;
}

.rag-red {
  border-left: 6px solid #b71c1c;
}

.rag-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-right: 0.4rem;
}

.rag-pill.is-green {
  background: #e8f5e9;
  color: #1b5e20;
}

.rag-pill.is-amber {
  background: #fff3e0;
  color: #e65100;
}

.rag-pill.is-red {
  background: #ffebee;
  color: #b71c1c;
}

.rag-pill.is-none {
  background: #eceff1;
  color: #546e7a;
}

@media (max-width: 720px) {
  .dash-body {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .dash-body.tabs-expanded {
    padding-bottom: calc(8.8rem + env(safe-area-inset-bottom, 0px));
  }

  .dash-chrome {
    position: static;
  }

  .shell-compact {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 0.55rem 0.9rem 0.65rem;
  }

  .shell-compact h1 {
    font-size: 1.28rem;
  }

  .shell-compact p {
    font-size: 0.85rem;
  }

  .dash-main {
    margin: 0.7rem 0.8rem 1.2rem;
    gap: 0.65rem;
  }

  .dash-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0.16rem 0.26rem calc(0.32rem + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    background: #fff;
    color: #212121;
    box-shadow: 0 -6px 20px rgb(10 22 40 / 0.12);
    touch-action: none;
    overscroll-behavior: none;
  }

  .tab-handle {
    display: flex;
  }

  .dash-tab-more {
    display: none;
  }

  .dash-tabs.is-expanded .dash-tab-more {
    display: inline-flex;
  }

  .dash-tab {
    min-width: 0;
    min-height: 3.2rem;
    padding: 0.29rem 0.11rem 0.21rem;
    font-size: 0.68rem;
    border-radius: 10px;
  }

  .dash-tab[data-tab="fundraising"] span {
    font-size: 0.62rem;
    line-height: 1.05;
    text-align: center;
  }

  .stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .stats-summary-row {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }

  .stat-card {
    padding: 0.55rem 0.4rem;
  }

  .stat-value {
    font-size: 1.45rem;
  }

  .two-col:not(.time-pair) {
    grid-template-columns: 1fr;
  }

  .time-pair {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  #rota-create-card label,
  #incident-card label {
    margin: 0.5rem 0;
  }

  .rota-days {
    display: grid;
    gap: 0.4rem;
  }

  .rota-day {
    padding: 0.5rem 0.65rem;
    margin: 0;
  }

  .rota-week-nav {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
  }

  .rota-week-nav.btn-row button {
    flex: 0 0 auto;
    width: auto;
    min-height: 2.25rem;
    padding: 0.28rem 0.55rem;
    background: #fff;
    color: #212121;
  }

  .rota-week-nav strong {
    flex: 1 1 auto;
    text-align: center;
    font-size: clamp(0.72rem, 3.3vw, 0.9rem);
    color: #212121;
    white-space: nowrap;
  }

  .btn-row button {
    flex: 1 1 calc(50% - 0.3rem);
  }
}

@media (max-width: 340px) {
  .rota-week-nav strong {
    min-width: 0;
    white-space: normal;
    font-size: 0.72rem;
    line-height: 1.15;
  }
}

@media (max-width: 380px) {
  .stats-row {
    gap: 0.3rem;
  }

  .stat-label {
    font-size: 0.62rem;
  }

  .stat-value {
    font-size: 1.28rem;
  }
}

@media (min-width: 721px) {
  .more-links {
    display: none;
  }

  .dash-tab {
    flex-direction: row;
    gap: 0.35rem;
    font-size: 0.86rem;
    padding: 0.42rem 0.74rem;
  }
}

.shift-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--page);
  color: var(--text);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.shift-panel-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 0.85rem 1rem 2.5rem;
  display: grid;
  gap: 0.75rem;
}

.shift-close {
  justify-self: start;
  color: var(--text);
  background: #fff;
  border: 1px solid #cfd8dc;
}

.shift-panel .card h2,
.shift-panel label,
.shift-panel p,
.shift-panel .stat-value {
  color: var(--text);
}

.shift-panel .muted {
  color: var(--muted);
}

.shift-live-card {
  color: #212121;
}

.shift-live-hero {
  text-align: center;
  padding: 0.4rem 0 0.85rem;
}

.shift-live-hero h2 {
  margin: 0;
  font-size: 2.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #212121;
  text-align: center;
}

.shift-position {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #212121;
}

.shift-geo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #212121;
  font-weight: 700;
}

.shift-geo-led {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgb(183 28 28 / 0.18);
  background: #c62828;
}

.shift-geo-led.is-red {
  background: #c62828;
  box-shadow: 0 0 0 3px rgb(183 28 28 / 0.18);
}

.shift-geo-led.is-green {
  background: #2e7d32;
  box-shadow: 0 0 0 3px rgb(46 125 50 / 0.2);
}

#shift-geo-reason {
  margin: 0.35rem 0 0;
  color: #546e7a;
}

.shift-next-label {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #546e7a;
}

.shift-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.shift-step,
.shift-step-alt,
.shift-finish {
  width: 100%;
  flex: none;
  border-radius: 16px;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.shift-step {
  min-height: 3.7rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.shift-step-alt {
  min-height: 3.2rem;
  font-size: 1.1rem;
  font-weight: 800;
  background: #fff;
  color: #212121;
  border: 2px solid #455a64;
}

.shift-step-mobile {
  background: #ef6c00;
}

.shift-step-scene {
  background: #c62828;
}

.shift-step-clear {
  background: #1565c0;
}

.shift-step-home {
  background: #2e7d32;
}

.shift-step-stood {
  color: #b71c1c;
  border-color: #b71c1c;
}

.shift-step-next {
  color: #6a1b9a;
  border-color: #6a1b9a;
}

.shift-finish {
  margin-top: 1rem;
  min-height: 3.25rem;
  font-size: 1.15rem;
  font-weight: 800;
  background: #c62828;
  color: #fff;
}

.shift-sms-note {
  margin: 0.9rem 0 0;
  text-align: center;
  color: #546e7a;
  font-size: 0.88rem;
}

#shift-leg-note {
  color: #546e7a;
}

.card-subhead {
  margin: 1rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #212121;
}

#mileage-card h3,
#mileage-card label,
#mileage-card p,
#mileage-profile-form,
#shift-claim-card,
#shift-claim-card label,
#shift-claim-card p,
#shift-mileage-ask {
  color: #212121;
}

#mileage-card .muted,
#shift-claim-card .muted,
#shift-mileage-ask .muted,
#shift-claim-card .claim-privacy,
#shift-claim-card .claim-delete-note {
  color: #546E7A;
}

#shift-claim-card .claim-privacy strong {
  color: #212121;
  font-weight: 600;
}

#mileage-profile-form input[name="vehicle_make_model"],
#mileage-profile-form input[name="vehicle_registration"] {
  text-transform: uppercase;
}

#week-review-card {
  color: #212121;
}

#week-review-card h2,
#week-review-card h3,
#week-review-card p,
#week-review-card li {
  color: #212121;
}

#week-review-card > h2 {
  margin-bottom: 0.15rem;
  text-align: center;
}

#week-review-card #week-review-range {
  margin: 0 0 0.35rem;
  text-align: center;
  color: #212121;
  font-weight: 700;
}

#week-review-card .muted,
#week-review-card .stat-label {
  color: #546E7A;
}

#week-review-card .stat-value {
  color: #212121;
}

#week-review-card .stats-row {
  margin: 0.55rem 0 0.45rem;
}

#week-review-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0.7rem 0 0.25rem;
}

.week-review-events {
  margin: 0;
}

#mileage-profile-delete {
  margin-top: 0.55rem;
}

#shift-claim-card .claim-delete-note {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
}

.duty-home-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.duty-home-actions button {
  width: 100%;
}

#shift-claim-continue {
  margin-top: 0.75rem;
  width: 100%;
}

.shell-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  flex-shrink: 0;
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
}

.card-head-row h2 {
  margin: 0;
}

.shift-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.desk-sms-info-btn {
  width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff;
  color: #1a56a8;
  border: 2px solid #1a56a8;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.desk-sms-info-header {
  background: transparent;
  color: #fff;
  border-color: #7eb8ff;
}

.desk-sms-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.desk-sms-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgb(7 26 51 / 0.45);
}

.desk-sms-card {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-height: min(88vh, 40rem);
  overflow: auto;
  margin: 0;
  padding: 1rem 1.05rem 1.25rem;
  background: #fff;
  color: #212121;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 28px rgb(10 22 40 / 0.2);
}

.desk-sms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.desk-sms-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #212121;
}

.desk-sms-close {
  min-height: 2.4rem;
  padding: 0.35rem 0.75rem;
  background: #eef4fc;
  color: #212121;
  border: 1px solid #cfd8dc;
}

.desk-sms-lead,
.desk-sms-example-label,
.desk-sms-card p,
.desk-sms-card li,
.desk-sms-card strong {
  color: #212121;
}

.desk-sms-lead {
  margin: 0.55rem 0 0.7rem;
  font-size: 0.9rem;
}

.desk-sms-lead strong {
  color: #212121;
}

.desk-sms-example-label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #546e7a;
}

.desk-sms-example {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  background: #eef4fc;
  color: #212121;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.desk-sms-colours,
.desk-sms-codes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.desk-sms-colours {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.desk-sms-colours li,
.desk-sms-codes li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #212121;
  font-size: 0.92rem;
}

.desk-sms-colours li span:last-child,
.desk-sms-codes li span {
  color: #546e7a;
}

.desk-sms-colours strong {
  min-width: 3.4rem;
  color: #212121;
}

.desk-sms-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.desk-sms-dot-red {
  background: #c62828;
}

.desk-sms-dot-amber {
  background: #ef6c00;
}

.desk-sms-dot-green {
  background: #2e7d32;
}

.desk-sms-codes {
  display: grid;
  gap: 0.28rem;
}

.desk-sms-codes code {
  min-width: 4.6rem;
  background: #eef2f6;
  color: #212121;
  font-weight: 800;
  text-align: center;
}

@media (min-width: 640px) {
  .desk-sms-sheet {
    align-items: center;
  }

  .desk-sms-card {
    border-radius: 16px;
    margin: 1rem;
  }
}

.member-list li {
  padding: 0;
  border-bottom: 1px solid #eceff1;
}

.member-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #212121;
  text-align: left;
  min-height: var(--tap);
}

.member-row strong {
  color: #212121;
  font-size: 1rem;
}

.member-row .muted,
.member-sheet-card .muted,
#member-sheet-seen,
#member-sheet-jobs,
#member-sheet-level,
#member-sheet-role {
  color: #546e7a;
}

.member-sheet-card label,
.member-sheet-card .check-label {
  color: #212121;
}

.member-sheet-card .stat-card {
  background: #fff;
  color: #212121;
}

.member-sheet-card .stat-label {
  color: #546e7a;
}

.member-sheet-card .stat-value {
  color: #212121;
}

#panel-checks .card h2,
#panel-checks .card p,
#panel-checks .card li,
#panel-checks .panel-title {
  color: #212121;
}

#panel-checks .muted,
#checks-intro,
#checks-mine-status,
#checks-roster-status {
  color: #546e7a;
}

#checks-roster .member-row,
#checks-attention .member-row {
  color: #212121;
}

.checks-sheet-card h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 1rem;
  color: #212121;
}

.checks-sheet-card label,
.checks-sheet-card .check-label,
.checks-sheet-card textarea,
.checks-sheet-card input {
  color: #212121;
}

.checks-sheet-card .muted,
#checks-sheet-who,
#checks-sheet-rag {
  color: #546e7a;
}

#checks-form input:disabled,
#checks-form textarea:disabled,
#checks-form select:disabled {
  color: #212121;
  opacity: 1;
  background: #f4f7fb;
}

#checks-kit-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0.35rem 0 0.65rem;
}

.checks-kit h3,
.checks-kit-cat,
.checks-kit-item,
.checks-kit-name {
  color: #212121;
}

.checks-kit-cat {
  width: 100%;
  margin: 0.8rem 0 0;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

#checks-kit-list > .checks-kit-cat:first-child {
  margin-top: 0.1rem;
}

.checks-kit-item {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: 0.7rem;
  align-items: start;
  width: 100%;
  min-height: 2.5rem;
  margin: 0;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: #212121;
  cursor: pointer;
}

.checks-kit-item:hover,
.checks-kit-item:focus-within {
  background: #f4f7fb;
}

.checks-kit-item:has(input:disabled) {
  cursor: default;
  opacity: 1;
  color: #212121;
}

.checks-kit-item:has(input:disabled):hover {
  background: transparent;
}

.checks-kit-item input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: auto;
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  max-width: 1.25rem;
  min-height: 1.25rem;
  margin: calc((1.35em - 1.25rem) / 2) 0 0;
  padding: 0;
  border: 0;
  border-radius: 0.15rem;
  background: transparent;
  box-shadow: none;
  justify-self: start;
  align-self: start;
  accent-color: #1a56a8;
  cursor: pointer;
}

.checks-kit-item input[type="checkbox"]:disabled {
  opacity: 1;
  cursor: default;
}

.checks-kit-item input[type="checkbox"]:disabled + .checks-kit-text,
.checks-kit-item input[type="checkbox"]:disabled + .checks-kit-text .checks-kit-name {
  color: #212121;
  opacity: 1;
}

.checks-kit-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  color: #212121;
}

.checks-kit-name {
  display: block;
  color: #212121;
  overflow-wrap: break-word;
}

.checks-kit-note {
  display: block;
  margin-top: 0.08rem;
  color: #546e7a;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.kit-ok {
  color: #1b5e20;
  font-weight: 800;
}

.kit-wait {
  color: #212121;
  font-weight: 700;
}

.kit-bad {
  color: #b71c1c;
  font-weight: 800;
}

#member-remove {
  margin-top: 0.45rem;
  background: #b71c1c;
  color: #fff;
}

.dash-tab[data-tab="checks"] span {
  text-align: center;
  line-height: 1.15;
}

@media (max-width: 640px) {
  .shell:not(.shell-compact) {
    padding: 1rem 1rem 1.35rem;
  }

  .shell:not(.shell-compact) h1 {
    font-size: 1.7rem;
  }

  main:not(.dash-main) {
    margin: -0.7rem 0.8rem 1.5rem;
  }
}

.duty-book-card {
  background: linear-gradient(165deg, #0c2d5c 0%, #1a56a8 72%);
  color: #fff;
}

.duty-book-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.duty-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d6e4f5;
}

.duty-book-card h2 {
  margin: 0.05rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.01em;
  color: #fff;
}

.duty-book-card .duty-status-line {
  margin: 0.15rem 0;
  color: #fff;
  font-weight: 700;
}

.duty-book-card #next-shift,
.duty-book-card .muted {
  color: #d6e4f5;
}

.duty-book-card .form-ok {
  color: #c8e6c9;
}

.duty-start-btn {
  background: #fff;
  color: #0c2d5c;
  font-size: 1.05rem;
  font-weight: 800;
}

#continue-tracking.duty-start-btn {
  background: #e8f5e9;
  color: #1b5e20;
}

.duty-book-card .btn-secondary {
  background: #eef4fc;
  color: #0c2d5c;
}

.duty-book-card.is-live {
  background: linear-gradient(165deg, #1b5e20 0%, #2e7d32 72%);
  color: #fff;
}

.duty-book-card.is-live h2,
.duty-book-card.is-live .duty-elapsed,
.duty-book-card.is-live .duty-booked-line {
  color: #fff;
}

.duty-elapsed {
  margin: 0.15rem 0 0.2rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.duty-booked-line {
  margin: 0.15rem 0 0.55rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
}

.duty-cat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.35rem 0 0.75rem;
}

.duty-cat {
  margin: 0;
  background: #fff;
  color: #212121;
  border-radius: 12px;
  padding: 0.4rem 0.2rem 0.45rem;
  text-align: center;
}

.duty-book-card .duty-cat,
.duty-book-card .duty-cat-label,
.duty-book-card .duty-cat-count {
  color: #212121;
}

.duty-cat-label,
.duty-cat-count {
  display: block;
  color: #212121;
  font-weight: 800;
}

.duty-cat-label {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.duty-cat-count {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.duty-book-card.is-live #continue-tracking.duty-start-btn {
  background: #fff;
  color: #1b5e20;
}

#duty-card.duty-book-card.is-live {
  background: #1B8A4A;
  color: #fff;
  border-radius: 18px;
  padding: 0.85rem 1rem 0.95rem;
}

#duty-card.duty-book-card.is-live .duty-book-top {
  display: none;
}

#duty-card.duty-book-card.is-live p,
#duty-card.duty-book-card.is-live .duty-booked-line,
#duty-card.duty-book-card.is-live .duty-call-type,
#duty-card.duty-book-card.is-live .duty-live-reminder,
#duty-card.duty-book-card.is-live .duty-elapsed,
#duty-card.duty-book-card.is-live .duty-pill-count {
  color: #fff;
}

#duty-card .duty-live-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

#duty-card .duty-live-cluster {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
}

#duty-card .duty-live-dot {
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.28rem;
  border-radius: 50%;
  background: #b9f6ca;
  flex: none;
}

#duty-card .duty-booked-line,
#duty-card .duty-call-type {
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
}

#duty-card .duty-call-type {
  font-weight: 600;
  font-size: 0.95rem;
}

#duty-card .duty-live-reminder {
  margin: 0;
  max-width: 9rem;
  text-align: right;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  flex: none;
}

#duty-card.duty-book-card.is-live .duty-elapsed {
  margin: 0.4rem 0 0.5rem;
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  line-height: 1;
}

#duty-card .duty-cat-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.7rem;
  margin: 0.15rem 0 0.8rem;
}

#duty-card .duty-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  background: transparent;
}

#duty-card .duty-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

#duty-card .duty-chip-c1 { background: #d32f2f; color: #fff; }
#duty-card .duty-chip-c2 { background: #ef6c00; color: #fff; }
#duty-card .duty-chip-c3 { background: #1565c0; color: #fff; }
#duty-card .duty-chip-sd { background: #6a1b9a; color: #fff; }

#duty-card .duty-pill-count {
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#duty-card.duty-book-card.is-live .duty-home-actions {
  flex-direction: row;
  gap: 0.6rem;
}

#duty-card.duty-book-card.is-live .duty-home-actions .duty-add-call,
#duty-card.duty-book-card.is-live .duty-home-actions .duty-book-off {
  width: auto;
  flex: 1;
}

#duty-card.duty-book-card.is-live .duty-add-call {
  background: #fff;
  color: #212121;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

#duty-card.duty-book-card.is-live .duty-book-off {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-weight: 700;
}

@media (max-width: 340px) {
  #duty-card .duty-cat-row {
    flex-wrap: wrap;
  }
}

.shift-pick {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  color: #212121;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

.shift-pick strong {
  color: #212121;
  font-size: 1rem;
}

.shift-pick span {
  display: block;
  margin-top: 0.15rem;
  color: #546e7a;
  font-size: 0.9rem;
}

.shift-pick.is-open {
  border-color: #1b5e20;
}

.shift-jobs {
  list-style: none;
  margin: 0.35rem 0 0.15rem;
  padding: 0 0 0 0.15rem;
}

.shift-jobs li {
  color: #212121;
  font-size: 0.92rem;
  padding: 0.28rem 0;
  border-bottom: 0;
}

.shift-jobs .muted {
  color: #546e7a;
}

.shift-empty {
  color: #212121;
}

.shift-back {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.7rem;
  padding: 0.35rem 0.9rem;
  min-height: 2.4rem;
  background: #eceff1;
  color: #212121;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

#past-shifts-card h2,
#past-shifts-card .shift-empty,
#shift-open-card h2,
#shift-open-card li,
#shift-open-card .shift-empty {
  color: #212121;
}

#past-shifts-card > .muted,
#past-shifts-card .shift-pick span,
#shift-open-card .muted {
  color: #546e7a;
}

.mileage-claim-card {
  padding: 0.75rem 0.9rem;
}

.mileage-claim-card h2,
.mileage-claim-card p {
  color: #212121;
}

.mileage-short,
.mileage-saved-sub {
  margin: 0.15rem 0 0.55rem;
  color: #546e7a;
  font-size: 0.88rem;
  line-height: 1.35;
}

.mileage-saved-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #212121;
  font-weight: 800;
}

.mileage-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
}

.mileage-saved-sub {
  margin: 0.25rem 0 0.45rem 1.8rem;
}

#mileage-card button {
  min-height: 2.15rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.9rem;
}

#mileage-card.is-saved button {
  background: transparent;
  color: #1a56a8;
  min-height: 1.8rem;
  padding: 0;
}

#mileage-card.is-return #mileage-return {
  width: 100%;
  margin: 0;
  padding: 0.1rem 0;
  min-height: 0;
  background: transparent;
  color: #212121;
  text-align: left;
  border-radius: 0;
}

.mileage-return-title {
  display: block;
  color: #212121;
  font-weight: 800;
  font-size: 1.05rem;
}

.mileage-return-miles {
  display: block;
  margin-top: 0.2rem;
  color: #546e7a;
  font-weight: 700;
}

.mileage-points {
  margin: 0.35rem 0 0.85rem;
  padding-left: 1.15rem;
  color: #212121;
}

.mileage-points li {
  margin: 0.28rem 0;
  color: #212121;
}

.stat-card-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 2px solid transparent;
  background: #fff;
  color: #212121;
  font: inherit;
  box-shadow: 0 8px 24px rgb(10 22 40 / 0.12);
  cursor: pointer;
}

.stat-card-btn .stat-label {
  color: #546e7a;
}

.stat-card-btn .stat-value {
  color: #212121;
}

.stat-hint {
  margin: 0.25rem 0 0;
  color: #1a56a8;
  font-size: 0.75rem;
  font-weight: 700;
}

.stat-card-btn:hover,
.stat-card-btn:focus-visible {
  border-color: #1a56a8;
}

#panel-stats {
  gap: 1rem;
}

.stats-period-card h2,
.stats-period-card label,
.stats-period-card strong {
  color: #212121;
}

.stats-period-card h2 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 0.65rem;
}

.stats-period-card .muted,
.period-jump {
  color: #546e7a;
}

.stats-toolbar {
  display: grid;
  gap: 0.4rem;
}

.stats-period-card .chip,
.stats-period-card .period-step {
  min-height: 2rem;
  padding: 0.15rem 0.65rem;
  font-size: 0.84rem;
  border-radius: 999px;
}

.stats-period-card .period-step {
  min-width: 2.2rem;
  padding: 0;
  background: #e8f0fb;
  color: #0c2d5c;
  font-size: 1.25rem;
  line-height: 1;
}

.stats-period-card .period-nav strong {
  font-size: 0.92rem;
}

.stats-period-card select {
  min-height: 2rem;
  margin-top: 0.2rem;
}

.home-glance .stat-card,
.home-glance .stat-card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 5.2rem;
  text-align: center;
}

.home-glance .stat-label,
.home-glance .stat-value {
  width: 100%;
  text-align: center;
}

.stats-summary-row,
#week-review-card .stats-row {
  align-items: stretch;
}

.stats-summary-row .stat-card,
#week-review-card .stats-row .stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 4.75rem;
  padding: 0.75rem 0.55rem;
  text-align: center;
  background: #fff;
  color: #212121;
}

.stats-summary-row .stat-label,
#week-review-card .stats-row .stat-label {
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: center;
  letter-spacing: 0;
  color: #546e7a;
}

.stats-summary-row .stat-value,
#week-review-card .stats-row .stat-value {
  width: 100%;
  margin: 0.2rem 0 0;
  padding: 0;
  text-align: center;
  color: #212121;
}

#stats-share-card h2,
#stats-share-card p,
#stats-share-card .stats-share-message {
  color: #212121;
}

#stats-share-card .muted {
  color: #546e7a;
}

.stats-share-message {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.8rem;
  background: #f4f7fb;
  border-radius: 10px;
  line-height: 1.4;
}

.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.segment .chip {
  flex: none;
  width: 100%;
  min-height: 2.5rem;
}

.period-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.period-step {
  flex: none;
  min-height: 2.5rem;
  padding: 0.35rem 0.8rem;
  background: #e8f0fb;
  color: #0c2d5c;
  font-size: 0.9rem;
}

.period-nav strong {
  flex: none;
  text-align: center;
  font-size: 0.95rem;
  color: #212121;
}

.period-jump {
  color: #212121;
}

.chart-split {
  display: grid;
  gap: 0.75rem;
  align-items: center;
}

.donut-wrap {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.donut {
  width: 7.25rem;
  height: 7.25rem;
  border-radius: 50%;
  background: #eceff1;
  -webkit-mask: radial-gradient(farthest-side, transparent 62%, #000 63%);
  mask: radial-gradient(farthest-side, transparent 62%, #000 63%);
}

.donut-caption {
  margin: 0;
  color: #212121;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
}

#team-insight-card h2,
#team-insight-card h3,
#team-insight-card p,
#team-insight-card li,
#team-insight-card .bar-list {
  color: #212121;
}

#team-insight-card .muted,
#team-insight-card .card-subhead {
  color: #546e7a;
}

#team-insight-card .card-subhead {
  color: #212121;
}

#scene-stats-card h2,
#scene-stats-card h3,
#scene-stats-card p,
#scene-stats-card li,
#scene-stats-card .bar-list {
  color: #212121;
}

#scene-stats-card .muted {
  color: #546e7a;
}

#scene-stats-card .card-subhead,
.scene-goodsam-value {
  color: #212121;
}

.scene-goodsam-value {
  margin: 0.15rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.05;
  font-weight: 800;
}

.scene-stack {
  display: flex;
  height: 0.85rem;
  margin: 0.65rem 0 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eceff1;
}

.scene-stack span {
  display: block;
  height: 100%;
  min-width: 0;
}

.bar-list .bar-meta {
  color: #546e7a;
  font-size: 0.82rem;
}

.bar-list .bar-pct {
  display: inline-block;
  margin-left: 0.45rem;
  color: #546e7a;
  font-size: 0.82rem;
}

.week-event {
  display: block;
  width: 100%;
  margin: 0.35rem 0;
  padding: 0.7rem 0.75rem;
  text-align: left;
  background: #f4f7fb;
  color: #212121;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  font: inherit;
}

.week-event strong {
  color: #212121;
}

.week-event .muted,
.week-event .event-counts {
  display: block;
  margin-top: 0.15rem;
  color: #546e7a;
}

.week-review-events li {
  border: 0;
  padding: 0;
}

#event-sheet .muted {
  color: #546e7a;
}

#event-sheet h3 {
  color: #212121;
}

.rota-jobs {
  margin: 0.25rem 0 0;
  color: #212121;
  font-weight: 700;
}

.rota-shift p.rota-goodsam-mark {
  margin: 0.25rem 0 0;
  color: #212121;
  font-weight: 700;
}

.rota-goodsam {
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: #fff;
  color: #212121;
  border: 1px solid #c5cae9;
}

.rota-goodsam strong,
.rota-goodsam span {
  color: #212121;
}

#rota-create-card h2,
#rota-create-card p,
#rota-create-card label,
#rota-event-form {
  color: #212121;
}

#rota-create-card .muted {
  color: #546e7a;
}

@media (min-width: 720px) {
  .stats-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .period-nav,
  .period-jump {
    grid-column: 1 / -1;
  }

  .chart-split {
    grid-template-columns: 8.5rem 1fr;
  }
}

#scheme-activity {
  color: #212121;
}

#scheme-activity > h2 {
  text-align: center;
}

#scheme-activity h2,
#scheme-activity p,
#scheme-activity li,
#scheme-activity label,
#scheme-activity strong {
  color: #212121;
}

#scheme-activity .muted,
#scheme-activity .scheme-activity-detail {
  color: #546e7a;
}

#scheme-activity .form-error {
  color: #b71c1c;
}

#scheme-activity .form-ok {
  color: #1b5e20;
}

#scheme-activity input {
  color: #212121;
  background: #fff;
}

#home-team-glance {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#home-team-glance .stat-label {
  color: #546e7a;
}

#home-team-glance .stat-value,
#gl-fundraised {
  color: #212121;
}

#gl-duty-card.is-on-duty {
  background: #1B8A4A;
  color: #fff;
}

#gl-duty-card.is-on-duty .stat-label,
#gl-duty-card.is-on-duty .stat-value {
  color: #fff;
}

#gl-fundraised {
  font-size: 1.15rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

#fundraising-card,
#fundraising-card h2,
#fundraising-card p,
#fundraising-card label,
#fundraising-card strong,
#fundraising-edit-card,
#fundraising-edit-card h2,
#fundraising-edit-card p,
#fundraising-edit-card label,
#fundraising-edit-card strong,
#fundraising-edit-card span,
#fundraising-months-card,
#fundraising-months-card h2,
#fundraising-months-card p,
#fundraising-months-card li,
#fundraising-months-card span,
#fundraising-years-card,
#fundraising-years-card h2,
#fundraising-years-card li,
#fundraising-years-card span,
#fundraising-entries-card,
#fundraising-entries-card h2,
#fundraising-entries-card p,
#fundraising-entries-card li,
#fundraising-entries-card span,
#panel-fundraising .panel-title,
#profile-photo-card,
#profile-photo-card h2,
#profile-photo-card p,
#profile-photo-card label {
  color: #212121;
}

#fundraising-card .muted,
#fundraising-edit-card .muted,
#fundraising-months-card .fundraising-year-label,
#panel-fundraising .panel-lead,
#profile-photo-card .muted {
  color: #546e7a;
}

#fundraising-card .form-error,
#fundraising-edit-card .form-error,
#profile-photo-card .form-error {
  color: #b71c1c;
}

#fundraising-card .form-ok,
#fundraising-edit-card .form-ok,
#fundraising-entries-card .form-ok,
#profile-photo-card .form-ok {
  color: #1b5e20;
}

#fundraising-card input,
#fundraising-edit-card input,
#fundraising-card select,
#fundraising-year,
#profile-photo-card input {
  color: #212121;
  background: #fff;
}

#fundraising-card input::placeholder,
#fundraising-edit-card input::placeholder {
  color: #546e7a;
  opacity: 1;
}

#fundraising-card .fundraising-who-select,
#fundraising-edit-card .fundraising-who-select,
#fundraising-card .fundraising-who-select option,
#fundraising-edit-card .fundraising-who-select option,
#fundraising-card .fundraising-who-custom,
#fundraising-edit-card .fundraising-who-custom,
#fundraising-card .fundraising-who-custom label,
#fundraising-edit-card .fundraising-who-custom label,
#fundraising-card .fundraising-who-custom input,
#fundraising-edit-card .fundraising-who-custom input {
  color: #212121;
  background: #fff;
}

#fundraising-card .fundraising-who-hint,
#fundraising-edit-card .fundraising-who-hint {
  display: block;
  margin: 0.35rem 0 0;
  color: #546e7a;
  font-weight: 400;
}

#fundraising-card .fundraising-who-custom input::placeholder,
#fundraising-edit-card .fundraising-who-custom input::placeholder {
  color: #546e7a;
  opacity: 1;
}

#fundraising-edit-card {
  scroll-margin-top: 4.75rem;
}

#fundraising-form {
  margin: 0.2rem 0 0;
}

.fundraising-year-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.fundraising-year-row h2 {
  margin: 0;
  color: #212121;
}

.fundraising-year-label {
  margin: 0;
  min-width: 6.5rem;
  font-weight: 700;
}

.fundraising-months,
.fundraising-years,
.fundraising-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.fundraising-total-row,
.fundraising-entry-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.fundraising-total-row {
  padding: 0.38rem 0;
  border-bottom: 1px solid #eceff1;
  color: #212121;
}

.fundraising-total-row:last-child,
.fundraising-entry:last-child {
  border-bottom: 0;
}

.fundraising-total-label,
.fundraising-total-amount,
.fundraising-entry-date,
.fundraising-entry-amount,
.fundraising-entry-note,
.fundraising-entry-who {
  color: #212121;
}

.fundraising-total-amount,
.fundraising-entry-amount,
.fundraising-entry-date {
  font-weight: 700;
}

.fundraising-total-row.is-selected {
  background: #e8f0fb;
  color: #212121;
}

.fundraising-total-row.is-selected .fundraising-total-label,
.fundraising-total-row.is-selected .fundraising-total-amount {
  color: #212121;
}

.fundraising-entry {
  padding: 0.55rem 0;
  border-bottom: 1px solid #eceff1;
  color: #212121;
}

.fundraising-entry-note,
.fundraising-entry-event,
.fundraising-entry-who {
  display: block;
  margin: 0.15rem 0 0;
  color: #212121;
}

#fundraising-entries-card .fundraising-entry-event {
  color: #546e7a;
}

.fundraising-entry-side {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  color: #212121;
}

#fundraising-entries-card .fundraising-entry-edit {
  color: #1a56a8;
  font-weight: 700;
  font-size: 0.88rem;
}

#fundraising-list .fundraising-entry.is-editable {
  padding: 0;
}

#fundraising-list .fundraising-entry-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #212121;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

#fundraising-list .fundraising-entry-open:hover,
#fundraising-list .fundraising-entry-open:focus-visible,
#fundraising-list .fundraising-entry.is-editing .fundraising-entry-open {
  background: #e8f0fb;
  color: #212121;
}

#fundraising-list .fundraising-entry-open .fundraising-entry-date,
#fundraising-list .fundraising-entry-open .fundraising-entry-amount,
#fundraising-list .fundraising-entry-open .fundraising-entry-note,
#fundraising-list .fundraising-entry-open .fundraising-entry-who,
#fundraising-list .fundraising-entry-open .fundraising-entry-side {
  color: #212121;
}

#fundraising-edit-form {
  margin: 0.2rem 0 0;
}

#fundraising-edit-save {
  background: #1a56a8;
  color: #fff;
}

#fundraising-edit-save:disabled,
#fundraising-edit-cancel,
#fundraising-edit-cancel:disabled {
  background: #455a64;
  color: #fff;
  opacity: 1;
}

#fundraising-empty {
  margin: 0.35rem 0 0;
  color: #212121;
}

.profile-photo-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.profile-photo-fields {
  min-width: 0;
  flex: 1 1 auto;
}

.avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  flex: 0 0 auto;
  overflow: hidden;
  display: inline-flex;
  background: #eceff1;
  border: 2px solid #37474f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23546e7a' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-3.3 0-8 1.7-8 5v1h16v-1c0-3.3-4.7-5-8-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 68%;
}

.avatar.has-photo {
  background-image: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.avatar-team {
  width: 3.1rem;
  height: 3.1rem;
}

.avatar-lg {
  width: 4.5rem;
  height: 4.5rem;
}

.member-sheet-head {
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.member-sheet-card .avatar-sheet {
  width: 5.5rem;
  height: 5.5rem;
  background-color: #eceff1;
}

.member-sheet-identity {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
}

.member-sheet-card .member-sheet-head #member-sheet-title {
  margin: 0;
  color: #212121;
  font-size: 1.85rem;
  line-height: 1.12;
  font-weight: 800;
}

.member-sheet-card .member-sheet-head #member-sheet-role,
.member-sheet-card .member-sheet-head #member-sheet-level,
.member-sheet-card .member-sheet-head #member-sheet-seen {
  margin: 0;
  color: #546e7a;
  font-size: 0.92rem;
  line-height: 1.25;
}

#member-list .member-row {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

#member-list .member-row-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 auto;
}

#member-list .member-meta {
  color: #546e7a;
  font-size: 0.88rem;
}

.scheme-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#scheme-activity .scheme-activity-list > li.scheme-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  border: 0;
  border-bottom: 0;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  color: #212121;
  background: rgba(33, 33, 33, 0.08);
}

#scheme-activity .scheme-activity-list > li.scheme-activity-item.is-fundraising {
  background: rgba(46, 125, 50, 0.22);
}

#scheme-activity .scheme-activity-list > li.scheme-activity-item.is-responder {
  background: rgba(21, 101, 192, 0.22);
}

#scheme-activity .scheme-activity-list > li.scheme-activity-item.is-event {
  background: rgba(239, 108, 0, 0.22);
}

#scheme-activity .scheme-activity-item,
#scheme-activity .scheme-activity-item .scheme-activity-text {
  color: #212121;
}

#scheme-activity .scheme-activity-item .scheme-activity-detail {
  color: #546e7a;
}

#scheme-activity .scheme-activity-item .avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.scheme-activity-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-top: 0.05rem;
  color: #1E3A8A;
}

.scheme-activity-icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.scheme-activity-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.rota-people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0.2rem 0 0;
}

.rota-person {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
  color: #212121;
}

.rota-person span {
  color: #212121;
  overflow-wrap: anywhere;
}

#fundraising-save,
#scheme-activity-more {
  width: 100%;
  margin-top: 0.35rem;
}

#fundraising-save,
#fundraising-edit-save {
  background: #1a56a8;
  color: #fff;
}

#fundraising-save:disabled,
#fundraising-edit-save:disabled {
  background: #455a64;
  color: #fff;
}

#scheme-activity-more {
  background: #455a64;
  color: #fff;
}

#scheme-activity-empty {
  margin: 0.35rem 0 0;
  color: #212121;
}

.scheme-activity-text {
  margin: 0;
  color: #212121;
  font-weight: 600;
}

.scheme-activity-detail {
  margin: 0.15rem 0 0;
  color: #546e7a;
  font-size: 0.9rem;
}

#past-shifts-card .card-head-row {
  flex-wrap: nowrap;
  align-items: center;
}

#past-shifts-card .card-head-row h2 {
  min-width: 0;
  color: #212121;
}

.goodsam-launch {
  flex: 0 0 auto;
  width: auto;
  min-height: 2.25rem;
  padding: 0.28rem 0.7rem;
  background: #455a64;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.2;
  white-space: nowrap;
}

#shift-open-card .btn-row {
  flex-wrap: nowrap;
  align-items: center;
}

#shift-open-card .btn-row #shift-add-incident {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

#shift-open-card .btn-row .goodsam-launch,
.rota-shift .goodsam-launch {
  flex: 0 0 auto;
  width: auto;
}

#rota-kind.segment {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#rota-kind .chip {
  white-space: nowrap;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  color: #0c2d5c;
}

#rota-kind .chip.is-active {
  color: #fff;
}

#goodsam-card,
#goodsam-card h2,
#goodsam-card label,
#goodsam-card legend,
#goodsam-card .choice,
#goodsam-card .choice span,
#goodsam-job-wrap,
#goodsam-job-wrap h3,
#goodsam-job-wrap li {
  color: #212121;
}

#goodsam-card .muted,
#goodsam-job-wrap .muted {
  color: #546e7a;
}

#goodsam-card .choice-set {
  background: #fff;
}
