:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --surface: #ffffff;
  --surface-soft: #f8f5ee;
  --surface-tint: #edf5ed;
  --text: #223331;
  --muted: #586561;
  --line: #d8cec0;
  --line-strong: #c5b8a8;
  --green: #47745a;
  --green-dark: #2f523d;
  --blue: #2e448c;
  --blue-soft: #e7edf9;
  --gold: #c89121;
  --gold-soft: #fff0ca;
  --coral: #bf614d;
  --danger-soft: #fae6e0;
  --shadow: 0 18px 45px rgba(29, 40, 38, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.93) 0%, rgba(235, 245, 236, 0.9) 48%, rgba(229, 236, 249, 0.83) 100%),
    radial-gradient(circle at 12% -12%, rgba(200, 145, 33, 0.18), transparent 34rem),
    radial-gradient(circle at 92% 0%, rgba(71, 116, 90, 0.15), transparent 30rem),
    radial-gradient(circle at 50% 110%, rgba(46, 68, 140, 0.1), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

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

button {
  align-items: center;
  background: var(--green);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(47, 82, 61, 0.18);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  white-space: nowrap;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary {
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(46, 68, 140, 0.18);
}

button.secondary:hover {
  background: #24376f;
}

button.ghost {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--blue);
}

button.ghost:hover {
  background: var(--blue-soft);
}

button.ghost.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

input,
select,
textarea {
  background: #fffefa;
  border: 1.25px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  min-height: 46px;
  padding: 11px 13px;
  width: 100%;
}

input[type="checkbox"] {
  min-height: 0;
  width: auto;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: rgba(46, 68, 140, 0.48);
  outline: 3px solid rgba(46, 68, 140, 0.14);
  outline-offset: 1px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.9rem;
  font-weight: 750;
  gap: 7px;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f5f1e8;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

td.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

td.actions button {
  box-shadow: none;
  font-size: 0.84rem;
  min-height: 36px;
  padding: 0 11px;
}

.topbar {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.2), rgba(255, 253, 248, 0.44)),
    url("./assets/hancock-header-bg.png") center / cover no-repeat,
    #fffdf8;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(29, 40, 38, 0.08);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 150px;
  overflow: visible;
  padding: 20px clamp(18px, 4vw, 48px);
  position: relative;
  z-index: 10;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 18px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.school-mark {
  aspect-ratio: 1;
  backdrop-filter: blur(20px) saturate(1.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.23), rgba(255, 253, 248, 0.07)),
    rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 14px 34px rgba(29, 40, 38, 0.06);
  display: block;
  height: clamp(82px, 9vw, 98px);
  object-fit: contain;
  padding: 8px;
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
  width: clamp(82px, 9vw, 98px);
}

.brand-copy {
  backdrop-filter: blur(20px) saturate(1.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.23), rgba(255, 253, 248, 0.07)),
    rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 14px 34px rgba(29, 40, 38, 0.06);
  display: grid;
  gap: 2px;
  max-width: min(620px, 62vw);
  padding: 14px 18px 16px;
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
}

.brand-copy p:last-child {
  color: var(--green);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
}

.topbar h1,
.panel h2 {
  letter-spacing: 0;
  margin: 0;
}

.topbar h1 {
  color: var(--blue);
  font-size: clamp(1.55rem, 3.1vw, 2.55rem);
  font-weight: 950;
  line-height: 0.98;
  white-space: nowrap;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

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

.header-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.session-actions {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(213, 203, 189, 0.8);
  border-radius: 18px;
  display: flex;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  text-align: right;
}

.session-actions .muted {
  color: #5f6b67;
  font-weight: 850;
}

.nav-menu {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(213, 203, 189, 0.8);
  border-radius: 18px;
  padding: 10px;
  position: relative;
}

.nav-menu-button {
  align-items: center;
  aspect-ratio: 1;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0;
  width: 42px;
}

.hamburger-lines,
.hamburger-lines::before,
.hamburger-lines::after {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 16px;
}

.hamburger-lines {
  position: relative;
}

.hamburger-lines::before,
.hamburger-lines::after {
  content: "";
  left: 0;
  position: absolute;
}

.hamburger-lines::before {
  top: -5px;
}

.hamburger-lines::after {
  top: 5px;
}

.nav-menu-list {
  background: rgba(255, 255, 255, 0.96);
  border: 1.25px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(29, 40, 38, 0.16);
  display: grid;
  gap: 5px;
  padding: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 190px;
  z-index: 100;
}

.nav-menu-list button.tab {
  border-radius: 10px;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
}

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

.nav-sign-out {
  border-color: var(--line-strong);
  border-radius: 10px;
  margin-top: 6px;
  width: 100%;
}

.app-shell {
  display: grid;
  gap: 20px;
  margin: 0 auto;
  max-width: 1480px;
  overflow-x: hidden;
  padding: 24px clamp(16px, 4vw, 48px) 52px;
}

.tabs {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  width: fit-content;
}

button.tab {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted);
  min-height: 38px;
  padding: 0 16px;
}

button.tab:hover {
  background: #f3f0e8;
  color: var(--text);
}

button.tab.active {
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(29, 40, 38, 0.08);
  color: var(--text);
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1.25px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: clamp(18px, 3vw, 26px);
}

.loading-panel {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1.25px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  justify-self: center;
  max-width: 620px;
  padding: clamp(20px, 4vw, 30px);
  width: min(100%, 620px);
}

.loading-panel img {
  aspect-ratio: 1;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  height: 76px;
  object-fit: contain;
  padding: 8px;
  width: 76px;
}

.loading-panel h2 {
  color: var(--blue);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.loading-panel span {
  color: #566662;
  display: block;
  font-weight: 700;
  margin-top: 6px;
}

.auth-panel {
  align-items: stretch;
  display: grid;
  gap: clamp(16px, 3vw, 26px);
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  margin: 0 auto;
  max-width: 1120px;
  width: 100%;
}

.auth-panel .eyebrow {
  color: var(--blue);
}

.auth-brand-card,
.auth-card {
  border: 1.25px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.auth-brand-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(237, 245, 237, 0.9)),
    radial-gradient(circle at 12% 8%, rgba(239, 31, 42, 0.11), transparent 16rem),
    radial-gradient(circle at 90% 8%, rgba(46, 68, 140, 0.13), transparent 18rem);
  display: grid;
  gap: 24px;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  padding: clamp(22px, 4vw, 38px);
  position: relative;
}

.auth-brand-card img {
  display: block;
  height: auto;
  max-width: min(420px, 100%);
  position: relative;
  z-index: 1;
}

.auth-brand-card h2,
.auth-card h2 {
  color: var(--green-dark);
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.auth-brand-card h2 {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  font-weight: 950;
  max-width: 720px;
}

.auth-brand-card p:not(.eyebrow) {
  color: #4f605c;
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  font-weight: 700;
  margin: 14px 0 0;
  max-width: 610px;
}

.auth-feature-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.auth-feature-grid span {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(213, 203, 189, 0.78);
  border-radius: 12px;
  color: var(--blue);
  display: flex;
  font-weight: 850;
  min-height: 48px;
  padding: 0 14px;
}

.auth-feature-grid span:nth-child(2),
.auth-feature-grid span:nth-child(4) {
  color: var(--green);
}

.auth-card {
  align-self: stretch;
  background: rgba(255, 255, 255, 0.96);
  display: grid;
  gap: 20px;
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 3vw, 30px);
}

.auth-card-heading {
  display: grid;
  gap: 7px;
}

.auth-card-heading h2 {
  color: var(--blue);
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  font-weight: 950;
}

.auth-card-heading span,
.auth-note {
  color: #566662;
  font-weight: 700;
}

.auth-form {
  align-self: center;
  display: grid;
  gap: 15px;
}

.auth-form input {
  min-height: 50px;
}

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

.auth-action-grid button,
.auth-demo-button {
  min-height: 48px;
  width: 100%;
}

.auth-demo-button {
  border-color: rgba(46, 68, 140, 0.24);
}

.auth-note {
  background: var(--blue-soft);
  border: 1px solid rgba(46, 68, 140, 0.14);
  border-radius: 12px;
  margin: 0;
  padding: 12px 14px;
}

.parent-request-panel,
.parent-family-panel,
.parent-status-panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
}

.parent-request-panel .panel-heading,
.parent-family-panel .panel-heading,
.parent-status-panel .panel-heading {
  border-radius: 12px;
  margin: calc(clamp(18px, 3vw, 26px) * -1) calc(clamp(18px, 3vw, 26px) * -1) 18px;
  padding: 16px clamp(18px, 3vw, 26px);
}

.parent-request-panel .panel-heading {
  background: rgba(231, 237, 249, 0.68);
}

.parent-family-panel .panel-heading {
  background: rgba(216, 235, 221, 0.9);
  border: 1px solid rgba(71, 116, 90, 0.16);
}

.parent-status-panel .panel-heading {
  background: rgba(250, 230, 224, 0.82);
  border: 1px solid rgba(191, 97, 77, 0.14);
}

.parent-request-panel .eyebrow {
  color: var(--blue);
}

.parent-family-panel .eyebrow {
  color: var(--green);
}

.parent-status-panel .eyebrow {
  color: var(--coral);
}

.panel-heading {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-heading > form,
.panel-heading > input {
  max-width: 560px;
}

.panel-note {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  margin: -6px 0 14px;
}

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

.form-grid button {
  align-self: end;
}

.span-two {
  grid-column: 1 / -1;
}

.inline-form {
  align-items: end;
  display: flex;
  gap: 10px;
}

.inline-form input {
  min-width: 220px;
}

.inline-form button {
  flex: 0 0 auto;
  min-width: 112px;
}

#childForm {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

#childForm input {
  min-width: 0;
}

#childForm button {
  min-width: 112px;
}

.children-panel-body {
  display: grid;
  align-items: start;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.family-profile-column {
  background: rgba(255, 255, 255, 0.54);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.family-column-heading {
  display: grid;
  gap: 2px;
}

.family-column-heading strong {
  color: var(--text);
}

.family-column-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.profile-form {
  background: var(--surface-soft);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.family-profile-row {
  background: var(--surface-tint);
  border: 1px solid #cfdccf;
  border-radius: 12px;
  padding: 12px;
}

.family-profile-view,
.family-profile-edit {
  align-items: center;
  display: grid;
  gap: 10px;
}

.family-profile-view {
  grid-template-columns: minmax(0, 1fr) auto;
}

.family-profile-edit {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.family-profile-row button {
  box-shadow: none;
  min-height: 38px;
}

.panel-toggle {
  box-shadow: none;
  min-height: 36px;
  padding: 0 12px;
}

.parent-status-body {
  display: grid;
  gap: 12px;
}

.manual-entry-panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
  padding: 0;
}

.manual-entry-panel summary {
  align-items: center;
  background: rgba(216, 235, 221, 0.9);
  border: 1px solid rgba(71, 116, 90, 0.16);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  list-style: none;
  margin: -1px;
  padding: clamp(18px, 3vw, 24px);
}

.manual-entry-panel summary::-webkit-details-marker {
  display: none;
}

.manual-entry-panel summary h2,
.manual-entry-panel summary p {
  margin: 0;
}

.manual-entry-panel summary .eyebrow {
  color: var(--green);
}

.manual-entry-panel summary > span {
  background: var(--blue-soft);
  border: 1px solid #cbd7f1;
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
  padding: 8px 12px;
  white-space: nowrap;
}

.manual-entry-panel[open] summary > span {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.manual-entry-panel[open] summary > span::before {
  content: "Close ";
}

.manual-entry-form {
  border-top: 1.25px solid var(--line);
  padding: clamp(18px, 3vw, 24px);
}

.form-section-heading {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
  padding-top: 14px;
}

.form-section-heading:first-child {
  border-top: 0;
  padding-top: 16px;
}

.form-section-heading strong {
  color: var(--text);
}

.form-section-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.request-fallback-field {
  display: none;
}

.quick-date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-date-row button {
  box-shadow: none;
  min-height: 38px;
}

.quick-pick-group {
  display: grid;
  gap: 10px;
}

.quick-pick-heading {
  align-items: end;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.quick-pick-heading strong {
  color: var(--text);
}

.quick-pick-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.quick-pick-heading-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.add-child-shortcut {
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.quick-pick-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.quick-block-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.child-pick-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.child-pick-button {
  align-items: center;
  justify-items: center;
  min-height: 52px;
  text-align: center;
}

.weekly-block-list {
  display: grid;
  gap: 12px;
}

.weekly-block-day {
  background: rgba(255, 255, 255, 0.62);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.weekly-block-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.weekly-block-heading strong {
  color: var(--blue);
  font-size: 0.92rem;
}

.weekly-block-day.has-selected {
  background: var(--blue-soft);
  border-color: rgba(46, 68, 140, 0.34);
}

.weekly-room-list {
  display: grid;
  gap: 10px;
}

.weekly-room-section {
  background: rgba(255, 254, 250, 0.92);
  border: 1.25px solid rgba(216, 206, 192, 0.92);
  border-left: 5px solid var(--blue);
  border-radius: 12px;
  display: grid;
  gap: 9px;
  padding: 10px;
}

.weekly-room-section:nth-child(even) {
  background: rgba(247, 251, 247, 0.94);
  border-left-color: var(--green);
}

.weekly-room-section:nth-child(3n) {
  background: rgba(255, 247, 245, 0.9);
  border-left-color: var(--coral);
}

.weekly-room-section.has-selected {
  border-color: rgba(46, 68, 140, 0.34);
  box-shadow: 0 10px 22px rgba(46, 68, 140, 0.08);
}

.weekly-room-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.weekly-room-heading strong {
  color: var(--text);
  font-size: 0.95rem;
}

.weekly-room-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.quick-pick-button {
  align-items: stretch;
  background: #fffefa;
  border: 1.25px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: none;
  color: var(--text);
  display: grid;
  gap: 4px;
  justify-content: stretch;
  min-height: 66px;
  padding: 11px 12px;
  text-align: left;
  touch-action: manipulation;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: normal;
}

.quick-pick-button:hover {
  background: #fffefa;
}

@media (hover: hover) and (pointer: fine) {
  .quick-pick-button:hover {
    background: var(--blue-soft);
  }
}

.quick-pick-button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(46, 68, 140, 0.18);
}

.quick-pick-button.active:hover {
  background: var(--blue);
}

.quick-pick-button strong,
.quick-pick-button em,
.quick-pick-button span {
  overflow-wrap: anywhere;
}

.quick-pick-button em {
  color: var(--blue);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 850;
}

.quick-pick-button span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.quick-pick-button.active em,
.quick-pick-button.active span {
  color: rgba(255, 255, 255, 0.82);
}

.quick-pick-button.child-pick-button {
  align-content: center;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.quick-pick-button.child-pick-button strong {
  line-height: 1.1;
}

.request-submit-button {
  width: 100%;
}

.slot-template-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.slot-template-row button {
  box-shadow: none;
  min-width: 0;
  padding: 0 10px;
}

.slot-template-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: -6px 0 16px;
}

.slot-template-actions button {
  box-shadow: none;
  min-height: 36px;
}

.setup-panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
}

.setup-panel .panel-heading {
  border-radius: 12px;
  margin: calc(clamp(18px, 3vw, 26px) * -1) calc(clamp(18px, 3vw, 26px) * -1) 18px;
  padding: 16px clamp(18px, 3vw, 26px);
}

.setup-classes-panel .panel-heading {
  background: rgba(231, 237, 249, 0.72);
  border: 1px solid rgba(46, 68, 140, 0.14);
}

.setup-times-panel .panel-heading {
  background: rgba(216, 235, 221, 0.9);
  border: 1px solid rgba(71, 116, 90, 0.16);
}

.setup-schedule-panel .panel-heading {
  background: rgba(250, 230, 224, 0.82);
  border: 1px solid rgba(191, 97, 77, 0.14);
}

.setup-classes-panel .eyebrow {
  color: var(--blue);
}

.setup-times-panel .eyebrow {
  color: var(--green);
}

.setup-schedule-panel .eyebrow {
  color: var(--coral);
}

.setup-schedule-panel {
  margin-top: 20px;
}

.setup-schedule-form {
  align-items: end;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.setup-schedule-form #scheduleDateField {
  grid-column: span 2;
}

.setup-schedule-form button {
  grid-column: 1 / -1;
  justify-self: stretch;
}

.weekday-picker {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
}

.weekday-picker label {
  align-items: center;
  background: #fffefa;
  border: 1.25px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  display: flex;
  font-size: 0.88rem;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
}

.weekday-picker input {
  accent-color: var(--blue);
  min-height: 0;
  width: auto;
}

.grid-two {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  margin-bottom: 20px;
}

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

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

.view,
.grid-two > *,
.form-grid > * {
  min-width: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.list-item {
  align-items: center;
  background: var(--surface-tint);
  border: 1px solid #cfdccf;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 15px;
}

.settings-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.settings-item.archived {
  opacity: 0.78;
}

.setup-archive-toggle {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.settings-summary {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
}

.settings-summary strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.settings-title {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

.drag-handle {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #cbd7f1;
  border-radius: 8px;
  color: var(--blue);
  cursor: grab;
  display: inline-flex;
  flex: 0 0 auto;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.drag-handle::before {
  background:
    radial-gradient(circle at 3px 3px, currentColor 1.55px, transparent 1.7px),
    radial-gradient(circle at 9px 3px, currentColor 1.55px, transparent 1.7px),
    radial-gradient(circle at 3px 8px, currentColor 1.55px, transparent 1.7px),
    radial-gradient(circle at 9px 8px, currentColor 1.55px, transparent 1.7px),
    radial-gradient(circle at 3px 13px, currentColor 1.55px, transparent 1.7px),
    radial-gradient(circle at 9px 13px, currentColor 1.55px, transparent 1.7px);
  content: "";
  height: 16px;
  width: 12px;
}

.program-settings-item {
  cursor: grab;
}

.program-settings-item.dragging {
  opacity: 0.58;
}

.program-settings-item.drop-target {
  border-color: rgba(46, 68, 140, 0.52);
  box-shadow: 0 0 0 3px rgba(46, 68, 140, 0.11);
}

.settings-summary span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  text-align: right;
}

.settings-summary .drag-handle {
  color: var(--blue);
  flex-wrap: nowrap;
  gap: 0;
  justify-content: center;
  text-align: center;
}

.settings-edit {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

#settingsView .button-row {
  gap: 7px;
}

#settingsView .button-row button {
  box-shadow: none;
  font-size: 0.8rem;
  min-height: 34px;
  padding: 0 10px;
}

#settingsView .button-row button.danger-action {
  border-color: rgba(195, 95, 76, 0.35);
  color: var(--red);
}

#settingsView .button-row button.danger-action:hover {
  background: var(--danger-soft);
}

.setting-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.accounts-heading {
  align-items: center;
  background: rgba(231, 237, 249, 0.72);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(230px, 1fr) minmax(220px, 360px);
  margin: calc(clamp(18px, 3vw, 26px) * -1) calc(clamp(18px, 3vw, 26px) * -1) 18px;
  padding: 16px clamp(18px, 3vw, 26px);
}

.accounts-heading h2,
.accounts-heading p,
.accounts-heading span {
  margin: 0;
}

.accounts-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.accounts-list {
  display: grid;
  gap: 14px;
}

.account-card {
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 245, 238, 0.88));
  border: 1.5px solid rgba(216, 206, 192, 0.95);
  border-left: 7px solid var(--blue);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(29, 40, 38, 0.06);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) auto minmax(180px, 230px) auto;
  padding: 14px;
}

.account-card:nth-child(even) {
  background: linear-gradient(135deg, rgba(247, 251, 247, 0.97), rgba(237, 247, 239, 0.84));
  border-left-color: var(--green);
}

.account-card:nth-child(3n) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 237, 249, 0.82));
  border-left-color: var(--gold);
}

.account-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-main strong,
.account-main span {
  overflow-wrap: anywhere;
}

.account-main span,
.account-note {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.account-note {
  background: rgba(255, 246, 220, 0.82);
  border: 1px solid #ead28d;
  border-radius: 999px;
  color: #74510e;
  justify-self: start;
  padding: 6px 9px;
}

.account-role-pill {
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 850;
  padding: 7px 10px;
  white-space: nowrap;
}

.account-role-pill.role-parent {
  background: #eef1ef;
  color: var(--muted);
}

.account-role-pill.role-staff {
  background: #e4f0e6;
  color: var(--green-dark);
}

.account-role-pill.role-finance {
  background: #e7edf9;
  color: var(--blue);
}

.account-role-pill.role-admin {
  background: var(--gold-soft);
  color: #74510e;
}

.account-role-control {
  gap: 5px;
}

.account-access-key {
  background: rgba(248, 245, 238, 0.78);
  border: 1px solid rgba(216, 206, 192, 0.82);
  border-radius: 10px;
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 720;
  gap: 3px;
  grid-column: 1 / -1;
  line-height: 1.35;
  padding: 9px 10px;
}

.account-access-key strong {
  color: var(--text);
}

.account-approval-key {
  align-items: center;
  background: rgba(255, 246, 220, 0.82);
  border: 1px solid #ead28d;
  border-radius: 10px;
  color: #74510e;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(140px, auto) minmax(0, 1fr) auto;
  line-height: 1.35;
  padding: 9px 10px;
}

.account-approval-key.approved {
  background: rgba(228, 240, 230, 0.8);
  border-color: rgba(71, 116, 90, 0.22);
  color: var(--green-dark);
}

.account-approval-key strong {
  color: var(--text);
}

.account-approval-key span {
  font-size: 0.84rem;
  font-weight: 740;
  min-width: 0;
}

.account-approval-key button {
  min-height: 34px;
  padding: 0 10px;
}

.account-disabled-key {
  align-items: center;
  background: rgba(228, 240, 230, 0.8);
  border: 1px solid rgba(71, 116, 90, 0.22);
  border-radius: 10px;
  color: var(--green-dark);
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(140px, auto) minmax(0, 1fr) auto;
  line-height: 1.35;
  padding: 9px 10px;
}

.account-disabled-key.disabled {
  background: rgba(248, 226, 222, 0.9);
  border-color: rgba(193, 95, 76, 0.24);
  color: var(--coral);
}

.account-disabled-key strong {
  color: var(--text);
}

.account-disabled-key span {
  font-size: 0.84rem;
  font-weight: 740;
  min-width: 0;
}

.account-disabled-key button {
  min-height: 34px;
  padding: 0 10px;
}

.account-self-lock-note {
  background: rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  color: var(--muted);
  justify-self: start;
  padding: 5px 8px;
}

.toggle-row {
  align-items: center;
  color: var(--text);
  display: flex;
  flex: 1 1 360px;
  gap: 12px;
}

.toggle-row input {
  accent-color: var(--green);
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.toggle-row span {
  display: grid;
  gap: 3px;
}

.toggle-row small {
  color: var(--muted);
  font-weight: 600;
}

.helper-card {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid #cbd7f1;
  border-radius: 12px;
  color: var(--blue);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 44px;
  padding: 11px 13px;
}

.helper-card div {
  display: grid;
  gap: 3px;
}

.helper-card span {
  font-weight: 750;
}

.selected-block-notes {
  background: #fff;
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 11px;
  padding: 12px 13px;
}

.selected-block-notes:empty {
  display: none;
}

.block-notes-heading {
  display: grid;
  gap: 3px;
}

.block-notes-heading strong {
  color: var(--text);
}

.block-notes-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.block-notes-list {
  display: grid;
  gap: 9px;
}

.block-note-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  display: grid;
  gap: 8px;
  padding: 10px;
}

.block-note-item span {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
}

.empty-state-card {
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 5px;
  padding: 12px 13px;
}

.empty-state-card strong {
  color: var(--text);
}

.empty-state-card span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

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

.schedule-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.schedule-heading span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.schedule-grid {
  display: grid;
  gap: 10px;
}

.schedule-card {
  background: var(--surface-soft);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px 13px;
}

.schedule-card span {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.schedule-card small {
  color: var(--muted);
  font-weight: 700;
}

.summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 0 0 18px;
}

.summary-card {
  background: var(--surface-soft);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 14px;
}

.summary-card strong,
.summary-card span {
  overflow-wrap: anywhere;
}

.summary-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.finance-heading {
  align-items: center;
  background: rgba(231, 237, 249, 0.72);
  border-radius: 12px;
  display: grid;
  gap: 12px 18px;
  grid-template-columns: minmax(250px, max-content) minmax(0, 1fr);
  margin: calc(clamp(18px, 3vw, 26px) * -1) calc(clamp(18px, 3vw, 26px) * -1) 16px;
  padding: 16px clamp(18px, 3vw, 26px);
}

.finance-title-block {
  align-items: start;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finance-heading h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.05;
  white-space: nowrap;
}

.finance-title-block span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.finance-toolbar {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  max-width: none;
  min-width: 0;
  padding: 12px;
}

.panel-heading > form.finance-toolbar {
  max-width: none;
  width: 100%;
}

.finance-week-nav,
.finance-tools-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.finance-week-nav {
  justify-content: flex-end;
}

.finance-week-nav .week-range-pill {
  background: rgba(255, 255, 255, 0.68);
  border-color: #cbd7f1;
  min-height: 38px;
  min-width: min(310px, 100%);
}

.finance-tools-row {
  justify-content: flex-end;
}

.view-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1.25px solid var(--line);
  border-radius: 10px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.view-toggle button {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 34px;
  padding: 0 9px;
}

.view-toggle button:hover,
.view-toggle button.active {
  background: var(--surface);
  color: var(--text);
}

.view-toggle button.active {
  box-shadow: 0 7px 18px rgba(29, 40, 38, 0.08);
}

.finance-date-control {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0;
  font-weight: 850;
}

.finance-date-control span {
  display: none;
}

.finance-date-control input {
  color: var(--text);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 750;
}

.finance-date-control input {
  min-height: 36px;
  min-width: 136px;
  padding: 7px 9px;
  width: 140px;
}

.week-range-pill {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid #cbd7f1;
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 850;
  min-height: 36px;
  padding: 0 13px;
  white-space: nowrap;
}

.finance-search {
  max-width: none;
  min-height: 36px;
  min-width: min(320px, 100%);
  padding: 8px 12px;
  width: min(420px, 100%);
}

.finance-export-row {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.finance-toolbar .button-row button,
.finance-week-nav button {
  font-size: 0.86rem;
  min-height: 36px;
  padding: 0 11px;
}

@media (max-width: 1240px) {
  .finance-export-row {
    justify-content: flex-end;
  }
}

@media (max-width: 1100px) {
  .finance-insights-grid {
    grid-template-columns: 1fr;
  }

  .finance-week-nav,
  .finance-tools-row,
  .finance-export-row {
    justify-content: flex-start;
  }
}

.finance-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.finance-kpi {
  background: #fff;
  border: 1.25px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(29, 40, 38, 0.05);
  display: grid;
  gap: 4px;
  padding: 15px;
}

.finance-kpi:nth-child(2) {
  border-left-color: var(--blue);
}

.finance-kpi:nth-child(3) {
  border-left-color: var(--gold);
}

.finance-kpi:nth-child(4) {
  border-left-color: var(--coral);
}

.finance-kpi span,
.finance-kpi small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.finance-kpi strong {
  color: var(--text);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.finance-section {
  margin-top: 20px;
}

.finance-insights-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  margin-top: 20px;
}

.finance-insights-grid > * {
  min-width: 0;
}

.finance-insights-grid .finance-section {
  margin-top: 0;
}

.finance-insight-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(29, 40, 38, 0.05);
  min-width: 0;
  padding: 16px;
}

.finance-section-heading {
  align-items: center;
  background: rgba(231, 237, 249, 0.5);
  border: 1px solid rgba(46, 68, 140, 0.12);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.finance-insight-card:nth-child(2) .finance-section-heading {
  background: rgba(216, 235, 221, 0.7);
  border-color: rgba(71, 116, 90, 0.14);
}

.finance-section-heading h3,
.finance-section-heading p {
  margin: 0;
}

.finance-family-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.finance-program-grid {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.finance-family-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.84);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  padding: 14px;
}

.finance-family-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finance-family-card div:last-child {
  justify-items: end;
  text-align: right;
}

.finance-family-card span {
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.finance-family-card strong {
  overflow-wrap: anywhere;
}

.finance-program-grid .summary-card {
  background: rgba(255, 255, 255, 0.84);
  border-left: 5px solid var(--green);
}

.finance-warning,
.finance-empty {
  border-radius: 12px;
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding: 14px 16px;
}

.finance-warning {
  background: var(--gold-soft);
  border: 1px solid #f0dbab;
  color: #74510e;
}

.finance-empty {
  background: var(--blue-soft);
  border: 1px solid #dce3f7;
  color: var(--blue);
}

.finance-warning span,
.finance-empty span {
  font-weight: 650;
}

.finance-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.finance-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.finance-table tbody tr:nth-child(even) {
  background: #f8f5ee;
}

.finance-table .money-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.finance-parent-cell,
.finance-parent-email {
  display: block;
  min-width: 0;
}

.finance-table tfoot th {
  background: #f2f7f2;
  color: var(--green-dark);
  font-size: 0.92rem;
}

.missing-rate-row {
  background: var(--gold-soft) !important;
}

.date-tools {
  display: grid;
  gap: 10px;
}

.admin-roster-panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
  display: grid;
  gap: 16px;
}

.admin-heading {
  align-items: center;
  background: rgba(231, 237, 249, 0.72);
  border-radius: 12px;
  display: grid;
  gap: 12px 18px;
  grid-template-columns: minmax(250px, max-content) minmax(0, 1fr);
  margin: calc(clamp(18px, 3vw, 26px) * -1) calc(clamp(18px, 3vw, 26px) * -1) 0;
  margin-bottom: 0;
  padding: 16px clamp(18px, 3vw, 26px);
}

.admin-title-block {
  min-width: 0;
}

.admin-heading h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.05;
  white-space: nowrap;
}

.admin-heading .eyebrow {
  color: var(--blue);
}

.admin-week-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.admin-week-nav .week-range-pill {
  background: rgba(255, 255, 255, 0.68);
  border-color: #cbd7f1;
  min-height: 38px;
  min-width: min(320px, 100%);
}

.week-step {
  border-radius: 999px;
  font-size: 1.24rem;
  min-height: 38px;
  padding: 0;
  width: 42px;
}

.admin-action-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-column: 2;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row button {
  min-height: 36px;
  padding: 0 12px;
}

.status-filter-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-filter {
  background: #fffefa;
  border: 1.25px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  color: var(--text);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 11px;
}

.status-filter:hover,
.status-filter.active {
  background: var(--blue-soft);
  border-color: rgba(46, 68, 140, 0.28);
  color: var(--blue);
}

.status-filter.active {
  box-shadow: 0 10px 22px rgba(46, 68, 140, 0.1);
}

.status-filter span,
.status-filter strong {
  overflow-wrap: anywhere;
}

.admin-summary-grid {
  margin-bottom: 0;
}

.admin-summary-grid:empty {
  display: none;
}

.admin-roster-list {
  display: grid;
  gap: 14px;
}

.admin-day-group {
  background: rgba(255, 255, 255, 0.78);
  border: 1.25px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(29, 40, 38, 0.06);
  display: grid;
  gap: 0;
  overflow: hidden;
}

.admin-day-group.today {
  border-color: rgba(46, 68, 140, 0.42);
  box-shadow: 0 14px 30px rgba(46, 68, 140, 0.12);
}

.admin-day-group.today .admin-day-heading {
  background: rgba(231, 237, 249, 0.92);
}

.admin-day-heading {
  align-items: center;
  background: rgba(231, 237, 249, 0.68);
  border-bottom: 1.25px solid #cbd7f1;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.admin-print-day {
  box-shadow: none;
  min-height: 34px;
  padding: 0 12px;
}

.admin-day-heading div {
  display: grid;
  gap: 3px;
}

.admin-day-heading strong {
  color: var(--blue);
  font-size: 1rem;
}

.admin-day-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.admin-day-rosters {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.roster-group {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(216, 206, 192, 0.82);
  border-left: 7px solid var(--blue);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(29, 40, 38, 0.06);
  overflow: hidden;
}

.roster-group:nth-child(even) {
  background: rgba(247, 252, 248, 0.82);
  border-left-color: var(--green);
}

.roster-group:nth-child(3n) {
  background: rgba(255, 251, 241, 0.84);
  border-left-color: var(--gold);
}

.roster-group:nth-child(4n) {
  background: rgba(255, 247, 244, 0.84);
  border-left-color: var(--coral);
}

.roster-heading {
  align-items: center;
  background: rgba(248, 245, 238, 0.82);
  border-bottom: 1px solid rgba(216, 206, 192, 0.7);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.roster-heading h3,
.roster-heading p {
  margin: 0;
}

.roster-heading-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.roster-heading-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 750;
  gap: 6px;
  justify-content: flex-end;
  text-align: right;
}

.capacity-badge.open {
  background: #edf7ef;
  color: var(--green-dark);
}

.capacity-badge.near {
  background: #fff0ca;
  color: #74510e;
}

.capacity-badge.full {
  background: var(--danger-soft);
  color: #843f31;
}

.note-badge {
  background: var(--blue-soft);
  color: var(--blue);
}

.admin-request-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  padding: 10px;
}

.admin-student-tile {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-student-chip {
  align-items: center;
  background: #fff;
  border: 1.25px solid var(--line);
  border-radius: 999px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  min-height: 50px;
  padding: 7px 9px;
  text-align: left;
  white-space: normal;
  width: 100%;
}

.admin-student-chip:hover,
.admin-student-chip.selected {
  border-color: rgba(46, 68, 140, 0.34);
  box-shadow: 0 10px 20px rgba(46, 68, 140, 0.12);
}

.admin-student-chip.status-pending {
  background: #fff6dc;
  border-color: #ead28d;
  color: #74510e;
}

.admin-student-chip.status-approved {
  background: #e7edf9;
  border-color: #bdcaec;
  color: var(--blue);
}

.admin-student-chip.status-attended {
  background: #edf7ef;
  border-color: #bed8c4;
  color: var(--green-dark);
}

.admin-student-chip.status-absent {
  background: #fff0ca;
  border-color: #edc971;
  color: #74510e;
}

.admin-student-chip.status-denied {
  background: #fae9e3;
  border-color: #e2a092;
  color: #843f31;
}

.admin-student-chip.status-canceled {
  background: #eef1ef;
  border-color: #cbd4cf;
  color: var(--muted);
}

.admin-status-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0 0 10px;
}

.legend-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 850;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
}

.legend-item i {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.legend-item.status-pending i {
  background: #d39a15;
}

.legend-item.status-approved i {
  background: var(--blue);
}

.legend-item.status-attended i {
  background: var(--green);
}

.legend-item.status-absent i {
  background: #c89121;
}

.legend-item.status-denied i {
  background: var(--red);
}

.student-icon {
  display: grid;
  height: 28px;
  justify-items: center;
  position: relative;
  width: 22px;
}

.student-icon::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 10px;
  opacity: 0.9;
  width: 10px;
}

.student-icon::after {
  background: currentColor;
  border-radius: 999px 999px 6px 6px;
  content: "";
  height: 14px;
  opacity: 0.9;
  position: absolute;
  top: 12px;
  width: 18px;
}

.student-chip-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.student-chip-copy strong,
.student-chip-copy small {
  overflow-wrap: anywhere;
}

.student-chip-copy strong {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.08;
}

.student-chip-copy small {
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.78;
}

.chip-note-dot {
  background: var(--blue);
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  grid-column: 3;
  justify-self: center;
  height: 10px;
  width: 10px;
}

.chip-open-arrow {
  align-items: center;
  align-self: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(29, 40, 38, 0.1);
  border-radius: 999px;
  color: currentColor;
  display: inline-flex;
  font-size: 0;
  grid-column: 3;
  grid-row: 1 / span 2;
  height: 24px;
  justify-content: center;
  justify-self: end;
  width: 24px;
}

.chip-open-arrow::before {
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  content: "";
  height: 7px;
  transform: rotate(45deg);
  width: 7px;
}

.admin-student-chip.selected .chip-open-arrow::before {
  transform: translateY(3px) rotate(225deg);
}

.admin-attendance-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-attendance-actions button {
  box-shadow: none;
  font-size: 0.72rem;
  min-height: 30px;
  min-width: 0;
  padding: 0 7px;
  width: 100%;
}

.admin-attendance-note {
  background: rgba(248, 245, 238, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  padding: 7px 8px;
  text-align: center;
}

.admin-selected-detail {
  background: #fff;
  border-top: 1px solid var(--line);
}

.selected-detail-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.selected-detail-heading > div:first-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.selected-detail-heading h4 {
  color: var(--text);
  font-size: 1rem;
  margin: 0;
}

.selected-detail-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.admin-row-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: min(220px, 100%);
}

.admin-row-actions button {
  box-shadow: none;
  font-size: 0.78rem;
  min-height: 32px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.admin-row-actions button.deny {
  background: var(--coral);
}

.admin-row-actions button.deny:hover {
  background: #9f4d3d;
}

.admin-request-detail {
  background: rgba(248, 245, 238, 0.78);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}

.admin-request-detail div {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 3px;
  min-width: 150px;
  padding: 8px 10px;
}

.admin-request-detail .admin-detail-notes {
  flex: 1 1 220px;
  min-width: 220px;
}

.admin-request-detail span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-request-detail strong {
  color: var(--text);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.admin-copy-email {
  box-shadow: none;
  font-size: 0.76rem;
  justify-self: start;
  min-height: 30px;
  padding: 0 9px;
}

.admin-empty-card {
  background: rgba(255, 255, 255, 0.76);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

#parentRequests.table-wrap {
  overflow-x: visible;
}

#parentRequests table {
  min-width: 0;
}

#parentRequests thead {
  display: none;
}

#parentRequests tbody,
#parentRequests tr,
#parentRequests td {
  display: block;
  width: 100%;
}

#parentRequests tr {
  background: var(--surface-soft);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
  overflow: hidden;
}

#parentRequests td {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 88px minmax(0, 1fr);
  overflow-wrap: anywhere;
  padding: 11px 12px;
  width: auto;
}

#parentRequests td::before {
  color: var(--blue);
  content: attr(data-label);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

#parentRequests td:last-child {
  border-bottom: 0;
}

#parentRequests .request-status-cell {
  align-items: center;
  background: #fff;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  padding: 13px 12px;
}

#parentRequests .request-status-cell::before {
  content: "";
  display: none;
}

#parentRequests .request-status-cell .status {
  font-size: 0.9rem;
  justify-content: center;
  padding: 10px 12px;
  width: 100%;
}

#parentRequests td.actions {
  align-items: center;
}

#parentRequests td.actions button {
  width: 100%;
}

.request-day-list {
  display: grid;
  gap: 14px;
}

.request-day-group {
  display: grid;
  gap: 10px;
}

.request-day-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.request-day-heading strong {
  color: var(--blue);
}

.request-day-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.request-card-list {
  display: grid;
  gap: 10px;
}

.request-card {
  background: var(--surface-soft);
  border: 1.25px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.request-card-status {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.request-card-status .status {
  font-size: 0.9rem;
  justify-content: center;
  padding: 10px 12px;
  width: 100%;
}

.request-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-detail-grid div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
}

.request-detail-grid div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.request-detail-grid span {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.request-detail-grid strong {
  color: var(--text);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.request-card-actions {
  display: flex;
  justify-content: flex-end;
}

.request-card-actions button {
  box-shadow: none;
  min-height: 38px;
  padding: 0 14px;
}

.status,
.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  padding: 6px 10px;
}

.status {
  text-transform: capitalize;
}

.status.pending {
  background: var(--gold-soft);
  color: #74510e;
}

.status.approved {
  background: #e7edf9;
  color: var(--blue);
}

.status.attended,
.badge {
  background: #e4f0e6;
  color: var(--green-dark);
}

.status.absent {
  background: #fff0ca;
  color: #74510e;
}

.status.denied,
.badge.inactive {
  background: var(--danger-soft);
  color: #843f31;
}

.status.canceled {
  background: #eef1ef;
  color: var(--muted);
}

.badge.warning {
  background: var(--gold-soft);
  color: #74510e;
}

.toast {
  background: #1f2f2d;
  border-radius: 12px;
  bottom: 18px;
  box-shadow: var(--shadow);
  color: #fff;
  left: 50%;
  max-width: min(520px, calc(100vw - 32px));
  padding: 13px 16px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 50;
}

@media (max-width: 920px) {
  .auth-panel {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .auth-brand-card {
    gap: 16px;
    order: 2;
  }

  .auth-card {
    order: 1;
  }

  .auth-brand-card h2 {
    font-size: clamp(1.85rem, 8vw, 3.1rem);
  }

  .auth-brand-card img {
    max-width: min(340px, 100%);
  }

  .topbar,
  .panel-heading,
  .inline-form,
  .grid-two {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .panel-heading {
    display: flex;
  }

  .grid-two,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .setup-schedule-form,
  .setup-schedule-form #scheduleDateField {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

  #parentView.view.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  #parentView .parent-layout {
    display: contents;
  }

  .parent-request-panel {
    order: 1;
  }

  .parent-status-panel {
    order: 2;
  }

  .parent-family-panel {
    order: 3;
  }

  .brand-lockup {
    align-items: center;
  }

  .header-actions {
    align-self: flex-end;
    justify-content: flex-end;
  }

  .session-actions {
    justify-content: space-between;
    text-align: left;
  }

  .finance-heading,
  .accounts-heading,
  .finance-toolbar,
  .admin-heading,
  .admin-week-nav,
  .finance-week-nav,
  .finance-tools-row,
  .finance-export-row,
  .view-toggle {
    align-items: stretch;
    justify-items: stretch;
    width: 100%;
  }

  .finance-heading {
    display: grid;
    gap: 14px;
    width: auto;
  }

  .finance-heading > .finance-toolbar,
  .finance-week-nav,
  .finance-tools-row,
  .finance-export-row {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  .admin-heading {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    width: auto;
  }

  .accounts-heading {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    width: auto;
  }

  .account-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .account-approval-key {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .account-disabled-key {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .admin-week-nav {
    justify-content: flex-start;
  }

  .finance-week-nav,
  .finance-tools-row {
    justify-content: flex-start;
  }

  .admin-action-row {
    grid-column: 1;
  }

  .admin-request-grid {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  }

  .finance-insights-grid {
    grid-template-columns: 1fr;
  }

  .finance-family-card,
  .finance-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-family-card div:last-child {
    justify-items: start;
    text-align: left;
  }

  .finance-heading {
    grid-template-columns: 1fr;
  }

  .finance-week-nav,
  .finance-tools-row,
  .finance-export-row {
    justify-content: stretch;
  }

  .view-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-date-control input,
  .finance-search,
  .week-range-pill {
    box-sizing: border-box;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .finance-date-control {
    align-items: stretch;
    display: grid;
    gap: 6px;
  }

  .panel-heading > form,
  .panel-heading > input,
  .inline-form input {
    max-width: none;
    min-width: 0;
  }

  .topbar {
    background-position: center;
    min-height: 0;
  }

  .topbar h1 {
    white-space: normal;
  }

  .school-mark {
    height: 82px;
    width: 82px;
  }
}

@media (max-width: 760px) {
  .admin-week-nav,
  .finance-week-nav {
    display: grid;
    gap: 8px;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    width: 100%;
  }

  .admin-week-nav .week-range-pill,
  .finance-week-nav .week-range-pill {
    border-radius: 12px;
    justify-content: center;
    min-height: 42px;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
    width: 100%;
  }

  .admin-week-nav .week-step,
  .finance-week-nav .week-step {
    padding: 0;
    width: 100%;
  }

  .finance-date-control {
    grid-column: 1 / -1;
    width: 100%;
  }

  .finance-date-control input {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 12px;
    box-sizing: border-box;
    display: block;
    font-size: 0.95rem;
    height: 42px;
    line-height: 42px;
    min-height: 42px;
    min-width: 0;
    padding: 0 12px;
    text-align: center;
    width: 100%;
  }

  .finance-date-control input::-webkit-date-and-time-value {
    line-height: 42px;
    min-height: 42px;
    text-align: center;
  }

  #financeThisWeek {
    grid-column: 1 / -1;
    width: 100%;
  }

  .finance-week-nav .finance-date-control,
  .finance-week-nav #financeThisWeek {
    justify-self: stretch;
  }

  #adminThisWeekButton,
  #financeThisWeek {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .loading-panel {
    align-items: flex-start;
    border-radius: 14px;
    gap: 14px;
    padding: 18px;
  }

  .loading-panel img {
    border-radius: 14px;
    height: 58px;
    width: 58px;
  }

  .loading-panel h2 {
    font-size: 1.45rem;
  }

  .auth-panel {
    gap: 14px;
  }

  .auth-brand-card,
  .auth-card {
    border-radius: 14px;
  }

  .auth-brand-card {
    padding: 18px;
  }

  .auth-brand-card h2 {
    font-size: clamp(1.35rem, 6.5vw, 1.7rem);
  }

  .auth-brand-card p:not(.eyebrow) {
    font-size: 0.9rem;
  }

  .auth-action-grid {
    grid-template-columns: 1fr;
  }

  .auth-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-feature-grid span {
    font-size: 0.86rem;
    min-height: 38px;
    padding: 0 10px;
  }

  .auth-card {
    padding: 18px;
  }

  .auth-card-heading h2 {
    font-size: 2rem;
  }

  button {
    min-height: 42px;
    padding: 0 14px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
    min-height: 0;
    padding: 12px;
  }

  .brand-lockup {
    align-items: center;
    flex: 1 1 auto;
    gap: 9px;
    max-width: calc(100% - 64px);
    min-width: 0;
    width: auto;
  }

  .school-mark {
    border-radius: 17px;
    flex: 0 0 auto;
    height: 54px;
    padding: 6px;
    width: 54px;
  }

  .topbar h1 {
    font-size: clamp(1.72rem, 8vw, 2.35rem);
  }

  .brand-copy p:last-child {
    font-size: 0.82rem;
  }

  .brand-copy {
    border-radius: 13px;
    max-width: none;
    min-width: 0;
    padding: 8px 10px 9px;
  }

  .topbar h1 {
    font-size: clamp(0.96rem, 4.6vw, 1.26rem);
    white-space: nowrap;
  }

  .header-actions {
    align-self: center;
    flex: 0 0 auto;
    gap: 7px;
  }

  .session-actions {
    display: none;
  }

  .nav-menu {
    border-radius: 14px;
    padding: 6px;
  }

  .nav-menu-button {
    min-height: 40px;
    width: 40px;
  }

  .app-shell {
    gap: 14px;
    padding: 16px 12px 36px;
  }

  #appPanel,
  .view.active {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .panel {
    border-radius: 12px;
    padding: 16px;
  }

  .panel-heading {
    gap: 10px;
    margin-bottom: 14px;
  }

  .panel h2 {
    font-size: 1.28rem;
    line-height: 1.12;
  }

  .form-grid {
    gap: 13px;
  }

  .quick-date-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-date-row button {
    min-width: 0;
    padding: 0 10px;
    width: 100%;
  }

  .quick-pick-heading {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .quick-pick-heading-actions {
    gap: 6px;
  }

  .quick-pick-grid {
    grid-template-columns: 1fr;
  }

  .weekly-block-day {
    padding: 10px;
  }

  .weekly-room-heading {
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }

  .slot-template-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slot-template-actions {
    grid-template-columns: 1fr;
  }

  .weekday-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .helper-card,
  .schedule-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-summary {
    align-items: stretch;
    gap: 8px;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .settings-title {
    align-items: center;
    width: 100%;
  }

  .settings-summary span {
    justify-content: flex-start;
    text-align: left;
  }

  .settings-summary strong {
    overflow-wrap: break-word;
    word-break: normal;
  }

  .helper-card {
    justify-content: flex-start;
  }

  .schedule-heading {
    gap: 4px;
  }

  .finance-family-card,
  .finance-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-toolbar {
    gap: 12px;
    padding: 10px;
  }

  .children-panel-body {
    grid-template-columns: 1fr;
  }

  .admin-heading h2 {
    white-space: normal;
  }

  .admin-heading {
    border-radius: 12px;
    margin: -16px -16px 0;
    padding: 14px 16px;
    width: auto;
  }

  .admin-title-block,
  .admin-action-row,
  .status-filter-row {
    width: 100%;
  }

  .finance-heading {
    border-radius: 12px;
    margin: -16px -16px 14px;
    padding: 14px 16px;
    width: auto;
  }

  .accounts-heading {
    border-radius: 12px;
    margin: -16px -16px 14px;
    padding: 14px 16px;
    width: auto;
  }

  .finance-title-block,
  .accounts-heading > div,
  .finance-toolbar {
    width: 100%;
  }

  .finance-toolbar {
    padding: 10px;
  }

  .admin-week-nav {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    justify-content: stretch;
  }

  .admin-week-nav .week-range-pill {
    min-width: 0;
  }

  #adminThisWeekButton {
    grid-column: 1 / -1;
  }

  .admin-action-row,
  .admin-row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-action-row button,
  .admin-row-actions button {
    min-width: 0;
    width: 100%;
  }

  .status-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roster-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .roster-heading-meta {
    align-items: start;
    justify-items: start;
    text-align: left;
  }

  .roster-heading-badges {
    align-items: start;
    justify-content: flex-start;
  }

  .admin-request-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-student-chip {
    border-radius: 16px;
    min-height: 54px;
  }

  .selected-detail-heading,
  .admin-request-detail {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-request-detail {
    gap: 8px;
  }

  .admin-request-detail div {
    min-width: 0;
  }

  .admin-request-detail .admin-detail-notes {
    min-width: 0;
  }

  .finance-week-nav,
  .finance-tools-row {
    gap: 9px;
  }

  .finance-search {
    min-width: 0;
  }

  .finance-export-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-export-row button {
    min-width: 0;
    width: 100%;
  }

  .admin-week-nav,
  .finance-week-nav {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
    width: 100%;
  }

  .admin-week-nav .week-range-pill,
  .finance-week-nav .week-range-pill {
    min-width: 0;
    width: 100%;
  }

  .admin-week-nav .week-step,
  .finance-week-nav .week-step {
    padding: 0;
    width: 100%;
  }

  .finance-date-control {
    grid-column: 1 / -1;
    width: 100%;
  }

  .finance-date-control input {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 12px;
    box-sizing: border-box;
    display: block;
    font-size: 0.95rem;
    height: 42px;
    line-height: 42px;
    min-height: 42px;
    min-width: 0;
    padding: 0 12px;
    text-align: center;
    width: 100%;
  }

  .finance-date-control input::-webkit-date-and-time-value {
    line-height: 42px;
    min-height: 42px;
    text-align: center;
  }

  #adminThisWeekButton,
  #financeThisWeek {
    grid-column: 1 / -1;
    width: 100%;
  }

  .week-range-pill {
    border-radius: 12px;
    justify-content: center;
    min-height: 42px;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
  }

  .finance-kpi-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
  }

  .finance-kpi {
    border-left-width: 4px;
    padding: 12px;
  }

  .finance-kpi strong {
    font-size: clamp(1.25rem, 8vw, 1.75rem);
  }

  .finance-warning,
  .finance-empty {
    margin: 12px 0;
    padding: 13px;
  }

  .finance-insights-grid {
    gap: 12px;
    margin-top: 14px;
  }

  .finance-insight-card {
    padding: 13px;
  }

  .finance-family-card div:last-child {
    justify-items: start;
    text-align: left;
  }

  .finance-section {
    margin-top: 14px;
  }

  .finance-table-wrap {
    border: 0;
    overflow-x: visible;
  }

  .finance-table {
    min-width: 0;
  }

  .finance-table thead,
  .finance-table tfoot {
    display: none;
  }

  .finance-table tbody,
  .finance-table tr,
  .finance-table td {
    display: block;
    width: 100%;
  }

  .finance-table tr {
    background: var(--surface-soft);
    border: 1.25px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  .finance-table tbody tr:nth-child(even) {
    background: var(--surface-soft);
  }

  .finance-table td {
    align-items: start;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: 82px minmax(0, 1fr);
    overflow-wrap: anywhere;
    padding: 11px 12px;
    text-align: left;
  }

  .finance-parent-cell {
    overflow: hidden;
  }

  .finance-parent-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .finance-table td::before {
    color: var(--blue);
    content: attr(data-label);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .finance-table td:last-child {
    border-bottom: 0;
  }

  .finance-table .money-cell {
    text-align: left;
    white-space: normal;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  button.tab {
    width: 100%;
  }

  .list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  #childForm {
    grid-template-columns: 1fr;
  }

  #childForm button {
    width: 100%;
  }

  .family-profile-view,
  .family-profile-edit {
    grid-template-columns: 1fr;
  }

  .family-profile-row button {
    width: 100%;
  }

}

@media (max-width: 380px) {
  .topbar {
    padding: 12px;
  }

  .brand-lockup {
    gap: 9px;
  }

  .school-mark {
    border-radius: 16px;
    height: 52px;
    padding: 6px;
    width: 52px;
  }

  .brand-copy {
    overflow: hidden;
    padding: 8px 9px 9px;
  }

  .topbar h1 {
    font-size: clamp(0.78rem, 4vw, 0.95rem);
    max-width: 100%;
  }

  .brand-copy p:last-child {
    font-size: 0.8rem;
  }

  .session-actions {
    border-radius: 14px;
    padding: 9px 10px;
  }

  .tabs {
    gap: 3px;
    padding: 4px;
  }

  button.tab {
    min-height: 36px;
    padding: 0 10px;
  }

  #parentRequests td {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .finance-kpi-grid,
  .finance-export-row {
    grid-template-columns: 1fr;
  }

  .finance-table td {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  #parentRequests tr {
    grid-template-columns: 1fr;
  }

  .request-detail-grid {
    grid-template-columns: 1fr;
  }

  .request-detail-grid div:nth-child(odd) {
    border-right: 0;
  }

  .request-card-status {
    grid-template-columns: 1fr;
  }

  .request-card-actions,
  .request-card-actions button {
    width: 100%;
  }
}

@media (max-width: 340px) {
  .brand-lockup {
    gap: 7px;
    max-width: calc(100% - 58px);
  }

  .school-mark {
    height: 48px;
    width: 48px;
  }

  .nav-menu {
    padding: 5px;
  }

  .nav-menu-button {
    min-height: 38px;
    width: 38px;
  }

  .topbar h1 {
    font-size: 0.72rem;
  }

  .brand-copy p:last-child {
    font-size: 0.7rem;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  #financeView,
  #financeView.view,
  #financeView .panel,
  .finance-panel,
  .finance-heading,
  .finance-toolbar,
  .finance-week-nav,
  .finance-tools-row,
  .finance-export-row,
  .finance-insights-grid,
  .finance-table-wrap,
  .finance-table {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .finance-heading {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    margin: -16px -16px 14px;
    padding: 14px 16px;
    width: auto;
  }

  .finance-title-block,
  .finance-toolbar {
    width: 100%;
  }

  .finance-week-nav {
    display: grid;
    gap: 8px;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    justify-content: stretch;
    width: 100%;
  }

  .finance-week-nav .week-range-pill {
    border-radius: 12px;
    justify-content: center;
    min-height: 42px;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
    width: 100%;
  }

  .finance-week-nav .week-step {
    padding: 0;
    width: 100%;
  }

  .finance-date-control,
  #financeThisWeek {
    grid-column: 1 / -1;
    width: 100%;
  }

  .finance-date-control input {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 12px;
    height: 42px;
    line-height: 42px;
    min-height: 42px;
    min-width: 0;
    padding: 0 12px;
    text-align: center;
    width: 100%;
  }

  .finance-date-control input::-webkit-date-and-time-value {
    line-height: 42px;
    min-height: 42px;
    text-align: center;
  }

  .finance-tools-row {
    display: grid;
    gap: 9px;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .finance-search,
  .view-toggle {
    width: 100%;
  }

  .view-toggle {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .view-toggle button {
    min-width: 0;
    padding: 0 6px;
  }

  .finance-export-row {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .finance-export-row button {
    min-width: 0;
    padding: 0 8px;
    white-space: normal;
    width: 100%;
  }

  .finance-insights-grid {
    grid-template-columns: 1fr;
  }

  .finance-table-wrap {
    border: 0;
    overflow-x: visible;
  }

  .finance-table {
    min-width: 0;
  }

  .finance-table thead,
  .finance-table tfoot {
    display: none;
  }

  .finance-table tbody,
  .finance-table tr,
  .finance-table td {
    display: block;
    width: 100%;
  }

  .finance-table tr {
    background: var(--surface-soft);
    border: 1.25px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  .finance-table tbody tr:nth-child(even) {
    background: var(--surface-soft);
  }

  .finance-table td {
    align-items: start;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: 82px minmax(0, 1fr);
    overflow-wrap: anywhere;
    padding: 11px 12px;
    text-align: left;
  }

  .finance-table td::before {
    color: var(--blue);
    content: attr(data-label);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .finance-table td:last-child {
    border-bottom: 0;
  }

  .finance-table .money-cell {
    text-align: left;
    white-space: normal;
  }

  .finance-parent-cell {
    overflow: hidden;
  }

  .finance-parent-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .nav-menu,
  .tabs,
  #authPanel,
  #parentView,
  #adminView,
  #settingsView,
  #printReportButton {
    display: none !important;
  }

  #appPanel,
  #financeView,
  #financeView.view,
  .panel {
    display: block !important;
  }

  .panel {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}
