/* Login, formulários, dashboard e cards — densidade só onde o teste precisa. */

.auth-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 10% -10%, var(--bg-accent), transparent 60%),
    var(--bg);
}

.auth-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 14px 0 4px;
  font-size: 22px;
}

.auth-card .lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.auth-tabs button {
  flex: 1;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.auth-tabs button.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--surface-2);
}

.field textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-hint {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
}

.auth-privacy {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 8px;
  padding: 10px 12px;
}

.auth-error {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.auth-theme {
  position: fixed;
  top: 16px;
  right: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.panel + .panel {
  margin-top: 12px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.stat-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0.02em;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.stat-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.share-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.share-banner p {
  margin: 0;
  font-size: 13px;
  max-width: 520px;
}

.share-banner code {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  word-break: break-all;
}

.privacy-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  border: 1px solid transparent;
  font-size: 13px;
  color: var(--text);
}

.privacy-banner strong {
  color: var(--warn);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.carteirinha-preview {
  max-width: 360px;
  margin: 0 auto;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.carteirinha-preview .cart-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.carteirinha-preview .cart-photo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
}

.carteirinha-preview h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.carteirinha-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.grade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.grade-table th,
.grade-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

.grade-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.grade-table td.slot {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

.grade-table--dia {
  max-width: 560px;
}

.grade-dia-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.grade-visao {
  position: relative;
  margin-left: auto;
}

.grade-visao__btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.grade-visao__btn:hover,
.grade-visao__btn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent);
  background: var(--accent-soft);
}

.grade-visao__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 160px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--chrome);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.grade-visao__menu[hidden] {
  display: none !important;
}

.grade-visao__menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.grade-visao__menu a:hover,
.grade-visao__menu a.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.grade-mes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.grade-mes__head,
.grade-mes__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.grade-mes__head span {
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.grade-mes__day {
  min-height: 88px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.grade-mes__day.is-empty {
  background: transparent;
  border-color: transparent;
}

.grade-mes__day.is-hoje {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}

.grade-mes__num {
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 4px;
}

.grade-mes__itens {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.grade-mes__itens li {
  font-size: 10px;
  line-height: 1.25;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grade-mes__itens li em {
  font-style: normal;
  font-weight: 750;
  margin-right: 2px;
}

.grade-mes__itens li.is-lotada {
  color: #b45309;
  background: color-mix(in srgb, #f59e0b 18%, transparent);
}

.grade-mes__more {
  background: transparent !important;
  color: var(--muted) !important;
  padding: 0 !important;
  font-weight: 650;
}

table.data .col-actions {
  width: 72px;
  text-align: center;
  white-space: nowrap;
}

.lista-presenca {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  background: #fff;
  color: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.lista-presenca__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #111;
}

.lista-presenca__brand {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #555;
  margin-bottom: 4px;
}

.lista-presenca__head h1 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #111;
}

.lista-presenca__head p {
  margin: 0;
  font-size: 13px;
  color: #444;
}

.lista-presenca__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #333;
  text-align: right;
}

.lista-presenca__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.lista-presenca__table th,
.lista-presenca__table td {
  border: 1px solid #bbb;
  padding: 7px 8px;
  text-align: left;
}

.lista-presenca__table th {
  background: #eee;
  font-weight: 700;
}

.lista-presenca__table .col-n {
  width: 40px;
  text-align: center;
}

.lista-presenca__table .col-check {
  width: 72px;
  text-align: center;
  font-size: 16px;
}

.lista-presenca__foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 36px;
}

.lista-presenca__foot span {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 28px;
}

.lista-presenca__linha {
  border-bottom: 1px solid #333;
  height: 1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .grade-mes__day {
    min-height: 64px;
  }

  .grade-mes__itens li {
    font-size: 9px;
  }
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th,
table.data td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

table.data th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.back:hover {
  color: var(--text);
  text-decoration: none;
}

.dash-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.dash-action {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.dash-action:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.dash-action i {
  color: var(--accent);
  font-size: 18px;
}

.dash-action strong {
  font-size: 15px;
}

.dash-action span {
  color: var(--muted);
  font-size: 13px;
}

.form-cadastro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1080px;
}

.cad-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.cad-section-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.cad-section-h h2 {
  margin: 0;
  font-size: 15px;
}

.cad-section-h i {
  color: var(--muted);
}

/* Chrome de pagina (mesmo do painel Next) */
.page-sec {
  min-width: 0;
  margin-bottom: 14px;
}

.page-sec > .dash-sec-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 12px;
  min-height: 36px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: color-mix(in srgb, var(--chrome) 78%, transparent);
  color: var(--text);
}

.page-sec > .dash-sec-h .dash-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-sec > .dash-sec-h .dash-label i {
  color: var(--muted);
}

.page-sec > .dash-sec-body {
  padding: 12px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
}

.search-bar-filters {
  flex-wrap: wrap;
  height: auto;
  min-height: 34px;
  padding: 8px;
  gap: 8px;
}

.search-bar-filters select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  min-width: 140px;
}

.search-bar-filters--sm {
  margin: 0 0 10px;
  padding: 4px;
  gap: 6px;
  min-height: 0;
  align-items: center;
}

.search-bar-filters--sm input[type="search"] {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
  min-width: 140px;
  flex: 1 1 160px;
}

.search-bar-filters--sm select {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
  min-width: 110px;
  flex: 0 1 auto;
}

.search-bar-filters--sm .btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.vaga-resumo {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.vaga-resumo--inline {
  margin: 0;
  margin-left: auto;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}

.vaga-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.vaga-bar small {
  font-size: 11px;
  color: var(--muted);
}

.vaga-bar-track {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  overflow: hidden;
}

.vaga-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.vaga-bar-fill.is-media {
  background: var(--warn);
}

.vaga-bar-fill.is-alta {
  background: color-mix(in srgb, var(--danger) 80%, var(--warn));
}

.grade-table td.slot.is-lotada {
  background: var(--warn-soft);
  color: var(--warn);
}

/* Grade atendimento — cards de atividades */
.grade-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.grade-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 128px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.grade-card.is-glass {
  background: var(--modal-card, var(--surface));
}

.grade-card:hover {
  border-color: var(--accent);
  background: var(--modal-card-h, var(--surface-2));
}

.grade-card__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
}

.grade-card__nome {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.grade-card__meta {
  font-size: 12px;
  color: var(--muted);
}

.grade-card__status {
  margin-top: auto;
}

.ativ-turmas {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ativ-turma {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.ativ-turma__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ativ-turma__top strong {
  display: block;
  font-size: 14px;
}

.ativ-turma__top small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.ativ-turma__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.ativ-turma__grid dt {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.ativ-turma__grid dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 650;
}

.mh2-modal__header--chrome {
  background: color-mix(in srgb, var(--chrome) 78%, transparent);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mh2-modal__header--chrome h2,
.mh2-modal__header--chrome .icon-btn {
  color: var(--text);
}

.mh2-modal__header--chrome .icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.cad-grid {
  display: grid;
  gap: 12px;
}

.cad-grid.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cad-grid.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cad-grid.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.field-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.verificar-box {
  margin-bottom: 18px;
}

.verificar-resultados {
  margin-top: 12px;
}

.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.search-bar input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface-2);
}

.mh2-modal__dialog--ficha {
  width: min(760px, 100%);
}

.ficha-top {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.ficha-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
}

.ficha-id h2 {
  margin: 0;
  font-size: 20px;
}

.ficha-id p {
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.ficha-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ficha-footer-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Abas da ficha — mesmo padrao do Next (config-tabs) */
.config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.config-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.config-tab:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.config-tab.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
}

.mh2-modal--ficha .mh2-modal__dialog--ficha {
  width: min(860px, 100%);
  height: min(88dvh, 820px);
  max-height: min(88dvh, 820px);
}

.mh2-modal__body--ficha {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  padding: 0;
}

.mh2-modal--ficha .cad-ficha-top {
  flex-shrink: 0;
  margin: 14px 16px 8px;
}

.mh2-modal--ficha .cad-ficha-tabs {
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--chrome) 78%, transparent);
}

.mh2-modal--ficha .cad-ficha-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 14px 16px 18px;
  background: transparent;
}

.cad-ficha-subh {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.cad-parq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.cad-parq-q:last-child {
  border-bottom: 0;
}

.cad-ficha-empty {
  padding: 12px 0;
}

.mh2-modal--ficha .mh2-modal__footer {
  flex-shrink: 0;
  min-height: 56px;
  align-items: center;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  font-size: 14px;
  margin: 0;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 550;
}

.doc-list,
.class-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-list li,
.class-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.doc-list li:last-child,
.class-list li:last-child {
  border-bottom: 0;
}

.person-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.person-cell strong {
  font-weight: 650;
}

.person-cell small {
  color: var(--muted);
}

@media (max-width: 640px) {
  .kv {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
}

.muted { color: var(--muted); font-size: 13px; }

/* Modal carteirinha (estilo Next) + folha branca */
body.modal-open {
  overflow: hidden;
}

.mh2-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--overlay);
}

#modal-carteirinha-ficha {
  z-index: 95;
}

.mh2-modal[hidden] {
  display: none !important;
}

.mh2-modal__dialog {
  width: min(640px, 100%);
  max-height: min(90dvh, 900px);
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--chrome) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mh2-modal__dialog--sheet {
  width: min(720px, 100%);
}

.mh2-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  min-height: 40px;
  border-bottom: 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 88%, transparent) 0%,
    color-mix(in srgb, var(--accent-hover) 88%, transparent) 100%
  );
  color: #fff;
  flex-shrink: 0;
}
.mh2-modal__header h2,
.mh2-modal__header .icon-btn {
  color: #fff;
}
.mh2-modal__header .icon-btn:hover {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.mh2-modal__header h2 {
  margin: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mh2-modal__body {
  padding: 16px;
  overflow: auto;
}

.mh2-modal__body--sheet {
  background: #d8dde5;
  padding: 28px 20px;
}

.mh2-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--chrome);
}

.cart-paper {
  background: #ffffff;
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.18);
  padding: 36px 28px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-ficticia {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid #e2e6ee;
  border-radius: 14px;
  padding: 18px 18px 14px;
  color: #1a1a2e;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.06);
}

.cart-ficticia__tag {
  margin: 0 0 14px;
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4e5;
  color: #b86a00;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.cart-ficticia__row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-ficticia__avatar {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  background: #eef6ff;
  border: 1px solid #d7e6f5;
  flex-shrink: 0;
  transform: perspective(420px) rotateY(-8deg) rotateX(4deg);
  box-shadow:
    8px 10px 0 rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(0, 90, 160, 0.18);
}

.cart-ficticia__meta {
  flex: 1;
  min-width: 0;
}

.cart-ficticia__unidade {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: #0077cc;
  letter-spacing: 0.02em;
}

.cart-ficticia__meta h3 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
  color: #152033;
}

.cart-ficticia__social {
  margin: 0 0 6px;
  font-size: 13px;
  color: #6b7280;
}

.cart-ficticia__num {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: #0b6e99;
  letter-spacing: 0.02em;
}

.cart-ficticia__qr {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.cart-ficticia__foot {
  margin: 14px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 860px) {
  .cad-grid.g-2,
  .cad-grid.g-3,
  .cad-grid.g-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-ficticia__row {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .cart-ficticia__meta {
    order: 3;
    width: 100%;
  }

  .cart-paper {
    padding: 20px 14px;
  }
}

@media print {
  .sidebar,
  .topbar,
  .app-footer,
  .privacy-banner,
  .share-banner,
  .flash,
  .no-print,
  .palette {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .content {
    padding: 0;
  }

  .carteirinha-card {
    box-shadow: none;
    border: 1px solid #333;
  }

  .lista-presenca {
    border: 0;
    border-radius: 0;
    max-width: none;
    padding: 0;
  }

  body {
    background: #fff;
  }
}

/* ===== Dashboard — chrome alinhado ao MH2EDU-NEXT ===== */

.dash-menu {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
  min-height: 0;
}

.dash-menu-main,
.dash-menu-side {
  min-width: 0;
}

.dash-menu-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-menu-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  max-height: calc(100dvh - var(--header-h) - 80px);
  overflow: auto;
}

.dash-menu .dash-section,
.dash-menu .dash-side-block {
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
}

/* Header das seções: chrome sutil (NÃO faixa azul do legado) */
.dash-menu .dash-sec-h,
.dash-menu .dash-feitos-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 12px;
  min-height: 36px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: color-mix(in srgb, var(--chrome) 78%, transparent);
  color: var(--text);
}

.dash-menu .dash-sec-body {
  padding: 12px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
}

.dash-menu .dash-sec-h .dash-label,
.dash-menu .dash-feitos-h .dash-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-menu .dash-sec-h .dash-label i,
.dash-menu .dash-feitos-h .dash-label i {
  color: var(--muted);
  margin-right: 0;
}

.dash-subh {
  margin: 16px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.dash-feitos-h,
.dash-sec-h {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-label {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.dash-acesso-grid {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}

.dash-acesso-grid .quick-card {
  min-height: 86px;
  padding: 10px 8px;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.dash-acesso-grid .quick-card span {
  color: color-mix(in srgb, var(--accent) 50%, var(--text));
  white-space: nowrap;
  font-weight: 650;
}

.dash-acesso-grid .quick-card small {
  color: var(--muted);
  font-size: 12px;
}

.dash-acesso-grid .quick-card i {
  color: var(--text);
  font-size: 18px;
}

.quick-card,
.stat-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.quick-card.is-glass,
.stat-card.is-glass,
.table-wrap.is-glass {
  background: var(--modal-card, var(--surface));
  border-color: var(--border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.quick-card.is-glass:hover,
.stat-card.is-glass:hover {
  background: var(--modal-card-h, var(--surface-2));
  border-color: var(--accent);
  text-decoration: none;
}

.quick-card {
  padding: 14px;
  gap: 6px;
  min-height: 108px;
}

.dash-menu .dash-feitos-grid {
  width: 100%;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.page-sec .dash-feitos-grid {
  width: 100%;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.page-sec .dash-feitos-grid .dash-pie-card {
  max-width: none;
  min-width: 0;
  padding: 10px 8px 8px;
  gap: 6px;
  align-items: center;
  text-align: center;
  background: transparent;
  border-color: transparent;
}

.page-sec .dash-feitos-grid .stat-pie-wrap {
  width: 84px;
  height: 84px;
  max-width: 84px;
  max-height: 84px;
  flex: 0 0 84px;
  position: relative;
}

.page-sec .dash-feitos-grid .stat-pie {
  display: block;
  width: 84px;
  height: 84px;
  transform: rotate(-90deg);
}

.page-sec .dash-feitos-grid .stat-pie-n {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.page-sec .dash-feitos-grid .stat-title {
  font-size: 12px;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.page-sec .dash-feitos-grid .stat-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.stats-atendentes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-atendente__h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stats-atendente__h strong {
  font-size: 14px;
}

/* Taxa de evasão — um donut multi-fatia por dimensão */
.evasao-charts {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.evasao-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--modal-card, var(--surface));
  text-align: center;
}

.evasao-chart .stat-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.evasao-pie-wrap {
  width: 120px;
  height: 120px;
  max-width: 120px;
  max-height: 120px;
  flex: 0 0 120px;
  position: relative;
}

.evasao-pie-wrap .stat-pie {
  display: block;
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.evasao-pie-wrap .stat-pie-n {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  pointer-events: none;
}

.evasao-seg {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: butt;
  cursor: pointer;
  transition: stroke-width 0.12s ease, opacity 0.12s ease;
}

.evasao-seg:hover {
  stroke-width: 4.2;
  opacity: 0.92;
}

.evasao-legenda {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.evasao-legenda li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.evasao-legenda i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.evasao-legenda span {
  flex: 1;
  color: var(--text);
  font-weight: 550;
}

.evasao-legenda em {
  font-style: normal;
  font-weight: 700;
  color: var(--text);
}

.evasao-float-tip {
  position: fixed;
  z-index: 200;
  max-width: 240px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--chrome);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.evasao-float-tip[hidden] {
  display: none !important;
}

.dash-menu .dash-feitos-grid .dash-pie-card {
  max-width: none;
  min-width: 0;
  padding: 10px 8px 8px;
  gap: 6px;
  align-items: center;
  text-align: center;
  background: transparent;
  border-color: transparent;
}

.dash-menu .dash-feitos-grid .stat-card.is-glass:hover {
  background: color-mix(in srgb, var(--surface) 24%, transparent);
  border-color: transparent;
}

.dash-menu .dash-feitos-grid .stat-pie-wrap {
  width: 84px;
  height: 84px;
  max-width: 84px;
  max-height: 84px;
  flex: 0 0 84px;
  position: relative;
}

.dash-menu .dash-feitos-grid .stat-pie {
  display: block;
  width: 84px;
  height: 84px;
  transform: rotate(-90deg);
}

.dash-menu .dash-feitos-grid .stat-pie-n {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.dash-menu .dash-feitos-grid .stat-title {
  font-size: 12px;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.dash-menu .dash-feitos-grid .stat-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.stat-pie-track,
.stat-pie-value {
  fill: none;
  stroke-width: 3.2;
}

.stat-pie-track {
  stroke: color-mix(in srgb, var(--text) 11%, transparent);
}

.stat-pie-value {
  stroke: var(--stat-cor, var(--accent));
  stroke-linecap: round;
}

.dash-piscina-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.dash-piscina-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.dash-piscina-item:nth-child(odd) {
  padding-left: 2px;
  padding-right: 12px;
  border-right: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
}

.dash-piscina-item:nth-child(-n + 2) {
  border-bottom: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
}

.dash-piscina-item .stat-title {
  font-size: 11px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 550;
}

.dash-piscina-valor {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.dash-piscina-item.is-aberto .dash-piscina-valor {
  color: color-mix(in srgb, var(--accent) 45%, var(--text));
}

.dash-piscina-item.is-fechado .dash-piscina-valor {
  color: #f87171;
}

.dash-piscina-atualizado {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.dash-espacos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-espaco {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 52px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 0;
  background: transparent;
}

.dash-espaco:last-child {
  border-bottom: 0;
}

.dash-espaco.is-aberto .pill-ok {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: color-mix(in srgb, var(--accent) 50%, var(--text));
}

.dash-espaco-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
}

.dash-espaco-top strong {
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-espaco small {
  display: block;
  margin-top: 3px;
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-avisos {
  list-style: none;
  margin: 0;
  padding: 0;
}

.table-wrap.is-glass {
  border-radius: var(--radius);
  overflow: auto;
}

@media (max-width: 1100px) {
  .dash-menu {
    grid-template-columns: 1fr;
  }
  .dash-menu-side {
    position: static;
    max-height: none;
  }
}

