:root {
  --font-ui: Roboto, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ink: #252525;
  --muted: #6b6b6b;
  --line: #dedede;
  --surface: #ffffff;
  --wash: #f8f8f8;
  --nav: #0b1018;
  --nav-soft: #181818;
  --brand-red: #b30005;
  --brand-red-dark: #8f0004;
  --brand-red-soft: #f8e7e8;
  --charcoal: #353535;
  --green: #207245;
  --green-soft: #e4f2e9;
  --red: #af3f38;
  --blue-soft: #eaf1f8;
  --shadow: 0 18px 60px rgba(11, 16, 24, 0.16);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

.guidelines-page-body {
  margin: 0;
  background: #f4f1ee;
  color: #232323;
  font-family: Inter, Arial, sans-serif;
}

.guidelines-page-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.guidelines-page-header {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
  padding: 28px;
  background: #fff;
  border: 1px solid #ded9d2;
  border-radius: 8px;
  box-shadow: 0 20px 55px rgba(41, 35, 31, 0.08);
}

.guidelines-page-header img {
  width: 170px;
  max-width: 100%;
  height: auto;
}

.guidelines-page-header span,
.academy-guidelines-content h4 {
  color: #9c0004;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guidelines-page-header h1 {
  margin: 6px 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.guidelines-page-header p {
  margin: 0;
  color: #69615b;
  font-size: 17px;
  line-height: 1.5;
}

.academy-guidelines-content {
  display: grid;
  gap: 14px;
}

.academy-guidelines-content section {
  padding: 22px;
  background: #fff;
  border: 1px solid #ded9d2;
  border-radius: 8px;
}

.academy-guidelines-content h2,
.academy-guidelines-content h3 {
  margin: 0 0 10px;
  color: #222;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.academy-guidelines-content h4 {
  margin: 18px 0 8px;
  letter-spacing: 0.04em;
}

.academy-guidelines-content p {
  margin: 0 0 12px;
  color: #4d4945;
  font-size: 15px;
  line-height: 1.65;
}

.academy-guidelines-content p:last-child {
  margin-bottom: 0;
}

.public-guidelines-content {
  margin-top: 16px;
}

.guidelines-admin-section .section-heading {
  align-items: start;
}

@media (max-width: 720px) {
  .guidelines-page-header {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: var(--font-ui);
  letter-spacing: 0;
}

body.local-file-mode .local-file-warning {
  display: grid !important;
}

body.local-file-mode .app-shell {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.date-picker-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.date-picker-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.date-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  gap: 12px;
  padding: 10px 12px;
  color: #2f3337;
  background: #fff;
  border: 1px solid #d7dde4;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.date-picker-button:hover {
  border-color: #b9c2cc;
  background: #fffdfa;
}

.date-picker-button:focus-visible,
.date-picker-button[aria-expanded="true"] {
  outline: 3px solid rgba(153, 27, 27, 0.14);
  border-color: #9b111e;
}

.date-picker-button.is-empty {
  color: #7b838c;
  font-weight: 750;
}

.date-picker-icon {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid #727b85;
  border-radius: 5px;
}

.date-picker-icon::before,
.date-picker-icon::after {
  position: absolute;
  content: "";
  background: #727b85;
}

.date-picker-icon::before {
  top: 3px;
  left: 2px;
  right: 2px;
  height: 2px;
}

.date-picker-icon::after {
  top: -4px;
  left: 4px;
  width: 6px;
  height: 5px;
  border-radius: 2px;
  box-shadow: 7px 0 0 #727b85;
}

.date-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 9000;
  width: min(328px, calc(100vw - 32px));
  padding: 14px;
  color: #22272d;
  background: #fff;
  border: 1px solid #dce2e8;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(25, 31, 38, 0.18);
}

.date-picker-popover.align-right {
  right: 0;
  left: auto;
}

.date-picker-header {
  display: grid;
  grid-template-columns: 34px 34px minmax(0, 1fr) 34px 34px;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.date-picker-header strong {
  color: #25292e;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.date-picker-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #3f464d;
  background: #f5f7f9;
  border: 1px solid #e0e6ec;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}

.date-picker-nav:hover,
.date-picker-footer button:hover {
  color: #9b111e;
  background: #fff4f2;
  border-color: #f1c9c4;
}

.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.date-picker-weekdays {
  margin-bottom: 6px;
}

.date-picker-weekdays span {
  color: #707983;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.date-picker-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0;
  color: #25292e;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
}

.date-picker-day:hover:not(:disabled) {
  color: #8f171f;
  background: #fff4f2;
}

.date-picker-day.is-outside {
  color: #a0a8b1;
}

.date-picker-day.is-today {
  border-color: #cbd4de;
}

.date-picker-day.is-selected {
  color: #fff;
  background: #9b111e;
  border-color: #9b111e;
}

.date-picker-day.is-disabled {
  color: #c0c6cd;
  cursor: not-allowed;
}

.date-picker-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef1f4;
}

.date-picker-footer button {
  min-height: 32px;
  padding: 0 12px;
  color: #454c54;
  background: #f7f8fa;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

label > .date-picker-control {
  margin-top: 7px;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #f8f5eb;
  background: linear-gradient(180deg, #353535, #2f3437);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
  display: block;
  width: 204px;
  max-width: 100%;
  height: auto;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding: 18px 0;
}

.nav-item {
  width: 100%;
  padding: 14px 22px;
  color: rgba(248, 245, 235, 0.82);
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 4px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(179, 0, 5, 0.22);
  border-left-color: var(--brand-red);
}

.nav-subitem {
  width: calc(100% - 18px);
  margin-left: 18px;
  padding: 10px 18px;
  color: rgba(248, 245, 235, 0.72);
  font-size: 14px;
}

.nav-subitem::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1px;
  margin-right: 8px;
  vertical-align: middle;
  background: rgba(248, 245, 235, 0.45);
}

.collapse-button {
  margin: auto 22px 24px;
  padding: 11px 14px;
  color: rgba(248, 245, 235, 0.86);
  background: transparent;
  border: 1px solid rgba(248, 245, 235, 0.3);
  border-radius: 6px;
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 18px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.breadcrumb {
  margin-bottom: 5px;
  color: var(--brand-red);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 2px;
  font-family: var(--font-ui);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
}

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

h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.header-subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.top-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.small-button,
.text-button,
.icon-button {
  min-height: 38px;
  border-radius: 6px;
}

.primary-button {
  padding: 0 18px;
  color: #fff;
  background: var(--brand-red);
  border: 1px solid var(--brand-red-dark);
}

.ghost-button,
.small-button,
.icon-button {
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.small-button {
  min-height: 34px;
}

.text-button {
  padding: 0;
  color: var(--brand-red);
  background: transparent;
  border: 0;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 5px;
}

.warning {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.neutral {
  color: #4f5962;
  background: #eceff1;
}

.success {
  color: var(--green);
  background: var(--green-soft);
}

.status-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: 258px minmax(600px, 1fr) 320px;
  gap: 0;
  min-height: calc(100vh - 129px);
}

.family-panel,
.builder-panel,
.ledger-panel {
  background: var(--surface);
}

.family-panel {
  padding: 24px 18px;
  color: #fff;
  background: #34383b;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.section-label {
  margin-bottom: 8px;
  color: #ffb3b6;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.family-panel h2 {
  margin-bottom: 4px;
  font-family: var(--font-ui);
  font-size: 27px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.family-panel .muted {
  color: rgba(255, 255, 255, 0.68);
}

.contact-stack {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.family-panel .divider {
  background: rgba(255, 255, 255, 0.16);
}

.student-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  color: #fff;
  text-align: left;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.student-card.active-student {
  border-color: var(--brand-red);
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--brand-red);
  border-radius: 50%;
}

.avatar.secondary {
  background: #52616d;
}

.student-card small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.67);
}

.directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.directory-toolbar strong {
  color: #fff;
  font-size: 13px;
}

.directory-action-row {
  display: flex;
  gap: 6px;
}

.mini-action-button {
  min-height: 30px;
  padding: 5px 9px;
  color: #fff;
  background: var(--brand-red);
  border: 1px solid var(--brand-red);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.secondary-mini {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.directory-search-label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.directory-search-label input {
  min-height: 36px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.directory-search-label input::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.directory-import-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.directory-list {
  display: grid;
  gap: 4px;
}

.directory-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  width: 100%;
  min-height: 54px;
  padding: 9px 10px;
  color: #fff;
  text-align: left;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.directory-card.active-directory-card {
  border-color: var(--brand-red);
  background: rgba(255, 255, 255, 0.05);
}

.directory-card small,
.directory-card em {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 11px;
  font-style: normal;
}

.directory-card em {
  color: #ffb3b6;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-directory-state {
  display: grid;
  gap: 6px;
  padding: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.empty-directory-state small {
  color: var(--muted);
  line-height: 1.35;
}

.builder-panel {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.workflow-focus {
  padding: 20px 24px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.workflow-focus-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.workflow-focus-header h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.workflow-focus-note {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

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

.workflow-tab {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "step title"
    "step detail";
  align-items: center;
  gap: 2px 10px;
  min-height: 86px;
  padding: 14px;
  text-align: left;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workflow-tab span {
  grid-area: step;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--brand-red);
  background: var(--brand-red-soft);
  border-radius: 999px;
  font-weight: 900;
}

.workflow-tab strong {
  grid-area: title;
  font-size: 16px;
}

.workflow-tab small {
  grid-area: detail;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.workflow-tab:hover,
.workflow-tab.active {
  background: #fff;
  border-color: rgba(179, 0, 5, 0.4);
  box-shadow: 0 12px 30px rgba(37, 37, 37, 0.08);
}

.workflow-tab.active span {
  color: #fff;
  background: var(--brand-red);
}

.advanced-module-drawer {
  background: #fbfbfb;
  border-bottom: 1px solid var(--line);
}

.advanced-module-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 24px;
  cursor: pointer;
}

.advanced-module-drawer summary span {
  color: var(--ink);
  font-weight: 900;
}

.advanced-module-drawer summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 14px 24px 0;
  border-bottom: 1px solid var(--line);
}

.compact-tabs {
  padding-top: 0;
  background: #fff;
}

.tab {
  min-height: 42px;
  padding: 0 4px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 800;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--brand-red);
}

.module-panel-note {
  display: grid;
  gap: 4px;
  padding: 14px 24px;
  background: #fbfbfb;
  border-bottom: 1px solid var(--line);
}

.module-panel-note strong {
  font-size: 16px;
}

.module-panel-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.form-section,
.lower-grid {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.module-hidden {
  display: none;
}

.dashboard-section {
  background: #fbfbfb;
}

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

.dashboard-hero-card {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.dashboard-hero-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-hero-card strong {
  font-size: 18px;
}

.dashboard-hero-card strong.is-ready {
  color: var(--green);
}

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

.dashboard-link-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

.dashboard-link-card span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-link-card h3 {
  margin: 4px 0;
}

.dashboard-link-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.dashboard-link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.dashboard-link-actions input {
  min-height: 40px;
  font-size: 13px;
}

.dashboard-open-link {
  text-decoration: none;
}

.dashboard-open-link.disabled-link {
  color: var(--muted);
  background: #f5f5f5;
  border-color: var(--line);
  cursor: not-allowed;
  opacity: 0.72;
  pointer-events: auto;
}

.dashboard-copy-link:disabled,
#dashboardCreateParentLink:disabled,
#copyPortalLink:disabled {
  color: var(--muted);
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.72;
}

.live-testing-guide {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--charcoal);
  border-radius: 6px;
}

.live-testing-guide-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.live-testing-guide-heading span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.live-testing-guide-heading h3 {
  margin: 4px 0 0;
}

.live-testing-guide-heading small {
  color: var(--muted);
  font-weight: 800;
}

.live-testing-step-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.live-testing-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 11px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-left: 4px solid transparent;
}

.live-testing-step:first-child {
  border-top: 0;
}

.live-testing-step.current {
  border-left-color: var(--brand-red);
  background: var(--brand-red-soft);
}

.live-testing-step.ready {
  border-left-color: #d49000;
  background: #fffaf0;
}

.live-testing-step.complete {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.live-testing-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.live-testing-step strong {
  display: block;
  margin-bottom: 3px;
}

.live-testing-step small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.live-testing-step em {
  color: var(--charcoal);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-testing-step .mini-action-button {
  white-space: nowrap;
}

.prototype-test-drive {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

body.hide-production-tools .prototype-test-drive,
body.hide-production-tools .integration-smoke-test-panel,
body.hide-production-tools .local-dev-tool {
  display: none;
}

.prototype-test-drive span {
  display: block;
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.prototype-test-drive h3,
.prototype-test-drive p {
  margin: 0;
}

.prototype-test-drive p,
.test-drive-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.test-drive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.test-drive-grid .small-button {
  width: 100%;
}

.test-drive-status {
  padding: 10px 12px;
  background: #f7f8f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

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

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

.dashboard-card h3 {
  margin-bottom: 0;
}

.dashboard-mini-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.dashboard-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  min-height: 46px;
  padding: 9px 11px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-left: 4px solid transparent;
  font-size: 13px;
}

.dashboard-mini-row:first-child {
  border-top: 0;
}

.dashboard-mini-row.warning {
  border-left-color: #d49000;
}

.dashboard-mini-row.danger {
  border-left-color: var(--brand-red);
}

.dashboard-mini-row span {
  color: #343434;
  font-weight: 700;
}

.dashboard-mini-row strong {
  color: var(--charcoal);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-mini-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}

.post-submission-pipeline {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.post-submission-pipeline h3 {
  margin-bottom: 0;
}

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

.pipeline-step {
  display: grid;
  gap: 5px;
  padding: 11px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pipeline-step.complete {
  background: var(--green-soft);
  border-color: #b9ddc5;
}

.pipeline-step.ready {
  background: var(--brand-red-soft);
  border-color: #efc8cd;
}

.pipeline-step span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pipeline-step strong {
  font-size: 14px;
}

.pipeline-step small {
  color: var(--muted);
  line-height: 1.35;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.registration-details-grid {
  align-items: start;
}

.registration-details-grid label {
  align-content: start;
  min-width: 0;
}

.registration-details-grid input,
.registration-details-grid select {
  min-height: 40px;
}

.admin-recipient-grid {
  align-items: stretch;
}

.wide-field {
  grid-column: span 2;
}

.inline-note {
  max-width: 430px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.path-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}

.path-card input {
  min-height: auto;
  margin-top: 3px;
}

.path-card strong,
.path-card small {
  display: block;
}

.path-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.path-card.active-path {
  border-color: var(--brand-red);
  box-shadow: inset 4px 0 0 var(--brand-red);
}

.new-registration-guide {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--brand-red-soft);
  border: 1px solid #e9b9bd;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.new-registration-guide strong {
  color: var(--brand-red-dark);
}

.admin-parent-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.admin-parent-split div {
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #efc8cd;
  border-radius: 6px;
}

.admin-parent-split h3 {
  margin-bottom: 6px;
  color: var(--charcoal);
  font-size: 14px;
}

.admin-parent-split ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.admin-parent-split li + li {
  margin-top: 4px;
}

.registration-prep-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.registration-prep-overview div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-areas:
    "step title"
    "step detail";
  gap: 3px 10px;
  min-height: 94px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.registration-prep-overview span {
  grid-area: step;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--brand-red);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.registration-prep-overview strong {
  grid-area: title;
  font-size: 14px;
}

.registration-prep-overview small {
  grid-area: detail;
  color: var(--muted);
  line-height: 1.35;
}

.import-command-center {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

.next-action-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--charcoal);
  border-radius: 6px;
}

.next-action-panel span {
  color: var(--brand-red-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.next-action-panel h3 {
  margin: 4px 0;
}

.next-action-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.import-command-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.import-command-header span {
  color: var(--brand-red-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.import-command-header h3 {
  margin: 4px 0;
}

.import-command-header p,
.import-command-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.import-command-header strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  border-radius: 6px;
  font-size: 13px;
}

.import-command-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.import-command-step {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 12px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.import-command-step b {
  font-size: 13px;
}

.import-command-step small {
  color: var(--muted);
  line-height: 1.35;
}

.import-command-step.is-ready {
  background: #f4faf6;
  border-color: #b9dcc7;
}

.import-command-step.is-warning {
  background: #fff8ec;
  border-color: #eed3a4;
}

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

.imported-family-preview {
  display: grid;
  gap: 10px;
}

.imported-family-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.imported-family-preview-header strong {
  color: var(--text);
  font-size: 13px;
}

.imported-family-preview-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.imported-family-preview-header.empty {
  border-style: dashed;
}

.imported-family-list {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
}

.imported-family-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(130px, 1fr) minmax(90px, 0.7fr) minmax(130px, 0.9fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.imported-family-row:hover {
  border-color: #d9b7b9;
  background: #fffafa;
}

.imported-family-row strong,
.imported-family-row span,
.imported-family-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imported-family-row strong {
  font-size: 13px;
}

.imported-family-row span {
  color: var(--muted);
  font-size: 12px;
}

.imported-family-row em {
  color: #7a2c2c;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.migration-import-guide,
.migration-import-preview {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.migration-import-guide strong,
.migration-import-preview strong {
  color: var(--text);
  font-size: 13px;
}

.migration-import-preview.is-ready {
  background: #f4faf6;
  border-color: #b9dcc7;
}

.migration-import-preview.is-warning {
  background: #fff8ec;
  border-color: #eed3a4;
}

.migration-import-preview ul {
  margin: 0;
  padding-left: 18px;
}

.migration-section {
  background: #fafafa;
}

.migration-section.is-muted {
  opacity: 0.74;
}

.migration-section.is-hidden-for-new-family {
  display: none;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.registration-fees-section {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

.import-readiness {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.readiness-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.readiness-header h3 {
  margin-bottom: 0;
}

.readiness-header span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.migration-queue-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.compact-heading {
  margin-bottom: 0;
}

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

.migration-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.migration-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.migration-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}

.migration-review-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr) auto auto;
  gap: 12px;
  align-items: end;
}

.add-migration-record-button {
  align-self: end;
}

.migration-batch-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.migration-batch-panel textarea {
  width: 100%;
  min-height: 126px;
  resize: vertical;
  font-family: inherit;
}

.migration-batch-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

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

.migration-policy-panel div {
  padding: 13px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.migration-policy-panel h3 {
  margin-bottom: 5px;
}

.migration-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.migration-queue-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.migration-queue-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.1fr) minmax(150px, 0.9fr) minmax(135px, 0.8fr) minmax(135px, 0.8fr) minmax(120px, 0.7fr) minmax(210px, 1.1fr) minmax(220px, 1.2fr) 120px;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
  min-width: 1480px;
}

.migration-queue-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.migration-queue-row:first-child {
  border-top: 0;
}

.migration-queue-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.migration-status-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #284f38;
  background: var(--green-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.migration-status-pill.needs-review,
.migration-status-pill.duplicate-contact {
  color: #8b5200;
  background: #fff1d6;
}

.migration-status-pill.payment-missing {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.account-mode-note {
  margin-top: 16px;
  padding: 12px 14px;
  color: #4b4b4b;
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 5px;
  font-size: 14px;
}

.parent-completed-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  color: var(--ink);
  background: #fff7f8;
  border: 1px solid #e9b9bd;
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

.parent-completed-card strong {
  color: var(--brand-red-dark);
  font-size: 14px;
}

.parent-completed-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.parent-completed-card li + li {
  margin-top: 4px;
}

.parent-completed-hidden-fields {
  display: none;
}

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

.fee-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.prepared-fee-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

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

.registration-link-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.registration-link-action-row .field-help {
  flex: 1 1 280px;
  margin-top: 0;
}

.service-ledger-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.service-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.service-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.service-entry-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.8fr) 110px minmax(120px, 0.8fr) minmax(135px, 0.9fr);
  gap: 14px;
  align-items: end;
}

.add-service-button {
  align-self: end;
}

.service-ledger-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.service-ledger-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 105px 90px 105px 125px minmax(260px, 1.4fr) 34px;
  gap: 10px;
  align-items: center;
  min-width: 900px;
  min-height: 50px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.service-ledger-row:first-child {
  border-top: 0;
}

.service-ledger-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.service-status-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #284f38;
  background: var(--green-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.temporary-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.temporary-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.temporary-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 14px;
  align-items: end;
}

.temporary-entry-panel {
  display: grid;
  gap: 14px;
}

.temporary-entry-panel summary {
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  padding: 0 16px;
  color: #fff;
  background: var(--brand-red);
  border: 1px solid var(--brand-red-dark);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

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

.temporary-entry-panel[open] summary {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.temporary-entry-panel[open] .temporary-entry-grid {
  margin-top: 14px;
}

.add-temporary-button {
  align-self: end;
}

.temporary-policy-panel {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  color: var(--charcoal);
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.temporary-conversion-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  color: var(--charcoal);
  background: #fff1f3;
  border: 1px solid #efc8cd;
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

.temporary-conversion-panel[hidden] {
  display: none;
}

.temporary-conversion-panel h3,
.temporary-conversion-panel p {
  margin-bottom: 0;
}

.temporary-conversion-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.temporary-conversion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.temporary-export-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  color: var(--charcoal);
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.temporary-export-panel h3,
.temporary-export-panel p {
  margin-bottom: 0;
}

.temporary-export-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.temporary-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.temporary-enrollment-table {
  display: grid;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.temporary-enrollment-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) minmax(150px, 0.85fr) minmax(160px, 0.85fr) 95px 95px minmax(170px, 0.95fr) minmax(145px, 0.8fr) minmax(210px, 0.95fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.temporary-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.temporary-row-actions .mini-action-button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 11px;
}

.temporary-enrollment-row:first-child {
  border-top: 0;
}

.temporary-enrollment-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.temporary-enrollment-row strong,
.temporary-enrollment-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.temporary-enrollment-row .temporary-row-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.temporary-action-select {
  min-height: 30px;
  max-width: 118px;
  padding: 5px 8px;
  color: #fff;
  background: var(--brand-red);
  border: 1px solid var(--brand-red);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.temporary-action-select:disabled {
  opacity: 0.55;
}

.temporary-enrollment-row .temporary-inline-edit {
  color: #2f3439;
  background: #fff;
  border: 1px solid var(--line);
}

.temporary-enrollment-row .temporary-family-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.temporary-enrollment-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.temporary-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 7px;
  background: #f1f1f1;
  border-radius: 999px;
  font-weight: 900;
}

.temporary-status-pill.summer-active,
.temporary-status-pill.trial-scheduled,
.temporary-status-pill.pending-registration,
.temporary-status-pill.registration-sent {
  color: var(--green);
  background: var(--green-soft);
}

.temporary-status-pill.registered {
  color: var(--green);
  background: var(--green-soft);
}

.temporary-status-pill.terminated {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.cancellation-action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.cancellation-action-panel h3,
.cancellation-action-panel p {
  margin-bottom: 0;
}

.cancellation-action-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.cancellation-record-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cancellation-record-row {
  display: grid;
  grid-template-columns: 115px minmax(160px, 1fr) 115px 105px 145px 115px minmax(260px, 1.4fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 1200px;
  min-height: 50px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.cancellation-record-row:first-child {
  border-top: 0;
}

.cancellation-record-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.cancellation-record-row strong {
  display: grid;
  gap: 3px;
}

.cancellation-record-row small {
  color: var(--muted);
  font-size: 11px;
}

.service-status-pill.draft,
.service-status-pill.paused {
  color: #8b5200;
  background: #fff1d6;
}

.service-status-pill.cancelled {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.checkbox-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 600;
}

.checkbox-row input {
  min-height: auto;
}

label {
  display: grid;
  gap: 7px;
  color: #30363d;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d2d2d2;
  border-radius: 5px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-red);
  outline: 1px solid var(--brand-red);
}

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

.line-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.line-row {
  display: grid;
  grid-template-columns: 76px minmax(210px, 1.8fr) 76px 110px 112px 34px;
  align-items: center;
  gap: 12px;
  min-height: 51px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}

.line-row:first-child {
  border-top: 0;
}

.line-row.header {
  min-height: 38px;
  color: #59626c;
  font-size: 12px;
  font-weight: 700;
  background: #f4f4f4;
}

.calculated-line-row {
  background: #fbfcfd;
}

.manual-payment-line-row {
  background: #fff;
}

.manual-payment-line-row input[type="text"] {
  width: 100%;
  min-width: 0;
}

.line-row input[data-field="unit"] {
  appearance: textfield;
}

.line-row input[data-field="unit"]::-webkit-outer-spin-button,
.line-row input[data-field="unit"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.line-total-row {
  min-height: 44px;
  font-weight: 800;
  background: #faf7f4;
}

.line-total-row strong {
  font-size: 15px;
}

.line-row-calculated-label {
  justify-self: start;
  color: #6a737d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.item-type {
  justify-self: start;
  padding: 4px 7px;
  color: #284f38;
  background: var(--green-soft);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.item-type.fee {
  color: #633232;
  background: var(--brand-red-soft);
}

.item-type.discount {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.remove-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--red);
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.delivery-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.migration-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.payment-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.adjustment-section {
  background: #fff;
}

.adjustment-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 150px 110px minmax(170px, 1fr);
  gap: 14px;
  align-items: end;
}

.add-adjustment-button {
  align-self: end;
}

.adjustment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.adjustment-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.adjustment-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.adjustment-table {
  display: grid;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.adjustment-row {
  display: grid;
  grid-template-columns: 135px 105px 95px 130px 80px minmax(180px, 1fr) 34px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.adjustment-row:first-child {
  border-top: 0;
}

.adjustment-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-size: 12px;
  font-weight: 800;
}

.adjustment-row strong {
  text-align: right;
}

.adjustment-type {
  justify-self: start;
  padding: 4px 7px;
  color: #4f5962;
  background: #eceff1;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.adjustment-type.warning {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.adjustment-type.billing {
  color: #284f38;
  background: var(--green-soft);
}

.adjustment-type.payroll {
  color: #334960;
  background: var(--blue-soft);
}

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

.calendar-manager-section {
  background: #fbfbfb;
}

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

.calendar-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.calendar-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.academy-calendar-plan {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.academy-calendar-plan-header {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.academy-calendar-plan-header div,
.academy-calendar-break-list article,
.academy-weekday-count {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.academy-calendar-plan span,
.academy-weekday-count span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.academy-calendar-plan strong,
.academy-weekday-count strong {
  color: var(--ink);
}

.academy-calendar-break-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.academy-calendar-break-list article {
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.academy-calendar-break-list small,
.academy-calendar-source,
.academy-weekday-count small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.academy-calendar-source {
  margin: 0;
}

.academy-calendar-counts {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.academy-weekday-count {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.academy-weekday-count.is-balanced {
  border-color: rgba(27, 118, 84, 0.28);
  background: #f6fbf8;
}

.academy-weekday-count.needs-review {
  border-color: rgba(164, 40, 54, 0.35);
  background: #fff7f8;
}

.calendar-entry-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 150px minmax(160px, 1fr) minmax(140px, 1fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: end;
}

.add-calendar-event-button {
  align-self: end;
}

.calendar-policy-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.calendar-policy-panel div {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.calendar-policy-panel h3 {
  margin-bottom: 5px;
}

.calendar-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.calendar-event-table {
  display: grid;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.calendar-event-row {
  display: grid;
  grid-template-columns: 105px 92px 135px 130px minmax(160px, 0.8fr) minmax(220px, 1.2fr) 96px;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.calendar-event-row:first-child {
  border-top: 0;
}

.calendar-event-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.calendar-type-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #334960;
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-type-pill.concert,
.calendar-type-pill.rehearsal {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.calendar-type-pill.break,
.calendar-type-pill.closure {
  color: #4f5962;
  background: #eceff1;
}

.rollover-section {
  background: #fbfbfb;
}

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

.rollover-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rollover-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.rollover-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.add-rollover-button {
  align-self: end;
  min-width: 0;
}

.rollover-policy-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.rollover-policy-panel div {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.rollover-policy-panel h3 {
  margin-bottom: 5px;
}

.rollover-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.rollover-table {
  display: grid;
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rollover-row {
  display: grid;
  grid-template-columns: 95px minmax(180px, 1fr) 185px minmax(140px, 0.8fr) minmax(150px, 0.8fr) minmax(240px, 1.2fr) 34px;
  gap: 10px;
  align-items: center;
  min-width: 1080px;
  min-height: 52px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.rollover-row:first-child {
  border-top: 0;
}

.rollover-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.rollover-status-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #284f38;
  background: var(--green-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.rollover-status-pill.guidelines-acknowledgement-needed,
.rollover-status-pill.teacher-confirmation-needed {
  color: #8b5200;
  background: #fff1d6;
}

.rollover-status-pill.payment-review-needed,
.rollover-status-pill.discontinuing {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.info-panel {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.lesson-dates-panel {
  min-height: 186px;
}

.lesson-dates-list,
.preview-lesson-dates {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.calendar-rule-summary {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.calendar-rule-summary span,
.preview-lesson-dates {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  color: #353535;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.date-chip.more-chip {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  border-color: rgba(179, 0, 5, 0.18);
}

.count-row,
.billing-line,
.finance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #ece8df;
}

.count-row:last-child,
.billing-line:last-child,
.finance-row:last-child {
  border-bottom: 0;
}

.remaining strong {
  color: var(--green);
}

.radio-row {
  grid-template-columns: 18px 1fr;
  align-items: center;
  margin: 8px 0;
  font-weight: 500;
}

.radio-row input {
  min-height: auto;
}

.restricted-methods,
.internal-exception-panel {
  margin-top: 12px;
  padding: 12px;
  color: #4b4b4b;
  background: #f6f6f6;
  border: 1px dashed #b9b9b9;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.restricted-methods span {
  display: block;
  color: var(--muted);
}

.internal-exception-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: end;
  margin-top: 18px;
  border-left: 4px solid #777;
}

.internal-exception-panel h3 {
  margin-bottom: 5px;
}

.internal-exception-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.collection-section {
  background: #fbfbfb;
}

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

.collection-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.collection-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.billing-run-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.billing-run-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.billing-run-heading h3 {
  margin-bottom: 4px;
}

.billing-run-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.billing-run-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.billing-run-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.billing-run-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.billing-run-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.billing-readiness-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.billing-readiness-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.billing-readiness-heading h3 {
  margin-bottom: 4px;
}

.billing-readiness-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.billing-readiness-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-readiness-pill.ready {
  background: #2f7d57;
}

.billing-readiness-pill.needs-review {
  background: #9a6b1f;
}

.billing-readiness-pill.blocked {
  background: var(--brand-red);
}

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

.billing-readiness-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.billing-readiness-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.billing-readiness-list {
  display: grid;
  gap: 8px;
}

.billing-readiness-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.billing-readiness-item strong {
  color: var(--charcoal);
  font-size: 12px;
  text-transform: uppercase;
}

.billing-readiness-item.blocker strong {
  color: var(--brand-red);
}

.billing-readiness-item.warning strong {
  color: #9a6b1f;
}

.billing-readiness-item.pass strong {
  color: #2f7d57;
}

.billing-export-preview-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.billing-export-preview-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.billing-export-preview-row {
  display: grid;
  grid-template-columns: 105px 155px 150px 150px 90px 95px minmax(250px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 995px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.billing-export-preview-row:first-child {
  border-top: 0;
}

.billing-export-preview-row.header {
  color: #fff;
  background: var(--charcoal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.accounting-export-log-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.accounting-export-log-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.accounting-export-log-row {
  display: grid;
  grid-template-columns: 110px 210px 150px 150px 90px 110px minmax(240px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 1060px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.accounting-export-log-row:first-child {
  border-top: 0;
}

.accounting-export-log-row.header {
  color: #fff;
  background: var(--charcoal);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-run-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.billing-run-row {
  display: grid;
  grid-template-columns: 105px 150px 150px 150px 90px 95px minmax(250px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 980px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.billing-run-row:first-child {
  border-top: 0;
}

.billing-run-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.billing-run-pill {
  justify-self: start;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-run-pill.billable {
  color: #284f38;
  background: var(--green-soft);
}

.billing-run-pill.blocked {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.payment-entry-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 150px 110px 130px;
  gap: 14px;
  align-items: end;
}

.add-payment-button {
  align-self: end;
}

.collection-policy-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.collection-policy-panel div {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.collection-policy-panel h3 {
  margin-bottom: 5px;
}

.collection-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.cancellation-workflow-panel {
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cancellation-workflow-panel .readiness-header span.is-ready {
  color: var(--green);
  background: var(--green-soft);
}

.cancellation-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.cancellation-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cancellation-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.cancellation-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 14px;
}

.payment-ledger-table {
  display: grid;
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-ledger-row {
  display: grid;
  grid-template-columns: 105px 150px minmax(150px, 1fr) 95px 85px minmax(180px, 1.2fr) 130px;
  gap: 10px;
  align-items: center;
  min-width: 920px;
  min-height: 48px;
  padding: 8px 12px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.payment-ledger-row:first-child {
  border-top: 0;
}

.payment-ledger-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-size: 12px;
  font-weight: 800;
}

.payment-ledger-row strong {
  text-align: right;
}

.payment-authorization-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.payment-authorization-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.payment-authorization-heading h3 {
  margin-bottom: 4px;
}

.payment-authorization-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.payment-authorization-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.payment-authorization-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.payment-authorization-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-authorization-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-authorization-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pad-treasury-export-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.pad-treasury-export-panel h3 {
  margin-bottom: 4px;
}

.pad-treasury-export-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.pad-treasury-export-panel .export-button-row {
  align-items: center;
  justify-content: flex-end;
}

.pad-treasury-export-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pad-treasury-export-panel #padTreasuryExportStatus.ready {
  color: #0f7a4f;
}

.pad-treasury-export-panel #padTreasuryExportStatus.warning {
  color: #7a4f0f;
}

.pad-treasury-export-panel #padTreasuryExportStatus.blocked {
  color: #9a1b1f;
}

.pad-batch-readiness-summary {
  max-width: 760px;
}

.payment-authorization-row {
  display: grid;
  grid-template-columns: 105px 150px 105px 150px 170px minmax(240px, 1fr) 34px;
  gap: 10px;
  align-items: center;
  min-width: 980px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.payment-authorization-row:first-child {
  border-top: 0;
}

.payment-authorization-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.payment-authorization-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #8b5200;
  background: #fff1d6;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-authorization-pill.authorized {
  color: #284f38;
  background: var(--green-soft);
}

.payment-authorization-pill.revoked {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.payment-method-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #4f5962;
  background: #eceff1;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-method-pill.collected,
.payment-method-pill.applied {
  color: var(--green);
  background: var(--green-soft);
}

.payment-method-pill.failed,
.payment-method-pill.open {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.portal-link-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
  align-items: end;
  margin-top: 18px;
  padding: 14px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.portal-link-panel h3 {
  margin-bottom: 4px;
}

.portal-link-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.portal-link-panel input {
  background: #fff;
  font-size: 13px;
}

.portal-link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.parent-link-helper {
  grid-column: 1 / -1;
  padding: 10px 12px;
  color: var(--charcoal);
  background: #fff7f8;
  border: 1px solid #efc8cd;
  border-radius: 6px;
}

.prepared-package-summary {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.prepared-package-summary > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.prepared-package-summary span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.prepared-package-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.agreement-record-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.agreement-record-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.agreement-record-heading h3 {
  margin-bottom: 4px;
}

.agreement-record-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.agreement-record-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.agreement-record-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.agreement-record-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.agreement-record-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.agreement-record-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.agreement-record-row:first-child {
  border-top: 0;
}

.agreement-record-row.header {
  min-height: 36px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.agreement-record-row span {
  color: var(--muted);
}

.agreement-change-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

.agreement-change-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.agreement-change-heading h3 {
  margin-bottom: 4px;
}

.agreement-change-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.agreement-change-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.agreement-change-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff7f8;
  border: 1px solid #e9b9bd;
  border-radius: 6px;
}

.agreement-change-summary-grid span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.agreement-change-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.agreement-change-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) minmax(120px, 0.4fr) minmax(0, 0.55fr) minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.agreement-change-row:first-child {
  border-top: 0;
}

.agreement-change-row.header {
  min-height: 36px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.agreement-change-row span {
  color: var(--muted);
}

.agreement-export-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.agreement-export-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.agreement-export-heading h3 {
  margin-bottom: 4px;
}

.agreement-export-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.agreement-export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.agreement-export-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.agreement-export-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.agreement-export-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.agreement-export-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.agreement-export-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(170px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.agreement-export-row:first-child {
  border-top: 0;
}

.agreement-export-row.header {
  min-height: 36px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.agreement-export-row span {
  color: var(--muted);
}

.payment-schedule-panel {
  margin-top: 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.registration-lesson-count-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 16px;
}

.registration-lesson-count-panel .info-panel {
  min-height: 100%;
  padding: 18px 20px;
  background: #fffdfb;
  border-color: rgba(179, 0, 5, 0.18);
  box-shadow: 0 8px 24px rgba(41, 37, 36, 0.06);
}

.registration-lesson-count-panel h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.25;
}

.lesson-count-result {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(89, 79, 70, 0.14);
}

.lesson-count-result strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.lesson-count-result span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.registration-lesson-count-panel .lesson-dates-list {
  display: block;
  margin-top: 12px;
}

.registration-lesson-count-panel .lesson-count-detail {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.duration-change-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 180px;
  gap: 14px;
  align-items: end;
  margin-top: 18px;
  padding: 14px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.duration-change-panel h3 {
  margin-bottom: 4px;
}

.duration-change-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.rate-card-panel {
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.rate-card-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rate-card-grid span {
  color: var(--muted);
  font-size: 12px;
}

.payment-schedule-table,
.preview-payment-schedule {
  display: grid;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 1fr) 110px;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.schedule-row:first-child {
  border-top: 0;
}

.schedule-row.header {
  color: var(--muted);
  font-weight: 800;
  background: #f7f7f7;
}

.schedule-row strong {
  text-align: right;
}

.schedule-policy-note {
  margin: 10px 0 0;
}

.alignment-audit {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
  font-size: 13px;
}

.alignment-audit span {
  color: var(--muted);
  line-height: 1.35;
}

.teacher-ledger-section {
  margin-top: 18px;
  padding: 14px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.teacher-payroll-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.teacher-payroll-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.teacher-payroll-entry-grid {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) 110px 105px 120px;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.add-teacher-payroll-button {
  align-self: end;
}

.teacher-ledger-table {
  display: grid;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.teacher-ledger-row {
  display: grid;
  grid-template-columns: 92px 120px 130px 55px 78px 88px 85px minmax(180px, 1fr) 34px;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.teacher-ledger-row:first-child {
  border-top: 0;
}

.teacher-ledger-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.teacher-ledger-row strong {
  text-align: right;
}

.payroll-status-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #4f5962;
  background: #eceff1;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.payroll-status-pill.approved,
.payroll-status-pill.paid {
  color: var(--green);
  background: var(--green-soft);
}

.payroll-status-pill.hold,
.payroll-status-pill.draft {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.payroll-status-pill.volunteer {
  color: #334960;
  background: var(--blue-soft);
}

.teacher-workspace-section {
  background: #fbfbfb;
}

.teacher-workspace-header {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.teacher-workspace-header div {
  display: grid;
  gap: 4px;
  min-height: 94px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.teacher-workspace-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.teacher-workspace-header strong {
  font-size: 17px;
}

.teacher-workspace-header small {
  color: var(--muted);
  line-height: 1.35;
}

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

.teacher-workspace-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.teacher-workspace-card h3 {
  margin-bottom: 0;
}

.teacher-confirmation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.teacher-confirmation-panel h3,
.teacher-confirmation-panel p {
  margin: 0;
}

.teacher-confirmation-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.teacher-mini-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.teacher-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  min-height: 44px;
  padding: 9px 11px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.teacher-mini-row:first-child {
  border-top: 0;
}

.teacher-mini-row span {
  color: #343434;
  font-weight: 700;
}

.teacher-mini-row strong {
  color: var(--charcoal);
  font-size: 12px;
  white-space: nowrap;
}

.teacher-mini-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}

.accounting-section {
  background: #fbfbfb;
}

.accounting-snapshot-grid,
.export-ledger-grid,
.quickbooks-health-grid {
  display: grid;
  gap: 12px;
}

.accounting-snapshot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.snapshot-card,
.export-panel,
.quickbooks-health-grid > div {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.snapshot-card {
  display: grid;
  gap: 5px;
  border-left: 4px solid var(--charcoal);
}

.snapshot-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

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

.warning-card {
  border-left-color: var(--brand-red);
}

.export-ledger-grid,
.quickbooks-health-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.export-actions-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.export-actions-panel h3 {
  margin-bottom: 4px;
}

.export-actions-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.secure-export-panel {
  border-left-color: var(--charcoal);
  background: #f8f8f8;
}

.accounting-close-panel {
  border-left-color: var(--brand-red);
  background: #fffafa;
}

.accounting-close-panel .readiness-header span.ready {
  color: #0f7a4f;
  background: #e9f7f0;
  border-color: #bfe8d3;
}

.accounting-close-panel .readiness-header span.warning {
  color: #7a4f0f;
  background: #fff4dc;
  border-color: #f1d391;
}

.accounting-close-panel .readiness-header span.blocked {
  color: #9a1b1f;
  background: #fde8ea;
  border-color: #f2b4bb;
}

.teacher-payroll-readiness-panel {
  border-left-color: var(--charcoal);
  background: #fbfbfb;
}

.teacher-payroll-readiness-panel .readiness-header span.ready {
  color: #0f7a4f;
  background: #e9f7f0;
  border-color: #bfe8d3;
}

.teacher-payroll-readiness-panel .readiness-header span.warning {
  color: #7a4f0f;
  background: #fff4dc;
  border-color: #f1d391;
}

.teacher-payroll-readiness-panel .readiness-header span.blocked {
  color: #9a1b1f;
  background: #fde8ea;
  border-color: #f2b4bb;
}

.secure-export-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.secure-export-summary span {
  min-height: 42px;
  padding: 8px 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.3;
}

.secure-export-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
}

.export-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.monthly-close-panel {
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.monthly-close-panel .readiness-header span.is-ready {
  color: var(--green);
  background: var(--green-soft);
}

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

.close-step-card {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.close-step-card span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

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

.close-risk-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.close-risk {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.close-risk span {
  color: var(--muted);
}

.warning-risk {
  background: #fff9f2;
  border-left: 4px solid #b36b00;
}

.danger-risk {
  background: var(--brand-red-soft);
  border-left: 4px solid var(--brand-red);
}

.success-risk {
  background: var(--green-soft);
  border-left: 4px solid var(--green);
}

.message-center-section {
  background: #fff;
}

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

.message-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.message-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-entry-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.add-message-button {
  align-self: end;
}

.message-template-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.template-control-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) auto;
  gap: 14px;
  align-items: end;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.template-preview {
  min-height: 54px;
  padding: 12px;
  color: #343434;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.delivery-queue-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.domain-email-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.domain-email-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.domain-email-heading h3 {
  margin-bottom: 4px;
}

.domain-email-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.domain-email-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.domain-email-status-grid div {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.domain-email-status-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.domain-email-test-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
}

.domain-email-result {
  padding: 11px 12px;
  color: var(--muted);
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.domain-email-result.ready {
  color: #155b2b;
  background: #f0fbf3;
  border-color: #b7e2c0;
}

.domain-email-result.warning {
  color: #7a4a00;
  background: #fff8e8;
  border-color: #eed28d;
}

.domain-email-result.error {
  color: #8c1d18;
  background: #fff1f1;
  border-color: #efb4b1;
}

.delivery-queue-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.delivery-queue-heading h3 {
  margin-bottom: 4px;
}

.delivery-queue-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

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

.delivery-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.delivery-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.delivery-handoff-panel,
.delivery-release-review-panel {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid rgba(82, 39, 43, 0.14);
  border-radius: 8px;
  background: #fbfaf9;
}

.delivery-handoff-panel h4,
.delivery-release-review-panel h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
}

.delivery-handoff-panel p,
.delivery-release-review-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.delivery-handoff-stats,
.delivery-release-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.delivery-handoff-stats span,
.delivery-release-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(82, 39, 43, 0.1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-handoff-stats strong,
.delivery-release-stats strong {
  color: var(--accent);
}

.delivery-handoff-preview,
.delivery-release-preview {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.delivery-handoff-row {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(82, 39, 43, 0.08);
}

.delivery-handoff-row strong {
  color: var(--ink);
}

.delivery-handoff-row em {
  font-style: normal;
  color: var(--accent);
  font-weight: 800;
}

.delivery-row {
  display: grid;
  grid-template-columns: 105px 135px 145px 210px 105px minmax(160px, 0.8fr) minmax(250px, 1.1fr) 34px;
  gap: 10px;
  align-items: center;
  min-width: 1190px;
  min-height: 50px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.delivery-row:first-child {
  border-top: 0;
}

.delivery-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.delivery-status-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #4f5962;
  background: #eceff1;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-status-pill.queued {
  color: #8b5200;
  background: #fff1d6;
}

.delivery-status-pill.sent {
  color: #284f38;
  background: var(--green-soft);
}

.delivery-status-pill.unread {
  color: var(--brand-red-dark);
  background: #ffe8e8;
}

.delivery-status-pill.needs-review,
.delivery-status-pill.failed {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.message-policy-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.message-policy-panel div {
  padding: 13px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.message-policy-panel h3 {
  margin-bottom: 5px;
}

.message-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.message-log-table {
  display: grid;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.message-log-row {
  display: grid;
  grid-template-columns: 105px 100px 105px 145px 80px minmax(150px, 0.8fr) minmax(220px, 1.2fr) 34px;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.message-log-row:first-child {
  border-top: 0;
}

.message-log-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.parent-portal-section {
  background: #fbfbfb;
}

.portal-snapshot-header {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.portal-snapshot-header div {
  display: grid;
  gap: 4px;
  min-height: 94px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.portal-snapshot-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-snapshot-header strong {
  font-size: 17px;
}

.portal-snapshot-header small {
  color: var(--muted);
  line-height: 1.35;
}

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

.parent-registration-page-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.parent-page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.parent-page-heading h3 {
  margin-bottom: 4px;
}

.parent-page-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.parent-page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.parent-page-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.parent-page-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.parent-page-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.parent-submission-inbox-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.parent-submission-inbox-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.parent-submission-inbox-heading h3 {
  margin-bottom: 4px;
}

.parent-submission-inbox-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.parent-submission-inbox-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.parent-submission-row {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) 88px;
  gap: 10px;
  align-items: center;
  min-width: 820px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.parent-submission-row:first-child {
  border-top: 0;
}

.parent-submission-row.header {
  color: var(--muted);
  background: #f0f0f0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-submission-row.loaded {
  background: var(--brand-red-soft);
}

.parent-submission-row strong {
  display: block;
}

.parent-submission-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.parent-submission-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.parent-submission-empty strong {
  color: var(--charcoal);
}

.registration-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.registration-package-card {
  display: grid;
  gap: 8px;
  min-height: 160px;
  padding: 16px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.registration-package-card:hover,
.registration-package-card.active {
  border-color: var(--brand-red);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

.registration-package-card span {
  width: fit-content;
  padding: 4px 8px;
  color: var(--muted);
  background: #f5f5f5;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.registration-package-card.active span {
  color: var(--brand-red);
  background: var(--brand-red-soft);
}

.registration-package-card strong {
  color: var(--charcoal);
  font-size: 17px;
}

.registration-package-card small {
  color: var(--muted);
  line-height: 1.45;
}

.submissions-section {
  display: grid;
  gap: 16px;
}

.submission-command-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(240px, 0.9fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.submission-list-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.submission-list-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.submission-list-heading h3 {
  margin-bottom: 4px;
}

.submission-list-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.submission-table {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.submission-row {
  display: grid;
  grid-template-columns: 130px minmax(190px, 0.9fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(230px, 1.1fr) 88px;
  gap: 10px;
  align-items: center;
  min-width: 980px;
  padding: 11px 12px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.submission-row:first-child {
  border-top: 0;
}

.submission-row.header {
  color: var(--muted);
  background: #f0f0f0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.submission-row.loaded {
  background: var(--brand-red-soft);
}

.submission-row strong,
.submission-row small {
  display: block;
}

.submission-row small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.submission-match-review {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.06);
}

.submission-match-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.submission-match-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.submission-match-heading h3 {
  margin: 3px 0;
  font-size: 18px;
}

.submission-match-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.submission-match-summary {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #f7f7f7;
}

.submission-match-summary.has-matches {
  border-color: #d7b56d;
  background: #fff8e8;
}

.submission-match-summary.clear {
  border-color: #a9d4b9;
  background: #edf8f1;
}

.submission-match-summary span {
  color: var(--muted);
  font-size: 13px;
}

.submission-match-table {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.submission-match-row {
  display: grid;
  grid-template-columns: 165px minmax(190px, 1fr) minmax(150px, 0.8fr) minmax(210px, 1fr) 130px 210px;
  gap: 10px;
  align-items: center;
  min-width: 1050px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.submission-match-row:first-child {
  border-top: 0;
}

.submission-match-row.header {
  color: var(--muted);
  background: #f0f0f0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.submission-match-row strong,
.submission-match-row small {
  display: block;
}

.submission-match-row small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.submission-match-actions,
.submission-match-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.submission-match-footer {
  justify-content: flex-end;
}

.parent-page-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.parent-page-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.parent-page-card h3 {
  margin-bottom: 0;
}

.portal-invitation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.portal-invitation-panel h3 {
  margin-bottom: 4px;
}

.portal-invitation-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.portal-invitation-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.portal-invitation-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.portal-invitation-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-invitation-grid a {
  color: var(--brand-red);
  font-weight: 900;
}

.portal-invitation-grid a.disabled-link {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
}

.parent-checklist {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.parent-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.parent-check-row:first-child {
  border-top: 0;
}

.parent-check-row strong {
  justify-self: end;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-check-row.complete strong {
  color: #284f38;
  background: var(--green-soft);
}

.parent-check-row.pending strong {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

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

.portal-card h3 {
  margin-bottom: 0;
}

.portal-mini-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.portal-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  min-height: 44px;
  padding: 9px 11px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.portal-mini-row:first-child {
  border-top: 0;
}

.portal-mini-row span {
  color: #343434;
  font-weight: 700;
}

.portal-mini-row strong {
  color: var(--charcoal);
  font-size: 12px;
  white-space: nowrap;
}

.portal-mini-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}

.message-category-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #334960;
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-category-pill.payment {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.message-category-pill.birthday {
  color: var(--green);
  background: var(--green-soft);
}

.automation-section {
  background: #fbfbfb;
}

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

.automation-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.automation-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.automation-action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.automation-action-panel h3 {
  margin-bottom: 4px;
}

.automation-action-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.automation-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.birthday-automation-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

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

.birthday-automation-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.birthday-automation-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.birthday-message-preview {
  padding: 12px;
  color: var(--ink);
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.automation-entry-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.add-automation-button {
  align-self: end;
}

.automation-policy-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.automation-policy-panel div {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.automation-policy-panel h3 {
  margin-bottom: 5px;
}

.automation-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.automation-table {
  display: grid;
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.automation-row {
  display: grid;
  grid-template-columns: 105px 135px 110px 145px 90px minmax(150px, 0.8fr) minmax(230px, 1.2fr) 34px;
  gap: 10px;
  align-items: center;
  min-width: 1060px;
  min-height: 52px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.automation-row:first-child {
  border-top: 0;
}

.automation-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.automation-status-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #4f5962;
  background: #eceff1;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.automation-status-pill.active,
.automation-status-pill.scheduled {
  color: #284f38;
  background: var(--green-soft);
}

.automation-status-pill.draft {
  color: #8b5200;
  background: #fff1d6;
}

.automation-status-pill.paused {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.activity-section {
  background: #fbfbfb;
}

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

.activity-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.activity-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-entry-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(260px, 1.4fr);
  gap: 14px;
  align-items: end;
}

.add-activity-button {
  align-self: end;
}

.activity-policy-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.activity-policy-panel div {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.activity-policy-panel h3 {
  margin-bottom: 5px;
}

.activity-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.backend-audit-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

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

.backend-audit-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.backend-audit-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.backend-audit-list {
  margin-top: 0;
}

.activity-log-table {
  display: grid;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.activity-row {
  display: grid;
  grid-template-columns: 110px 150px 130px 90px minmax(260px, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.activity-row:first-child {
  border-top: 0;
}

.activity-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.activity-type-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #4f5962;
  background: #eceff1;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-type-pill.parent-visible {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.activity-type-pill.teacher-visible {
  color: #334960;
  background: var(--blue-soft);
}

.settings-section {
  background: #fbfbfb;
}

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

.settings-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.settings-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.role-switch-panel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.role-switch-panel h3 {
  margin-bottom: 4px;
}

.role-switch-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.permission-table {
  display: grid;
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.access-review-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

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

.access-review-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.access-review-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-review-list {
  margin-top: 0;
}

.session-revoke-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto minmax(180px, 1fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.session-revoke-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.session-revoke-panel input {
  width: 100%;
}

.session-revoke-panel span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.warning-action {
  color: var(--brand-red);
  background: #fff;
  border-color: var(--brand-red);
}

.access-session-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.access-session-actions .secondary-mini {
  color: var(--charcoal);
  background: #fff;
  border-color: var(--line);
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(4, minmax(120px, 0.8fr));
  gap: 10px;
  align-items: center;
  min-width: 780px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.permission-row:first-child {
  border-top: 0;
}

.permission-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.role-hidden-row {
  background: #fafafa;
}

.permission-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #334960;
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.permission-pill.edit,
.permission-pill.accept-own,
.permission-pill.view-export {
  color: #284f38;
  background: var(--green-soft);
}

.permission-pill.hidden {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.settings-policy-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.settings-policy-panel div {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.settings-policy-panel h3 {
  margin-bottom: 5px;
}

.settings-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.review-section {
  background: #fbfbfb;
}

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

.review-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.review-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#reviewReadinessStatus.is-ready {
  color: var(--green);
}

.review-action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.review-action-panel h3 {
  margin-bottom: 4px;
}

.review-action-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.review-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.review-row {
  display: grid;
  grid-template-columns: 86px 190px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #d8d8d8;
  border-radius: 6px;
  font-size: 13px;
}

.review-row.pass {
  border-left-color: var(--green);
}

.review-row.warning {
  border-left-color: #d49000;
}

.review-row.blocker {
  border-left-color: var(--brand-red);
}

.review-status-pill {
  justify-self: start;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.review-status-pill.pass {
  color: #284f38;
  background: var(--green-soft);
}

.review-status-pill.warning {
  color: #8b5200;
  background: #fff1d6;
}

.review-status-pill.blocker {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.export-list {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.integrations-section {
  background: #fbfbfb;
}

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

.integration-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.integration-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.integration-action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.integration-action-panel h3 {
  margin-bottom: 4px;
}

.integration-action-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.integration-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.production-readiness-panel,
.production-secrets-panel,
.production-environment-guide-panel,
.production-setup-approval-panel,
.production-launch-gate-panel,
.production-launch-checklist-panel,
.production-pilot-panel,
.limited-pilot-runbook-panel,
.limited-pilot-checks-panel,
.parent-release-guard-panel,
.parent-release-batch-panel,
.production-action-plan-panel,
.privacy-audit-panel,
.launch-review-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.production-launch-gate-panel {
  border-left-color: var(--brand-red);
}

.production-secrets-panel {
  border-left-color: var(--charcoal);
}

.production-environment-guide-panel {
  border-left-color: var(--brand-red);
}

.production-setup-approval-panel {
  border-left-color: var(--charcoal);
}

.production-action-plan-panel {
  border-left-color: var(--charcoal);
}

.production-launch-checklist-panel {
  border-left-color: var(--brand-red);
}

.production-pilot-panel {
  border-left-color: var(--charcoal);
}

.limited-pilot-runbook-panel {
  border-left-color: var(--brand-red);
}

.limited-pilot-checks-panel {
  border-left-color: var(--charcoal);
}

.parent-release-guard-panel {
  border-left-color: var(--brand-red);
}

.parent-release-batch-panel {
  border-left-color: var(--charcoal);
}

.privacy-audit-panel {
  border-left-color: var(--brand-red);
}

.launch-review-panel {
  border-left-color: var(--charcoal);
}

.wordpress-portal-connection-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.storage-backup-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.production-readiness-panel p,
.production-secrets-panel p,
.production-environment-guide-panel p,
.production-setup-approval-panel p,
.production-launch-gate-panel p,
.production-launch-checklist-panel p,
.production-pilot-panel p,
.limited-pilot-runbook-panel p,
.limited-pilot-checks-panel p,
.parent-release-guard-panel p,
.parent-release-batch-panel p,
.production-action-plan-panel p,
.privacy-audit-panel p,
.launch-review-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.storage-backup-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.wordpress-portal-connection-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.production-readiness-summary-grid,
.production-secrets-summary-grid,
.production-environment-guide-grid,
.production-setup-approval-grid,
.production-launch-track-grid,
.production-launch-checklist-grid,
.production-pilot-summary-grid,
.limited-pilot-runbook-grid,
.limited-pilot-checks-grid,
.parent-release-guard-grid,
.parent-release-batch-summary-grid,
.production-action-plan-summary,
.privacy-audit-summary-grid,
.launch-review-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.production-launch-track-grid,
.production-action-plan-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.launch-review-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.production-action-plan-summary {
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1.1fr) minmax(120px, 0.45fr);
}

.production-launch-checklist-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wordpress-portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.6fr);
  gap: 12px;
}

.production-readiness-summary-grid div,
.production-secrets-summary-grid div,
.production-environment-guide-grid div,
.production-setup-approval-grid div,
.production-launch-track-grid div,
.production-launch-checklist-grid div,
.production-pilot-summary-grid div,
.limited-pilot-runbook-grid div,
.limited-pilot-checks-grid div,
.parent-release-batch-summary-grid div,
.production-action-plan-summary div,
.privacy-audit-summary-grid div,
.launch-review-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.production-readiness-summary-grid span,
.production-secrets-summary-grid span,
.production-environment-guide-grid span,
.production-setup-approval-grid span,
.production-launch-track-grid span,
.production-launch-checklist-grid span,
.production-pilot-summary-grid span,
.limited-pilot-runbook-grid span,
.limited-pilot-checks-grid span,
.parent-release-batch-summary-grid span,
.production-action-plan-summary span,
.privacy-audit-summary-grid span,
.launch-review-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.wordpress-portal-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.wordpress-portal-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.wordpress-portal-connection-panel textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  padding: 10px;
  color: var(--charcoal);
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
}

.production-readiness-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.storage-backup-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.production-readiness-actions span {
  color: var(--muted);
  font-size: 13px;
}

.storage-backup-actions span {
  color: var(--muted);
  font-size: 13px;
}

.production-readiness-list {
  display: grid;
  gap: 8px;
}

.production-readiness-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) 110px minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.production-readiness-row strong {
  color: var(--charcoal);
}

.production-readiness-row p {
  margin: 0;
}

.production-readiness-row.blocker {
  background: var(--brand-red-soft);
}

.production-readiness-row.warning {
  background: #fff7ed;
}

.production-readiness-row.ready {
  background: #f1f8f3;
}

.production-readiness-pill {
  display: inline-flex;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-readiness-pill.blocker {
  color: var(--brand-red-dark);
  background: #fff;
}

.production-readiness-pill.warning {
  color: #92400e;
  background: #ffedd5;
}

.production-readiness-pill.ready {
  color: var(--green-dark);
  background: #fff;
}

.production-action-task-list,
.production-launch-checklist-list {
  display: grid;
  gap: 8px;
}

.production-pilot-entry-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.production-setup-entry-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.6fr) minmax(260px, 1.4fr);
  gap: 12px;
  align-items: end;
}

.limited-pilot-check-entry-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.5fr) minmax(200px, 0.8fr) minmax(260px, 1.2fr);
  gap: 12px;
  align-items: end;
}

.parent-release-guard-grid {
  align-items: end;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.6fr) minmax(220px, 1fr);
}

.parent-release-guard-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.parent-release-guard-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.production-pilot-list {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.production-setup-approval-list {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.limited-pilot-checks-list {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.production-pilot-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) 110px 130px minmax(220px, 1.2fr);
  gap: 10px;
  align-items: center;
  min-width: 860px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.production-pilot-row:first-child {
  border-top: 0;
}

.production-pilot-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.production-setup-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 140px minmax(150px, 0.7fr) minmax(260px, 1.3fr);
  gap: 10px;
  align-items: center;
  min-width: 820px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.production-setup-row:first-child {
  border-top: 0;
}

.production-setup-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.limited-pilot-check-row {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 110px minmax(180px, 0.8fr) minmax(280px, 1.4fr);
  gap: 10px;
  align-items: center;
  min-width: 820px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.limited-pilot-check-row:first-child {
  border-top: 0;
}

.limited-pilot-check-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.parent-release-batch-list {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.parent-release-batch-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1fr) minmax(140px, 0.8fr) 130px minmax(260px, 1.4fr);
  gap: 10px;
  align-items: center;
  min-width: 900px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.parent-release-batch-row:first-child {
  border-top: 0;
}

.parent-release-batch-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.production-action-task {
  display: grid;
  grid-template-columns: 34px minmax(180px, 0.8fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.production-action-task > span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.production-action-task strong {
  color: var(--charcoal);
}

.production-action-task p {
  margin: 0;
}

.production-action-task p span {
  color: var(--charcoal);
  font-weight: 800;
}

.production-action-task.blocker {
  background: var(--brand-red-soft);
}

.production-action-task.warning {
  background: #fff7ed;
}

.integration-smoke-test-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 6px;
}

.integration-smoke-test-panel h3 {
  margin-bottom: 4px;
}

.integration-smoke-test-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.ghl-sync-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

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

.ghl-sync-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-sync-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.ghl-sync-columns > div {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-sync-columns h4 {
  font-size: 13px;
}

.ghl-sync-list {
  display: grid;
  gap: 7px;
}

.ghl-sync-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.ghl-sync-item strong {
  color: var(--muted);
  text-transform: uppercase;
}

.privacy-list .ghl-sync-item {
  background: var(--brand-red-soft);
}

.ghl-api-configuration-panel,
.ghl-payload-panel {
  display: grid;
  gap: 12px;
  padding: 13px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-api-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ghl-api-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ghl-api-form-grid input,
.ghl-api-form-grid select {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.ghl-api-configuration-panel p,
.payload-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.ghl-payload-grid > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ghl-payload-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ghl-payload-grid pre {
  min-height: 220px;
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #f7f7f7;
  background: #2d3033;
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.ghl-sync-queue-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.ghl-sync-queue-panel h4 {
  margin-bottom: 4px;
  font-size: 14px;
}

.ghl-sync-queue-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.ghl-sync-queue-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ghl-sync-queue-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-sync-queue-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ghl-manual-handoff-panel {
  display: grid;
  gap: 12px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.ghl-manual-handoff-panel h4 {
  margin-bottom: 4px;
  font-size: 14px;
}

.ghl-manual-handoff-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.ghl-handoff-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-handoff-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ghl-controlled-test-preview {
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  color: var(--ink);
  background: #f7f8f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.square-setup-handoff-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.square-setup-handoff-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.square-handoff-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.square-handoff-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.integration-table {
  display: grid;
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.integration-row {
  display: grid;
  grid-template-columns: 130px minmax(180px, 1fr) 130px minmax(220px, 1.2fr) minmax(210px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 980px;
  min-height: 54px;
  padding: 9px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.integration-row:first-child {
  border-top: 0;
}

.integration-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.integration-status-pill {
  justify-self: start;
  padding: 4px 7px;
  color: #4f5962;
  background: #eceff1;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.ghl-import-source-note {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  padding: 10px 12px;
  color: #4f5962;
  background: #fafafa;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
  font-size: 12px;
}

.ghl-import-source-note strong {
  color: var(--text);
}

.ghl-import-source-note.calm-note {
  border-left-color: var(--charcoal);
}

.ghl-import-table {
  display: grid;
  margin-top: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-import-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(120px, 0.7fr) minmax(190px, 1fr) minmax(170px, 0.9fr) minmax(150px, 0.8fr) minmax(180px, 0.9fr);
  gap: 10px;
  align-items: center;
  min-width: 1040px;
  min-height: 52px;
  padding: 9px 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.ghl-import-row:first-child {
  border-top: 0;
}

.ghl-import-row.header {
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-weight: 800;
}

.ghl-import-row.is-ready {
  background: #fbfefc;
}

.ghl-import-row.is-ready em {
  color: #2e6b43;
}

.ghl-import-row.is-warning {
  background: #fffdf7;
}

.ghl-import-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.ghl-import-row em {
  color: #7a2c2c;
  font-style: normal;
  font-weight: 800;
}

.ghl-import-row.teacher em {
  color: #4f5962;
}

.ghl-import-empty {
  padding: 14px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.integration-status-pill.ready-for-api-mapping {
  color: #284f38;
  background: var(--green-soft);
}

.integration-status-pill.needs-setup {
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
}

.integration-status-pill.manual-handoff {
  color: #8b5200;
  background: #fff1d6;
}

.integration-policy-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.integration-policy-panel div {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
}

.integration-policy-panel h3 {
  margin-bottom: 5px;
}

.integration-policy-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.backend-architecture-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.backend-architecture-panel h3 {
  margin-bottom: 0;
}

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

.backend-architecture-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.backend-architecture-grid span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.backend-architecture-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.export-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.export-row span {
  color: var(--muted);
}

.export-row strong {
  text-align: right;
}

.health-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: #3f464d;
  font-size: 13px;
  line-height: 1.45;
}

.close-status {
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  border: 1px solid rgba(179, 0, 5, 0.18);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.close-status.is-ready {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(32, 114, 69, 0.18);
}

.ledger-panel {
  padding: 25px 22px;
}

.summary-list {
  display: grid;
  gap: 13px;
  margin: 0;
}

.summary-list div {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 10px;
}

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

dd {
  margin: 0;
  font-weight: 700;
}

.payment-callout {
  display: grid;
  gap: 5px;
  margin: 18px 0;
  padding: 15px;
  color: var(--brand-red-dark);
  background: #fff;
  border: 1px solid var(--brand-red);
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

.payment-callout strong {
  font-size: 24px;
}

.info-note {
  padding: 13px;
  color: #353535;
  background: #f7f7f7;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.birthday-note {
  margin-top: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghl-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  border: 1px solid rgba(179, 0, 5, 0.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.version-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 9px 10px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.version-row span {
  color: var(--muted);
}

.active-version {
  border-left: 4px solid var(--brand-red);
  background: #fff;
}

.full-width-button {
  width: 100%;
}

.teacher-safe-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.teacher-payroll-card,
.agreement-access-card,
.migration-status-card,
.security-card,
.acceptance-status-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.teacher-safe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e7e7e7;
  font-size: 13px;
}

.teacher-safe-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.teacher-safe-row span {
  color: var(--muted);
}

.teacher-hidden-note {
  margin-top: 4px;
  padding: 10px;
  color: #4b4b4b;
  background: #fff;
  border-left: 4px solid var(--brand-red);
  font-size: 12px;
  line-height: 1.35;
}

.message-preview-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.message-row {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.message-row:first-child {
  border-top: 0;
}

.message-row.pinned {
  border-left: 4px solid var(--brand-red);
}

.message-row strong {
  font-size: 13px;
}

.message-row span {
  color: var(--muted);
  font-size: 12px;
}

.portal-includes-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-includes-card span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  color: #353535;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.preview-modal {
  width: min(900px, calc(100vw - 40px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.preview-modal::backdrop {
  background: rgba(16, 23, 29, 0.58);
}

.confirmation-dialog {
  width: min(520px, calc(100vw - 36px));
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.confirmation-dialog::backdrop {
  background: rgba(16, 23, 29, 0.5);
  backdrop-filter: blur(2px);
}

.confirmation-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(11, 16, 24, 0.24);
}

.confirmation-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--brand-red);
  background: #fff2f2;
  border: 1px solid #f0c3c4;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.confirmation-copy h2 {
  margin: 3px 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.confirmation-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.48;
}

.confirmation-detail {
  margin-top: 12px !important;
  padding: 12px;
  color: #353535 !important;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.confirmation-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.danger-button {
  min-height: 40px;
  padding: 0 16px;
  color: #fff;
  background: var(--brand-red);
  border: 1px solid var(--brand-red-dark);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.danger-button:hover {
  background: var(--brand-red-dark);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin-bottom: 0;
}

.agreement {
  padding: 24px;
}

.agreement header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -24px -24px 24px;
  padding: 16px 24px;
  color: #fff;
  background: #0b1018;
}

.agreement header span {
  display: block;
  margin-top: 3px;
  color: #ffffff;
  opacity: 0.82;
}

.agreement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
  padding-top: 20px;
  border-top: 2px solid var(--brand-red);
}

.guidelines-panel {
  margin: 20px 0;
  padding: 16px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-red);
  border-radius: 6px;
}

.guidelines-panel h3 {
  margin-bottom: 6px;
}

.guidelines-panel p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.guidelines-panel a {
  color: var(--brand-red-dark);
  font-weight: 800;
}

.acceptance-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  padding: 14px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 10px;
}

.acceptance-row input {
  min-height: auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: min(420px, calc(100vw - 32px));
  padding: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 8px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.toast[data-tone="success"] {
  border-left-color: #1b7654;
}

.toast[data-tone="neutral"] {
  border-left-color: var(--charcoal);
}

.toast[data-tone="attention"] {
  border-left-color: var(--brand-red);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  color: #fff;
  background: var(--brand-red);
  border-radius: 999px;
}

.toast[data-tone="success"] .toast-icon {
  background: #1b7654;
}

.toast[data-tone="neutral"] .toast-icon {
  background: var(--charcoal);
}

.toast-icon::before {
  content: "!";
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.toast[data-tone="success"] .toast-icon::before,
.toast[data-tone="neutral"] .toast-icon::before {
  content: "";
  width: 10px;
  height: 6px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
}

.toast-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.toast-copy strong {
  font-size: 13px;
  line-height: 1.2;
}

.toast-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}

.toast-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.toast-close:hover {
  color: var(--ink);
  background: var(--admin-soft);
}

@media (max-width: 760px) {
  .toast {
    top: 14px;
    right: 14px;
    left: 14px;
    width: auto;
  }
}

.parent-form-body {
  min-height: 100vh;
  padding: 32px 20px 56px;
  background:
    linear-gradient(180deg, rgba(48, 54, 61, 0.05), rgba(255, 255, 255, 0) 260px),
    #f5f3ef;
  font-size: 16px;
}

.parent-form-shell {
  display: grid;
  gap: 18px;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.parent-form-header {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid #e4dfd8;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(37, 37, 37, 0.08);
}

.parent-form-header img {
  width: 100%;
  max-height: 112px;
  object-fit: contain;
}

.parent-form-header span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-form-header p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.parent-package-status-card.is-loading,
.parent-package-status-card.is-loaded {
  display: none;
}

.portal-entry-shell {
  gap: 18px;
}

.portal-entry-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) repeat(2, minmax(220px, 0.8fr));
  gap: 14px;
}

.portal-entry-login,
.portal-entry-card {
  align-content: start;
}

.portal-entry-login label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.portal-entry-login label + label {
  margin-top: 14px;
}

.portal-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.portal-entry-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.portal-entry-link-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.portal-entry-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--charcoal);
  background: #f7f8f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.portal-entry-muted-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--muted);
  background: #fbfbfb;
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.portal-entry-link-list a::after {
  content: ">";
  color: var(--brand-red);
}

.parent-progress-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e4dfd8;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(37, 37, 37, 0.06);
}

.parent-progress-card span {
  display: block;
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-progress-card strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
}

.parent-progress-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.parent-progress-item {
  display: grid;
  gap: 3px;
  min-height: 62px;
  padding: 10px 11px;
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-radius: 6px;
}

.parent-progress-item.is-complete {
  background: #f7f6f3;
  border-color: #d8d1ca;
}

.parent-progress-item b {
  font-size: 12px;
}

.parent-progress-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.parent-required-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.parent-checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.parent-checkbox-line input {
  width: auto;
  min-width: 18px;
  margin-top: 3px;
}

.parent-package-status-card {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e4dfd8;
  border-left: 4px solid var(--charcoal);
  border-radius: 8px;
}

.parent-package-status-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.parent-package-status-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-package-status-card strong {
  color: var(--charcoal);
}

.parent-package-status-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.parent-package-status-card.is-loaded {
  background: #fff;
  border-color: #d8d1ca;
  border-left-color: var(--charcoal);
}

.parent-package-status-card.is-loaded strong {
  color: var(--charcoal);
}

.parent-package-status-card.is-missing {
  background: #fff;
  border-color: #d8d1ca;
  border-left-color: var(--brand-red);
}

.parent-package-status-card.is-missing strong {
  color: var(--brand-red-dark);
}

.parent-package-missing-help {
  display: none;
  gap: 10px;
  padding-top: 4px;
}

.parent-package-status-card.is-missing .parent-package-missing-help {
  display: grid;
}

.parent-package-missing-help p {
  color: var(--charcoal);
}

.parent-package-missing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.parent-package-missing-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--brand-red-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d8d1ca;
  border-radius: 6px;
}

.parent-package-missing-actions a:hover {
  border-color: var(--brand-red);
}

.required-marker {
  display: inline;
  margin-left: 4px;
  color: var(--brand-red);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.parent-form-card .required-marker {
  display: inline;
}

.optional-note {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.locked-parent-email {
  color: var(--charcoal);
  background: #f7f7f7;
  border-color: #cfcfcf;
}

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

.registration-type-selector label {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 12px;
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-radius: 6px;
  font-weight: 800;
}

.parent-form-card .registration-type-selector label {
  display: flex;
}

.registration-type-selector input[type="radio"] {
  flex: 0 0 16px;
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-red);
}

.registration-type-selector label:has(input:checked),
.parent-payment-choice label:has(input:checked) {
  color: var(--brand-red-dark);
  background: #fff;
  border-color: #b30005;
  box-shadow: inset 0 0 0 1px rgba(179, 0, 5, 0.1);
}

.account-mode-message {
  margin-bottom: 0;
  padding: 11px 12px;
  color: var(--charcoal);
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.parent-form-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: #fff;
  border: 1px solid #e4dfd8;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(37, 37, 37, 0.05);
}

.parent-form-card h2 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.15;
}

.parent-form-card label {
  display: block;
  font-size: 16px;
}

.parent-form-card input,
.parent-form-card select,
.parent-form-card textarea {
  margin-top: 7px;
  font-size: 16px;
}

.password-field-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.password-field-control input {
  min-width: 0;
}

.password-field-control .password-toggle-button {
  min-height: 44px;
  margin-top: 7px;
  padding: 0 14px;
  color: #463f3b;
  background: #f7f3ef;
  border: 1px solid #d8cec4;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.password-field-control .password-toggle-button:hover,
.password-field-control .password-toggle-button:focus {
  color: var(--brand-red-dark);
  border-color: var(--brand-red);
}

.parent-form-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  color: #8f111b;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.parent-form-link:hover,
.parent-form-link:focus {
  text-decoration: underline;
}

.optional-child-card {
  background: #fff;
}

.parent-card-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.parent-card-heading-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.parent-card-heading-row > span {
  display: inline-flex;
  padding: 5px 8px;
  color: var(--charcoal);
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-form-grid,
.parent-payment-detail-grid,
.parent-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parent-login-access-grid {
  grid-template-columns: 1fr;
}

.parent-field-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.parent-field-message:empty {
  min-height: 0;
}

.parent-field-message.is-error {
  color: var(--brand-red-dark);
}

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

.parent-form-card > p,
.parent-payment-detail-grid p,
.parent-policy-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.parent-important-note {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  color: var(--charcoal);
  background: #f7f6f3;
  border: 1px solid #d8d1ca;
  border-left: 4px solid var(--charcoal);
  border-radius: 8px;
}

.parent-important-note strong {
  color: var(--brand-red-dark);
  font-size: 16px;
}

.parent-important-note p {
  margin-bottom: 0;
  color: #4b4b4b;
  font-size: 15px;
  line-height: 1.55;
}

.parent-summary-grid div {
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 14px;
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-radius: 6px;
}

.parent-summary-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.parent-summary-grid strong {
  align-self: end;
  font-size: 22px;
  line-height: 1.1;
}

.parent-prepared-package,
.parent-fee-breakdown {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-radius: 8px;
}

.parent-prepared-package {
  background: #fff;
}

.parent-prepared-package div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.parent-prepared-package span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-prepared-package p,
.parent-fee-breakdown p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.parent-breakdown-heading,
.parent-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 112px;
  gap: 14px;
  align-items: center;
}

.parent-breakdown-heading h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.parent-breakdown-heading span {
  grid-column: span 2;
  justify-self: end;
  color: var(--brand-red-dark);
  font-size: 16px;
  font-weight: 900;
}

.parent-breakdown-table {
  display: grid;
  border: 1px solid #e4dfd8;
  border-radius: 8px;
  overflow: hidden;
}

.parent-breakdown-row {
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #eee8e2;
}

.parent-breakdown-row:last-child {
  border-bottom: 0;
}

.parent-breakdown-row.header,
.parent-breakdown-row.total {
  background: #f2efeb;
  font-weight: 900;
}

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

.parent-breakdown-row small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.parent-breakdown-row strong {
  color: var(--brand-red-dark);
  font-size: 16px;
}

.parent-breakdown-row strong.waived,
.parent-breakdown-row strong.not-charged {
  color: var(--muted);
}

.parent-breakdown-row strong.discount {
  color: var(--red);
}

.parent-breakdown-row b {
  font-size: 16px;
  text-align: right;
}

.parent-fee-breakdown a {
  justify-self: start;
  color: var(--brand-red);
  font-weight: 900;
}

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

.parent-payment-choice label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 12px;
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-radius: 6px;
  font-weight: 800;
}

.parent-confirm-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-radius: 6px;
  line-height: 1.45;
}

.parent-form-card .parent-confirm-row {
  display: grid;
}

.parent-confirm-row input {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand-red);
}

.parent-payment-method-note {
  margin: 10px 0;
  padding: 12px 14px;
  color: var(--charcoal);
  background: #f7f6f3;
  border: 1px solid #d8d1ca;
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.parent-security-note {
  margin: 0;
  padding: 12px 14px;
  color: #353535;
  background: #f7f6f3;
  border: 1px solid #d8d1ca;
  border-left: 4px solid #8b8178;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.45;
}

.parent-payment-detail-grid > div,
.parent-policy-grid > div {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-radius: 8px;
}

.parent-payment-detail-grid > div.is-inactive {
  opacity: 0.58;
  border-left-color: var(--line);
}

.parent-payment-detail-grid > div.is-inactive input,
.parent-payment-detail-grid > div.is-inactive select,
.parent-payment-detail-grid > div.is-inactive textarea {
  pointer-events: none;
}

.parent-payment-detail-grid > div.is-selected {
  background: #fff;
  border-color: #b30005;
  box-shadow: inset 0 0 0 1px rgba(179, 0, 5, 0.1);
}

.parent-payment-detail-grid h3,
.parent-policy-grid h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.parent-guidelines-notice {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  background: #f7f6f3;
  border: 1px solid #d8d1ca;
  border-left: 4px solid var(--charcoal);
  border-radius: 8px;
}

.parent-guidelines-notice p {
  margin: 0;
  color: var(--charcoal);
  font-size: 15px;
  line-height: 1.6;
}

.square-public-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--charcoal);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.square-public-status.is-ready {
  border-left-color: var(--charcoal);
  color: var(--charcoal);
  background: #fff;
}

.square-public-status.is-pending {
  border-left-color: var(--brand-red);
  color: var(--charcoal);
  background: #fff;
}

.parent-guidelines-link {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  color: #fff;
  background: var(--brand-red);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.parent-submit-button {
  justify-self: end;
}

.portal-confirmation-checklist {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.portal-confirmation-card textarea {
  resize: vertical;
}

.parent-portal-open-link {
  justify-self: end;
  text-decoration: none;
}

.parent-submit-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  position: sticky;
  bottom: 16px;
  z-index: 8;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e4dfd8;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(37, 37, 37, 0.12);
  backdrop-filter: blur(10px);
}

.parent-submit-message {
  padding: 12px 14px;
  color: var(--muted);
  background: #faf9f7;
  border: 1px solid #e8e1da;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.parent-submit-message.error {
  color: var(--brand-red-dark);
  background: #fff;
  border-color: #d8d1ca;
  border-left: 4px solid var(--brand-red);
}

.parent-submit-message.success {
  color: var(--charcoal);
  background:
    radial-gradient(circle at 12% 16%, rgba(179, 0, 5, 0.12), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(240, 178, 71, 0.22), transparent 22%),
    radial-gradient(circle at 78% 92%, rgba(34, 128, 116, 0.12), transparent 24%),
    linear-gradient(135deg, #fffdf9 0%, #fff6ec 54%, #ffffff 100%);
  border-color: #ead9c6;
  border-left: 0;
  box-shadow: 0 18px 44px rgba(37, 37, 37, 0.14);
}

.parent-success-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 230px;
  padding: 30px 26px;
  overflow: hidden;
  text-align: center;
}

.parent-success-eyebrow {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-success-card strong {
  max-width: 760px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.18;
}

.parent-success-card p {
  max-width: 680px;
  margin: 0;
  color: var(--charcoal);
  font-size: 18px;
  line-height: 1.45;
}

.parent-success-card h1 {
  max-width: 820px;
  margin: 0;
  color: var(--charcoal);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
}

.parent-success-next {
  width: min(100%, 680px);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(183, 146, 103, 0.28);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(107, 76, 47, 0.08);
  font-weight: 800;
}

.parent-success-medallion {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), #8b1e2d);
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(179, 0, 5, 0.24);
  font-size: 28px;
  font-weight: 900;
}

.parent-success-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.parent-success-confetti span {
  position: absolute;
  width: 10px;
  height: 18px;
  background: var(--brand-red);
  border-radius: 999px;
  opacity: 0.72;
  transform: rotate(14deg);
  animation: parentConfettiFloat 5.4s ease-in-out infinite;
}

.parent-success-confetti span:nth-child(1) { top: 18%; left: 8%; background: #b30005; animation-delay: -0.4s; }
.parent-success-confetti span:nth-child(2) { top: 12%; left: 22%; background: #f0b247; animation-delay: -1.7s; }
.parent-success-confetti span:nth-child(3) { top: 22%; right: 11%; background: #228074; animation-delay: -2.1s; }
.parent-success-confetti span:nth-child(4) { top: 54%; left: 6%; background: #2f5d86; animation-delay: -3s; }
.parent-success-confetti span:nth-child(5) { top: 64%; right: 9%; background: #d85735; animation-delay: -1.1s; }
.parent-success-confetti span:nth-child(6) { top: 78%; left: 18%; background: #8b8178; animation-delay: -2.7s; }
.parent-success-confetti span:nth-child(7) { top: 8%; right: 28%; background: #b30005; animation-delay: -3.6s; }
.parent-success-confetti span:nth-child(8) { top: 76%; right: 24%; background: #f0b247; animation-delay: -0.9s; }
.parent-success-confetti span:nth-child(9) { top: 38%; left: 13%; background: #228074; animation-delay: -4.2s; }
.parent-success-confetti span:nth-child(10) { top: 34%; right: 17%; background: #2f5d86; animation-delay: -2.4s; }
.parent-success-confetti span:nth-child(11) { top: 84%; left: 42%; background: #d85735; animation-delay: -1.9s; }
.parent-success-confetti span:nth-child(12) { top: 14%; right: 45%; background: #8b8178; animation-delay: -3.3s; }

@keyframes parentConfettiFloat {
  0%,
  100% {
    transform: translateY(0) rotate(14deg);
  }

  50% {
    transform: translateY(-14px) rotate(-10deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .parent-success-confetti span {
    animation: none;
  }
}

.parent-form-shell.submitted .parent-form-card {
  opacity: 0.92;
}

.parent-form-shell.submitted .parent-submit-panel {
  position: static;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 18px;
}

.parent-form-shell.submitted .parent-submit-button {
  background: var(--charcoal);
  border-color: var(--charcoal);
  cursor: default;
}

.parent-success-page-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.parent-success-page-shell {
  display: grid;
  width: min(980px, 100%);
  gap: 22px;
}

.parent-success-page-logo {
  display: flex;
  justify-content: center;
}

.parent-success-page-logo img {
  width: min(360px, 80vw);
  height: auto;
}

.parent-success-page-card {
  min-height: min(560px, calc(100vh - 180px));
  padding: clamp(34px, 7vw, 72px) clamp(22px, 6vw, 66px);
  background:
    radial-gradient(circle at 12% 16%, rgba(179, 0, 5, 0.12), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(240, 178, 71, 0.22), transparent 22%),
    radial-gradient(circle at 78% 92%, rgba(34, 128, 116, 0.12), transparent 24%),
    linear-gradient(135deg, #fffdf9 0%, #fff6ec 54%, #ffffff 100%);
  border: 1px solid #ead9c6;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(37, 37, 37, 0.16);
}

.parent-success-page-card .parent-success-medallion {
  width: 72px;
  height: 72px;
  font-size: 34px;
}

.parent-success-page-card .parent-success-next {
  margin-top: 6px;
  font-size: 17px;
}

@media (max-width: 980px) {
  .parent-progress-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

.parent-portal-shell {
  max-width: 1120px;
}

.portal-next-step-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #d8d1ca;
  border-left: 4px solid var(--charcoal);
}

.portal-next-step-card.is-complete {
  background: #fff;
  border-left-color: var(--charcoal);
}

.portal-next-step-card span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-next-step-card.is-complete span {
  color: var(--charcoal);
}

.portal-next-step-card h2 {
  margin: 4px 0 6px;
}

.portal-next-step-card p {
  max-width: 760px;
  margin-bottom: 0;
}

.parent-portal-list {
  display: grid;
  gap: 10px;
}

.parent-portal-list .portal-mini-row {
  padding: 13px 14px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.parent-portal-list .portal-mini-row p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.parent-portal-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parent-portal-split > div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.parent-portal-split h3 {
  margin-bottom: 0;
  font-size: 16px;
}

@media (max-width: 1160px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .collapse-button {
    display: none;
  }

  .layout {
    grid-template-columns: 1fr;
  }

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

  .family-panel,
  .ledger-panel {
    color: var(--ink);
    background: #fff;
  }

  .family-panel .muted,
  .contact-stack,
  .student-card,
  .student-card small {
    color: var(--ink);
  }

  .form-grid,
  .lower-grid,
  .registration-lesson-count-panel,
  .checklist-grid,
  .fee-toggle-grid,
  .portal-link-panel,
  .portal-entry-grid,
  .agreement-record-summary-grid,
  .agreement-change-summary-grid,
  .agreement-export-summary-grid,
    .payment-authorization-summary-grid,
    .pad-treasury-export-panel,
  .duration-change-panel,
  .rate-card-grid,
  .migration-summary-grid,
  .migration-review-toolbar,
  .migration-entry-grid,
  .migration-policy-panel,
  .service-summary-grid,
  .service-entry-grid,
  .temporary-summary-grid,
  .temporary-entry-grid,
  .temporary-conversion-panel,
  .temporary-export-panel,
  .prepared-fee-grid,
  .portal-snapshot-header,
  .portal-snapshot-grid,
  .parent-page-summary-grid,
  .parent-page-grid,
  .portal-invitation-panel,
  .portal-invitation-grid,
  .rollover-summary-grid,
  .rollover-entry-grid,
  .rollover-policy-panel,
  .teacher-workspace-header,
  .teacher-workspace-grid,
  .teacher-confirmation-panel,
  .cancellation-summary-grid,
  .cancellation-checklist-grid,
  .activity-summary-grid,
  .activity-entry-grid,
  .backend-audit-summary-grid,
  .activity-policy-panel,
  .billing-run-summary-grid,
  .billing-readiness-grid,
  .birthday-automation-grid,
  .automation-summary-grid,
  .automation-entry-grid,
  .automation-policy-panel,
  .delivery-summary-grid,
  .settings-summary-grid,
  .access-review-summary-grid,
    .settings-policy-panel,
    .review-summary-grid,
    .integration-summary-grid,
    .production-readiness-summary-grid,
    .production-secrets-summary-grid,
    .production-environment-guide-grid,
    .production-setup-approval-grid,
    .production-launch-track-grid,
    .production-launch-checklist-grid,
    .production-pilot-summary-grid,
    .limited-pilot-runbook-grid,
    .limited-pilot-checks-grid,
    .production-pilot-entry-grid,
    .production-setup-entry-grid,
    .limited-pilot-check-entry-grid,
    .parent-release-guard-grid,
    .parent-release-batch-summary-grid,
    .production-action-plan-summary,
    .privacy-audit-summary-grid,
    .launch-review-summary-grid,
    .wordpress-portal-grid,
    .production-readiness-row,
    .production-action-task,
  .ghl-sync-grid,
  .ghl-sync-columns,
  .ghl-api-form-grid,
  .ghl-payload-grid,
  .ghl-sync-queue-panel,
  .ghl-sync-queue-grid,
  .ghl-handoff-summary-grid,
  .square-handoff-summary-grid,
  .integration-policy-panel,
  .backend-architecture-grid,
  .dashboard-hero-grid,
  .dashboard-link-card,
  .test-drive-grid,
  .parent-progress-list,
  .prepared-package-summary,
  .pipeline-step-grid,
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .role-switch-panel,
  .session-revoke-panel,
  .backend-audit-panel,
  .review-action-panel,
  .template-control-grid,
  .billing-run-heading,
  .billing-readiness-heading,
  .domain-email-heading,
  .domain-email-test-row,
  .delivery-queue-heading,
  .parent-page-heading,
  .parent-submission-inbox-heading,
  .agreement-record-heading,
  .agreement-export-heading,
  .payment-authorization-heading,
  .automation-action-panel,
  .access-review-panel,
  .integration-action-panel,
  .delivery-handoff-row,
  .production-readiness-actions,
  .storage-backup-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar,
  .status-row,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .button-row {
    width: 100%;
  }

  .top-actions button,
  .button-row button {
    flex: 1;
  }

  .workflow-focus-header,
  .live-testing-guide-heading,
  .advanced-module-drawer summary {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-focus-note,
  .live-testing-guide-heading small,
  .advanced-module-drawer summary small {
    max-width: none;
    text-align: left;
  }

  .workflow-tabs {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .lower-grid,
  .registration-lesson-count-panel,
  .checklist-grid,
  .fee-toggle-grid,
  .portal-link-panel,
  .agreement-record-summary-grid,
  .agreement-change-summary-grid,
  .agreement-export-summary-grid,
    .payment-authorization-summary-grid,
    .pad-treasury-export-panel,
  .duration-change-panel,
  .rate-card-grid,
  .migration-summary-grid,
  .migration-review-toolbar,
  .migration-entry-grid,
  .migration-policy-panel,
  .service-summary-grid,
  .service-entry-grid,
  .prepared-fee-grid,
  .portal-snapshot-header,
  .portal-snapshot-grid,
  .parent-page-summary-grid,
  .parent-page-grid,
  .portal-invitation-panel,
  .portal-invitation-grid,
  .rollover-summary-grid,
  .rollover-entry-grid,
  .rollover-policy-panel,
  .teacher-workspace-header,
  .teacher-workspace-grid,
  .teacher-confirmation-panel,
  .cancellation-summary-grid,
  .cancellation-checklist-grid,
  .activity-summary-grid,
  .activity-entry-grid,
  .activity-policy-panel,
  .billing-run-summary-grid,
  .billing-readiness-grid,
  .birthday-automation-grid,
  .automation-summary-grid,
  .automation-entry-grid,
  .automation-policy-panel,
  .delivery-summary-grid,
  .settings-summary-grid,
  .settings-policy-panel,
  .role-switch-panel,
  .review-summary-grid,
  .review-action-panel,
  .billing-run-heading,
  .billing-readiness-heading,
  .domain-email-heading,
  .domain-email-status-grid,
  .domain-email-test-row,
  .delivery-queue-heading,
  .parent-page-heading,
  .parent-submission-inbox-heading,
  .agreement-record-heading,
  .agreement-export-heading,
  .payment-authorization-heading,
  .automation-action-panel,
  .review-row,
    .integration-summary-grid,
    .production-readiness-summary-grid,
    .production-secrets-summary-grid,
    .production-environment-guide-grid,
    .production-setup-approval-grid,
    .production-launch-track-grid,
    .production-launch-checklist-grid,
    .production-pilot-summary-grid,
    .limited-pilot-runbook-grid,
    .limited-pilot-checks-grid,
    .production-pilot-entry-grid,
    .production-setup-entry-grid,
    .limited-pilot-check-entry-grid,
    .parent-release-guard-grid,
    .parent-release-batch-summary-grid,
    .production-action-plan-summary,
    .privacy-audit-summary-grid,
    .launch-review-summary-grid,
    .wordpress-portal-grid,
    .production-readiness-row,
    .production-action-task,
  .ghl-sync-grid,
  .ghl-sync-columns,
  .ghl-api-form-grid,
  .ghl-payload-grid,
  .ghl-sync-queue-panel,
  .ghl-sync-queue-grid,
  .ghl-handoff-summary-grid,
  .square-handoff-summary-grid,
  .integration-action-panel,
  .integration-policy-panel,
  .backend-architecture-grid,
    .dashboard-hero-grid,
    .dashboard-link-card,
    .dashboard-link-actions,
    .portal-link-actions,
    .live-testing-step,
    .test-drive-grid,
    .parent-progress-list,
  .prepared-package-summary,
  .pipeline-step-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .production-readiness-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .storage-backup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .parent-form-body {
    padding: 14px;
  }

  .parent-form-header,
  .parent-card-heading-row,
  .registration-type-selector,
  .parent-form-grid,
  .portal-entry-grid,
  .portal-next-step-card,
  .admin-parent-split,
  .parent-summary-grid,
  .parent-payment-choice,
  .parent-submit-panel,
  .parent-portal-split,
  .parent-breakdown-heading {
    grid-template-columns: 1fr;
  }

  .parent-breakdown-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .parent-breakdown-row.header {
    display: none;
  }

  .parent-breakdown-row span {
    grid-column: 1;
  }

  .parent-breakdown-row strong {
    grid-column: 1;
    justify-self: start;
  }

  .parent-breakdown-row b {
    grid-column: 2;
    grid-row: 1;
  }

  .parent-breakdown-row.total strong {
    display: none;
  }

  .parent-breakdown-heading span,
  .parent-breakdown-row b {
    justify-self: start;
    text-align: left;
  }

  .template-actions {
    justify-content: stretch;
  }

  .template-actions button,
  .delivery-actions button,
  .billing-run-actions button,
  .parent-page-actions button,
  .agreement-export-actions button,
  .payment-authorization-actions button {
    flex: 1;
  }

  .wide-field {
    grid-column: span 1;
  }

  .agreement-record-row,
  .agreement-export-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .line-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .line-row.header {
    display: none;
  }

  .agreement-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase 1 admin portal polish: global shell, Dashboard, and Messages */
:root {
  --admin-bg: #f5f6f8;
  --admin-panel: #ffffff;
  --admin-soft: #f8fafc;
  --admin-border: #d9dee7;
  --admin-ink: #20242a;
  --admin-muted: #667085;
  --admin-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body {
  background: var(--admin-bg);
}

.app-shell {
  grid-template-columns: 236px minmax(0, 1fr);
  background: var(--admin-bg);
}

.sidebar {
  background: #24272b;
  border-right: 1px solid #1d2024;
}

.brand {
  min-height: 84px;
  border-bottom: 1px solid #eceff3;
}

.nav-list {
  gap: 3px;
  padding: 14px 12px;
}

.nav-item {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 750;
}

.nav-subitem {
  width: 100%;
  margin-left: 0;
  padding-left: 28px;
  font-size: 13px;
}

.nav-item:hover,
.nav-item.active {
  background: #b30005;
}

.workspace {
  padding: 24px 30px 34px;
}

.topbar {
  min-height: 96px;
  padding: 22px 26px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: none;
}

.topbar h1 {
  color: var(--admin-ink);
  font-size: 30px;
  line-height: 1.12;
}

.header-subtitle {
  max-width: 940px;
  color: var(--admin-muted);
  font-size: 15px;
  line-height: 1.45;
}

.top-actions,
.status-row {
  display: none;
}

.layout {
  margin-top: 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.builder-panel {
  background: transparent;
}

body[data-active-module="dashboard"] .layout,
body[data-active-module="messages"] .layout,
body[data-active-module="calendar"] .layout,
body[data-active-module="payments"] .layout,
body[data-active-module="accounting"] .layout,
body[data-active-module="settings"] .layout,
body[data-active-module="activity"] .layout,
body[data-active-module="automations"] .layout,
body[data-active-module="guidelines"] .layout {
  display: block;
  margin-top: 18px;
}

body[data-active-module="dashboard"] .family-panel,
body[data-active-module="messages"] .family-panel,
body[data-active-module="calendar"] .family-panel,
body[data-active-module="payments"] .family-panel,
body[data-active-module="accounting"] .family-panel,
body[data-active-module="settings"] .family-panel,
body[data-active-module="activity"] .family-panel,
body[data-active-module="automations"] .family-panel,
body[data-active-module="guidelines"] .family-panel,
body[data-active-module="messages"] .workflow-focus,
body[data-active-module="messages"] .advanced-module-drawer,
body[data-active-module="messages"] .module-panel-note {
  display: none;
}

body[data-active-module="messages"] .builder-panel,
body[data-active-module="calendar"] .builder-panel,
body[data-active-module="payments"] .builder-panel,
body[data-active-module="accounting"] .builder-panel,
body[data-active-module="settings"] .builder-panel,
body[data-active-module="activity"] .builder-panel,
body[data-active-module="automations"] .builder-panel,
body[data-active-module="guidelines"] .builder-panel {
  border: 0;
  padding: 0;
}

body[data-active-module="dashboard"] .dashboard-section {
  display: grid;
  gap: 18px;
  padding: 0;
  background: transparent;
}

body[data-active-module="dashboard"] .admin-home {
  padding: 26px;
  border-color: var(--admin-border);
  box-shadow: var(--admin-shadow);
}

body[data-active-module="dashboard"] .admin-home h2 {
  font-size: 32px;
}

body[data-active-module="dashboard"] .admin-home p {
  color: var(--admin-muted);
  font-size: 16px;
}

body[data-active-module="dashboard"] .admin-work-grid {
  margin: 0;
}

body[data-active-module="dashboard"] .admin-work-card {
  min-height: 142px;
  border-color: var(--admin-border);
  box-shadow: none;
}

body[data-active-module="dashboard"] .dashboard-hero-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
}

body[data-active-module="dashboard"] .dashboard-hero-card {
  min-height: 98px;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-left: 0;
  border-radius: 8px;
  box-shadow: none;
}

body[data-active-module="dashboard"] .dashboard-hero-card strong {
  color: var(--admin-ink);
  font-size: 20px;
}

body[data-active-module="dashboard"] .dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body[data-active-module="dashboard"] .dashboard-card {
  min-height: 220px;
  padding: 18px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}

body[data-active-module="dashboard"] .dashboard-mini-row {
  border-color: #eef1f5;
}

body[data-active-module="messages"] #registrationForm {
  display: block;
}

body[data-active-module="messages"] .form-section:not([data-module="messages"]) {
  display: none;
}

body[data-active-module="messages"] .message-center-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
}

body[data-active-module="messages"] .message-center-section > .section-heading {
  padding: 24px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: var(--admin-shadow);
}

body[data-active-module="messages"] .message-center-section > .section-heading h2 {
  margin-bottom: 6px;
  font-size: 30px;
}

body[data-active-module="messages"] .message-center-section > .section-heading .inline-note {
  color: var(--admin-muted);
  font-size: 15px;
  line-height: 1.45;
}

body[data-active-module="messages"] .message-summary-grid,
body[data-active-module="messages"] .domain-email-status-grid,
body[data-active-module="messages"] .delivery-summary-grid {
  gap: 10px;
  margin: 0;
}

body[data-active-module="messages"] .message-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-active-module="messages"] .message-summary-grid div,
body[data-active-module="messages"] .domain-email-status-grid div,
body[data-active-module="messages"] .delivery-summary-grid div {
  padding: 14px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}

body[data-active-module="messages"] .message-summary-grid strong,
body[data-active-module="messages"] .domain-email-status-grid strong,
body[data-active-module="messages"] .delivery-summary-grid strong {
  color: var(--admin-ink);
  font-size: 20px;
}

body[data-active-module="messages"] .domain-email-panel,
body[data-active-module="messages"] .message-template-panel,
body[data-active-module="messages"] .delivery-queue-panel,
body[data-active-module="messages"] .message-entry-grid,
body[data-active-module="messages"] .message-policy-panel,
body[data-active-module="messages"] .message-log-table {
  margin: 0;
  padding: 18px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: none;
}

body[data-active-module="messages"] .domain-email-panel {
  order: 1;
  border-top: 4px solid var(--brand-red);
}

body[data-active-module="messages"] .message-summary-grid {
  order: 2;
}

body[data-active-module="messages"] .message-entry-grid {
  order: 3;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-active-module="messages"] .message-template-panel {
  order: 4;
  border-left: 0;
}

body[data-active-module="messages"] .delivery-queue-panel {
  order: 5;
}

body[data-active-module="messages"] .message-log-table {
  order: 6;
}

body[data-active-module="messages"] .message-policy-panel,
body[data-active-module="messages"] .delivery-handoff-panel,
body[data-active-module="messages"] .delivery-release-review-panel {
  display: none;
}

body[data-active-module="messages"] .domain-email-heading,
body[data-active-module="messages"] .delivery-queue-heading {
  align-items: start;
}

body[data-active-module="messages"] .domain-email-heading h3,
body[data-active-module="messages"] .delivery-queue-heading h3 {
  color: var(--admin-ink);
  font-size: 20px;
}

body[data-active-module="messages"] .domain-email-test-row {
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr) auto;
}

body[data-active-module="messages"] .domain-email-result {
  background: var(--admin-soft);
  border-color: var(--admin-border);
}

body[data-active-module="messages"] .delivery-table,
body[data-active-module="messages"] .message-log-table {
  overflow-x: auto;
}

body[data-active-module="messages"] .wide-field {
  grid-column: span 3;
}

body[data-active-module="messages"] .add-message-button {
  min-height: 40px;
}

input,
select,
textarea {
  min-height: 40px;
  border-color: var(--admin-border);
  border-radius: 6px;
}

.primary-button,
.ghost-button,
.small-button,
.text-button,
.icon-button,
.mini-action-button {
  border-radius: 6px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .brand {
    min-height: 72px;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-active-module="dashboard"] .dashboard-hero-grid,
  body[data-active-module="dashboard"] .dashboard-grid,
  body[data-active-module="messages"] .message-summary-grid,
  body[data-active-module="messages"] .domain-email-status-grid,
  body[data-active-module="messages"] .delivery-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 12px;
  }

  .nav-list,
  .admin-home,
  .admin-work-grid,
  body[data-active-module="dashboard"] .dashboard-hero-grid,
  body[data-active-module="dashboard"] .dashboard-grid,
  body[data-active-module="messages"] .message-summary-grid,
  body[data-active-module="messages"] .domain-email-status-grid,
  body[data-active-module="messages"] .delivery-summary-grid,
  body[data-active-module="messages"] .domain-email-heading,
  body[data-active-module="messages"] .delivery-queue-heading,
  body[data-active-module="messages"] .domain-email-test-row,
  body[data-active-module="messages"] .message-entry-grid,
  body[data-active-module="messages"] .template-control-grid {
    grid-template-columns: 1fr;
  }

  body[data-active-module="messages"] .wide-field {
    grid-column: auto;
  }
}

/* Production admin template pass: keep existing workflow wiring, calm the shell. */
body {
  background: #f3f4f5;
}

.app-shell {
  grid-template-columns: 228px minmax(0, 1fr);
  background: #f3f4f5;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: #303234;
  color: #fff;
}

.brand {
  min-height: 88px;
  padding: 18px;
  background: #fff;
}

.brand-logo {
  width: 188px;
}

.nav-list {
  gap: 2px;
  padding: 14px 10px;
}

.nav-item {
  min-height: 42px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.78);
  border-left: 0;
  border-radius: 6px;
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: var(--brand-red);
  border-left-color: transparent;
}

.collapse-button {
  display: none;
}

.workspace {
  padding: 22px;
}

.topbar,
.status-row,
.layout,
.workflow-focus,
.advanced-module-drawer,
.module-panel-note,
.form-section,
.lower-grid {
  border: 1px solid var(--line);
}

.topbar {
  min-height: 104px;
  padding: 22px 24px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 12px 34px rgba(37, 37, 37, 0.06);
}

.eyebrow {
  color: var(--brand-red);
  font-size: 12px;
}

h1 {
  font-size: 32px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-row {
  margin-bottom: 18px;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.layout {
  grid-template-columns: 286px minmax(720px, 1fr);
  gap: 0;
  overflow: hidden;
  min-height: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(37, 37, 37, 0.06);
}

.family-panel {
  color: var(--ink);
  background: #f8f8f8;
  border-right: 1px solid var(--line);
}

.family-panel .section-label,
.section-label {
  color: var(--brand-red);
}

.family-panel h2,
.family-panel .muted,
.family-panel .contact-stack,
.family-panel .directory-toolbar strong,
.family-panel .directory-search-label {
  color: var(--ink);
}

.family-panel .muted,
.family-panel .contact-stack span,
.family-panel .directory-card small,
.family-panel .directory-card em {
  color: var(--muted);
}

.family-panel .divider {
  background: var(--line);
}

.directory-search-label input {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.directory-search-label input::placeholder {
  color: #8a8a8a;
}

.directory-card {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.directory-card.active-directory-card {
  background: var(--brand-red-soft);
  border-color: rgba(179, 0, 5, 0.35);
}

.builder-panel {
  border-right: 0;
}

.workflow-focus,
.advanced-module-drawer,
.module-panel-note,
.form-section,
.lower-grid {
  border-right: 0;
  border-left: 0;
}

.workflow-focus {
  padding: 24px;
}

.workflow-tabs {
  grid-template-columns: repeat(5, minmax(128px, 1fr));
}

.workflow-tab {
  min-height: 78px;
  background: #fafafa;
  border-radius: 6px;
}

.workflow-tab:hover,
.workflow-tab.active {
  box-shadow: none;
}

.advanced-module-drawer {
  background: #fff;
}

.advanced-module-drawer summary {
  padding: 12px 24px;
}

.module-panel-note {
  background: #f8f8f8;
}

.dashboard-section {
  background: #fff;
}

.dashboard-hero-grid {
  grid-template-columns: repeat(5, minmax(132px, 1fr));
}

.dashboard-hero-card,
.dashboard-link-card,
.live-testing-guide,
.prototype-test-drive,
.dashboard-card,
.post-submission-pipeline {
  border-radius: 6px;
  box-shadow: none;
}

.ledger-panel {
  display: none;
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .family-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

@media (max-width: 1160px) {
  .workspace {
    padding: 14px;
  }

  .sidebar {
    position: static;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-item {
    text-align: center;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 10px;
  }

  .nav-list,
  .dashboard-hero-grid,
  .directory-list {
    grid-template-columns: 1fr;
  }

  .layout,
  .topbar,
  .status-row {
    border-radius: 6px;
  }
}

/* Clean admin website template pass */
body {
  background: #f3f4f5;
}

.workspace {
  padding: 24px 28px;
}

.topbar {
  border-radius: 8px;
}

.status-row {
  margin-top: 12px;
  border-radius: 8px;
}

.layout {
  margin-top: 18px;
}

body[data-active-module="dashboard"] .layout {
  display: block;
}

body[data-active-module="dashboard"] .family-panel,
body[data-active-module="registration"] .family-panel,
body[data-active-module="agreement"] .family-panel,
body[data-active-module="parent"] .family-panel,
body[data-active-module="review"] .family-panel {
  display: none;
}

body[data-active-module="dashboard"] .builder-panel,
body[data-active-module="registration"] .builder-panel,
body[data-active-module="agreement"] .builder-panel,
body[data-active-module="parent"] .builder-panel,
body[data-active-module="review"] .builder-panel {
  border: 0;
}

body[data-active-module="registration"] .layout,
body[data-active-module="agreement"] .layout,
body[data-active-module="parent"] .layout,
body[data-active-module="review"] .layout {
  display: block;
}

body[data-active-module="dashboard"] .workflow-focus,
body[data-active-module="dashboard"] .advanced-module-drawer,
body[data-active-module="dashboard"] .module-panel-note {
  display: none;
}

body[data-active-module="dashboard"] .form-section {
  padding: 0;
  border: 0;
}

.module-hero {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.module-hero h2 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.08;
}

.module-hero p {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.module-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

body[data-active-module="registration"] .registration-hero {
  display: flex;
  margin-bottom: 18px;
}

.admin-home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-home-copy {
  max-width: 680px;
}

.admin-home h2 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.05;
}

.admin-home p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.admin-home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.admin-work-card {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 20px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-work-card:hover {
  border-color: rgba(179, 0, 5, 0.35);
  box-shadow: 0 14px 34px rgba(37, 37, 37, 0.08);
}

.admin-work-card span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 999px;
  font-weight: 900;
}

.admin-work-card strong {
  font-size: 20px;
  line-height: 1.15;
}

.admin-work-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.primary-work-card {
  border-color: rgba(179, 0, 5, 0.32);
  background: linear-gradient(180deg, #fff, #fff7f7);
}

.primary-work-card span {
  background: var(--brand-red);
}

body[data-active-module="dashboard"] .dashboard-link-card {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 18px;
}

body[data-active-module="dashboard"] .dashboard-link-actions {
  grid-template-columns: minmax(0, 1fr) repeat(4, auto);
}

body[data-active-module="dashboard"] .live-testing-guide,
body[data-active-module="dashboard"] .dashboard-link-card,
body[data-active-module="dashboard"] .post-submission-pipeline {
  display: none;
}

body[data-active-module="dashboard"] .import-command-center {
  margin-top: 18px;
  background: #fff;
  border-radius: 8px;
}

body[data-active-module="dashboard"] .dashboard-grid {
  display: none;
}

body[data-active-module="dashboard"] .dashboard-card {
  min-height: 180px;
}

body[data-active-module="dashboard"] .dashboard-hero-grid {
  display: none;
}

body[data-active-module="dashboard"] .dashboard-section > .section-heading {
  display: none;
}

body[data-active-module="dashboard"] .next-action-panel {
  margin: 18px 0 0;
  background: #fff;
  border-radius: 8px;
}

body[data-active-module="registration"] .workflow-focus {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

body[data-active-module="registration"] .topbar,
body[data-active-module="registration"] .status-row {
  display: none;
}

body[data-active-module="registration"] .advanced-module-drawer,
body[data-active-module="registration"] .module-panel-note {
  margin-top: 12px;
  border-radius: 8px;
}

body[data-active-module="registration"] #registrationForm {
  counter-reset: registration-step;
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

body[data-active-module="registration"] .form-section,
body[data-active-module="registration"] .lower-grid {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

body[data-active-module="registration"] .section-heading {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

body[data-active-module="registration"] .section-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  font-size: 24px;
}

body[data-active-module="registration"] .form-section[data-module="registration"] .section-heading h2::before,
body[data-active-module="registration"] .lower-grid[data-module="registration"] .info-panel:first-child h3::before {
  counter-increment: registration-step;
  content: counter(registration-step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: #fff;
  background: var(--brand-red);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
}

body[data-active-module="registration"] .registration-prep-overview,
body[data-active-module="registration"] .path-selector,
body[data-active-module="registration"] .form-grid,
body[data-active-module="registration"] .lower-grid {
  margin-top: 16px;
}

body[data-active-module="families"] .workflow-focus,
body[data-active-module="families"] .advanced-module-drawer {
  display: none;
}

body[data-active-module="families"] .topbar,
body[data-active-module="families"] .status-row,
body[data-active-module="families"] .family-panel,
body[data-active-module="families"] .module-panel-note,
body[data-active-module="families"] .families-section > .section-heading,
body[data-active-module="families"] .families-home-grid,
body[data-active-module="families"] .families-guide-panel {
  display: none;
}

body[data-active-module="families"] .layout {
  display: block;
  margin-top: 0;
  border: 0;
  box-shadow: none;
}

body[data-active-module="families"] .workspace {
  padding-top: 10px;
}

body[data-active-module="families"] .builder-panel {
  border: 0;
  padding: 0;
}

body[data-active-module="families"] .form-section {
  padding: 0;
  background: #fff;
}

body[data-active-module="families"] .family-profile-workspace,
body[data-active-module="families"] .family-profile-table {
  min-width: 0;
}

body[data-active-module="families"] .family-profile-table {
  max-height: none;
  max-width: 100%;
  overflow: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

body[data-active-module="families"] .family-profile-row.header {
  position: static;
}

body[data-active-module="submissions"] .layout {
  display: block;
  margin-top: 0;
  border: 0;
  box-shadow: none;
}

body[data-active-module="submissions"] .topbar,
body[data-active-module="submissions"] .status-row,
body[data-active-module="submissions"] .family-panel,
body[data-active-module="submissions"] .workflow-focus,
body[data-active-module="submissions"] .advanced-module-drawer,
body[data-active-module="submissions"] .module-panel-note,
body[data-active-module="submissions"] .registration-hero {
  display: none;
}

body[data-active-module="submissions"] .builder-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

body[data-active-module="submissions"] #registrationForm {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

body[data-active-module="submissions"] .submissions-section {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

body[data-active-module="submissions"] .submissions-section > .section-heading {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

body[data-active-module="temporary"] .layout {
  display: block;
  margin-top: 0;
  border: 0;
  box-shadow: none;
}

body[data-active-module="temporary"] .topbar,
body[data-active-module="temporary"] .status-row,
body[data-active-module="temporary"] .family-panel,
body[data-active-module="temporary"] .workflow-focus,
body[data-active-module="temporary"] .advanced-module-drawer,
body[data-active-module="temporary"] .module-panel-note,
body[data-active-module="temporary"] .registration-hero {
  display: none;
}

body[data-active-module="temporary"] .builder-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

body[data-active-module="temporary"] #registrationForm {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

body[data-active-module="temporary"] .temporary-section {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

body[data-active-module="temporary"] .temporary-section > .section-heading {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

body[data-active-module="family-profile"] .layout {
  display: block;
  margin-top: 0;
  border: 0;
  box-shadow: none;
}

body[data-active-module="family-profile"] .topbar,
body[data-active-module="family-profile"] .status-row,
body[data-active-module="family-profile"] .family-panel,
body[data-active-module="family-profile"] .workflow-focus,
body[data-active-module="family-profile"] .advanced-module-drawer,
body[data-active-module="family-profile"] .module-panel-note,
body[data-active-module="family-profile"] .directory-panel {
  display: none;
}

body[data-active-module="family-profile"] .builder-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

body[data-active-module="family-profile"] .form-section {
  padding: 0;
  background: transparent;
}

body[data-active-module="family-profile"] .workspace {
  padding-top: 10px;
}

body[data-active-module="payments"] .layout {
  display: block;
  margin-top: 0;
}

body[data-active-module="payments"] .topbar,
body[data-active-module="payments"] .family-panel,
body[data-active-module="payments"] .workflow-focus,
body[data-active-module="payments"] .advanced-module-drawer,
body[data-active-module="payments"] .status-row {
  display: none;
}

body[data-active-module="payments"] .form-section:not([data-module="payments"]),
body[data-active-module="payments"] .lower-grid:not([data-module="payments"]) {
  display: none;
}

body[data-active-module="payments"] .builder-panel {
  border: 0;
  padding: 0;
}

body[data-active-module="payments"] .module-panel-note {
  display: none;
}

body[data-active-module="payments"] .payments-detail-drawer,
body[data-active-module="payments"] .collection-section,
body[data-active-module="payments"] .form-section[data-module="payments"]:not(.payments-main-section) {
  display: none;
}

body[data-active-module="payments"] #registrationForm {
  display: grid;
  gap: 16px;
}

body[data-active-module="payments"] .form-section[data-module="payments"] {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

body[data-active-module="payments"] .form-section[data-module="payments"] + .form-section[data-module="payments"] {
  margin-top: 0;
}

body[data-active-module="payments"] .section-heading {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

body[data-active-module="payments"] .section-heading h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

body[data-active-module="calendar"] .layout {
  display: block;
  margin-top: 0;
}

body[data-active-module="calendar"] .topbar,
body[data-active-module="calendar"] .family-panel,
body[data-active-module="calendar"] .workflow-focus,
body[data-active-module="calendar"] .advanced-module-drawer,
body[data-active-module="calendar"] .status-row,
body[data-active-module="calendar"] .module-panel-note,
body[data-active-module="calendar"] .rollover-section {
  display: none;
}

body[data-active-module="calendar"] .builder-panel {
  border: 0;
  padding: 0;
}

body[data-active-module="calendar"] #registrationForm {
  display: block;
}

body[data-active-module="calendar"] .calendar-manager-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

body[data-active-module="calendar"] .calendar-manager-section > .section-heading {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

body[data-active-module="calendar"] .calendar-manager-section > .section-heading h2 {
  margin: 0;
  color: var(--charcoal);
  font-size: 30px;
  line-height: 1.15;
}

body[data-active-module="calendar"] .calendar-summary-grid {
  margin-top: 18px;
}

body[data-active-module="calendar"] .calendar-entry-card,
body[data-active-module="calendar"] .calendar-event-card,
body[data-active-module="calendar"] .calendar-policy-panel {
  margin-top: 18px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

body[data-active-module="calendar"] .calendar-entry-card-heading,
body[data-active-module="calendar"] .calendar-event-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

body[data-active-module="calendar"] .calendar-entry-card-heading h3,
body[data-active-module="calendar"] .calendar-event-card-heading h3 {
  margin: 0;
  color: var(--charcoal);
  font-size: 20px;
  line-height: 1.2;
}

body[data-active-module="calendar"] .calendar-entry-card-heading p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

body[data-active-module="calendar"] .calendar-event-table {
  margin-top: 0;
  overflow-x: auto;
  border-radius: 8px;
}

body[data-active-module="calendar"] .calendar-event-row {
  grid-template-columns: 130px 110px 165px 150px minmax(190px, 0.9fr) minmax(260px, 1.1fr) 108px;
  min-width: 1080px;
  min-height: 54px;
  padding: 10px 14px;
  font-size: 14px;
}

body[data-active-module="calendar"] .calendar-event-row.header {
  min-height: 42px;
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-active-module="calendar"] .calendar-remove-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 86px;
  height: 32px;
  padding: 0 10px;
  color: #667085;
  background: #fff;
  border: 1px solid #d0d5dd;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

body[data-active-module="calendar"] .calendar-remove-button:hover {
  color: var(--brand-red);
  background: var(--brand-red-soft);
}

body[data-active-module="calendar"] .calendar-remove-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body[data-active-module="calendar"] .calendar-empty-state {
  display: grid;
  gap: 6px;
  padding: 26px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

body[data-active-module="calendar"] .calendar-empty-state strong {
  color: var(--charcoal);
  font-size: 16px;
}

.payments-home {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.payment-workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-workspace-tab {
  min-height: 42px;
  padding: 0 16px;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.payment-workspace-tab:hover {
  color: var(--charcoal);
  background: #fff;
  border-color: #dbe2ea;
}

.payment-workspace-tab.active {
  color: #fff;
  background: #991b1b;
  border-color: #991b1b;
  box-shadow: 0 8px 18px rgba(153, 27, 27, 0.18);
}

.registration-workspace-nav {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

body[data-active-module="registration"] .registration-workspace-nav,
body[data-active-module="temporary"] .registration-workspace-nav,
body[data-active-module="submissions"] .registration-workspace-nav {
  display: flex;
}

.registration-workspace-tab {
  min-height: 42px;
  padding: 0 16px;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.registration-workspace-tab:hover {
  color: var(--charcoal);
  background: #fff;
  border-color: #dbe2ea;
}

.registration-workspace-tab.active {
  color: #fff;
  background: #991b1b;
  border-color: #991b1b;
  box-shadow: 0 8px 18px rgba(153, 27, 27, 0.18);
}

.payment-workspace[hidden] {
  display: none !important;
}

.payment-workspace {
  display: grid;
  gap: 18px;
}

.payments-command-center {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.payments-command-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.payments-command-header h3 {
  margin: 4px 0 6px;
  font-size: 24px;
  line-height: 1.15;
}

.payments-command-header p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.payments-command-header label {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.payments-command-header input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--charcoal);
  font: inherit;
  font-weight: 800;
  background: #f8fafc;
  border: 1px solid #cfd6df;
  border-radius: 8px;
}

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

.payment-metric-card,
.payment-queue-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #dce3ea;
  border-radius: 8px;
}

.payment-metric-card span,
.payment-queue-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.payment-metric-card strong,
.payment-queue-card strong {
  font-size: 24px;
  line-height: 1;
}

.payment-metric-card small,
.payment-queue-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.payments-workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.payment-attention-panel {
  overflow: hidden;
  margin-top: 12px;
  background: #fff;
  border: 1px solid #dce3ea;
  border-radius: 8px;
}

.payment-attention-list {
  display: grid;
}

.payment-attention-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(130px, 0.7fr) minmax(150px, 0.8fr) minmax(170px, 1fr) minmax(120px, 0.7fr) minmax(150px, auto);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  color: var(--charcoal);
  font: inherit;
  text-align: left;
  background: #fff;
  border: 0;
  border-top: 1px solid var(--line);
}

.payment-attention-row:not(.header):hover {
  background: #fff8ec;
}

.payment-attention-row.header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  background: #f8fafc;
}

.payment-attention-row strong,
.payment-attention-row small {
  display: block;
}

.payment-attention-row small,
.payment-attention-empty span {
  color: var(--muted);
}

.payment-attention-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.payment-attention-actions .small {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.payment-attention-empty {
  display: grid;
  gap: 4px;
  padding: 18px 16px;
}

.payment-overview-detail,
.payment-maintenance-drawer {
  overflow: hidden;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-overview-detail[open],
.payment-maintenance-drawer[open] {
  overflow: visible;
}

.payment-overview-detail summary,
.payment-maintenance-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.payment-overview-detail summary::-webkit-details-marker,
.payment-maintenance-drawer summary::-webkit-details-marker {
  display: none;
}

.payment-overview-detail summary::after,
.payment-maintenance-drawer summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--charcoal);
  font-size: 18px;
  font-weight: 900;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-overview-detail[open] summary::after,
.payment-maintenance-drawer[open] summary::after {
  content: "-";
}

.payment-overview-detail summary span,
.payment-maintenance-drawer summary span {
  color: var(--charcoal);
  font-size: 17px;
  font-weight: 900;
}

.payment-overview-detail summary small,
.payment-maintenance-drawer summary small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.payment-overview-detail .payments-workflow-grid,
.payment-maintenance-drawer .payment-import-panel {
  margin: 0;
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}

.payments-ledger-panel,
.payment-q-panel {
  overflow: hidden;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-payment-header {
  padding: 14px 16px;
}

.compact-payment-header h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.compact-payment-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.payment-transactions-table {
  display: grid;
}

.payment-transaction-row {
  display: grid;
  grid-template-columns: 120px minmax(190px, 1.25fr) minmax(180px, 1.2fr) minmax(130px, 0.85fr) 110px 110px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.payment-transaction-row.header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  background: #f1f5f9;
}

.payment-transaction-row:not(.header):hover {
  background: #fff;
}

.payment-transaction-row.is-refund strong:last-child {
  color: #9f1239;
}

.payment-transaction-row span {
  min-width: 0;
}

.payment-transaction-row strong {
  display: block;
  color: var(--charcoal);
}

.payment-transaction-row small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-queue-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.payments-home-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.payments-home-summary div,
.payments-list-panel,
.payments-action-panel,
.payment-service-panel,
.payment-import-panel,
.payments-detail-drawer {
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payments-home-summary div {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 18px;
}

.payments-home-summary span,
.payments-family-row.header span,
.payments-list-header label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.payments-home-summary strong {
  font-size: 30px;
  line-height: 1;
}

.payments-home-summary small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.payments-home-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.payments-list-panel {
  overflow: hidden;
}

.payments-list-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.payments-list-header h3,
.payments-action-panel h3 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
}

.payments-list-header p,
.payments-action-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.list-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 13px;
  color: var(--charcoal);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  background: #f2f3f5;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.payments-list-header label {
  display: grid;
  gap: 7px;
  min-width: 260px;
}

.payments-list-header input {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
}

.payments-family-table {
  display: grid;
}

.payments-family-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) minmax(130px, 0.8fr) minmax(170px, 1fr) minmax(110px, 0.7fr) minmax(95px, 0.6fr) minmax(150px, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 13px 18px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.payments-family-row:not(.header):hover {
  background: #fff7f7;
}

.payments-family-row.header {
  min-height: 46px;
  background: #f5f5f5;
}

.payments-family-row strong {
  display: block;
  font-size: 17px;
  line-height: 1.3;
}

.payments-family-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.payment-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  border-radius: 999px;
}

.payment-status-chip.ready {
  color: #0d5f3f;
  background: #e7f6ee;
}

.payment-status-chip.pad-verified {
  color: #0d5f3f;
  background: #e7f6ee;
  border: 1px solid #b8e4cd;
}

.payment-status-chip.credit-card {
  color: #7a4a00;
  background: #fff0bf;
  border: 1px solid #f3d178;
}

.payment-status-chip.needs-setup {
  color: #8a4d00;
  background: #fff1d6;
}

.payment-status-chip.hold {
  color: #8a1f1f;
  background: #ffe5e5;
}

.payment-status-chip.review {
  color: var(--charcoal);
  background: #e9eaec;
}

.payment-status-chip.semester {
  color: #8f3151;
  background: #ffe8f0;
}

.payments-family-empty {
  display: grid;
  gap: 6px;
  padding: 28px;
  color: var(--muted);
}

.payments-family-empty strong {
  color: var(--text);
  font-size: 18px;
}

.payment-import-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.payment-service-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.payment-service-batches-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.payment-queue-directory {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-queue-directory-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.payment-queue-directory-heading h4 {
  margin: 4px 0 6px;
  font-size: 20px;
}

.payment-queue-directory-heading p {
  margin: 0;
  color: var(--muted);
}

.payment-queue-directory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 240px;
}

.payment-queue-directory-actions strong {
  color: var(--charcoal);
}

.payment-queue-directory-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.payment-queue-method-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.payment-queue-method-card.primary-queue {
  border-color: #d9b8b8;
  background: #fffafa;
}

.payment-queue-method-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.payment-queue-method-heading span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-queue-method-heading strong {
  display: block;
  margin-top: 3px;
  color: var(--charcoal);
  font-size: 18px;
}

.payment-queue-method-table {
  display: grid;
}

.payment-queue-method-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(130px, 1fr) minmax(90px, 0.7fr) minmax(70px, 0.5fr) minmax(100px, 0.7fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.payment-queue-method-row.header {
  min-height: 36px;
  background: #fff;
}

.payment-queue-method-row.header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-queue-method-row strong,
.payment-queue-method-row small {
  display: block;
}

.payment-queue-method-row small,
.payment-queue-empty {
  color: var(--muted);
  font-size: 13px;
}

.payment-queue-empty {
  padding: 16px 14px;
}

.compact-empty {
  padding: 16px;
}

@media (max-width: 980px) {
  .payment-queue-directory-heading,
  .payment-queue-directory-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .payment-queue-directory-heading {
    flex-direction: column;
  }

  .payment-queue-method-grid {
    grid-template-columns: 1fr;
  }

  .payment-queue-method-table {
    overflow-x: auto;
  }

  .payment-queue-method-row {
    min-width: 720px;
  }
}

.compact-heading {
  grid-template-columns: minmax(0, 1fr);
}

.payment-service-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 620px);
  gap: 18px;
  align-items: start;
}

.payment-service-heading h3 {
  margin: 4px 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

.payment-service-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

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

.payment-service-controls label {
  display: grid;
  gap: 6px;
}

.payment-service-controls label span,
.payment-service-status,
.payment-service-family-row.header span,
.payment-service-actions strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-service-controls input,
.payment-service-controls select {
  min-height: 42px;
  padding: 9px 11px;
  font-size: 15px;
}

.payment-service-controls .wide-field {
  grid-column: 1 / -1;
}

.payment-service-controls button {
  min-height: 42px;
}

.service-catalog-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.service-catalog-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.55fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-catalog-row.header {
  padding: 0 10px 2px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-catalog-row label {
  display: block;
}

.service-catalog-row input,
.service-catalog-row select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}

.service-catalog-delete {
  color: #667085;
  border-color: #d0d5dd;
}

.service-catalog-delete:hover {
  color: #b42318;
  background: #fff5f5;
  border-color: #f3b4b4;
}

.payment-service-status {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-service-selected-parent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-service-selected-parent strong {
  color: var(--red);
}

.payment-service-selected-parent small {
  color: var(--muted);
  font-size: 14px;
}

.payment-service-calculation {
  padding: 12px 14px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  background: #fff7f7;
  border: 1px solid #f0d0d0;
  border-radius: 6px;
}

.payment-group-draft-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-group-draft-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-group-draft-summary span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.payment-group-draft-list {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-group-draft-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(150px, 0.9fr) minmax(130px, 0.7fr) minmax(160px, 0.9fr) minmax(90px, 0.45fr) 86px;
  gap: 12px;
  align-items: center;
  min-width: 880px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.payment-group-draft-row.header {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  background: #f5f5f5;
}

.payment-group-draft-row:last-child {
  border-bottom: 0;
}

.payment-group-draft-row strong,
.payment-group-draft-row small {
  display: block;
}

.payment-group-draft-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.payment-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.payment-service-selector {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-charge-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.payment-charge-workbench .payment-service-selector {
  min-height: 0;
}

.payment-charge-workbench .payments-list-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.payment-charge-workbench .payments-list-header label {
  grid-column: 1 / -1;
  width: 100%;
}

.payment-charge-workbench .payments-list-header input[type="search"] {
  width: 100%;
}

.payment-charge-workbench .payment-service-family-table {
  max-height: 380px;
  min-height: 220px;
  overflow: auto;
}

.payment-charge-composer {
  position: static;
  display: grid;
  gap: 14px;
  max-height: none;
  overflow: visible;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-charge-composer > .payment-service-heading {
  grid-template-columns: 1fr;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.payment-charge-composer > .payment-service-heading h3 {
  font-size: 22px;
}

.payment-charge-composer > .payment-service-heading p {
  max-width: 62ch;
}

.payment-charge-composer .payment-service-controls {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.payment-charge-composer .payment-service-controls button {
  grid-column: 1 / -1;
}

.service-charge-schedule {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-charge-schedule-header,
.service-charge-installment-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(140px, 1fr) minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
}

.service-charge-schedule-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-charge-installment-row strong {
  color: var(--charcoal);
  font-size: 14px;
}

.payment-charge-composer > .payment-service-selected-parent,
.payment-charge-composer > .payment-service-calculation,
.payment-charge-composer > .payment-service-status,
.payment-charge-composer > .payment-group-draft-panel {
  margin-right: 14px;
  margin-left: 14px;
}

.payment-charge-composer > .payment-group-draft-panel {
  margin-bottom: 14px;
}

.payment-service-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8f8f8;
}

.payment-service-family-table {
  display: grid;
}

.payment-service-family-row {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1.3fr) minmax(120px, 0.7fr) minmax(160px, 1fr) minmax(145px, 0.8fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 12px 18px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.payment-service-family-row:not(.header):hover {
  background: #fff7f7;
}

.payment-service-family-row.selected {
  background: #fff1f1;
  box-shadow: inset 4px 0 0 var(--red);
}

.payment-service-row-checkbox,
.payment-service-select-all {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--red);
  cursor: pointer;
}

.payment-service-family-row.header {
  min-height: 44px;
  background: #f5f5f5;
  cursor: default;
}

.payment-service-family-row strong {
  display: block;
  font-size: 17px;
  line-height: 1.3;
}

.payment-service-family-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.payment-charge-workbench .payment-service-family-row {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  min-height: 74px;
  padding: 12px 14px;
}

.payment-charge-workbench .payment-service-family-row.header {
  display: none;
}

.payment-charge-workbench .payment-service-family-row > span:first-child {
  grid-row: 1 / span 3;
  padding-top: 2px;
}

.payment-charge-workbench .payment-service-family-row > span:nth-child(2),
.payment-charge-workbench .payment-service-family-row > span:nth-child(3),
.payment-charge-workbench .payment-service-family-row > span:nth-child(4),
.payment-charge-workbench .payment-service-family-row > span:nth-child(5) {
  grid-column: 2;
  min-width: 0;
}

.payment-charge-workbench .payment-service-family-row > span:nth-child(3),
.payment-charge-workbench .payment-service-family-row > span:nth-child(4),
.payment-charge-workbench .payment-service-family-row > span:nth-child(5) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.payment-charge-workbench .payment-service-family-row > span:nth-child(3)::before {
  content: "Teacher: ";
  font-weight: 800;
}

.payment-charge-workbench .payment-service-family-row > span:nth-child(4)::before {
  content: "Payment: ";
  font-weight: 800;
}

.payment-charge-workbench .payment-service-family-row > span:nth-child(5) small {
  display: inline;
  margin-left: 6px;
  font-size: 12px;
}

@media (min-width: 1900px) {
  .payment-charge-workbench {
    grid-template-columns: minmax(520px, 0.9fr) minmax(760px, 1.1fr);
    gap: 18px;
  }

  .payment-charge-composer {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 160px);
    overflow: auto;
  }

  .payment-charge-workbench .payment-service-selector {
    max-height: calc(100vh - 210px);
    min-height: 560px;
  }

  .payment-charge-workbench .payments-list-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .payment-charge-workbench .payment-service-family-table {
    max-height: calc(100vh - 390px);
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .payment-charge-workbench .payments-list-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .payment-charge-composer .payment-service-controls {
    grid-template-columns: 1fr;
  }
}

.recurring-billing-page {
  display: grid;
  gap: 18px;
}

.recurring-billing-hero,
.recurring-billing-control-panel,
.recurring-preview-panel,
.recurring-plans-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.recurring-preview-panel {
  overflow: hidden;
}

.recurring-preview-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.recurring-preview-panel summary::-webkit-details-marker {
  display: none;
}

.recurring-preview-panel summary span {
  color: var(--charcoal);
  font-size: 18px;
  font-weight: 900;
}

.recurring-preview-panel summary small {
  max-width: 640px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.recurring-preview-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.recurring-preview-panel:not([open]) .recurring-queue-preview {
  display: none;
}

.recurring-billing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 20px;
  align-items: stretch;
  padding: 22px;
}

.recurring-billing-hero h3 {
  margin: 4px 0 8px;
  color: var(--charcoal);
  font-size: 28px;
  line-height: 1.12;
}

.recurring-billing-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.recurring-billing-status-card {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 96px;
  padding: 16px;
  color: #475467;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.recurring-billing-status-card span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.recurring-billing-status-card strong {
  color: var(--charcoal);
  font-size: 28px;
  line-height: 1;
}

.recurring-billing-status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recurring-billing-control-panel {
  display: grid;
  grid-template-columns: minmax(210px, 360px) max-content;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
}

.recurring-control-card,
.recurring-extra-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.recurring-control-card span,
.recurring-extra-card > label span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.recurring-control-card strong {
  color: var(--charcoal);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.recurring-control-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.recurring-control-card input,
.recurring-extra-card input[type="number"] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
}

.recurring-control-card.search-control input {
  font-size: 15px;
}

.recurring-plan-search-row {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(260px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.recurring-plan-search-row label {
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}

.recurring-plan-search-row input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.recurring-plan-search-row input:focus {
  outline: 2px solid rgba(153, 27, 27, 0.16);
  border-color: #b42318;
}

.recurring-extra-card {
  grid-template-columns: minmax(0, 1fr);
}

.recurring-extra-card .inline-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.recurring-reset-button {
  align-self: center;
  min-width: 150px;
  height: 42px;
  white-space: nowrap;
}

.recurring-one-time-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.compact-recurring-heading {
  align-items: center;
}

.compact-recurring-heading p {
  max-width: 900px;
}

.recurring-one-time-summary {
  padding: 12px 20px;
  color: #475467;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.recurring-one-time-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.recurring-one-time-item {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(120px, 0.25fr) 40px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.recurring-one-time-item input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.recurring-one-time-item input[type="text"]:focus {
  outline: 2px solid rgba(153, 27, 27, 0.16);
  border-color: #b42318;
}

.recurring-one-time-remove {
  width: 36px;
  height: 36px;
  color: #667085;
  background: #fff;
  border: 1px solid #d0d5dd;
}

.recurring-one-time-remove:hover {
  color: var(--brand-red);
  background: var(--brand-red-soft);
}

.recurring-one-time-remove svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.recurring-one-time-empty {
  display: grid;
  gap: 4px;
  padding: 16px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.recurring-one-time-empty strong {
  color: var(--charcoal);
}

.recurring-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recurring-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.recurring-section-heading h3 {
  margin: 0 0 4px;
  color: var(--charcoal);
  font-size: 22px;
  line-height: 1.2;
}

.recurring-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.recurring-queue-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.recurring-queue-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.recurring-queue-card.pad {
  border-color: #b8e4cd;
}

.recurring-queue-card.card {
  border-color: #f3d178;
}

.recurring-queue-card.manual {
  border-color: #d0d5dd;
}

.recurring-queue-card.semester {
  border-color: #f3bdd1;
}

.recurring-queue-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.recurring-queue-card.pad .recurring-queue-card-header {
  background: #f3fbf6;
}

.recurring-queue-card.card .recurring-queue-card-header {
  background: #fff8de;
}

.recurring-queue-card.semester .recurring-queue-card-header {
  background: #fff3f7;
}

.recurring-queue-card-header span,
.recurring-queue-card-header small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.recurring-queue-card-header strong {
  display: block;
  margin-top: 4px;
  color: var(--charcoal);
  font-size: 22px;
}

.recurring-queue-card-header small {
  max-width: 220px;
  text-align: right;
  line-height: 1.35;
  text-transform: none;
}

.recurring-queue-lines {
  display: grid;
}

.recurring-queue-line {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(80px, 0.55fr) minmax(74px, 0.42fr) minmax(74px, 0.42fr) minmax(82px, 0.45fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 16px;
  border-bottom: 1px solid #eef2f6;
  font-size: 13px;
}

.recurring-queue-line:last-child {
  border-bottom: 0;
}

.recurring-queue-line strong,
.recurring-queue-line small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-queue-line small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.recurring-queue-more {
  padding: 12px 16px;
  color: var(--muted);
  background: #fafafa;
  font-size: 13px;
  font-weight: 800;
}

.recurring-billing-table {
  display: grid;
  gap: 12px;
  max-height: 760px;
  overflow: auto;
  padding: 16px;
  background: #f8fafc;
  border: 0;
  border-radius: 0 0 8px 8px;
}

.recurring-plan-list-intro {
  position: sticky;
  top: -16px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(180px, auto) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  color: #475467;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.recurring-plan-list-intro span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.recurring-plan-list-intro strong {
  color: var(--charcoal);
  font-size: 15px;
  font-weight: 900;
}

.recurring-plan-list-intro small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.recurring-plan-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(320px, 1fr) minmax(360px, 1.15fr);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
  min-height: 156px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.recurring-plan-row:hover {
  background: #fbfcfe;
  border-color: #d6dfe8;
}

.recurring-plan-row.editing {
  background: #fffdf8;
  border-color: #f2ddbf;
}

.recurring-plan-family,
.recurring-plan-schedule,
.recurring-plan-payment {
  min-width: 0;
}

.recurring-plan-family {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 4px 4px 4px 0;
}

.recurring-family-kicker,
.recurring-card-section-heading span,
.recurring-plan-row label span,
.recurring-repeat-rule span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.recurring-plan-family strong {
  color: var(--charcoal);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recurring-plan-family small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
}

.recurring-plan-schedule,
.recurring-plan-payment {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.recurring-card-section-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.recurring-card-section-heading strong {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 900;
}

.recurring-schedule-fields,
.recurring-payment-fields {
  display: grid;
  gap: 10px;
}

.recurring-schedule-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recurring-payment-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recurring-plan-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.recurring-plan-row input,
.recurring-plan-row select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.recurring-plan-row input[type="date"] {
  min-height: 44px;
  padding-right: 8px;
  color-scheme: light;
}

.recurring-plan-row input:focus,
.recurring-plan-row select:focus,
.recurring-control-card input:focus,
.recurring-extra-card input[type="number"]:focus {
  outline: 2px solid rgba(153, 27, 27, 0.16);
  border-color: #b42318;
}

.recurring-billing-page input[type="number"]::-webkit-outer-spin-button,
.recurring-billing-page input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.recurring-billing-page input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.recurring-plan-months {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.recurring-repeat-rule {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.recurring-repeat-rule strong {
  color: var(--charcoal);
  font-size: 15px;
  font-weight: 900;
}

.recurring-item-toggle,
.recurring-plan-family .inline-action-button {
  width: fit-content;
  min-height: 36px;
  margin-top: 10px;
  padding: 7px 11px;
  color: #7f1d1d;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.recurring-plan-family .inline-action-button:hover {
  background: #ffedd5;
}

.recurring-invoice-editor-row {
  min-width: 0;
  padding: 14px 16px 18px 16px;
  background: #fffaf0;
  border: 1px solid #f2ddbf;
  border-radius: 8px;
}

.recurring-invoice-editor-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.recurring-invoice-editor-heading strong {
  display: block;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 900;
}

.recurring-invoice-lines {
  display: grid;
  gap: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #f0dfc5;
  border-radius: 8px;
}

.recurring-invoice-line {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 86px 108px 112px 42px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #f6ead9;
}

.recurring-invoice-line:last-child {
  border-bottom: 0;
}

.recurring-invoice-line-header {
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: #6b7280;
  background: #fffaf0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.recurring-invoice-line-footer {
  background: #fffdf8;
}

.recurring-invoice-grand-total {
  background: #fff7ed;
}

.recurring-invoice-line-footer strong {
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 900;
}

.recurring-invoice-grand-total strong {
  color: #7c2d12;
  font-size: 15px;
}

.recurring-invoice-line select,
.recurring-invoice-line input {
  min-width: 0;
}

.recurring-invoice-line-header span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.recurring-invoice-line input,
.recurring-invoice-line select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.recurring-invoice-line-total {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .recurring-billing-hero,
  .recurring-billing-control-panel,
  .recurring-queue-preview {
    grid-template-columns: 1fr;
  }

  .recurring-reset-button {
    justify-self: start;
  }

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

  .recurring-plan-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .recurring-summary-grid {
    grid-template-columns: 1fr;
  }

  .recurring-queue-card-header,
  .recurring-section-heading {
    display: grid;
  }

  .recurring-queue-card-header small {
    text-align: left;
  }

  .recurring-one-time-item {
    grid-template-columns: minmax(0, 1fr) 88px 40px;
  }

  .recurring-plan-list-intro,
  .recurring-schedule-fields,
  .recurring-payment-fields,
  .recurring-invoice-line {
    grid-template-columns: 1fr;
  }
}

.payment-service-batch-list {
  display: grid;
  gap: 14px;
}

.service-batch-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-batch-card {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-batch-card.is-archived {
  opacity: 0.72;
  background: #f8f8f8;
}

.service-batch-summary {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.service-batch-summary h4 {
  margin: 4px 0 6px;
  font-size: 20px;
  line-height: 1.25;
}

.service-batch-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.service-batch-queue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.service-batch-queue-summary span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.service-batch-queue-summary strong {
  color: var(--red);
  font-size: inherit;
}

.service-batch-actions,
.service-batch-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.service-batch-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-batch-table {
  display: grid;
  min-width: 960px;
}

.service-batch-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(120px, 0.7fr) minmax(90px, 0.5fr) minmax(120px, 0.6fr) minmax(230px, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.service-batch-row.header {
  min-height: 42px;
  background: #f5f5f5;
}

.service-batch-row.header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-batch-row strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}

.service-batch-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.service-batch-row.is-voided {
  color: var(--muted);
  background: #f8f8f8;
}

.service-batch-row.is-voided strong,
.service-batch-row.is-voided small {
  text-decoration: line-through;
}

.danger-action {
  color: #9f1d1d;
  border-color: #f1b4b4;
  background: #fff6f6;
}

.family-cleanup-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-import-heading,
.family-cleanup-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 18px;
  align-items: start;
}

.payment-import-heading h3,
.family-cleanup-heading h3 {
  margin: 4px 0 6px;
  font-size: 22px;
  line-height: 1.2;
}

.payment-import-heading p,
.family-cleanup-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.payment-import-controls,
.family-cleanup-controls {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.2fr);
  gap: 10px;
}

.payment-import-controls label,
.family-cleanup-controls label {
  display: grid;
  gap: 6px;
}

.payment-import-controls label span,
.payment-import-status,
.payment-import-summary-grid span,
.family-cleanup-controls label span,
.family-cleanup-status,
.family-cleanup-summary-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-import-controls input,
.family-cleanup-controls input {
  min-height: 42px;
  padding: 9px 11px;
  font-size: 15px;
}

.payment-import-controls button,
.family-cleanup-controls button {
  min-height: 42px;
}

.payment-import-status,
.family-cleanup-status {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-import-preview,
.family-cleanup-preview {
  display: grid;
  gap: 12px;
}

.payment-import-summary-grid,
.family-cleanup-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.payment-import-summary-grid div,
.family-cleanup-summary-grid div {
  display: grid;
  gap: 5px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-import-summary-grid strong,
.family-cleanup-summary-grid strong {
  font-size: 24px;
  line-height: 1;
}

.payment-import-table,
.family-cleanup-table {
  display: grid;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-import-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) minmax(230px, 1.25fr) minmax(120px, 0.65fr) minmax(150px, 0.8fr) minmax(230px, 1.25fr) minmax(260px, 1.35fr);
  gap: 13px;
  align-items: center;
  min-width: 1160px;
  min-height: 64px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.payment-import-row.header {
  min-height: 44px;
  color: var(--muted);
  background: #f5f5f5;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-import-row.needs-review {
  background: #fffaf0;
}

.family-cleanup-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) minmax(240px, 1.2fr) minmax(220px, 1fr) minmax(190px, 0.9fr) minmax(260px, 1.25fr);
  gap: 13px;
  align-items: center;
  min-width: 1040px;
  min-height: 64px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.family-cleanup-row.header {
  min-height: 44px;
  color: var(--muted);
  background: #f5f5f5;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-cleanup-row.needs-review {
  background: #fffaf0;
}

.family-cleanup-fallback {
  padding: 10px 12px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.family-cleanup-fallback[open] {
  height: auto;
  overflow: visible;
}

.family-cleanup-fallback summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-cleanup-fallback label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.family-cleanup-fallback label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-cleanup-fallback textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  font-size: 13px;
}

.payment-import-row strong,
.payment-import-row span,
.payment-import-row small,
.family-cleanup-row strong,
.family-cleanup-row span,
.family-cleanup-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-import-row strong,
.family-cleanup-row strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}

.payment-import-row small,
.family-cleanup-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.payment-import-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.payment-import-chip.ready {
  color: #0d5f3f;
  background: #e7f6ee;
}

.payment-import-chip.review {
  color: var(--charcoal);
  background: #e9eaec;
}

.payment-import-chip.needs-review {
  color: #8a4d00;
  background: #fff1d6;
}

.pad-identity-board {
  display: grid;
  gap: 10px;
}

.pad-identity-toolbar,
.pad-identity-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pad-identity-empty span {
  display: block;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.pad-identity-coverage {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pad-identity-coverage div {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px;
  background: #f8f8f8;
  border: 1px solid #ececec;
  border-radius: 6px;
}

.pad-identity-coverage div.ready {
  background: #f7fff9;
  border-color: #cfe8d4;
}

.pad-identity-coverage div.needs-attention {
  background: #fff7f7;
  border-color: #f1c9c9;
}

.pad-identity-coverage span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.pad-identity-coverage strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.pad-identity-toolbar {
  align-items: end;
}

.pad-identity-toolbar.advanced-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 22px rgba(24, 30, 36, 0.06);
}

.pad-toolbar-row {
  display: grid;
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.pad-toolbar-row.primary-row {
  grid-template-columns: minmax(250px, auto) minmax(170px, auto) minmax(260px, auto) 1fr;
}

.pad-toolbar-row.filter-row {
  grid-template-columns: minmax(380px, 1.8fr) minmax(220px, 0.85fr) minmax(260px, 1fr);
}

.pad-identity-folder-tabs {
  display: inline-flex;
  gap: 6px;
  min-height: 42px;
  padding: 3px;
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 7px;
  white-space: nowrap;
}

.folder-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.folder-tab strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.folder-tab.active {
  color: #fff;
  background: var(--brand-red-dark);
}

.folder-tab.active strong {
  color: var(--brand-red-dark);
  border-color: #fff;
}

.pad-bulk-select {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  white-space: nowrap;
}

.pad-bulk-select strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.pad-bulk-select input,
.pad-row-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-red-dark);
  cursor: pointer;
}

.pad-row-checkbox-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
}

.pad-identity-search,
.pad-filter-control {
  display: grid;
  gap: 6px;
}

.pad-identity-search {
  width: 100%;
  max-width: none;
}

.pad-identity-search span,
.pad-identity-page-size > span,
.pad-filter-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.pad-identity-search input,
.pad-filter-control select {
  min-height: 42px;
  padding: 9px 12px;
  font-size: 16px;
}

.pad-filter-control select {
  min-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.pad-filter-control.payment-filter {
  min-width: 220px;
}

.pad-identity-page-size {
  display: grid;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  gap: 6px;
  align-items: end;
}

.pad-identity-page-size > span {
  grid-column: 1 / -1;
}

.pad-identity-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: end;
  min-width: 0;
}

.pad-identity-bulk-actions .small-button {
  min-height: 42px;
  padding: 9px 14px;
  white-space: nowrap;
}

.pad-identity-bulk-actions .small-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.danger-action {
  color: #b62226;
  background: #fff8f8;
  border: 1px solid #f1caca;
}

.danger-action:hover:not(:disabled) {
  color: #fff;
  background: #b62226;
  border-color: #b62226;
}

.pad-identity-table {
  display: grid;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pad-identity-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.pad-identity-selection-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pad-identity-workspace.detail-open {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.pad-identity-row {
  display: grid;
  grid-template-columns: 42px minmax(230px, 1.15fr) minmax(200px, 1fr) minmax(140px, 0.7fr) minmax(190px, 0.9fr) minmax(180px, 0.82fr) minmax(205px, 0.9fr);
  gap: 12px;
  align-items: center;
  min-width: 1230px;
  min-height: 58px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.pad-identity-workspace.detail-open .pad-identity-row {
  grid-template-columns: 42px minmax(180px, 1fr) minmax(160px, 0.9fr) minmax(105px, 0.58fr) minmax(155px, 0.78fr) minmax(145px, 0.72fr) minmax(160px, 0.72fr);
  min-width: 1030px;
}

.pad-identity-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 40px;
  color: #59626c;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pad-identity-row.needs-review {
  background: #fffaf0;
}

.pad-identity-row.selected {
  background: #fff6f6;
  box-shadow: inset 4px 0 0 var(--brand-red-dark);
}

.pad-identity-row.bulk-selected {
  background: #fffafa;
}

.pad-identity-row.bulk-selected.selected {
  background: #fff3f3;
}

.pad-identity-row:not(.header) {
  cursor: pointer;
}

.pad-identity-row:not(.header):not(.selected):hover {
  background: #fafafa;
}

.pad-identity-row.selected:hover {
  background: #fff6f6;
}

.pad-identity-row strong,
.pad-identity-row span,
.pad-identity-row small,
.pad-identity-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pad-identity-row strong {
  display: block;
  font-size: 15px;
  line-height: 1.28;
  white-space: nowrap;
}

.pad-identity-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.pad-identity-row .payment-status-chip,
.pad-identity-row .payment-import-chip {
  width: fit-content;
  max-width: 100%;
}

.pad-identity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pad-identity-actions .small-button {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 12px;
}

.pad-identity-detail-panel {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(24, 30, 36, 0.08);
}

.pad-identity-detail-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
}

.pad-identity-detail-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pad-identity-detail-header span,
.pad-identity-edit-grid span,
.pad-identity-detail-list span {
  color: #59626c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pad-identity-detail-header h3 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
}

.pad-identity-edit-grid {
  display: grid;
  gap: 10px;
}

.pad-identity-edit-grid label {
  display: grid;
  gap: 6px;
}

.pad-identity-edit-grid .full-span {
  grid-column: 1 / -1;
}

.pad-identity-edit-grid input,
.pad-identity-edit-grid select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.pad-identity-detail-list {
  display: grid;
  gap: 10px;
}

.pad-identity-detail-list > div {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.pad-identity-detail-list strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.pad-identity-detail-list small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.pad-identity-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pad-payment-history {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pad-payment-history-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.pad-payment-history-heading span {
  color: #59626c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pad-payment-history-heading strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.pad-payment-history-heading small {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-align: right;
}

.payment-history-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.payment-history-heading-actions small {
  text-align: right;
}

.refund-entry-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e6b8bd;
  border-left: 4px solid var(--brand-red-dark);
  border-radius: 8px;
}

.refund-entry-copy {
  display: grid;
  gap: 4px;
}

.refund-entry-copy strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.refund-entry-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.refund-entry-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.refund-entry-grid input,
.refund-entry-grid select,
.refund-entry-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
}

.refund-entry-grid textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.4;
}

.refund-entry-grid .full-span {
  grid-column: 1 / -1;
}

.refund-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pad-payment-month-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pad-payment-month-coverage span {
  display: grid;
  gap: 2px;
  min-width: 88px;
  padding: 7px 8px;
  color: #5f6972;
  background: #f2f3f4;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.pad-payment-month-coverage span.attached {
  color: #294d36;
  background: #edf7ef;
  border-color: #bddcc4;
}

.pad-payment-month-coverage span.source-only {
  color: #6b4b00;
  background: #fff7df;
  border-color: #ecd184;
}

.pad-payment-month-coverage small {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.pad-payment-history-table {
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pad-payment-history-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 84px 78px 72px;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.pad-payment-history-row:first-child {
  border-top: 0;
}

.pad-payment-history-row.header {
  min-height: 34px;
  color: #59626c;
  background: #f4f4f4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pad-payment-history-row strong {
  text-align: right;
}

.pad-payment-history-row.is-refund,
.family-payment-history-row.is-refund {
  background: #fff7f7;
}

.pad-payment-history-row.is-refund strong,
.family-payment-history-row.is-refund strong {
  color: #a51f2d;
}

.pad-payment-history-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pad-identity-empty {
  justify-content: start;
  border-style: dashed;
}

.pad-identity-empty strong {
  min-width: 190px;
}

.ghl-enrichment-board {
  display: grid;
  gap: 12px;
}

.ghl-enrichment-header,
.ghl-enrichment-actions,
.ghl-enrichment-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-enrichment-header > div:first-child {
  display: grid;
  gap: 4px;
}

.ghl-enrichment-header span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ghl-enrichment-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.ghl-enrichment-header small,
.ghl-enrichment-actions small,
.ghl-enrichment-empty span,
.ghl-enrichment-more {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.ghl-enrichment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.ghl-enrichment-coverage {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-enrichment-coverage div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px;
  background: #f8f8f8;
  border: 1px solid #ececec;
  border-radius: 6px;
}

.ghl-enrichment-coverage div.ready {
  background: #f7fff9;
  border-color: #cfe8d4;
}

.ghl-enrichment-coverage div.needs-attention {
  background: #fff7f7;
  border-color: #f1c9c9;
}

.ghl-enrichment-coverage span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.ghl-enrichment-coverage strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.ghl-enrichment-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(110px, 0.55fr) minmax(180px, 0.9fr) minmax(220px, 1fr) auto auto minmax(380px, auto);
  gap: 12px;
  align-items: end;
  padding: 12px 14px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(24, 30, 36, 0.06);
}

.ghl-enrichment-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.ghl-enrichment-search,
.ghl-enrichment-control,
.ghl-enrichment-rows-control {
  display: grid;
  gap: 6px;
}

.ghl-enrichment-search span,
.ghl-enrichment-control span,
.ghl-enrichment-rows-control > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.ghl-enrichment-search input,
.ghl-enrichment-control select {
  min-height: 42px;
  padding: 9px 12px;
  font-size: 16px;
}

.ghl-enrichment-control select {
  min-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.ghl-enrichment-rows-control {
  grid-template-columns: repeat(3, minmax(44px, 1fr));
}

.ghl-enrichment-rows-control > span {
  grid-column: 1 / -1;
}

.ghl-enrichment-bulk-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 380px;
}

.ghl-enrichment-bulk-actions .small-button {
  min-height: 42px;
  padding: 9px 14px;
  white-space: nowrap;
}

.ghl-enrichment-select-all input,
.ghl-enrichment-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-red);
}

.ghl-enrichment-check-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ghl-enrichment-filter {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--ink);
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.ghl-enrichment-filter.active {
  color: #fff;
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.ghl-enrichment-filter strong {
  font-size: 13px;
}

.ghl-enrichment-actions > div {
  display: grid;
  gap: 3px;
}

.ghl-enrichment-actions strong,
.ghl-enrichment-empty strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.ghl-enrichment-table {
  display: grid;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ghl-enrichment-row {
  display: grid;
  grid-template-columns: 42px minmax(250px, 1.2fr) minmax(250px, 1.2fr) minmax(280px, 1.35fr) minmax(150px, 0.7fr);
  gap: 12px;
  align-items: start;
  min-width: 1030px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.ghl-enrichment-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 40px;
  color: #59626c;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ghl-enrichment-row.safe {
  background: #f7fff9;
}

.ghl-enrichment-row.complete {
  background: #f8fbff;
}

.ghl-enrichment-row.review {
  background: #fffaf0;
}

.ghl-enrichment-row.no-match {
  background: #fafafa;
}

.ghl-enrichment-row strong,
.ghl-enrichment-row small,
.ghl-enrichment-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ghl-enrichment-row strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
}

.ghl-enrichment-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ghl-enrichment-row em {
  width: fit-content;
  max-width: 100%;
  margin: 0 6px 6px 0;
  padding: 5px 7px;
  color: #3d444b;
  background: #f0f1f2;
  border-radius: 5px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.ghl-enrichment-empty {
  justify-content: start;
  border-style: dashed;
}

@media (max-width: 1180px) {
  .pad-identity-coverage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ghl-enrichment-coverage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pad-identity-workspace.detail-open {
    grid-template-columns: minmax(0, 1fr);
  }

  .pad-identity-detail-panel {
    position: static;
  }
}

.payments-action-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: #fff;
}

.payments-action-buttons {
  display: grid;
  gap: 10px;
}

.payments-detail-drawer {
  margin-top: 18px;
  overflow: hidden;
}

.payments-detail-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  cursor: pointer;
}

.payments-detail-drawer summary span {
  font-size: 17px;
  font-weight: 900;
}

.payments-detail-drawer summary small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.payments-detail-drawer > .form-grid,
.payments-detail-drawer > .payment-authorization-panel,
.payments-detail-drawer > .pad-treasury-export-panel,
.payments-detail-drawer > .billing-readiness-panel,
.payments-detail-drawer > .payment-schedule-panel,
.payments-detail-drawer > .internal-exception-panel {
  margin: 16px 18px;
}

.teachers-home {
  display: grid;
  gap: 22px;
  margin-top: 8px;
}

.teachers-home-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.teachers-home-summary div,
.teachers-list-panel,
.teachers-detail-drawer {
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.teachers-home-summary div {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 18px;
}

.teachers-home-summary span,
.teachers-directory-row.header span,
.teachers-list-header label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.teachers-home-summary strong {
  font-size: 30px;
  line-height: 1;
}

.teachers-home-summary small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.teachers-directory-workspace {
  display: block;
}

.teachers-list-panel {
  overflow: hidden;
  background: #ffffff;
  border-color: #d9dee7;
  box-shadow: 0 22px 56px rgba(23, 31, 43, 0.12);
}

.teachers-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(179, 0, 5, 0.08), rgba(179, 0, 5, 0) 42%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.teachers-list-header h3 {
  margin: 0;
  color: #1f2933;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.teachers-list-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.teachers-list-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.teachers-list-actions label {
  display: grid;
  gap: 7px;
  min-width: 250px;
}

.teachers-list-actions input {
  min-height: 46px;
  padding: 11px 14px;
  color: #17202a;
  font-size: 16px;
  background: #ffffff;
  border-color: #cfd6df;
  box-shadow: 0 1px 2px rgba(23, 31, 43, 0.04);
}

.teachers-list-actions select {
  min-height: 46px;
  padding: 11px 14px;
  color: #17202a;
  font-size: 16px;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(23, 31, 43, 0.04);
}

.teacher-payroll-totals-panel {
  border-bottom: 1px solid #dfe5ec;
}

.teacher-payroll-totals-panel .teacher-payroll-summary-grid {
  margin: 18px 28px;
}

.teacher-payroll-totals-panel .teacher-payroll-summary-grid strong {
  color: #17202a;
  font-size: 26px;
  line-height: 1.15;
}

.teacher-payroll-totals-table {
  display: grid;
  padding-bottom: 18px;
}

.teacher-payroll-totals-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(100px, 0.45fr) minmax(100px, 0.45fr) minmax(120px, 0.5fr) minmax(150px, 0.58fr);
  gap: 18px;
  align-items: center;
  min-height: 58px;
  padding: 12px 28px;
  border-top: 1px solid #e7ebf0;
}

.teacher-payroll-totals-row.header {
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  background: #f2f5f8;
}

.teacher-payroll-totals-row strong {
  color: #17202a;
  font-size: 18px;
}

.teacher-payroll-totals-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.teacher-payroll-totals-row > strong:last-child {
  color: var(--brand-red);
  font-size: 20px;
}

.teacher-payroll-totals-empty {
  display: grid;
  gap: 6px;
  margin: 18px 28px 24px;
  padding: 18px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px dashed #cfd6df;
  border-radius: 8px;
}

.teacher-payroll-totals-empty strong {
  color: #17202a;
}

.teachers-directory-table {
  display: grid;
}

.teacher-create-panel {
  display: grid;
  gap: 14px;
  padding: 20px 24px;
  background: #fff8f8;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
}

.teacher-create-panel[hidden] {
  display: none;
}

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

.teacher-create-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-create-grid input {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-transform: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.teacher-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.teachers-directory-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.08fr) minmax(260px, 1.28fr) minmax(92px, 0.36fr) minmax(140px, 0.5fr) minmax(240px, 0.72fr);
  gap: 18px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 16px 28px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e6eaf0;
}

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

.teacher-row-actions .small-button {
  min-height: 32px;
  padding: 0 10px;
}

.teachers-directory-row:not(.header):hover,
.teachers-directory-row.active-teacher-row {
  background: #fff8f8;
}

.teachers-directory-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 48px;
  background: #eef2f6;
  border-bottom-color: #d7dde6;
}

.teachers-directory-row strong {
  display: block;
  color: #17202a;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
}

.teacher-directory-name-link {
  display: inline;
  width: fit-content;
  padding: 0;
  color: var(--brand-red);
  font: inherit;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  border: 0;
}

.teacher-directory-name-link:hover {
  color: var(--brand-red-dark);
}

.teachers-directory-row small {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 15px;
}

.teacher-email-cell {
  overflow-wrap: anywhere;
  color: #344054;
  font-variant-numeric: tabular-nums;
}

.teachers-directory-empty {
  display: grid;
  gap: 6px;
  padding: 28px;
  color: var(--muted);
}

.teachers-directory-empty strong {
  color: var(--text);
  font-size: 18px;
}

.teachers-detail-drawer {
  margin-top: 18px;
  overflow: hidden;
}

.teachers-detail-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  cursor: pointer;
}

.teachers-detail-drawer summary span {
  font-size: 17px;
  font-weight: 900;
}

.teachers-detail-drawer summary small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.teachers-detail-drawer > .form-grid,
.teachers-detail-drawer > .teacher-ledger-section {
  margin: 16px 18px;
}

body[data-active-module="teachers"] .layout {
  display: block;
}

body[data-active-module="teachers"] .workspace,
body[data-active-module="teacher-profile"] .workspace {
  background: #f3f5f7;
}

body[data-active-module="teachers"] .top-actions,
body[data-active-module="teacher-profile"] .top-actions {
  display: none;
}

body[data-active-module="teachers"] .family-panel,
body[data-active-module="teachers"] .workflow-focus,
body[data-active-module="teachers"] .advanced-module-drawer,
body[data-active-module="teachers"] .module-panel-note,
body[data-active-module="teachers"] .status-row {
  display: none;
}

body[data-active-module="teachers"] .builder-panel {
  border: 0;
  background: transparent;
}

body[data-active-module="teachers"] .module-panel-note {
  margin-bottom: 16px;
  border-radius: 8px;
}

body[data-active-module="teachers"] #registrationForm {
  display: grid;
  gap: 0;
}

body[data-active-module="teachers"] .form-section[data-module="teachers"] {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body[data-active-module="teachers"] .section-heading {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

body[data-active-module="teachers"] .section-heading h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

@media (max-width: 1180px) {
  .payments-home-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payments-metric-grid,
  .payments-workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payments-home-main,
  .payment-import-heading,
  .family-cleanup-heading,
  .teachers-directory-workspace {
    grid-template-columns: 1fr;
  }

  .teachers-home-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payments-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .payments-home-summary {
    grid-template-columns: 1fr;
  }

  .payments-command-header,
  .payments-workflow-grid,
  .payments-metric-grid {
    grid-template-columns: 1fr;
  }

  .payments-command-header {
    display: grid;
  }

  .payment-transaction-row {
    grid-template-columns: 1fr;
  }

  .payment-transaction-row.header {
    display: none;
  }

  .payment-import-controls,
  .payment-import-summary-grid,
  .family-cleanup-controls,
  .family-cleanup-summary-grid {
    grid-template-columns: 1fr;
  }

  .teachers-home-summary {
    grid-template-columns: 1fr;
  }

  .payments-list-header,
  .teachers-list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .payments-list-header label,
  .teachers-list-actions label {
    min-width: 0;
  }

  .teachers-list-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .payments-family-row,
  .payments-family-row.header,
  .teachers-directory-row,
  .teachers-directory-row.header {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .payments-family-row.header,
  .teachers-directory-row.header {
    display: none;
  }

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

  .payments-detail-drawer summary,
  .teachers-detail-drawer summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

.families-home-grid {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.families-guide-panel {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.families-guide-panel > div {
  padding: 18px;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.families-guide-panel h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.families-guide-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.family-profile-board {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.family-profile-top-toolbar {
  display: block;
  margin: 0 0 10px;
}

.family-profile-top-toolbar:empty {
  display: none;
}

.family-profile-board-header,
.family-profile-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.family-profile-board-header span {
  color: var(--brand-red-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-profile-board-header h3 {
  margin: 4px 0 0;
}

.family-profile-board-header small,
.family-profile-empty span {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.family-profile-empty {
  justify-content: start;
  border-style: dashed;
}

.family-list-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(110px, 0.55fr) minmax(180px, 0.9fr) minmax(220px, 1fr) auto minmax(380px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(24, 30, 36, 0.06);
  overflow-x: auto;
}

.family-profile-search,
.family-profile-filter {
  display: grid;
  gap: 6px;
}

.family-profile-search {
  flex: 1;
  max-width: 440px;
}

.family-profile-filter {
  min-width: 180px;
}

.family-profile-search span,
.family-profile-filter span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-profile-search input,
.family-profile-filter select {
  min-height: 42px;
  padding: 9px 12px;
  font-size: 16px;
}

.family-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.family-select-all input,
.family-row-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-red);
}

.family-bulk-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 380px;
}

.family-bulk-actions .small-button {
  min-height: 42px;
  padding: 9px 14px;
  white-space: nowrap;
}

.family-bulk-actions .small-button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.family-pagination {
  display: flex;
  align-items: end;
  gap: 10px;
  white-space: nowrap;
}

.family-pagination label,
.family-page-size-control {
  display: grid;
  gap: 6px;
}

.family-pagination label span,
.family-page-size-control > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-page-size-control {
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  align-items: end;
}

.family-page-size-control > span {
  grid-column: 1 / -1;
}

.family-page-size-button {
  min-height: 42px;
  padding: 8px 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.family-page-size-button:hover,
.family-page-size-button.active {
  color: #fff;
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.family-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.family-page-controls span {
  min-width: 92px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.danger-action {
  color: #8a1f24;
  background: #fff5f5;
  border-color: #f0b8bc;
}

.family-profile-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.family-profile-workspace.detail-closed {
  grid-template-columns: minmax(0, 1fr);
}

.family-profile-table {
  display: grid;
  max-height: 620px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.family-profile-row {
  display: grid;
  grid-template-columns: 34px minmax(210px, 1.2fr) minmax(170px, 0.95fr) minmax(135px, 0.72fr) minmax(145px, 0.74fr) minmax(190px, 0.92fr) minmax(190px, 0.82fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 1080px;
  min-height: 46px;
  padding: 7px 12px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 0;
  border-top: 1px solid var(--line);
}

.family-profile-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 38px;
  color: #59626c;
  background: #f4f4f4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-profile-row:first-child {
  border-top: 0;
}

.family-profile-row:not(.header):hover,
.family-profile-row.active-family-profile {
  background: #fffafa;
}

.family-row-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.family-profile-main {
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.family-profile-row strong,
.family-profile-row span,
.family-profile-row em,
.family-profile-main,
.family-profile-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-profile-row strong,
.family-profile-main strong {
  display: block;
  font-size: 13px;
}

.family-profile-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.family-profile-row em {
  color: #7a2c2c;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.family-profile-row .family-billing-snapshot {
  display: grid;
  gap: 5px;
  align-items: start;
  overflow: visible;
  white-space: normal;
}

.family-billing-snapshot .payment-status-chip {
  width: fit-content;
  max-width: 100%;
}

.family-billing-snapshot small {
  margin-top: 0;
}

.inline-history-button {
  justify-self: start;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--brand-red-dark);
  background: #fff;
  border: 1px solid #f0c2c6;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.inline-history-button:hover {
  background: #fff7f7;
}

.danger-inline-button {
  color: #8a1f24;
  background: #fff;
  border-color: #f0b8bc;
}

.danger-inline-button:hover {
  background: #fff5f5;
}

.family-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
  white-space: normal;
}

.icon-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 9px;
  color: var(--brand-red-dark);
  background: #fff7f7;
  border: 1px solid #f0c2c6;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.icon-text-button:hover {
  background: #ffecec;
}

.icon-text-button:disabled {
  color: #a9a9a9;
  background: #f5f5f5;
  border-color: var(--line);
  cursor: not-allowed;
}

.icon-text-button.danger-link {
  color: #8d181f;
  background: #fff;
  border-color: #f0b8bc;
}

.family-detail-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: 6px;
}

.family-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.family-detail-heading span {
  color: var(--brand-red-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-detail-heading h3 {
  margin: 5px 0 4px;
  font-size: 22px;
}

.family-detail-heading small {
  color: #7a2c2c;
  font-weight: 800;
}

.family-detail-form {
  display: grid;
  gap: 10px;
}

.family-detail-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-detail-form input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
}

.family-email-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.family-email-button {
  min-width: 86px;
  min-height: 50px;
}

.family-detail-form select {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
}

.family-detail-meta {
  display: grid;
  gap: 5px;
  padding: 10px;
  color: var(--muted);
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.family-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.family-payment-history {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fbfbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.family-payment-history.is-focused {
  border-color: #d34b55;
  box-shadow: 0 0 0 3px rgba(211, 75, 85, 0.12);
}

.family-payment-history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.family-payment-history-heading span,
.family-payment-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-payment-history-heading strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.25;
}

.family-payment-history-heading small {
  color: var(--brand-red-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.family-payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.family-payment-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.family-payment-summary strong {
  font-size: 16px;
  line-height: 1.2;
}

.family-payment-history-table {
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.family-payment-history-row {
  display: grid;
  grid-template-columns: 86px minmax(92px, 1fr) 78px 78px minmax(88px, auto);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.family-payment-history-row:first-child {
  border-top: 0;
}

.family-payment-history-row.header {
  min-height: 34px;
  color: var(--muted);
  background: #f4f4f4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-payment-history-row strong {
  text-align: right;
}

.family-payment-history-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.payment-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.payment-edit-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-left: 4px solid var(--brand-red-dark);
  border-radius: 8px;
}

.payment-history-notice,
.payment-save-status {
  padding: 10px 12px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.payment-history-notice.success,
.payment-save-status.success {
  color: #1f5b37;
  background: #f0faf4;
  border-color: #bfe2cb;
}

.payment-history-notice.error,
.payment-save-status.error {
  color: #8f1f2d;
  background: #fff3f4;
  border-color: #f0b5bd;
}

.payment-history-notice.info,
.payment-save-status.info {
  color: var(--brand-red-dark);
  background: #fff7f7;
  border-color: #f1d3d6;
}

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

.payment-edit-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-edit-grid input,
.payment-edit-grid select,
.payment-edit-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
}

.payment-edit-grid textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.4;
}

.payment-edit-grid .full-span {
  grid-column: 1 / -1;
}

.family-payment-empty {
  display: grid;
  gap: 5px;
  padding: 14px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #d5d5d5;
  border-radius: 6px;
}

.family-payment-empty strong {
  color: var(--text);
  font-size: 15px;
}

.family-full-profile-section {
  display: grid;
  gap: 18px;
}

.family-profile-page {
  display: grid;
  gap: 16px;
  max-width: 1360px;
  margin: 0 auto;
}

.family-profile-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.family-profile-page-header span,
.family-profile-card-heading span,
.family-profile-stat span,
.family-profile-note-composer span,
.family-profile-task-composer span {
  color: var(--brand-red-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-profile-page-header h2 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.18;
}

.family-profile-page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.family-profile-header-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, max-content));
  justify-content: start;
  gap: 10px;
}

.family-profile-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.family-profile-stat,
.family-profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.family-profile-stat {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 16px;
}

.family-profile-stat strong {
  font-size: 19px;
  line-height: 1.25;
}

.family-profile-stat small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.family-profile-stat.teacher-assignment {
  border-color: #f1c5c5;
  box-shadow: inset 4px 0 0 var(--brand-red);
}

.family-profile-page-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

.family-profile-main-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
}

.family-profile-activity-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

.family-profile-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 20px;
}

.family-profile-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.family-profile-card-heading h3 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.family-profile-card-heading small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.family-profile-full-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.family-profile-full-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--admin-muted);
}

.family-profile-full-form input,
.family-profile-full-form select,
.family-profile-full-form textarea,
.family-profile-note-composer textarea,
.family-profile-task-composer input {
  min-height: 44px;
  font-size: 16px;
}

.family-profile-full-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.family-profile-full-form .family-detail-form-wide {
  grid-column: 1 / -1;
}

.family-billing-profile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--admin-soft);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}

.family-billing-profile-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.family-billing-profile-summary span {
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-billing-profile-summary strong {
  overflow: hidden;
  color: var(--admin-ink);
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.family-pad-setup-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fffafa;
  border: 1px solid #f0c7c7;
  border-radius: 8px;
}

.family-pad-setup-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.family-pad-setup-heading div {
  display: grid;
  gap: 4px;
}

.family-pad-setup-heading span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-pad-setup-heading strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.family-pad-setup-heading small {
  max-width: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.family-pad-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.family-pad-setup-grid label:first-child,
.family-pad-setup-grid label:nth-child(4) {
  grid-column: 1 / -1;
}

.family-pad-setup-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
  padding-bottom: 2px;
}

.family-pad-setup-actions .small-button {
  width: 100%;
  min-height: 40px;
}

.inline-unit-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.inline-unit-field input {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.inline-unit-field span {
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.money-unit-field {
  grid-template-columns: auto minmax(0, 1fr);
}

.money-unit-field span {
  color: var(--charcoal);
  background: #f3f4f6;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}

.family-profile-note-composer,
.family-profile-task-composer {
  display: grid;
  gap: 10px;
}

.family-profile-task-composer {
  grid-template-columns: minmax(0, 1fr) 190px auto;
  align-items: end;
}

.family-profile-note-composer label,
.family-profile-task-composer label {
  display: grid;
  gap: 6px;
}

.family-profile-note-composer textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
}

.family-profile-task-composer input {
  width: 100%;
  padding: 9px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.family-profile-timeline {
  display: grid;
  gap: 10px;
}

.family-profile-timeline-item,
.family-profile-empty-state,
.family-profile-page-empty {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.family-profile-timeline-item {
  grid-template-columns: 116px minmax(0, 1fr) auto auto;
  align-items: center;
}

.family-profile-timeline-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.family-profile-timeline-item strong {
  font-size: 16px;
  line-height: 1.35;
}

.family-profile-timeline-item small {
  color: var(--brand-red-dark);
  font-weight: 900;
}

.family-profile-timeline-item.done {
  opacity: 0.7;
}

.family-profile-timeline-item.done strong {
  text-decoration: line-through;
}

.family-profile-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.family-profile-empty-state span,
.family-profile-page-empty span {
  color: var(--muted);
}

.family-profile-page-empty {
  justify-items: start;
  background: #fff;
}

.family-detail-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.family-detail-panel dl div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.family-detail-panel dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-detail-panel dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .admin-home {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-home-actions {
    justify-content: flex-start;
  }

  .admin-work-grid {
    grid-template-columns: 1fr;
  }

  .families-home-grid,
  .families-guide-panel {
    grid-template-columns: 1fr;
  }

  .family-profile-workspace {
    grid-template-columns: 1fr;
  }

  .family-profile-page-header,
  .family-profile-page-grid,
  .family-billing-profile-summary,
  .family-profile-overview-grid {
    grid-template-columns: 1fr;
  }

  .family-profile-header-actions {
    justify-content: flex-start;
  }

  .family-pad-setup-heading,
  .family-pad-setup-grid {
    grid-template-columns: 1fr;
  }

  .family-pad-setup-heading {
    display: grid;
  }

  .family-pad-setup-heading small {
    max-width: none;
    text-align: left;
  }

  .family-pad-setup-actions {
    grid-template-columns: 1fr;
  }

  .family-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .family-pagination,
  .family-page-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .family-page-controls span {
    min-width: 100%;
    text-align: left;
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 14px;
  }

  .admin-home {
    padding: 22px;
  }

  .admin-home h2 {
    font-size: 30px;
  }

  body[data-active-module="dashboard"] .dashboard-link-actions,
  body[data-active-module="dashboard"] .dashboard-hero-grid,
  body[data-active-module="dashboard"] .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .family-profile-row {
    min-width: 1120px;
  }

  .family-profile-full-form,
  .family-profile-task-composer,
  .family-profile-timeline-item {
    grid-template-columns: 1fr;
  }
}

/* Readability pass: keep the brand feel, but give the admin UI more breathing room. */
body {
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  line-height: 1.4;
}

.nav-item {
  font-size: 16px;
  line-height: 1.4;
}

.eyebrow,
.breadcrumb,
.section-label {
  font-size: 14px;
  line-height: 1.4;
}

.header-subtitle,
.module-hero p,
.inline-note,
.family-profile-board-header small,
.family-profile-empty span {
  font-size: 16px;
  line-height: 1.6;
}

.primary-button,
.ghost-button,
.small-button,
.text-button {
  min-height: 46px;
  padding-inline: 16px;
  font-size: 16px;
  line-height: 1.4;
}

.family-profile-board {
  gap: 14px;
}

.family-list-toolbar {
  padding: 12px 14px;
}

.family-select-all {
  font-size: 16px;
  line-height: 1.4;
}

.family-profile-table {
  max-height: 720px;
}

.family-profile-row {
  gap: 16px;
  min-height: 66px;
  padding: 13px 16px;
}

.family-profile-row.header {
  min-height: 50px;
  font-size: 14px;
  line-height: 1.35;
}

.family-profile-row strong,
.family-profile-main strong {
  font-size: 17px;
  line-height: 1.3;
}

.family-profile-row small {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.family-profile-row em,
.family-profile-row span {
  font-size: 15px;
  line-height: 1.45;
}

.family-detail-panel {
  gap: 20px;
  padding: 22px;
}

.family-detail-heading span {
  font-size: 13px;
  line-height: 1.4;
}

.family-detail-heading h3 {
  font-size: 29px;
  line-height: 1.18;
}

.family-detail-heading small {
  font-size: 15px;
  line-height: 1.45;
}

.family-detail-form {
  gap: 16px;
}

.family-detail-form label {
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.family-detail-form input {
  min-height: 50px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.4;
}

.family-detail-meta {
  gap: 8px;
  padding: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.app-shell,
.workspace,
.module {
  font-size: 17px;
}

.module-card,
.admin-work-card,
.dashboard-card,
.family-panel,
.families-guide-panel,
.registration-prep-panel,
.settings-panel {
  font-size: 16px;
  line-height: 1.55;
}

.workspace small,
.module small,
.workspace .muted,
.module .muted,
.workspace .inline-note,
.module .inline-note {
  font-size: 15px;
  line-height: 1.5;
}

.workspace label,
.module label,
.workspace input,
.workspace select,
.workspace textarea,
.module input,
.module select,
.module textarea {
  font-size: 16px;
  line-height: 1.45;
}

.teacher-profile-panel,
.teacher-import-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  background: #ffffff;
}

.teacher-profile-empty,
.teacher-student-list,
.teacher-history-list {
  display: grid;
  gap: 10px;
}

.teacher-profile-header,
.teacher-profile-grid,
.teacher-import-grid {
  display: grid;
  gap: 16px;
}

.teacher-profile-header {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  align-items: start;
}

.teacher-profile-header h3 {
  margin: 4px 0;
  font-size: 25px;
  line-height: 1.2;
}

.teacher-profile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.teacher-profile-summary span,
.teacher-student-row,
.teacher-history-row {
  display: grid;
  gap: 4px;
  padding: 15px;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  background: #ffffff;
}

.teacher-profile-summary strong {
  display: block;
  margin-top: 7px;
  color: #17202a;
  font-size: 24px;
  line-height: 1;
}

.teacher-profile-grid {
  margin-top: 18px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
}

.teacher-ledger-panel {
  margin-top: 4px;
  display: grid;
  gap: 16px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 22px 56px rgba(23, 31, 43, 0.1);
}

.teacher-ledger-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6eaf0;
}

.teacher-ledger-heading h4 {
  margin: 0 0 4px;
  color: #17202a;
  font-size: 28px;
  font-weight: 800;
}

.teacher-ledger-heading p,
.teacher-ledger-heading span {
  margin: 0;
  color: #667085;
  font-size: 15px;
}

.teacher-student-row,
.teacher-history-row {
  grid-template-columns: minmax(180px, 1fr) minmax(90px, auto);
  align-items: center;
}

.teacher-history-row {
  grid-template-columns: minmax(160px, 1fr) minmax(90px, auto) minmax(110px, auto) minmax(110px, auto) minmax(80px, auto);
}

.teacher-history-list {
  display: grid;
  gap: 8px;
}

.teacher-profile-data-note {
  margin: 4px 0 0;
  padding: 12px 14px;
  color: #475467;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.teacher-month-ledger-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 150px;
  gap: 16px;
  align-items: center;
  padding: 0 18px 8px 54px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-month-ledger-header span:nth-child(n+2) {
  text-align: right;
}

.teacher-month-ledger {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(23, 31, 43, 0.04);
}

.teacher-month-ledger summary {
  display: grid;
  position: relative;
  grid-template-columns: minmax(220px, 1fr) 180px 150px;
  gap: 16px;
  align-items: center;
  min-height: 50px;
  padding: 9px 18px 9px 54px;
  cursor: pointer;
  background: #fbfcfd;
  list-style: none;
}

.teacher-month-ledger summary:hover {
  background: #fff8f8;
}

.teacher-month-ledger summary::-webkit-details-marker {
  display: none;
}

.teacher-month-ledger summary::before {
  content: "+";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #5b1115;
  color: #ffffff;
  font-weight: 700;
}

.teacher-month-ledger[open] summary::before {
  content: "-";
}

.teacher-month-ledger small,
.teacher-month-ledger em {
  color: #667085;
  font-style: normal;
}

.teacher-ledger-month-cell {
  display: block;
  min-width: 0;
}

.teacher-ledger-month-cell strong {
  color: #17202a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.teacher-ledger-count-cell,
.teacher-ledger-number-cell,
.teacher-ledger-pay-cell,
.teacher-ledger-rate-cell {
  text-align: right;
  white-space: nowrap;
}

.teacher-ledger-count-cell,
.teacher-ledger-number-cell {
  color: #344054;
  font-variant-numeric: tabular-nums;
}

.teacher-ledger-pay-cell {
  color: #141414;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.teacher-ledger-rate-cell {
  color: #344054;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.teacher-month-ledger-body {
  display: grid;
  gap: 14px;
  padding: 14px 18px 18px 54px;
  background: #ffffff;
}

.teacher-ledger-source {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.teacher-ledger-source span {
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #667085;
  background: #fafbfc;
}

.teacher-ledger-source strong {
  display: block;
  margin-top: 3px;
  color: #1f2937;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.teacher-ledger-source small {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-student-ledger {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.teacher-student-ledger-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1.35fr) 92px 116px 122px minmax(220px, 1fr) 44px;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid #e4e7ec;
  align-items: center;
  color: #344054;
  font-size: 15px;
}

.teacher-student-ledger-row span:nth-child(1),
.teacher-student-ledger-row span:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.teacher-student-ledger-row span:nth-child(4),
.teacher-student-ledger-row span:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.teacher-student-ledger-row span:last-child {
  display: flex;
  justify-content: center;
  align-items: center;
}

.teacher-student-ledger-row span:nth-child(2) {
  display: grid;
  gap: 6px;
}

.teacher-ledger-row-number {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.teacher-student-ledger-row-manual,
.teacher-student-ledger-row-substitution {
  background: #fcfcfd;
}

.teacher-student-link.compact-link {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--brand-red);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
}

.teacher-student-ledger-row input,
.teacher-extra-service-row input {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  color: #17202a;
  background: #ffffff;
  font: inherit;
  font-size: 14px;
}

.teacher-student-ledger-row input:focus,
.teacher-extra-service-row input:focus {
  outline: 2px solid rgba(182, 22, 45, 0.18);
  border-color: var(--brand-red);
}

.teacher-student-ledger-row:first-child {
  border-top: 0;
}

.teacher-student-ledger-row.header {
  background: #f4f6f9;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.teacher-student-ledger-row.empty {
  grid-template-columns: 1fr;
  color: #667085;
}

.teacher-ledger-delete-row-button {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #667085;
  background: transparent;
}

.teacher-ledger-delete-row-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.teacher-ledger-delete-row-button:hover {
  color: #344054;
  background: #f2f4f7;
  border-color: #e4e7ec;
}

.teacher-ledger-delete-row-button.is-confirming {
  color: #b42318;
  background: #fff1f0;
  border-color: #fecdca;
}

.teacher-ledger-edit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-top: 2px;
}

.teacher-ledger-edit-actions span {
  color: #667085;
  font-size: 14px;
  font-weight: 700;
}

.teacher-student-link {
  width: fit-content;
  padding: 0;
  color: var(--brand-red);
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  border: 0;
}

.teacher-student-link:hover {
  color: var(--brand-red-dark);
}

.teacher-adjustment-ledger {
  display: grid;
  gap: 8px;
}

.teacher-adjustment-ledger h5 {
  margin: 0;
  font-size: 16px;
}

.teacher-adjustment-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(100px, auto) minmax(220px, 1.5fr);
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fbfcfd;
}

.teacher-extra-service-ledger {
  display: grid;
  gap: 8px;
}

.teacher-extra-service-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.teacher-extra-service-heading h5 {
  margin: 0;
  color: #17202a;
  font-size: 16px;
}

.teacher-extra-service-heading small {
  color: #667085;
  font-weight: 700;
}

.teacher-extra-service-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.85fr) minmax(150px, 1fr) minmax(110px, 0.65fr) minmax(110px, 0.65fr) minmax(110px, 0.65fr) minmax(190px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #344054;
  background: #fbfcfd;
  font-size: 14px;
}

.teacher-extra-service-row.header {
  color: #475467;
  background: #f4f6f9;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.teacher-extra-service-row span:nth-child(3),
.teacher-extra-service-row span:nth-child(4),
.teacher-extra-service-row span:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.teacher-month-ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 2px;
}

.teacher-import-grid {
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr) auto auto;
  align-items: end;
}

.teacher-import-panel {
  display: grid;
  gap: 16px;
  margin: 22px;
  padding: 22px 24px;
  background: #ffffff;
  border-top: 1px solid #e2e7ef;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 31, 43, 0.06);
}

.teacher-import-panel .section-heading {
  padding: 0;
  border: 0;
}

.teacher-import-panel .section-heading h3 {
  margin: 0;
  color: #17202a;
  font-size: 20px;
  font-weight: 800;
}

#teacherPayrollImportBase64 {
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .teacher-profile-header,
  .teacher-profile-grid,
  .teacher-import-grid {
    grid-template-columns: 1fr;
  }

  .teacher-ledger-heading,
  .teacher-month-ledger summary,
  .teacher-ledger-source,
  .teacher-student-ledger-row,
  .teacher-adjustment-row {
    grid-template-columns: 1fr;
  }

  .teacher-ledger-heading {
    display: grid;
  }

  .teacher-profile-summary {
    grid-template-columns: 1fr;
  }

  .teacher-history-row {
    grid-template-columns: 1fr;
  }
}

.module-hidden,
[hidden] {
  display: none !important;
}

body[data-active-module="teacher-profile"] .layout {
  display: block;
}

body[data-active-module="teacher-profile"] .topbar {
  display: none;
}

body[data-active-module="teacher-profile"] .family-panel,
body[data-active-module="teacher-profile"] .workflow-focus,
body[data-active-module="teacher-profile"] .advanced-module-drawer,
body[data-active-module="teacher-profile"] .module-panel-note,
body[data-active-module="teacher-profile"] .status-row {
  display: none;
}

body[data-active-module="teacher-profile"] .builder-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

body[data-active-module="teacher-profile"] #registrationForm {
  display: grid;
  gap: 0;
}

body[data-active-module="teacher-profile"] .teacher-full-profile-section {
  padding: 0;
  border: 0;
  background: transparent;
}

.teacher-full-profile-page {
  display: grid;
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
  padding-bottom: 34px;
}

.teacher-full-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 108px;
  padding: 24px;
  color: #17202a;
  border: 1px solid #d9dee7;
  border-top: 4px solid var(--brand-red);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 18px 44px rgba(23, 31, 43, 0.08);
}

.teacher-full-profile-header h2 {
  margin: 4px 0 0;
  color: #17202a;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
}

.teacher-profile-kicker {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.teacher-profile-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.teacher-profile-header-meta span {
  display: inline-grid;
  gap: 2px;
  min-height: 46px;
  padding: 7px 10px;
  color: #344054;
  background: #f6f8fb;
  border: 1px solid #e1e6ee;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.teacher-profile-header-meta small {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-profile-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

.teacher-profile-action-bar .small-button {
  min-height: 42px;
  padding-inline: 18px;
}

.teacher-profile-action-bar .secondary-action {
  background: #ffffff;
}

.teacher-profile-tool-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.teacher-profile-tool-button {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 14px 16px;
  cursor: pointer;
  color: #344054;
  text-align: left;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(23, 31, 43, 0.06);
}

.teacher-profile-tool-button:hover,
.teacher-profile-tool-button.is-active {
  border-color: rgba(182, 22, 45, 0.42);
  background: #fff8f8;
}

.teacher-profile-tool-button strong {
  color: #17202a;
  font-size: 16px;
  font-weight: 800;
}

.teacher-profile-tool-button span {
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

.teacher-profile-edit-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-left: 4px solid var(--brand-red);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(23, 31, 43, 0.1);
}

.teacher-profile-edit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.teacher-profile-edit-grid label {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-profile-edit-grid input {
  min-height: 42px;
  padding: 10px 12px;
  color: #17202a;
  font-size: 16px;
  font-weight: 600;
  text-transform: none;
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: 6px;
}

.teacher-profile-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.teacher-profile-accordion {
  position: relative;
}

.teacher-profile-accordion-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 0;
  border: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  background: transparent;
}

.teacher-profile-accordion-summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #344054;
  background: #ffffff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.teacher-profile-accordion.is-open .teacher-profile-accordion-summary::after {
  content: "−";
  color: #ffffff;
  border-color: var(--brand-red);
  background: var(--brand-red);
}

.teacher-profile-accordion-summary div {
  display: grid;
  gap: 3px;
}

.teacher-profile-accordion-summary h4 {
  margin: 0;
  color: #17202a;
  font-size: 24px;
  font-weight: 800;
}

.teacher-profile-accordion-summary p,
.teacher-profile-accordion-summary span {
  margin: 0;
  color: #667085;
  font-size: 14px;
}

.teacher-profile-accordion-body {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e6eaf0;
}

.teacher-profile-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(23, 31, 43, 0.08);
}

.teacher-profile-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6eaf0;
}

.teacher-profile-panel-heading h4 {
  margin: 0;
  color: #17202a;
  font-size: 24px;
  font-weight: 800;
}

.teacher-profile-panel-heading p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.4;
}

.teacher-profile-panel-heading-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.teacher-profile-panel-heading-actions span {
  color: #667085;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.teacher-profile-panel-body {
  display: grid;
  gap: 16px;
}

.teacher-studio-panel {
  border-left: 4px solid var(--brand-red);
}

.teacher-calendar-panel {
  border-left: 4px solid #344054;
}

.teacher-calendar-summary,
.teacher-calendar-breaks,
.teacher-calendar-weekdays {
  display: grid;
  gap: 10px;
}

.teacher-calendar-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teacher-calendar-breaks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teacher-calendar-weekdays {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.teacher-calendar-summary span,
.teacher-calendar-breaks article,
.teacher-calendar-weekdays div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
}

.teacher-calendar-summary span,
.teacher-calendar-breaks span,
.teacher-calendar-weekdays span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-calendar-summary strong,
.teacher-calendar-breaks strong,
.teacher-calendar-weekdays strong {
  color: #17202a;
  font-size: 16px;
}

.teacher-calendar-breaks small,
.teacher-calendar-weekdays small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.teacher-calendar-weekdays div.is-balanced {
  border-color: rgba(27, 118, 84, 0.28);
  background: #f6fbf8;
}

.teacher-calendar-weekdays div.needs-review {
  border-color: rgba(164, 40, 54, 0.35);
  background: #fff7f8;
}

.teacher-transfer-panel {
  border-left: 4px solid #344054;
}

.teacher-transfer-layout {
  display: grid;
  gap: 14px;
}

.teacher-transfer-row {
  display: grid;
  gap: 12px;
  align-items: end;
}

.teacher-transfer-row.primary {
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1.2fr) 160px;
}

.teacher-transfer-row.details {
  grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) 140px minmax(260px, 1.4fr) auto;
}

.teacher-transfer-row label {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-transfer-row input,
.teacher-transfer-row select {
  min-height: 42px;
  padding: 10px 12px;
  color: #17202a;
  font-size: 16px;
  font-weight: 600;
  text-transform: none;
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: 6px;
}

.teacher-transfer-review-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(23, 31, 43, 0.08);
}

.teacher-transfer-review-list {
  display: grid;
  gap: 12px;
}

.teacher-transfer-review-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
}

.teacher-transfer-review-item header,
.teacher-transfer-review-meta,
.teacher-transfer-drafts {
  display: grid;
  gap: 10px;
}

.teacher-transfer-review-item header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.teacher-transfer-review-item header div {
  display: grid;
  gap: 4px;
}

.teacher-transfer-review-item header strong {
  color: #17202a;
  font-size: 18px;
}

.teacher-transfer-review-item header span,
.teacher-transfer-review-item header em,
.teacher-transfer-review-meta span,
.teacher-transfer-drafts span,
.teacher-transfer-review-empty {
  color: #667085;
  font-size: 13px;
}

.teacher-transfer-review-item header em {
  padding: 5px 8px;
  background: #fff7f8;
  border: 1px solid rgba(164, 40, 54, 0.22);
  border-radius: 999px;
  font-style: normal;
  font-weight: 800;
}

.teacher-transfer-review-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-transfer-review-meta span,
.teacher-transfer-drafts section {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e1e6ee;
  border-radius: 7px;
}

.teacher-transfer-review-meta strong {
  color: #17202a;
  font-size: 14px;
}

.teacher-transfer-drafts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teacher-transfer-drafts span {
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-transfer-drafts p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.teacher-transfer-drafts textarea {
  min-height: 118px;
  resize: vertical;
  padding: 10px 12px;
  color: #344054;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: 6px;
}

.teacher-transfer-review-actions,
.teacher-transfer-review-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.teacher-transfer-review-footer {
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #e1e6ee;
}

.teacher-transfer-review-footer span {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.teacher-studio-add-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
}

.teacher-studio-add-panel h5 {
  margin: 0;
  color: #17202a;
  font-size: 14px;
  font-weight: 900;
}

.teacher-studio-search,
.teacher-studio-form-grid label {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-studio-search input,
.teacher-studio-form-grid input,
.teacher-studio-form-grid select {
  min-height: 42px;
  padding: 10px 12px;
  color: #17202a;
  font-size: 16px;
  font-weight: 600;
  text-transform: none;
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: 6px;
}

.teacher-studio-search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.teacher-studio-result {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  color: #344054;
  text-align: left;
  background: #ffffff;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
}

.teacher-studio-result strong {
  color: #17202a;
  font-size: 16px;
}

.teacher-studio-result span,
.teacher-studio-result em {
  color: #667085;
  font-size: 13px;
  font-style: normal;
}

.teacher-studio-result:hover,
.teacher-studio-result.selected {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 2px rgba(179, 0, 5, 0.12);
}

.teacher-studio-result:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.teacher-studio-empty,
.teacher-studio-selected {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: #667085;
  background: #ffffff;
  border: 1px dashed #cfd6df;
  border-radius: 8px;
}

.teacher-studio-selected span,
.teacher-studio-selected small {
  color: #667085;
  font-size: 13px;
}

.teacher-studio-selected strong {
  color: #17202a;
  font-size: 17px;
}

.teacher-studio-form-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(145px, 0.75fr) minmax(145px, 0.75fr) minmax(120px, 0.65fr) minmax(220px, 1.25fr) auto;
  gap: 12px;
  align-items: end;
}

.teacher-studio-table {
  border: 1px solid #e1e6ee;
  border-radius: 8px;
  overflow: hidden;
}

.teacher-studio-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(150px, 1fr) 118px 118px 118px 110px minmax(160px, 1fr) 90px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  color: #344054;
  background: #ffffff;
  border-top: 1px solid #e1e6ee;
  font-size: 14px;
}

.teacher-studio-row:first-child {
  border-top: 0;
}

.teacher-studio-row.header {
  color: #667085;
  background: #f4f6f9;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-studio-row.empty {
  grid-template-columns: 1fr;
  color: #667085;
}

.teacher-studio-source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d0d8e4;
  border-radius: 999px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.teacher-full-profile-page .teacher-profile-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.teacher-full-profile-page .teacher-profile-summary span {
  position: relative;
  min-height: 116px;
  padding: 18px 20px;
  background: #ffffff;
  border-color: #d9dee7;
  box-shadow: 0 14px 34px rgba(23, 31, 43, 0.09);
}

.teacher-full-profile-page .teacher-profile-summary span::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 4px;
  background: var(--brand-red);
  border-radius: 0 0 999px 999px;
}

.teacher-full-profile-page .teacher-profile-summary span::first-line {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-full-profile-empty {
  display: grid;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.teacher-full-profile-empty span {
  color: #667085;
  font-size: 14px;
}

.teacher-profile-loading {
  border-left: 4px solid var(--brand-red);
}

@media (max-width: 1180px) {
  .academy-calendar-plan-header,
  .academy-calendar-break-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .academy-calendar-counts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .teacher-calendar-summary,
  .teacher-calendar-breaks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-calendar-weekdays {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .teacher-transfer-row.primary,
  .teacher-transfer-row.details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .teacher-transfer-review-meta,
  .teacher-transfer-drafts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teachers-directory-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 1.2fr) 80px minmax(128px, 0.8fr);
  }

  .teachers-directory-row span:last-child {
    grid-column: 1 / -1;
  }

  .teachers-directory-row.header span:last-child {
    display: none;
  }

  .teacher-full-profile-page .teacher-profile-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-full-profile-header {
    grid-template-columns: 1fr;
  }

  .teacher-profile-tool-strip {
    grid-template-columns: 1fr;
  }

  .teacher-profile-action-bar {
    justify-content: flex-start;
  }

  .teacher-profile-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-studio-search-results,
  .teacher-studio-form-grid,
  .teacher-studio-row,
  .teacher-studio-row.header {
    grid-template-columns: 1fr;
  }

  .teacher-profile-panel-heading {
    display: grid;
  }
}

@media (max-width: 760px) {
  .academy-calendar-plan-header,
  .academy-calendar-break-list,
  .academy-calendar-counts {
    grid-template-columns: 1fr;
  }

  .teacher-calendar-summary,
  .teacher-calendar-breaks,
  .teacher-calendar-weekdays {
    grid-template-columns: 1fr;
  }

  .teacher-transfer-row.primary,
  .teacher-transfer-row.details {
    grid-template-columns: 1fr;
  }

  .teacher-transfer-review-item header,
  .teacher-transfer-review-meta,
  .teacher-transfer-drafts {
    grid-template-columns: 1fr;
  }

  .teachers-directory-row,
  .teachers-directory-row.header {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .teachers-directory-row.header {
    display: none;
  }

  .teachers-directory-row span:last-child {
    grid-column: auto;
  }

  .teacher-full-profile-header {
    min-height: auto;
    padding: 20px;
  }

  .teacher-full-profile-header h2 {
    font-size: 28px;
  }

  .teacher-profile-action-bar {
    padding: 0;
  }

  .teacher-profile-action-bar .small-button {
    width: 100%;
  }

  .teacher-profile-header-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .teacher-full-profile-page .teacher-profile-summary {
    grid-template-columns: 1fr;
  }

  .teacher-profile-edit-grid {
    grid-template-columns: 1fr;
  }

  .teacher-studio-search-results,
  .teacher-studio-form-grid,
  .teacher-studio-row,
  .teacher-studio-row.header {
    grid-template-columns: 1fr;
  }
}

/* Phase 1 final admin polish overrides. Keep this at the end so old module CSS
   cannot reintroduce the prototype chrome on cleaned pages. */
body:not(.parent-form-body) {
  background: var(--admin-bg);
}

body:not(.parent-form-body) .app-shell {
  min-height: 100vh;
  background: var(--admin-bg);
}

body:not(.parent-form-body) .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

body:not(.parent-form-body) .top-actions,
body:not(.parent-form-body) .status-row,
body[data-active-module="messages"] .workflow-focus,
body[data-active-module="messages"] .advanced-module-drawer,
body[data-active-module="messages"] .module-panel-note,
body[data-active-module="dashboard"] .workflow-focus,
body[data-active-module="dashboard"] .advanced-module-drawer,
body[data-active-module="dashboard"] .module-panel-note {
  display: none !important;
}

body[data-active-module="dashboard"] .family-panel,
body[data-active-module="messages"] .family-panel {
  display: none !important;
}

body[data-active-module="dashboard"] .layout,
body[data-active-module="messages"] .layout {
  display: block;
}

body[data-active-module="dashboard"] .builder-panel {
  display: block !important;
}

body[data-active-module="dashboard"] #registrationForm,
body[data-active-module="messages"] #registrationForm {
  max-width: 1180px;
  margin: 0 auto;
}

body[data-active-module="dashboard"] .form-section,
body[data-active-module="messages"] .form-section {
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-panel);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

body[data-active-module="dashboard"] .dashboard-hero-grid,
body[data-active-module="dashboard"] .dashboard-grid {
  display: grid !important;
}

body[data-active-module="dashboard"] .dashboard-hero-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
}

body[data-active-module="dashboard"] .dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body[data-active-module="dashboard"] .dashboard-card,
body[data-active-module="dashboard"] .dashboard-status-card,
body[data-active-module="dashboard"] .dashboard-task-card,
body[data-active-module="messages"] .domain-email-panel,
body[data-active-module="messages"] .message-template-panel,
body[data-active-module="messages"] .delivery-queue-panel,
body[data-active-module="messages"] .message-entry-grid,
body[data-active-module="messages"] .message-log-table {
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

body[data-active-module="dashboard"] .dashboard-live-testing,
body[data-active-module="dashboard"] .dashboard-quick-links {
  display: none !important;
}

body[data-active-module="messages"] .form-section:not([data-module="messages"]) {
  display: none !important;
}

body[data-active-module="messages"] .message-center-section {
  display: grid !important;
  gap: 16px;
}

body[data-active-module="messages"] .message-summary-grid,
body[data-active-module="messages"] .domain-email-status-grid,
body[data-active-module="messages"] .delivery-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-active-module="messages"] .delivery-handoff-panel,
body[data-active-module="messages"] .delivery-release-review-panel,
body[data-active-module="messages"] .message-policy-panel {
  display: none !important;
}

body[data-active-module="messages"] .domain-email-heading,
body[data-active-module="messages"] .delivery-queue-heading,
body[data-active-module="messages"] .domain-email-test-row,
body[data-active-module="messages"] .message-entry-grid,
body[data-active-module="messages"] .template-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-active-module="messages"] .wide-field {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  body[data-active-module="dashboard"] .dashboard-hero-grid,
  body[data-active-module="dashboard"] .dashboard-grid,
  body[data-active-module="messages"] .message-summary-grid,
  body[data-active-module="messages"] .domain-email-status-grid,
  body[data-active-module="messages"] .delivery-summary-grid,
  body[data-active-module="messages"] .domain-email-heading,
  body[data-active-module="messages"] .delivery-queue-heading,
  body[data-active-module="messages"] .domain-email-test-row,
  body[data-active-module="messages"] .message-entry-grid,
  body[data-active-module="messages"] .template-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body:not(.parent-form-body) .app-shell {
    display: block;
    grid-template-columns: 1fr !important;
  }

  body:not(.parent-form-body) .sidebar {
    position: static;
    min-height: auto;
  }

  body:not(.parent-form-body) .brand {
    min-height: auto;
    padding: 14px 16px;
  }

  body:not(.parent-form-body) .brand-logo {
    width: 172px;
  }

  body:not(.parent-form-body) .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
  }

  body:not(.parent-form-body) .nav-item,
  body:not(.parent-form-body) .nav-subitem {
    width: 100%;
    min-height: 40px;
    margin-left: 0;
    padding: 9px 10px;
    text-align: center;
    font-size: 13px;
    line-height: 1.2;
  }

  body:not(.parent-form-body) .nav-subitem::before {
    display: none;
  }

  body:not(.parent-form-body) .workspace {
    padding: 12px;
  }

  body:not(.parent-form-body) .topbar {
    position: static;
    min-height: auto;
    padding: 18px;
  }

  body:not(.parent-form-body) .topbar h1 {
    font-size: 30px;
    line-height: 1.1;
  }

  body[data-active-module="dashboard"] #registrationForm,
  body[data-active-module="messages"] #registrationForm {
    width: 100%;
  }

  body[data-active-module="dashboard"] .admin-home,
  body[data-active-module="messages"] .message-center-section > .section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

body[data-active-module="dashboard"] .admin-home-actions {
  grid-template-columns: 1fr;
}
}

body[data-active-module="dashboard"] .dashboard-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-shell {
  display: grid;
  gap: 18px;
}

.home-intro {
  display: grid;
  gap: 8px;
  padding: 28px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.home-intro h2 {
  margin: 0;
  color: var(--admin-ink);
  font-size: 32px;
  line-height: 1.15;
}

.home-intro p {
  max-width: 760px;
  margin: 0;
  color: var(--admin-muted);
  font-size: 16px;
  line-height: 1.5;
}

.home-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-shortcut-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 178px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.home-shortcut-card:hover {
  border-color: rgba(179, 0, 5, 0.34);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.home-shortcut-card span {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-shortcut-card strong {
  color: var(--admin-ink);
  font-size: 20px;
  line-height: 1.2;
}

.home-shortcut-card small {
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.45;
}

.home-shortcut-card.primary-work-card {
  background: #fff8f8;
  border-color: rgba(179, 0, 5, 0.25);
}

@media (max-width: 1180px) {
  .home-shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-intro {
    padding: 22px;
  }

  .home-intro h2 {
    font-size: 30px;
  }

  .home-shortcut-grid {
    grid-template-columns: 1fr;
  }

  .home-shortcut-card {
    min-height: auto;
  }
}

/* Admin visual design layer: scoped presentation-only overrides.
   Keep logic, data, identifiers, and workflow behavior out of this block. */
body.hide-production-tools {
  --admin-bg: #f5f6f8;
  --admin-panel: #ffffff;
  --admin-soft: #f9fafb;
  --admin-border: #d6dce5;
  --admin-border-strong: #c5ccd7;
  --admin-ink: #1e242c;
  --admin-muted: #626d7a;
  --admin-subtle: #eef1f5;
  --admin-focus: rgba(179, 0, 5, 0.18);
  --admin-shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.06);
  --admin-shadow-panel: 0 14px 36px rgba(15, 23, 42, 0.07);
  color: var(--admin-ink);
  background: var(--admin-bg);
  font-family: var(--font-ui);
  text-rendering: optimizeLegibility;
}

body.hide-production-tools .app-shell {
  grid-template-columns: 242px minmax(0, 1fr);
  background: var(--admin-bg);
}

body.hide-production-tools .sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: #20242a;
  border-right: 1px solid #14181d;
  box-shadow: 5px 0 24px rgba(15, 23, 42, 0.08);
}

body.hide-production-tools .brand {
  min-height: 82px;
  padding: 18px 20px;
  background: #ffffff;
  border-bottom: 1px solid #eceff3;
}

body.hide-production-tools .brand-logo {
  width: 198px;
}

body.hide-production-tools .nav-list {
  gap: 5px;
  padding: 14px 12px;
}

body.hide-production-tools .nav-item,
body.hide-production-tools .nav-subitem {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 750;
}

body.hide-production-tools .nav-item {
  padding: 10px 13px;
  border-left: 0;
}

body.hide-production-tools .nav-subitem {
  width: 100%;
  margin-left: 0;
  padding: 9px 13px 9px 25px;
  font-size: 14px;
}

body.hide-production-tools .nav-item:hover,
body.hide-production-tools .nav-subitem:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

body.hide-production-tools .nav-item.active,
body.hide-production-tools .nav-subitem.active {
  color: #ffffff;
  background: #b30005;
  border-color: #d95e63;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body.hide-production-tools .collapse-button {
  min-height: 38px;
  margin: auto 14px 18px;
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}

body.hide-production-tools .workspace {
  min-width: 0;
  padding: 0 24px 36px;
  background: var(--admin-bg);
}

body.hide-production-tools .topbar {
  margin: 0 -24px 22px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

body.hide-production-tools .eyebrow,
body.hide-production-tools .breadcrumb,
body.hide-production-tools .section-label {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.hide-production-tools h1 {
  color: var(--admin-ink);
  font-size: clamp(30px, 2.4vw, 38px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

body.hide-production-tools h2,
body.hide-production-tools h3,
body.hide-production-tools h4 {
  color: var(--admin-ink);
  letter-spacing: 0;
}

body.hide-production-tools .header-subtitle,
body.hide-production-tools .muted,
body.hide-production-tools .inline-note,
body.hide-production-tools small {
  color: var(--admin-muted);
}

body.hide-production-tools .form-section,
body.hide-production-tools .module-card,
body.hide-production-tools .family-panel,
body.hide-production-tools .families-guide-panel,
body.hide-production-tools .family-profile-card,
body.hide-production-tools .family-profile-stat,
body.hide-production-tools .family-detail-panel,
body.hide-production-tools .family-payment-history,
body.hide-production-tools .teacher-ledger-panel,
body.hide-production-tools .teacher-profile-panel,
body.hide-production-tools .teacher-import-panel,
body.hide-production-tools .teacher-studio-panel,
body.hide-production-tools .teacher-calendar-panel,
body.hide-production-tools .teachers-list-panel,
body.hide-production-tools .payment-service-panel,
body.hide-production-tools .payment-attention-panel,
body.hide-production-tools .payment-workspace-panel,
body.hide-production-tools .payment-queue-panel,
body.hide-production-tools .payment-service-charge-panel,
body.hide-production-tools .payments-home-panel,
body.hide-production-tools .pad-treasury-export-panel,
body.hide-production-tools .billing-run-panel,
body.hide-production-tools .billing-readiness-panel,
body.hide-production-tools .recurring-billing-panel,
body.hide-production-tools .export-actions-panel,
body.hide-production-tools .submission-detail-panel,
body.hide-production-tools .temporary-registration-panel,
body.hide-production-tools .registration-prep-panel,
body.hide-production-tools .registration-package-card,
body.hide-production-tools .home-intro,
body.hide-production-tools .home-shortcut-card {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-panel);
  box-shadow: var(--admin-shadow-soft);
}

body.hide-production-tools .form-section,
body.hide-production-tools .family-profile-page-header,
body.hide-production-tools .teacher-ledger-panel,
body.hide-production-tools .teachers-list-panel,
body.hide-production-tools .payments-home-panel,
body.hide-production-tools .payment-service-panel {
  box-shadow: var(--admin-shadow-panel);
}

body.hide-production-tools .section-heading,
body.hide-production-tools .family-profile-card-heading,
body.hide-production-tools .teacher-ledger-heading,
body.hide-production-tools .teachers-list-header,
body.hide-production-tools .billing-run-heading,
body.hide-production-tools .billing-readiness-heading,
body.hide-production-tools .payment-attention-heading,
body.hide-production-tools .payment-service-heading,
body.hide-production-tools .pad-treasury-export-panel > div:first-child {
  border-bottom-color: var(--admin-border);
}

body.hide-production-tools input,
body.hide-production-tools select,
body.hide-production-tools textarea {
  color: var(--admin-ink);
  border: 1px solid var(--admin-border-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

body.hide-production-tools input:not([type="checkbox"]):not([type="radio"]),
body.hide-production-tools select {
  min-height: 42px;
}

body.hide-production-tools textarea {
  min-height: 88px;
}

body.hide-production-tools input:hover,
body.hide-production-tools select:hover,
body.hide-production-tools textarea:hover {
  border-color: #aeb7c4;
}

body.hide-production-tools input:focus,
body.hide-production-tools select:focus,
body.hide-production-tools textarea:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--admin-focus);
  outline: 0;
}

body.hide-production-tools button {
  border-radius: 8px;
}

body.hide-production-tools .primary-button,
body.hide-production-tools .ghost-button,
body.hide-production-tools .small-button,
body.hide-production-tools .mini-action-button,
body.hide-production-tools .secondary-action,
body.hide-production-tools .folder-tab,
body.hide-production-tools .tab,
body.hide-production-tools .icon-text-button,
body.hide-production-tools .family-page-size-button {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 800;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

body.hide-production-tools .primary-button,
body.hide-production-tools .primary,
body.hide-production-tools .folder-tab.active,
body.hide-production-tools .tab.active,
body.hide-production-tools .family-page-size-button.active {
  color: #ffffff;
  background: var(--brand-red);
  border-color: var(--brand-red-dark);
  box-shadow: 0 8px 18px rgba(179, 0, 5, 0.18);
}

body.hide-production-tools .ghost-button,
body.hide-production-tools .small-button,
body.hide-production-tools .mini-action-button,
body.hide-production-tools .secondary-action,
body.hide-production-tools .folder-tab,
body.hide-production-tools .tab,
body.hide-production-tools .icon-text-button,
body.hide-production-tools .family-page-size-button {
  color: var(--admin-ink);
  background: #ffffff;
  border: 1px solid var(--admin-border);
}

body.hide-production-tools .ghost-button:hover,
body.hide-production-tools .small-button:hover,
body.hide-production-tools .mini-action-button:hover,
body.hide-production-tools .secondary-action:hover,
body.hide-production-tools .folder-tab:hover,
body.hide-production-tools .tab:hover,
body.hide-production-tools .icon-text-button:hover,
body.hide-production-tools .family-page-size-button:hover {
  border-color: #b7c0cc;
  background: #f9fafb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

body.hide-production-tools .primary-button:hover,
body.hide-production-tools .primary:hover {
  background: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
  transform: translateY(-1px);
}

body.hide-production-tools button:disabled,
body.hide-production-tools input:disabled,
body.hide-production-tools select:disabled,
body.hide-production-tools textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

body.hide-production-tools .family-profile-table,
body.hide-production-tools .payment-service-family-table,
body.hide-production-tools .payment-service-review-table,
body.hide-production-tools .payment-queue-list,
body.hide-production-tools .recurring-billing-table,
body.hide-production-tools .teacher-student-ledger,
body.hide-production-tools .teacher-studio-table,
body.hide-production-tools .submission-table,
body.hide-production-tools .temporary-enrollment-table,
body.hide-production-tools .billing-run-table,
body.hide-production-tools .payment-ledger-table,
body.hide-production-tools .pad-identity-table {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--admin-shadow-soft);
}

body.hide-production-tools .family-profile-row.header,
body.hide-production-tools .teacher-student-ledger-row.header,
body.hide-production-tools .teacher-studio-row.header,
body.hide-production-tools .teachers-directory-row.header,
body.hide-production-tools .payment-service-family-row.header,
body.hide-production-tools .payment-service-review-row.header,
body.hide-production-tools .payment-queue-row.header,
body.hide-production-tools .recurring-plan-row.header,
body.hide-production-tools .submission-row.header,
body.hide-production-tools .temporary-enrollment-row.header,
body.hide-production-tools .billing-run-row.header,
body.hide-production-tools .payment-ledger-row.header,
body.hide-production-tools .pad-identity-row.header {
  color: #4f5b6a;
  background: #eef2f6;
  border-bottom: 1px solid var(--admin-border);
  font-size: 12px;
  font-weight: 850;
}

body.hide-production-tools .family-profile-row:not(.header):hover,
body.hide-production-tools .teacher-student-ledger-row:not(.header):hover,
body.hide-production-tools .teacher-studio-row:not(.header):hover,
body.hide-production-tools .teachers-directory-row:not(.header):hover,
body.hide-production-tools .payment-service-family-row:not(.header):hover,
body.hide-production-tools .payment-service-review-row:not(.header):hover,
body.hide-production-tools .payment-queue-row:not(.header):hover,
body.hide-production-tools .recurring-plan-row:not(.header):hover,
body.hide-production-tools .submission-row:not(.header):hover,
body.hide-production-tools .temporary-enrollment-row:not(.header):hover,
body.hide-production-tools .billing-run-row:not(.header):hover,
body.hide-production-tools .payment-ledger-row:not(.header):hover {
  background: #fffafa;
}

body.hide-production-tools .status-pill,
body.hide-production-tools .payment-status-chip,
body.hide-production-tools .payment-method-pill,
body.hide-production-tools .billing-readiness-pill,
body.hide-production-tools .billing-run-pill,
body.hide-production-tools .temporary-status-pill,
body.hide-production-tools .payment-authorization-pill {
  border-radius: 999px;
  letter-spacing: 0;
}

body.hide-production-tools .toast,
body.hide-production-tools #toast {
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

body.hide-production-tools .home-shortcut-grid,
body.hide-production-tools .payments-home-grid,
body.hide-production-tools .families-home-grid,
body.hide-production-tools .teachers-home-summary,
body.hide-production-tools .payment-summary-grid,
body.hide-production-tools .family-profile-overview-grid,
body.hide-production-tools .teacher-profile-summary {
  gap: 14px;
}

body.hide-production-tools .family-profile-table,
body.hide-production-tools .payment-service-family-table,
body.hide-production-tools .payment-service-review-table,
body.hide-production-tools .payment-queue-list,
body.hide-production-tools .recurring-billing-table,
body.hide-production-tools .teacher-student-ledger,
body.hide-production-tools .teacher-studio-table,
body.hide-production-tools .submission-table,
body.hide-production-tools .temporary-enrollment-table {
  contain: layout paint;
}

body.hide-production-tools input,
body.hide-production-tools select,
body.hide-production-tools textarea {
  transition: border-color 80ms ease, box-shadow 80ms ease;
}

body[data-active-module="calendar"] .calendar-manager-section {
  display: grid;
  gap: 18px;
  max-width: 1320px;
}

body[data-active-module="calendar"] .calendar-manager-section > .section-heading {
  margin: 0;
}

body[data-active-module="calendar"] .calendar-summary-grid {
  margin: 0;
}

body[data-active-module="calendar"] .calendar-summary-grid div {
  min-height: 92px;
  padding: 16px;
  border-color: var(--admin-border);
  border-radius: 8px;
  background: var(--admin-soft);
}

body[data-active-module="calendar"] .calendar-summary-grid strong {
  font-size: 22px;
  line-height: 1.2;
}

body[data-active-module="calendar"] .calendar-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.62fr);
  gap: 18px;
  align-items: start;
}

body[data-active-module="calendar"] .calendar-primary-column,
body[data-active-module="calendar"] .calendar-side-column {
  display: grid;
  gap: 16px;
}

body[data-active-module="calendar"] .academy-calendar-plan,
body[data-active-module="calendar"] .academy-calendar-counts,
body[data-active-module="calendar"] .calendar-entry-card,
body[data-active-module="calendar"] .calendar-event-card,
body[data-active-module="calendar"] .calendar-policy-panel {
  margin: 0;
  border-color: var(--admin-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--admin-shadow-soft);
}

body[data-active-module="calendar"] .academy-calendar-plan {
  padding: 18px;
}

body[data-active-module="calendar"] .academy-calendar-plan-header {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-active-module="calendar"] .academy-calendar-plan-header div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-soft);
}

body[data-active-module="calendar"] .academy-calendar-plan-header strong {
  font-size: 17px;
  line-height: 1.35;
}

body[data-active-module="calendar"] .academy-calendar-break-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-active-module="calendar"] .academy-calendar-break-list article {
  border-color: var(--admin-border);
  border-radius: 8px;
  background: #ffffff;
}

body[data-active-module="calendar"] .academy-calendar-counts {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  padding: 14px;
}

body[data-active-module="calendar"] .academy-weekday-count {
  min-height: 88px;
  border-radius: 8px;
}

body[data-active-module="calendar"] .calendar-entry-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

body[data-active-module="calendar"] .calendar-entry-card,
body[data-active-module="calendar"] .calendar-event-card,
body[data-active-module="calendar"] .calendar-policy-panel {
  padding: 18px;
}

body[data-active-module="calendar"] .calendar-entry-card-heading,
body[data-active-module="calendar"] .calendar-event-card-heading {
  margin-bottom: 14px;
}

body[data-active-module="calendar"] .calendar-side-column .calendar-entry-card-heading {
  display: grid;
  gap: 6px;
}

body[data-active-module="calendar"] .calendar-side-column .calendar-entry-card-heading h3 {
  font-size: 22px;
  line-height: 1.18;
}

body[data-active-module="calendar"] .calendar-side-column .calendar-entry-card-heading p {
  max-width: none;
}

body[data-active-module="calendar"] .add-calendar-event-button {
  grid-column: 1 / span 2;
  justify-self: stretch;
  width: 100%;
  min-height: 44px;
  white-space: nowrap;
}

body[data-active-module="calendar"] .calendar-policy-panel {
  grid-template-columns: 1fr;
}

body[data-active-module="calendar"] .calendar-policy-panel div {
  padding: 14px;
  border-color: var(--admin-border);
  border-left-color: var(--brand-red);
  border-radius: 8px;
}

body[data-active-module="calendar"] .calendar-event-table {
  display: grid;
  gap: 14px;
  overflow: visible;
  border: 0;
  background: transparent;
}

body[data-active-module="calendar"] .calendar-event-group {
  display: grid;
  gap: 10px;
}

body[data-active-module="calendar"] .calendar-event-group + .calendar-event-group {
  padding-top: 12px;
  border-top: 1px solid var(--admin-border);
}

body[data-active-module="calendar"] .calendar-event-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

body[data-active-module="calendar"] .calendar-event-group-heading h4 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.2;
}

body[data-active-module="calendar"] .calendar-event-group-heading span {
  color: var(--admin-muted);
  font-size: 14px;
}

body[data-active-module="calendar"] .calendar-event-group-heading > strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  color: var(--brand-red-dark);
  background: #fff3f3;
  border: 1px solid #f0c7c7;
  border-radius: 999px;
  font-size: 15px;
}

body[data-active-module="calendar"] .calendar-event-list {
  display: grid;
  gap: 10px;
}

body[data-active-module="calendar"] .calendar-event-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #ffffff;
}

body[data-active-module="calendar"] .calendar-event-date {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-active-module="calendar"] .calendar-event-date strong {
  color: var(--admin-ink);
  font-size: 17px;
}

body[data-active-module="calendar"] .calendar-event-date span,
body[data-active-module="calendar"] .calendar-event-content small,
body[data-active-module="calendar"] .calendar-event-content p,
body[data-active-module="calendar"] .calendar-event-group-empty {
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.4;
}

body[data-active-module="calendar"] .calendar-event-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
}

body[data-active-module="calendar"] .calendar-event-title-line strong {
  color: var(--admin-ink);
  font-size: 17px;
}

body[data-active-module="calendar"] .calendar-event-content p {
  margin: 0 0 5px;
}

body[data-active-module="calendar"] .calendar-event-group-empty {
  padding: 16px;
  border: 1px dashed var(--admin-border);
  border-radius: 8px;
  background: var(--admin-soft);
}

@media (prefers-reduced-motion: reduce) {
  body.hide-production-tools *,
  body.hide-production-tools *::before,
  body.hide-production-tools *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  body.hide-production-tools .workspace {
    padding: 0 16px 28px;
  }

  body.hide-production-tools .topbar {
    margin: 0 -16px 18px;
    padding: 18px 20px;
  }

  body[data-active-module="calendar"] .calendar-workspace-grid,
  body[data-active-module="calendar"] .academy-calendar-plan-header,
  body[data-active-module="calendar"] .academy-calendar-break-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.hide-production-tools .app-shell {
    grid-template-columns: 1fr;
  }

  body.hide-production-tools .sidebar {
    position: static;
    min-height: auto;
  }

  body.hide-production-tools .workspace {
    padding: 0 12px 24px;
  }

  body.hide-production-tools .topbar {
    margin: 0 -12px 16px;
  }

  body.hide-production-tools .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-active-module="calendar"] .calendar-summary-grid,
  body[data-active-module="calendar"] .calendar-event-item {
    grid-template-columns: 1fr;
  }

  body[data-active-module="calendar"] .calendar-event-item .calendar-remove-button {
    justify-self: start;
  }
}

/* Messages page cleanup: keep the workflow, remove the prototype feeling. */
body[data-active-module="messages"] .message-center-section {
  max-width: 1180px;
}

body[data-active-module="messages"] .message-center-section > .section-heading {
  margin-bottom: 0;
}

body[data-active-module="messages"] .message-center-section > .section-heading h2 {
  font-size: 28px;
}

body[data-active-module="messages"] .message-summary-grid {
  order: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-active-module="messages"] .message-summary-grid div {
  min-height: 78px;
  padding: 16px;
}

body[data-active-module="messages"] .message-entry-grid {
  order: 2;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

body[data-active-module="messages"] .message-compose-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--admin-border);
}

body[data-active-module="messages"] .message-compose-header h3 {
  margin: 0;
  color: var(--admin-ink);
  font-size: 20px;
}

body[data-active-module="messages"] .message-compose-header span {
  color: var(--admin-muted);
  font-size: 13px;
}

body[data-active-module="messages"] .message-recipient-picker {
  align-self: stretch;
}

body[data-active-module="messages"] .message-recipient-search-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
}

body[data-active-module="messages"] .message-recipient-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 236px;
  overflow: auto;
  padding: 2px;
}

body[data-active-module="messages"] .message-recipient-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  cursor: pointer;
}

body[data-active-module="messages"] .message-recipient-result:hover,
body[data-active-module="messages"] .message-recipient-result.selected {
  border-color: var(--brand-red);
  background: #fff8f8;
}

body[data-active-module="messages"] .message-recipient-result span,
body[data-active-module="messages"] .message-recipient-result strong,
body[data-active-module="messages"] .message-recipient-result small {
  min-width: 0;
}

body[data-active-module="messages"] .message-recipient-result strong,
body[data-active-module="messages"] .message-recipient-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-module="messages"] .message-recipient-result strong {
  color: var(--admin-ink);
}

body[data-active-module="messages"] .message-recipient-result small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 12px;
}

body[data-active-module="messages"] .message-recipient-result em {
  color: var(--brand-red);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

body[data-active-module="messages"] .message-selected-recipients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  padding: 10px;
  background: var(--admin-soft);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}

body[data-active-module="messages"] .message-recipient-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: var(--admin-ink);
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

body[data-active-module="messages"] .message-recipient-chip span {
  color: var(--brand-red);
  font-size: 16px;
  line-height: 1;
}

body[data-active-module="messages"] .message-recipient-chip small {
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 900;
}

body[data-active-module="messages"] .message-recipient-placeholder,
body[data-active-module="messages"] .message-recipient-empty {
  color: var(--admin-muted);
  font-size: 13px;
}

body[data-active-module="messages"] .message-template-panel {
  order: 3;
}

body[data-active-module="messages"] .delivery-queue-panel {
  order: 4;
}

body[data-active-module="messages"] .domain-email-panel {
  order: 5;
  border-top: 0;
}

body[data-active-module="messages"] .message-log-table {
  order: 6;
}

body[data-active-module="messages"] .domain-email-panel,
body[data-active-module="messages"] .message-template-panel,
body[data-active-module="messages"] .delivery-queue-panel,
body[data-active-module="messages"] .message-entry-grid,
body[data-active-module="messages"] .message-log-table {
  padding: 20px;
  border-radius: 8px;
}

body[data-active-module="messages"] .message-entry-grid label,
body[data-active-module="messages"] .domain-email-test-row label,
body[data-active-module="messages"] .template-control-grid label {
  gap: 6px;
}

body[data-active-module="messages"] #messageBody {
  min-height: 112px;
  resize: vertical;
}

body[data-active-module="messages"] .wide-field {
  grid-column: 1 / -1;
}

body[data-active-module="messages"] .add-message-button {
  justify-self: end;
  min-width: 160px;
}

body[data-active-module="messages"] .message-send-report {
  padding: 12px 14px;
  color: var(--admin-muted);
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 13px;
}

body[data-active-module="messages"] .message-send-report.is-ready {
  color: #14532d;
  background: #f0fdf4;
  border-color: #86efac;
}

body[data-active-module="messages"] .message-send-report.has-failures {
  color: #7f1d1d;
  background: #fef2f2;
  border-color: #fecaca;
}

body[data-active-module="messages"] .message-send-report div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

body[data-active-module="messages"] .message-send-report strong {
  color: var(--admin-ink);
}

body[data-active-module="messages"] .message-send-report ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

body[data-active-module="messages"] .domain-email-heading p,
body[data-active-module="messages"] .delivery-queue-heading p {
  max-width: 560px;
}

body[data-active-module="messages"] .message-advanced-tools {
  margin-top: 2px;
  border-top: 1px solid var(--admin-border);
}

body[data-active-module="messages"] .message-advanced-tools summary {
  width: max-content;
  padding: 12px 0 2px;
  color: var(--admin-muted);
  cursor: pointer;
  font-weight: 800;
}

body[data-active-module="messages"] .message-advanced-tools[open] {
  display: grid;
  gap: 12px;
}

body[data-active-module="messages"] .message-advanced-tools[open] .delivery-handoff-panel,
body[data-active-module="messages"] .message-advanced-tools[open] .delivery-release-review-panel {
  display: grid !important;
}

body[data-active-module="messages"] .message-policy-panel {
  display: none !important;
}

@media (max-width: 980px) {
  body[data-active-module="messages"] .message-summary-grid,
  body[data-active-module="messages"] .message-entry-grid,
  body[data-active-module="messages"] .message-recipient-results,
  body[data-active-module="messages"] .domain-email-test-row,
  body[data-active-module="messages"] .template-control-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  body[data-active-module="messages"] .message-summary-grid,
  body[data-active-module="messages"] .message-entry-grid,
  body[data-active-module="messages"] .message-recipient-search-row,
  body[data-active-module="messages"] .message-recipient-results,
  body[data-active-module="messages"] .domain-email-test-row,
  body[data-active-module="messages"] .template-control-grid,
  body[data-active-module="messages"] .domain-email-heading,
  body[data-active-module="messages"] .delivery-queue-heading {
    grid-template-columns: 1fr;
  }

  body[data-active-module="messages"] .message-compose-header {
    display: grid;
  }

  body[data-active-module="messages"] .add-message-button {
    justify-self: stretch;
  }
}
