@import url("pwa.css");

:root {
  --afa-dark: #1a1a1a;
  --afa-orange: #ff6b00;
  --afa-orange-hover: #e55d00;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* Navbar */
.app-navbar {
  background-color: var(--afa-dark) !important;
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
}

.app-navbar .container,
.app-navbar .container-fluid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.navbar-logo,
.navbar-brand img,
.app-navbar .navbar-brand img {
  height: clamp(48px, 12vw, 90px);
  width: auto;
  max-width: min(200px, 55vw);
  object-fit: contain;
  margin: 0;
}

/* Botões da marca */
.btn-afa-primary,
.btn-primary.afa,
.btn-success.afa {
  background-color: var(--afa-orange);
  border-color: var(--afa-orange);
  color: #fff;
}

.btn-afa-primary:hover,
.btn-primary.afa:hover,
.btn-success.afa:hover {
  background-color: var(--afa-orange-hover);
  border-color: var(--afa-orange-hover);
  color: #fff;
}

.btn-afa-dark {
  background-color: var(--afa-dark);
  border-color: var(--afa-dark);
  color: #fff;
}

.btn-afa-dark:hover {
  background-color: #333;
  border-color: #333;
  color: #fff;
}

/* Cabeçalho de página */
.page-header {
  gap: 0.75rem;
}

.page-header h1,
.page-header h2 {
  font-size: clamp(1.25rem, 4.5vw, 1.75rem);
  margin-bottom: 0;
  word-break: break-word;
}

.page-header .btn-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .page-header .btn-group-actions {
    width: auto;
    justify-content: flex-end;
  }
}

.page-header .btn-group-actions .btn {
  flex: 1 1 auto;
}

@media (min-width: 768px) {
  .page-header .btn-group-actions .btn {
    flex: 0 0 auto;
  }
}

.relatorio-treino-accordion .accordion-button {
  gap: 0.5rem;
  font-weight: 600;
}

.relatorio-treino-accordion .relatorio-aluno-nome {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relatorio-treino-accordion .accordion-button .badge {
  flex-shrink: 0;
}

.btn-afa {
  background-color: #ff6b00;
  border-color: #ff6b00;
  color: #fff;
}

.btn-afa:hover {
  background-color: #e55f00;
  border-color: #e55f00;
  color: #fff;
}

.relatorio-alunos-table td {
  vertical-align: middle;
}

.relatorio-aluno-icone {
  color: var(--afa-orange);
}

.relatorio-aluno-card-header {
  margin-bottom: 0.65rem;
}

.relatorio-aluno-card-header .painel-lista-card-titulo {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 1.05rem;
  line-height: 1.35;
  word-break: break-word;
}

.relatorio-aluno-stats {
  grid-template-columns: 1fr 1fr;
}

.relatorio-aluno-acoes .btn {
  min-height: 40px;
  font-weight: 600;
}

@media (max-width: 767.98px) {
  .relatorio-alunos-mobile {
    margin-bottom: 0.5rem;
  }

  body.painel-shell-page .relatorio-alunos-table {
    display: none;
  }
}

.relatorio-aluno-hero {
  border-left: 4px solid #ff6b00;
}

.relatorio-stat-card .relatorio-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.relatorio-stat-card .relatorio-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* Fichas / modelos / plano do aluno */
body.painel-shell-page .dia-semana,
.dia-semana {
  background-color: #1a1a1a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

body.painel-shell-page .dia-semana h4,
.dia-semana h4 {
  margin: 0;
  font-size: 1rem;
}

body.painel-shell-page .exercicio-card,
body.painel-shell-page .item-card {
  border-left: 4px solid #ff6b00;
  margin-bottom: 0.5rem;
}

.plano-card {
  border-left: 4px solid #ff6b00;
}

.ficha-card {
  border-left: 4px solid #1a1a1a;
}

.plano-beneficios {
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

body.painel-shell-page .plano-beneficios {
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.85);
}

.exercicio-ficha-row {
  border-left: 3px solid #ff6b00;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: #f5f5f7;
}

body.painel-shell-page .exercicio-ficha-row {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
}

.exercicio-ficha-row:last-child {
  margin-bottom: 0;
}

body.painel-shell-page .actions-cell,
body.painel-shell-page .modelo-item-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.relatorio-freq-dias {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.relatorio-dia-bloco {
  border-bottom: 1px solid #dee2e6;
}

.relatorio-dia-bloco:last-child {
  border-bottom: none;
}

.relatorio-dia-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

/* Painel admin / instrutor — mesmo visual do aluno */
body.painel-shell-page {
  position: relative;
  isolation: isolate;
  background: linear-gradient(165deg, var(--afa-dark) 0%, #221c18 42%, #2a221c 100%);
  min-height: 100dvh;
  color: #f5f5f7;
  color-scheme: dark;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Laranja só no rodapé — ::after evita conflito com body::before (notch) do PWA */
body.painel-shell-page::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  height: min(26vh, 180px);
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    to top,
    rgba(255, 107, 0, 0.55) 0%,
    rgba(255, 107, 0, 0.2) 55%,
    transparent 100%
  );
}

html.painel-html,
html:has(body.painel-shell-page) {
  background-color: #121214;
  color-scheme: dark;
}

body.painel-shell-page .aluno-header:not(.is-scrolled) .aluno-header-logo {
  height: clamp(40px, 9vw, 52px);
  max-width: min(150px, 42vw);
}

body.painel-shell-page .painel-shell-content {
  position: relative;
  z-index: 2;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-top: calc(6.25rem + env(safe-area-inset-top)) !important;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom)) !important;
}

@media (max-width: 767.98px) {
  body.painel-shell-page .aluno-header:not(.is-scrolled) .aluno-header-logo {
    height: clamp(36px, 11vw, 48px) !important;
    max-width: min(130px, 40vw) !important;
  }

  body.painel-shell-page .aluno-header-inner {
    margin-left: 0.65rem;
    margin-right: 0.65rem;
  }

  body.painel-shell-page .painel-shell-content.container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
}

body.painel-shell-page.aluno-header-scrolled .painel-shell-content {
  padding-top: calc(5rem + env(safe-area-inset-top)) !important;
}

body.painel-shell-page .page-header,
body.painel-shell-page .alert {
  position: relative;
  z-index: 2;
}

body.painel-shell-page .painel-voltar-bar {
  position: sticky;
  top: calc(5.25rem + env(safe-area-inset-top, 0px));
  z-index: 100;
  margin: -0.5rem 0 1rem;
  padding: 0.35rem 0;
  background: linear-gradient(
    to bottom,
    #1a1a1a 0%,
    rgba(26, 26, 26, 0.92) 70%,
    transparent 100%
  );
}

body.painel-shell-page.aluno-header-scrolled .painel-voltar-bar {
  top: calc(4.5rem + env(safe-area-inset-top, 0px));
}

body.painel-shell-page .painel-voltar-bar .btn-voltar-painel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  position: relative;
  z-index: 101;
}

body.painel-shell-page .aluno-drawer-link .bi {
  opacity: 0.85;
}

body.painel-shell-page .page-header h1,
body.painel-shell-page .page-header h2 {
  color: #fff;
}

body.painel-shell-page .page-header h1 .bi,
body.painel-shell-page .page-header h2 .bi {
  color: var(--afa-orange);
}

body.painel-shell-page .text-muted {
  color: rgba(255, 255, 255, 0.58) !important;
}

body.painel-shell-page .card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--afa-orange);
  border-radius: 14px;
  color: #f5f5f7;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

body.painel-shell-page .card .card-title {
  color: #fff;
}

body.painel-shell-page .card .card-title .bi {
  color: var(--afa-orange);
}

body.painel-shell-page .card .card-text {
  color: rgba(255, 255, 255, 0.72);
}

body.painel-shell-page .card-header {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.painel-shell-page .list-group-item {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

body.painel-shell-page .form-label {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

body.painel-shell-page .form-control,
body.painel-shell-page .form-select {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.painel-shell-page .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

body.painel-shell-page .form-control:focus,
body.painel-shell-page .form-select:focus {
  background: rgba(0, 0, 0, 0.38);
  border-color: var(--afa-orange);
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.25);
}

body.painel-shell-page .form-select option {
  background: #1a1a1a;
  color: #fff;
}

body.painel-shell-page .input-group-text {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
}

body.painel-shell-page .painel-text-muted {
  color: rgba(255, 255, 255, 0.55) !important;
}

body.painel-shell-page .table,
body.painel-shell-page .painel-data-table {
  --bs-table-color: #f2f2f4;
  --bs-table-bg: #262220;
  --bs-table-striped-color: #f2f2f4;
  --bs-table-striped-bg: #2f2b28;
  --bs-table-hover-color: #fff;
  --bs-table-hover-bg: rgba(255, 107, 0, 0.18);
  --bs-table-border-color: rgba(255, 255, 255, 0.12);
  color: #f2f2f4;
}

body.painel-shell-page .painel-data-table thead th {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

body.painel-shell-page .painel-data-table tbody td {
  color: #f2f2f4;
  vertical-align: middle;
}

body.painel-shell-page .painel-data-table.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: #2f2b28;
  --bs-table-color-type: #f2f2f4;
  color: #f2f2f4;
  box-shadow: none;
}

body.painel-shell-page .painel-data-table.table-striped > tbody > tr:nth-of-type(even) > * {
  --bs-table-bg-type: #262220;
  --bs-table-color-type: #f2f2f4;
  color: #f2f2f4;
}

/* Lista em cards — mobile */
.painel-lista-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.painel-lista-card {
  background: #262220;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--afa-orange);
  border-radius: 14px;
  padding: 1rem 1rem 0.85rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.painel-lista-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.painel-lista-card-titulo {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  word-break: break-word;
}

.painel-lista-card-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.2);
  color: var(--afa-orange);
  border: 1px solid rgba(255, 107, 0, 0.35);
}

.painel-lista-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
  margin: 0 0 0.85rem;
}

.painel-lista-meta-item dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.15rem;
}

.painel-lista-meta-item dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: #f5f5f7;
  word-break: break-all;
}

.painel-lista-card-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.painel-shell-page .painel-lista-card-acoes .btn,
body.painel-shell-page .painel-lista-card-acoes .btn-sm {
  flex: 1 1 auto;
  min-height: 36px;
  min-width: 0;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
}

body.painel-shell-page .painel-lista-card-acoes .btn .bi {
  font-size: 0.95rem;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  body.painel-shell-page .painel-lista-card-acoes .btn {
    flex: 1 1 calc(50% - 0.2rem);
  }

  body.painel-shell-page .painel-lista-card-acoes .btn-danger {
    flex: 1 1 100%;
  }
}

.painel-lista-vazio {
  margin-top: 0.5rem;
}

.painel-funcao-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
}

.painel-funcao-adm {
  background: rgba(220, 53, 69, 0.35);
  color: #ffc8cf;
  border: 1px solid rgba(220, 53, 69, 0.5);
}

.painel-funcao-instrutor {
  background: rgba(255, 107, 0, 0.25);
  color: #ffd4a8;
  border: 1px solid rgba(255, 107, 0, 0.45);
}

.painel-grupo-badge {
  display: inline-block;
  max-width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 107, 0, 0.2);
  color: #ffd4a8;
  border: 1px solid rgba(255, 107, 0, 0.4);
  word-break: break-word;
  line-height: 1.3;
}

.painel-video-sim {
  color: #7ee787;
  font-weight: 600;
  font-size: 0.88rem;
}

.painel-video-sim-icon {
  color: #7ee787;
  font-size: 1.25rem;
}

.painel-lista-card-exercicio .painel-lista-card-titulo {
  font-size: 0.98rem;
  line-height: 1.35;
}

.painel-lista-card-meta-exercicio {
  grid-template-columns: 1fr;
}

.painel-lista-meta-full {
  grid-column: 1 / -1;
}

.painel-lista-card-meta-treino {
  grid-template-columns: 1fr 1fr;
}

.painel-validade-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  background: rgba(13, 202, 240, 0.2);
  color: #9eeaf9;
  border: 1px solid rgba(13, 202, 240, 0.4);
}

.painel-validade-badge.painel-validade-sem {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.15);
}

.painel-valor-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(25, 135, 84, 0.28);
  color: #9dffc4;
  border: 1px solid rgba(25, 135, 84, 0.5);
  white-space: nowrap;
}

.painel-plano-beneficios,
.painel-plano-beneficios-cell {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.painel-lista-card-header .painel-valor-badge {
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .painel-header-acoes-unica .btn {
    width: 100%;
    min-height: 42px;
  }
}

@media (min-width: 768px) {
  .painel-header-acoes-dupla {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: auto !important;
  }

  .painel-header-acoes-dupla .btn {
    width: auto !important;
    flex: 0 0 auto;
  }
}

@media (max-width: 767.98px) {
  .painel-header-acoes-dupla {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .painel-header-acoes-dupla .btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.88rem;
  }
}

@media (min-width: 768px) {
  .painel-lista-desktop .painel-btn-label {
    display: inline;
  }
}

@media (max-width: 767.98px) {
  body.painel-shell-page::after {
    height: min(14vh, 100px);
  }

  body.painel-shell-page .painel-shell-content {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)) !important;
  }

  body.painel-shell-page .painel-lista-desktop {
    display: none !important;
  }

  body.painel-shell-page .painel-table-wrap {
    overflow: visible;
  }

  body.painel-shell-page .painel-table-wrap table {
    min-width: 0 !important;
  }
}

body.painel-shell-page .accordion-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

body.painel-shell-page .accordion-button {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

body.painel-shell-page .accordion-button:not(.collapsed) {
  background: rgba(255, 107, 0, 0.2);
  color: #fff;
  box-shadow: none;
}

body.painel-shell-page .accordion-button::after {
  filter: invert(1);
}

body.painel-shell-page .btn-primary,
body.painel-shell-page .btn-success {
  background-color: var(--afa-orange);
  border-color: var(--afa-orange);
  color: #fff;
  font-weight: 600;
}

body.painel-shell-page .btn-primary:hover,
body.painel-shell-page .btn-success:hover,
body.painel-shell-page .btn-primary:focus,
body.painel-shell-page .btn-success:focus {
  background-color: var(--afa-orange-hover);
  border-color: var(--afa-orange-hover);
  color: #fff;
}

body.painel-shell-page .btn-secondary,
body.painel-shell-page .btn-outline-dark {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

body.painel-shell-page .btn-secondary:hover,
body.painel-shell-page .btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

body.painel-shell-page .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

body.painel-shell-page .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

body.painel-shell-page .btn-warning,
body.painel-shell-page .btn-info {
  background-color: var(--afa-orange);
  border-color: var(--afa-orange);
  color: #fff;
}

body.painel-shell-page .btn-danger {
  font-weight: 600;
}

body.painel-shell-page .btn-voltar-painel {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

body.painel-shell-page .btn-voltar-painel:hover {
  background: rgba(255, 107, 0, 0.25);
  border-color: rgba(255, 107, 0, 0.5);
  color: #fff;
}

body.painel-shell-page .badge.bg-light,
body.painel-shell-page .badge.bg-white {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

body.painel-shell-page .alert-success {
  background: rgba(25, 135, 84, 0.25);
  border: 1px solid rgba(25, 135, 84, 0.45);
  color: #b8f0d0;
}

body.painel-shell-page .alert-danger {
  background: rgba(220, 53, 69, 0.22);
  border: 1px solid rgba(220, 53, 69, 0.45);
  color: #ffc8cf;
}

body.painel-shell-page .alert-warning {
  background: rgba(255, 193, 7, 0.18);
  border: 1px solid rgba(255, 193, 7, 0.4);
  color: #ffe8a3;
}

body.painel-shell-page .alert-info {
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid rgba(255, 107, 0, 0.35);
  color: rgba(255, 255, 255, 0.9);
}

body.painel-shell-page .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

body.painel-shell-page .modal-content {
  background: #1c1c1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
}

body.painel-shell-page .modal-header,
body.painel-shell-page .modal-footer {
  border-color: rgba(255, 255, 255, 0.1);
}

body.painel-shell-page .aluno-panel,
body.painel-shell-page .painel-hero {
  position: relative;
  z-index: 1;
  background: #262220;
  text-align: center;
}

body.painel-shell-page .painel-hero .aluno-hero-title {
  justify-content: center;
}

.painel-dash-card {
  position: relative;
  z-index: 1;
  background: #262220;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--afa-orange);
  border-radius: 14px;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.painel-dash-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.painel-dash-card-icon {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  color: var(--afa-orange);
  margin-bottom: 0.5rem;
}

.painel-dash-card-title {
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.painel-dash-card-text {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.painel-dash-card .btn {
  align-self: center;
  min-width: min(100%, 12rem);
}

/* Tabelas */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
  .table-responsive table {
    min-width: 560px;
  }

  .table .btn-sm {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
  }

  .table td.text-end,
  .table th.text-end {
    white-space: nowrap;
  }
}

/* Cards e formulários */
.card-body {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.form-control,
.form-select,
.btn {
  min-height: 44px;
}

.btn-sm {
  min-height: 36px;
}

/* Login */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: var(--afa-dark);
  background-image: linear-gradient(
      160deg,
      rgba(26, 26, 26, 0.78) 0%,
      rgba(26, 26, 26, 0.5) 45%,
      rgba(255, 107, 0, 0.22) 100%
    ),
    url("/img/background.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.card-login {
  max-width: 420px;
  width: 100%;
  border: 1px solid rgba(255, 107, 0, 0.4);
  border-radius: 16px;
  background: rgba(24, 24, 26, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.card-login .card-body {
  color: #ececee;
}

.card-login .login-logo {
  max-width: clamp(100px, 28vw, 140px);
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
}

.card-login .login-brand {
  color: var(--afa-orange);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card-login .login-heading {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  font-weight: 500;
}

.card-login .form-label {
  color: #e2e2e6;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.card-login .form-control {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.card-login .form-control::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.card-login .form-control:focus {
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--afa-orange);
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.28);
}

.card-login .btn-primary {
  background-color: var(--afa-orange);
  border-color: var(--afa-orange);
  font-weight: 600;
}

.card-login .btn-primary:hover,
.card-login .btn-primary:focus {
  background-color: var(--afa-orange-hover);
  border-color: var(--afa-orange-hover);
}

.card-login .alert {
  border: none;
  font-size: 0.9rem;
}

/* Dashboard aluno */
.aluno-page {
  position: relative;
  isolation: isolate;
  background: linear-gradient(165deg, var(--afa-dark) 0%, #221c18 42%, #2a221c 100%);
  min-height: 100dvh;
  color: #f5f5f7;
  overflow-x: clip;
  max-width: 100%;
}

body.aluno-page .container,
body.aluno-page .dashboard-container,
body.aluno-page .aluno-dashboard {
  max-width: 100%;
  overflow-x: clip;
}

body.aluno-page .aluno-date-bar {
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.aluno-page .aluno-date-chip {
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
}

/* Laranja só no rodapé da tela — não atravessa os cards */
.aluno-page::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(38vh, 280px);
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    to top,
    rgba(255, 107, 0, 0.92) 0%,
    rgba(255, 107, 0, 0.45) 40%,
    transparent 100%
  );
}

/* Header flutuante do aluno — transparente no topo, pill ao rolar */
.aluno-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  padding: max(0.35rem, env(safe-area-inset-top)) 0 0.35rem;
  pointer-events: none;
  transition: padding 0.35s ease;
}

.aluno-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0.85rem;
  padding: 0.35rem 0.25rem;
  pointer-events: auto;
  transition:
    background 0.4s ease,
    border-radius 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease,
    padding 0.4s ease,
    margin 0.4s ease;
}

.aluno-header.is-scrolled .aluno-header-inner {
  margin: 0 1rem;
  padding: 0.45rem 1rem;
  border-radius: 22px;
  background: rgba(14, 14, 16, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 107, 0, 0.08);
}

.aluno-header:not(.is-scrolled) .aluno-header-inner {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}

.aluno-header-brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

.aluno-header-logo {
  width: auto;
  object-fit: contain;
  transition: height 0.35s ease, max-width 0.35s ease;
}

.aluno-header:not(.is-scrolled) .aluno-header-logo {
  height: clamp(52px, 13vw, 88px);
  max-width: min(210px, 58vw);
}

.aluno-header.is-scrolled .aluno-header-logo {
  height: clamp(40px, 10vw, 52px);
  max-width: min(150px, 42vw);
}

.aluno-header-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-shrink: 0;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.aluno-header-menu-btn:hover,
.aluno-header-menu-btn:focus {
  color: #fff;
  background: rgba(255, 107, 0, 0.25);
  border-color: rgba(255, 107, 0, 0.65);
  box-shadow: 0 0 16px rgba(255, 107, 0, 0.25);
}

.aluno-header.is-scrolled .aluno-header-menu-btn {
  background: transparent;
  border-color: rgba(255, 107, 0, 0.75);
}

.aluno-header-menu-btn .bi-list {
  font-size: 1.35rem;
  line-height: 1;
}

.aluno-header-menu-label {
  line-height: 1;
}

/* Menu lateral — mais estreito, fundo preto para o logo */
.aluno-menu-drawer.offcanvas {
  --bs-offcanvas-width: min(268px, 68vw);
  width: var(--bs-offcanvas-width) !important;
  max-width: 68vw;
  z-index: 1205 !important;
  background: #000000 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.75);
}

.offcanvas-backdrop.show {
  z-index: 1195 !important;
  background-color: rgba(0, 0, 0, 0.72) !important;
}

.aluno-drawer-body {
  min-height: 100%;
  background: linear-gradient(180deg, #000000 0%, #060608 45%, #0a0a0c 100%);
}

.aluno-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.9rem;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.aluno-drawer-logo-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0.45rem 0.55rem;
  background: #000000;
  border-radius: 10px;
  line-height: 0;
}

.aluno-drawer-logo {
  height: 58px;
  width: auto;
  max-width: min(180px, 48vw);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.8));
}

.aluno-drawer-close {
  flex-shrink: 0;
  opacity: 0.9;
}

.aluno-drawer-profile {
  padding: 0 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #060608;
}

.aluno-drawer-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.aluno-drawer-level {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #facc15;
}

.aluno-drawer-nav {
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
}

.aluno-drawer-link {
  display: block;
  padding: 0.85rem 1.25rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.aluno-drawer-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.aluno-drawer-link.is-active {
  color: #facc15;
  background: rgba(250, 204, 21, 0.1);
  border-radius: 0 999px 999px 0;
  margin-right: 0.75rem;
}

.aluno-drawer-footer {
  padding: 1rem;
  margin-top: auto;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.aluno-drawer-logout {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.75);
  color: #f87171;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.aluno-drawer-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.aluno-perfil-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .aluno-perfil-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.aluno-perfil-item-full {
  grid-column: 1 / -1;
}

.aluno-perfil-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.2rem;
}

.aluno-perfil-hero {
  border-left-color: var(--afa-orange);
}

.aluno-perfil-hero-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.aluno-perfil-avatar {
  flex-shrink: 0;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #121214;
  background: linear-gradient(135deg, #ffb74d, #ff6b00);
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.35);
}

.aluno-perfil-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.aluno-perfil-nome {
  color: #fff;
  font-weight: 700;
  margin: 0;
}

.aluno-perfil-nivel-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.2);
  color: #ffb74d;
  border: 1px solid rgba(255, 107, 0, 0.35);
}

.aluno-perfil-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.aluno-perfil-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9800, #ff6b00);
  transition: width 0.35s ease;
}

.aluno-perfil-nivel-msg {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.aluno-perfil-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1rem 0.75rem;
  text-align: center;
  height: 100%;
}

.aluno-perfil-stat-icon {
  display: block;
  font-size: 1.25rem;
  color: var(--afa-orange);
  margin-bottom: 0.35rem;
}

.aluno-perfil-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.aluno-perfil-stat-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.2rem;
}

.aluno-perfil-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aluno-perfil-meta-list li {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.aluno-perfil-meta-list li .bi {
  color: var(--afa-orange);
  margin-right: 0.35rem;
}

.aluno-perfil-empty {
  text-align: center;
  padding: 1.25rem 0.5rem;
  color: rgba(255, 255, 255, 0.65);
}

.aluno-perfil-empty .bi {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.35);
  display: block;
  margin-bottom: 0.5rem;
}

.aluno-perfil-btn-primary {
  background: #ff6b00;
  border-color: #ff6b00;
  color: #fff;
  font-weight: 600;
}

.aluno-perfil-btn-primary:hover {
  background: #e55f00;
  border-color: #e55f00;
  color: #fff;
}

.aluno-perfil-actions {
  margin-top: 0.5rem;
}

.aluno-pagamento-resumo {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.aluno-pagamento-resumo-atraso {
  border-color: rgba(239, 68, 68, 0.35);
}

.aluno-cobranca-list .aluno-cobranca-item {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.aluno-dashboard {
  position: relative;
  z-index: 1;
  padding-top: calc(5.5rem + env(safe-area-inset-top)) !important;
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)) !important;
}

.aluno-header-scrolled .aluno-dashboard {
  padding-top: calc(4.75rem + env(safe-area-inset-top)) !important;
}

.aluno-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--afa-orange);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.35rem);
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.aluno-hero-title {
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #fff;
}

.aluno-hero-title .bi-person-circle {
  color: var(--afa-orange);
}

.aluno-hero-meta,
.aluno-panel-sub {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.aluno-date-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.aluno-date-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 193, 7, 0.45);
  background: rgba(255, 107, 0, 0.15);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.aluno-date-chip:hover,
.aluno-date-chip:focus {
  background: rgba(255, 107, 0, 0.28);
  color: #fff;
  outline: none;
}

.aluno-date-chip:active {
  transform: scale(0.98);
}

.aluno-date-chip .bi-calendar3,
.aluno-date-chip .bi-calendar-check {
  color: var(--afa-orange);
}

.aluno-date-chevron {
  opacity: 0.7;
  font-size: 0.75rem;
}

.aluno-date-hint {
  color: rgba(255, 255, 255, 0.55);
}

/* Calendário customizado (funciona em todos os celulares) */
.aluno-cal-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.aluno-cal-modal[hidden] {
  display: none !important;
}

.aluno-cal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.aluno-cal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: min(92dvh, 640px);
  overflow-y: auto;
  margin: 0;
  padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #1e1e22 0%, #141416 100%);
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-bottom: none;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.55);
  animation: alunoCalSlideUp 0.28s ease;
}

@keyframes alunoCalSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.aluno-cal-handle {
  width: 2.5rem;
  height: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 auto 0.75rem;
}

.aluno-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.aluno-cal-titulo {
  color: #fff;
  font-weight: 700;
  text-align: center;
  flex: 1;
}

.aluno-cal-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 0;
}

.aluno-cal-nav:hover,
.aluno-cal-nav:focus {
  background: rgba(255, 107, 0, 0.25);
  border-color: rgba(255, 107, 0, 0.55);
  color: #fff;
}

.aluno-cal-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.75rem;
}

.aluno-cal-legenda span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.aluno-cal-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.aluno-cal-dot-feito {
  background: #4caf50;
}

.aluno-cal-dot-previsto {
  background: var(--afa-orange);
}

.aluno-cal-weekdays,
.aluno-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.aluno-cal-weekdays {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.aluno-cal-cell-empty {
  min-height: 2.6rem;
}

.aluno-cal-day {
  position: relative;
  min-height: 2.6rem;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  transition: background 0.15s ease, transform 0.1s ease;
}

.aluno-cal-day:hover:not(:disabled),
.aluno-cal-day:focus:not(:disabled) {
  background: rgba(255, 107, 0, 0.22);
  outline: none;
}

.aluno-cal-day:active:not(:disabled) {
  transform: scale(0.95);
}

.aluno-cal-day-disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.aluno-cal-day-hoje {
  box-shadow: inset 0 0 0 2px rgba(255, 193, 7, 0.75);
}

.aluno-cal-day-selected {
  background: rgba(255, 107, 0, 0.45) !important;
}

.aluno-cal-day-feito::after,
.aluno-cal-day-previsto::after {
  content: "";
  position: absolute;
  bottom: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
}

.aluno-cal-day-feito::after {
  background: #4caf50;
}

.aluno-cal-day-previsto::after {
  background: var(--afa-orange);
}

body.aluno-cal-aberto {
  overflow: hidden;
}

.aluno-historico-item-previsto {
  border-left: 3px solid var(--afa-orange);
}

.aluno-btn-hoje {
  border-radius: 999px;
  font-weight: 600;
}

.aluno-historico-panel {
  border-left-color: #4caf50;
}

.aluno-historico-lista {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.aluno-historico-item {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.aluno-historico-item-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.aluno-historico-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.aluno-historico-item-meta .bi {
  color: var(--afa-orange);
  margin-right: 0.15rem;
}

.aluno-historico-vazio {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: rgba(255, 255, 255, 0.6);
}

.aluno-historico-vazio .bi {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.aluno-datas-marcadas-hint {
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  margin-top: 0.75rem !important;
}

/* Modal pagamento — fundo escuro (legível no PWA / color-scheme dark do app) */
#modalAlertaPagamento {
  --bs-modal-bg: #1c1c1f;
  --bs-modal-color: #f5f5f7;
  --bs-modal-border-color: #ff6b00;
}

#modalAlertaPagamento .modal-content.aluno-alerta-pagamento,
.aluno-alerta-pagamento.modal-content {
  background-color: #1c1c1f !important;
  color: #f5f5f7 !important;
  border: 2px solid var(--afa-orange) !important;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

#modalAlertaPagamento .modal-header,
#modalAlertaPagamento .modal-body,
#modalAlertaPagamento .modal-footer,
.aluno-alerta-pagamento .modal-header,
.aluno-alerta-pagamento .modal-body,
.aluno-alerta-pagamento .modal-footer {
  background-color: #1c1c1f !important;
  color: #f5f5f7 !important;
}

.aluno-alerta-pagamento .modal-title {
  color: #ffffff !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
}

.aluno-alerta-pagamento .modal-body p {
  color: rgba(255, 255, 255, 0.92) !important;
  line-height: 1.55;
}

.aluno-alerta-pagamento .aluno-alerta-valor {
  color: #ffb74d !important;
  font-size: 1.05rem;
}

.aluno-alerta-pagamento .aluno-alerta-valor strong {
  color: #ffffff !important;
}

.aluno-alerta-pagamento .text-muted-alerta {
  color: rgba(255, 255, 255, 0.55) !important;
}

.aluno-alerta-pagamento .btn-close {
  filter: invert(1);
  opacity: 0.85;
}

.aluno-alerta-pagamento .btn-outline-entendi {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  min-height: 44px;
}

.aluno-alerta-pagamento .btn-outline-entendi:hover,
.aluno-alerta-pagamento .btn-outline-entendi:focus {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

.aluno-alerta-pagamento .btn-ver-pagamentos {
  min-height: 44px;
  font-weight: 600;
}

body.aluno-modo-historico .aluno-timer-bar {
  display: none !important;
}

.aluno-hero-dot {
  opacity: 0.5;
  margin: 0 0.25rem;
}

.aluno-panel-title {
  color: #fff;
  font-weight: 600;
}

.aluno-panel-title .bi-fire {
  color: var(--afa-orange);
}

.aluno-progress-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.aluno-progress-fraction {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--afa-orange);
  line-height: 1.1;
  transition: color 0.45s ease;
}

#alunoTreinoRoot.progress-phase-mid .aluno-progress-fraction {
  color: #facc15;
}

#alunoTreinoRoot.progress-phase-end .aluno-progress-fraction {
  color: #a3e635;
}

#alunoTreinoRoot.progress-phase-complete .aluno-progress-fraction {
  color: #4ade80;
}

.aluno-progress-pct {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.aluno-progress-hint {
  color: rgba(255, 255, 255, 0.55);
}

.pomodoro-dot {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.45rem;
  vertical-align: middle;
  margin-right: 0.2rem;
}

.pomodoro-dot.is-done,
.pomodoro-segment.is-done + .pomodoro-dot {
  color: var(--afa-orange);
}

.pomodoro-track {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.pomodoro-segment {
  flex: 1 1 0;
  min-width: 28px;
  max-width: 48px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.35s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.pomodoro-segment.is-done.seg-tone-warm {
  background: linear-gradient(90deg, #ff6b00, #ff9f43);
  border-color: rgba(255, 107, 0, 0.65);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.45);
}

.pomodoro-segment.is-done.seg-tone-mid {
  background: linear-gradient(90deg, #f59e0b, #facc15);
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.pomodoro-segment.is-done.seg-tone-cool {
  background: linear-gradient(90deg, #a3e635, #4ade80);
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
}

.pomodoro-segment.pop {
  transform: scale(1.15);
}

.aluno-progress-bar-wrap {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.aluno-progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6b00, #ff9f43);
  transition: width 0.4s ease, background 0.55s ease, box-shadow 0.55s ease;
}

#alunoTreinoRoot.progress-phase-mid .aluno-progress-bar-fill {
  background: linear-gradient(90deg, #ff9f43, #facc15);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}

#alunoTreinoRoot.progress-phase-end .aluno-progress-bar-fill {
  background: linear-gradient(90deg, #facc15, #a3e635);
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.35);
}

#alunoTreinoRoot.progress-phase-complete .aluno-progress-bar-fill {
  background: linear-gradient(90deg, #4ade80, #22c55e);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.45);
}

.treino-completo .aluno-progress-panel {
  border-left-color: #4ade80;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

.aluno-lista-exercicios {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  background: rgba(14, 14, 16, 0.97) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.aluno-lista-exercicios .exercicio-item.is-done:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.aluno-lista-exercicios .exercicio-item {
  margin-bottom: 0.65rem;
}

.aluno-lista-exercicios .exercicio-item:last-child {
  margin-bottom: 0;
}

.exercicio-item {
  position: relative;
  background: rgba(26, 26, 30, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--afa-orange);
  overflow: hidden;
  transition: opacity 0.3s ease, filter 0.3s ease, box-shadow 0.25s ease;
}

.btn-video-yt {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  background: rgba(0, 0, 0, 0.55);
  color: #ff0000;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.btn-video-yt:hover,
.btn-video-yt:focus {
  background: rgba(0, 0, 0, 0.75);
  color: #ff3333;
  outline: none;
}

.exercicio-hit {
  padding: 0.85rem 1rem;
  -webkit-tap-highlight-color: transparent;
}

.exercicio-series-row {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.exercicio-series-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.exercicio-series-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exercicio-serie-btn {
  flex: 0 0 auto;
  min-width: 3rem;
  min-height: 3rem;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border-radius: 14px;
  border: 2px solid rgba(255, 107, 0, 0.55);
  background: rgba(255, 107, 0, 0.14);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.12s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.exercicio-serie-btn:hover:not(:disabled),
.exercicio-serie-btn:focus-visible:not(:disabled) {
  background: rgba(255, 107, 0, 0.28);
  border-color: rgba(255, 107, 0, 0.85);
  outline: none;
}

.exercicio-serie-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.exercicio-serie-btn.is-next {
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.45);
  border-color: #ffc107;
}

.exercicio-serie-btn.is-active {
  background: rgba(255, 107, 0, 0.42);
  border-color: #ff9800;
  animation: serie-pulse 1.2s ease infinite;
}

.exercicio-serie-btn.is-done {
  background: rgba(76, 175, 80, 0.35);
  border-color: #4caf50;
  color: #e8ffe8;
  cursor: default;
}

.exercicio-serie-btn:disabled:not(.is-done) {
  opacity: 0.35;
  cursor: not-allowed;
}

.exercicio-item.is-done .exercicio-serie-btn {
  cursor: default;
}

@keyframes serie-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 152, 0, 0);
  }
}

.exercicio-row .d-flex.flex-wrap {
  align-items: center;
}

.exercicio-item.is-timer-active {
  box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.55);
  background: rgba(40, 32, 28, 0.98);
}

.exercicio-item.is-timer-active .exercicio-hit {
  background: transparent;
}

.exercicio-item.timer-finished-pulse {
  animation: pulse-orange 0.6s ease;
}

@keyframes pulse-orange {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 107, 0, 0);
  }
}

.exercicio-item.is-done {
  opacity: 0.55;
  filter: grayscale(40%);
  border-left-color: #4ade80;
}

.exercicio-item.is-done .exercicio-serie-btn.is-done {
  cursor: pointer;
}

.exercicio-item.is-completing {
  position: relative;
  z-index: 8;
}

.exercicio-item.is-celebrate {
  animation: exercicio-celebrate 0.55s ease;
}

.exercicio-item.is-sliding-down {
  box-shadow:
    0 16px 40px rgba(76, 175, 80, 0.35),
    0 0 0 2px rgba(74, 222, 128, 0.45);
  opacity: 1 !important;
  filter: none !important;
}

@keyframes exercicio-celebrate {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  }
  35% {
    transform: scale(1.03);
    box-shadow: 0 0 0 10px rgba(74, 222, 128, 0.15);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

.exercicio-nome {
  color: #fff;
  font-weight: 600;
}

.exercicio-nome .bi-check-circle-fill {
  color: #4ade80;
}

.aluno-ex-meta,
.aluno-tap-hint {
  color: rgba(255, 255, 255, 0.55);
}

.aluno-tap-hint {
  margin-top: 0.25rem;
}

.aluno-badge {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.aluno-badge-carga {
  background: rgba(255, 193, 7, 0.25) !important;
  color: #ffe082 !important;
  border-color: rgba(255, 193, 7, 0.35) !important;
}

.btn-carga-edit {
  cursor: pointer;
  border: 1px solid rgba(255, 193, 7, 0.35);
  padding: 0.35em 0.65em;
  line-height: 1.2;
}

.btn-carga-edit:active {
  transform: scale(0.97);
}

.btn-carga-edit.is-personalizada {
  background: rgba(76, 175, 80, 0.28) !important;
  color: #a5d6a7 !important;
  border-color: rgba(76, 175, 80, 0.45) !important;
}

.aluno-carga-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.aluno-carga-modal[hidden] {
  display: none !important;
}

.aluno-carga-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.aluno-carga-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: #1e1e22;
  border-radius: 1rem 1rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.aluno-carga-input {
  background: #121214;
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.aluno-carga-input:focus {
  background: #121214;
  color: #fff;
  border-color: var(--afa-orange);
  box-shadow: 0 0 0 0.2rem rgba(255, 152, 0, 0.25);
}

.aluno-carga-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.aluno-empty {
  text-align: center;
  padding: clamp(2rem, 6vw, 3rem);
}

.aluno-empty > .bi {
  font-size: 2.5rem;
  color: var(--afa-orange);
  opacity: 0.8;
}

.aluno-footer-wrap {
  position: relative;
  z-index: 1;
  margin-top: 1.25rem;
}

.aluno-footer-note {
  display: inline-block;
  margin: 0;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(14, 14, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Timer fixo inferior */
.aluno-timer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  padding: 0.75rem max(0.75rem, env(safe-area-inset-left)) calc(0.75rem + env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-right));
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85) 25%);
  transform: translateY(110%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.aluno-timer-bar.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}

.aluno-timer-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(255, 107, 0, 0.45);
  border-radius: 14px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  color: #fff;
}

.aluno-timer-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aluno-timer-clock {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--afa-orange);
  min-width: 4.5rem;
  text-align: center;
}

.aluno-timer-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Notificação ao fim do descanso */
.aluno-timer-toast {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: aluno-timer-toast-in 0.32s ease;
}

.aluno-timer-toast[hidden] {
  display: none !important;
}

.aluno-timer-toast-card {
  pointer-events: none;
  max-width: 320px;
  width: 100%;
  padding: 1.35rem 1.25rem;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(165deg, #252528 0%, #141416 100%);
  border: 2px solid rgba(74, 222, 128, 0.55);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #fff;
  animation: aluno-timer-toast-pop 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.aluno-timer-toast-icon {
  display: block;
  font-size: 2.5rem;
  color: #4ade80;
  margin-bottom: 0.65rem;
}

.aluno-timer-toast-title {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
}

.aluno-timer-toast-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

body.aluno-timer-toast-open {
  overflow: hidden;
}

.aluno-voltar-treino-btn {
  position: fixed;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  z-index: 1060;
  transform: translateX(-50%) translateY(120%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8c2a 0%, #ff6b00 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow:
    0 8px 28px rgba(255, 107, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.aluno-voltar-treino-btn.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.aluno-voltar-treino-btn .bi {
  font-size: 1.25rem;
}

.aluno-voltar-treino-btn:active {
  transform: translateX(-50%) scale(0.96);
}

.aluno-timer-bar.is-visible ~ .aluno-voltar-treino-btn.is-visible,
body.aluno-timer-toast-open .aluno-voltar-treino-btn.is-visible {
  bottom: calc(8.5rem + env(safe-area-inset-bottom));
}

@keyframes aluno-timer-toast-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes aluno-timer-toast-pop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.aluno-page .exercicio-item .badge {
  margin-bottom: 0.35rem;
}

/* Vídeo em tela cheia — acima do menu (1205) e do header (1100) */
.aluno-video-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: stretch;
  justify-content: center;
  isolation: isolate;
}

.aluno-video-modal[hidden] {
  display: none !important;
}

body.aluno-video-open {
  overflow: hidden;
}

body.aluno-video-open .aluno-header,
body.aluno-video-open .aluno-menu-drawer,
body.aluno-video-open .offcanvas-backdrop {
  pointer-events: none !important;
}

body.aluno-video-open .aluno-header {
  visibility: hidden;
}

.aluno-video-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.95);
}

.aluno-video-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.aluno-video-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  padding-right: max(1rem, env(safe-area-inset-right));
  flex-shrink: 0;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aluno-video-close-btn {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.aluno-video-close-btn:hover,
.aluno-video-close-btn:focus {
  background: rgba(255, 107, 0, 0.85);
  color: #fff;
  outline: none;
}

.aluno-video-player {
  flex: 1;
  width: 100%;
  min-height: 0;
  max-height: calc(100dvh - 4rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  object-fit: contain;
  background: #000;
}

/* Detalhes treino — linha de exercício */
.exercicio-row {
  gap: 0.75rem;
}

.exercicio-row .actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .exercicio-row .actions-cell {
    justify-content: flex-start;
    width: 100%;
  }

  .detalhes-header-actions {
    width: 100%;
  }

  .detalhes-header-actions .btn {
    width: 100%;
  }
}

/* Cards do painel */
.dashboard-cards .col-dashboard {
  margin-bottom: 1rem;
}

/* Painel admin — layout responsivo */
body.painel-shell-page {
  overflow-x: clip;
  max-width: 100%;
}

body.painel-shell-page .painel-shell-content {
  width: 100%;
  max-width: 100%;
}

body.painel-shell-page .painel-shell-narrow {
  max-width: 900px;
}

body.painel-shell-page .card,
body.painel-shell-page .table {
  max-width: 100%;
}

body.painel-shell-page img,
body.painel-shell-page video {
  max-width: 100%;
  height: auto;
}

body.painel-shell-page .painel-acoes-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

body.painel-shell-page .row.g-3 > [class*="col-"] {
  min-width: 0;
}

@media (max-width: 767.98px) {
  body.painel-shell-page .page-header.flex-md-row,
  body.painel-shell-page .page-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body.painel-shell-page .page-header .btn,
  body.painel-shell-page .page-header .btn-group-actions,
  body.painel-shell-page .page-header .btn-group-actions .btn {
    width: 100%;
  }

  body.painel-shell-page .painel-shell-content.container {
    max-width: 100% !important;
  }

  body.painel-shell-page .aluno-header-menu-label {
    display: none;
  }

  body.painel-shell-page .aluno-header-inner {
    margin: 0 0.5rem;
  }

  body.painel-shell-page .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.painel-shell-page .table-responsive:not(.painel-table-wrap) table {
    min-width: 36rem;
  }

  body.painel-shell-page .table td.text-end,
  body.painel-shell-page .table th.text-end {
    white-space: normal;
    vertical-align: top;
  }

  body.painel-shell-page .painel-acoes-cell {
    flex-direction: column;
    align-items: stretch;
    min-width: 7.5rem;
  }

  body.painel-shell-page .painel-acoes-cell .btn {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
  }

  body.painel-shell-page .painel-acoes-cell .btn .bi {
    margin-right: 0.2rem;
  }

  .dashboard-cards .card .d-flex.gap-2,
  .dashboard-cards .card .d-flex.justify-content-center {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .dashboard-cards .card .btn {
    width: 100%;
  }

  body.painel-shell-page .detalhes-header-actions {
    display: grid;
    gap: 0.5rem;
    width: 100%;
  }

  body.painel-shell-page .detalhes-header-actions .btn {
    width: 100%;
  }

  body.painel-shell-page .card-body .row.g-3 .btn {
    width: 100%;
  }

  body.painel-shell-page .painel-voltar-bar .btn-voltar-painel {
    width: 100%;
  }

  .relatorio-aluno-filtro {
    width: 100%;
  }

  .relatorio-aluno-filtro > [class*="col-"] {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }

  .relatorio-aluno-filtro .form-control,
  .relatorio-aluno-filtro .btn {
    width: 100%;
  }

  body.painel-shell-page .painel-filtro-form > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body.painel-shell-page .painel-toolbar {
    flex-direction: column;
    width: 100%;
  }

  body.painel-shell-page .painel-toolbar .btn {
    width: 100%;
  }

  body.painel-shell-page .actions-cell,
  body.painel-shell-page .modelo-item-acoes {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  body.painel-shell-page .actions-cell .btn,
  body.painel-shell-page .modelo-item-acoes .btn {
    width: 100%;
    justify-content: center;
  }

  .relatorio-stat-card .relatorio-stat-value {
    font-size: 1.35rem;
  }

  body.aluno-page .modal-dialog {
    margin: 0.75rem;
    max-width: calc(100% - 1.5rem);
  }
}

@media (max-width: 575.98px) {
  body.painel-shell-page .painel-shell-content {
    padding-top: calc(5.5rem + env(safe-area-inset-top)) !important;
  }

  body.painel-shell-page .table-responsive:not(.painel-table-wrap) table {
    min-width: 32rem;
  }

  body.painel-shell-page h2,
  body.painel-shell-page .h2 {
    font-size: 1.2rem;
  }

  .card-login {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Utilitários */
.container,
.container-fluid {
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
}

.mt-page {
  margin-top: clamp(0.5rem, 2vw, 1.5rem);
}
