:root {
  color-scheme: light;
  --page: #f5faf8;
  --surface: #ffffff;
  --surface-soft: #eef7f4;
  --text: #17332b;
  --muted: #60736d;
  --primary: #176b55;
  --primary-dark: #0f513f;
  --primary-soft: #daf0e8;
  --blue: #244a87;
  --teal: #168c82;
  --green: #18845f;
  --danger: #a23b3b;
  --danger-soft: #fff0f0;
  --border: #d8e5e0;
  --focus: #3a7bd5;
  --shadow: 0 24px 70px rgb(24 73 59 / 10%);
  --radius-lg: 24px;
  --radius-md: 15px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 4% 2%, rgb(58 154 126 / 10%), transparent 30rem),
    radial-gradient(circle at 98% 12%, rgb(36 74 135 / 8%), transparent 28rem),
    var(--page);
  color: var(--text);
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgb(58 123 213 / 25%);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.site-header {
  display: flex;
  width: min(100% - 40px, 1180px);
  min-height: 84px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1;
}

.brand-name span { color: var(--blue); }
.brand-name b { color: var(--teal); font-style: normal; }
.brand-name em { color: var(--green); font-style: normal; }

.brand-tagline {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.family-context {
  display: flex;
  margin-top: 8px;
  align-items: baseline;
  gap: 7px;
  color: var(--text);
  line-height: 1;
}

.family-context strong { font-size: 0.88rem; }
.family-context small {
  color: var(--primary);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

main { width: 100%; }

.auth-layout {
  display: grid;
  width: min(100% - 40px, 1120px);
  min-height: calc(100vh - 174px);
  margin: 0 auto;
  padding: 44px 0 70px;
  align-items: center;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  gap: clamp(48px, 7vw, 96px);
}

.intro-panel { padding: 24px 0; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.99;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

h3 { margin-bottom: 4px; font-size: 1.1rem; }

.intro-copy {
  max-width: 580px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.7;
}

.benefit-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  color: #34554b;
  font-weight: 650;
  list-style: none;
}

.benefit-list li { display: flex; align-items: center; gap: 11px; }

.benefit-list span {
  display: inline-grid;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem;
}

.card {
  border: 1px solid rgb(216 229 224 / 90%);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow);
}

.auth-card {
  width: 100%;
  max-width: 590px;
  justify-self: end;
  padding: clamp(22px, 4vw, 38px);
}

.tabs {
  display: grid;
  margin-bottom: 30px;
  padding: 5px;
  border-radius: 13px;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-soft);
}

.tab {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
}

.tab.active {
  background: var(--surface);
  box-shadow: 0 3px 12px rgb(24 73 59 / 9%);
  color: var(--text);
}

.panel-heading { margin-bottom: 26px; }

.panel-heading p, .section-heading p, .child-card p, .muted {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

form { display: grid; gap: 20px; }

fieldset {
  display: grid;
  gap: 15px;
  min-width: 0;
  margin: 0;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--border);
}

fieldset + fieldset { padding-top: 2px; }

legend {
  margin-bottom: 15px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
}

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

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

.registration-children { display: grid; gap: 14px; }

.registration-child {
  display: grid;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  gap: 14px;
  background: #fbfdfc;
}

.registration-child-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.registration-child-title { color: var(--text); font-size: 0.92rem; }

.remove-registration-child,
.add-registration-child {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.remove-registration-child { padding: 4px; color: var(--danger); font-size: 0.83rem; }

.add-registration-child {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 4px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--primary);
}

.add-registration-child span {
  display: inline-grid;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  place-items: center;
  background: var(--primary-soft);
  font-size: 1rem;
}

.add-registration-child:disabled { cursor: not-allowed; opacity: 0.5; }

.field label {
  display: block;
  margin-bottom: 7px;
  color: #314d45;
  font-size: 0.9rem;
  font-weight: 750;
}

.field label span { color: var(--muted); font-weight: 550; }

input, select {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid #cbdad4;
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder { color: #8c9b96; }
input:hover, select:hover { border-color: #a9c1b8; }

input:focus, select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(58 123 213 / 12%);
  outline: none;
}

select {
  padding-right: 40px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.code-input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-help, .privacy-note, .support-note {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.field-help { margin: 7px 0 0; }
.privacy-note { margin: -2px 0 0; }
.support-note { margin: 20px 0 0; text-align: center; }

.form-message {
  margin: -8px 0 22px;
  padding: 12px 14px;
  border: 1px solid #f0caca;
  border-radius: 11px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 11px 19px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 780;
  text-decoration: none;
  transition: transform 120ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.52; }
.button-primary { background: var(--primary); color: white; }
.button-primary:hover:not(:disabled) { background: var(--primary-dark); }

.button-secondary, .button-quiet {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover:not(:disabled), .button-quiet:hover:not(:disabled) {
  border-color: #b5cac2;
  background: var(--surface-soft);
}

.button-block { width: 100%; }
.button-small { min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }

.center-view {
  display: grid;
  width: min(100% - 40px, 760px);
  min-height: calc(100vh - 174px);
  margin: 0 auto;
  padding: 40px 0 70px;
  place-items: center;
  text-align: center;
}

.loader {
  width: 36px;
  height: 36px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.code-card { width: min(100%, 590px); padding: clamp(28px, 6vw, 48px); }
.code-card h1 { font-size: clamp(2rem, 6vw, 3.2rem); }

.code-card > p:not(.eyebrow, .field-help) {
  color: var(--muted);
  line-height: 1.6;
}

.success-mark {
  display: inline-grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 50%;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 900;
}

.access-code-box {
  margin: 28px 0 18px;
  padding: 20px;
  border: 1px dashed #79ad9c;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.access-code-box span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.access-code-box strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(1.45rem, 6vw, 2.15rem);
  letter-spacing: 0.07em;
}

.button-row { display: flex; justify-content: center; gap: 10px; }

.confirmation {
  display: flex;
  margin: 25px 0 18px;
  align-items: flex-start;
  gap: 11px;
  text-align: left;
  color: #314d45;
  font-size: 0.93rem;
  line-height: 1.5;
}

.confirmation input {
  flex: 0 0 auto;
  width: 20px;
  min-height: 20px;
  margin-top: 1px;
}

.dashboard {
  width: min(100% - 40px, 1060px);
  min-height: calc(100vh - 174px);
  margin: 0 auto;
  padding: 54px 0 70px;
}

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

.dashboard-header h1 {
  margin-bottom: 10px;
  font-size: clamp(2.3rem, 6vw, 4rem);
}

.profile-management-link {
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgb(23 107 85 / 30%);
  text-underline-offset: 3px;
}

.empty-profile-state {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.empty-profile-state h3 { margin-bottom: 6px; }
.empty-profile-state p { margin-bottom: 0; color: var(--muted); line-height: 1.5; }

.dashboard-card { padding: clamp(24px, 5vw, 40px); }
.section-heading {
  display: flex;
  margin-bottom: 24px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

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

.child-card {
  display: grid;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: #fbfdfc;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.child-card:hover { border-color: #a9c1b8; background: var(--surface); }
.child-card.active {
  border-color: var(--primary);
  background: var(--surface-soft);
  box-shadow: 0 0 0 2px rgb(23 107 85 / 9%);
}

.child-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 1.15rem;
  font-weight: 850;
}

.child-card p { font-size: 0.87rem; }

.badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.journey-section,
.recommendation-section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.journey-heading { margin-bottom: 18px; }
.journey-heading .eyebrow { margin-bottom: 8px; }
.journey-heading h2 { margin-bottom: 6px; }
.journey-heading > p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.5; }

.recommendation-status {
  padding: 17px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.5;
}

.recommended-modules { display: grid; gap: 14px; }

.available-groups { display: grid; gap: 26px; }
.access-modules { display: grid; gap: 14px; }

.available-module-card {
  overflow: hidden;
  border: 1px solid #bdd8ce;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.module-summary {
  display: grid;
  padding: clamp(18px, 4vw, 26px);
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}

.module-summary::-webkit-details-marker { display: none; }
.module-summary:hover { background: var(--surface-soft); }
.module-summary-text h3 { margin: 0 0 6px; font-size: clamp(1.15rem, 3vw, 1.4rem); }
.module-summary-text p { margin-bottom: 8px; color: var(--muted); line-height: 1.45; }
.module-summary-text small { color: var(--primary-dark); font-size: 0.84rem; font-weight: 750; }
.module-summary-meta { display: flex; align-items: flex-end; flex-direction: column; gap: 9px; }
.content-unlock-button { min-height: 36px; padding: 7px 13px; white-space: nowrap; }
.open-hint { color: var(--primary); font-size: 0.84rem; font-weight: 800; }
.open-hint::after { content: "+"; display: inline-block; width: 1.25rem; margin-left: 6px; text-align: center; }
.available-module-card[open] .open-hint::after { content: "−"; }
.available-module-card[open] .open-hint { color: var(--muted); }

.module-body { padding: 0 clamp(18px, 4vw, 26px) clamp(18px, 4vw, 26px); }
.subject-accordion { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; }
.subject-accordion + .subject-accordion { margin-top: 10px; }
.subject-accordion > summary { display: grid; min-height: 54px; padding: 13px 16px; align-items: center; grid-template-columns: minmax(0, 1fr) auto auto; gap: 15px; background: var(--surface-soft); cursor: pointer; list-style: none; }
.subject-accordion > summary::-webkit-details-marker { display: none; }
.subject-accordion > summary span { color: var(--muted); font-size: 0.84rem; font-weight: 700; }
.subject-accordion > summary::after { content: "+"; color: var(--primary); font-size: 1.2rem; font-weight: 800; }
.subject-accordion[open] > summary::after { content: "−"; }
.subject-summary-meta { display: flex; align-items: flex-end; flex-direction: column; justify-content: center; gap: 6px; }
.axis-group { padding: 18px 16px; }
.axis-group + .axis-group { border-top: 1px solid var(--border); }
.axis-group h4 { margin: 0 0 10px; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.07em; text-transform: uppercase; }
.skill-list { display: grid; gap: 8px; }

.recommended-module {
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid #bdd8ce;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--surface-soft), var(--surface));
}

.module-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.suggestion-card { padding: 20px; }
.suggestion-card h3 { margin: 0 0 7px; }
.suggestion-card p { margin-bottom: 0; }

.recommended-module h3 { margin: 8px 0; font-size: clamp(1.2rem, 3vw, 1.5rem); }
.recommended-module p { margin-bottom: 14px; color: var(--muted); line-height: 1.55; }
.recommended-module small { color: var(--primary-dark); font-size: 0.86rem; font-weight: 750; }

.recommended-label {
  display: inline-block;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.subject-block {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.subject-block h4 { margin: 0 0 12px; font-size: 1.05rem; }

.skill-card {
  display: grid;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  background: #fbfdfc;
}

.skill-card h5 { margin: 5px 0 7px; font-size: 1rem; }
.skill-card p { margin-bottom: 9px; font-size: 0.92rem; }
.skill-code { color: var(--primary); font-size: 0.78rem; font-weight: 800; }
.skill-status { display: block; font-size: 0.82rem; }
.skill-card-locked {
  border-color: #d8ddda;
  background: #f4f6f5;
}
.skill-card-locked h5 { color: #59635f; }
.skill-card-locked .skill-code { color: #7b8581; }
.skill-status-locked { color: #6f7874; }
.unlock-skill-button { border-color: #aeb7b3; background: #fff; color: #4f5955; }
.empty-subject { margin: 0; padding: 18px 16px; color: var(--muted); }
.status-verde { color: #176b55 !important; }
.status-amarelo { color: #8a6400 !important; }
.status-vermelho { color: var(--danger) !important; }

.unlock-dialog {
  width: min(100% - 32px, 560px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(20, 45, 37, 0.24);
}
.unlock-dialog::backdrop { background: rgba(19, 35, 30, 0.52); backdrop-filter: blur(3px); }
.unlock-dialog form { padding: clamp(24px, 6vw, 38px); }
.unlock-dialog h2 { margin: 7px 0 12px; font-size: clamp(1.45rem, 5vw, 2rem); }
.unlock-dialog p { line-height: 1.55; }
.unlock-dialog-mark { display: inline-flex; margin-bottom: 18px; padding: 7px 10px; border-radius: 9px; background: var(--primary-soft); color: var(--primary-dark); font-size: 0.84rem; font-weight: 850; text-transform: uppercase; }
.unlock-context {
  display: grid;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}
.unlock-context div { padding: 12px 15px; }
.unlock-context div + div { border-top: 1px solid var(--border); }
.unlock-context span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 0.78rem; font-weight: 750; }
.unlock-context strong { display: block; line-height: 1.4; }
.pix-loading { margin: 22px 0; padding: 18px; border-radius: 12px; background: var(--surface-soft); color: var(--muted); text-align: center; }
.pix-amount { display: flex; margin: 20px 0 12px; padding: 16px; border-radius: 13px; align-items: center; justify-content: space-between; gap: 20px; background: var(--primary-soft); }
.pix-amount span { color: var(--primary-dark); font-weight: 750; }
.pix-amount strong { color: var(--primary-dark); font-size: 1.45rem; }
.pix-recipient { margin-bottom: 18px; color: var(--muted); }
.pix-code-label { display: block; margin-bottom: 7px; font-weight: 800; }
#pix-copy-code { width: 100%; min-height: 98px; padding: 12px; resize: none; border: 1px solid var(--border); border-radius: 11px; background: #f8faf9; color: var(--text); font: 0.78rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
#pix-copy-feedback { min-height: 21px; margin: 7px 0 12px; font-size: 0.84rem; }
.pix-expiration { margin: 14px 0; padding: 11px 13px; border-radius: 10px; background: #fff7df; color: #725400; font-weight: 750; text-align: center; }
#pix-payment .button + .button { margin-top: 9px; }
.pix-reported { margin-top: 20px; padding: 20px; border-radius: 14px; background: var(--primary-soft); text-align: center; }
.pix-reported > strong { display: block; margin-bottom: 7px; color: var(--primary-dark); font-size: 1.15rem; }
.pix-reported p { color: var(--muted); }

.profiles-view {
  width: min(100% - 40px, 1060px);
  min-height: calc(100vh - 174px);
  margin: 0 auto;
  padding: 38px 0 70px;
}

.profiles-heading { margin-bottom: 24px; }
.profiles-heading h1 { margin-bottom: 12px; font-size: clamp(2.2rem, 6vw, 4rem); }
.profiles-heading > p:last-child { max-width: 720px; margin-bottom: 0; color: var(--muted); line-height: 1.6; }

.family-summary-card {
  display: grid;
  margin-bottom: 30px;
  padding: 22px 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  box-shadow: none;
}

.family-summary-card span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.8rem; font-weight: 750; }
.family-summary-card strong { word-break: break-word; }
.profile-group + .profile-group { margin-top: 36px; }
.profile-group-heading { display: flex; margin-bottom: 14px; align-items: baseline; justify-content: space-between; gap: 16px; }
.profile-group-heading h2 { margin-bottom: 0; }
.profile-group-heading span { color: var(--muted); font-size: 0.86rem; font-weight: 750; }
.profile-group-note { margin: -6px 0 16px; color: var(--muted); line-height: 1.5; }
.profile-management-list { display: grid; gap: 13px; }

.managed-profile-card {
  padding: clamp(18px, 4vw, 25px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.managed-profile-card.inactive { background: #f8faf9; }
.managed-profile-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.managed-profile-header h3 { margin-bottom: 4px; font-size: 1.2rem; }
.managed-profile-header p { margin-bottom: 0; color: var(--muted); }
.profile-status { padding: 5px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 850; }
.profile-status.active { background: var(--primary-soft); color: var(--primary-dark); }
.profile-status.inactive { background: #e8ecea; color: var(--muted); }

.profile-metrics {
  display: grid;
  margin: 20px 0;
  padding: 16px;
  border-radius: 12px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  background: var(--surface-soft);
}

.profile-metrics div { min-width: 0; }
.profile-metrics strong { display: block; margin-bottom: 3px; font-size: 1.08rem; }
.profile-metrics span { display: block; color: var(--muted); font-size: 0.74rem; line-height: 1.3; }
.managed-profile-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.managed-profile-footer > span { color: var(--muted); font-size: 0.84rem; }
.danger-action { color: var(--danger); }
.profile-empty-note { margin: 0; padding: 18px; border-radius: 12px; background: var(--surface-soft); color: var(--muted); }

.skill-view {
  width: min(100% - 40px, 980px);
  min-height: calc(100vh - 174px);
  margin: 0 auto;
  padding: 38px 0 70px;
}

.skill-journey-card { padding: clamp(24px, 5vw, 42px); }
.skill-journey-card > h1 { margin: 8px 0 12px; font-size: clamp(1.9rem, 5vw, 3.3rem); }
.skill-objective { max-width: 760px; margin-bottom: 28px; color: var(--muted); font-size: 1.02rem; line-height: 1.65; }

.skill-steps {
  display: grid;
  margin-bottom: 30px;
  padding: 5px;
  border-radius: 13px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  background: var(--surface-soft);
}

.skill-step {
  min-height: 45px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 780;
}

.skill-step.active { background: var(--surface); box-shadow: 0 2px 9px rgb(24 73 59 / 9%); color: var(--text); }
.skill-step.complete { color: var(--primary); }
.skill-step:disabled { cursor: not-allowed; opacity: 0.42; }
.skill-stage-content { min-height: 250px; }
.stage-intro { padding: clamp(20px, 4vw, 30px); border: 1px solid var(--border); border-radius: var(--radius-md); background: #fbfdfc; }
.stage-intro h2 { margin-bottom: 10px; }
.stage-intro p { max-width: 680px; margin-bottom: 22px; color: var(--muted); line-height: 1.65; }

.chapter-list { display: grid; margin-bottom: 18px; gap: 9px; }
.chapter-card { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.chapter-card summary { padding: 15px 17px; cursor: pointer; font-weight: 800; list-style: none; }
.chapter-card summary::-webkit-details-marker { display: none; }
.chapter-card summary::after { content: "+"; float: right; color: var(--primary); }
.chapter-card[open] summary::after { content: "−"; }
.chapter-card p { margin: 0; padding: 0 17px 18px; color: #34554b; line-height: 1.7; }

.journey-result { padding: clamp(20px, 4vw, 30px); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-soft); text-align: center; }
.score-comparison { display: grid; max-width: 500px; margin: 22px auto; grid-template-columns: 1fr 1fr; gap: 12px; }
.score-comparison div { padding: 18px; border-radius: 12px; background: var(--surface); }
.score-comparison span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.85rem; font-weight: 750; }
.score-comparison strong { font-size: 1.65rem; }
.journey-result > p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }

.assessment {
  width: min(100% - 40px, 850px);
  min-height: calc(100vh - 174px);
  margin: 0 auto;
  padding: 38px 0 70px;
}

.assessment-header {
  display: flex;
  margin-bottom: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.diagnostic-card { padding: clamp(24px, 6vw, 48px); }
.diagnostic-card h1 { margin-bottom: 20px; font-size: clamp(1.8rem, 5vw, 3rem); }
.diagnostic-progress { height: 8px; margin-bottom: 10px; overflow: hidden; border-radius: 999px; background: var(--primary-soft); }
.diagnostic-progress span { display: block; width: 20%; height: 100%; border-radius: inherit; background: var(--primary); transition: width 180ms ease; }
.question-fieldset { padding: 26px 0 0; border-bottom: 0; }
.question-fieldset legend { margin-bottom: 20px; font-size: clamp(1.15rem, 3vw, 1.4rem); line-height: 1.45; }
.question-alternatives { display: grid; gap: 10px; }

.answer-option {
  display: grid;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: center;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  cursor: pointer;
  line-height: 1.45;
}

.answer-option:hover { border-color: #a9c1b8; background: var(--surface-soft); }
.answer-option:has(input:checked) { border-color: var(--primary); background: var(--surface-soft); }
.answer-option input { width: 20px; min-height: 20px; margin: 0; }
.answer-option strong { display: grid; width: 30px; height: 30px; border-radius: 9px; place-items: center; background: var(--primary-soft); color: var(--primary-dark); }

.hint-button { justify-self: start; padding: 6px 0; border: 0; background: transparent; color: var(--primary); cursor: pointer; font-weight: 800; }
.question-hint { margin: 0; padding: 13px 15px; border-left: 3px solid var(--primary); border-radius: 7px; background: var(--surface-soft); color: #34554b; line-height: 1.55; }

.diagnostic-result { text-align: center; }
.result-mark { display: inline-grid; min-width: 76px; height: 76px; margin-bottom: 18px; padding: 0 12px; border-radius: 50%; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-size: 1.35rem; font-weight: 900; }
.result-mark[data-status="AMARELO"] { background: #fff4ce; color: #755400; }
.result-mark[data-status="VERMELHO"] { background: var(--danger-soft); color: var(--danger); }
.result-summary { margin-bottom: 25px; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.result-details { display: grid; margin-bottom: 24px; gap: 9px; text-align: left; }
.result-item { padding: 13px 15px; border-radius: 11px; background: var(--surface-soft); }
.result-item.incorrect { background: var(--danger-soft); }
.result-item p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.result-actions { display: flex; justify-content: center; gap: 10px; }

.add-child-panel {
  margin-top: 26px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.add-child-panel .panel-heading { margin-bottom: 20px; }
.add-child-panel .panel-heading p { margin-bottom: 0; color: var(--muted); }
.add-child-panel .form-message { margin: 0 0 20px; }
.add-child-actions { display: flex; justify-content: flex-end; gap: 10px; }

footer {
  display: flex;
  width: min(100% - 40px, 1180px);
  min-height: 90px;
  margin: 0 auto;
  padding: 24px 0;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

footer span:first-child {
  color: var(--muted);
  font-weight: 400;
}

footer span:first-child strong {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 26px;
  }
  .intro-panel { max-width: 700px; padding-bottom: 6px; }
  .intro-panel h1 { max-width: 720px; }
  .auth-card { max-width: none; justify-self: stretch; }
  .children-grid { grid-template-columns: 1fr; }
  .profile-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .site-header, .auth-layout, .dashboard, .center-view, footer {
    width: min(100% - 28px, 100%);
  }
  .assessment, .skill-view, .profiles-view { width: min(100% - 28px, 100%); padding-top: 20px; padding-bottom: 44px; }
  .site-header { min-height: 72px; }
  .brand-tagline { display: block; }
  .family-context { margin-top: 6px; }
  .auth-layout, .dashboard, .center-view {
    min-height: calc(100vh - 146px);
    padding-top: 20px;
    padding-bottom: 44px;
  }
  .intro-panel h1 { font-size: clamp(2.35rem, 13vw, 3.3rem); }
  .benefit-list { font-size: 0.94rem; }
  .auth-card, .code-card, .dashboard-card { border-radius: 19px; padding: 21px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .button-row { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-header { align-items: center; }
  .dashboard-header h1 { font-size: 2.4rem; }
  .section-heading { flex-direction: column; }
  .section-heading .button { width: 100%; }
  .child-card { grid-template-columns: auto minmax(0, 1fr); }
  .child-card .badge { grid-column: 2; justify-self: start; }
  .skill-card { grid-template-columns: 1fr; }
  .skill-card .button { width: 100%; }
  .module-summary { grid-template-columns: 1fr; }
  .module-summary-meta { align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .subject-accordion > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .subject-accordion > summary::after { grid-column: 2; grid-row: 1; }
  .subject-summary-meta { grid-column: 1 / -1; align-items: center; flex-direction: row; justify-content: space-between; }
  .skill-steps { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
  .skill-step { min-width: 115px; scroll-snap-align: start; }
  .score-comparison { grid-template-columns: 1fr; }
  .family-summary-card { grid-template-columns: 1fr; }
  .profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .managed-profile-footer { align-items: stretch; flex-direction: column; }
  .managed-profile-footer .button { width: 100%; }
  .result-actions { display: grid; grid-template-columns: 1fr; }
  .add-child-actions { display: grid; grid-template-columns: 1fr 1fr; }
  footer { flex-direction: column; justify-content: center; gap: 4px; text-align: center; }
}

@media (max-width: 390px) {
  .button-row { grid-template-columns: 1fr; }
  .access-code-box strong { font-size: 1.35rem; }
}

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

#header-login {
  display: none !important;
}

@media print {
  body * { visibility: hidden; }
  #code-view, #code-view * { visibility: visible; }
  #code-view { position: absolute; inset: 0; width: 100%; }
  .button-row, .confirmation, #continue-dashboard, footer, .site-header { display: none !important; }
  .code-card { border: 0; box-shadow: none; }
}
