/* ===== Moura Lacerda — Portal do Aluno ===== */
:root {
  --bordeaux: #7a1f2b;
  --bordeaux-dark: #5e1620;
  --bordeaux-light: #9a3341;
  --yellow: #f4c430;
  --yellow-soft: #fdf3d3;
  --navy: #16223c;
  --navy-soft: #24345a;
  --green: #1f9d55;
  --green-soft: #e4f6ec;
  --blue: #2563c9;
  --blue-soft: #e6effb;
  --amber: #b7791f;
  --amber-soft: #fbf0d6;
  --white: #ffffff;
  --bg: #f4f5f8;
  --surface: #ffffff;
  --text: #1e2433;
  --text-muted: #6b7280;
  --border: #e7e9ef;
  --shadow: 0 1px 2px rgba(22, 34, 60, .06), 0 6px 18px rgba(22, 34, 60, .06);
  --shadow-lg: 0 10px 40px rgba(22, 34, 60, .18);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 250px;
  --header-h: 60px;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ===== Tema "calmo" (cromoterapia) =====
   Usado só nas telas de conversão/tensão (inscrição, landing e o modal de
   pagamento) — o portal em si (Início, Financeiro, Carteirinha etc.) segue
   com a identidade institucional (bordô) normalmente.
   Azul acalma e reduz ansiedade, verde traz equilíbrio, violeta ajuda a
   esvaziar pensamentos acelerados — por isso substituem o bordô/dourado
   "sério" nessas telas. Como todo o site já usa variáveis de cor, redeclarar
   só isso aqui re-pinta automaticamente botões, cards, badges etc. */
.calm-theme {
  --bordeaux: #2e7cd6;       /* azul calmante — cor principal (botões, links, foco) */
  --bordeaux-dark: #5b4fa6;  /* violeta — usado nos degradês junto do azul */
  --bordeaux-light: #6fb1e8;
  --yellow: #8d7ee0;         /* violeta claro — selos/destaques (era dourado) */
  --yellow-soft: #efeafc;
  --navy: #33305e;           /* azul-violeta escuro — títulos e valores */
  --navy-soft: #4a4480;
  --green: #2fae72;          /* verde — equilíbrio/harmonia */
  --green-soft: #e5f8ee;
  --blue: #3c8ce0;
  --blue-soft: #e7f2fc;
  --amber: #7a6bc9;          /* violeta — estados de espera (era âmbar) */
  --amber-soft: #efeafc;
  --bg: #f4f8fc;
  --text: #33415a;
  --text-muted: #6b7c93;
  --border: #dce6f2;
  --shadow: 0 1px 2px rgba(46,124,214,.08), 0 6px 18px rgba(46,124,214,.08);
  --shadow-lg: 0 10px 40px rgba(46,124,214,.20);
  --radius: 20px;
  --radius-sm: 14px;
}
.calm-theme .field input:focus,
.calm-theme .field select:focus,
.calm-theme .field textarea:focus { box-shadow: 0 0 0 3px rgba(46,124,214,.15); }
.calm-theme .enroll-head::after { background: rgba(255,255,255,.16); }
.calm-theme .demo-banner,
.calm-theme .payment-status { border-color: #d9d2f5; }
.calm-theme .req { color: #d1567f; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Layout ===== */
.app { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--bordeaux) 0%, var(--bordeaux-dark) 100%);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform .28s ease;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand-logo {
  width: 42px; height: 42px; flex: none;
  border-radius: 11px;
  background: var(--yellow);
  color: var(--bordeaux-dark);
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
  letter-spacing: -1px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
  overflow: hidden;
}
.brand-logo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.brand-text b { display: block; font-size: 15px; line-height: 1.15; }
.brand-text span { font-size: 11px; opacity: .8; letter-spacing: .5px; }

.nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; margin-bottom: 4px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.82);
  font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav a .ic { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav a.active {
  background: #fff; color: var(--bordeaux);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.nav a.active .ic { color: var(--bordeaux); }
.sidebar-foot {
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.sidebar-foot a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.82);
  font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.sidebar-foot a .ic { width: 20px; height: 20px; flex: none; }
.sidebar-foot a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ===== Main ===== */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  gap: 14px; padding: 0 22px;
  position: sticky; top: 0; z-index: 40;
}
.header h1 { font-size: 17px; margin: 0; font-weight: 700; }
.header .spacer { flex: 1; }
.burger {
  display: none;
  background: none; border: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  cursor: pointer; color: var(--bordeaux);
  align-items: center; justify-content: center;
}
.burger:hover { background: var(--bg); }
.header-user {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 6px 5px 12px;
  background: var(--bg);
  border-radius: 999px;
}
.header-user .u-name { font-size: 13px; font-weight: 600; }
.header-user .u-sub { font-size: 11px; color: var(--text-muted); }
.header-user .avatar { width: 34px; height: 34px; font-size: 13px; }
.header-avatar-trigger {
  display: flex; cursor: pointer; border-radius: 50%;
  transition: transform .15s ease;
}
.header-avatar-trigger:hover { transform: scale(1.06); }
.header-avatar-trigger:active { transform: scale(.95); }
.header-avatar-trigger:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(122,31,43,.35); }

/* ===== Content ===== */
.content { padding: 22px; max-width: 1080px; width: 100%; }
.page-head { margin-bottom: 18px; }
.page-head h2 { margin: 0 0 2px; font-size: 22px; }
.page-head p { margin: 0; color: var(--text-muted); font-size: 13px; }

/* ===== Avatar ===== */
.avatar {
  width: 56px; height: 56px; flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bordeaux) 0%, var(--bordeaux-light) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
}
.avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  border-radius: 50%; display: block;
}

/* Avatar clicável (abre a foto ampliada) */
.avatar-trigger {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  border-radius: 50%;
  transition: transform .15s ease, box-shadow .15s ease;
}
.avatar-trigger:hover { transform: scale(1.04); }
.avatar-trigger:active { transform: scale(.97); }
.avatar-trigger:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(122,31,43,.35); }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Hero / student summary */
.hero {
  background: linear-gradient(120deg, var(--bordeaux) 0%, var(--bordeaux-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(244,196,48,.18);
}
.hero .avatar {
  width: 72px; height: 72px; font-size: 26px;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.5);
}
.hero-info { z-index: 1; }
.hero-info h2 { margin: 0 0 4px; font-size: 22px; }
.hero-info p { margin: 0; opacity: .9; font-size: 13px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  background: rgba(255,255,255,.15);
  padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }

/* Stat cards (Financeiro: só rótulo em cima, valor embaixo — sem ícone) */
.stat {
  display: flex; flex-direction: column; gap: 6px;
  position: relative; min-width: 0;
}
.stat .stat-val {
  font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--navy);
  overflow-wrap: anywhere;
}
.stat .stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* Stat cards com ícone (Início) — ícone + texto lado a lado */
.stat-icon { flex-direction: row; align-items: center; gap: 12px; }
.stat-icon .stat-ic {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
}
.stat-icon .stat-ic.b1 { background: var(--yellow-soft); color: var(--amber); }
.stat-icon .stat-ic.b2 { background: var(--green-soft); color: var(--green); }
.stat-icon .stat-ic.b3 { background: var(--blue-soft); color: var(--blue); }
.stat-icon .stat-ic.b4 { background: var(--bordeaux); color: #fff; opacity:.92; }
.stat-icon .stat-text { min-width: 0; }
.stat-icon .stat-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-icon .stat-label { font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cartões de estatística clicáveis (levam para a seção correspondente) */
.stat-link {
  cursor: pointer;
  padding-right: 34px; /* espaço reservado pro chevron não sobrepor o texto */
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.stat-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(122,31,43,.18); }
.stat-link:active { transform: translateY(0); }
.stat-link:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(122,31,43,.3); }
.stat-chevron {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); opacity: .55; flex: none;
}
.stat-chevron .ic { width: 16px; height: 16px; display: block; }

.section-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: var(--navy); }

/* Info list */
.info-list { display: grid; gap: 0; min-width: 0; }
.info-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--text-muted); flex: none; }
.info-row .v {
  font-weight: 600; text-align: right;
  min-width: 0; overflow-wrap: anywhere; word-break: break-word;
}

/* Notices */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  background: var(--white);
}
.notice:last-child { margin-bottom: 0; }
.notice .n-ic { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; }
.notice.info .n-ic { background: var(--blue-soft); color: var(--blue); }
.notice.success .n-ic { background: var(--green-soft); color: var(--green); }
.notice b { display: block; font-size: 14px; }
.notice p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.notice .n-date { font-size: 11px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.gray { background: #eef0f4; color: var(--text-muted); }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; }
table.data thead th {
  background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
  white-space: nowrap;
}
table.data thead th:first-child { border-top-left-radius: var(--radius); }
table.data thead th:last-child { border-top-right-radius: var(--radius); }
table.data tbody tr { border-bottom: 1px solid var(--border); }
table.data tbody tr:last-child { border-bottom: none; }
table.data tbody tr:nth-child(even) { background: #fafbfc; }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data .strike { color: var(--text-muted); text-decoration: line-through; font-size: 12px; }

/* ===== Progress ===== */
.progress { height: 8px; background: #eef0f4; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--bordeaux), var(--bordeaux-light)); border-radius: 999px; }

/* ===== Subject cards ===== */
.subject-card { display: flex; flex-direction: column; gap: 12px; }
.subject-card .s-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.subject-card .s-code { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: .5px; }
.subject-card h3 { margin: 2px 0 0; font-size: 16px; }
.subject-card .s-teacher { font-size: 13px; color: var(--text-muted); }
.subject-card .s-meta { display: flex; gap: 18px; flex-wrap: wrap; }
.subject-card .s-meta .m-val { font-size: 18px; font-weight: 700; color: var(--navy); }
.subject-card .s-meta .m-lbl { font-size: 11px; color: var(--text-muted); }

/* ===== Alternância tabela (telas largas) / cartões (telas estreitas) =====
   Evita rolagem horizontal forçada em Notas e Financeiro no celular:
   a tabela completa só aparece a partir de 861px; abaixo disso, cada
   linha vira um cartão com a mesma informação, só que legível sem
   precisar arrastar para o lado. */
.narrow-only { display: none; }

/* ===== Cartões de mensalidade (Financeiro, telas estreitas) =====
   Sem "display: flex" aqui de propósito: a classe .narrow-only já esconde
   isso por padrão (display:none). O único lugar que liga o flex é dentro
   do @media abaixo — assim não há disputa de especificidade/ordem entre
   regras com o mesmo peso. */
.pay-cards { flex-direction: column; gap: 12px; }
.pay-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.pay-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pay-month { font-size: 15px; font-weight: 700; color: var(--navy); }
.pay-amount-row { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.pay-strike { display: block; font-size: 12px; color: var(--text-muted); text-decoration: line-through; margin-bottom: 3px; }
.pay-final { display: block; font-size: 22px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.pay-meta { display: flex; gap: 16px; }
.pay-meta-item { flex: 1; min-width: 0; }
.pay-meta-item .l { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.pay-meta-item .v { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* ===== Cartões de notas (Notas, telas estreitas) ===== */
.grade-cards { flex-direction: column; gap: 12px; }
.grade-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.grade-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.grade-card-top .s-code { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: .5px; }
.grade-name { display: block; font-size: 15px; font-weight: 700; color: var(--navy); line-height: 1.3; margin-top: 1px; }
.grade-scores {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--border);
}
.grade-score { text-align: center; }
.grade-score .v { display: block; font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.grade-score .l { display: block; font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }
.grade-summary { display: flex; gap: 16px; }
.grade-summary > div { flex: 1; min-width: 0; }
.grade-summary .l { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.grade-summary .v { display: block; font-size: 16px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.grade-summary .v.grade-avg { color: var(--navy); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; background: var(--bordeaux); color: #fff;
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--white); color: var(--bordeaux); border-color: var(--border); }
.btn.ghost:hover { background: var(--bg); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.green { background: var(--green); }
.btn.navy { background: var(--navy); }
.btn.block { width: 100%; }

/* ===== Carteirinha / cartão digital (frente e verso, com efeito de virar) ===== */
.idcard-scene {
  max-width: 420px; margin: 0 auto;
  perspective: 1600px;
}
.idcard-flip {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586 / 1; /* proporção de cartão (CR80), reconhecível de cara */
  cursor: pointer;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.4, .1, .2, 1);
  border-radius: 18px;
}
.idcard-flip.flipped { transform: rotateY(180deg); }
.idcard-flip:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(122,31,43,.35); }

/* A visibilidade de face (frente/verso) fica só no elemento posicionado/rotacionado;
   o recorte de cantos (overflow) fica num filho à parte. Colocar as duas coisas no
   mesmo elemento quebra o backface-visibility no Safari/Chrome do celular — é a causa
   do "espelhamento" visto ao virar o cartão no mobile. */
.idcard-face {
  position: absolute; inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  box-shadow: var(--shadow-lg);
}
.idcard-back { transform: rotateY(180deg) translateZ(0); }

.idcard-panel {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
}

.idcard-pattern {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 11px);
}

/* --- Frente --- */
.idcard-front .idcard-panel {
  background: linear-gradient(155deg, #8a2331 0%, #5e1620 55%, #16223c 135%);
  color: #fff;
  padding: 6% 6.5%;
}
.idcard-front .idcard-panel::before {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(244,196,48,.14); z-index: 0;
}
.idcard-front .idcard-panel > *:not(.idcard-pattern) { position: relative; z-index: 1; }

.idcard-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.idcard-brand2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.idcard-logo {
  width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.idcard-brandtext { min-width: 0; line-height: 1.15; }
.idcard-brandtext b { display: block; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idcard-brandtext span { display: block; font-size: 8px; opacity: .75; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.idcard-ribbon {
  flex: none;
  font-size: 8px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  background: var(--yellow); color: var(--bordeaux-dark);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}

.idcard-body { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 0; margin: 4% 0; }
.idcard-photo {
  flex: none; width: 25%; aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  border: 2px solid rgba(255,255,255,.55);
  display: grid; place-items: center;
  overflow: hidden; position: relative;
  font-size: 20px; font-weight: 700;
}
.idcard-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.idcard-info { min-width: 0; flex: 1; }
.idcard-name {
  display: block; font-size: 15.5px; font-weight: 800; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idcard-course {
  display: block; font-size: 10.5px; opacity: .85; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idcard-ra-row { display: flex; gap: 14px; margin-top: 9px; }
.idcard-ra { min-width: 0; }
.idcard-ra .l { display: block; font-size: 7.5px; text-transform: uppercase; letter-spacing: .6px; opacity: .7; }
.idcard-ra .v { display: block; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.idcard-footbar {
  flex: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding-top: 10px; margin-top: auto; border-top: 1px solid rgba(255,255,255,.2);
}
.idcard-mini .l { display: block; font-size: 7.5px; text-transform: uppercase; letter-spacing: .5px; opacity: .65; }
.idcard-mini .v { display: block; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.idcard-status2 {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 700;
  background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.idcard-status2 .dot { width: 6px; height: 6px; border-radius: 50%; background: #37d982; flex: none; }

/* --- Verso --- */
.idcard-back-strip { height: 14%; background: var(--navy); flex: none; }
.idcard-back-content { flex: 1; min-height: 0; padding: 5% 6.5%; display: flex; flex-direction: column; background: #f4f1ea; }
.idcard-seal-row { display: flex; gap: 10px; align-items: flex-start; flex: none; }
.idcard-seal {
  flex: none; width: 16%; aspect-ratio: 1;
  border-radius: 50%; border: 2px solid var(--bordeaux);
  display: grid; place-items: center; overflow: hidden; background: #fff;
}
.idcard-seal img { width: 80%; height: 80%; object-fit: cover; border-radius: 50%; }
.idcard-legal { font-size: 7.5px; line-height: 1.4; color: var(--text-muted); margin: 0; }
.idcard-barcode {
  margin-top: auto;
  height: 22%; min-height: 34px;
  background-color: #fff;
  background-image: repeating-linear-gradient(90deg,
    #16223c 0px, #16223c 2px, transparent 2px 5px,
    #16223c 5px, #16223c 7px, transparent 7px 9px,
    #16223c 9px, #16223c 14px, transparent 14px 16px,
    #16223c 16px, #16223c 18px, transparent 18px 24px,
    #16223c 24px, #16223c 26px, transparent 26px 27px,
    #16223c 27px, #16223c 32px, transparent 32px 35px);
  background-repeat: repeat-x; background-size: 35px 100%;
  border-radius: 4px;
}
.idcard-barcode-num {
  flex: none; text-align: center; font-size: 10px; letter-spacing: 3px;
  font-variant-numeric: tabular-nums; margin-top: 6px; color: var(--navy); font-weight: 700;
}

@media (max-width: 380px) {
  .idcard-name { font-size: 14px; }
  .idcard-brandtext b { font-size: 11px; }
  .idcard-legal { display: none; }
  .idcard-seal-row { justify-content: center; }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(22,34,60,.55);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius);
  max-width: 420px; width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  background: var(--bordeaux); color: #fff;
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head button { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; }

/* Modal da foto do aluno */
.photo-modal { max-width: 340px; }
.photo-modal-body { text-align: center; }
.photo-modal-frame {
  width: 62%; max-width: 220px; aspect-ratio: 1; margin: 0 auto 18px;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--bordeaux) 0%, var(--bordeaux-light) 100%);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.55), var(--shadow-lg);
}
.photo-modal-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-modal-frame span { color: #fff; font-weight: 700; font-size: clamp(36px, 12vw, 56px); }
.photo-modal-notice {
  font-size: 12.5px; line-height: 1.55; text-align: left; margin: 0;
  background: var(--blue-soft); color: var(--blue);
  border: 1px solid #c9ddf6; border-radius: var(--radius-sm);
  padding: 12px 14px;
}

/* ===== Bloqueio por pagamento pendente =====
   O conteúdo do portal fica visível ao fundo (levemente borrado e travado,
   só o suficiente pra pessoa reconhecer a própria foto/dados), atrás do
   modal de pagamento — que não tem botão de fechar. */
body.payment-locked .app {
  filter: blur(2.5px);
  pointer-events: none;
  user-select: none;
}
body.payment-locked { overflow: hidden; }

.preview-close-note {
  display: block; padding: 11px 14px; font-size: 11.5px; line-height: 1.4;
  color: rgba(255,255,255,.75);
}

/* O modal fica compacto de propósito: assim sobra bastante espaço em volta
   pra pessoa ver (levemente borrado) o próprio fundo/conta atrás dele. */
#payment-modal.payment-overlay { background: rgba(51,65,110,.24); backdrop-filter: blur(1px); }
.payment-modal { max-width: 360px; max-height: 86vh; display: flex; flex-direction: column; }
/* Rostinho do personagem no topo do modal — deixa o aviso de pagamento
   bem menos "cobrança" e mais conversa. */
.payment-modal .modal-head { justify-content: flex-start; gap: 10px; }
/* Sem recorte circular: o rosto.png é retrato (664x800), então cortar em
   quadrado decapitaria o personagem. Aqui ele aparece inteiro. */
.modal-head-face {
  height: 44px; width: auto; flex: none;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.25));
  margin-bottom: -6px; /* "apoia" o queixo na barra do título */
}
.payment-modal .modal-body { overflow-y: auto; }
.payment-modal-body { text-align: center; }
.payment-modal-intro { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0 0 16px; text-align: left; }
.payment-step { animation: pop .18s ease; }

/* Seletor de plano — lista vertical de 3 opções, fácil de ler no celular */
.plan-selector { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.plan-option {
  position: relative; width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: #fff; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
  font-family: inherit;
}
.plan-option:hover { border-color: var(--bordeaux-light); transform: translateY(-1px); }
.plan-option:active { transform: translateY(0); }
.plan-option.active { border-color: var(--bordeaux); background: var(--yellow-soft); }
.plan-option .plan-name { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.plan-option .plan-price { font-size: 17px; font-weight: 800; color: var(--bordeaux); font-variant-numeric: tabular-nums; flex: none; }
.plan-option .plan-badge {
  position: absolute; top: -9px; left: 14px;
  background: var(--green); color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; letter-spacing: .2px; white-space: nowrap;
}
.plan-option .plan-badge.plan-badge-alt { background: var(--blue); }
.plan-option[disabled] { opacity: .6; cursor: wait; }
.plan-hint { font-size: 11.5px; color: var(--text-muted); text-align: left; margin: 0 0 16px; }

.plan-change-link {
  display: inline-block; background: none; border: none; padding: 0; margin: 0 0 14px;
  font-size: 12.5px; font-weight: 600; color: var(--blue); cursor: pointer; font-family: inherit;
}
.plan-change-link:hover { text-decoration: underline; }

.payment-amount { font-size: 30px; font-weight: 800; color: var(--navy); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.payment-qr {
  width: 76%; max-width: 220px; margin: 0 auto 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px; background: #fff;
}
.payment-qr img { width: 100%; height: auto; display: block; }
.payment-code-label { display: block; text-align: left; font-size: 12px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.payment-code-row { display: flex; gap: 8px; margin-bottom: 16px; }
.payment-code-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 12.5px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; background: var(--bg); color: var(--text);
}
.payment-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--amber);
  background: var(--amber-soft); border: 1px solid #f0dfa8; border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 14px;
}
.payment-status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none;
  animation: payment-pulse 1.4s ease-in-out infinite;
}
@keyframes payment-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.payment-security-note {
  font-size: 11px; color: var(--text-muted); text-align: center; margin-bottom: 16px;
}

/* ===== Modal: pagamento aprovado =====
   Fica FORA do .modal-body de propósito: assim o personagem comemorando
   (aprovado.png, 1024x812) encosta exatamente no fim do modal, de ponta a
   ponta, sem depender de margem negativa (que criaria barra de rolagem
   horizontal, já que o .modal-body tem overflow-y:auto). Os cantos de
   baixo são recortados pelo overflow:hidden do próprio .modal. */
.payment-approved { text-align: center; overflow: hidden; }
.payment-approved-top { padding: 20px 20px 2px; }
.payment-approved-top .btn {
  background: var(--green); font-size: 15px; padding: 13px 20px; width: 100%;
}
.payment-approved-note { font-size: 11.5px; color: var(--text-muted); margin: 8px 0 0; }
.payment-approved-img { display: block; width: 100%; height: auto; }

/* FAQ (accordion nativo via <details>/<summary>, sem JS) */
.payment-faq { text-align: left; border-top: 1px solid var(--border); padding-top: 12px; }
.payment-faq-toggle {
  cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--bordeaux);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.payment-faq-toggle::-webkit-details-marker { display: none; }
.payment-faq-toggle::after { content: "▾"; font-size: 11px; transition: transform .15s ease; }
.payment-faq[open] > .payment-faq-toggle::after { transform: rotate(180deg); }
.payment-faq-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 12px; background: var(--bg); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 9px 0;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 15px; color: var(--text-muted); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 10px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.faq-preview-cta {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--blue-soft); border: 1px dashed #9cbcec; border-radius: var(--radius-sm);
  padding: 12px;
}
.faq-preview-cta span { font-size: 12px; font-weight: 600; color: var(--blue); }

/* ===== Alerts ===== */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; margin-bottom: 16px;
}
.alert.success { background: var(--green-soft); color: var(--green); border: 1px solid #bfe6cd; }
.alert.error { background: #fdecec; color: #c0392b; border: 1px solid #f5c6c6; }
.alert.info { background: var(--blue-soft); color: var(--blue); border: 1px solid #c9ddf6; }

.demo-banner {
  background: var(--yellow-soft); color: var(--amber);
  border: 1px solid #f0dfa8;
  text-align: center; font-size: 12px; font-weight: 600;
  padding: 8px 14px;
}

/* ===== Forms (admin) ===== */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  /* 16px+ evita o zoom automático do Safari/iOS ao focar o campo */
  font-size: 16px; font-family: inherit; background: #fff; color: var(--text);
  width: 100%; max-width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--bordeaux);
  box-shadow: 0 0 0 3px rgba(122,31,43,.12);
}
.field textarea { resize: vertical; min-height: 90px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 15px; }
.field .hint { font-size: 11px; color: var(--text-muted); }
fieldset {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin: 0 0 20px;
}
fieldset legend { font-weight: 700; color: var(--bordeaux); padding: 0 8px; font-size: 15px; }

.photo-preview {
  width: 90px; height: 90px; border-radius: 12px; overflow: hidden;
  background: var(--bg); border: 1px dashed var(--border);
  display: grid; place-items: center; color: var(--text-muted); font-size: 12px;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Login (admin) ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, var(--bordeaux) 0%, var(--navy) 100%); }
.login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 380px; padding: 32px; }
.login-card .brand { border: none; justify-content: center; padding: 0 0 20px; }
.login-card h2 { text-align: center; margin: 0 0 4px; font-size: 20px; }
.login-card .sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 22px; }
.login-card .field { margin-bottom: 14px; }
.login-hint { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 16px; }

/* ===== Tela de inscrição ===== */
.enroll-page {
  min-height: 100vh; padding: 40px 16px;
  display: flex; justify-content: center; align-items: flex-start;
  background: linear-gradient(135deg, var(--bordeaux) 0%, var(--navy) 100%);
}
.enroll-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 780px; padding: 0 0 30px; overflow: hidden;
}
.enroll-head {
  background: linear-gradient(120deg, var(--bordeaux) 0%, var(--bordeaux-dark) 100%);
  color: #fff; padding: 28px 30px; display: flex; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
}
.enroll-head::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(244,196,48,.16);
}
.enroll-head .brand-logo { width: 52px; height: 52px; font-size: 20px; z-index: 1; }
.enroll-head-text { z-index: 1; }
.enroll-head-text h1 { margin: 0 0 3px; font-size: 20px; }
.enroll-head-text p { margin: 0; font-size: 13px; opacity: .9; }
.enroll-body { padding: 26px 30px 0; }
/* Espaço reservado para o mascote/personagem-guia (imagem entra depois no
   lugar do emoji — a bolha e o tamanho já ficam prontos). */
.mascot-slot {
  width: 68px; height: 68px; margin: -48px auto 14px; position: relative; z-index: 2;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-lg);
  display: grid; place-items: center; font-size: 30px;
  border: 3px solid var(--yellow-soft); overflow: hidden;
}
/* contain (não cover) pra não cortar o rostinho, que é retrato */
.mascot-slot img { width: 86%; height: 86%; object-fit: contain; margin-bottom: -6%; }
.enroll-intro { color: var(--text-muted); font-size: 13.5px; margin: 0 0 20px; }
.enroll-body .demo-banner { border-radius: 10px; margin-bottom: 20px; }
.check-row label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer;
}
.check-row input[type="checkbox"] {
  width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--bordeaux);
}
.req { color: #c0392b; margin-left: 2px; }
.honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 560px) {
  .enroll-head { padding: 22px 20px; }
  .enroll-body { padding: 22px 20px 0; }
}

/* Admin topbar */
.admin-top {
  background: var(--bordeaux); color: #fff;
  padding: 14px 22px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 40;
}
.admin-top .brand-logo { width: 36px; height: 36px; font-size: 15px; }
.admin-top b { font-size: 15px; }
.admin-top .spacer { flex: 1; }
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 24px 20px 60px; }

/* ===== Overlay for mobile menu ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(22,34,60,.5);
  z-index: 45; display: none;
}
.overlay.show { display: block; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: 1fr; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .burger { display: flex; }
  .header-user .u-info { display: none; }
  .content { padding: 16px; }
  .hero { flex-direction: column; text-align: center; }
  .wide-only { display: none; }
  .pay-cards.narrow-only, .grade-cards.narrow-only { display: flex; }
}
@media (max-width: 480px) {
  .hero-info h2 { font-size: 19px; }
  .login-wrap, .enroll-page { padding: 12px; }
  .login-card { padding: 22px; }
  .enroll-head { padding: 18px 16px; gap: 12px; }
  .enroll-head-text h1 { font-size: 18px; }
  .enroll-body { padding: 18px 16px 0; }
  table.data { min-width: 480px; }
  .grid.cols-4 { gap: 10px; }
  .grid.cols-4 .card.stat { padding: 12px; gap: 8px; }
  .stat-link { padding-right: 26px; }
  .stat .stat-ic { width: 36px; height: 36px; border-radius: 10px; }
  .stat .stat-val { font-size: 16.5px; }
  .stat .stat-label { font-size: 10.5px; }
  .stat-chevron { right: 10px; }
  .stat-chevron .ic { width: 14px; height: 14px; }
}
@media (max-width: 360px) {
  .login-card { padding: 18px; }
}

/* Safe area for iOS PWA */
@supports (padding: max(0px)) {
  .header { padding-top: env(safe-area-inset-top); height: calc(var(--header-h) + env(safe-area-inset-top)); }
  .sidebar { padding-top: env(safe-area-inset-top); }
}


/* =========================================================
   Landing page "Pagar Meia" (apresentação/venda)
   Herda o tema calmo (.calm-theme) e acrescenta as cores da marca.
   ========================================================= */
.landing-page {
  background: var(--bg);
  --brand-1: #14356b;  /* azul escuro — "Pagar" */
  --brand-2: #2ec4b6;  /* verde água — "Meia" */
}

/* ---------- Cabeçalho ---------- */
.landing-nav {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid var(--border);
}
.landing-nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 20px;
}
.landing-brand { display: flex; align-items: center; gap: 10px; flex: none; }
/* O logo é o rostinho do personagem: círculo claro com a imagem inteira
   dentro (sem cortar), como um "selo" da marca. */
.brand-mark {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  background: linear-gradient(160deg, #eafaf8 0%, #d9f2ee 100%);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(46,196,182,.35);
}
.brand-mark img { width: 88%; height: 88%; object-fit: contain; margin-bottom: -8%; }
.brand-words { font-size: 20px; font-weight: 800; letter-spacing: -.4px; line-height: 1; }
.brand-word-1 { color: var(--brand-1); }
.brand-word-2 { color: var(--brand-2); }

.landing-nav-links { display: flex; gap: 22px; flex: 1; justify-content: center; }
.landing-nav-links a { font-size: 13.5px; font-weight: 600; color: var(--text-muted); }
.landing-nav-links a:hover { color: var(--brand-1); }
.landing-nav-cta { display: flex; gap: 8px; flex: none; }
.landing-nav-cta .btn { background: var(--brand-1); }
.landing-nav-cta .btn.ghost { background: #fff; color: var(--brand-1); border-color: var(--border); }

/* ---------- Topo (banner + chamada) ---------- */
.landing-hero {
  text-align: center; color: #fff; padding: 46px 20px 56px;
  background: linear-gradient(150deg, var(--brand-1) 0%, #1d5aa8 55%, #23a89c 100%);
  position: relative; overflow: hidden;
}
/* Manchas suaves ao fundo, só pra dar profundidade sem poluir */
.landing-hero::before, .landing-hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; z-index: 0;
}
.landing-hero::before { width: 280px; height: 280px; background: var(--brand-2); top: -90px; left: -80px; }
.landing-hero::after  { width: 320px; height: 320px; background: #6fb1e8; bottom: -120px; right: -80px; }

/* Banner: a versão desktop é panorâmica (1916x821) e a mobile é em pé
   (941x1300). As duas aparecem inteiras, sem corte — as medidas no HTML
   reservam o espaço certo pra página não "pular" durante o carregamento. */
.landing-hero.has-banner { padding-top: 20px; }
.hero-banner {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto 30px;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 16px 38px rgba(10, 30, 60, .3);
  line-height: 0;
}
.hero-banner img { width: 100%; height: auto; display: block; }

.landing-hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block; background: rgba(255,255,255,.18); color: #fff;
  font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.landing-hero h1 {
  font-size: clamp(25px, 4.4vw, 40px); line-height: 1.15; letter-spacing: -.5px;
  margin: 0 auto 14px; max-width: 740px;
}
.landing-hero-inner > p {
  font-size: 15.5px; opacity: .94; max-width: 600px; margin: 0 auto 28px; line-height: 1.65;
}
.landing-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 26px; }
.landing-hero-ctas .btn {
  background: #fff; color: var(--brand-1); padding: 14px 26px; font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 18px rgba(10,30,60,.22);
}
.landing-hero-ctas .btn.ghost {
  background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); box-shadow: none;
}
.landing-hero-trust {
  list-style: none; margin: 0; padding: 0;
  font-size: 12.5px; display: flex; gap: 10px 20px; flex-wrap: wrap; justify-content: center;
}
.landing-hero-trust li {
  background: rgba(255,255,255,.12); border-radius: 999px; padding: 5px 13px; opacity: .95;
}

/* ---------- Seções ---------- */
.landing-section { max-width: 1120px; margin: 0 auto; padding: 62px 20px; }
/* Seções alternadas em branco, pra dar respiro entre os blocos */
.landing-section-alt {
  background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  max-width: none;
}
.landing-section-alt > * { max-width: 1120px; margin-inline: auto; }
.landing-section-head { max-width: 680px; margin: 0 auto 38px; text-align: center; }
.landing-section-title {
  font-size: clamp(21px, 3.1vw, 28px); font-weight: 800; color: var(--brand-1);
  letter-spacing: -.4px; margin: 0 0 10px; line-height: 1.25;
}
.landing-section-sub { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin: 0; }

/* ---------- Benefícios, com o personagem no meio ----------
   No desktop: cards à esquerda, personagem no centro (dentro do próprio
   "palco", parte do mesmo grid) e cards à direita. No mobile tudo empilha:
   metade dos cards, o personagem, a outra metade. */
.features-layout { display: grid; gap: 20px; align-items: stretch; }
.features-col { display: flex; flex-direction: column; gap: 16px; }

/* Sem personagem enviado ainda: volta ao grid clássico de 3 colunas */
.features-layout:not(.with-character) .features-col {
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.features-layout.with-character { grid-template-columns: 1fr minmax(200px, 280px) 1fr; }

.features-character {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0 10px;
  border-radius: var(--radius);
  /* o "chão" tingido cresce de baixo pra cima: dá a sensação de que ele
     está apoiado na seção, e não colado por cima dela */
  background: linear-gradient(180deg, transparent 20%, rgba(46,196,182,.10) 62%, rgba(46,196,182,.18) 100%);
}
.features-character img {
  width: 100%; max-width: 270px; height: auto; margin-top: auto;
  filter: drop-shadow(0 14px 22px rgba(20,53,107,.22));
  animation: hero-float 5.5s ease-in-out infinite;
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .features-character img { animation: none; } }

/* Balãozinho de fala acima da cabeça, com rabicho apontando pra baixo */
.character-caption {
  position: relative; z-index: 1; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 10px 16px; font-size: 12.5px; font-weight: 600; color: var(--brand-1);
  box-shadow: var(--shadow); text-align: center; line-height: 1.45;
}
.character-caption::after {
  content: ""; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px; background: #fff;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

/* Cards de benefício: ícone à esquerda, texto à direita — cabe mais
   detalhe sem virar um bloco de texto pesado. */
.feature-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-card .f-icon {
  width: 44px; height: 44px; flex: none; border-radius: 13px;
  display: grid; place-items: center; font-size: 21px;
}
.feature-card .f-icon.c1 { background: #e7f2fc; }
.feature-card .f-icon.c2 { background: #e3f8f5; }
.feature-card .f-icon.c3 { background: #eef0fd; }
.feature-card .f-text { min-width: 0; }
.feature-card h3 { font-size: 14.5px; margin: 1px 0 5px; color: var(--brand-1); line-height: 1.3; }
.feature-card p { font-size: 12.8px; color: var(--text-muted); margin: 0; line-height: 1.6; }

/* ---------- Como funciona ---------- */
.landing-steps-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.step-card { text-align: center; padding: 4px; }
.step-num {
  position: relative; /* ancora o rostinho espiando (.face-peek) */
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-1), #2b6fc4); color: #fff;
  display: grid; place-items: center; font-weight: 800; margin: 0 auto 14px; font-size: 16px;
  box-shadow: 0 6px 14px rgba(20,53,107,.22);
}
.step-card h3 { font-size: 14.5px; margin: 0 0 6px; color: var(--brand-1); }
.step-card p { font-size: 12.8px; color: var(--text-muted); margin: 0; line-height: 1.6; }

/* ---------- Planos ---------- */
.landing-pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch;
  max-width: 940px; margin: 0 auto;
}
.price-card {
  position: relative; background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 28px 22px; text-align: center; display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.price-card.highlight {
  border-color: var(--brand-2);
  box-shadow: 0 10px 30px rgba(46,196,182,.18);
}
.price-card .price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand-2); color: #fff; font-size: 10.5px; font-weight: 800;
  padding: 4px 14px; border-radius: 999px; white-space: nowrap; letter-spacing: .2px;
}
.price-card .price-name { font-weight: 700; color: var(--brand-1); font-size: 14.5px; }
.price-card .price-value {
  font-size: 34px; font-weight: 800; color: var(--brand-1);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.price-card.highlight .price-value { color: var(--brand-2); }
.price-card .price-note { font-size: 12.5px; color: var(--text-muted); flex: 1; line-height: 1.6; }
.price-card .btn { background: var(--brand-1); }
.price-card .btn.ghost { background: #fff; color: var(--brand-1); border-color: var(--border); }
.price-card.highlight .btn { background: var(--brand-2); }

/* ---------- Dúvidas ---------- */
.landing-faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 740px; margin: 0 auto; }
.landing-faq-list .faq-item { padding: 4px 18px; background: #fff; }
.landing-faq-list .faq-item summary { padding: 13px 0; font-size: 13.5px; color: var(--brand-1); }
.landing-faq-list .faq-item p { font-size: 13px; padding-bottom: 4px; }
.landing-faq-list .faq-preview-cta { background: #e3f8f5; border-color: #9fe0d8; }
.landing-faq-list .faq-preview-cta span { color: #0f7a70; font-size: 12.5px; }
.landing-faq-list .faq-preview-cta .btn { background: var(--brand-2); }

/* ---------- Chamada final ---------- */
.landing-final-cta { padding: 0 20px 62px; }
.final-cta-card {
  max-width: 720px; margin: 0 auto; text-align: center;
  background: linear-gradient(150deg, var(--brand-1) 0%, #1d5aa8 55%, #23a89c 100%);
  color: #fff; border-radius: var(--radius); padding: 40px 26px 34px;
  box-shadow: 0 16px 38px rgba(10,30,60,.24);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.final-cta-card h2 { font-size: clamp(20px, 3vw, 27px); margin: 0; letter-spacing: -.4px; line-height: 1.25; }
.final-cta-card p { font-size: 14.5px; opacity: .94; margin: 0; max-width: 520px; line-height: 1.6; }
.final-cta-card .btn {
  background: #fff; color: var(--brand-1); padding: 14px 28px; font-size: 15px; font-weight: 700;
  margin-top: 4px; box-shadow: 0 6px 18px rgba(10,30,60,.24);
}
.final-cta-note { font-size: 12px; opacity: .85; }

/* ---------- Rodapé ---------- */
.landing-footer { text-align: center; padding: 8px 20px 46px; color: var(--text-muted); font-size: 12.5px; }
.landing-footer .demo-banner { max-width: 660px; margin: 0 auto 14px; border-radius: 10px; }
.landing-footer .footer-copy { margin: 0 0 4px; }
.landing-footer .face-mini { height: 24px; vertical-align: -7px; margin-right: 6px; }

/* =========================================================
   Rostinho do personagem (rosto.png, 664x800) em pontos estratégicos.
   Sempre com a proporção original preservada (height + width:auto),
   nunca cortado em círculo — senão o rosto fica decapitado.
   ========================================================= */
.face-mini {
  display: inline-block; width: auto; height: 32px; vertical-align: -9px;
  margin-right: 9px; flex: none;
}
.face-peek {
  position: absolute; top: -18px; right: -20px; height: 34px; width: auto;
  transform: rotate(9deg); filter: drop-shadow(0 3px 6px rgba(20,53,107,.22));
}
.face-corner {
  position: absolute; top: -26px; right: -12px; height: 48px; width: auto;
  transform: rotate(11deg); filter: drop-shadow(0 4px 8px rgba(20,53,107,.24));
}
.face-cta { height: 46px; width: auto; margin: 0 auto; }
.face-cta-big { height: 68px; width: auto; margin: 0 auto 2px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.22)); }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .landing-nav-links { display: none; }
  .features-layout.with-character { grid-template-columns: 1fr; }
  .features-layout .features-col { display: grid; grid-template-columns: 1fr 1fr; }
  .features-character { padding: 18px 10px 0; }
  .features-character img { max-width: 230px; }
  .landing-steps-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .landing-pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
  .price-card { padding: 24px 20px; }
}
@media (max-width: 620px) {
  .landing-hero { padding: 34px 16px 46px; }
  .landing-hero.has-banner { padding-top: 12px; }
  .hero-banner { margin-bottom: 24px; border-radius: var(--radius-sm); }
  .landing-section { padding: 44px 16px; }
  .landing-section-head { margin-bottom: 28px; }
  .landing-final-cta { padding: 0 16px 46px; }
  .final-cta-card { padding: 32px 20px 28px; }

  .landing-nav-inner { gap: 10px; padding: 9px 14px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-words { font-size: 17px; }
  .landing-nav-cta { gap: 6px; }
  .landing-nav-cta .btn { padding: 7px 11px; font-size: 12px; }

  .features-layout .features-col { grid-template-columns: 1fr; }
  .features-character img { max-width: 200px; }
  .landing-steps-grid { grid-template-columns: 1fr; gap: 18px; }
  .landing-hero-trust { gap: 8px; }
  .landing-hero-trust li { font-size: 11.5px; padding: 5px 11px; }
}
@media (max-width: 380px) {
  .brand-words { font-size: 15.5px; }
  .landing-nav-cta .btn.ghost { display: none; }
}
