:root {
  --ink: #24454d;
  --ink-soft: #587178;
  --paper: #fffaf6;
  --white: #ffffff;
  --cream: #fff1d2;
  --mint: #9fdecf;
  --mint-deep: #53b9a5;
  --peach: #ffc6a8;
  --coral: #ff8f84;
  --pink: #f7b7cb;
  --lavender: #c7c2f5;
  --periwinkle: #aebff3;
  --yellow: #ffd873;
  --line: #e8e2dc;
  --shadow: 0 18px 50px rgba(50, 72, 76, 0.11);
  --shadow-small: 0 8px 24px rgba(50, 72, 76, 0.09);
  --radius: 24px;
  --radius-small: 15px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-rounded, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand b {
  color: #9b4e48;
}

.brand__mark {
  position: relative;
  display: inline-flex;
  align-items: end;
  justify-content: center;
  width: 43px;
  height: 43px;
  padding: 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 14px 14px 17px 17px;
  transform: rotate(-2deg);
}

.brand__mark i {
  display: block;
  width: 8px;
  height: 18px;
  margin: 0 1px;
  background: var(--coral);
  border-radius: 8px 8px 3px 3px;
  transform-origin: bottom;
}

.brand__mark i:first-child {
  height: 13px;
  transform: rotate(-18deg);
}

.brand__mark i:last-child {
  height: 14px;
  transform: rotate(18deg);
}

.brand--small {
  color: var(--ink);
  font-size: 17px;
}

.brand--small b {
  color: #d96c61;
}

.brand--small .brand__mark {
  width: 36px;
  height: 36px;
  border-color: var(--mint-deep);
}

.brand--small .brand__mark i {
  background: var(--mint-deep);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.98fr) minmax(500px, 1.02fr);
  min-height: 100vh;
  background: var(--paper);
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 44px clamp(40px, 6vw, 86px) 34px;
  overflow: hidden;
  color: var(--ink);
  background: var(--mint);
}

.auth-visual::before,
.auth-visual::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  opacity: 0.95;
}

.auth-visual::before {
  top: -110px;
  right: -85px;
  width: 290px;
  height: 290px;
  background: var(--yellow);
}

.auth-visual::after {
  bottom: -150px;
  left: -100px;
  width: 330px;
  height: 330px;
  background: var(--pink);
}

.auth-visual__copy {
  position: relative;
  z-index: 2;
  max-width: 570px;
  margin: clamp(68px, 10vh, 120px) auto 28px;
}

.auth-visual h1 {
  max-width: 560px;
  margin: 15px 0 20px;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.auth-visual__copy p {
  max-width: 520px;
  margin: 0;
  color: #3b5c62;
  font-size: 18px;
  line-height: 1.65;
}

.auth-visual__foot {
  position: relative;
  z-index: 2;
  margin: auto 0 0;
  color: #3b5c62;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.family-card {
  position: relative;
  z-index: 1;
  width: min(520px, 88%);
  height: 218px;
  margin: 18px auto 36px;
  overflow: hidden;
  background: var(--cream);
  border: 8px solid rgba(255, 255, 255, 0.5);
  border-radius: 42px 42px 70px 70px;
  box-shadow: 0 22px 0 rgba(24, 93, 82, 0.18);
  transform: rotate(1.5deg);
}

.family-card__sun {
  position: absolute;
  top: 26px;
  right: 50px;
  width: 58px;
  height: 58px;
  background: var(--yellow);
  border-radius: 50%;
}

.family-card__cloud {
  position: absolute;
  width: 80px;
  height: 30px;
  background: var(--white);
  border-radius: 40px;
}

.family-card__cloud::before,
.family-card__cloud::after {
  position: absolute;
  bottom: 0;
  content: "";
  background: var(--white);
  border-radius: 50%;
}

.family-card__cloud::before {
  left: 13px;
  width: 38px;
  height: 38px;
}

.family-card__cloud::after {
  right: 11px;
  width: 28px;
  height: 28px;
}

.cloud-one {
  top: 46px;
  left: 38px;
}

.cloud-two {
  top: 90px;
  right: 128px;
  transform: scale(0.7);
}

.family-card__hill {
  position: absolute;
  bottom: -80px;
  width: 340px;
  height: 190px;
  border-radius: 50% 50% 0 0;
}

.hill-one {
  left: -80px;
  background: var(--mint);
}

.hill-two {
  right: -110px;
  background: var(--periwinkle);
}

.family-card__people {
  position: absolute;
  right: 50%;
  bottom: 24px;
  display: flex;
  align-items: end;
  gap: 13px;
  transform: translateX(50%);
}

.family-card__people span {
  position: relative;
  display: block;
  width: 42px;
  height: 62px;
  background: var(--coral);
  border-radius: 24px 24px 13px 13px;
}

.family-card__people span::before {
  position: absolute;
  top: -30px;
  left: 7px;
  width: 29px;
  height: 29px;
  content: "";
  background: #96644f;
  border-radius: 50%;
}

.family-card__people span:nth-child(2) {
  width: 50px;
  height: 86px;
  background: var(--lavender);
}

.family-card__people span:nth-child(2)::before {
  left: 8px;
  width: 34px;
  height: 34px;
}

.family-card__people span:nth-child(3) {
  height: 70px;
  background: var(--yellow);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 54px clamp(34px, 7vw, 100px);
  background: var(--paper);
}

.auth-panel--scroll {
  align-items: flex-start;
  overflow-y: auto;
}

.auth-panel__inner {
  width: min(440px, 100%);
}

.auth-panel__inner--wide {
  width: min(620px, 100%);
}

.auth-panel h2 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.eyebrow {
  margin: 0;
  color: #d46961;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.eyebrow--light {
  color: #894943;
}

.muted {
  color: var(--ink-soft);
  line-height: 1.6;
}

.test-badge,
.step-pill {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 6px 11px;
  color: #695118;
  background: var(--yellow);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.test-badge--panel {
  margin-bottom: 20px;
}

.step-pill {
  color: #44528d;
  background: var(--lavender);
}

.form-stack {
  display: grid;
  gap: 19px;
  margin-top: 30px;
}

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

.child-fields {
  display: grid;
  gap: 18px;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

label small {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.45;
}

.field-help {
  margin-top: -2px;
}

input[aria-invalid="true"] {
  border-color: #d75752;
  box-shadow: 0 0 0 3px rgba(215, 87, 82, 0.13);
}

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 4px rgba(83, 185, 165, 0.17);
}

textarea {
  min-height: 88px;
  padding: 13px 16px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 70px;
}

.reveal {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 7px 10px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 47px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.button--primary {
  color: var(--ink);
  background: var(--coral);
  box-shadow: 0 10px 20px rgba(234, 104, 94, 0.23);
}

.button--primary:hover {
  box-shadow: 0 14px 27px rgba(234, 104, 94, 0.29);
}

.button--ghost {
  color: var(--ink);
  background: var(--cream);
}

.button--danger {
  color: #793c4c;
  background: var(--pink);
}

.button--wide {
  width: 100%;
}

.button--small {
  min-height: 37px;
  padding: 0 14px;
  font-size: 12px;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #bc433b;
  font-size: 12px;
  font-weight: 750;
}

.text-link {
  display: block;
  margin: 19px auto 0;
  color: #bc5c56;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.support-note {
  margin: 36px 0 0;
  color: #809297;
  font-size: 11px;
  text-align: center;
}

.demo-access {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.role-card {
  display: grid;
  grid-template-columns: 55px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 88px;
  padding: 14px 18px;
  color: var(--ink);
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow-small);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.role-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px) rotate(-0.3deg);
}

.role-card--super {
  background: var(--lavender);
}

.role-card--admin {
  background: var(--mint);
}

.role-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--ink);
  background: var(--coral);
  border-radius: 17px;
  font-size: 23px;
}

.role-card--admin .role-card__icon {
  background: var(--mint-deep);
}

.role-card span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.role-card b {
  font-size: 15px;
}

.role-card small {
  color: #53666d;
  font-size: 11px;
  font-weight: 650;
}

.role-card i {
  font-size: 22px;
  font-style: normal;
}

.demo-notice {
  margin: 9px 0 0;
  padding: 13px 15px;
  color: #715719;
  background: var(--cream);
  border-radius: 13px;
  font-size: 11px;
  line-height: 1.5;
}

.demo-box {
  padding: 17px;
  background: var(--cream);
  border: 0;
  border-radius: 18px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-row input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--mint-deep);
}

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

#demoFields {
  margin-top: 14px;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 70px;
  padding: 0 26px;
  background: rgba(255, 250, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar .button {
  justify-self: end;
}

.app-shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: 100vh;
  padding-top: 70px;
  background: var(--paper);
}

.sidebar {
  position: fixed;
  top: 70px;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 245px;
  padding: 28px 16px 20px;
  background: var(--white);
  border-right: 1px solid var(--line);
}

.sidebar__label {
  margin: 0 13px 12px;
  color: #96a5a8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.nav-link {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  min-height: 47px;
  padding: 0 13px;
  color: #5b7075;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.nav-link span {
  color: var(--mint-deep);
  font-size: 17px;
}

.nav-link.active {
  color: var(--ink);
  background: var(--mint);
}

.nav-link.active span {
  color: #266f63;
}

.nav-link small {
  color: #8d88bb;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.nav-link.disabled {
  cursor: default;
  opacity: 0.75;
}

.sidebar__help {
  margin-top: auto;
  padding: 16px;
  background: var(--pink);
  border-radius: 18px;
}

.sidebar__help b {
  font-size: 12px;
}

.sidebar__help p {
  margin: 6px 0 0;
  color: #74515d;
  font-size: 10px;
  line-height: 1.5;
}

.dashboard {
  grid-column: 2;
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 44px clamp(25px, 4vw, 58px) 70px;
}

.dashboard__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.dashboard__heading h1 {
  margin: 7px 0 6px;
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.dashboard__heading p:last-child {
  margin: 0;
}

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

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

.metric-card,
.skeleton-card {
  min-height: 142px;
  padding: 21px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.metric-card:nth-child(4n + 1) {
  background: var(--mint);
}

.metric-card:nth-child(4n + 2) {
  background: var(--peach);
}

.metric-card:nth-child(4n + 3) {
  background: var(--lavender);
}

.metric-card:nth-child(4n + 4) {
  background: var(--yellow);
}

.metric-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 13px;
}

.metric-card small {
  color: #4e666c;
  font-weight: 750;
}

.metric-card strong {
  display: block;
  margin-top: 18px;
  font-size: 31px;
  letter-spacing: -0.04em;
}

.metric-card p {
  margin: 1px 0 0;
  color: #50686e;
  font-size: 11px;
}

.skeleton-card {
  background: linear-gradient(100deg, #f1ece7 25%, #fbf7f3 45%, #f1ece7 65%);
  background-size: 300% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.content-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.content-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
}

.content-card__head h2 {
  margin: 0;
  font-size: 20px;
}

.content-card__head p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.counter {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--cream);
  border-radius: 12px;
  font-weight: 900;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 15px 20px;
  border-bottom: 1px solid #eee9e5;
  font-size: 12px;
  white-space: nowrap;
}

th {
  color: #819095;
  background: #fffdfb;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.institution-name {
  display: flex;
  align-items: center;
  gap: 11px;
}

.institution-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--pink);
  border-radius: 13px;
  font-weight: 900;
}

.institution-name div {
  display: grid;
  gap: 2px;
}

.institution-name small {
  color: #839397;
}

.status-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}

.status-pill--trial {
  color: #695118;
  background: var(--yellow);
}

.status-pill--active {
  color: #22695c;
  background: var(--mint);
}

.status-pill--suspended {
  color: #8a4340;
  background: var(--pink);
}

.table-action {
  padding: 7px 10px;
  color: var(--ink);
  background: var(--cream);
  border: 0;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.empty-cell {
  height: 150px;
  color: #809095;
  text-align: center;
}

.modal {
  width: min(690px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(30, 55, 61, 0.3);
}

.modal::backdrop {
  background: rgba(31, 58, 64, 0.55);
  backdrop-filter: blur(5px);
}

.modal--compact {
  width: min(470px, calc(100% - 28px));
}

.modal__body {
  padding: 27px;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.modal__head h2,
.modal h2 {
  margin: 5px 0 0;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: var(--pink);
  border: 0;
  border-radius: 12px;
  font-size: 23px;
  cursor: pointer;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.recovery-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0;
  padding: 17px;
  background: var(--yellow);
  border-radius: 16px;
}

.recovery-card code {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 850;
}

.enrollment-dashboard {
  max-width: 1320px;
}

.document-ready-card {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
  padding: 18px 20px;
  background: var(--mint);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.document-ready-card__mark {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding-bottom: 10px;
  border: 3px solid var(--ink);
  border-radius: 15px;
}

.document-ready-card__mark i {
  display: block;
  width: 5px;
  background: var(--coral);
  border-radius: 5px;
  transform-origin: bottom;
}

.document-ready-card__mark i:nth-child(1) { height: 12px; transform: rotate(-12deg); }
.document-ready-card__mark i:nth-child(2) { height: 20px; }
.document-ready-card__mark i:nth-child(3) { height: 12px; transform: rotate(12deg); }

.document-ready-card div {
  min-width: 0;
}

.document-ready-card b {
  font-size: 14px;
}

.document-ready-card p {
  margin: 3px 0 0;
  color: #43635f;
  font-size: 11px;
  line-height: 1.45;
}

.document-ready-card__tag {
  margin-left: auto;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.enrollment-list-head {
  gap: 20px;
}

.enrollment-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.enrollment-filters select {
  width: auto;
  min-height: 43px;
  font-size: 11px;
}

.search-field {
  position: relative;
  display: block;
}

.search-field span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  color: var(--ink-soft);
  font-size: 19px;
  transform: translateY(-50%);
}

.search-field input {
  width: min(240px, 30vw);
  min-height: 43px;
  padding-left: 38px;
  font-size: 11px;
}

.enrollment-list {
  display: grid;
}

.enrollment-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(190px, 0.8fr) minmax(260px, auto);
  align-items: center;
  gap: 18px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
}

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

.enrollment-row__person,
.enrollment-row__meta,
.enrollment-row__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.enrollment-row__person > span {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  background: var(--peach);
  border-radius: 14px;
  font-weight: 900;
}

.enrollment-row__person div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.enrollment-row__person b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enrollment-row__person small,
.enrollment-row__meta small {
  color: var(--ink-soft);
  font-size: 10px;
}

.enrollment-row__meta {
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
}

.enrollment-row__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.enrollment-row__actions a {
  text-decoration: none;
}

.table-action--approve {
  background: var(--mint);
}

.status-pill--draft {
  color: #695118;
  background: var(--cream);
}

.status-pill--pending {
  color: #44528d;
  background: var(--lavender);
}

.status-pill--needs_changes {
  color: #8a4340;
  background: var(--pink);
}

.status-pill--approved {
  color: #22695c;
  background: var(--mint);
}

.status-pill--inactive {
  color: #53666d;
  background: #e8eeed;
}

.empty-state {
  display: grid;
  justify-items: center;
  min-height: 260px;
  padding: 42px 20px;
  place-content: center;
  text-align: center;
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  background: var(--lavender);
  border-radius: 19px;
  font-size: 25px;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  margin: 6px 0 17px;
  color: var(--ink-soft);
  font-size: 12px;
}

.button--soft {
  color: var(--ink);
  background: var(--mint);
}

.modal--enrollment {
  width: min(980px, calc(100% - 28px));
  max-height: min(900px, calc(100dvh - 28px));
  overflow: hidden;
}

.enrollment-form {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  max-height: min(900px, calc(100dvh - 28px));
}

.enrollment-form__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 15px;
}

.enrollment-form__head h2 {
  margin: 4px 0 3px;
}

.enrollment-form__head p:last-child {
  margin: 0;
  font-size: 11px;
}

.wizard-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 28px 13px;
}

.wizard-progress > div {
  height: 8px;
  overflow: hidden;
  background: #ece8e3;
  border-radius: 999px;
}

.wizard-progress > div span {
  display: block;
  width: 16.667%;
  height: 100%;
  background: var(--mint-deep);
  border-radius: inherit;
  transition: width 180ms ease;
}

.wizard-progress p {
  display: grid;
  min-width: 105px;
  margin: 0;
  text-align: right;
}

.wizard-progress b {
  font-size: 11px;
}

.wizard-progress small {
  color: var(--ink-soft);
  font-size: 9px;
}

.wizard-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 11px 28px;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wizard-dots button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--ink-soft);
  background: #f1eeea;
  border: 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.wizard-dots button.active {
  color: var(--ink);
  background: var(--coral);
}

.wizard-dots button.complete {
  color: var(--ink);
  background: var(--mint);
}

.wizard-body {
  overflow-y: auto;
  padding: 22px 28px 30px;
  background: var(--paper);
  overscroll-behavior: contain;
}

.demo-form-warning {
  margin: 0 0 18px;
  padding: 11px 14px;
  color: #715719;
  background: var(--cream);
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
}

.wizard-step {
  display: grid;
  gap: 18px;
}

.wizard-step[hidden] {
  display: none;
}

.wizard-step__title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 2px;
}

.wizard-step__title > span {
  display: grid;
  place-items: center;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  background: var(--lavender);
  border-radius: 14px;
  font-size: 11px;
  font-weight: 900;
}

.wizard-step__title h3 {
  margin: 0;
  font-size: 20px;
}

.wizard-step__title p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.field-card {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.field-card legend {
  padding: 0 7px;
  font-size: 12px;
  font-weight: 900;
}

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

.child-photo-card {
  gap: 16px;
  overflow: hidden;
  background: var(--white);
  border-color: #d8d2f2;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.child-photo-card.has-error {
  border-color: #d75752;
  box-shadow: 0 0 0 4px rgba(215, 87, 82, 0.12);
}

.child-photo-card__intro {
  display: grid;
  gap: 5px;
}

.child-photo-card__intro b,
.child-photo-card__intro p {
  margin: 0;
}

.child-photo-card__intro p,
.child-photo-note {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.5;
}

.photo-question {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

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

.photo-consent-options label,
.photo-consent-choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.photo-consent-options input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  opacity: 0;
  border: 0;
}

.photo-consent-options input[type="radio"] + span,
.photo-consent-choice > span {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.photo-consent-options input[type="radio"]:checked + span {
  background: var(--mint);
  border-color: var(--mint-deep);
}

.photo-consent-options input[type="radio"]:focus-visible + span {
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 4px rgba(83, 185, 165, 0.2);
}

.photo-consent-options input[type="radio"]:disabled + span {
  cursor: default;
  opacity: 0.68;
}

.photo-upload-panel,
#photoUploadPanel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--lavender);
  border-radius: 17px;
}

.photo-upload-panel.has-photo,
#photoUploadPanel.has-photo {
  grid-template-columns: minmax(0, 1fr) 156px;
}

.photo-upload-panel[hidden],
#photoUploadPanel[hidden],
.photo-preview[hidden],
#photoPreview[hidden] {
  display: none;
}

.photo-upload-copy {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.photo-upload-copy > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.photo-upload-actions,
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.photo-upload-actions label.button {
  cursor: pointer;
}

.photo-preview,
#photoPreview {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin: 0;
}

.photo-preview img,
#photoPreviewImage {
  display: block;
  width: 140px;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  color: transparent;
  background: var(--white);
  border: 3px solid var(--mint-deep);
  border-radius: 18px;
  box-shadow: var(--shadow-small);
}

.photo-status,
#photoStatus {
  grid-column: 1 / -1;
  min-height: 17px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.photo-status.is-error,
#photoStatus.is-error {
  color: #bc433b;
}

.photo-review-summary {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  background: var(--paper);
  border-radius: 12px;
}

.photo-review-summary img,
.photo-review-summary__placeholder {
  display: grid;
  place-items: center;
  width: 48px;
  height: 62px;
  object-fit: cover;
  background: var(--lavender);
  border: 2px solid var(--mint-deep);
  border-radius: 11px;
}

.photo-review-summary__placeholder {
  color: var(--ink-soft);
  font-size: 22px;
  font-weight: 900;
}

.photo-review-summary small,
.photo-review-summary b,
.photo-review-summary p {
  display: block;
  min-width: 0;
}

.photo-review-summary small {
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.photo-review-summary b {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.photo-review-summary p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.4;
}

.time-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice-row label {
  display: block;
  cursor: pointer;
}

.choice-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-row span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink-soft);
  background: #f2efeb;
  border: 2px solid transparent;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 900;
}

.choice-row input:checked + span {
  color: var(--ink);
  background: var(--mint);
  border-color: var(--mint-deep);
}

.health-question {
  display: grid;
  grid-template-columns: minmax(210px, 0.55fr) minmax(260px, 1fr);
  align-items: start;
  gap: 15px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.conditional-field[hidden] {
  display: none;
}

.authorized-list {
  display: grid;
  gap: 13px;
}

.authorized-person {
  padding: 17px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.authorized-person__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.authorized-person__head button {
  width: 30px;
  height: 30px;
  color: #8a4340;
  background: var(--pink);
  border: 0;
  border-radius: 9px;
  font-size: 18px;
  cursor: pointer;
}

.document-checklist,
.consent-list {
  margin-top: 5px;
}

.document-checklist .check-row,
.consent-list .check-row {
  grid-template-columns: 22px 1fr;
  align-items: start;
  padding: 11px 12px;
  background: var(--paper);
  border-radius: 12px;
}

.document-checklist input,
.consent-list input {
  min-height: 20px;
}

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

.review-grid article {
  min-width: 0;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.review-grid small,
.review-grid b,
.review-grid p {
  display: block;
}

.review-grid small {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.review-grid b {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.review-grid p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.4;
}

.signature-field {
  padding: 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.signature-field > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
}

.signature-field button {
  padding: 6px 9px;
  color: var(--ink);
  background: var(--cream);
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.signature-field canvas {
  display: block;
  width: 100%;
  height: 150px;
  background: #fffdfb;
  border: 2px dashed #c9c3bd;
  border-radius: 12px;
  cursor: crosshair;
  touch-action: none;
}

.signature-field p {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.enrollment-error {
  padding: 0 28px;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 28px 19px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.wizard-actions > div {
  display: flex;
  gap: 9px;
}

.welcome-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 24px 0;
  padding: 31px;
  background: var(--mint);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.welcome-card h2 {
  margin: 12px 0 8px;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.welcome-card p {
  max-width: 720px;
  margin: 0;
  color: #43635f;
  line-height: 1.6;
}

.welcome-card__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 74px;
  height: 74px;
  color: var(--ink);
  background: var(--yellow);
  border: 8px solid rgba(255, 255, 255, 0.48);
  border-radius: 28px;
  font-size: 32px;
  font-weight: 900;
  transform: rotate(5deg);
}

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

.feature-grid article {
  min-height: 170px;
  padding: 23px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.feature-grid article:nth-child(1) {
  background: var(--peach);
}

.feature-grid article:nth-child(2) {
  background: var(--lavender);
}

.feature-grid article:nth-child(3) {
  background: var(--yellow);
}

.feature-grid span {
  color: rgba(36, 69, 77, 0.45);
  font-size: 11px;
  font-weight: 900;
}

.feature-grid h3 {
  margin: 24px 0 7px;
  font-size: 20px;
}

.feature-grid p {
  margin: 0;
  color: #53686d;
  font-size: 12px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(370px, calc(100% - 44px));
  padding: 14px 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.locked-page {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  background: var(--paper);
}

.locked-card {
  width: min(460px, 100%);
  padding: 50px 35px;
  background: var(--lavender);
  border-radius: 30px;
  box-shadow: var(--shadow);
  text-align: center;
}

.locked-card > span {
  font-size: 42px;
}

.locked-card h1 {
  margin: 16px 0 10px;
}

.locked-card p {
  color: #5d5d7e;
}

@media (max-width: 1040px) {
  .auth-layout {
    grid-template-columns: minmax(340px, 0.8fr) minmax(440px, 1.2fr);
  }

  .auth-visual {
    padding-right: 38px;
    padding-left: 38px;
  }

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

  .enrollment-row {
    grid-template-columns: minmax(200px, 1fr) minmax(180px, auto);
  }

  .enrollment-row__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  .child-name-grid {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    display: block;
  }

  .auth-visual {
    min-height: 330px;
    padding: 27px 25px;
  }

  .auth-visual__copy {
    margin: 48px 0 0;
  }

  .auth-visual h1 {
    max-width: 530px;
    font-size: 42px;
  }

  .auth-visual__copy p,
  .family-card,
  .auth-visual__foot {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 44px 23px 65px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 15px;
  }

  .topbar > .test-badge {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    display: block;
    width: auto;
    padding: 12px 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .sidebar__label,
  .sidebar__help {
    display: none;
  }

  .sidebar nav {
    display: flex;
    min-width: max-content;
  }

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

  .nav-link small {
    display: none;
  }

  .dashboard {
    padding: 30px 18px 55px;
  }

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

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

  .enrollment-list-head,
  .enrollment-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field input,
  .enrollment-filters select {
    width: 100%;
  }

  .modal--enrollment,
  .enrollment-form {
    max-height: calc(100dvh - 10px);
  }

  .modal--enrollment {
    width: calc(100% - 10px);
    border-radius: 22px;
  }

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

@media (max-width: 540px) {
  .auth-visual {
    min-height: 280px;
  }

  .auth-visual h1 {
    font-size: 35px;
  }

  .auth-panel h2 {
    font-size: 35px;
  }

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

  .role-card {
    grid-template-columns: 48px 1fr;
  }

  .role-card > i {
    display: none;
  }

  .role-card__icon {
    width: 46px;
    height: 46px;
  }

  .welcome-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal__body {
    padding: 22px 18px;
  }

  .recovery-card {
    align-items: stretch;
    flex-direction: column;
  }

  .document-ready-card {
    align-items: flex-start;
  }

  .document-ready-card__tag {
    display: none;
  }

  .enrollment-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .enrollment-row__actions {
    grid-column: auto;
  }

  .enrollment-row__meta {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .enrollment-form__head,
  .wizard-body,
  .wizard-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .wizard-progress {
    padding-right: 16px;
    padding-left: 16px;
  }

  .wizard-dots {
    justify-content: flex-start;
    padding-right: 16px;
    padding-left: 16px;
    overflow-x: auto;
  }

  .health-question,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .photo-consent-options,
  .photo-upload-panel,
  .photo-upload-panel.has-photo,
  #photoUploadPanel,
  #photoUploadPanel.has-photo {
    grid-template-columns: 1fr;
  }

  .photo-upload-panel,
  #photoUploadPanel {
    align-items: stretch;
    padding: 14px;
  }

  .photo-upload-actions,
  .photo-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .photo-upload-actions .button,
  .photo-upload-actions label,
  .photo-actions .button {
    width: 100%;
  }

  .photo-preview img,
  #photoPreviewImage {
    width: min(160px, 72vw);
  }

  .wizard-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .wizard-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wizard-actions > div .button:only-child {
    grid-column: 1 / -1;
  }

  .wizard-actions > .button {
    width: 100%;
  }

  .signature-field canvas {
    height: 135px;
  }
}

.topbar--production {
  grid-template-columns: 1fr auto;
}

.topbar__actions,
.dashboard__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.topbar__actions {
  justify-self: end;
}

.sales-projection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 32px;
  align-items: center;
  padding: 30px;
  margin-bottom: 24px;
  background: var(--yellow);
  border-radius: var(--radius);
}

.sales-projection h2 {
  margin: 7px 0 8px;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.sales-projection p {
  max-width: 680px;
  margin: 0;
  color: #655321;
  line-height: 1.55;
}

.sales-projection__numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sales-projection__numbers article {
  display: grid;
  gap: 8px;
  min-height: 105px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.68);
  border-radius: 17px;
}

.sales-projection__numbers small,
.table-detail {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.sales-projection__numbers strong {
  font-size: 22px;
}

.credential-summary {
  display: grid;
  gap: 7px;
  padding: 17px;
  margin: 18px 0;
  background: var(--cream);
  border-radius: 15px;
}

.credential-summary span {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credential-summary code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.activation-help,
.privacy-form-note {
  padding: 12px 14px;
  background: var(--cream);
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.55;
}

.privacy-form-note {
  color: #315f58;
  background: #dff5ee;
}

.account-settings-page {
  width: min(700px, calc(100% - 36px));
  margin: 0 auto;
  padding: 120px 0 70px;
}

.account-settings-card {
  padding: clamp(25px, 5vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.account-settings-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 6vw, 50px);
  letter-spacing: -0.045em;
}

.text-link--back {
  width: max-content;
  margin: 0 0 18px;
}

.status-pill--invited,
.status-pill--new {
  background: var(--cream);
}

.status-pill--revoked,
.status-pill--lost,
.status-pill--archived {
  background: #eadfdc;
}

.status-pill--contacted {
  background: var(--peach);
}

.status-pill--qualified {
  background: var(--lavender);
}

.status-pill--won {
  background: var(--mint);
}

.lead-status-select {
  min-width: 135px;
  min-height: 38px;
  padding: 0 10px;
  font-size: 11px;
}

@media (max-width: 800px) {
  .sales-projection {
    grid-template-columns: 1fr;
  }

  .dashboard__actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .topbar__actions .button:first-child {
    display: none;
  }

  .sales-projection {
    padding: 22px;
  }

  .sales-projection__numbers {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Avances pedagógicos */
.progress-guide-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 21px;
  margin-bottom: 24px;
  background: var(--mint);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.progress-guide-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.64);
  border-radius: 15px;
  font-size: 21px;
}

.progress-guide-card > div {
  min-width: 0;
}

.progress-guide-card b {
  font-size: 14px;
}

.progress-guide-card p {
  margin: 3px 0 0;
  color: #3f625f;
  font-size: 11px;
  line-height: 1.5;
}

.progress-guide-card__tag {
  flex: 0 0 auto;
  padding: 7px 10px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-list-head,
.progress-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-filters select {
  width: auto;
  min-width: 150px;
  min-height: 43px;
  font-size: 11px;
}

.progress-child-list {
  display: grid;
}

.progress-child-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(220px, 0.95fr) minmax(280px, auto);
  align-items: center;
  gap: 20px;
  min-height: 82px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

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

.progress-child-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.progress-child-main:focus-visible,
.family-bottom-nav button:focus-visible,
.progress-level:focus-within {
  outline: 3px solid rgba(83, 185, 165, 0.45);
  outline-offset: 3px;
}

.progress-child-avatar,
.progress-profile__person > span {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  color: var(--ink);
  background: var(--peach);
  border-radius: 15px;
  font-size: 13px;
  font-weight: 900;
}

.progress-child-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.progress-child-identity b,
.progress-child-latest b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-child-identity small,
.progress-child-latest small,
.progress-child-latest span {
  color: var(--ink-soft);
  font-size: 10px;
}

.progress-child-latest {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.progress-child-latest span {
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.progress-child-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.progress-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  color: var(--ink);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.progress-status i {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  font-style: normal;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

.progress-status--with_support {
  background: var(--lavender);
}

.progress-status--developing {
  background: var(--peach);
}

.progress-status--independent {
  background: var(--mint);
}

.progress-status--empty {
  background: #e9efed;
}

.table-action--profile {
  background: var(--lavender);
}

.modal--progress {
  width: min(800px, calc(100% - 28px));
  max-height: min(900px, calc(100dvh - 28px));
  overflow: hidden;
}

.modal--progress-goal {
  width: min(650px, calc(100% - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  overflow: hidden;
}

.progress-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(900px, calc(100dvh - 28px));
}

.progress-form__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 28px 19px;
  background: linear-gradient(135deg, #fffaf6 55%, #dff4ee 100%);
  border-bottom: 1px solid var(--line);
}

.progress-form__head h2 {
  margin: 4px 0 4px;
}

.progress-form__head p:last-child {
  max-width: 570px;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.progress-form__body {
  display: grid;
  gap: 18px;
  padding: 23px 28px 28px;
  overflow-y: auto;
}

.progress-form__body > label,
.progress-more label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.progress-form__body label > small {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.progress-age-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
  background: var(--cream);
  border: 0;
  border-radius: 16px;
}

.progress-age-range legend {
  grid-column: 1 / -1;
  padding: 0;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 850;
}

.progress-age-range legend small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
}

.progress-age-range label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
}

.progress-age-help {
  margin: -9px 2px 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.progress-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  padding: 0;
  border: 0;
}

.progress-levels legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 850;
}

.progress-level {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 9px;
  min-height: 91px;
  padding: 14px;
  border: 2px solid transparent;
  border-radius: 17px;
  cursor: pointer;
}

.progress-level input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.progress-level > span {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  font-size: 18px;
}

.progress-level b {
  align-self: end;
  font-size: 11px;
}

.progress-level small {
  align-self: start;
  color: #536970;
  font-size: 9px;
  line-height: 1.35;
}

.progress-level--support {
  background: var(--lavender);
}

.progress-level--developing {
  background: var(--peach);
}

.progress-level--independent {
  background: var(--mint);
}

.progress-level:has(input:checked) {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(36, 69, 77, 0.1);
}

.progress-more {
  padding: 14px 16px;
  background: var(--cream);
  border-radius: 15px;
}

.progress-more summary {
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.progress-more[open] summary {
  margin-bottom: 14px;
}

.progress-evidence {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #e4f5ef;
  border: 2px solid transparent;
  border-radius: 18px;
}

.progress-evidence.is-unavailable {
  background: #f4f1ef;
  border-color: #e2dcda;
}

.progress-evidence legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.progress-evidence legend > span:first-child {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #bde6da;
  border-radius: 12px;
  font-size: 18px;
}

.progress-evidence legend > span:last-child {
  display: grid;
  gap: 2px;
}

.progress-evidence legend b {
  font-size: 12px;
}

.progress-evidence legend small,
.progress-evidence__privacy,
.progress-evidence__consent,
#progressEvidenceStatus {
  color: #526d70;
  font-size: 9px;
  line-height: 1.45;
}

.progress-evidence__consent {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  font-weight: 750;
}

.progress-evidence__consent.is-authorized {
  color: #2f625b;
  background: #d1eee5;
}

.progress-evidence__consent.is-denied {
  color: #786665;
  background: #eee9e6;
}

.progress-evidence__body {
  display: grid;
  gap: 11px;
}

.progress-evidence__body[hidden],
.progress-evidence__preview[hidden] {
  display: none;
}

.progress-evidence__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-evidence__actions label.button {
  cursor: pointer;
}

.progress-evidence__preview {
  width: min(100%, 340px);
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 4px solid #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-small);
}

.progress-evidence__preview img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.progress-evidence__privacy,
#progressEvidenceStatus {
  margin: 0;
}

#progressEvidenceStatus.is-error {
  color: #a63e3e;
  font-weight: 750;
}

.share-toggle {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  min-height: 68px;
  padding: 13px 15px;
  background: #dff4ee;
  border-radius: 16px;
  cursor: pointer;
}

.share-toggle input {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  accent-color: var(--mint-deep);
}

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

.share-toggle b {
  font-size: 11px;
}

.share-toggle small {
  color: #4a6c67;
  font-size: 9px;
  font-weight: 600;
}

.share-toggle.is-disabled {
  color: var(--ink-soft);
  background: #edf1f0;
  cursor: not-allowed;
}

.progress-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 17px 28px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.modal--progress-profile {
  width: min(850px, calc(100% - 28px));
  max-height: min(900px, calc(100dvh - 28px));
  overflow-y: auto;
}

.progress-profile {
  padding: 27px;
}

.progress-profile__head,
.progress-profile__person {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.progress-profile__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.progress-profile__actions a {
  text-decoration: none;
  white-space: nowrap;
}

.progress-report-control {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  background: var(--cream);
  border-radius: 14px;
}

.progress-report-control select {
  min-width: 138px;
  min-height: 35px;
  padding: 7px 27px 7px 10px;
  border-radius: 10px;
  font-size: 10px;
}

.progress-timeline-evidence {
  display: block;
  margin: 13px 0 2px;
  overflow: hidden;
  background: #e8f5f1;
  border-radius: 15px;
}

.progress-timeline-evidence img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}

.progress-profile__head {
  justify-content: space-between;
  gap: 24px;
}

.progress-profile__person > span {
  width: 58px;
  height: 58px;
  background: var(--lavender);
  border-radius: 18px;
}

.progress-profile__person h2 {
  margin: 3px 0 2px;
}

.progress-profile__person p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.progress-profile__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  margin: 22px 0;
  background: var(--mint);
  border-radius: 18px;
}

.progress-profile__summary > div {
  display: grid;
  min-width: 90px;
  padding-right: 18px;
  border-right: 1px solid rgba(36, 69, 77, 0.2);
}

.progress-profile__summary b {
  font-size: 27px;
  line-height: 1;
}

.progress-profile__summary span,
.progress-profile__summary p {
  color: #436560;
  font-size: 10px;
}

.progress-profile__summary p {
  margin: 0;
  line-height: 1.5;
}

.progress-timeline {
  position: relative;
  display: grid;
  gap: 15px;
  padding-left: 22px;
}

.progress-timeline::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 7px;
  width: 2px;
  content: "";
  background: #dbe4e1;
}

.progress-timeline-item {
  position: relative;
}

.progress-timeline-item__dot {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: -22px;
  width: 16px;
  height: 16px;
  background: var(--peach);
  border: 4px solid var(--paper);
  border-radius: 50%;
}

.progress-timeline-item__dot--with_support {
  background: #837bd1;
}

.progress-timeline-item__dot--independent {
  background: var(--mint-deep);
}

.progress-timeline-item__card {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.progress-timeline-item__top,
.progress-timeline-item__card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.progress-timeline-item__card h3 {
  margin: 13px 0 5px;
  font-size: 16px;
}

.progress-timeline-item__card > p {
  margin: 0 0 7px;
  color: #456168;
  font-size: 12px;
  line-height: 1.55;
}

.progress-timeline-item__card > small {
  color: var(--ink-soft);
  font-size: 9px;
}

.progress-next-step {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  margin-top: 13px;
  background: var(--cream);
  border-radius: 12px;
  font-size: 10px;
  line-height: 1.45;
}

.progress-timeline-item__card footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.progress-area-tag,
.visibility-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  color: var(--ink);
  background: var(--cream);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
}

.progress-area-tag--autonomy {
  background: var(--mint);
}

.progress-area-tag--socio_emotional {
  background: var(--pink);
}

.progress-area-tag--communication {
  background: var(--lavender);
}

.progress-area-tag--thinking {
  background: var(--yellow);
}

.progress-area-tag--motor {
  background: var(--peach);
}

.progress-area-tag--creativity {
  background: var(--periwinkle);
}

.visibility-pill {
  color: #65767a;
  background: #edf1f0;
}

.visibility-pill--shared {
  color: #245f55;
  background: var(--mint);
}

/* Biblioteca de aprendizajes */
.learning-library-dashboard {
  background:
    radial-gradient(circle at 94% 4%, rgba(199, 194, 245, 0.22), transparent 24rem),
    var(--paper);
}

.learning-library-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 19px 22px;
  margin-bottom: 18px;
  background: var(--mint);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.learning-library-intro__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--yellow);
  border: 5px solid rgba(255, 255, 255, 0.56);
  border-radius: 17px;
  font-size: 19px;
  font-weight: 900;
}

.learning-library-intro div {
  min-width: 0;
}

.learning-library-intro b {
  font-size: 14px;
}

.learning-library-intro p {
  margin: 4px 0 0;
  color: #3f625f;
  font-size: 11px;
  line-height: 1.5;
}

.learning-library-intro > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.68);
  border-radius: 13px;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

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

.library-metrics article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 18px;
  box-shadow: var(--shadow-small);
}

.library-metrics article:nth-child(1) { background: var(--peach); }
.library-metrics article:nth-child(2) { background: var(--lavender); }
.library-metrics article:nth-child(3) { background: var(--yellow); }

.library-metrics article > span {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.56);
  border-radius: 13px;
  font-size: 18px;
}

.library-metrics article div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.library-metrics b {
  font-size: 22px;
  line-height: 1;
}

.library-metrics small {
  color: #456168;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

.library-filter-card {
  padding: 22px;
  margin-bottom: 24px;
  overflow: visible;
}

.library-filter-card__head,
.library-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.library-filter-card__head {
  margin-bottom: 17px;
}

.library-filter-card__head h2,
.library-results-head h2 {
  margin: 0;
  font-size: 20px;
}

.library-filter-card__head p,
.library-results-head p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.library-context-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  padding: 15px;
  background: var(--lavender);
  border-radius: 17px;
}

.library-context-filters label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
}

.library-context-filters select {
  min-height: 47px;
  background: var(--white);
  font-size: 11px;
}

.library-filter-or {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.library-detail-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(145px, 0.72fr));
  gap: 10px;
  margin-top: 12px;
}

.library-detail-filters input,
.library-detail-filters select {
  width: 100%;
  min-height: 44px;
  font-size: 11px;
}

.library-results-head {
  margin: 0 2px 14px;
}

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

.learning-library-grid > .empty-state {
  grid-column: 1 / -1;
  min-height: 250px;
  padding: 38px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.library-goal-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  min-width: 0;
  min-height: 500px;
  padding: 15px 18px 18px;
  overflow: hidden;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 22px;
  box-shadow: var(--shadow-small);
}

.library-goal-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  content: "";
  background: var(--peach);
}

.library-goal-card--recommended {
  border-color: var(--mint-deep);
}

.library-goal-card--recommended::before {
  background: var(--mint-deep);
}

.library-goal-card--inactive::before {
  background: var(--lavender);
}

.library-goal-visual {
  position: relative;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  background: var(--cream);
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(41, 70, 77, 0.11);
  isolation: isolate;
}

.library-goal-visual--autonomy { background: var(--mint); }
.library-goal-visual--socio_emotional { background: var(--pink); }
.library-goal-visual--communication { background: var(--lavender); }
.library-goal-visual--thinking { background: var(--yellow); }
.library-goal-visual--motor { background: var(--peach); }
.library-goal-visual--creativity { background: var(--periwinkle); }

.library-goal-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  transition: transform 220ms ease;
}

.library-goal-visual--missing {
  min-height: 180px;
}

.library-goal-visual__meta {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  left: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.library-goal-visual__meta .progress-area-tag,
.library-goal-visual__meta .library-source-badge,
.library-goal-visual__meta .library-state-badge {
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 12px rgba(41, 70, 77, 0.13);
}

@media (hover: hover) {
  .library-goal-card:hover .library-goal-visual img {
    transform: scale(1.025);
  }
}

.library-card-fit,
.library-goal-card > footer,
.library-card-badges,
.library-primary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.library-goal-card > footer {
  justify-content: space-between;
}

.library-card-badges {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.library-source-badge,
.library-state-badge,
.library-fit-badge,
.library-age-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 5px 9px;
  color: var(--ink);
  background: var(--cream);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
}

.library-source-badge {
  background: var(--periwinkle);
}

.library-source-badge--own {
  background: var(--pink);
}

.library-state-badge--hidden {
  background: #e9efed;
}

.library-state-badge--previous {
  background: var(--lavender);
}

.library-card-fit {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 12px;
}

.library-fit-badge {
  color: #566d72;
  background: #edf1f0;
}

.library-fit-badge--recommended {
  color: #245f55;
  background: var(--mint);
}

.library-age-badge {
  margin-left: auto;
  background: var(--yellow);
}

.library-age-badge i {
  font-style: normal;
}

.library-goal-card h3 {
  margin: 13px 0 7px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.library-goal-card > p {
  margin: 0;
  color: #456168;
  font-size: 11px;
  line-height: 1.6;
}

.library-version-note {
  align-self: end;
  padding: 10px 11px;
  margin-top: 13px;
  color: #5c587a;
  background: var(--lavender);
  border-radius: 11px;
  font-size: 9px;
  line-height: 1.45;
}

.library-goal-card > footer {
  align-items: flex-end;
  flex-wrap: wrap;
  padding-top: 16px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.library-primary-actions {
  align-items: stretch;
  flex-wrap: wrap;
}

.library-goal-card .button--small,
.library-visibility-action {
  min-height: 44px;
}

.library-visibility-action {
  padding-right: 13px;
  padding-left: 13px;
  background: var(--cream);
}

.library-goal-card--inactive:not(.library-goal-card--recommended) {
  background: #fdfbf9;
}

.library-loading span {
  animation: library-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes library-pulse {
  to { transform: scale(1.08) rotate(5deg); }
}

/* Portal familiar */
.family-portal {
  min-height: 100vh;
  padding-bottom: 92px;
  background:
    radial-gradient(circle at 8% 5%, rgba(255, 216, 115, 0.32), transparent 22rem),
    radial-gradient(circle at 94% 15%, rgba(199, 194, 245, 0.28), transparent 25rem),
    var(--paper);
}

.family-portal__topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding: 14px clamp(18px, 5vw, 52px);
  background: rgba(255, 250, 246, 0.94);
  border-bottom: 1px solid rgba(232, 226, 220, 0.9);
  backdrop-filter: blur(14px);
}

.family-portal__actions {
  display: flex;
  gap: 9px;
}

.family-portal__main {
  width: min(780px, calc(100% - 34px));
  margin: 0 auto;
  padding: 34px 0 50px;
}

.family-demo-badge {
  display: table;
  margin: 0 auto 25px;
}

.family-section {
  animation: familySectionIn 200ms ease-out;
}

@keyframes familySectionIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.family-heading {
  margin-bottom: 25px;
  text-align: center;
}

.family-heading h1 {
  margin: 7px 0 7px;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.family-heading p:last-child {
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.55;
}

.family-progress-hero {
  margin-bottom: 32px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 27px;
  box-shadow: var(--shadow);
}

.family-progress-hero > .skeleton-card {
  min-height: 300px;
}

.family-hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  color: #5e4a13;
  background: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.family-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.family-section-title h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.family-section-title p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.text-button {
  padding: 7px 4px;
  color: #426965;
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

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

.family-update-card {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 21px;
  box-shadow: var(--shadow-small);
}

.family-update-card--featured {
  padding: 24px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.family-update-card__top,
.family-update-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.family-update-card__top time {
  color: var(--ink-soft);
  font-size: 9px;
}

.family-update-card__status {
  margin-top: 13px;
}

.family-update-card h2,
.family-update-card h3 {
  margin: 14px 0 7px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.family-update-card h2 {
  font-size: 25px;
}

.family-update-card h3 {
  font-size: 17px;
}

.family-update-card > p {
  margin: 0;
  color: #405e65;
  font-size: 13px;
  line-height: 1.62;
}

.family-update-evidence {
  display: block;
  margin: 16px 0 2px;
  overflow: hidden;
  background: #dff4ee;
  border-radius: 17px;
}

.family-update-evidence img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.family-update-context {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 9px;
}

.family-home-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  margin-top: 16px;
  background: var(--cream);
  border-radius: 15px;
}

.family-home-tip > span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: var(--yellow);
  border-radius: 11px;
}

.family-home-tip b {
  font-size: 10px;
}

.family-home-tip p {
  margin: 3px 0 0;
  color: #665822;
  font-size: 11px;
  line-height: 1.5;
}

.family-update-card footer {
  justify-content: flex-end;
  padding-top: 15px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.family-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #35645e;
  font-size: 10px;
  font-weight: 800;
}

.family-read i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-style: normal;
  background: var(--mint);
  border-radius: 50%;
}

.family-soft-empty {
  padding: 24px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed #d8d2cd;
  border-radius: 18px;
  font-size: 11px;
  text-align: center;
}

.family-document-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--lavender);
  border-radius: 24px;
  box-shadow: var(--shadow-small);
}

.family-document-card__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 64px;
  background: rgba(255, 255, 255, 0.68);
  border-radius: 14px;
  font-size: 24px;
}

.family-document-card small {
  color: #4e5276;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.family-document-card h2 {
  margin: 4px 0 3px;
  font-size: 20px;
}

.family-document-card p,
.family-document-card div > span {
  margin: 0;
  color: #505a73;
  font-size: 10px;
  line-height: 1.45;
}

.family-document-card .button {
  text-decoration: none;
  white-space: nowrap;
}

.family-document-card__actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.family-document-card__actions select {
  min-width: 150px;
  min-height: 40px;
  padding: 8px 28px 8px 11px;
  background-color: rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  font-size: 10px;
}

.family-bottom-nav {
  position: fixed;
  z-index: 25;
  right: 50%;
  bottom: max(13px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(480px, calc(100% - 28px));
  padding: 7px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 45px rgba(36, 69, 77, 0.18);
  transform: translateX(50%);
  backdrop-filter: blur(14px);
}

.family-bottom-nav button {
  display: grid;
  grid-template-columns: auto auto;
  place-content: center;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  color: #677b7f;
  background: transparent;
  border: 0;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.family-bottom-nav button span {
  font-size: 16px;
}

.family-bottom-nav button.is-active {
  color: var(--ink);
  background: var(--mint);
}

@media (max-width: 1050px) {
  .progress-child-row {
    grid-template-columns: minmax(190px, 1fr) minmax(190px, 0.8fr);
  }

  .progress-child-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 58px;
  }

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

@media (max-width: 800px) {
  .progress-list-head,
  .progress-filters {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .progress-filters .search-field input,
  .progress-filters select {
    width: 100%;
  }

  .progress-levels {
    grid-template-columns: 1fr;
  }

  .progress-level {
    min-height: 75px;
  }

  .learning-library-grid {
    grid-template-columns: 1fr;
  }

  .learning-library-intro {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .learning-library-intro > a {
    grid-column: 2;
    justify-self: start;
  }

  .family-document-card {
    grid-template-columns: auto 1fr;
  }

  .family-document-card .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .progress-form input,
  .progress-form select,
  .progress-form textarea {
    font-size: 16px;
  }

  .progress-report-control select,
  .family-document-card__actions select {
    font-size: 16px;
  }

  .library-context-filters select,
  .library-detail-filters input,
  .library-detail-filters select {
    font-size: 16px;
  }

  .learning-library-heading .button,
  .library-filter-card .text-button {
    min-height: 44px;
  }

  .learning-library-intro {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 16px;
  }

  .learning-library-intro > a {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .library-metrics {
    grid-template-columns: 1fr;
  }

  .library-metrics article {
    min-height: 68px;
  }

  .library-filter-card {
    padding: 16px;
  }

  .library-filter-card__head,
  .library-results-head {
    align-items: flex-start;
  }

  .library-filter-card__head {
    flex-direction: column;
  }

  .library-context-filters,
  .library-detail-filters {
    grid-template-columns: 1fr;
  }

  .library-filter-or {
    width: 100%;
    height: 22px;
    margin: -2px 0;
    background: transparent;
  }

  .library-goal-card {
    min-height: 0;
    padding: 14px 14px 17px;
  }

  .library-goal-visual {
    border-radius: 16px;
  }

  .library-card-badges {
    max-width: 48%;
  }

  .library-goal-card > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .library-primary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .library-primary-actions .button,
  .library-visibility-action {
    width: 100%;
  }

  .progress-child-actions .table-action {
    min-height: 44px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .progress-guide-card {
    align-items: flex-start;
    padding: 16px;
  }

  .progress-guide-card__tag {
    display: none;
  }

  .progress-child-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .progress-child-latest {
    padding: 10px 12px;
    background: #faf7f4;
    border-radius: 12px;
  }

  .progress-child-actions {
    grid-column: auto;
    justify-content: stretch;
    padding-left: 0;
  }

  .progress-child-actions .progress-status {
    margin-right: auto;
  }

  .modal--progress,
  .modal--progress-goal,
  .modal--progress-profile {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .progress-form {
    min-height: 100dvh;
    max-height: 100dvh;
  }

  .progress-form__head,
  .progress-form__body,
  .progress-form__actions,
  .progress-profile {
    padding-right: 17px;
    padding-left: 17px;
  }

  .progress-form__head {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .progress-form__actions {
    padding-bottom: max(17px, env(safe-area-inset-bottom));
  }

  .progress-form__actions .button {
    flex: 1;
  }

  .progress-profile__head {
    gap: 12px;
  }

  .progress-profile__actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .progress-report-control {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .progress-report-control select,
  .progress-report-control .button {
    width: 100%;
  }

  .progress-evidence__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .progress-evidence__actions .button,
  .progress-evidence__actions .text-button {
    justify-content: center;
    min-height: 44px;
  }

  .progress-profile__summary {
    grid-template-columns: 1fr;
  }

  .progress-profile__summary > div {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 7px;
    padding-right: 0;
    border-right: 0;
  }

  .progress-timeline-item__top,
  .progress-timeline-item__card footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .family-portal__topbar {
    min-height: 68px;
    padding: 11px 15px;
  }

  .family-portal__topbar .brand {
    font-size: 14px;
  }

  .family-portal__topbar .brand__mark {
    width: 34px;
    height: 34px;
  }

  .family-portal__actions .button {
    min-height: 42px;
    padding: 0 11px;
    font-size: 9px;
  }

  .family-portal__main {
    width: min(100% - 24px, 780px);
    padding-top: 25px;
  }

  .family-heading {
    margin-bottom: 20px;
  }

  .family-update-card,
  .family-update-card--featured {
    padding: 18px;
  }

  .family-update-card__top {
    align-items: flex-start;
  }

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

  .family-document-card__actions,
  .family-document-card__actions select,
  .family-document-card__actions .button {
    width: 100%;
  }

  .family-document-card__icon {
    width: 48px;
    height: 54px;
  }

  .family-bottom-nav button {
    grid-template-columns: 1fr;
    gap: 1px;
    min-height: 53px;
    font-size: 14px;
  }

  .family-portal .button,
  .family-portal .text-button {
    min-height: 44px;
    font-size: 14px;
  }

  .family-portal__actions .button {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-goal-visual img {
    transition: none;
  }

  .family-section {
    animation: none;
  }
}

@media (max-width: 420px) {
  .family-portal__topbar .brand > span:last-child {
    display: none;
  }
}
