/* ===== Tokens ===== */
:root {
  --paper: #F6F5FB;
  --paper-raised: #FFFFFF;
  --ink: #1C1B29;
  --ink-soft: #6E6B85;
  --sage: #6C63FF;
  --sage-deep: #4B3FD1;
  --ocre: #FF9257;
  --denim: #2FA8E0;
  --line: #E7E5F2;
  --alert: #E24C3F;
  --active-fill: #1C1B29;
  --tint-warm: #FBE9DD;
  --tint-green: #ECE9FF;
  --tint-chip: #FFF0E4;
  --tint-schedule: #F1EFFA;

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="dark"] {
  --paper: #121120;
  --paper-raised: #1C1B2E;
  --ink: #F2F1F8;
  --ink-soft: #9C99B8;
  --sage: #8C82FF;
  --sage-deep: #B4ACFF;
  --ocre: #FFA873;
  --denim: #63BBEF;
  --line: #302E46;
  --alert: #FF6F63;
  --active-fill: #423F5C;
  --tint-warm: #2E2416;
  --tint-green: #211F35;
  --tint-chip: #332417;
  --tint-schedule: #201E30;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
button, input, textarea {
  font-family: inherit;
  color: inherit;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  position: relative;
}

/* iOS dá zoom automático em campo com fonte < 16px. Em telas de toque,
   força 16px nos campos pra página não "esticar" ao tocar num input. */
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px !important; }
  .schedule-table input { font-size: 16px !important; }
}

/* ===== Header ===== */
.app-header {
  padding: calc(16px + var(--safe-top)) 20px 14px;
  background: var(--sage);
  color: #fff;
  border-radius: 0 0 24px 24px;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 6px 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.brand-sub { font-size: 11.5px; opacity: 0.85; }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* rotina-style progress trail — signature element */
.trail {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}
.trail-dot {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.28);
  position: relative;
  overflow: hidden;
}
.trail-dot.is-filled { background: #fff; }

/* ===== Main / views ===== */
.app-main {
  flex: 1;
  padding: 18px 18px calc(96px + var(--safe-bottom));
}
.view-head { margin-bottom: 14px; }
.view-head h2 { font-size: 21px; font-weight: 600; }
.view-sub { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

.hello-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10.5px;
  color: var(--sage-deep);
  font-weight: 600;
}
.hello-card h1 {
  font-size: 24px;
  margin-top: 6px;
  font-weight: 600;
  line-height: 1.25;
}
.hello-sub { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); }
.app-tagline { margin-top: 10px; font-size: 12px; font-style: italic; color: var(--sage-deep); }

.next-card, .continue-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 12px;
}
.next-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.next-aluno { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.next-hora { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.next-btn { margin-top: 12px; }
.suggestion-clickable { cursor: pointer; }
.suggestion-clickable:hover { color: var(--sage-deep); }

.quick-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.quick-card {
  text-align: left;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}
.quick-tag {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
}
.tag-verde { background: var(--sage); }
.tag-azul { background: var(--denim); }
.tag-ocre { background: var(--ocre); }
.tag-premium { background: #8B5CF6; }

.quick-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.quick-desc { font-size: 12.5px; color: var(--ink-soft); }

.tip-card {
  margin-top: 16px;
  background: var(--tint-warm);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.tip-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ocre); }
.tip-body { font-size: 13px; margin-top: 6px; line-height: 1.4; }

/* Chips / filters */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
}
.chip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.chip.is-active {
  background: var(--active-fill);
  color: #fff;
  border-color: var(--active-fill);
}

/* Activity list */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.activity-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: transparent;
}
.activity-check.is-done {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}
.activity-icon { font-size: 18px; flex-shrink: 0; }
.activity-thumb {
  width: 46px; height: 46px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.activity-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.activity-thumb-fallback {
  width: 100%; height: 100%;
  display: none;
  align-items: center; justify-content: center;
  font-size: 20px;
}
.activity-main { flex: 1; min-width: 0; }
.activity-title { font-weight: 600; font-size: 14.5px; }
.activity-area { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.activity-arrow { color: var(--ink-soft); font-size: 16px; }

/* Detail view */
.back-btn {
  background: none; border: none; color: var(--sage-deep);
  font-size: 14px; font-weight: 600; padding: 0 0 14px; cursor: pointer;
}
.detail-hero {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  display: block;
  background: var(--line);
}
.detail-tag {
  display: inline-block;
  color: #fff; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.detail-title { font-size: 22px; font-weight: 600; line-height: 1.25; margin-bottom: 16px; }
.detail-row { margin-bottom: 16px; }
.detail-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--sage-deep); margin-bottom: 5px;
}
.detail-body { font-size: 14.5px; line-height: 1.55; }
.mark-done-btn {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--sage);
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
}
.mark-done-btn.is-done { background: var(--ink-soft); }

/* Forms */
.form-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-pair { display: flex; gap: 10px; }
.field-pair .field { flex: 1; }
.field-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
input[type="text"], textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  background: var(--paper);
  resize: vertical;
}
input:focus, textarea:focus, button:focus-visible, .quick-card:focus-visible, .activity-card:focus-visible {
  outline: 2px solid var(--denim);
  outline-offset: 2px;
}
.field-group { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.field-group legend { padding: 0; margin-bottom: 2px; }
.radio-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }

.btn-primary {
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
}
.btn-secondary {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 13px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  margin-top: 8px;
}

.suggestion-card {
  margin-top: 14px;
  background: var(--tint-green);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.sug-motivo { font-size: 12px; color: var(--ink-soft); margin: 2px 0 10px; line-height: 1.4; }
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 7px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.suggestion-item:last-child { margin-bottom: 0; }
.suggestion-item:hover { border-color: var(--sage); }
.suggestion-item:active { transform: scale(0.99); }
.suggestion-item.is-locked { opacity: 0.7; }
.sug-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--tint-warm); }
.sug-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sug-titulo { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.sug-meta { font-size: 11.5px; color: var(--ink-soft); }
.sug-tag {
  flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  color: #fff; background: var(--sage); border-radius: 999px; padding: 3px 8px;
}

/* Chips de foco no cadastro do aluno */
.foco-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.foco-chip { position: relative; }
.foco-chip input { position: absolute; opacity: 0; pointer-events: none; }
.foco-chip span {
  display: block; cursor: pointer;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12.5px;
  transition: all 0.14s ease;
}
.foco-chip input:checked + span {
  background: var(--sage); color: #fff; border-color: var(--sage); font-weight: 600;
}
.foco-chip input:focus-visible + span { outline: 2px solid var(--denim); outline-offset: 2px; }

.section-divider {
  height: 1px;
  background: var(--line);
  margin: 28px 0 18px;
}

.plan-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  font-size: 13.5px;
  line-height: 1.6;
}
.plan-card .plan-empty { color: var(--ink-soft); }
.plan-row { margin-bottom: 10px; }
.plan-row b { color: var(--sage-deep); }

/* Resource cards */
.resource-block { margin-bottom: 26px; }
.resource-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.res-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  text-align: center;
}
.res-card-top {
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
  padding: 10px 4px;
  line-height: 1.2;
}
.res-card-bottom {
  font-size: 9.5px;
  color: var(--ink-soft);
  padding: 6px 4px;
}

.schedule-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--line); }
.schedule-table { border-collapse: collapse; width: 100%; font-size: 11px; }
.schedule-table th {
  background: var(--sage);
  color: #fff;
  padding: 8px 4px;
  font-weight: 600;
}
.schedule-table td {
  border: 1px solid var(--line);
  padding: 0;
  text-align: center;
}
.schedule-table td:first-child {
  background: var(--tint-schedule);
  font-weight: 600;
  font-size: 10px;
  padding: 8px 4px;
}
.schedule-table input.cron-hora-input {
  width: 100%;
  border: 1px dashed var(--line);
  background: transparent;
  padding: 8px 3px;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.schedule-table input.cron-hora-input:focus { border-style: solid; border-color: var(--sage); }
.cron-remover {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.cron-remover:hover { color: var(--alert); background: rgba(226,76,63,0.1); }
.schedule-table input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 2px;
  font-size: 10.5px;
  text-align: center;
  border-radius: 0;
}
.hint { font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; }

/* Tab bar */
.tab-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  padding: 10px 8px calc(10px + var(--safe-bottom));
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--ink-soft);
  font-weight: 500;
  cursor: pointer;
  padding: 4px;
}
.tab-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line);
}
.tab-btn.is-active { color: var(--sage-deep); font-weight: 700; }
.tab-btn.is-active .tab-dot { background: var(--sage); }

/* Modal */
.modal {
  position: fixed; inset: 0;
  background: rgba(10,10,20,0.55);
  display: flex; align-items: flex-end;
  z-index: 50;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--paper-raised);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 20px 20px 0 0;
  padding: 22px;
}
.modal-card h3 { font-size: 18px; margin-bottom: 10px; }
.modal-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 16px; }

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

/* View transitions */
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.view-enter { animation: viewFadeIn 0.22s ease; }

@media print {
  .tab-bar, .app-header, .btn-secondary { display: none !important; }
  .app-main { padding: 0; }
}

/* Recurso: modal ampliado + impressão individual */
.res-card { cursor: pointer; }
.res-card-big {
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  padding: 30px 16px;
  text-align: center;
  margin-bottom: 14px;
}
.modal-recurso-sub { text-align: center; color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }

#print-single { display: none; }
body.printing-single #print-single { display: block; }
@media print {
  body.printing-single .app-shell > *:not(#print-single),
  body.printing-single .modal { display: none !important; }
  .print-single-card {
    text-align: center;
    margin-top: 40vh;
    transform: translateY(-50%);
  }
  .print-single-card h2 { font-family: var(--font-display); font-size: 36px; }
  .print-single-card p { font-size: 18px; color: #444; margin-top: 10px; }
}

/* Biblioteca: abas */
.lib-abas {
  display: flex; gap: 6px; margin-bottom: 12px;
  background: var(--tint-schedule); border-radius: var(--radius-md); padding: 4px;
}
.lib-aba {
  flex: 1; border: none; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); padding: 10px 8px; border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.lib-aba.is-active { background: var(--paper-raised); color: var(--ink); box-shadow: 0 1px 4px rgba(28,27,41,0.08); }
.lib-aba-lock { font-size: 11px; }

/* Biblioteca: grade de áreas */
.area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.area-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--paper-raised); border: 1px solid var(--line);
  border-left: 4px solid var(--area-cor, var(--sage));
  border-radius: var(--radius-md); padding: 14px;
  cursor: pointer; text-align: left; font-family: var(--font-body);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.area-card:active { transform: scale(0.98); }
.area-ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 4px;
}
.area-nome { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--ink); line-height: 1.25; }
.area-qtd { font-size: 11.5px; color: var(--ink-soft); }

.lib-dica-outra {
  width: 100%; margin-top: 10px; cursor: pointer;
  background: var(--tint-green); border: 1px dashed rgba(139,92,246,0.45);
  border-radius: var(--radius-md); padding: 13px 14px;
  font-family: var(--font-body); font-size: 13px; color: var(--ink);
  text-align: left; line-height: 1.45;
}
.lib-dica-outra strong { color: var(--sage-deep); }

.lib-voltar {
  background: none; border: none; cursor: pointer;
  color: var(--sage-deep); font-family: var(--font-body);
  font-size: 13.5px; font-weight: 600; padding: 4px 0 10px;
}

.hab-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: var(--sage-deep); background: var(--tint-green);
  border-radius: 999px; padding: 2px 8px; margin-right: 6px;
}
.clube-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: #fff; background: #8B5CF6; border-radius: 999px; padding: 3px 9px;
}
.clube-badge--detalhe { font-size: 11px; padding: 4px 10px; margin-left: 6px; vertical-align: middle; }

/* Cartão bloqueado (material do Clube) */
.activity-card.is-locked { opacity: 0.82; }
.activity-card.is-locked .activity-title { color: var(--ink-soft); }
.activity-thumb { position: relative; }
.activity-lock {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(28,27,41,0.45); color: #fff; font-size: 18px;
  border-radius: inherit;
}

/* Bloco de bloqueio no detalhe */
.lock-card {
  margin-top: 10px; text-align: center;
  background: linear-gradient(160deg, rgba(139,92,246,0.12), rgba(108,99,255,0.08));
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius-lg); padding: 22px 18px;
}
.lock-ico { font-size: 30px; margin-bottom: 6px; }
.lock-titulo { font-family: var(--font-display); font-weight: 600; font-size: 16.5px; }
.lock-sub { font-size: 13px; color: var(--ink-soft); margin: 6px 0 14px; line-height: 1.5; }

/* Botão de material imprimível na atividade */
.btn-material {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  background: #8B5CF6;
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
}

/* Folha de cartões pra imprimir (A4) */
#print-sheet { display: none; }
body.printing-sheet #print-sheet { display: block; }
@media print {
  body.printing-sheet .app-shell,
  body.printing-sheet .modal,
  body.printing-sheet #print-single { display: none !important; }
  @page { size: A4 portrait; margin: 12mm; }
  #print-sheet { color: #1a1a1a; }
  .print-sheet-header { text-align: center; margin-bottom: 8mm; }
  .print-sheet-title { font-family: var(--font-display); font-size: 22pt; margin: 0; }
  .print-sheet-instr { font-size: 10.5pt; color: #444; margin-top: 3mm; }
  .print-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
  .print-card {
    border: 2px dashed #999;
    border-radius: 5mm;
    min-height: 66mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6mm 4mm;
    break-inside: avoid;
  }
  .print-card-icon {
    height: 30mm;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .print-card-img { max-height: 30mm; max-width: 60mm; object-fit: contain; }
  .print-card-shape { width: 30mm; height: 30mm; }
  .print-card-emoji { font-size: 44pt; line-height: 1; }
  .print-card-label { font-family: var(--font-display); font-size: 18pt; font-weight: 600; margin-top: 4mm; }
  .print-card-frase { font-size: 11pt; color: #444; margin-top: 2mm; }
  .print-sheet-foot { text-align: center; font-size: 8pt; color: #999; margin-top: 8mm; }

  /* Traçado */
  .print-tracado-grid { display: flex; flex-direction: column; gap: 10mm; margin-top: 4mm; }
  .print-tracado-row { border: 1px solid #ccc; border-radius: 4mm; padding: 6mm 8mm; break-inside: avoid; }
  .print-tracado-label { font-size: 10pt; color: #666; font-weight: 600; margin: 0 0 3mm; }
  .print-tracado-svg { width: 100%; height: 24mm; display: block; }

  /* Alfabeto móvel */
  .print-letter-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4mm; margin-top: 4mm; }
  .print-letter-tile {
    border: 2px dashed #999;
    border-radius: 3mm;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20pt;
    break-inside: avoid;
  }
}

/* ===== Desktop: usa a tela toda (sidebar + conteúdo largo) ===== */
@media (min-width: 900px) {
  .app-shell {
    max-width: none;
    padding-left: 232px;          /* espaço da barra lateral fixa */
    min-height: 100vh;
  }
  .app-header {
    border-radius: 0;
    padding: 22px 40px 20px;
  }
  .app-main {
    padding: 26px 40px 40px;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
  }

  /* Tab bar vira barra lateral */
  .tab-bar {
    top: 0; bottom: 0; left: 0;
    transform: none;
    width: 232px;
    max-width: none;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    padding: 26px 16px;
    border-top: none;
    border-right: 1px solid var(--line);
    z-index: 40;
  }
  .tab-btn {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14.5px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    text-align: left;
  }
  .tab-btn:hover { background: var(--tint-green); }
  .tab-btn.is-active { background: var(--tint-green); }
  .tab-dot { width: 8px; height: 8px; }

  /* Conteúdo em grade: aproveita a largura em vez de esticar uma coluna */
  .quick-grid,
  .card-grid,
  .activity-list,
  .aluno-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
  }
  .hello-card, .next-card { max-width: none; }

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

  /* Modais centralizados (no celular sobem de baixo) */
  .modal { align-items: center; justify-content: center; }
  .modal-card {
    border-radius: var(--radius-lg);
    max-width: 560px;
    max-height: 88vh;
    overflow-y: auto;
  }
}

@media (min-width: 1400px) {
  .app-main { max-width: 1400px; }
}

/* ===== Aviso de nova versão ===== */
.update-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom)); /* acima da tab bar */
  transform: translate(-50%, 20px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 440px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 12px 12px 12px 16px;
  box-shadow: 0 10px 30px rgba(28,27,41,0.28);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.update-toast.is-open { opacity: 1; transform: translate(-50%, 0); }
.update-toast-txt { flex: 1; font-size: 13.5px; font-weight: 500; }
.update-toast-btn {
  border: none; cursor: pointer;
  background: var(--sage); color: #fff;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  padding: 9px 16px; border-radius: 999px;
}
.update-toast-x {
  border: none; background: none; cursor: pointer;
  color: rgba(255,255,255,0.6); font-size: 13px; padding: 6px;
}
@media (min-width: 900px) {
  .update-toast { bottom: 24px; left: auto; right: 24px; transform: translateY(20px); }
  .update-toast.is-open { transform: translateY(0); }
}

/* ===== Palco de geração de PDF (fora da tela; html2canvas captura daqui) ===== */
#pdf-stage {
  position: fixed; left: -10000px; top: 0;
  width: 210mm; box-sizing: border-box;
  padding: 0 12mm; background: #fff; color: #1a1a1a;
  font-family: var(--font-body);
  /* cores da marca fixas (independe do tema claro/escuro do app) */
  --sage: #6C63FF; --sage-deep: #4B3FD1; --denim: #2FA8E0; --ocre: #FF9257;
}
#pdf-stage .print-sheet-header { text-align: center; margin-bottom: 8mm; }
#pdf-stage .print-sheet-title { font-family: var(--font-display); font-size: 22pt; margin: 0; }
#pdf-stage .print-sheet-instr { font-size: 10.5pt; color: #444; margin-top: 3mm; }
#pdf-stage .print-sheet-nivel {
  font-size: 9.5pt; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #6C63FF; margin-bottom: 2mm;
}
#pdf-stage .pdf-quebra { height: 0; margin: 0; }
#pdf-stage .print-sheet-header:not(:first-child) { margin-top: 4mm; }
#pdf-stage .print-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
#pdf-stage .print-card { border: 2px dashed #999; border-radius: 5mm; min-height: 66mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6mm 4mm; }
#pdf-stage .print-card-icon { height: 30mm; display: flex; align-items: center; justify-content: center; }
#pdf-stage .print-card-img { max-height: 30mm; max-width: 60mm; object-fit: contain; }
#pdf-stage .print-card-shape { width: 30mm; height: 30mm; }
#pdf-stage .print-card-emoji { font-size: 44pt; line-height: 1; }
#pdf-stage .print-card-label { font-family: var(--font-display); font-size: 18pt; font-weight: 600; margin-top: 4mm; }
#pdf-stage .print-card-frase { font-size: 11pt; color: #444; margin-top: 2mm; }
#pdf-stage .print-sheet-foot { text-align: center; font-size: 8pt; color: #999; margin-top: 8mm; }
#pdf-stage .print-tracado-grid { display: flex; flex-direction: column; gap: 10mm; margin-top: 4mm; }
#pdf-stage .print-tracado-row { border: 1px solid #ccc; border-radius: 4mm; padding: 6mm 8mm; }
#pdf-stage .print-tracado-label { font-size: 10pt; color: #666; font-weight: 600; margin: 0 0 3mm; }
#pdf-stage .print-tracado-svg { width: 100%; height: 24mm; display: block; }
#pdf-stage .print-letter-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4mm; margin-top: 4mm; }
#pdf-stage .print-letter-tile { border: 2px dashed #999; border-radius: 3mm; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 20pt; }
#pdf-stage .print-cron-table { width: 100%; border-collapse: collapse; margin-top: 4mm; }
#pdf-stage .print-cron-table th, #pdf-stage .print-cron-table td { border: 1px solid #999; padding: 3mm 2mm; text-align: center; font-size: 10pt; }
#pdf-stage .print-cron-table th { background: #eee; font-family: var(--font-display); }
#pdf-stage .print-cron-table .cron-hora { font-weight: 600; font-size: 9pt; white-space: nowrap; }
#pdf-stage .print-res-section { font-family: var(--font-display); font-size: 15pt; margin: 8mm 0 4mm; color: #1a1a1a; }
#pdf-stage .print-rescard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
#pdf-stage .print-rescard { color: #fff; border-radius: 4mm; padding: 12mm 6mm; text-align: center; min-height: 38mm; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#pdf-stage .print-rescard-t { font-family: var(--font-display); font-size: 19pt; font-weight: 600; }
#pdf-stage .print-rescard-s { font-size: 11pt; margin-top: 3mm; }
#pdf-stage .print-single-big { text-align: center; padding: 20mm 6mm; }
#pdf-stage .print-single-big .ps-top { color: #fff; border-radius: 6mm; padding: 40mm 10mm; font-family: var(--font-display); font-size: 38pt; font-weight: 600; }
#pdf-stage .print-single-big .ps-sub { font-size: 16pt; color: #444; margin-top: 8mm; }

/* Guia do professor (gerado a partir de objetivo/materiais/aplicar/adaptacao) */
#pdf-stage .print-guia { border: 1px solid #ddd; border-radius: 4mm; padding: 8mm 9mm; margin-top: 2mm; }
#pdf-stage .print-guia-item { margin-bottom: 5mm; }
#pdf-stage .print-guia-item:last-child { margin-bottom: 0; }
#pdf-stage .print-guia-label {
  font-size: 9pt; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 1.5mm;
}
#pdf-stage .print-guia-text { font-size: 11pt; color: #333; line-height: 1.5; }

/* Capa do kit (primeira página de um PDF com vários materiais juntos) */
#pdf-stage .print-kit-capa { text-align: center; padding: 14mm 6mm 4mm; }
#pdf-stage .print-kit-capa-badge {
  display: inline-block; font-size: 9.5pt; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: var(--sage); border-radius: 999px; padding: 2.5mm 6mm; margin-bottom: 6mm;
}
#pdf-stage .print-kit-capa-title { font-family: var(--font-display); font-size: 28pt; margin: 0 0 4mm; }
#pdf-stage .print-kit-capa-sub { font-size: 11.5pt; color: #444; max-width: 140mm; margin: 0 auto 10mm; line-height: 1.5; }
#pdf-stage .print-kit-capa-list { text-align: left; max-width: 130mm; margin: 0 auto; list-style: none; }
#pdf-stage .print-kit-capa-item {
  border: 1px solid #ddd; border-radius: 3mm; padding: 4mm 6mm; margin-bottom: 3mm;
  font-size: 11.5pt; display: flex; align-items: center; gap: 3mm;
}
#pdf-stage .print-kit-capa-item .num {
  flex-shrink: 0; width: 7mm; height: 7mm; border-radius: 50%; background: var(--sage); color: #fff;
  font-size: 9pt; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ===== Search ===== */
.search-box { margin-bottom: 12px; }
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  background: var(--paper-raised);
}
.chip-row-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.chip-outline {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.chip-outline.is-active {
  background: var(--tint-chip);
  border-color: var(--ocre);
  color: var(--ocre);
}
.result-count { font-size: 11.5px; color: var(--ink-soft); }
.empty-state { font-size: 13.5px; color: var(--ink-soft); text-align: center; padding: 30px 10px; }

/* Favorite star on activity card */
.fav-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--line);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  padding: 4px;
}
.fav-btn.is-fav { color: var(--ocre); }
.detail-meta { font-size: 12px; color: var(--ink-soft); margin: -10px 0 14px; }

/* ===== Alunos ===== */
.aluno-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.aluno-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.aluno-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--denim);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  flex-shrink: 0;
}
.aluno-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aluno-nome { font-weight: 600; font-size: 14.5px; }
.aluno-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.form-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-danger-outline {
  background: transparent;
  border: 1.5px solid var(--alert);
  color: var(--alert);
  border-radius: var(--radius-md);
  padding: 11px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

/* ===== Premium ===== */
.premium-hero {
  background: linear-gradient(135deg, #6D5BA6, #4A6FA1);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-top: 16px;
}
.premium-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.premium-hero h2 { font-size: 20px; margin-bottom: 8px; }
.premium-hero p { font-size: 13.5px; line-height: 1.5; opacity: 0.92; }

.premium-month-card {
  margin-top: 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.premium-month-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8B5CF6;
  margin-bottom: 12px;
}
.premium-month-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.premium-month-item {
  background: var(--tint-green);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.premium-month-num {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.premium-feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.premium-feature {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
}

.premium-cta-card {
  margin-top: 18px;
  text-align: center;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
}
.premium-price { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.premium-price-sub { font-size: 12px; color: var(--ink-soft); margin-top: 4px; margin-bottom: 16px; }
.btn-premium {
  width: 100%;
  background: #8B5CF6;
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
}

/* ===== Toggle de notificações ===== */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.switch-text { font-size: 13.5px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0;
  background: var(--line);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.switch-track::before {
  content: "";
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.switch input:checked + .switch-track { background: #8B5CF6; }
.switch input:checked + .switch-track::before { transform: translateX(20px); }
.switch input:disabled + .switch-track { opacity: 0.5; }
.field-hint { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.4; }

/* ===== Selo "Central AEE" ===== */
.made-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  opacity: 0.8;
}
.made-by-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--sage);
  border-radius: 6px;
  padding: 4px 7px;
}
.made-by-text { font-size: 12px; color: var(--ink-soft); }
.made-by-text strong { color: var(--ink); font-weight: 600; }
.made-by--modal { margin: 0 0 16px; justify-content: flex-start; }

/* ===== Clube reformulado ===== */
.club-live-card {
  margin-top: 16px;
  background: linear-gradient(160deg, rgba(139,92,246,0.10), rgba(47,168,224,0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.club-live-title { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; margin-bottom: 12px; }
.club-drop {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 8px;
  animation: dropIn 0.4s ease both;
  animation-delay: calc(var(--i) * 0.09s);
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.club-live-foot { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }
.club-live-foot strong { color: var(--sage-deep); }

.club-block { margin-top: 18px; }
.club-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #8B5CF6; margin-bottom: 10px;
}
.club-check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.club-check-list li {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px 11px 38px;
  font-size: 13.5px;
}
.club-check-list li::before {
  content: "✓";
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sage); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.club-why-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px;
  font-size: 13.5px;
}
.club-why-item span { font-size: 18px; flex-shrink: 0; }

/* ===== Área do membro do Clube ===== */
.membro-hero {
  background: linear-gradient(150deg, #8B5CF6, var(--sage));
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  color: #fff;
  margin-bottom: 6px;
}
.membro-badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em;
  background: rgba(255,255,255,0.22);
  border-radius: 999px; padding: 5px 12px; margin-bottom: 12px;
}
.membro-hero h2 { font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.25; }
.membro-hero p { font-size: 13.5px; margin-top: 8px; color: rgba(255,255,255,0.9); line-height: 1.5; }

.membro-novidade { cursor: pointer; transition: border-color 0.15s ease, transform 0.12s ease; }
.membro-novidade:hover { border-color: #8B5CF6; }
.membro-novidade:active { transform: scale(0.99); }

#btn-ir-materiais-clube { margin-top: 4px; }

.membro-ajuda {
  margin-top: 20px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  text-align: center;
}
.membro-ajuda-t { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.membro-ajuda-s { font-size: 13px; color: var(--ink-soft); margin: 6px 0 14px; line-height: 1.5; }

/* Antes x Depois (o concorrente é o Pinterest, não outro app) */
.club-vs { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
.club-vs-col { border-radius: var(--radius-md); padding: 14px; border: 1px solid var(--line); }
.club-vs-antes { background: rgba(226,76,63,0.07); border-color: rgba(226,76,63,0.25); }
.club-vs-depois { background: rgba(108,99,255,0.08); border-color: rgba(108,99,255,0.28); }
.club-vs-tag {
  display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 9px;
}
.club-vs-antes .club-vs-tag { color: var(--alert); }
.club-vs-depois .club-vs-tag { color: var(--sage-deep); }
.club-vs-item { font-size: 13px; padding: 4px 0; line-height: 1.4; }
.club-vs-depois .club-vs-item { font-weight: 600; color: var(--sage-deep); }
.club-vs-depois .club-vs-item + .club-vs-item::before { content: "↓ "; opacity: 0.5; font-weight: 400; }

/* Feed de atualizações do mês */
.club-feed { display: flex; flex-direction: column; gap: 8px; }
.club-feed-item {
  display: flex; align-items: center; gap: 9px;
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13.5px;
  animation: dropIn 0.4s ease both;
}
.club-feed-dot { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; flex-shrink: 0; }
.club-feed-novo, .club-feed-melhoria {
  margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em;
  color: #fff; border-radius: 999px; padding: 3px 8px; flex-shrink: 0;
}
.club-feed-novo { background: #22C55E; }
.club-feed-melhoria { background: var(--denim); }
/* Roadmap: em desenvolvimento (amarelo, sem selo) */
.club-roadmap { color: var(--ink-soft); }
.club-roadmap .club-feed-dot { background: #EAB308; }

/* Lema / compromisso do produto */
.club-lema {
  margin-top: 18px;
  background: linear-gradient(160deg, rgba(108,99,255,0.12), rgba(255,146,87,0.10));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  text-align: center;
}
.club-lema-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--sage-deep); margin-bottom: 8px;
}
.club-lema-frase {
  font-family: var(--font-display); font-size: 16.5px; font-weight: 600;
  line-height: 1.4; color: var(--ink);
}
.club-lema-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }

/* Fluxo: o que acontece quando entra */
.club-fluxo { list-style: none; padding: 0; margin: 0; counter-reset: passo; }
.club-fluxo li {
  position: relative; padding: 9px 0 9px 34px; font-size: 13.5px;
  counter-increment: passo;
}
.club-fluxo li::before {
  content: counter(passo);
  position: absolute; left: 0; top: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--sage); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.club-fluxo li:not(:last-child)::after {
  content: ""; position: absolute; left: 10.5px; top: 32px; bottom: -2px;
  width: 1px; background: var(--line);
}
.club-contador { font-size: 13px; color: var(--sage-deep); margin-bottom: 12px; }

.club-cta-card {
  margin-top: 20px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
}
.club-cta-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; text-align: center; }
.club-cta-sub { font-size: 12.5px; color: var(--ink-soft); text-align: center; margin: 6px 0 16px; line-height: 1.5; }
.club-form { display: flex; flex-direction: column; gap: 10px; }
.club-form input[type="text"], .club-form input[type="email"], .club-form input[type="tel"] {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 14px;
  background: var(--paper);
}
.club-form-q { font-size: 13px; font-weight: 600; margin-top: 6px; }
.club-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.club-chip { position: relative; }
.club-chip input { position: absolute; opacity: 0; pointer-events: none; }
.club-chip span {
  display: block;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.club-chip input:checked + span {
  background: #8B5CF6; color: #fff; border-color: #8B5CF6;
}
.club-form .btn-premium { margin-top: 6px; }
.club-sucesso { text-align: center; padding: 8px 4px; animation: dropIn 0.4s ease both; }
.club-sucesso-emoji { font-size: 40px; margin-bottom: 6px; }

/* Login do Clube (OTP) na página de venda */
.club-login-bar { margin-bottom: 16px; }
.club-login-toggle {
  width: 100%;
  background: var(--paper-raised);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer;
}
.club-login-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.club-login-form #club-login-step-email,
.club-login-form #club-login-step-code { display: flex; gap: 8px; }
.club-login-form input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14px;
  background: var(--paper);
}
.club-login-msg { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 0; }
.club-login-msg.is-erro { color: var(--alert); }

.club-logout-link {
  display: block; margin: 10px auto 0;
  background: none; border: none;
  font-size: 12px; color: var(--ink-soft);
  text-decoration: underline; cursor: pointer;
}

/* ===== Impressão do cronograma ===== */
@media print {
  .print-cron-table { width: 100%; border-collapse: collapse; margin-top: 4mm; }
  .print-cron-table th, .print-cron-table td {
    border: 1px solid #999; padding: 3mm 2mm; text-align: center; font-size: 10pt;
  }
  .print-cron-table th { background: #eee; font-family: var(--font-display); }
  .print-cron-table .cron-hora { font-weight: 600; font-size: 9pt; white-space: nowrap; }
}

/* ===== Polimento / micro-interações ===== */
.quick-card, .activity-card, .aluno-card, .res-card, .club-chip span, .premium-feature {
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.quick-card:active, .activity-card:active, .aluno-card:active, .res-card:active {
  transform: scale(0.98);
}
@media (hover: hover) {
  .quick-card:hover, .activity-card:hover, .aluno-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(28,27,41,0.07);
    border-color: color-mix(in srgb, var(--sage) 40%, var(--line));
  }
  .res-card:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(28,27,41,0.08); }
  .btn-primary:hover, .btn-premium:hover { filter: brightness(1.05); }
}
.btn-primary, .btn-premium, .btn-secondary, .mark-done-btn, .btn-material {
  transition: filter 0.14s ease, transform 0.1s ease;
}
.btn-primary:active, .btn-premium:active, .btn-secondary:active, .mark-done-btn:active, .btn-material:active {
  transform: scale(0.985);
}

/* ===== Instalação (tutorial tela inicial) ===== */
.modal-instalar-card { max-width: 440px; position: relative; }
.modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--tint-green); color: var(--sage-deep); font-size: 14px;
}
#instalar-body h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 4px 40px 8px 0; }
.instalar-sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 18px; line-height: 1.5; }
.instalar-opcoes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.instalar-opcao {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left; background: var(--paper-raised); border: 1.5px solid var(--line);
  border-radius: var(--radius-md); padding: 14px 16px; cursor: pointer;
  font-family: var(--font-body); transition: all 0.15s ease;
}
.instalar-opcao:hover, .instalar-opcao:active { border-color: var(--sage); background: var(--tint-green); }
.io-emoji { font-size: 24px; }
.io-titulo { font-weight: 600; font-size: 15.5px; color: var(--ink); }
.io-desc { font-size: 12.5px; color: var(--ink-soft); }
.instalar-pular { display: block; width: 100%; background: none; border: none; color: var(--ink-soft); font-size: 13.5px; cursor: pointer; padding: 8px; font-family: var(--font-body); }
.instalar-voltar { background: none; border: none; color: var(--ink-soft); font-size: 13.5px; cursor: pointer; padding: 0 0 10px; font-family: var(--font-body); }
.instalar-aviso {
  background: var(--tint-chip); border: 1px solid var(--ocre);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px;
  color: var(--ink); margin-bottom: 14px; line-height: 1.45;
}
.passos { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.passos li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink); }
.passo-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--sage); color: #fff; font-family: var(--font-display); font-weight: 700;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.instalar-ou { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 12px; }
.instalar-dica {
  background: var(--tint-green); border-radius: var(--radius-md);
  padding: 14px; font-size: 13.5px; line-height: 1.5; margin: 6px 0 14px; color: var(--ink);
}
.link-btn { display: inline; background: none; border: none; color: var(--sage-deep); font-weight: 600; cursor: pointer; padding: 0; font-family: var(--font-body); font-size: 13.5px; text-decoration: underline; }
.instalar-url { text-align: center; font-size: 13.5px; color: var(--ink-soft); margin-top: 14px; line-height: 1.6; }
.instalar-url strong { color: var(--sage-deep); font-family: var(--font-display); }

/* ===== Paywall (bloqueio de acesso) ===== */
#view-paywall { display: none; }
html[data-bloqueado="1"] .app-shell { display: none !important; }
html[data-bloqueado="1"] #view-paywall { display: flex !important; }
.paywall {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 32px 20px calc(32px + var(--safe-bottom));
  background: var(--paper);
}
.paywall-card {
  width: 100%;
  max-width: 420px;
}
.paywall-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  margin-top: 10px;
}
.paywall-sub {
  font-size: 14.5px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.55;
  margin-top: 14px;
}
.paywall-price {
  text-align: center;
  margin: 26px 0;
}
.paywall-price-value {
  display: block;
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  color: var(--sage);
}
.paywall-price-note {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.paywall #btn-comprar { width: 100%; }
.paywall #btn-ja-comprei { margin-top: 10px; }
.paywall-restore {
  margin-top: 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}
.paywall-restore .field { margin-bottom: 12px; }
.paywall-restore input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 14px;
  background: var(--paper);
}
.paywall-restore .btn-primary { width: 100%; }
.paywall-msg { font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; text-align: center; line-height: 1.5; }
.premium-hint { font-size: 11.5px; color: var(--ink-soft); margin-top: 10px; }
