:root {
  --bg: #f4f7f8;
  --panel: #ffffff;
  --ink: #17212b;
  --muted: #6f7c89;
  --line: #dde5ec;
  --blue: #2d6cdf;
  --green: #23835f;
  --nav: #102033;
  --soft: #eef3f7;
  --warn: #a15f1c;
  --bad: #b43d3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
}

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

[hidden] {
  display: none !important;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 48px;
}

body.giving-care-active .shell {
  width: min(1680px, calc(100vw - 28px));
}

body.campus-stats-active .shell {
  width: min(1900px, calc(100vw - 28px));
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(16, 32, 51, 0.96), rgba(23, 33, 43, 0.9)),
    radial-gradient(circle at 20% 20%, rgba(45, 108, 223, 0.28), transparent 34%),
    var(--nav);
}

.auth-card {
  width: min(520px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.auth-card .brand-mark {
  margin-bottom: 18px;
}

.auth-card h1 {
  margin-bottom: 10px;
}

.auth-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.auth-card .status {
  margin-top: 18px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
}

.page-nav {
  position: absolute;
  top: 60px;
  right: 0;
  z-index: 20;
  display: none;
  width: min(340px, calc(100vw - 32px));
  gap: 4px;
  margin-left: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(16, 32, 51, 0.18);
}

.page-nav.open {
  display: grid;
}

.nav-group {
  display: grid;
  gap: 3px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.nav-heading {
  margin: 0;
  padding: 4px 12px 1px;
  color: #8a96a3;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mobile-menu-button {
  display: flex;
  width: 44px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 9px;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--nav);
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.mobile-menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-button {
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 6px;
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.nav-button.active {
  background: var(--nav);
  color: #fff;
}

.nav-button-primary {
  min-height: 42px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.nav-button-admin {
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  min-height: 32px;
  color: #52606e;
  font-size: 12px;
}

.nav-button-admin.active {
  border-top-color: transparent;
  border-radius: 6px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--nav);
  color: #fff;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.hero,
.panel,
.status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--nav);
  color: #fff;
}

.hero .eyebrow {
  color: #9eb1c8;
}

.hero-actions,
.panel-actions,
.panel-head,
.controls,
.metric-row {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.panel-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page[hidden] {
  display: none;
}

.primary,
.secondary {
  border: 0;
  border-radius: 7px;
  min-height: 42px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  background: var(--blue);
  color: #fff;
}

.primary.green {
  background: var(--green);
}

.secondary {
  background: var(--soft);
  color: #35475a;
}

.primary:disabled,
.secondary:disabled {
  opacity: .58;
  cursor: not-allowed;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 240px;
  gap: 16px;
  margin: 18px 0 12px;
  padding: 18px;
}

.dashboard-controls,
.ytd-controls,
.legacy-controls,
.annual-calendar-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 12px;
}

.annual-calendar-controls {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-controls {
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
}

input[type="number"] {
  font-size: 22px;
  font-weight: 800;
}

.total-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}

.total-card span,
.summary-grid span,
.metric-row span {
  color: var(--muted);
  font-weight: 800;
}

.total-card strong {
  display: block;
  margin: 4px 0;
  font-size: 30px;
}

.total-card small {
  color: var(--muted);
}

.status {
  min-height: 48px;
  margin-bottom: 18px;
  padding: 13px 16px;
  color: #425060;
}

.status.good {
  border-color: #bfe2cd;
  background: #effaf3;
  color: #2f744d;
}

.status.warn {
  border-color: #efd2aa;
  background: #fff8ef;
  color: var(--warn);
}

.status.bad {
  border-color: #eab7b7;
  background: #fff1f1;
  color: var(--bad);
}

.grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
}

.panel-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.adult-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.hidden {
  display: none !important;
}

.metric-row {
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.metric-row strong {
  font-size: 26px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-grid div,
.dash-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.summary-grid strong,
.dash-card strong {
  display: block;
  margin-top: 7px;
  font-size: 28px;
}

.dash-card span {
  color: var(--muted);
  font-weight: 800;
}

.dash-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.dash-card .ytd-compare {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 900;
}

.ytd-compare.over {
  color: #23835f;
}

.ytd-compare.under {
  color: #c2413b;
}

.ytd-compare.even {
  color: var(--muted);
}

.ytd-compare.muted {
  color: #94a3b8;
}

.campus-stats-panel {
  overflow: hidden;
  max-width: 100%;
  background: #fff;
}

.campus-stats-scroll {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  max-height: 62vh;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.campus-stats-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  line-height: 1.2;
}

.campus-stats-table th,
.campus-stats-table td {
  min-width: 52px;
  padding: 7px 8px;
  border-right: 1px solid #cfd7df;
  border-bottom: 1px solid #cfd7df;
  text-align: right;
  white-space: nowrap;
}

.campus-stats-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #111827;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.campus-stats-table .campus-stats-groups th {
  top: 0;
  text-align: center;
  font-size: 12px;
}

.campus-stats-table thead tr:nth-child(2) th {
  top: 26px;
}

.campus-stats-table th:nth-child(1),
.campus-stats-table td:nth-child(1),
.campus-stats-table th:nth-child(2),
.campus-stats-table td:nth-child(2) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8fafc;
}

.campus-stats-table th:nth-child(2),
.campus-stats-table td:nth-child(2) {
  left: 54px;
  min-width: 88px;
  text-align: left;
}

.campus-stats-table thead th:nth-child(-n+2) {
  z-index: 5;
}

.campus-stats-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  font-weight: 900;
  border-top: 3px solid #111827;
}

.group-finance { background: #d9f4d6; }
.group-total { background: #f4dfcf; }
.group-adults { background: #ccecff; }
.group-kids { background: #efd8f4; }
.group-nursery { background: #f7d8cf; }
.group-youth { background: #f4ead0; }
.group-wed { background: #d7d7d7; }
.group-guests { background: #bdeaff; }
.group-decisions { background: #e5b5e9; }
.group-serving { background: #f2d8bc; }
.group-groups { background: #d6efc4; }

.campus-stats-chart {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.campus-stats-chart svg {
  width: 100%;
  max-height: 260px;
}

.campus-stats-chart line {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.campus-stats-chart text {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.campus-chart-current,
.campus-chart-last {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.campus-chart-current {
  stroke: #2d6cdf;
}

.campus-chart-last {
  stroke: #f27b35;
}

.campus-chart-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.campus-chart-legend span {
  width: 22px;
  height: 3px;
  border-radius: 99px;
}

.campus-chart-legend .current {
  background: #2d6cdf;
}

.campus-chart-legend .last {
  background: #f27b35;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recommendation-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.recommendation-card strong {
  font-size: 16px;
}

.recommendation-card span {
  color: var(--ink);
  font-weight: 800;
}

.recommendation-card small {
  color: var(--muted);
  line-height: 1.35;
}

.pill {
  border-radius: 999px;
  background: var(--soft);
  color: #41566d;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

.pill.good {
  background: #e7f6ec;
  color: #286a47;
}

.pill.warn {
  background: #fff1d9;
  color: #825119;
}

.table-wrap {
  overflow-x: auto;
}

.decisions-hero {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(420px, 1.6fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f2f3;
}

.decisions-hero h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 30px;
  font-weight: 500;
}

.decisions-hero h2 span {
  color: #78c8ea;
  font-weight: 900;
  text-transform: uppercase;
}

.decisions-hero h2 strong {
  color: #777;
  font-weight: 500;
}

.decisions-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.decisions-hero-stats article {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
}

.decisions-hero-stats span {
  color: #777;
  font-size: 18px;
}

.decisions-hero-stats strong {
  font-size: 20px;
}

.compact-control {
  display: grid;
  min-width: 120px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-control select {
  min-height: 42px;
}

.decisions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(310px, 1fr));
  gap: 18px;
}

.decisions-campus-card {
  overflow: hidden;
  border: 1px solid #e0e5ea;
  border-radius: 14px;
  background: #fff;
}

.decisions-campus-card h3 {
  margin: 0;
  padding: 6px 12px;
  background: var(--decision-color, #cfe8f6);
  color: #111;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
}

.decisions-table {
  padding: 6px 10px 8px;
}

.decisions-row {
  display: grid;
  grid-template-columns: .8fr repeat(5, 1fr);
  gap: 8px;
  min-height: 21px;
  align-items: center;
  color: #111;
  font-size: 13px;
  text-align: right;
}

.decisions-row span:first-child {
  color: #9a9a9a;
  text-align: left;
}

.decisions-head {
  color: #111;
  font-size: 14px;
  text-decoration: underline;
}

.decisions-head span,
.decisions-head span:first-child {
  color: #111;
}

.decisions-total {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid #d3d7dc;
  font-weight: 900;
}

.decisions-total strong:last-child {
  padding: 2px 6px;
}

.decisions-total strong.good {
  background: #d6f1d8;
  color: #267339;
}

.decisions-total strong.warn {
  background: #fff0bd;
  color: #91651b;
}

.decisions-total strong.bad {
  background: #ffe1df;
  color: #9f2e2a;
}

.decisions-color-0 { --decision-color: #c9e9f7; }
.decisions-color-1 { --decision-color: #faeadc; }
.decisions-color-2 { --decision-color: #bfe7ad; }
.decisions-color-3 { --decision-color: #d999d8; }
.decisions-color-4 { --decision-color: #5cb2dc; }
.decisions-color-5 { --decision-color: #eeeeee; }
.decisions-color-6 { --decision-color: #9bd57f; }
.decisions-color-7 { --decision-color: #eef2c9; }

.giving-care-list {
  display: grid;
  gap: 8px;
}

.giving-care-list-head,
.giving-care-card {
  display: grid;
  grid-template-columns: minmax(230px, 1.15fr) minmax(160px, 0.8fr) minmax(110px, 0.55fr) minmax(120px, 0.62fr) minmax(125px, 0.6fr) minmax(150px, 0.7fr) minmax(250px, 1.15fr) 88px;
  gap: 10px;
}

.giving-care-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0 12px 4px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.giving-care-card {
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.giving-care-person,
.giving-care-rhythm,
.giving-care-stat,
.giving-care-field,
.giving-care-contacted {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.giving-care-person strong,
.giving-care-profile-link,
.giving-care-rhythm strong,
.giving-care-stat strong,
.giving-care-contacted strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.giving-care-profile-link {
  font-weight: 900;
  text-decoration-color: rgba(45, 108, 223, 0.35);
  text-underline-offset: 3px;
}

.giving-care-profile-link:hover {
  color: var(--blue);
}

.giving-care-mini-link {
  color: var(--blue);
  font-weight: 900;
  text-decoration-color: rgba(45, 108, 223, 0.35);
  text-underline-offset: 2px;
}

.giving-care-person small,
.giving-care-rhythm small,
.giving-care-stat small,
.giving-care-contacted small,
.giving-care-field span,
.giving-care-rhythm span,
.giving-care-contacted span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.giving-care-status-select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
}

.giving-care-note {
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}

.giving-care-pco-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
  text-transform: uppercase;
}

.giving-care-pco-note input {
  appearance: none;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1.5px solid #9aa8bb;
  border-radius: 4px;
  background: #fff;
  margin: 0;
}

.giving-care-pco-note input:checked {
  border-color: var(--blue);
  background: var(--blue);
}

.giving-care-pco-note input:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.giving-care-save {
  align-self: center;
  white-space: nowrap;
  min-width: 0;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
}

.admin-user-grid {
  display: grid;
  gap: 8px;
}

.admin-user-head,
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.55fr) minmax(135px, .8fr) repeat(5, minmax(90px, .5fr)) minmax(76px, .35fr);
  gap: 8px;
  align-items: center;
}

.admin-user-head {
  padding: 0 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-user-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-user-row input,
.admin-user-row select {
  min-width: 0;
  min-height: 38px;
}

.admin-person-field {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--nav);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-person-input {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-person-input small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-check {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: #35475a;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.admin-check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--blue);
}

.admin-check span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-save {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
}

.admin-tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-backfill-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.6fr) auto auto;
  gap: 12px;
  align-items: end;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .giving-care-list-head {
    display: none;
  }

  .giving-care-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .giving-care-notes-field {
    grid-column: 1 / -1;
  }

  .giving-care-save {
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .admin-user-head {
    display: none;
  }

  .admin-user-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .admin-save {
    grid-column: 1 / -1;
  }
}

.attendance-chart-panel {
  margin-top: 18px;
}

.chart-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

.attendance-chart {
  width: 100%;
  min-width: 860px;
  height: auto;
  display: block;
}

.chart-grid {
  stroke: #e7edf2;
  stroke-width: 1;
}

.chart-axis,
.chart-tick {
  stroke: #aeb9c4;
  stroke-width: 1;
}

.chart-axis-label,
.chart-axis-title {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-empty-label {
  fill: #8794a3;
  font-size: 15px;
  font-weight: 800;
}

.chart-series polyline {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-series circle {
  fill: var(--series-color);
  stroke: #fff;
  stroke-width: 1.5;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 12px;
  color: #52606e;
  font-size: 13px;
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}

.chart-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.annual-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

#calendar-month-panel {
  overflow-x: auto;
}

.calendar-day-label {
  padding: 9px;
  background: #f1f5f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-day-label:nth-child(7) {
  border-right: 0;
}

.calendar-day {
  min-height: 126px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day.muted {
  background: #f8fafc;
}

.calendar-day > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.calendar-day-events {
  display: grid;
  gap: 5px;
}

.calendar-event,
.annual-board-card {
  border-left: 4px solid #2d6cdf;
  border-radius: 6px;
  background: #f2f6fd;
}

.calendar-event {
  padding: 6px;
}

.calendar-event span,
.annual-board-card strong {
  display: block;
  font-weight: 800;
  line-height: 1.2;
}

.calendar-event span {
  font-size: 12px;
}

.calendar-event small,
.annual-board-card small,
.annual-board-card span,
.calendar-more {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.calendar-more {
  display: block;
  padding-left: 6px;
  font-weight: 800;
}

.annual-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.annual-board-column {
  min-height: 220px;
}

.annual-board-column .panel-head h2 {
  font-size: 18px;
}

.annual-board-events {
  display: grid;
  gap: 10px;
}

.annual-board-card {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.event-type-baptism {
  border-left-color: #2d6cdf;
  background: #eef5ff;
}

.event-type-next-steps {
  border-left-color: #be63c6;
  background: #fbf0fc;
}

.event-type-series,
.event-type-preaching {
  border-left-color: #23835f;
  background: #eefaf4;
}

.event-type-outreach {
  border-left-color: #e57945;
  background: #fff3ec;
}

.event-type-youth {
  border-left-color: #a74ca8;
  background: #fbf0ff;
}

.event-type-groups {
  border-left-color: #4f8f3a;
  background: #f2faef;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
}

td {
  font-weight: 700;
}

#campus-stats-page .campus-stats-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  line-height: 1.2;
}

#campus-stats-page .campus-stats-table th,
#campus-stats-page .campus-stats-table td {
  min-width: 52px;
  padding: 7px 8px;
  text-align: right;
  white-space: nowrap;
}

#campus-stats-page .campus-stats-table tbody td {
  background: #fff;
}

#campus-stats-page .campus-stats-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

#campus-stats-page .campus-stats-table tbody tr.current-week-row td {
  background: #fff4c2;
  border-top: 2px solid #d69e2e;
  border-bottom: 2px solid #d69e2e;
}

#campus-stats-page .campus-stats-table tbody tr.current-week-row td:first-child {
  box-shadow: inset 4px 0 0 #d69e2e;
}

#campus-stats-page .campus-stats-table th {
  color: #334155;
  font-size: 10px;
}

#campus-stats-page .campus-stats-table td {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover,
.clickable-row.selected {
  background: #f5f8fc;
}

.snapshot-detail {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  font-weight: 800;
}

.snapshot-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.snapshot-detail-head h3 {
  margin: 4px 0;
  font-size: 22px;
}

.snapshot-detail-head p {
  margin: 0;
  color: var(--muted);
}

.snapshot-detail-head strong {
  font-size: 28px;
  color: var(--ink);
  white-space: nowrap;
}

.snapshot-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.snapshot-detail-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.snapshot-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.snapshot-detail-grid strong {
  color: var(--ink);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.snapshot-campus-table table {
  min-width: 420px;
}

.next-steps-manual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.next-steps-manual-fields {
  margin-top: 18px;
  padding-top: 4px;
}

.baptism-confirmation {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.baptism-context-grid,
.baptism-manual-grid {
  display: grid;
  gap: 10px;
}

.baptism-context-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.baptism-context-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.baptism-context-grid span,
#baptism-confirmation-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.baptism-context-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 22px;
}

.baptism-manual-grid {
  grid-template-columns: minmax(130px, 0.45fr) minmax(180px, 1fr);
}

.next-steps-hero h2 {
  max-width: 780px;
}

.next-steps-title-card strong {
  font-size: 24px;
}

.next-steps-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.next-steps-campus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.next-step-campus-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.next-step-campus-card header {
  padding: 9px 14px;
  text-align: center;
  color: #151c24;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
}

.next-step-campus-card.blue header {
  background: #c8e5f3;
}

.next-step-campus-card.peach header {
  background: #f7e5d2;
}

.next-step-campus-card.green header {
  background: #c2eab4;
}

.next-step-campus-card.pink header {
  background: #d88bd4;
}

.next-step-campus-card.teal header {
  background: #61b3db;
}

.next-step-campus-card.silver header {
  background: #e8e8e8;
}

.next-step-campus-card.grass header {
  background: #9dd87d;
}

.next-step-campus-card.cream header {
  background: #f1f3c9;
}

.next-step-table-wrap {
  overflow-x: hidden;
}

.next-step-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

.next-step-table th,
.next-step-table td {
  padding: 6px 5px;
  text-align: right;
  white-space: nowrap;
}

.next-step-table th:first-child,
.next-step-table td:first-child {
  text-align: left;
  width: 44px;
}

.next-step-table th:nth-child(2),
.next-step-table th:nth-child(3),
.next-step-table th:nth-child(4),
.next-step-table th:nth-child(5),
.next-step-table td:nth-child(2),
.next-step-table td:nth-child(3),
.next-step-table td:nth-child(4),
.next-step-table td:nth-child(5) {
  width: 58px;
}

.next-step-table th:nth-child(6),
.next-step-table td:nth-child(6) {
  width: 56px;
}

.next-step-table th {
  color: #17212b;
  text-decoration: underline;
}

.next-step-total-row td {
  border-top: 2px solid #cfd8e2;
  color: #101820;
  font-weight: 900;
}

.settings {
  margin-top: 18px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.help {
  color: var(--muted);
  margin: 12px 0 16px;
}

.event-table {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.event-row {
  display: grid;
  grid-template-columns: 150px repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.event-row strong {
  padding-bottom: 11px;
}

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

  .hero {
    display: grid;
  }

  .topbar {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr 44px;
    align-items: center;
  }

  .mobile-menu-button {
    display: flex;
  }

  .page-nav {
    position: absolute;
    top: 60px;
    right: 0;
    z-index: 20;
    display: none;
    width: min(320px, calc(100vw - 32px));
    margin-left: 0;
    padding: 8px;
    box-shadow: 0 18px 45px rgba(16, 32, 51, 0.18);
  }

  .page-nav.open {
    display: grid;
  }

  .page-nav .nav-button {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    padding: 0 14px;
  }

  .nav-button {
    flex: none;
  }

  .controls,
  .dashboard-controls,
  .ytd-controls,
  .legacy-controls,
  .annual-calendar-controls,
  .dashboard-summary,
  .decisions-hero,
  .recommendation-grid,
  .next-steps-campus-grid,
  .next-steps-manual-grid,
  .baptism-context-grid,
  .baptism-manual-grid {
    grid-template-columns: 1fr;
  }

  .decisions-grid {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
  }

  .adult-grid,
  .summary-grid,
  .event-row,
  .giving-care-card,
  .admin-user-row,
  .snapshot-detail-grid {
    grid-template-columns: 1fr;
  }

  .giving-care-save {
    width: 100%;
  }

  .admin-tools-grid button {
    width: 100%;
  }

  .snapshot-detail-head {
    display: block;
  }

  .annual-calendar-grid {
    min-width: 760px;
  }

  .annual-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 92px;
  }

  .shell {
    padding: 14px 10px 110px;
  }

  #entry-page .hero {
    padding: 16px;
    gap: 12px;
  }

  #entry-page .hero .eyebrow {
    display: none;
  }

  #entry-page .hero h2 {
    font-size: 19px;
    line-height: 1.25;
  }

  #entry-page .hero-actions {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.96);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(10px);
  }

  #entry-page .hero-actions button {
    min-height: 44px;
    padding: 0 10px;
    font-size: 14px;
  }

  #entry-page .hero-actions #write-sharepoint {
    grid-column: 1 / -1;
  }

  #entry-page .controls {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
  }

  #entry-page .controls .total-card {
    grid-column: 1 / -1;
    padding: 10px 12px;
  }

  #entry-page .controls .total-card:last-child {
    display: none;
  }

  #entry-page .controls .total-card strong {
    font-size: 26px;
  }

  #entry-page .panel {
    padding: 14px;
  }

  #entry-page .panel-head {
    align-items: flex-start;
  }

  #entry-page .panel-actions {
    justify-content: flex-start;
  }

  #entry-page .adult-grid,
  #entry-page .summary-grid,
  #entry-page .next-steps-manual-grid,
  #entry-page .baptism-context-grid,
  #entry-page .baptism-manual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #entry-page input[type="number"] {
    font-size: 20px;
  }

  #entry-page .summary-grid div {
    padding: 10px;
  }

  #entry-page .summary-grid strong {
    margin-top: 4px;
    font-size: 24px;
  }

  .decisions-grid,
  .decisions-hero-stats {
    grid-template-columns: 1fr;
  }

  .decisions-row {
    gap: 5px;
    font-size: 12px;
  }

  .decisions-head {
    font-size: 12px;
  }

  #entry-page .metric-row {
    margin-top: 12px;
    padding-top: 12px;
  }

  #entry-page .entry-preview-panel,
  #entry-page .next-steps-write-preview,
  #entry-page .settings {
    display: none;
  }
}
