:root {
  --bg: #e8f5fc;
  --white: #ffffff;
  --primary: #2db4ed;
  --primary-hover: #1aa3dc;
  --primary-dark: #085a82;
  --primary-mid: #0e8cc4;
  --text: #2a2e34;
  --muted: #9aa3b2;
  --placeholder: #9ca3af;
  --border: #e5e7eb;
  --error: #ef4444;
  --link: #2f6fed;
  --info-bg: rgba(14, 140, 196, 0.05);
  --info-border: rgba(14, 140, 196, 0.1);
  --security-bg: #ebf5ff;
  --security-border: #bfdbfe;
  --security-text: #1e40af;
  --success-box: #e8f5fc;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-card-soft: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-card: 24px;
  --radius-btn: 16px;
  --radius-input: 12px;
  --font: "Nunito", sans-serif;
  --overlay: linear-gradient(
    180deg,
    rgba(45, 180, 237, 0) 0%,
    rgba(45, 180, 237, 0) 45%,
    rgba(45, 180, 237, 0.35) 65%,
    rgba(45, 180, 237, 0.65) 82%,
    rgba(45, 180, 237, 0.9) 100%
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  width: min(1200px, 100%);
  min-height: 700px;
}

.card--welcome {
  width: min(1200px, 100%);
  min-height: 700px;
  grid-template-columns: 1fr 1fr;
}

.card--auth {
  width: min(1333px, 100%);
  min-height: 676px;
  grid-template-columns: minmax(280px, 669px) minmax(320px, 1fr);
}

.card--signup {
  width: min(1280px, 100%);
  min-height: 774px;
  height: auto;
  grid-template-columns: minmax(260px, 512px) minmax(360px, 1fr);
  box-shadow: var(--shadow-card-soft);
  align-items: stretch;
}

.card--signup-tall {
  min-height: 800px;
}

.card--review {
  width: min(1280px, 100%);
  min-height: auto;
  grid-template-columns: minmax(260px, 512px) minmax(360px, 1fr);
  box-shadow: var(--shadow-card-soft);
  border-radius: 16px;
}

.card--success {
  width: min(1472px, 100%);
  min-height: 676px;
  grid-template-columns: minmax(280px, 736px) minmax(320px, 1fr);
}

.card-visual {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  background: #64b9dc;
}

.card-visual__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-visual__overlay {
  position: absolute;
  inset: 0;
  background-image: var(--overlay);
  pointer-events: none;
}

.card-visual__logo {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  width: 224px;
  height: 61px;
  object-fit: contain;
  z-index: 1;
}

.card-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 76px;
  min-width: 0;
}

.card--welcome .card-form {
  padding: 100px 76px;
}

.card--auth .card-form {
  padding: 48px 56px 40px;
  justify-content: flex-start;
}

.card--signup .card-form,
.card--review .card-form {
  padding: 48px;
  justify-content: flex-start;
  overflow: visible;
}

.field--estado {
  display: flex;
}

.card--success .card-form {
  padding: 72px 64px;
  align-items: center;
  text-align: center;
}

.form-stack {
  width: 100%;
  max-width: 480px;
}

.card--signup .form-stack,
.card--review .form-stack {
  max-width: 672px;
}

.card--success .form-stack {
  max-width: 538px;
}

.eyebrow {
  margin: 20px 0 24px;
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
  color: var(--primary-dark);
}

.title {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  line-height: 40px;
  color: var(--text);
}

.title--lg {
  font-size: 36px;
  line-height: 40px;
}

.title--md {
  font-size: 30px;
  line-height: 36px;
}

.title--sm {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.brand {
  margin: 16px 0 0;
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
  color: var(--primary-dark);
}

.subtitle {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  color: var(--muted);
}

.lead {
  margin: 16px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--muted);
}

.card--auth .lead {
  margin-top: 24px;
}

.lead--lg {
  font-size: 18px;
  line-height: 28px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn[hidden] {
  display: none !important;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-btn);
  min-height: 60px;
  padding: 16px 24px;
  font-size: 18px;
  line-height: 28px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary--md {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.btn-primary--lg {
  min-height: 79px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-btn);
  min-height: 72px;
  padding: 22px 34px;
  font-size: 18px;
  line-height: 28px;
}

.btn-outline:hover {
  background: #f4fbfe;
}

.btn__icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
}

.welcome-footer {
  position: relative;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.link {
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

button.link {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
}

.link:hover {
  text-decoration: underline;
}

.form-gap .link--end {
  margin: 0;
  display: block;
  text-align: right;
  align-self: stretch;
}

.fine-print {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  color: var(--muted);
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  width: fit-content;
}

.back-link img {
  width: 14px;
  height: 16px;
  flex: 0 0 14px;
}

.back-link:hover {
  color: var(--primary-dark);
}

.title + .back-link {
  margin-top: 24px;
}

.progress {
  margin-top: 24px;
}

.progress + .title {
  margin-top: 32px;
}

.progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress__track {
  height: 8px;
  background: var(--border);
  border-radius: 9999px;
  overflow: hidden;
}

.progress__fill {
  display: block;
  height: 8px;
  border-radius: 9999px;
}

.progress__fill.is-cyan {
  background: var(--primary);
}

.progress__fill.is-blue {
  background: var(--primary-mid);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.field + .field,
.field-row + .field,
.field + .field-row {
  margin-top: 24px;
}

.form-gap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.form-gap .field + .field {
  margin-top: 0;
}

.form-block {
  margin-top: 24px;
}

.form-cta {
  margin-top: 24px;
}

.secondary-action {
  margin: 24px 0 32px;
}

.link-row {
  margin: 0;
  text-align: right;
}

.field-row > .field,
.field-row > .field + .field,
.form-gap .field-row > .field + .field {
  margin-top: 0;
  min-width: 0;
}

.label {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--text);
}

.label .req {
  color: var(--error);
}

.label .opt {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.input-wrap {
  position: relative;
}

.input,
.select {
  width: 100%;
  height: 50px;
  padding: 14px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--white);
  color: var(--text);
  font-size: 16px;
  line-height: 22px;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select::-ms-expand {
  display: none;
}

.input--lg {
  height: 58px;
  padding: 18px 17px;
  border-radius: 16px;
}

.input::placeholder,
.select:invalid {
  color: var(--placeholder);
}

.input:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 180, 237, 0.15);
}

.input.is-invalid,
.select.is-invalid,
.pref-field.is-invalid .input,
.pref-field.is-invalid .select,
.field.is-invalid .input,
.field.is-invalid .select {
  border-color: var(--error);
}

.pref-field.is-invalid .upload-drop,
.upload-drop.is-invalid {
  border-color: #e03840;
  background: #fff6f6;
}

.pref-field.is-invalid .tox-tinymce,
.tox-tinymce.is-invalid {
  border-color: #e03840 !important;
}

.pref-field.is-invalid .choice-row,
.field.is-invalid .choice-row,
.choice-row.is-invalid {
  outline: 1.5px solid #e8a0a4;
  outline-offset: 4px;
  border-radius: 8px;
}

.input.has-icon {
  padding-right: 46px;
}

.select {
  padding-right: 42px;
  background-image: none;
}

.input:disabled,
.select:disabled,
.input--compact:disabled,
.select.input--compact:disabled,
textarea.input:disabled {
  background: #e8eef3;
  color: #7a8b9a;
  -webkit-text-fill-color: #7a8b9a;
  border-color: #c5d0da;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}

.input:disabled::placeholder,
.select:disabled:invalid {
  color: #b0bbc6;
}

input[type="date"].input:disabled::-webkit-calendar-picker-indicator {
  opacity: 0.35;
  filter: grayscale(1);
  pointer-events: none;
  cursor: not-allowed;
}

.field-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 16px;
  pointer-events: none;
  z-index: 1;
}

.field-icon--lg {
  width: 16px;
  height: 16px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-eye {
  position: relative;
  width: 24px;
  height: 24px;
  display: block;
}

.icon-eye__outer {
  position: absolute;
  left: 0;
  top: 23.63%;
  width: 24px;
  height: 12.6562px;
}

.icon-eye__pupil {
  position: absolute;
  left: 35.35%;
  top: 35.35%;
  width: 6.97134px;
  height: 7.03125px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.hint-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 24px 0;
  padding: 17px;
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.hint-box img {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 2px;
}

.security-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 32px 0 24px;
  padding: 17px;
  background: var(--security-bg);
  border: 1px solid var(--security-border);
  border-radius: 12px;
  color: var(--security-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.security-box img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.password-reqs {
  margin: 24px 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 300;
  line-height: 20px;
  color: var(--placeholder);
}

.password-reqs li.is-ok {
  color: var(--primary-mid);
}

.password-reqs li.is-bad {
  color: var(--error);
}

.form-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.form-footer a {
  color: var(--primary);
  font-weight: 600;
}

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

.muted-link span {
  color: var(--primary);
  font-weight: 600;
}

.error-text {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--error);
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #5a738c;
}

.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  padding: 25px;
  margin-bottom: 24px;
}

.review-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.review-card__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
}

.review-card__title img,
.review-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.review-icon--doc {
  width: 24px;
  height: 16.875px;
  flex: 0 0 24px;
}

.review-card a {
  color: var(--link);
  font-size: 14px;
}

.review-card p {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 24px;
}

.review-card p:last-child {
  margin-bottom: 0;
}

.review-card:last-of-type {
  margin-bottom: 0;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 24px;
  font-size: 16px;
  line-height: 24px;
}

.check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.check--review {
  margin: 40px 0 32px;
}

.legal {
  margin: 0 0 32px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.legal a {
  color: var(--link);
}

.success-box {
  width: 100%;
  margin: 32px 0;
  padding: 21px 17px;
  background: var(--success-box);
  border: 1px solid #dcfce7;
  border-radius: 8px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.success-kicker {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 26px;
  color: var(--gray-600);
}

.support {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--gray-500);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
}

.modal.is-open {
  display: flex;
}

.modal__box {
  width: min(480px, 100%);
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.modal__box h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.modal__box p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 24px;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1e3a4c;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  display: none;
  z-index: 30;
}

.modal-sair {
  z-index: 80;
}

.modal-erro {
  z-index: 90;
}

.modal-definir-senha {
  z-index: 100;
}

.modal-definir-senha.is-open {
  display: flex;
}

body.modal-senha-aberta {
  overflow: hidden;
}

.modal__box--form {
  width: min(100%, 440px);
  text-align: left;
}

.modal__box--form h2 {
  margin-bottom: 8px;
}

.modal__box--form .modal__lead {
  margin-bottom: 20px;
  color: var(--text-muted, #5c6b7a);
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal__box--form .field + .field {
  margin-top: 16px;
}

.modal__box--form .password-reqs {
  margin: 12px 0 4px;
}

.modal__actions--stack {
  flex-direction: column;
  margin-top: 20px;
}

.modal__actions--stack .btn {
  width: 100%;
}

body.modal-senha-aberta .card--auth > .card-form,
body.modal-senha-aberta .app-shell {
  pointer-events: none;
  user-select: none;
}

/* .btn força display:inline-flex e anula [hidden] — esconder de verdade o botão de ação oculto */
#modal-erro:not(.has-acao) #modal-erro-acao {
  display: none !important;
}

.modal__box--erro h2 {
  color: var(--navy, #1e3a4c);
}

.modal__box--erro p {
  margin-bottom: 24px;
}

.modal__box--erro .modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

#modal-erro:not(.has-acao) .modal__actions {
  justify-content: stretch;
}

#modal-erro:not(.has-acao) #modal-erro-fechar {
  width: 100%;
}

#modal-erro.has-acao .modal__actions .btn-ghost {
  order: 1;
  width: auto;
  min-width: 120px;
}

#modal-erro.has-acao .modal__actions .btn-primary {
  order: 2;
  width: auto;
  min-width: 160px;
}

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

@media (max-width: 1100px) {
  .card,
  .card--welcome,
  .card--auth,
  .card--signup,
  .card--review,
  .card--success {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .card-visual {
    min-height: 280px;
  }

  .card-visual__logo {
    bottom: 24px;
  }

  .card-form,
  .card--welcome .card-form,
  .card--auth .card-form,
  .card--signup .card-form,
  .card--review .card-form,
  .card--success .card-form {
    padding: 32px 24px 36px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 16px;
  }

  .card-form,
  .card--welcome .card-form,
  .card--auth .card-form,
  .card--signup .card-form,
  .card--review .card-form,
  .card--success .card-form {
    padding: 28px 20px 32px;
  }

  .title {
    font-size: 32px;
    line-height: 36px;
  }

  .brand {
    font-size: 28px;
    margin-top: 12px;
  }

  .subtitle {
    margin-top: 12px;
  }

  .actions {
    margin-top: 28px;
    gap: 24px;
  }

  .welcome-footer {
    margin-top: 28px;
    gap: 32px;
  }

  .progress + .title {
    margin-top: 24px;
  }

  .secondary-action {
    margin: 20px 0 24px;
  }

  .legal {
    margin-bottom: 24px;
  }
}

body.app-body {
  overflow: hidden;
  height: 100vh;
  background: var(--white);
}

.app-shell {
  display: flex;
  height: 100vh;
}

.app-sidebar {
  width: 260px;
  flex: 0 0 260px;
  height: 100vh;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  padding: 50px 18px 24px;
  position: relative;
  z-index: 40;
}

.app-sidebar__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 224px;
}

.app-sidebar__logo {
  display: block;
  line-height: 0;
  flex: 0 0 auto;
}

.app-sidebar__logo:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
  border-radius: 6px;
}

.app-sidebar__brand img {
  width: 224px;
  height: 61px;
  object-fit: contain;
}

.app-sidebar__brand p {
  margin: 0;
  width: 224px;
  height: 30px;
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  text-align: center;
  color: var(--bg);
}

.app-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 47px;
  width: 224px;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 224px;
  height: 40px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--white);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
  background: var(--primary);
  white-space: nowrap;
}

.app-nav.is-active {
  background: var(--primary-mid);
  font-weight: 600;
}

.app-nav:hover {
  background: var(--primary-mid);
}

.app-nav__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-nav__icon img {
  width: 20px;
  height: 20px;
}

.app-nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 224px;
}

.app-nav-group.is-current > .app-nav:not(.app-nav--sub) {
  font-weight: 600;
}

.app-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-nav--sub {
  width: 196px;
  height: 36px;
  margin-left: 28px;
  padding: 8px 12px;
  font-size: 16px;
  gap: 6px;
}

.app-nav--sub .app-nav__icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.app-nav--sub .app-nav__icon img {
  width: 14px;
  height: 14px;
}

.app-sidebar__toolbar {
  display: contents;
}

.app-sidebar__brand {
  order: 1;
}

.app-sidebar__nav {
  order: 2;
}

.app-nav--sair {
  order: 3;
  margin-top: auto;
  font-weight: 600;
}

.app-nav-toggle {
  display: none;
}

.app-main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.app-topbar {
  flex: 0 0 auto;
  min-height: 96px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
}

.app-topbar__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: 39px;
  font-weight: 700;
  line-height: 45px;
  color: var(--primary-dark);
}

.app-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 32px;
}

.app-shell[data-pref-page] .app-main {
  height: 100vh;
  overflow-y: auto;
}

.app-shell[data-pref-page] .app-topbar {
  min-height: 96px;
}

.app-shell[data-pref-page] .app-content {
  overflow: visible;
  flex: 0 0 auto;
  min-height: auto;
}

.app-topbar__title--inline {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  padding-right: 16px;
  font-size: 28px;
  line-height: 1.2;
}

.app-topbar__sep {
  display: none;
}

.app-topbar__muni,
.app-topbar__page {
  min-width: 0;
}

.app-topbar__page {
  font-weight: 700;
}

.app-topbar__muni {
  font-size: 0.72em;
  font-weight: 600;
  line-height: 1.25;
  color: #5a738c;
}

.notify {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
}

.notify__btn {
  width: 50px;
  height: 50px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify__bell {
  width: 30px;
  height: 30px;
  display: flex;
}

.notify__bell img {
  width: 30px;
  height: 30px;
}

.notify__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  max-width: 360px;
  max-height: min(360px, 70vh);
  overflow: auto;
  background: var(--white);
  border: 1.5px solid #c8dceb;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(8, 90, 130, 0.16);
  padding: 16px 18px;
  color: #142d46;
  font-size: 14px;
  font-weight: 500;
  z-index: 20;
}

.notify__panel p,
.notify__item {
  margin: 0;
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.notify__item {
  display: block;
}

.notify__item:hover {
  color: var(--primary-mid);
}

.notify__panel p + p,
.notify__item + .notify__item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e8f0f6;
}

.inclusion-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.muni-page-lead {
  margin: 32px 0;
  font-size: 13px;
  font-weight: 400;
  color: #5a738c;
}

.app-shell .inclusion-progress:has(+ .muni-page-lead) {
  margin-bottom: 0;
}

.inclusion-progress__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--primary-dark);
}

.inclusion-progress__row h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
}

.inclusion-progress__value {
  margin: 0 0 0 auto;
  flex: 0 0 auto;
  font-size: 38px;
  font-weight: 700;
  line-height: 52px;
  white-space: nowrap;
}

.inclusion-progress__track {
  height: 20px;
  background: #d2e8f5;
  border: 1px solid #c8dceb;
  border-radius: 5px;
  overflow: hidden;
}

.inclusion-progress__fill {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
  width: 0%;
  max-width: 100%;
  transition: width 0.35s ease;
}

.muni-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 340px));
  gap: 20px;
}

.muni-card {
  position: relative;
  width: 340px;
  max-width: 100%;
  height: 300px;
  background: var(--white);
  border: 1.5px solid #c8dceb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 16px;
  cursor: pointer;
}

.muni-card__avatar {
  width: 70px;
  height: 70px;
  border-radius: 35px;
  background: #d2e8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #5a738c;
}

.muni-card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 33px;
  text-align: center;
  color: var(--primary-dark);
}

.muni-card__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.muni-card__bar-track {
  flex: 1;
  height: 10px;
  background: #d2e8f5;
  border-radius: 4px;
  overflow: hidden;
}

.muni-card__bar-fill {
  display: block;
  height: 8px;
  margin-top: 1px;
  background: var(--primary);
  border-radius: 4px;
  width: 0%;
  max-width: 100%;
  transition: width 0.35s ease;
}

.muni-card__bar-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-dark);
}

.muni-card__admin {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-dark);
}

.muni-card__status {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #5a738c;
}

.panel {
  background: var(--white);
  border: 1.5px solid #c8dceb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #142d46;
}

.panel__lead {
  margin: 8px 0 16px;
  font-size: 13px;
  font-weight: 400;
  color: #5a738c;
}

.code-row,
.accounts-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.code-prereq {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 260px));
  gap: 16px 24px;
  margin-bottom: 16px;
}

.code-prereq .select.input--compact,
.edit-grid .select.input--compact {
  padding-right: 32px;
}

.code-prereq .field-icon,
.edit-grid .field-icon {
  right: 10px;
}

.accounts-filters {
  gap: 16px;
  margin-bottom: 16px;
}

.accounts-filters .input-wrap {
  flex: 0 1 auto;
}

.accounts-filters .select.input--compact {
  width: 100%;
  padding-right: 32px;
}

.accounts-filters .field-icon {
  right: 10px;
  z-index: 1;
}

.accounts-filters__select--tipo {
  width: min(240px, 100%);
}

.accounts-filters__select--estado {
  width: min(140px, 100%);
}

.accounts-filters__select--municipio {
  width: min(240px, 100%);
}

.accounts-filters__select--ano {
  width: min(160px, 100%);
}

.ano-admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-shell[data-pref-page="aprovacao"] .pref-content {
  max-width: none;
}

.app-shell[data-pref-page="aprovacao"] .panel {
  max-width: none;
}

.ano-admin-card {
  max-width: none;
  align-items: center;
  gap: 20px;
}

.ano-admin-card__main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ano-admin-card__main:hover h4 {
  color: var(--primary-mid);
  text-decoration: underline;
}

.ano-admin-card__status {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  overflow-wrap: anywhere;
}

.ano-admin-card__status.is-progress {
  color: #c47b16;
}

.ano-admin-card__status.is-wait {
  color: var(--primary-mid);
}

.ano-admin-card__status.is-ok {
  color: #1b8a4a;
}

.ano-admin-card__status.is-no {
  color: #e03840;
}

.ano-admin-card__rej {
  color: #e03840;
}

.ano-admin-card__prog {
  color: #c47b16;
}

.ano-admin-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  align-items: stretch;
  flex: 0 0 auto;
  width: auto;
  min-width: 228px;
}

.ano-admin-card__actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 35px;
  height: 35px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.2;
  justify-content: center;
}

.ano-admin-card__pdf,
.ano-admin-card__pdf-link {
  grid-column: 1 / -1;
}

.ano-admin-card__actions .ano-admin-card__pdf.btn-text,
.ano-admin-card__actions a.ano-admin-card__pdf.btn-text {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

.ano-admin-card__pdf-link,
.pdf-download-link {
  color: var(--link);
  text-decoration: underline;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.ano-admin-card__pdf-link {
  display: inline-block;
  text-align: center;
  padding: 8px 4px;
  word-break: break-word;
}

.ano-admin-card__pdf-link:hover,
.pdf-download-link:hover {
  color: var(--primary-dark);
}

.input--compact,
.select.input--compact {
  height: 36px;
  padding: 8px 12px;
  border: 1px solid #c8dceb;
  border-radius: 6px;
  font-size: 14px;
  line-height: 19px;
}

#codigo-gerado {
  width: 240px;
}

#busca-usuario {
  width: min(420px, 100%);
}

#busca-usuario-pref {
  width: min(420px, 100%);
}

.btn-compact {
  width: auto;
  min-height: 36px;
  height: 36px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
}

.accounts-table-wrap {
  max-height: 342px;
  overflow-y: auto;
  border: 1.5px solid #c8dceb;
  border-radius: 10px;
}

.accounts-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

.accounts-table th:nth-child(3),
.accounts-table td:nth-child(3) {
  width: 72px;
  white-space: nowrap;
}

.accounts-table--pref {
  min-width: 980px;
}

.accounts-table--pref th:nth-child(3),
.accounts-table--pref td:nth-child(3) {
  width: auto;
  white-space: nowrap;
}

.accounts-table th,
.accounts-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eef3f7;
}

.accounts-table th {
  position: sticky;
  top: 0;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: #142d46;
  z-index: 1;
}

.accounts-table .sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.accounts-table .sort-btn:hover {
  color: var(--primary-dark);
}

.accounts-table .sort-arrow {
  display: inline-block;
  font-size: 9px;
  line-height: 1;
  color: #9aa3b2;
}

.accounts-table .sort-arrow::before {
  content: "▲▼";
  letter-spacing: -1px;
  opacity: 0.45;
}

.accounts-table th[aria-sort="ascending"] .sort-arrow {
  color: var(--primary-dark);
}

.accounts-table th[aria-sort="ascending"] .sort-arrow::before {
  content: "▲";
  letter-spacing: 0;
  opacity: 1;
}

.accounts-table th[aria-sort="descending"] .sort-arrow {
  color: var(--primary-dark);
}

.accounts-table th[aria-sort="descending"] .sort-arrow::before {
  content: "▼";
  letter-spacing: 0;
  opacity: 1;
}

.accounts-table td {
  font-size: 13px;
  color: #142d46;
}

.accounts-table tbody tr {
  cursor: pointer;
}

.accounts-table tbody tr:hover {
  background: #f4fbfe;
}

.accounts-table tr.is-open,
.accounts-table tr.is-open:hover {
  background: #e8f5fc;
}

.accounts-table tr.is-open td:first-child {
  font-weight: 600;
  color: var(--primary-dark);
}

.accounts-table tbody tr[data-user-id],
.accounts-table tbody tr[data-escola-id] {
  cursor: pointer;
}

.accounts-table .js-open-user {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.accounts-table .js-open-user:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

.accounts-table .js-open-param {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.accounts-table .js-open-param:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

.param-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.param-toolbar .input--compact {
  width: 100%;
  max-width: 420px;
}

.accounts-table-wrap--params {
  max-height: min(70vh, 520px);
}

.accounts-table--params {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.accounts-table--params th,
.accounts-table--params td {
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.accounts-table--params th:nth-child(1),
.accounts-table--params td:nth-child(1) {
  width: 28%;
}

.accounts-table--params th:nth-child(2),
.accounts-table--params td:nth-child(2) {
  width: 22%;
}

.accounts-table--params th:nth-child(3),
.accounts-table--params td:nth-child(3) {
  width: 12%;
  white-space: nowrap;
}

.accounts-table--params th:nth-child(4),
.accounts-table--params td:nth-child(4) {
  width: 18%;
  white-space: nowrap;
}

.accounts-table--params th:nth-child(5),
.accounts-table--params td:nth-child(5) {
  width: 18%;
  white-space: nowrap;
}

.accounts-table--params .param-nome {
  font-weight: 600;
  color: var(--primary-dark);
}

.accounts-table--params .param-valor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accounts-table--params .param-row {
  cursor: pointer;
}

.accounts-table--params .param-row:hover {
  background: #f3f8fc;
}

.param-badge {
  display: inline-block;
  border-radius: 999px;
  background: #e8f0f8;
  color: #1a4f8a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 10px;
}

.param-badge--secret {
  background: #f3e8ff;
  color: #6b21a8;
}

.param-badge--ok {
  background: #e6f4ea;
  color: #1e6b3c;
}

.param-badge--empty {
  background: #f5f5f5;
  color: #6b7280;
}

.modal__box--param {
  max-width: 560px;
}

.param-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #d8e4f0;
  border-radius: 10px;
  background: #f7fafc;
}

.param-meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b7c90;
}

.param-meta dd {
  margin: 0;
  font-size: 14px;
  color: #1f2a37;
  line-height: 1.4;
}

.param-meta__valor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.modal__actions--param {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.modal__actions-end {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal__actions--param .btn-danger-ghost {
  color: #b42318;
}

.modal__actions--param .btn-danger-ghost:hover {
  background: #fef3f2;
}

.accounts-name-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1.5px solid #c8dceb;
  border-radius: 10px;
  background: var(--white);
}

.accounts-name-list__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #142d46;
  text-align: left;
  cursor: pointer;
}

.accounts-name-list li + li .accounts-name-list__btn {
  border-top: 1px solid #e6eef6;
}

.accounts-name-list__btn span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.accounts-name-list__btn::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 2px solid #5a738c;
  border-bottom: 2px solid #5a738c;
  transform: rotate(-45deg);
}

.accounts-name-list__btn.is-open {
  background: #e8f5fc;
}

.accounts-name-list__empty {
  padding: 18px 16px;
  color: #5a738c;
  font-size: 14px;
}

.modal-ficha {
  z-index: 70;
  align-items: center;
  justify-content: center;
}

.modal-ficha .modal__box {
  width: min(480px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
}

.modal-ficha .modal__box h2 {
  overflow-wrap: anywhere;
}

.modal-ficha .modal__lead {
  margin: 0 0 16px;
  color: #5a738c;
  font-size: 14px;
  line-height: 1.4;
}

.modal-ficha__box {
  text-align: left;
}

.user-sheet {
  display: grid;
  gap: 14px;
  margin: 0 0 20px;
}

.user-sheet__row {
  display: grid;
  gap: 2px;
  margin: 0;
}

.user-sheet dt {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: #5a738c;
}

.user-sheet dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: #142d46;
  overflow-wrap: anywhere;
}

.accounts-meta {
  margin: 12px 0 0;
  font-size: 12px;
  color: #5a738c;
}

.field--compact {
  margin: 0;
}

.field--compact + .field--compact {
  margin-top: 0;
}

.label--muted {
  font-size: 12px;
  font-weight: 400;
  color: #5a738c;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 260px));
  gap: 16px 24px;
}

.edit-grid__full {
  grid-column: 1 / -1;
  max-width: 260px;
}

.edit-grid__wide {
  grid-column: 1 / -1;
  max-width: none;
}

.edit-password {
  margin-top: 24px;
}

.edit-password h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #142d46;
}

.edit-password p {
  margin: 0 0 16px;
  font-size: 12px;
  color: #5a738c;
}

.edit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn-ghost,
.btn-navy {
  width: auto;
  min-height: 35px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
}

.btn-ghost {
  background: var(--white);
  color: #142d46;
  border: 1px solid #c8dceb;
}

.btn-navy {
  background: var(--primary-dark);
  color: var(--white);
  border: 1px solid #c8dceb;
}

.btn-navy:hover:not(:disabled) {
  background: #064866;
}

.ano-admin-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ano-admin-card__actions .btn.btn-navy,
.ano-admin-card__actions .btn.btn-danger {
  width: 100%;
}

.ano-admin-card__actions .ano-admin-card__pdf,
.ano-admin-card__actions .ano-admin-card__pdf-link {
  grid-column: 1 / -1;
}

.modal--main {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 260px;
  background: rgba(16, 24, 40, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 25;
}

.modal--main.is-open {
  display: flex;
}

.modal--main .modal__box {
  width: min(560px, 100%);
}

.modal--main .modal__box--wide {
  width: min(760px, 100%);
}

.modal--main .modal__box .field {
  margin-bottom: 16px;
}

.modal--main .tox-tinymce {
  border-radius: 8px;
}

.modal--main .modal__box .modal__lead {
  margin: 0 0 12px;
  color: #5a738c;
}

.modal__changes {
  margin: 0 0 20px;
  padding: 12px 12px 12px 28px;
  max-height: 240px;
  overflow-y: auto;
  background: #f4fbfe;
  border-radius: 10px;
  color: #142d46;
  font-size: 13px;
  line-height: 1.5;
}

.modal__changes li + li {
  margin-top: 8px;
}

.modal__changes strong {
  font-weight: 700;
}

.modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.modal__actions .btn {
  width: auto;
}

.muni-empty {
  grid-column: 1 / -1;
  color: #5a738c;
  font-size: 16px;
}

@media (max-width: 1100px) {
  .muni-grid {
    grid-template-columns: repeat(2, minmax(240px, 340px));
  }

  .app-topbar__title {
    font-size: 28px;
    line-height: 34px;
  }

  .app-topbar__title--inline {
    font-size: 22px;
    line-height: 1.25;
  }

  .inclusion-progress__row h2 {
    font-size: 22px;
    line-height: 1.25;
  }

  .inclusion-progress__value {
    font-size: 28px;
    line-height: 36px;
  }
}

@media (max-width: 900px) {
  body.app-body {
    overflow: auto;
    height: auto;
  }

  .app-shell {
    flex-direction: column;
    height: auto;
  }

  .app-sidebar {
    width: 100%;
    flex: none;
    height: auto;
    padding: 12px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .modal--main {
    left: 0;
  }

  #tabela-usuarios-wrap,
  #tabela-usuarios-wrap-pref,
  #tabela-escolas-wrap-pref {
    display: none;
  }

  .accounts-name-list {
    display: block;
  }

  .accounts-filters {
    flex-direction: column;
    align-items: stretch;
  }

  #busca-usuario,
  #busca-usuario-pref,
  .accounts-filters .input-wrap {
    width: 100%;
  }

  .modal.modal-ficha.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .modal-ficha .modal__box {
    width: min(480px, 100%);
    max-height: min(86dvh, calc(100dvh - 32px));
    margin: 0 auto;
    flex: 0 1 auto;
  }

  .modal-ficha .modal__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal-ficha .modal__actions .btn {
    width: 100%;
  }

  #painel-editar:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 72;
    margin: 0;
    width: 100%;
    max-width: none;
    overflow: auto;
    border-radius: 0;
    background: #f4f8fb;
    padding: 16px 16px 32px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  #painel-editar .edit-grid__full {
    max-width: none;
  }

  #painel-editar:not([hidden]) .edit-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #f4f8fb;
    padding-top: 12px;
    padding-bottom: 8px;
  }

  #modal-editar-usuario-pref.is-open {
    display: block;
    background: #f4f8fb;
    overflow: auto;
    padding: 16px 16px 32px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  #modal-editar-usuario-pref .modal-pref__close {
    display: none;
  }

  #modal-editar-usuario-pref .modal-pref__box--form {
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  #modal-editar-usuario-pref h2,
  #modal-editar-usuario-pref .modal-pref__box--form h2 {
    font-size: 18px;
    font-weight: 600;
    color: #142d46;
    padding-right: 0;
  }

  #modal-editar-usuario-pref .modal-pref__lead {
    margin: 8px 0 16px;
    font-size: 13px;
    font-weight: 400;
    color: #5a738c;
  }

  #modal-editar-usuario-pref .label--muted {
    font-size: 12px;
    font-weight: 400;
    color: #5a738c;
  }

  #modal-editar-usuario-pref .input--compact,
  #modal-editar-usuario-pref .select.input--compact {
    height: 36px;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 19px;
    border-radius: 6px;
  }

  #modal-editar-usuario-pref .select.input--compact {
    padding-right: 32px;
  }

  #modal-editar-usuario-pref .modal-editar-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #f4f8fb;
    padding-top: 12px;
    padding-bottom: 8px;
  }

  #modal-editar-usuario-pref .modal-editar-actions .btn {
    width: auto;
    min-height: 36px;
  }

  .app-sidebar__toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
  }

  .app-sidebar__brand {
    order: 0;
    width: auto;
    min-width: 0;
    flex: 1;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
  }

  .app-sidebar__brand img {
    width: 120px;
    height: 32px;
    flex: 0 0 auto;
  }

  .app-sidebar__brand p {
    display: none;
  }

  .app-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  .app-nav-toggle:hover,
  .app-nav-toggle:focus-visible {
    background: var(--primary-mid);
    outline: none;
  }

  .app-nav-toggle__chevron {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
  }

  .app-sidebar.is-nav-open .app-nav-toggle__chevron {
    transform: rotate(180deg);
  }

  .app-sidebar__nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
  }

  .app-sidebar.is-nav-open .app-sidebar__nav {
    display: flex;
  }

  .app-sidebar__nav .app-nav {
    width: 100%;
    height: auto;
    min-height: 44px;
    font-size: 16px;
  }

  .app-nav-group {
    width: 100%;
  }

  .app-sidebar__nav .app-nav--sub {
    width: calc(100% - 24px);
    margin-left: 24px;
    min-height: 40px;
    font-size: 15px;
  }

  .app-nav--sair {
    order: 0;
    margin-top: 0;
    width: auto;
    min-width: 64px;
    min-height: 40px;
    height: 40px;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.14);
    justify-content: center;
  }

  .app-nav--sair:hover {
    background: var(--primary-mid);
  }

  .app-main {
    height: auto;
  }

  .app-content {
    overflow: visible;
  }

  .muni-grid,
  .edit-grid,
  .code-prereq {
    grid-template-columns: 1fr;
  }

  .muni-card {
    width: 100%;
  }

  .pref-grid,
  .etapa-grid,
  .contas-form-grid {
    grid-template-columns: 1fr;
  }

  .pref-field,
  .pref-field--2,
  .pref-field--3,
  .pref-field--6 {
    grid-column: 1 / -1;
  }

  .member-card,
  .user-row {
    flex-direction: column;
  }

  .ano-admin-card__actions {
    width: 100%;
    min-width: 0;
  }
}

.notify__badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 22.5px;
  height: 22.5px;
  padding: 0 5px;
  background: #ff3f1c;
  border: 2px solid var(--white);
  border-radius: 999px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify__badge[hidden] {
  display: none;
}

.app-nav[hidden] {
  display: none;
}

.app-nav.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.app-nav.is-locked:hover {
  background: var(--primary);
}

.pref-content {
  padding: 32px 40px 48px;
}

.pref-progress .inclusion-progress__value {
  color: var(--primary-mid);
}

.pref-progress .inclusion-progress__track {
  border: 0;
  border-radius: 10px;
  background: #d2e8f5;
  height: 20px;
}

.pref-progress .inclusion-progress__fill {
  border-radius: 10px;
}

.pref-intro {
  margin: 0 0 24px;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
}

.pref-intro p {
  margin: 0;
}

.pref-start {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-bottom: 32px;
}

.pref-start[hidden],
.pref-start #btn-ver-rejeicao[hidden] {
  display: none !important;
}

.pref-start #btn-ver-rejeicao {
  width: 100%;
  min-height: 44px;
}

.btn-start,
.btn-wide {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-mid);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.btn-start:hover:not(:disabled),
.btn-wide:hover:not(:disabled) {
  background: #0a7aad;
}

.btn-start:disabled,
.btn-wide:disabled,
.btn-start.is-disabled,
.btn-wide.is-disabled {
  background: #b8b8b8;
  opacity: 1;
  cursor: not-allowed;
}

.pref-warn {
  margin: 0;
  color: #e03840;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

#modal-rejeicao-ano .modal-pref__lead {
  text-align: left;
}

.rejeicao-html {
  margin: 16px 0 20px;
  padding: 16px;
  background: #f4fbfe;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  max-height: 320px;
  overflow: auto;
  text-align: left;
}

.rejeicao-html p {
  margin: 0 0 10px;
}

#modal-rejeicao-ano .rejeicao-html,
#modal-rejeicao-ano .rejeicao-html p,
#modal-rejeicao-ano .rejeicao-html li {
  color: #e03840;
}

.rejeicao-html ul,
.rejeicao-html ol {
  margin: 0 0 10px 20px;
}

.notify__link {
  display: inline;
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #0b5cab;
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
}

.pref-status-line {
  margin: 0;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.pref-status-line--top {
  align-self: flex-start;
  text-align: left;
}

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

.etapa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 381px;
  padding: 30px;
  background: var(--white);
  border: 2px solid #c8dceb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-align: center;
  color: inherit;
  gap: 18px;
}

.etapa-card:hover {
  border-color: var(--primary-mid);
}

.etapa-card.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.etapa-card.is-locked:hover {
  border-color: #c8dceb;
}

.etapa-card__avatar {
  width: 88px;
  height: 88px;
  border-radius: 44px;
  background: #d2e8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #5a738c;
}

.etapa-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary-dark);
}

.etapa-card__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.etapa-card__track {
  flex: 1;
  height: 14px;
  background: #d2e8f5;
  border-radius: 999px;
  overflow: hidden;
}

.etapa-card__fill {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  width: 0%;
  max-width: 100%;
  transition: width 0.35s ease;
}

.etapa-card__pct {
  font-size: 25px;
  font-weight: 600;
  color: var(--primary-dark);
}

.etapa-card__go {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  color: var(--primary-dark);
}

.etapa-card__status {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: #5a738c;
}

.pref-page-intro h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}

.pref-page-intro p {
  margin: 0 0 24px;
  font-size: 16px;
  font-weight: 400;
  color: #5a738c;
  line-height: 1.5;
  max-width: 1100px;
}

.escola-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: 64px 0 96px;
}

.escola-hero img {
  display: block;
  width: 240px;
  height: 240px;
  object-fit: contain;
}

.escola-hero h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}

.escola-hero__lead,
.escola-hero p {
  margin: 0;
  max-width: 820px;
  font-size: 18px;
  font-weight: 400;
  color: #5a738c;
  line-height: 1.45;
}

.escola-hero__lead p {
  max-width: none;
}

.srm-recursos-rascunho {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 4px 0 8px;
}

.member-card--compact {
  padding: 12px 14px;
}

.form-block {
  background: var(--white);
  border: 1.5px solid #c8dceb;
  border-radius: 12px;
  padding: 24px 28px 28px;
  margin-bottom: 28px;
}

.form-block--pendente {
  border-color: #e8a0a4;
  box-shadow: inset 4px 0 0 #e03840;
}

.form-block__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}

.form-block__lead {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 400;
  color: #5a738c;
  line-height: 1.45;
}

.form-block__subhead {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
}

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

.pref-grid[data-srm-recurso] {
  margin-top: 28px;
}

.pref-grid[data-srm-recurso] .form-block__subhead {
  margin-top: 0;
}

.pref-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pref-field .input-wrap {
  width: 100%;
}

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

.pref-field--3 {
  grid-column: span 3;
}

.pref-field--4 {
  grid-column: span 4;
}

.pref-field--6 {
  grid-column: span 6;
}

.aee-certificado {
  grid-column: 1 / span 4;
}

.pref-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.btn-add {
  width: auto;
  min-height: 43px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--primary-mid);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-add:hover {
  background: #0a7aad;
}

.btn-ghost-pref {
  width: auto;
  min-height: 43px;
  padding: 10px 16px;
  border: 1px solid #c8dceb;
  border-radius: 8px;
  background: var(--white);
  color: #142d46;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.pref-list-title {
  margin: 24px 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #465f78;
}

.pref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.member-card,
.user-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 760px;
  background: var(--white);
  border: 1.5px solid #c8dceb;
  border-radius: 12px;
  padding: 14px 16px;
}

.member-card[data-edit] {
  cursor: pointer;
}

.member-card[data-edit]:hover {
  border-color: #8eb8d4;
}

.app-shell.is-cadastro-locked .pref-form-actions,
.app-shell.is-cadastro-locked [data-pref-form]:not([data-pref-form="ppp"]):not([data-pref-form="datas"]):not([data-pref-form="dua"]):not([data-pref-form="acessibilidade"]):not([data-pref-form="avaliacao"]):not([data-pref-form="colaborativo"]) .pref-grid,
.app-shell.is-cadastro-locked [data-pref-form]:not([data-pref-form="ppp"]):not([data-pref-form="datas"]):not([data-pref-form="dua"]):not([data-pref-form="acessibilidade"]):not([data-pref-form="avaliacao"]):not([data-pref-form="colaborativo"]) .form-block__lead.pref-field,
.app-shell.is-cadastro-locked #srm-recursos-rascunho,
.app-shell.is-cadastro-locked .member-card__actions .btn-text--del,
.app-shell.is-cadastro-locked .member-card__actions .btn-text--edit:not([data-ver-doc]):not([data-ver-cert]):not([data-ver-cert-zona]):not([data-doc-tipo]) {
  display: none;
}

.app-shell.is-cadastro-locked .member-card__actions .btn-text--edit[data-ver-doc],
.app-shell.is-cadastro-locked .member-card__actions .btn-text--edit[data-ver-cert],
.app-shell.is-cadastro-locked .member-card__actions .btn-text--edit[data-ver-cert-zona],
.app-shell.is-cadastro-locked .member-card__actions .btn-text--edit[data-doc-tipo],
.app-shell.is-cadastro-locked .member-card__actions .pdf-download-link {
  display: inline-flex;
}

.app-shell.is-cadastro-locked .pref-field .label--muted,
.app-shell.is-cadastro-locked .choice:has(input:disabled) {
  color: #7a8b9a;
  cursor: not-allowed;
}

.app-shell.is-cadastro-locked .choice:has(input:disabled) {
  opacity: 0.65;
}

.app-shell.is-cadastro-locked .upload-drop,
.app-shell.is-cadastro-locked .upload-drop--certificado {
  pointer-events: none;
  cursor: not-allowed;
  background: #e8eef3;
  border-color: #c5d0da;
  color: #7a8b9a;
  opacity: 1;
}

.app-shell.is-cadastro-locked .upload-drop strong {
  color: #7a8b9a;
}

.app-shell.is-cadastro-locked .upload-drop img {
  opacity: 0.45;
  filter: grayscale(1);
}

.app-shell.is-cadastro-locked .tox-tinymce {
  border-color: #c5d0da !important;
  cursor: not-allowed;
  background: #e8eef3;
}

.app-shell.is-cadastro-locked .tox-editor-header,
.app-shell.is-cadastro-locked .tox-toolbar,
.app-shell.is-cadastro-locked .tox-toolbar__primary,
.app-shell.is-cadastro-locked .tox-toolbar__overflow {
  pointer-events: none;
  opacity: 0.5;
  filter: grayscale(1);
  background: #e8eef3 !important;
}

.app-shell.is-cadastro-locked .tox-edit-area,
.app-shell.is-cadastro-locked .tox-edit-area__iframe {
  background: #e8eef3 !important;
  cursor: not-allowed;
}

.app-shell.is-cadastro-locked .member-card {
  background: #f4f7fa;
  cursor: default;
}

.app-shell.is-cadastro-locked .member-card:hover {
  border-color: #c8dceb;
}

.user-row {
  max-width: none;
  align-items: center;
}

.member-card__info,
.user-row__info {
  display: flex;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.member-card__avatar,
.user-row__avatar {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: #d2e8f5;
  color: #5a738c;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
}

.member-card__body h4,
.user-row__body h4 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #142d46;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.member-card__meta,
.user-row__meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #5a738c;
}

.member-card__meta span,
.user-row__cargo {
  display: block;
}

.member-card__actions,
.user-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 100%;
}

.upload-preview .member-card {
  flex-direction: column;
  align-items: stretch;
  max-width: none;
  gap: 12px;
}

.upload-preview .member-card__info {
  width: 100%;
}

.upload-preview .member-card__actions {
  width: 100%;
  justify-content: flex-start;
}

.upload-preview .member-card__actions .btn-text {
  flex: 1 1 auto;
  min-width: min(100%, 160px);
  text-align: center;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 37px;
  padding: 8px 14px;
  border: 1px solid #c8dceb;
  border-radius: 8px;
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

a.btn-text {
  color: inherit;
}

a.btn-text:hover {
  text-decoration: none;
}

.btn-text--edit {
  color: var(--primary-mid);
}

a.btn-text--edit {
  color: var(--primary-mid);
}

.btn-text--del {
  color: #e03840;
}

.pref-empty {
  margin: 0;
  color: #5a738c;
  font-size: 14px;
}

.pref-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  min-height: 40px;
  align-items: center;
}

.choice-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #465f78;
  cursor: pointer;
}

.choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-mid);
}

.upload-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 145px;
  padding: 20px;
  border: 1.5px dashed #c8dceb;
  border-radius: 12px;
  background: #f7fbfe;
  text-align: center;
  cursor: pointer;
  color: #465f78;
}

.upload-preview {
  margin-top: 12px;
}

.upload-preview[hidden] {
  display: none !important;
}

.pref-start .js-ver-rejeicao-escola[hidden] {
  display: none !important;
}

.pref-start .js-ver-rejeicao-escola {
  width: 100%;
  min-height: 44px;
}

.upload-drop--certificado {
  background: #fff;
  border-color: #c5ced6;
}

.upload-drop.is-over {
  border-color: var(--primary-mid);
  background: #e8f5fc;
}

.upload-drop strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
}

.upload-drop span {
  font-size: 14px;
}

.upload-drop img {
  width: 36px;
  height: 36px;
}

.tox-tinymce {
  border: 1.5px solid #c8dceb !important;
  border-radius: 10px !important;
}

.app-shell[data-pref-page] .form-block .tox-tinymce {
  min-height: 560px;
}

.app-shell[data-pref-page] .label--question {
  display: block;
  margin: 6px 0 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: #142d46;
}

.app-shell[data-pref-page] .pref-field:has(textarea.js-tinymce) {
  gap: 12px;
  margin-top: 12px;
  padding-top: 8px;
}

.app-shell[data-pref-page] .pref-field:has(textarea.js-tinymce) .label--question {
  margin-top: 8px;
  margin-bottom: 4px;
}

.app-shell[data-pref-page] .pref-field:has(.choice-row) .label--question,
.app-shell[data-pref-page] .pref-field:has(.choice-col) .label--question {
  margin-top: 8px;
  margin-bottom: 10px;
}

.app-shell[data-pref-page] .pref-field:has(textarea.js-tinymce) .rte-footer {
  margin-top: 4px;
}

.rte-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  min-height: 18px;
}

.rte-footer .error-text {
  margin: 0;
  flex: 1 1 auto;
  text-align: left;
}

.rte-footer .editor-count {
  margin: 0;
  flex: 0 0 auto;
}

.save-hint {
  display: inline-block;
  margin-left: 8px;
  color: #1f9d55;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(1px);
  transition: opacity 0.2s ease;
  vertical-align: middle;
}

.save-hint.is-on {
  opacity: 1;
}

#tabela-escolas-wrap-pref {
  margin-top: 16px;
}

.accounts-table--escolas {
  min-width: 960px;
}

.accounts-table--escolas th:nth-child(3),
.accounts-table--escolas td:nth-child(3) {
  width: auto;
  white-space: normal;
}

.editor-count {
  margin: 6px 0 0;
  color: #788ca0;
  font-size: 13px;
  line-height: 16px;
  text-align: right;
}

.editor-count.is-over {
  color: #e03840;
  font-weight: 600;
}

.input--area {
  min-height: 80px;
  height: auto;
  padding: 12px;
  resize: vertical;
}

.contas-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.contas-toolbar__search {
  width: min(420px, 100%);
}

.contas-toolbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contas-meta {
  margin: 0;
  color: #5a738c;
  font-size: 14px;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-pref {
  position: fixed;
  inset: 0;
  background: rgba(13, 20, 31, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 40;
}

.modal-pref.is-open {
  display: flex;
}

.modal-pref__box {
  position: relative;
  width: min(535px, 100%);
  background: var(--white);
  border: 1px solid #c8dceb;
  border-radius: 16px;
  padding: 40px 40px 36px;
  text-align: center;
  box-shadow: 0 12px 16px rgba(0, 0, 0, 0.25);
}

.modal-pref__box--sm {
  width: min(460px, 100%);
  padding: 36px 28px 28px;
}

.modal-pref__box--excluir-escola {
  width: min(520px, 100%);
  text-align: left;
  padding: 36px 28px 28px;
}

.modal-pref__box--excluir-escola h2 {
  padding-right: 40px;
}

.modal-pref__box--excluir-escola .modal-pref__lead {
  margin: 0;
}

.modal-pref__box--excluir-escola .modal-pref__lead p {
  margin: 0 0 12px;
  text-align: left;
}

.modal-pref__box--excluir-escola .modal-pref__lead p:last-child {
  margin-bottom: 0;
}

.modal-pref__box--excluir-escola .modal-pref__lead strong {
  color: var(--primary-dark);
  font-weight: 700;
}

.modal-pref__box--excluir-escola .field {
  margin-top: 20px;
  text-align: left;
}

.modal-pref__box--excluir-escola .modal-pref__actions {
  justify-content: flex-end;
  margin-top: 24px;
}

.modal-pref__box--form {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  text-align: left;
  padding: 32px 28px 28px;
}

.modal-pref__box--form h2 {
  padding-right: 40px;
  font-size: 24px;
}

.modal-pref__box--form .edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-editar-actions {
  margin-top: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-pref__box h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.25;
}

.modal-pref__lead,
.modal-pref__box p:not(.error-text):not(.field-hint) {
  margin: 0 0 12px;
  color: #465f78;
  font-size: 15px;
  line-height: 1.45;
}

.modal-pref .error-text {
  color: var(--error);
}

.modal-pref__art {
  width: 240px;
  height: 240px;
  margin: 0 auto 28px;
}

.modal-pref__art img {
  width: 240px;
  height: 240px;
  object-fit: contain;
}

.modal-pref__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: 1px solid #c8dceb;
  border-radius: 8px;
  background: #e8f5fc;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.modal-pref__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  margin: 24px 0 32px;
}

.modal-pref__note {
  margin: 16px 0 0;
  font-size: 14px;
  color: #465f78;
}

.modal-pref__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.modal-pref__actions .btn {
  width: auto;
  min-width: 120px;
}

.btn-danger {
  width: auto;
  min-height: 35px;
  padding: 8px 16px;
  border-radius: 6px;
  background: #e03840;
  color: var(--white);
  border: 0;
  font-size: 14px;
  font-weight: 700;
}

.btn-modal {
  width: 100%;
  min-height: 57px;
  border: 0;
  border-radius: 10px;
  background: var(--primary-mid);
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 16px;
  padding: 8px 14px;
  border: 1px solid #c8dceb;
  border-radius: 100px;
  background: #e8f5fc;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.modal-pref__box--sucesso {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.modal-pref__box--sucesso .modal-pref__art,
.modal-pref__box--sucesso h2,
.modal-pref__box--sucesso p:not(.error-text),
.modal-pref__box--sucesso .status-pill {
  margin: 0;
}

.modal-pref__link {
  color: var(--primary-mid);
}

.rte-preview {
  text-align: left;
  background: #f7fbfe;
  border: 1px solid #c8dceb;
  border-radius: 10px;
  padding: 16px;
  min-height: 80px;
  color: #142d46;
}

.btn-link-date {
  display: inline-block;
  margin-top: 4px;
  color: var(--primary-mid);
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  width: auto;
  padding: 0;
}

@media (max-width: 900px) {
  .app-shell[data-pref-page] {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .app-shell[data-pref-page] .app-main,
  .app-shell[data-pref-page] .app-topbar,
  .app-shell[data-pref-page] .app-content,
  .app-shell[data-pref-page] .pref-content,
  .app-shell[data-pref-page] .form-block,
  .app-shell[data-pref-page] .pref-page-intro,
  .app-shell .inclusion-progress,
  .app-shell[data-pref-page] .etapa-card,
  .app-shell[data-pref-page] .pref-grid,
  .app-shell[data-pref-page] h1,
  .app-shell[data-pref-page] h2,
  .app-shell[data-pref-page] h3,
  .app-shell[data-pref-page] p {
    min-width: 0;
    max-width: 100%;
  }

  .app-shell[data-pref-page] h1,
  .app-shell[data-pref-page] h2,
  .app-shell[data-pref-page] h3,
  .app-shell[data-pref-page] p,
  .app-shell[data-pref-page] .form-block__title,
  .app-shell[data-pref-page] .form-block__lead,
  .app-shell[data-pref-page] .pref-page-intro h2,
  .app-shell[data-pref-page] .pref-page-intro p,
  .app-shell[data-pref-page] .pref-intro,
  .app-shell[data-pref-page] .etapa-card h3,
  .app-shell[data-pref-page] .app-topbar__page,
  .app-shell[data-pref-page] .app-topbar__muni {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .app-shell .inclusion-progress__value {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
  }

  .app-shell[data-pref-page] .app-main {
    height: auto;
    overflow: visible;
    max-width: 100%;
    min-width: 0;
  }

  .app-shell[data-pref-page] .app-content,
  .app-shell[data-pref-page] .pref-content {
    overflow: visible;
    flex: 0 0 auto;
  }

  .app-shell .app-topbar,
  .app-shell[data-pref-page] .app-topbar {
    min-height: 0;
    height: auto;
    padding: 14px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    align-items: center;
  }

  .app-shell .app-topbar__title--inline {
    font-size: 18px;
    line-height: 1.25;
    column-gap: 0;
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  .app-shell .notify,
  .app-shell[data-pref-page] .notify {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    margin-top: 0;
  }

  .app-shell .notify__btn,
  .app-shell[data-pref-page] .notify__btn {
    width: 50px;
    height: 50px;
  }

  .app-shell .notify__bell,
  .app-shell .notify__bell img {
    width: 30px;
    height: 30px;
  }

  .app-shell[data-pref-page] .notify__panel {
    right: 0;
    left: auto;
    min-width: 0;
    width: min(280px, calc(100vw - 32px));
  }

  .app-shell[data-pref-page] .pref-content {
    padding: 18px 20px 36px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .app-shell[data-pref-page] .pref-grid,
  .app-shell[data-pref-page] .etapa-grid,
  .modal-pref__box--form .pref-grid,
  .modal-pref__box--form .edit-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .app-shell[data-pref-page] .pref-field,
  .app-shell[data-pref-page] .pref-field--2,
  .app-shell[data-pref-page] .pref-field--3,
  .app-shell[data-pref-page] .pref-field--4,
  .app-shell[data-pref-page] .pref-field--6,
  .app-shell[data-pref-page] .aee-certificado,
  .app-shell[data-pref-page] .form-block__subhead,
  .modal-pref .pref-field,
  .modal-pref .pref-field--2,
  .modal-pref .pref-field--3,
  .modal-pref .pref-field--4,
  .modal-pref .pref-field--6,
  .modal-pref .aee-certificado,
  .modal-pref .form-block__subhead {
    grid-column: 1 / -1;
    width: 100%;
  }

  .app-shell .inclusion-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title title"
      "bar pct";
    column-gap: 10px;
    row-gap: 12px;
    align-items: center;
    margin-bottom: 24px;
  }

  .app-shell .inclusion-progress:has(+ .muni-page-lead) {
    margin-bottom: 0;
  }

  .app-shell .inclusion-progress__row {
    display: contents;
  }

  .app-shell .inclusion-progress__row h2 {
    grid-area: title;
    flex: none;
    min-width: 0;
    font-size: 18px;
    line-height: 1.35;
  }

  .app-shell .inclusion-progress__track {
    grid-area: bar;
    width: 100%;
    height: 20px;
    border: 0;
    border-radius: 10px;
    background: #d2e8f5;
  }

  .app-shell .inclusion-progress__value {
    grid-area: pct;
    flex: none;
    align-self: center;
    margin: 0;
    padding: 0;
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
    color: var(--primary-mid);
  }

  .app-shell[data-pref-page] #aviso-iniciar {
    font-size: 12.8px;
  }

  .app-shell[data-pref-page] .pref-intro {
    margin-top: 0;
    font-size: 16px;
    line-height: 1.45;
  }

  .app-shell[data-pref-page] .pref-page-intro {
    margin-top: 0;
  }

  .app-shell[data-pref-page] .pref-page-intro h2 {
    font-size: 20px;
  }

  .app-shell[data-pref-page] .pref-page-intro p {
    font-size: 15px;
    max-width: none;
  }

  .app-shell[data-pref-page] .escola-hero {
    margin: 32px 0 64px;
  }

  .app-shell[data-pref-page] .escola-hero img {
    width: 160px;
    height: 160px;
  }

  .app-shell[data-pref-page] .escola-hero h2 {
    font-size: 22px;
  }

  .app-shell[data-pref-page] .escola-hero__lead,
  .app-shell[data-pref-page] .escola-hero p {
    font-size: 15px;
  }

  .app-shell[data-pref-page] .form-block {
    margin-top: 0;
    padding: 18px 16px;
  }

  .app-shell[data-pref-page] .form-block__title {
    font-size: 18px;
  }

  .app-shell[data-pref-page] .form-block__lead {
    font-size: 14px;
  }

  .app-shell[data-pref-page] .form-block__subhead {
    margin: 4px 0 0;
    font-size: 16px;
  }

  .app-shell[data-pref-page] .label--muted,
  .modal-pref .label--muted {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #465f78;
  }

  .app-shell[data-pref-page] .label--question {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #142d46;
  }

  .app-shell[data-pref-page] .input--compact,
  .app-shell[data-pref-page] .select.input--compact,
  .modal-pref .input--compact,
  .modal-pref .select.input--compact {
    height: 48px;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
    line-height: 22px;
    border-radius: 10px;
  }

  .app-shell[data-pref-page] .select.input--compact,
  .modal-pref .select.input--compact,
  .accounts-filters .select.input--compact {
    padding-right: 36px;
  }

  .app-shell[data-pref-page] input[type="date"].input,
  .modal-pref input[type="date"].input {
    min-height: 48px;
    font-size: 16px;
  }

  .app-shell[data-pref-page] input[type="date"]::-webkit-date-and-time-value,
  .modal-pref input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
  }

  .app-shell[data-pref-page] .input--area {
    min-height: 96px;
    font-size: 16px;
  }

  .app-shell[data-pref-page] .choice-row,
  .modal-pref .choice-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    align-items: stretch;
  }

  .app-shell[data-pref-page] .choice-col,
  .modal-pref .choice-col {
    gap: 8px;
  }

  .app-shell[data-pref-page] .choice,
  .modal-pref .choice {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #c8dceb;
    border-radius: 10px;
    background: #f7fbfe;
    font-size: 15px;
    line-height: 1.3;
    color: #142d46;
    text-align: left;
  }

  .app-shell[data-pref-page] .choice input,
  .modal-pref .choice input {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }

  .app-shell[data-pref-page] .choice span,
  .modal-pref .choice span {
    min-width: 0;
  }

  .app-shell[data-pref-page] .pref-form-actions,
  .modal-pref .pref-form-actions {
    justify-content: stretch;
  }

  .app-shell[data-pref-page] .btn-add,
  .app-shell[data-pref-page] .btn-ghost-pref {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }

  .app-shell[data-pref-page] .btn-start,
  .app-shell[data-pref-page] .btn-wide {
    min-height: 52px;
    font-size: 18px;
  }

  .app-shell[data-pref-page] .etapa-card {
    min-height: 0;
    padding: 24px 16px;
    gap: 14px;
  }

  .app-shell[data-pref-page] .etapa-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 36px;
    font-size: 30px;
  }

  .app-shell[data-pref-page] .etapa-card h3 {
    font-size: 17px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .app-shell[data-pref-page] .etapa-card__pct,
  .app-shell[data-pref-page] .etapa-card__go {
    font-size: 18px;
  }

  .app-shell[data-pref-page] .etapa-card__status {
    font-size: 16px;
  }

  .app-shell[data-pref-page] .member-card,
  .app-shell[data-pref-page] .user-row {
    flex-direction: column;
    max-width: none;
    padding: 14px;
    gap: 12px;
  }

  .app-shell[data-pref-page] .member-card__info,
  .app-shell[data-pref-page] .user-row__info {
    width: 100%;
  }

  .app-shell[data-pref-page] .member-card__body h4,
  .app-shell[data-pref-page] .user-row__body h4 {
    font-size: 16px;
    overflow-wrap: break-word;
  }

  .app-shell[data-pref-page] .member-card__meta,
  .app-shell[data-pref-page] .user-row__meta {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .app-shell[data-pref-page] .member-card__actions,
  .app-shell[data-pref-page] .user-row__actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .app-shell[data-pref-page] .btn-text {
    flex: 1 1 calc(50% - 8px);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
  }

  .app-shell[data-pref-page] .member-card__actions .btn-text:first-child:nth-last-child(n + 3) {
    flex: 1 1 100%;
  }

  .app-shell[data-pref-page] .upload-drop {
    min-height: 128px;
    padding: 16px 12px;
  }

  .app-shell[data-pref-page] .upload-drop strong {
    font-size: 15px;
  }

  .app-shell[data-pref-page] .upload-drop span {
    font-size: 13px;
    line-height: 1.4;
  }

  .app-shell[data-pref-page] .tox-tinymce {
    max-width: 100%;
  }

  .app-shell[data-pref-page] .rte-footer {
    align-items: flex-start;
  }

  .app-shell[data-pref-page] .rte-footer .editor-count {
    text-align: right;
  }

  .modal-pref {
    padding: 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    align-items: flex-end;
  }

  .modal-pref__box,
  .modal-pref__box--sm,
  .modal-pref__box--form {
    width: 100%;
    max-height: min(92dvh, calc(100dvh - 24px));
    overflow: auto;
    padding: 24px 16px 20px;
  }

  .modal-pref__box h2,
  .modal-pref__box--form h2 {
    font-size: 22px;
    padding-right: 36px;
  }

  .modal-pref__art,
  .modal-pref__art img {
    width: 140px;
    height: 140px;
  }

  .modal-pref__art {
    margin-bottom: 16px;
  }

  .modal-pref__fields {
    margin: 16px 0 20px;
  }

  .modal-pref__actions,
  .modal-editar-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }

  .modal-pref__actions .btn,
  .modal-editar-actions .btn,
  .modal-editar-actions .btn-ghost,
  .modal-editar-actions .btn-navy,
  .modal-editar-actions .btn-danger {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }

  .btn-modal {
    min-height: 52px;
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  .app-shell .app-topbar__title--inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 17px;
    line-height: 1.3;
  }

  .app-shell .app-topbar__sep {
    display: none;
  }

  .app-shell .app-topbar__muni {
    font-size: 13px;
    font-weight: 600;
    color: #5a738c;
  }

  .app-shell .app-topbar__page {
    font-size: 17px;
    font-weight: 700;
  }

  .app-shell .inclusion-progress {
    margin-bottom: 24px;
    row-gap: 12px;
  }

  .app-shell:not([data-pref-page]) .inclusion-progress {
    margin-bottom: 32px;
  }

  .app-shell .inclusion-progress:has(+ .muni-page-lead) {
    margin-bottom: 0;
  }

  .app-shell .inclusion-progress__row h2 {
    font-size: 16px;
  }

  .app-shell .inclusion-progress__value {
    font-size: 22px;
    line-height: 1;
    margin: 0;
  }

  .app-shell[data-pref-page] .choice-row,
  .modal-pref .choice-row {
    grid-template-columns: 1fr;
  }

  .app-shell[data-pref-page] .member-card__actions .btn-text {
    flex: 1 1 calc(50% - 8px);
  }

  #modal-editar-usuario-pref.is-open {
    display: block;
    background: #f4f8fb;
    overflow: auto;
    padding: 16px 16px 32px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  #modal-editar-usuario-pref .modal-pref__close {
    display: none;
  }

  #modal-editar-usuario-pref .modal-pref__box--form {
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  #modal-editar-usuario-pref h2,
  #modal-editar-usuario-pref .modal-pref__box--form h2 {
    font-size: 18px;
    font-weight: 600;
    color: #142d46;
    padding-right: 0;
  }

  #modal-editar-usuario-pref .modal-pref__lead,
  #modal-editar-usuario-pref .modal-pref__box p:not(.error-text):not(.field-hint) {
    margin: 8px 0 16px;
    font-size: 13px;
    font-weight: 400;
    color: #5a738c;
    text-align: left;
  }

  #modal-editar-usuario-pref .label--muted {
    font-size: 12px;
    font-weight: 400;
    color: #5a738c;
  }

  #modal-editar-usuario-pref .input--compact,
  #modal-editar-usuario-pref .select.input--compact {
    height: 36px;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 19px;
    border-radius: 6px;
  }

  #modal-editar-usuario-pref .select.input--compact {
    padding-right: 32px;
  }

  #modal-editar-usuario-pref .modal-editar-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #f4f8fb;
    padding-top: 12px;
    padding-bottom: 8px;
  }

  #modal-editar-usuario-pref .modal-editar-actions .btn {
    width: auto;
    min-height: 36px;
  }

  .modal.modal-ficha.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .app-nav-toggle,
  .app-sidebar__nav .app-nav {
    font-size: 15px;
  }
}
