:root {
  --ink: #223054;
  --muted: #667891;
  --line: #e7eef4;
  --paper: #fbfdff;
  --panel: #ffffff;
  --sage: #5faabd;
  --sage-dark: #4f98a5;
  --clay: #d36c70;
  --gold: #f3dec1;
  --blue: #aacede;
  --rose: #edaabd;
  --lavender: #c77eb2;
  --navy: #24345e;
  --soft: #f4f9fb;
  --shadow: 0 12px 30px rgba(34, 48, 84, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 4%, rgba(170, 206, 222, 0.28), transparent 30%),
    radial-gradient(circle at 86% 2%, rgba(237, 170, 189, 0.22), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 58%, #f2f9fc 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 82px 1fr;
}

.shell.menu-open {
  grid-template-columns: 248px 1fr;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-panel {
  width: min(920px, 100%);
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.auth-logo {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.auth-panel p {
  margin: 8px auto 0;
  max-width: 560px;
  color: var(--muted);
}

.family-hub-shell .auth-panel {
  width: min(720px, 100%);
}

.hub-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  width: 100%;
}

.hub-verse {
  width: min(620px, 100%);
  border: 1px solid rgba(170, 206, 222, 0.65);
  border-radius: 12px;
  background: #f5fbfd;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.hub-verse strong {
  color: var(--navy);
  font-size: 0.98rem;
  line-height: 1.45;
}

.hub-verse span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hub-profile-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  padding: 16px;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 132px;
  box-shadow: 0 8px 20px rgba(34, 48, 84, 0.045);
}

.hub-profile-card .avatar {
  width: 52px;
  height: 52px;
}

.hub-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid rgba(223, 232, 239, 0.72);
}

.hub-unlock {
  width: min(420px, 100%);
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfc;
}

.subtle-signout {
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-grid {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-choice {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-weight: 760;
  box-shadow: 0 8px 20px rgba(34, 48, 84, 0.045);
}

.auth-choice.active {
  background: linear-gradient(135deg, var(--navy), #4f6f99);
  border-color: rgba(36, 52, 94, 0.9);
  color: white;
}

.auth-card {
  width: min(460px, 100%);
  background: white;
  border: 1px solid rgba(223, 232, 239, 0.9);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.auth-form {
  text-align: left;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--navy);
  padding: 0;
  min-height: auto;
  text-decoration: underline;
  justify-self: start;
}

.auth-error {
  width: min(620px, 100%);
  border: 1px solid #f3c3d0;
  background: #fff3f6;
  color: #9a4968;
  border-radius: 14px;
  padding: 10px 12px;
}

.sidebar {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(36, 52, 94, 0.94), rgba(32, 48, 83, 0.96)),
    var(--navy);
  color: #eef6fb;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  align-self: start;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar:not(.open) .brand div,
.sidebar:not(.open) .nav span,
.sidebar:not(.open) .role-card,
.sidebar:not(.open) .signout {
  display: none;
}

.sidebar:not(.open) .brand {
  justify-content: center;
}

.sidebar:not(.open) .nav button {
  justify-content: center;
  padding: 0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0)),
    var(--blue);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand span {
  color: #b9c9d8;
  font-size: 0.82rem;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  border: 0;
  background: transparent;
  color: #dce8f2;
  text-align: left;
  min-height: 40px;
  border-radius: 10px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.nav svg,
.primary svg,
.ghost svg,
.danger svg,
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.role-card {
  margin-top: 28px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
  display: grid;
  gap: 12px;
}

.signout {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #dce8f2;
}

.role-card label {
  display: block;
  font-size: 0.75rem;
  color: #b9c9d8;
  margin-bottom: 8px;
}

.role-card select {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #304369;
  color: white;
  padding: 0 10px;
}

.mode-switch-card {
  display: grid;
  gap: 10px;
}

.mode-switch-card .is-muted {
  opacity: 0.78;
}

.hub-mode-switch {
  width: min(420px, 100%);
  margin-top: 16px;
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(34, 48, 84, 0.05);
}

.hub-mode-switch label {
  color: var(--muted);
  text-align: left;
}

.hub-mode-switch select {
  margin-top: 8px;
  border-color: var(--line);
  background: #f8fbfc;
  color: var(--ink);
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 72px;
  border-bottom: 1px solid rgba(223, 232, 239, 0.7);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 780;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  background: #ffffff;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content {
  padding: 24px 28px 42px;
}

.band {
  background:
    linear-gradient(90deg, rgba(170, 206, 222, 0.24), rgba(237, 170, 189, 0.18), rgba(199, 126, 178, 0.08)),
    #f8fbfd;
  border-bottom: 1px solid rgba(223, 232, 239, 0.7);
  padding: 18px 28px;
}

.family-strip {
  display: grid;
  grid-template-columns: 1.1fr repeat(4, minmax(120px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.family-art {
  min-height: 148px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(34, 48, 84, 0.18), rgba(34, 48, 84, 0.04)),
    linear-gradient(120deg, #d8edf4 0%, #f8eef3 58%, #ead8ec 100%);
  color: var(--navy);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}

.family-art h2 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(1.25rem, 2.55vw, 2.15rem);
  line-height: 1.08;
}

.metric {
  background: var(--panel);
  border: 1px solid rgba(223, 232, 239, 0.82);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(34, 48, 84, 0.045);
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
}

.metric strong {
  display: block;
  font-size: 1.8rem;
  margin-top: 8px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) 360px;
}

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

.panel,
.item-card {
  background: var(--panel);
  border: 1px solid rgba(223, 232, 239, 0.86);
  border-radius: 14px;
}

.panel {
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(34, 48, 84, 0.045);
}

.panel-head {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(223, 232, 239, 0.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 760;
}

.panel-body {
  padding: 16px;
}

.stack {
  display: grid;
  gap: 10px;
}

.student-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.student-tabs button,
.segmented button,
.primary,
.ghost,
.danger,
.icon-btn {
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.student-tabs button.active,
.segmented button.active,
.primary {
  background: linear-gradient(135deg, var(--navy), #4f6f99);
  border-color: rgba(36, 52, 94, 0.9);
  color: white;
}

.primary {
  box-shadow: 0 8px 18px rgba(36, 52, 94, 0.12);
}

.compact-action {
  width: max-content;
  min-height: 36px;
  padding-left: 14px;
  padding-right: 14px;
}

.ghost,
.student-tabs button,
.segmented button {
  background: rgba(255, 255, 255, 0.84);
}

.ghost:disabled,
.primary:disabled,
.student-tabs button:disabled,
.segmented button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ghost:hover,
.student-tabs button:hover,
.segmented button:hover {
  border-color: var(--rose);
}

.danger {
  color: #8c2f31;
}

.danger-text {
  color: #9a4968;
}

.icon-btn {
  width: 38px;
  padding: 0;
  justify-content: center;
}

.segmented {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.item-card {
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.item-card:hover {
  border-color: rgba(170, 206, 222, 0.95);
}

.suggestion-link {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.suggestion-link:hover {
  transform: translateY(-1px);
}

.item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.button-row,
.device-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.device-actions select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  padding: 5px 8px;
  font-size: 0.8rem;
}

.suggestion-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(100px, 0.7fr) 86px auto auto;
  gap: 8px;
  align-items: end;
}

.suggestion-row input {
  min-width: 0;
}

.suggestion-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

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

.item-title {
  font-weight: 750;
}

.item-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

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

.summary-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.summary-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.05rem;
}

.wide-panel {
  grid-column: 1 / -1;
}

.planner-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}

.planner-grid {
  min-width: 820px;
  display: grid;
  grid-template-columns: 150px repeat(7, minmax(88px, 1fr));
  gap: 8px;
}

.planner-corner,
.planner-day,
.planner-student,
.planner-cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px;
}

.planner-corner,
.planner-day {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.planner-student {
  display: flex;
  align-items: center;
  font-weight: 800;
}

.planner-cell {
  min-height: 112px;
  display: grid;
  gap: 4px;
  align-content: start;
}

.planner-cell strong {
  font-size: 0.9rem;
}

.planner-cell small,
.planner-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.planner-cell.steady {
  border-color: rgba(170, 206, 222, 0.95);
  background: #f5fbfd;
}

.planner-cell.heavy {
  border-color: rgba(93, 151, 164, 0.55);
  background: #eef8f7;
}

.planner-cell.empty {
  background: #f8fafc;
  color: var(--muted);
}

.planner-cell-list {
  display: grid;
  gap: 3px;
  margin-top: 2px;
}

.planner-cell-list span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  align-items: stretch;
}

.calendar-controls {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.calendar-controls .primary {
  width: max-content;
}

.calendar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 150px 120px minmax(140px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  padding: 12px;
}

.overdue-card {
  margin: 0;
}

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

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 134px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 9px;
}

.calendar-day.today {
  border-color: #76b6c7;
  box-shadow: 0 0 0 2px rgba(118, 182, 199, 0.16);
}

.calendar-day.muted {
  background: #f6f9fb;
  border-style: dashed;
}

.calendar-date {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #edf7fb;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 7px;
  border: 0;
}

.calendar-summary,
.calendar-event,
.calendar-empty {
  border-radius: 9px;
  padding: 7px;
  font-size: 0.74rem;
}

.calendar-summary {
  background: #f7fbfd;
  margin-top: 6px;
}

.calendar-summary strong,
.calendar-summary span {
  display: block;
}

.calendar-summary span,
.calendar-empty {
  color: var(--muted);
}

.calendar-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #fff3df;
  color: #714c31;
  font-weight: 700;
  margin-bottom: 6px;
}

.birthday-event {
  background: #f7edf7;
  color: var(--navy);
}

.calendar-event span,
.calendar-event small {
  display: block;
}

.calendar-event small {
  color: rgba(113, 76, 49, 0.76);
  font-weight: 600;
  margin-top: 2px;
}

.calendar-event .icon-btn {
  width: 24px;
  height: 24px;
  min-height: 24px;
}

.tag {
  min-height: 26px;
  border-radius: 999px;
  background: #edf7fb;
  color: #3d7784;
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag.money {
  background: #fff3df;
  color: #8b6040;
}

.tag.school {
  background: #eef2fb;
  color: var(--navy);
}

.tag.alert {
  background: #fde8ef;
  color: #9a4968;
}

.tag-button {
  border: 1px solid rgba(159, 123, 181, 0.24);
  background: #f7f1fa;
  color: var(--lavender);
  cursor: pointer;
}

.purpose-area-actions {
  margin-top: 10px;
}

.growth-tag {
  color: #4f5f88;
  background: #f3f7fb;
  border-color: rgba(170, 206, 222, 0.95);
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(223, 232, 239, 0.72);
  padding-top: 10px;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--lavender);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e7eef3;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--lavender));
  width: var(--value);
}

.course-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 62px 74px 88px 38px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.course-row:last-child {
  border-bottom: 0;
}

.course-row input,
.course-row select,
.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
}

.form {
  display: grid;
  gap: 10px;
}

.form button {
  justify-self: start;
}

.setup-form button[type="submit"] {
  min-height: 40px;
  padding-inline: 16px;
}

.form .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dob-field {
  max-width: 430px;
}

.dob-selects {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1fr;
  gap: 8px;
}

.form .dob-selects select {
  min-height: 34px;
  padding-block: 6px;
}

.form textarea {
  resize: vertical;
}

.setup-layout {
  align-items: start;
}

.setup-form {
  gap: 14px;
}

.check-option {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  color: var(--ink) !important;
}

.check-option input {
  width: 16px;
  height: 16px;
  min-height: auto;
}

.choice-group {
  border: 0;
  border-radius: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  background: transparent;
}

.choice-group legend {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 760;
  padding: 0;
}

.choice-group p {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.45;
}

.choice-grid {
  display: grid;
  gap: 9px;
}

.choice-chip {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  border: 1px solid #d9e7ef;
  border-radius: 12px;
  background: white;
  color: var(--ink) !important;
  padding: 11px 12px;
  font-size: 0.92rem !important;
  box-shadow: 0 6px 16px rgba(34, 48, 84, 0.04);
}

.choice-chip input {
  width: 16px;
  height: 16px;
  min-height: auto;
  accent-color: var(--lavender);
}

.other-field {
  max-width: 320px;
}

.id-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.id-print-options {
  border-bottom: 1px solid rgba(223, 232, 239, 0.72);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.student-id-preview {
  display: grid;
  gap: 10px;
}

.student-id-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1.58 / 1;
  border: 1px solid rgba(36, 52, 94, 0.18);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(170, 206, 222, 0.24), transparent 42%),
    linear-gradient(315deg, rgba(237, 170, 189, 0.22), transparent 46%),
    #ffffff;
  box-shadow: 0 10px 24px rgba(34, 48, 84, 0.08);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.teacher-card {
  background:
    linear-gradient(135deg, rgba(243, 222, 193, 0.5), transparent 44%),
    linear-gradient(315deg, rgba(170, 206, 222, 0.3), transparent 48%),
    #ffffff;
}

.id-card-head {
  background: var(--navy);
  color: white;
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.id-card-body {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: center;
}

.id-photo {
  width: 100px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: white;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.4rem;
}

.id-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-id-card h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.student-id-card p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.id-family {
  color: var(--navy) !important;
  font-weight: 750;
}

.id-info-grid {
  margin-top: 7px;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 4px 8px;
  font-size: 0.72rem;
}

.id-info-grid span {
  color: var(--muted);
}

.id-info-grid strong {
  color: var(--ink);
  font-weight: 760;
}

.id-card-foot {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.66);
  border-top: 1px solid rgba(223, 232, 239, 0.9);
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.photo-upload {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 360px;
}

.photo-upload input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: white;
}

.pillar-modal {
  border: 1px solid rgba(223, 232, 239, 0.9);
  border-radius: 18px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.96)),
    white;
  box-shadow: 0 16px 36px rgba(34, 48, 84, 0.08);
  display: grid;
  gap: 16px;
}

.pillar-modal-head,
.pillar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pillar-dots {
  display: flex;
  gap: 6px;
}

.pillar-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d8e5ed;
}

.pillar-dots span.active {
  width: 22px;
  background: var(--lavender);
}

.pillar-dots span.done {
  background: var(--sage);
}

.form-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.hidden-pillars {
  display: none;
}

.path-card {
  border: 1px solid rgba(223, 232, 239, 0.86);
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.plan-card {
  border: 1px solid rgba(170, 206, 222, 0.72);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 251, 0.96));
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 10px 24px rgba(34, 48, 84, 0.06);
}

.plan-card.premium {
  border-color: rgba(199, 126, 178, 0.5);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(253, 246, 250, 0.96));
}

.plan-card div {
  display: grid;
  gap: 4px;
}

.plan-card strong {
  color: var(--navy);
}

.plan-card span:not(.tag) {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

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

.plan-columns ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 34, 62, 0.38);
  backdrop-filter: blur(6px);
}

.billing-dialog {
  width: min(680px, 100%);
  border: 1px solid rgba(223, 232, 239, 0.92);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  box-shadow: 0 24px 64px rgba(34, 48, 84, 0.22);
  display: grid;
  gap: 16px;
}

.billing-dialog h2 {
  margin: 0;
}

.billing-dialog p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.billing-option {
  appearance: none;
  border: 1px solid rgba(170, 206, 222, 0.78);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
  text-align: left;
  display: grid;
  gap: 8px;
  color: var(--navy);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(34, 48, 84, 0.07);
}

.billing-option.featured {
  border-color: rgba(199, 126, 178, 0.58);
  background: linear-gradient(145deg, #ffffff, #fdf6fa);
}

.billing-option strong {
  font-size: 1.18rem;
}

.billing-option span {
  color: var(--muted);
  line-height: 1.4;
}

.billing-option em {
  color: var(--teal);
  font-style: normal;
  font-weight: 800;
}

.billing-option:disabled {
  opacity: 0.72;
  cursor: wait;
}

.error {
  color: #9b2f4f;
  font-weight: 700;
}

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

.purpose-step {
  position: relative;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff, #f6fbfd);
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: center;
  text-align: center;
}

.purpose-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -11px;
  width: 12px;
  height: 2px;
  background: var(--line);
}

.purpose-step:last-child::after {
  display: none;
}

.purpose-step span {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 850;
}

.purpose-step strong {
  font-size: 0.92rem;
}

.purpose-step small {
  color: var(--muted);
}

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

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

.growth-area-card,
.mini-purpose-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  padding: 14px;
}

.growth-area-card {
  display: grid;
  gap: 12px;
}

.growth-area-card > .item-top .item-title {
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 820;
}

.child-area-card > .item-top .item-title {
  color: var(--lavender);
}

.mini-purpose-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.mini-purpose-row:hover {
  border-color: rgba(170, 206, 222, 0.95);
}

.mini-purpose-row strong,
.mini-purpose-row span {
  display: block;
}

.mini-purpose-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.mini-score {
  min-width: 48px;
  border-radius: 999px;
  background: #f3f7fb;
  color: var(--navy);
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}

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

.purpose-profile-tabs {
  margin-bottom: 0;
}

.linked-assignment-list {
  display: grid;
  gap: 6px;
}

.linked-assignment-list button,
.linked-assignment-list span {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 0.82rem;
  text-align: left;
}

.linked-assignment-list button {
  cursor: pointer;
}

.linked-assignment-list button:hover {
  border-color: rgba(170, 206, 222, 0.95);
  color: var(--navy);
}

.child-area-card {
  align-content: start;
}

.child-area-card .item-card {
  background: white;
}

.child-empty {
  padding: 12px;
}

.affirmation-card {
  min-height: 126px;
}

.affirmation-verse {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.5;
  margin: 6px 0;
}

.growth-score-questions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.score-question {
  display: grid;
  gap: 8px;
}

.score-question-text {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.score-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.score-choice {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0 !important;
}

.score-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.score-choice span {
  width: 30px;
  height: 30px;
  border: 1px solid #d9e7ef;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 760;
  box-shadow: 0 4px 12px rgba(34, 48, 84, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.score-choice input:checked + span {
  border-color: var(--lavender);
  background: var(--lavender);
  color: white;
}

.score-choice input:focus-visible + span {
  outline: 2px solid rgba(159, 123, 181, 0.45);
  outline-offset: 2px;
}

.score-skip span {
  width: auto;
  min-width: 92px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.mini-stack {
  gap: 7px;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.template-row {
  width: 100%;
  border: 1px solid rgba(223, 232, 239, 0.86);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.template-row:hover {
  border-color: var(--rose);
}

.template-row span:first-child {
  display: grid;
  gap: 2px;
}

.template-row small {
  color: var(--muted);
}

.template-category {
  display: grid;
  gap: 8px;
}

.template-category h3 {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

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

.chore-details {
  display: grid;
  gap: 8px;
}

.subtasks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subtasks span {
  border: 1px solid #dbe8ef;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.activity-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.activity-row span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #eef7fb;
  color: var(--navy);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
}

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

.activity-row small {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  margin-top: 2px;
}

.history-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(223, 232, 239, 0.82);
  border-radius: 14px;
  padding: 11px 12px;
  background: white;
}

.history-row > span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #eef7fb;
  color: var(--navy);
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  font-weight: 850;
}

.history-row p {
  margin: 2px 0 0;
  color: var(--muted);
}

.history-row time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.settings-lower {
  margin-top: 16px;
}

.sync-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(223, 232, 239, 0.86);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f5fbfd);
}

.invite-code {
  display: inline-flex;
  margin: 8px 0;
  padding: 8px 11px;
  border-radius: 999px;
  background: #eef7fb;
  color: var(--navy);
  font-weight: 850;
  letter-spacing: 0.04em;
}

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

.device-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(223, 232, 239, 0.72);
  border-radius: 12px;
  background: #ffffff;
}

.device-row div {
  display: grid;
  gap: 2px;
}

.device-row span:not(.tag) {
  color: var(--muted);
  font-size: 0.82rem;
}

.empty {
  color: var(--muted);
  border: 1px dashed #d7e5ee;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  background: #fbfdff;
}

.big-empty {
  min-height: 260px;
  border: 1px dashed #d7e5ee;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 253, 0.94)),
    white;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  padding: 28px;
}

.big-empty h3 {
  margin: 0;
  font-size: 1.25rem;
}

.big-empty p {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.print-sheet {
  display: none;
}

.id-print-grid {
  display: grid;
  grid-template-columns: repeat(2, 3.375in);
  gap: 0.15in;
  align-items: start;
}

@media (max-width: 1040px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .shell.menu-open {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    width: min(320px, calc(100vw - 34px));
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 5;
    transform: translateX(-100%);
    transition: transform 160ms ease;
    box-shadow: 24px 0 50px rgba(34, 48, 84, 0.18);
    padding: 18px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar:not(.open) .brand div,
  .sidebar:not(.open) .nav span,
  .sidebar:not(.open) .role-card,
  .sidebar:not(.open) .signout {
    display: block;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .nav button {
    justify-content: flex-start;
    padding: 0 11px;
  }

  .role-card {
    max-width: none;
  }

  .family-strip,
  .grid.two,
  .grid.three,
  .calendar-tools,
  .calendar-form,
  .suggestion-center,
  .template-grid,
  .summary-grid,
  .purpose-path-line,
  .child-growth-grid,
  .growth-area-grid {
    grid-template-columns: 1fr;
  }

  .purpose-step::after {
    display: none;
  }
}

@media (max-width: 680px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background: linear-gradient(180deg, #ffffff 0%, var(--paper) 64%, #f2f9fc 100%);
  }

  .auth-shell {
    padding: 18px 14px;
  }

  .auth-panel h1 {
    font-size: clamp(1.85rem, 11vw, 2.45rem);
    line-height: 1.05;
  }

  .sidebar {
    width: min(304px, calc(100vw - 18px));
    padding: 16px;
    overflow-y: auto;
  }

  .brand {
    margin-bottom: 18px;
  }

  .role-card {
    margin-top: 18px;
  }

  .sidebar-bottom {
    padding-top: 20px;
  }

  .topbar,
  .content,
  .band {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    position: sticky;
  }

  .title-row {
    width: 100%;
    align-items: flex-start;
  }

  .topbar h1 {
    font-size: 1.18rem;
    line-height: 1.15;
    padding-top: 5px;
  }

  .topbar p {
    font-size: 0.84rem;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

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

  .nav button {
    min-height: 44px;
  }

  .student-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .student-tabs button {
    flex: 0 0 auto;
    justify-content: center;
    white-space: nowrap;
  }

  .content {
    padding-top: 14px;
    padding-bottom: 28px;
  }

  .band {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .family-strip {
    gap: 8px;
  }

  .family-art {
    min-height: 112px;
    padding: 16px;
    border-radius: 12px;
  }

  .metric {
    padding: 12px;
    border-radius: 12px;
  }

  .metric strong {
    font-size: 1.45rem;
  }

  .grid {
    gap: 12px;
  }

  .panel,
  .item-card,
  .path-card,
  .growth-area-card,
  .mini-purpose-row {
    border-radius: 12px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 13px 14px;
  }

  .panel-head .tag,
  .panel-head .ghost,
  .panel-head .primary {
    align-self: flex-start;
  }

  .panel-body {
    padding: 12px;
  }

  .item-top,
  .check-row,
  .sync-card,
  .device-row,
  .mini-purpose-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-row,
  .device-actions,
  .form-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .button-row button,
  .device-actions button,
  .device-actions select,
  .form-actions button {
    flex: 1 1 auto;
  }

  .top-actions > .ghost,
  .calendar-controls .primary,
  .compact-action {
    width: auto;
  }

  .course-row {
    grid-template-columns: 1fr;
  }

  .suggestion-row {
    grid-template-columns: 1fr;
  }

  .calendar-tools {
    gap: 8px;
  }

  .calendar-controls {
    padding: 10px;
  }

  .calendar-controls .primary {
    width: max-content;
    min-height: 36px;
    padding: 0 13px;
  }

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

  .calendar-filters .check-option {
    font-size: 0.82rem !important;
    gap: 7px !important;
  }

  .calendar-filters .check-option input {
    width: 15px;
    height: 15px;
  }

  .calendar-weekdays {
    display: grid;
    gap: 4px;
  }

  .calendar-weekdays span {
    font-size: 0.62rem;
  }

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

  .calendar-day {
    min-height: 58px;
    border-radius: 9px;
    padding: 4px;
  }

  .calendar-date {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
    font-size: 0.78rem;
  }

  .calendar-summary,
  .calendar-event,
  .calendar-empty {
    border-radius: 6px;
    padding: 3px 4px;
    font-size: 0.56rem;
    line-height: 1.15;
    margin-top: 3px;
    overflow: hidden;
  }

  .calendar-summary strong {
    display: none;
  }

  .calendar-summary span,
  .calendar-event span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-event {
    gap: 3px;
    margin-bottom: 3px;
  }

  .calendar-event small,
  .calendar-event .icon-btn {
    display: none;
  }

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

  .dob-field {
    max-width: none;
  }

  .dob-selects {
    grid-template-columns: 1fr 0.75fr 1fr;
    gap: 6px;
  }

  .choice-chip {
    padding: 10px;
  }

  .score-options {
    gap: 5px;
  }

  .score-choice span {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }

  .score-skip span {
    min-width: 86px;
  }

  .student-id-card {
    max-width: 100%;
  }

  .id-card-body {
    grid-template-columns: 74px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .id-photo {
    width: 74px;
  }

  .student-id-card h3 {
    font-size: 1rem;
  }

  .id-info-grid {
    grid-template-columns: 56px 1fr;
    font-size: 0.68rem;
  }

  .history-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .history-row time {
    grid-column: 2;
    white-space: normal;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .big-empty {
    min-height: 210px;
    padding: 22px 16px;
  }
}

@page {
  size: letter;
  margin: 0.25in;
}

@media print {
  html,
  body {
    width: auto;
    min-height: 0;
    margin: 0;
    background: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #app > .shell {
    display: none !important;
  }

  .print-sheet {
    display: block !important;
    position: static;
    inset: auto;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: white !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-sheet * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-sheet h1 {
    margin: 0 0 0.12in;
    font-size: 18pt;
  }

  .print-sheet p {
    margin: 0 0 0.18in;
  }

  .id-print-sheet > h1,
  .id-print-sheet > p {
    display: none;
  }

  .id-print-grid {
    grid-template-columns: repeat(2, 3.375in);
    gap: 0.15in;
  }

  .id-print-sheet .student-id-card {
    max-width: none;
    width: 3.375in;
    height: 2.125in;
    border-radius: 0.08in;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
  }

  .id-print-sheet .id-card-head {
    padding: 0.08in 0.11in;
    font-size: 7.5pt;
  }

  .id-print-sheet .id-card-body {
    grid-template-columns: 0.82in 1fr;
    gap: 0.11in;
    padding: 0.1in 0.12in;
  }

  .id-print-sheet .id-photo {
    width: 0.82in;
  }

  .id-print-sheet .student-id-card h3 {
    margin-bottom: 0.03in;
    font-size: 12pt;
  }

  .id-print-sheet .student-id-card p {
    margin: 0.01in 0;
    font-size: 7.5pt;
  }

  .id-print-sheet .id-info-grid {
    grid-template-columns: 0.62in 1fr;
    gap: 0.02in 0.06in;
    font-size: 6.8pt;
  }

  .id-print-sheet .id-card-foot {
    padding: 0.05in 0.1in;
    font-size: 6.8pt;
  }
}

@media screen {
/* PurposePath reel-inspired visual refresh */
:root {
  --ink: #223054;
  --muted: #667891;
  --line: #d9edf6;
  --paper: #f7fbfd;
  --panel: #ffffff;
  --sage: #5faabd;
  --sage-dark: #4f98a5;
  --clay: #edaabd;
  --gold: #fff3df;
  --blue: #e8f6fb;
  --rose: #edaabd;
  --lavender: #c77eb2;
  --navy: #223054;
  --soft: #f4fafc;
  --shadow: 0 20px 48px rgba(34, 48, 84, 0.08);
}

body {
  background:
    linear-gradient(135deg, rgba(247, 251, 253, 0.98) 0%, rgba(255, 250, 244, 0.9) 58%, rgba(242, 248, 252, 0.98) 100%);
  color: var(--ink);
}

.topbar {
  min-height: 80px;
  border-bottom: 1px solid rgba(217, 237, 246, 0.9);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 24px rgba(34, 48, 84, 0.035);
}

.topbar h1,
.auth-panel h1,
.family-art h2 {
  color: var(--navy);
  letter-spacing: 0;
}

.content {
  padding: 30px 34px 48px;
}

.band {
  background: transparent;
  border-bottom: 0;
  padding: 24px 34px 4px;
}

.family-art {
  min-height: 164px;
  border: 1px solid rgba(217, 237, 246, 0.95);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(232, 246, 251, 0.94), rgba(255, 243, 223, 0.68)),
    #ffffff;
  box-shadow: var(--shadow);
}

.metric,
.panel,
.item-card,
.calendar-controls,
.calendar-form,
.summary-grid div,
.planner-corner,
.planner-day,
.planner-student,
.planner-cell,
.hub-profile-card,
.hub-verse,
.hub-unlock,
.auth-card,
.growth-area-card,
.path-card,
.mini-purpose-row,
.student-id-card {
  border-color: rgba(217, 237, 246, 0.98);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(34, 48, 84, 0.055);
}

.panel,
.item-card,
.metric,
.calendar-controls,
.calendar-form,
.growth-area-card,
.path-card,
.mini-purpose-row {
  border-radius: 26px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  padding: 22px 26px 16px;
  border-bottom: 1px solid rgba(217, 237, 246, 0.9);
}

.panel-head h2,
.panel-head h3 {
  color: var(--navy);
  font-size: clamp(1.08rem, 1.3vw, 1.35rem);
  font-weight: 820;
}

.panel-body {
  padding: 22px 26px 26px;
}

.grid {
  gap: 20px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

.primary,
.student-tabs button.active,
.segmented button.active {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 12px 24px rgba(34, 48, 84, 0.13);
}

.ghost,
.student-tabs button,
.segmented button,
.icon-btn,
.auth-choice {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(217, 237, 246, 0.98);
  color: var(--navy);
}

.ghost:hover,
.student-tabs button:hover,
.segmented button:hover,
.auth-choice:hover {
  border-color: rgba(95, 170, 189, 0.62);
  background: #f7fcfe;
}

.auth-choice.active {
  background: var(--navy);
  border-color: var(--navy);
}

.tag {
  background: #e8f6fb;
  color: #4f98a5;
}

.tag.money {
  background: #fff3df;
  color: #8b6040;
}

.tag.school {
  background: #eef2fb;
  color: var(--navy);
}

.tag.alert {
  background: #fff3df;
  color: #8b6040;
}

.tag-button,
.growth-tag {
  background: #f7fbfd;
  color: var(--navy);
  border-color: rgba(217, 237, 246, 0.98);
}

.item-card {
  padding: 18px;
  gap: 12px;
}

.item-card:hover {
  border-color: rgba(95, 170, 189, 0.65);
  transform: translateY(-1px);
}

.summary-grid div,
.planner-corner,
.planner-day,
.planner-student,
.planner-cell,
.calendar-day {
  background: #fbfdff;
}

.summary-grid strong,
.metric strong,
.item-title {
  color: var(--navy);
}

.calendar-tools {
  gap: 16px;
}

.calendar-controls,
.calendar-form {
  padding: 16px;
}

.calendar-weekdays,
.calendar-grid {
  gap: 12px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0;
}

.calendar-day {
  min-height: 142px;
  border-color: rgba(217, 237, 246, 0.98);
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(34, 48, 84, 0.035);
}

.calendar-day.today {
  border-color: rgba(95, 170, 189, 0.8);
  box-shadow: 0 0 0 3px rgba(95, 170, 189, 0.16), 0 10px 22px rgba(34, 48, 84, 0.045);
}

.calendar-date {
  width: 34px;
  height: 34px;
  background: #e8f6fb;
  color: var(--navy);
}

.calendar-summary {
  background: #f7fbfd;
}

.calendar-event {
  background: #fff3df;
  color: var(--navy);
}

.calendar-empty {
  background: transparent;
}

.form input,
.form select,
.form textarea,
.course-row input,
.course-row select,
.device-actions select {
  border-color: rgba(217, 237, 246, 0.98);
  border-radius: 16px;
  background: #fbfdff;
}

.choice-chip,
.check-option,
.score-choice span,
.score-skip span {
  border-color: rgba(217, 237, 246, 0.98);
  background: #ffffff;
}

.choice-chip {
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(34, 48, 84, 0.04);
}

.avatar {
  background: #5faabd;
  border-radius: 18px;
}

.progress {
  background: #e8f1f6;
}

.progress span {
  background: linear-gradient(90deg, #5faabd, #edaabd, #c77eb2);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(34, 48, 84, 0.98), rgba(34, 48, 84, 0.95)),
    var(--navy);
}

.nav button {
  border-radius: 999px;
}

.nav button.active,
.nav button:hover {
  background: rgba(232, 246, 251, 0.14);
}

.auth-shell,
.family-hub-shell {
  background:
    linear-gradient(135deg, rgba(247, 251, 253, 0.98), rgba(255, 250, 244, 0.9), rgba(242, 248, 252, 0.98));
}

.auth-logo {
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.area-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--area-color, var(--sage));
  box-shadow: 0 0 0 5px rgba(95, 170, 189, 0.14);
  display: inline-block;
  flex: 0 0 16px;
}

.color-bullet-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.suggestion-link.color-bullet-card {
  text-align: left;
  min-height: 92px;
}

.suggestion-link .item-title {
  font-size: 1rem;
}

.suggestion-link .item-meta {
  margin-top: 3px;
}

.score-path-line {
  align-items: center;
  gap: 0;
  padding: 8px 4px 2px;
}

.score-path-node {
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  min-height: 150px;
  padding: 10px 6px;
  position: relative;
  transition: transform 160ms ease;
}

.score-path-node::after {
  top: 56px;
  right: -50%;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #aacede;
  z-index: 0;
}

.score-path-node:hover {
  transform: translateY(-2px);
}

.score-path-node span {
  width: 86px;
  height: 86px;
  border: 0;
  background: var(--area-color);
  color: #ffffff;
  font-size: 2rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 14px 24px rgba(34, 48, 84, 0.12);
}

.score-path-node strong {
  color: var(--navy);
  font-size: 0.98rem;
  line-height: 1.15;
}

.score-path-node small {
  color: var(--muted);
  font-size: 0.75rem;
}

.growth-connect-card {
  padding: 26px;
  gap: 18px;
}

.verse-only-card {
  min-height: 124px;
  align-content: center;
  background: #ffffff;
}

.verse-only-card .affirmation-verse {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.58;
}

.connect-list {
  display: grid;
  gap: 11px;
}

.connect-row {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #fbfdff;
  color: var(--navy);
  display: grid;
  grid-template-columns: auto minmax(120px, 0.8fr) minmax(140px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  text-align: left;
}

.connect-row:hover {
  background: #f4fafc;
}

.connect-row strong {
  color: var(--area-color);
}

.connect-row span:not(.area-dot),
.connect-row small {
  color: var(--muted);
}

.growth-area-card {
  border-color: rgba(217, 237, 246, 0.98);
}

.growth-area-card > .item-top .item-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.child-area-card > .item-top .item-title {
  color: var(--navy);
}

.score-pill {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--area-color, var(--sage));
  color: #ffffff;
  padding: 0 14px;
  font-weight: 850;
  box-shadow: 0 10px 18px rgba(34, 48, 84, 0.1);
}

.score-pill:hover {
  transform: translateY(-1px);
}

.linked-assignment-list button {
  border-color: rgba(217, 237, 246, 0.98);
}

.mini-purpose-row.color-bullet-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.mini-score {
  background: var(--area-color, #f3f7fb);
  color: #ffffff;
}

@media (max-width: 1040px) {
  .content {
    padding: 22px 20px 38px;
  }

  .band {
    padding: 18px 20px 4px;
  }

  .grid.two,
  .grid.three,
  .calendar-tools,
  .calendar-form,
  .summary-grid,
  .growth-area-grid,
  .child-growth-grid,
  .plan-columns,
  .suggestion-center,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .course-row {
    grid-template-columns: minmax(0, 1fr) 90px 62px 74px 88px 38px;
  }

  .score-path-line {
    grid-template-columns: repeat(5, minmax(108px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .connect-row {
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 22px;
  }

  .connect-row small {
    grid-column: 2;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 68px;
    padding: 10px 14px;
  }

  .shell,
  .content,
  .band,
  .panel,
  .path-card,
  .item-card,
  .growth-area-card,
  .calendar-tools,
  .calendar-controls,
  .calendar-form,
  .form,
  .table,
  .student-id-card {
    min-width: 0;
    max-width: 100%;
  }

  .content {
    padding: 14px 12px 32px;
  }

  .band {
    padding: 12px 12px 2px;
  }

  .family-art,
  .panel,
  .item-card,
  .metric,
  .calendar-controls,
  .calendar-form,
  .growth-area-card,
  .path-card,
  .mini-purpose-row {
    border-radius: 22px;
  }

  .panel-head {
    padding: 16px;
  }

  .panel-head,
  .item-top,
  .top-actions,
  .button-row,
  .device-actions,
  .form-actions,
  .calendar-filters,
  .tags {
    min-width: 0;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .top-actions > *,
  .button-row button,
  .device-actions button,
  .device-actions select,
  .form-actions button {
    max-width: 100%;
  }

  .panel-body {
    padding: 14px;
  }

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

  .summary-grid.child-balance,
  .plan-columns,
  .suggestion-center,
  .template-grid,
  .growth-area-grid,
  .child-growth-grid {
    grid-template-columns: 1fr;
  }

  .connect-row {
    padding: 11px 12px;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 6px;
  }

  .calendar-day {
    min-height: 64px;
    border-radius: 14px;
    padding: 5px;
    box-shadow: none;
  }

  .calendar-date {
    width: 25px;
    height: 25px;
  }

  .calendar-controls {
    padding: 12px;
  }

  .calendar-controls .primary {
    width: max-content;
    max-width: 100%;
    min-height: 36px;
    padding: 0 13px;
  }

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

  .calendar-filters .check-option {
    font-size: 0.82rem;
    gap: 7px;
  }

  .calendar-filters .check-option input {
    width: 15px;
    height: 15px;
  }

  .course-row,
  .suggestion-row,
  .form .split {
    grid-template-columns: 1fr;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .score-path-node {
    min-height: 130px;
  }

  .score-path-node::after {
    top: 48px;
  }

  .score-path-node span {
    width: 72px;
    height: 72px;
    font-size: 1.55rem;
  }

  .growth-connect-card {
    padding: 18px;
  }

  .color-bullet-card,
  .mini-purpose-row.color-bullet-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .color-bullet-card .mini-score {
    grid-column: 2;
    width: max-content;
  }

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

  .student-id-card {
    aspect-ratio: auto;
  }
}

@media (max-width: 640px) {
  .billing-options {
    grid-template-columns: 1fr;
  }

.billing-dialog {
    padding: 14px;
  }
}
}
