/* ==========================================================================
   ICBEU Manaus — Agendamento de Nivelamento
   Folha de estilos organizada do celular para o desktop (mobile-first):

     • regras sem @media ........................ celular (qualquer largura)
     • @media (min-width: 640px) ................ tablet
     • @media (min-width: 900px) ................ desktop
     • @media (min-width: 1200px) ............... telas grandes

   Índice
     1. Variáveis
     2. Base
     3. Botões e links
     4. Cabeçalho
     5. Página inicial
     6. Agendamento (formulário em 3 etapas)
     7. Calendário
     8. Painel administrativo
     9. Tabela / cartões de agendamentos
    10. Janelas (modais)
    11. Rodapé
   ========================================================================== */


/* ==========================================================================
   1. VARIÁVEIS
   ========================================================================== */
:root {
  /* Cores da marca */
  --blue: #0036a3;
  --navy: #001a55;
  --red: #e51f28;
  --yellow: #ffbd0f;
  --green: #00805c;
  --purple: #8a4bd6;
  --maroon: #7a1025;

  /* Cores de apoio */
  --ink: #17213c;
  --muted: #61708c;
  --label: #526078;
  --line: #dfe5ed;
  --bg: #f4f6fa;
  --error: #c4001d;

  /* Tipografia */
  --font: Arial, Helvetica, sans-serif;
  --font-brand: 'New Order', Arial, Helvetica, sans-serif;

  /* Medidas que mudam conforme a tela */
  --gutter: 16px;
  --panel-pad: 20px;
  --header-h: 68px;
  --radius: 6px;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; --panel-pad: 30px; --header-h: 84px; }
}

@media (min-width: 900px) {
  :root { --header-h: 105px; }
}


/* ==========================================================================
   2. BASE
   ========================================================================== */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.4;
}
body.modal-open { overflow: hidden; }

img { max-width: 100%; }

.shell { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

h1 { font-size: 34px; line-height: 1.08; letter-spacing: -1px; margin: 12px 0 16px; }
h2 { font-size: 24px; line-height: 1.15; letter-spacing: -.5px; margin: 6px 0; }
h3 { margin: 15px 0 8px; }

.eyebrow { font-size: 12px; font-weight: bold; letter-spacing: 1.2px; color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt { margin-top: 15px; }
.mt-lg { margin-top: 24px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media (min-width: 640px) {
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
}

@media (min-width: 900px) {
  h1 { font-size: 51px; letter-spacing: -1.7px; margin: 14px 0 18px; }
  h2 { font-size: 30px; letter-spacing: -.8px; margin: 7px 0; }
}


/* ==========================================================================
   3. BOTÕES E LINKS
   ========================================================================== */
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }

.btn {
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 5px;
  font-weight: bold;
  transition: .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(.97); }
.btn:disabled { opacity: .5; }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: 13px; }

.blue { background: var(--blue); color: #fff; }
.yellow { background: var(--yellow); color: #102254; }
.outline { border: 1px solid var(--blue); background: #fff; color: var(--blue); }
.outline.danger { border-color: var(--red); color: var(--red); }
.danger-solid { background: var(--red); color: #fff; }

.link-btn {
  padding: 4px;
  border: 0;
  background: none;
  color: var(--blue);
  font-weight: bold;
  text-decoration: underline;
}

.whatsapp {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  background: #20bd65;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
}


/* ==========================================================================
   4. CABEÇALHO
   Celular: botão "Painel" | frase | logo
   Desktop: navegação | frase centralizada | logo
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--red);
  box-shadow: 0 2px 10px #6c000033;
}

.site-header .shell {
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.nav { display: flex; gap: 8px; align-items: center; }
.nav button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #ffffff55;
  border-radius: 6px;
  background: #ffffff18;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  transition: .2s;
}
.nav button:hover { background: #fff; color: var(--red); }
.nav .nav-home { display: none; }
.label-long { display: none; }

.header-motto {
  color: #fff;
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.2;
  text-align: center;
}

.top-logo {
  justify-self: end;
  height: 44px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
}

/* No painel, o cabeçalho acompanha a largura maior do painel */
body.is-admin .site-header .shell { max-width: 1540px; }

@media (min-width: 640px) {
  .nav .nav-home { display: inline-block; }
  .header-motto { font-size: 17px; }
  .top-logo { height: 60px; max-width: 150px; }
}

@media (min-width: 900px) {
  .site-header .shell { grid-template-columns: 1fr auto 1fr; gap: 20px; }
  .nav { gap: 12px; }
  .nav button { padding: 11px 17px; font-size: 14px; }
  .label-long { display: inline; }
  .label-short { display: none; }
  .header-motto { font-size: 22px; letter-spacing: 1px; }
  .top-logo { height: 82px; max-width: 230px; }
}


/* ==========================================================================
   5. PÁGINA INICIAL
   ========================================================================== */
.hero {
  overflow: hidden;
  background: linear-gradient(115deg, #002b8c, #0043b8);
  color: #fff;
}
.hero .shell {
  display: grid;
  gap: 30px;
  padding-top: 44px;
  padding-bottom: 44px;
}
.hero .eyebrow { color: var(--yellow); }
.hero p { font-size: 17px; line-height: 1.55; color: #e4edff; }
.hero .btn { width: 100%; }

.hero-title {
  display: inline-block;
  padding: 8px 14px 10px;
  background: var(--red);
}

.hero-card {
  padding: 24px;
  border-top: 7px solid var(--yellow);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 20px 40px #00114a55;
}
.hero-card p { font-size: 14px; color: var(--muted); }

.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.mini-grid div { padding: 15px; border-radius: 4px; background: var(--bg); }
.mini-grid b { font-size: 25px; color: var(--blue); }

.section { padding-top: 42px; padding-bottom: 42px; }

.cards { display: grid; gap: 16px; margin-top: 24px; }
.card {
  padding: 22px;
  border: 1px solid #e0e5ed;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 8px 22px #001a550b;
}
.card span { font-size: 14px; font-weight: bold; color: var(--blue); }
.card p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.card .btn { width: 100%; }
.stripe { width: 56px; height: 6px; }
.stripe-kids { background: var(--yellow); }
.stripe-junior { background: var(--red); }
.stripe-adults { background: var(--green); }

@media (min-width: 640px) {
  .hero .shell { padding-top: 56px; padding-bottom: 56px; }
  .hero .btn { width: auto; }
}

@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 19px; }
  .card { display: flex; flex-direction: column; }
  .card p { flex: 1; }
}

@media (min-width: 900px) {
  .hero .shell {
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 55px;
    min-height: 460px;
    padding-top: 0;
    padding-bottom: 0;
  }
  .hero-title { padding: 9px 16px 12px; }
  .hero p { font-size: 18px; }
  .hero-card { padding: 30px; }
  .section { padding-top: 66px; padding-bottom: 66px; }
}


/* ==========================================================================
   6. AGENDAMENTO (formulário em 3 etapas)
   ========================================================================== */
.booking {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px var(--gutter) 32px;
  scroll-margin-top: var(--header-h);
}

.panel {
  padding: var(--panel-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px #001a5510;
}

.booking-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 16px;
}

.tag {
  padding: 5px 10px;
  border-radius: 20px;
  background: #e8efff;
  color: var(--blue);
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}

.progress { height: 7px; margin: 18px 0 22px; background: #e7ebf2; }
.progress div { height: 100%; width: 33%; background: var(--yellow); transition: .2s; }

.step { display: none; }
.step.active { display: block; }

.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* Campos */
label {
  display: block;
  color: var(--label);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .7px;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid #cfd8e6;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: 16px var(--font); /* 16px evita o zoom automático do iPhone ao tocar no campo */
}
textarea { min-height: 0; resize: vertical; }

input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0 10px 0 0;
}

.invalid { border-color: var(--error) !important; background: #fff6f6; }
label.invalid { color: var(--error); background: none; }

.check {
  display: flex;
  align-items: flex-start;
  margin-top: 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
}

/* Avisos */
.notice {
  padding: 13px 15px;
  border-left: 4px solid var(--yellow);
  background: #fff9e3;
  font-size: 14px;
  line-height: 1.45;
}
.form-error {
  margin: 20px 0 0;
  padding: 12px 15px;
  border-left: 4px solid var(--error);
  background: #fff2f2;
  color: #9b0017;
  font-size: 14px;
}
.summary {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #b9e4d2;
  border-radius: 5px;
  background: #eaf7f1;
  color: #00553d;
  font-size: 14px;
  line-height: 1.45;
}

/* Escolha online / presencial */
.choice-grid { display: grid; gap: 12px; margin-top: 20px; }
.choice {
  padding: 18px;
  border: 2px solid #d9e0ea;
  border-radius: 5px;
  background: #fff;
  text-align: left;
}
.choice b { display: block; font-size: 18px; color: var(--blue); }
.choice small { display: block; margin-top: 7px; line-height: 1.35; color: var(--muted); }
.choice.active { border-color: var(--blue); background: #f0f5ff; }

/* Botões Voltar / Continuar */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e6eaf0;
}
.actions .btn { flex: 1; }

/* No celular e tablet, a barra de botões do formulário fica presa ao pé da tela */
#bookingForm .actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 24px calc(var(--panel-pad) * -1) calc(var(--panel-pad) * -1);
  padding: 12px var(--panel-pad) calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fff;
  box-shadow: 0 -8px 16px -10px #001a5540;
}

/* Confirmação */
.success { padding: 32px 20px; text-align: center; }
.success > b { display: block; font-size: 24px; color: var(--green); }
.success p { line-height: 1.5; }

@media (min-width: 640px) {
  .booking { padding: 28px var(--gutter) 40px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 15px; }
  .choice-grid { grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
  .choice { padding: 22px; }
  .choice b { font-size: 19px; }
  .actions { margin-top: 28px; padding-top: 20px; }
  .actions .btn { flex: 0 0 auto; }
  .actions .btn:last-child { margin-left: auto; }
  .success { padding: 40px; }
  .success > b { font-size: 27px; }
}

@media (min-width: 900px) {
  .booking { margin: 35px auto; padding-top: 0; }
  #bookingForm .actions {
    position: static;
    margin: 28px 0 0;
    padding: 20px 0 0;
    border-radius: 0;
    box-shadow: none;
  }
}


/* ==========================================================================
   7. CALENDÁRIO
   Usa "container queries": o calendário se adapta ao espaço que tem.
   Estreito  → calendário e horários um embaixo do outro.
   Largo     → calendário à esquerda e horários à direita.
   ========================================================================== */
.calendar-widget { container-type: inline-size; margin-top: 20px; }
.calendar-layout { display: grid; gap: 18px; }

.calendar { overflow: hidden; border: 1px solid #dce3ed; border-radius: 7px; }

.calendar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--blue);
  color: #fff;
  font-weight: bold;
}
.cal-nav {
  width: 40px;
  height: 36px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: var(--blue);
  font-size: 18px;
  font-weight: bold;
}
.cal-nav:disabled { opacity: .35; }

.weekdays, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 8px;
}
.weekdays {
  padding-bottom: 0;
  color: var(--label);
  font-size: 10px;
  font-weight: bold;
  text-align: center;
}

.day {
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 0;
  border-radius: 5px;
  background: #f1f3f6;
  color: #b6bfca;
  font-size: 15px;
  font-weight: bold;
}
.day small { font-size: 9px; letter-spacing: .3px; text-transform: lowercase; }
.day.available { background: #eaf0ff; color: var(--blue); cursor: pointer; }
.day.available:hover { outline: 2px solid var(--yellow); }
.day.today { box-shadow: inset 0 0 0 2px var(--navy); }
.day.today small { color: var(--red); }
.day.holiday { background: repeating-linear-gradient(45deg, #f1f3f6 0 6px, #e7eaef 6px 12px); }
.day.selected { background: var(--blue); color: #fff; outline: 2px solid var(--yellow); }
.day.selected small { color: var(--yellow); }

.calendar-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 6px 10px 12px;
  color: var(--muted);
  font-size: 12px;
}
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.legend .lg-available { border: 1px solid #c8d7ff; background: #eaf0ff; }
.legend .lg-selected { background: var(--blue); }
.legend .lg-today { background: #fff; box-shadow: inset 0 0 0 2px var(--navy); }
.legend .lg-off { border: 1px solid #e0e4ea; background: #f1f3f6; }
.calendar-note { width: 100%; margin: 2px 0 0; }

/* Horários */
.time-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed #cfd8e6;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.time-date { margin: 0 0 2px; font-weight: bold; color: var(--navy); line-height: 1.35; }
.time-title {
  margin: 14px 0 8px;
  color: var(--label);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .7px;
}
.time-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pick {
  min-height: 46px;
  padding: 10px;
  border: 1px solid #cfd8e6;
  border-radius: 4px;
  background: #fff;
  font-size: 15px;
  font-weight: bold;
}
.pick.selected { border-color: var(--blue); background: var(--blue); color: #fff; }
.pick:disabled { opacity: .45; text-decoration: line-through; }

@container (min-width: 420px) {
  .calendar-top { padding: 14px 18px; }
  .weekdays, .calendar-grid { gap: 7px; padding: 12px; }
  .calendar-grid { padding-top: 8px; }
  .day { height: 52px; }
  .time-slots { grid-template-columns: repeat(4, 1fr); gap: 9px; }
}

@container (min-width: 680px) {
  .calendar-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: 22px; }
  .time-box { padding: 16px; border: 1px solid #dce3ed; border-radius: 7px; min-height: 100%; }
  .time-empty { border: 0; padding: 40px 10px; }
  .time-slots { grid-template-columns: repeat(2, 1fr); }
}


/* ==========================================================================
   8. PAINEL ADMINISTRATIVO
   ========================================================================== */
.admin { padding: 0 0 48px; }
.admin .shell { max-width: 1540px; }

.admin-top { margin-bottom: 18px; padding: 20px 0; background: var(--navy); color: #fff; }
.admin-title { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.admin-title h2 { margin: 6px 0 2px; }
.admin-title .btn { width: 100%; }
.admin-kicker { color: var(--yellow); font-size: 12px; font-weight: bold; letter-spacing: 1px; }
.role-label { margin: 0; color: #b9c8ec; font-size: 13px; }

/* Métricas: 2 colunas no celular, 4 no tablet, 8 em telas grandes */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.metric {
  padding: 12px 14px;
  border-left: 5px solid var(--blue);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 18px #001a550d;
}
.metric b { display: block; font-size: 22px; }
.metric span { color: var(--muted); font-size: 11px; }
.m-total { border-color: var(--navy); }
.m-scheduled { border-color: var(--blue); }
.m-rescheduled { border-color: #4f80ff; }
.m-attended { border-color: var(--green); }
.m-absent { border-color: var(--red); }
.m-enrolled { border-color: var(--purple); }
.m-not-enrolled { border-color: var(--maroon); }
.m-conversion { border-color: var(--yellow); }

.board { margin-top: 18px; }

.dash-head { display: flex; flex-direction: column; gap: 14px; }
.dash-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.dash-actions .btn { width: 100%; padding: 10px 12px; font-size: 14px; }

/* Filtro principal (situação do nivelamento)
   Celular: grade de 2 colunas, com "Fizeram o nivelamento" em destaque na largura toda
   Tablet/desktop: botões lado a lado */
.status-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: dense;
  gap: 8px;
  margin-top: 18px;
}
.status-chips .chip.highlight { grid-column: 1 / -1; }

.chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}
@media (max-width: 639px) { .chip { padding: 9px 8px; font-size: 13px; } }
.chip.active { background: var(--blue); color: #fff; }
.chip.highlight:not(.active) { border-color: var(--green); color: var(--green); }
.chip.highlight.active { border-color: var(--green); background: var(--green); }

/* Filtros complementares
   Celular/tablet: busca sempre visível + botão "Filtros" que abre os demais
   Desktop: tudo em uma linha */
.filter-area { margin-top: 14px; padding: 12px; border-radius: var(--radius); background: var(--bg); }
.search-row { display: flex; align-items: flex-end; gap: 8px; }
.search-row .search { flex: 1; min-width: 0; }
.filters-toggle { flex: 0 0 auto; min-height: 46px; padding: 10px 14px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.filters:not(.is-open) { display: none; }
.filters > label { grid-column: 1 / -1; display: flex; flex-direction: column; justify-content: flex-end; }
.filters > label.half { grid-column: auto; }

.result-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 640px) {
  .admin-top { margin-bottom: 25px; padding: 26px 0; }
  .admin-title { flex-direction: row; justify-content: space-between; align-items: center; }
  .admin-title .btn { width: auto; }

  .metrics { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .metric { padding: 16px; }
  .metric b { font-size: 25px; }

  .board { margin-top: 20px; }
  .dash-head { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .dash-actions { display: flex; flex-wrap: wrap; }
  .dash-actions .btn { width: auto; padding: 12px 16px; }

  .status-chips { display: flex; flex-wrap: wrap; margin-top: 22px; }
  .chip { padding: 10px 15px; }

  .filters { grid-template-columns: repeat(3, 1fr); }
  .filters > label { grid-column: auto; }
}

@media (min-width: 900px) {
  .filter-area { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding: 16px; }
  .search-row { flex: 2 1 280px; }
  .filters-toggle { display: none; }
  .filters, .filters:not(.is-open) { display: contents; }
  .filters > label { flex: 1 1 150px; }
  .filters > label.wide { flex-basis: 190px; }
}

@media (min-width: 1200px) {
  .metrics { grid-template-columns: repeat(8, 1fr); }
}


/* ==========================================================================
   9. TABELA / CARTÕES DE AGENDAMENTOS
   Celular e tablet: cada agendamento é um cartão.
   Desktop: tabela, com a coluna de ações fixa à direita.
   ========================================================================== */
.table-wrap { margin-top: 12px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead { display: none; }
.data-table tbody { display: block; }

.data-table tr {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  padding: 4px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px #001a550a;
}

.data-table td {
  order: 2;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1f5;
  overflow-wrap: anywhere;
}
.data-table td::before {
  content: attr(data-label);
  padding-top: 2px;
  color: var(--label);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Ordem dos blocos dentro do cartão */
.data-table td.cell-student { order: 0; display: block; padding: 12px 0; font-size: 15px; }
.data-table td.cell-status  { order: 1; }
.data-table td.cell-actions { order: 3; display: block; padding: 12px 0 0; border-bottom: 0; }
.data-table td.cell-student::before,
.data-table td.cell-actions::before { content: none; }
.data-table td.cell-actions .btn { width: 100%; min-height: 44px; font-size: 14px; }

.data-table small { color: var(--muted); }
.cell-student b { font-size: 16px; }
.eval { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: baseline; }
.eval small { font-size: 12px; }
.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.format-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #eff3f8;
  color: var(--label);
  font-size: 12px;
  font-weight: bold;
}
.notes-cell > div { white-space: pre-wrap; }
.empty { padding: 28px; color: var(--muted); text-align: center; }

/* Etiquetas de situação */
.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}
.badge.agendado { background: #e8efff; color: var(--blue); }
.badge.reagendado { background: #eef0ff; color: #3f52c9; }
.badge.compareceu { background: #e3f5ee; color: #00664a; }
.badge.nao-compareceu { background: #fdeaea; color: #b3121a; }
.badge.matriculado { background: #f1e9fb; color: #6a34b0; }
.badge.nao-matriculado { background: #fff2f2; color: var(--maroon); }

.inline-status {
  width: auto;
  min-width: 160px;
  min-height: 38px;
  margin: 0;
  padding: 7px 28px 7px 10px;
  border: 1px solid #c8d7ff;
  border-radius: 18px;
  background: #e8efff;
  color: var(--blue);
  font-size: 16px;
  font-weight: bold;
}
.data-table .inline-status { width: 100%; max-width: 230px; min-width: 0; }

/* Tablet: cartões em duas colunas */
@media (min-width: 640px) {
  .data-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .data-table tr { margin-bottom: 0; }
}

@media (min-width: 900px) {
  .table-wrap { overflow-x: auto; }
  .data-table { min-width: 1040px; }
  .data-table thead { display: table-header-group; }
  .data-table tbody { display: table-row-group; }
  .data-table tr + tr { margin: 0; }
  .data-table tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .data-table th, .data-table td,
  .data-table td.cell-student, .data-table td.cell-actions {
    display: table-cell;
    padding: 14px;
    border-bottom: 1px solid #e5e9f0;
    text-align: left;
    vertical-align: top;
    overflow-wrap: normal;
  }
  .data-table td::before { content: none; }
  .data-table th {
    background: #eff3f8;
    color: var(--label);
    font-size: 11px;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .data-table td.cell-student { min-width: 180px; font-size: 14px; }
  .cell-student b { font-size: 14px; }
  .data-table td.cell-actions .btn { min-height: 36px; font-size: 13px; }
  .nowrap { white-space: nowrap; }
  .notes-cell > div { max-width: 230px; }
  .eval { min-width: 180px; }
  .data-table .inline-status { width: auto; min-width: 150px; min-height: 0; font-size: 12px; }

  /* Coluna de ações fixa à direita durante a rolagem lateral */
  .data-table th:last-child, .data-table td:last-child {
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -8px 0 10px -8px #001a5522;
  }
  .data-table th:last-child { background: #eff3f8; }
}


/* ==========================================================================
   10. JANELAS (MODAIS)
   Celular: abrem de baixo para cima ocupando a largura toda.
   Tablet/desktop: janela centralizada.
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #00133e88;
}
.modal .panel {
  width: 100%;
  max-height: 94vh;
  overflow: auto;
  border-radius: 14px 14px 0 0;
  padding-bottom: calc(var(--panel-pad) + env(safe-area-inset-bottom, 0px));
}
.error { margin-top: 9px; color: var(--error); font-size: 13px; }

.anamnese {
  margin: 6px 0 20px;
  padding: 14px 16px;
  border-radius: 5px;
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}
.anamnese dl { display: grid; grid-template-columns: 1fr; gap: 2px 14px; margin: 8px 0 0; }
.anamnese dt { margin-top: 6px; color: var(--muted); }
.anamnese dd { margin: 0; font-weight: bold; }

@media (min-width: 640px) {
  .modal { align-items: center; padding: 20px; }
  .modal .panel {
    max-width: 420px;
    max-height: 92vh;
    border-radius: var(--radius);
    padding-bottom: var(--panel-pad);
  }
  .modal .panel.wide { max-width: 680px; }
  .modal .panel.xwide { max-width: 900px; }
  .anamnese dl { grid-template-columns: max-content 1fr; gap: 6px 14px; }
  .anamnese dt { margin-top: 0; }
}


/* ==========================================================================
   11. RODAPÉ
   ========================================================================== */
.footer {
  padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px));
  background: var(--navy);
  color: #dce7ff;
  font-size: 13px;
}
