/* turma. · app (painel da academia) */
body.app { background: var(--paper); overflow-x: hidden; }

.shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 12px;
  border-right: 1px dashed var(--line-2);
  background: var(--paper);
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 14px;
}
.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.06em;
  line-height: 1;
}
.logo b { color: var(--accent); font-weight: 800; }
.brand small {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 3px;
}
.gym {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line);
  margin-bottom: 14px;
}
.gym .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.04em;
}
.gym strong { display: block; font-size: 13px; letter-spacing: -0.01em; }
.gym span { display: block; font-size: 11.5px; color: var(--muted); }
.gym svg { margin-left: auto; width: 14px; color: var(--faint); }

.nav-sec {
  font-size: 11px;
  color: var(--faint);
  padding: 12px 10px 6px;
  font-weight: 600;
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 13.5px;
  transition: background .18s, color .18s;
}
.nav a svg { width: 17px; height: 17px; color: var(--muted); transition: color .18s; }
.nav a:hover { background: rgba(21, 18, 15, .045); color: var(--ink); }
.nav a.on {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(21, 18, 15, .06);
}
.nav a.on svg { color: var(--accent); }
.nav a .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  background: var(--paper-2);
  border-radius: 6px;
  padding: 1px 6px;
}
.nav a .count.bad { background: var(--bad-soft); color: var(--bad); }
.nav a .count.accent { background: var(--accent-soft); color: var(--accent); }

.side-foot { margin-top: auto; display: grid; gap: 10px; }
.promo {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 14px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.promo canvas { position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; opacity: .9; }
.promo strong { position: relative; display: block; font-size: 13px; }
.promo p { position: relative; margin: 2px 0 10px; font-size: 12px; color: var(--muted); max-width: 150px; }
.promo .bar { position: relative; height: 5px; border-radius: 9px; background: var(--paper-2); overflow: hidden; }
.promo .bar i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
.promo .lbl { position: relative; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.me-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 2px;
  border-top: 1px dashed var(--line-2);
  padding-top: 12px;
}
.me-row strong { display: block; font-size: 12.5px; }
.me-row span { display: block; font-size: 11px; color: var(--muted); }

/* ---------- Topbar ---------- */
.main { min-width: 0; }
.top {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  background: rgba(243, 240, 234, .82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px dashed var(--line-2);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.crumb svg { width: 14px; height: 14px; color: var(--faint); }
.crumb strong { color: var(--ink); font-weight: 600; }
.search {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(420px, 40vw);
  height: 36px;
  padding: 0 8px 0 12px;
  border-radius: 999px;
  border: 0;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line);
  color: var(--muted);
  font-size: 13px;
  transition: box-shadow .2s;
}
.search:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 4px 14px -8px rgba(21, 18, 15, .25); }
.search svg { width: 15px; height: 15px; }
.search .kbd { margin-left: auto; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  transition: transform .18s var(--ease), background .2s;
}
.icon-btn:hover { background: var(--white); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--card); }
.menu-btn { display: none; }

/* ---------- Página ---------- */
.page {
  padding: 30px 32px 120px;
  max-width: 1360px;
  margin: 0 auto;
  animation: pageIn .5s var(--ease) both;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.head h1 {
  margin: 10px 0 4px;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.02;
  font-weight: 750;
  letter-spacing: -0.045em;
}
.head h1 em { font-style: normal; color: var(--accent); }
.head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 560px; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  padding: 20px;
  min-width: 0;
}
.card.flat { box-shadow: inset 0 0 0 1px var(--line); }
.card.dark {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-lg);
}
.card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-h h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.card-h .sub { font-size: 12px; color: var(--muted); }
.link { font-size: 12.5px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; }
.link svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.link:hover svg { transform: translateX(3px); }

.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; align-content: start; }

/* KPI */
.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; cursor: default; transition: transform .25s var(--ease), box-shadow .25s; }
.kpi:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-lg); }
.kpi .lbl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .lbl svg { width: 15px; height: 15px; }
.kpi .val { font-size: 34px; font-weight: 750; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 16px; color: var(--muted); font-weight: 600; letter-spacing: -0.02em; margin-left: 2px; }
.kpi .foot { max-width: calc(100% - 100px); flex-wrap: wrap; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.kpi svg.spark { position: absolute; right: 16px; bottom: 16px; width: 92px; height: 34px; }
.delta { font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 6px; }
.delta.up { color: var(--good); background: var(--good-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }

/* Gráfico de receita */
.chart { position: relative; height: 230px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .tip {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -110%);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s;
  box-shadow: var(--shadow-lg);
}
.chart .tip b { display: block; font-size: 14px; letter-spacing: -0.02em; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.legend i.ghost { background: var(--paper-3); }

/* Listas */
.list { display: grid; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-top: 1px dashed var(--line);
  min-width: 0;
}
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row strong { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row span.s { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.click { cursor: pointer; border-radius: 10px; transition: background .15s; }
.row.click:hover { background: rgba(21, 18, 15, .035); }
.time { font-family: var(--mono); font-size: 12px; color: var(--ink-2); width: 46px; flex: none; }

.av {
  --h: 230;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--h) 45% 28%);
  background: hsl(var(--h) 55% 88%);
  box-shadow: inset 0 0 0 1px hsl(var(--h) 40% 70% / .35);
}
.who .av, .att .av, .row .av, .t .av, .ph-hi .av, .drawer-h .av, .me-row .av { display: grid; color: hsl(var(--h) 45% 28%); }
.av.lg { width: 56px; height: 56px; font-size: 18px; }
.av.xs { width: 24px; height: 24px; font-size: 9.5px; }
.av-stack { display: flex; }
.av-stack .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }
.av-stack .av:first-child { margin-left: 0; }

/* Alertas (cards de ação) */
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.alert:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.alert .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.alert .ic.bad { background: var(--bad-soft); color: var(--bad); }
.alert .ic.warn { background: var(--warn-soft); color: #B06D07; }
.alert .ic.good { background: var(--good-soft); color: var(--good); }
.alert .ic svg { width: 16px; height: 16px; }
.alert strong { display: block; font-size: 13.5px; letter-spacing: -0.01em; }
.alert p { margin: 2px 0 10px; font-size: 12.5px; color: var(--muted); }

/* Feed de eventos */
.feed .ev { display: flex; gap: 10px; padding: 9px 0; font-size: 12.5px; color: var(--ink-2); }
.feed .ev i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.feed .ev i.pix { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.feed .ev i.whats { background: #25D366; box-shadow: 0 0 0 4px rgba(37, 211, 102, .14); }
.feed .ev i.grad { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.feed .ev time { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: nowrap; }

/* Toolbar, segmentado e inputs */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.seg {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button {
  position: relative;
  z-index: 1;
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s;
  white-space: nowrap;
}
.seg button.on { color: var(--ink); }
.seg button .n { font-family: var(--mono); font-size: 10.5px; margin-left: 4px; color: var(--faint); }
.seg .thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(21, 18, 15, .14), inset 0 0 0 1px var(--line);
  transition: left .35s var(--spring), width .35s var(--spring);
}
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  min-width: 220px;
}
.field svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.field input { border: 0; outline: 0; background: none; width: 100%; font-size: 13px; }
.spacer { flex: 1; }

/* Tabela */
.tbl-wrap { overflow-x: auto; margin: 0 -20px -20px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px dashed var(--line-2);
  white-space: nowrap;
}
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl td { padding: 11px 14px; border-bottom: 1px dashed var(--line); vertical-align: middle; white-space: nowrap; }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: rgba(21, 18, 15, .03); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.who strong { display: block; font-weight: 600; letter-spacing: -0.01em; }
.who span { display: block; font-size: 11.5px; color: var(--muted); }
.belt-cell { display: flex; align-items: center; gap: 8px; }
.prog { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.prog .track { flex: 1; height: 6px; border-radius: 9px; background: var(--paper-2); overflow: hidden; }
.prog .track i { display: block; height: 100%; border-radius: 9px; background: var(--ink); transition: width .6s var(--ease); }
.prog .track i.ok { background: var(--accent); }
.prog span { font-family: var(--mono); font-size: 11px; color: var(--muted); min-width: 44px; text-align: right; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- Agenda ---------- */
.week {
  display: grid;
  grid-template-columns: 56px repeat(6, minmax(120px, 1fr));
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  overflow: hidden;
}
.week .wh {
  padding: 12px 10px;
  border-bottom: 1px dashed var(--line-2);
  border-left: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.week .wh b { display: block; font-size: 20px; color: var(--ink); letter-spacing: -0.04em; font-weight: 750; }
.week .wh.today b { color: var(--accent); }
.week .wh.today { background: linear-gradient(var(--accent-soft), transparent); }
.week .col { position: relative; border-left: 1px dashed var(--line); min-height: 620px; }
.week .hours { position: relative; }
.week .hours span { position: absolute; left: 0; right: 8px; text-align: right; font-family: var(--mono); font-size: 10.5px; color: var(--faint); transform: translateY(-50%); }
.week .gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.slot {
  position: absolute;
  left: 6px;
  right: 6px;
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 11.5px;
  overflow: hidden;
  cursor: pointer;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--mc, var(--accent));
  transition: transform .2s var(--ease), box-shadow .2s;
}
.slot:hover { transform: translateY(-1px) scale(1.015); box-shadow: inset 0 0 0 1px var(--line-2), inset 3px 0 0 var(--mc, var(--accent)), var(--shadow); z-index: 2; }
.slot strong { display: block; padding-right: 34px; font-size: 12px; letter-spacing: -0.01em; line-height: 1.25; }
.slot span { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.slot .cap { position: absolute; right: 8px; top: 7px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.slot.done { opacity: .62; }
.slot.narrow { padding: 6px 7px; }
.slot.narrow .cap { display: none; }
.slot.narrow strong { padding-right: 0; font-size: 11px; }
.slot.live { box-shadow: inset 0 0 0 1.5px var(--accent), inset 3px 0 0 var(--accent), 0 8px 22px -12px rgba(62, 70, 255, .6); }
.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--bad); z-index: 3; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }

/* Chamada */
.attend { display: grid; gap: 6px; }
.att {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  user-select: none;
  transition: box-shadow .2s, background .2s, transform .15s var(--ease);
}
.att:active { transform: scale(.985); }
.att.on { background: linear-gradient(90deg, var(--accent-soft), rgba(62, 70, 255, .02)); box-shadow: inset 0 0 0 1.5px rgba(62, 70, 255, .5); }
.att .grow { flex: 1; min-width: 0; }
.att strong { display: block; font-size: 13px; }
.att span { display: block; font-size: 11.5px; color: var(--muted); }
.check {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  transition: background .2s, box-shadow .2s, transform .3s var(--spring);
  flex: none;
}
.check svg { width: 14px; height: 14px; color: #fff; transform: scale(0); transition: transform .3s var(--spring); }
.att.on .check { background: var(--accent); box-shadow: none; transform: rotate(-6deg); }
.att.on .check svg { transform: scale(1); }

/* ---------- Graduação ---------- */
.lanes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--paper-2); border-radius: var(--radius); padding: 10px; box-shadow: inset 0 0 0 1px var(--line); min-height: 200px; }
.lane-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; font-weight: 700; font-size: 13px; letter-spacing: -0.01em; }
.lane-h .n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; }
.gcard {
  background: var(--card);
  border-radius: 12px;
  padding: 11px;
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(21, 18, 15, .05);
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.gcard:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.gcard.apto { box-shadow: inset 0 0 0 1.5px rgba(62, 70, 255, .55), 0 8px 20px -12px rgba(62, 70, 255, .55); }
.gcard .t { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.gcard .t strong { font-size: 12.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.apto-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}
.apto-strip canvas { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: 260px; height: 260px; opacity: .55; }
.apto-strip .big { font-size: 38px; font-weight: 750; letter-spacing: -0.05em; line-height: 1; position: relative; }
.apto-strip p { margin: 0; color: rgba(243, 240, 234, .7); font-size: 13px; position: relative; max-width: 460px; }
.apto-strip .btn { position: relative; margin-left: auto; }

/* ---------- Drawer, modal, palette ---------- */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(21, 18, 15, .28);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 60;
  opacity: 0;
  animation: fadeIn .25s var(--ease) forwards;
}
.scrim.out { animation: fadeOut .2s var(--ease) forwards; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.drawer {
  position: fixed;
  top: 10px;
  right: 10px;
  bottom: 10px;
  width: min(500px, calc(100vw - 20px));
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  z-index: 61;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawerIn .45s var(--spring) both;
}
.drawer.out { animation: drawerOut .25s var(--ease) both; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes drawerOut { to { transform: translateX(40px); opacity: 0; } }
.drawer-h { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px dashed var(--line-2); }
.drawer-b { padding: 18px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.drawer-b > * { flex-shrink: 0; }
.drawer-f { padding: 14px 18px; border-top: 1px dashed var(--line-2); display: flex; gap: 8px; justify-content: flex-end; background: var(--paper); }
.x { margin-left: auto; }

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border-radius: 22px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  z-index: 61;
  animation: modalIn .45s var(--spring) both;
}
.modal.out { animation: modalOut .2s var(--ease) both; }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } }
@keyframes modalOut { to { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }
.modal-b { padding: 22px; display: grid; gap: 14px; }
.modal h2 { margin: 0; font-size: 22px; letter-spacing: -0.04em; font-weight: 750; }
.modal p { margin: 0; color: var(--muted); }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.kv div { background: var(--card); padding: 10px 12px; }
.kv span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.kv b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }

.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.form input, .form select {
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 0;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line-2);
  outline: 0;
  font-size: 13.5px;
  transition: box-shadow .2s;
}
.form input:focus, .form select:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.palette {
  position: fixed;
  left: 50%;
  top: 14vh;
  width: min(600px, calc(100vw - 24px));
  transform: translateX(-50%);
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  z-index: 61;
  overflow: hidden;
  animation: palIn .35s var(--spring) both;
}
@keyframes palIn { from { opacity: 0; transform: translateX(-50%) scale(.97) translateY(-6px); } }
.palette .in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px dashed var(--line-2); }
.palette .in svg { width: 18px; height: 18px; color: var(--muted); }
.palette input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; }
.palette .res { max-height: 360px; overflow-y: auto; padding: 8px; }
.palette .grp { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 4px; }
.palette .it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.palette .it svg { width: 16px; height: 16px; color: var(--muted); }
.palette .it .s { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.palette .it.sel { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Cobrança ---------- */
.money-hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); margin-bottom: 16px; }
.money-hero > div { background: var(--card); padding: 18px 20px; }
.money-hero span { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.money-hero span svg { width: 15px; height: 15px; flex: none; }
.money-hero b { display: block; font-size: 30px; letter-spacing: -0.05em; font-weight: 750; margin-top: 6px; font-variant-numeric: tabular-nums; }
.money-hero .meter { height: 6px; border-radius: 9px; background: var(--paper-2); margin-top: 12px; overflow: hidden; display: flex; }
.money-hero .meter i { display: block; height: 100%; }
.regua { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; position: relative; }
.regua .st { position: relative; padding: 12px; border-radius: 12px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; }
.regua .st b { display: block; font-family: var(--mono); font-size: 11px; color: var(--accent); margin-bottom: 4px; font-weight: 500; }
.regua .st strong { display: block; font-size: 12.5px; margin-bottom: 2px; }
.regua .st span { color: var(--muted); }

/* WhatsApp */
.wa { background: #EFE7DC; border-radius: 16px; padding: 14px; display: grid; align-content: start; gap: 8px; max-height: 460px; overflow-y: auto; box-shadow: inset 0 0 0 1px var(--line); background-image: radial-gradient(rgba(21, 18, 15, .06) 1px, transparent 1.2px); background-size: 16px 16px; }
.bubble { max-width: 86%; padding: 8px 10px 6px; border-radius: 12px 12px 12px 4px; background: #fff; font-size: 13px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); animation: toastIn .4s var(--spring) both; }
.bubble.me { justify-self: end; background: #D9FDD3; border-radius: 12px 12px 4px 12px; }
.bubble small { display: block; text-align: right; font-size: 10.5px; color: #8696a0; margin-top: 2px; }
.bubble .to { font-size: 11px; font-weight: 700; color: #1F9D5B; margin-bottom: 2px; }

/* ---------- App do aluno (celular) ---------- */
.phone-wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
.phone {
  position: sticky;
  top: 84px;
  width: 340px;
  height: 700px;
  border-radius: 52px;
  padding: 12px;
  background: #121110;
  box-shadow: inset 0 0 0 2px #2A2724, inset 0 0 0 7px #0B0A09, var(--shadow-lg), 0 50px 80px -40px rgba(21, 18, 15, .5);
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 41px;
  overflow: hidden;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 104px; height: 30px; border-radius: 20px; background: #0B0A09; z-index: 5; }
.sbar { display: flex; justify-content: space-between; padding: 16px 28px 0; font-size: 12.5px; font-weight: 700; height: 46px; }
.scr { flex: 1; overflow-y: auto; padding: 8px 16px 90px; scrollbar-width: none; }
.scr::-webkit-scrollbar { display: none; }
.ph-hi { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 14px; }
.ph-hi strong { display: block; font-size: 20px; letter-spacing: -0.04em; }
.ph-hi span { font-size: 12px; color: var(--muted); }
.ph-card { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; }
.ph-card.ac { background: var(--accent); color: #fff; box-shadow: 0 12px 26px -14px rgba(62, 70, 255, .8); }
.ph-card.ac .eyebrow { color: rgba(255, 255, 255, .75); }
.ph-card.dk { background: var(--ink); color: var(--paper); }
.ph-big { font-size: 22px; font-weight: 750; letter-spacing: -0.04em; line-height: 1.1; margin: 6px 0 2px; }
.ph-tab {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  height: 58px;
  border-radius: 22px;
  background: rgba(21, 18, 15, .92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 4;
}
.ph-tab button { border: 0; background: none; color: rgba(243, 240, 234, .5); display: grid; place-items: center; gap: 2px; font-size: 9.5px; font-weight: 600; width: 56px; height: 46px; border-radius: 14px; transition: color .2s, background .2s; }
.ph-tab button svg { width: 18px; height: 18px; }
.ph-tab button.on { color: #fff; background: rgba(255, 255, 255, .1); }
.qr { width: 150px; height: 150px; margin: 8px auto; border-radius: 14px; background: #fff; padding: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.ring { position: relative; width: 120px; height: 120px; margin: 4px auto 8px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { display: block; font-size: 26px; letter-spacing: -0.05em; line-height: 1; }
.ring .c span { font-size: 10.5px; color: var(--muted); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* Certificado */
.cert {
  position: relative;
  border-radius: 16px;
  padding: 26px 22px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line-2);
  text-align: center;
  overflow: hidden;
}
.cert::before { content: ''; position: absolute; inset: 8px; border-radius: 10px; border: 1px dashed var(--line-2); pointer-events: none; }
.cert h4 { margin: 10px 0 2px; font-size: 26px; letter-spacing: -0.045em; }
.cert .belt { display: flex; margin: 16px auto 10px; }
.cert strong { display: block; }

/* Dynamic Island */
.island {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  max-width: 130px;
  transition: max-width .55s var(--spring), padding .4s var(--spring), transform .2s var(--ease);
  box-shadow: 0 8px 20px -10px rgba(21, 18, 15, .6);
}
.island:hover, .island:focus-visible { max-width: 420px; }
.island:active { transform: scale(.97); }
.island .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.island.live .dot { background: #34D399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: livep 1.8s infinite; }
@keyframes livep { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.island .more { display: inline-flex; align-items: center; gap: 8px; opacity: 0; transition: opacity .3s .1s; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .14); }
.island:hover .more, .island:focus-visible .more { opacity: 1; }
.island .more span { color: rgba(243, 240, 234, .6); font-weight: 500; }
.island .bar { display: inline-block; width: 44px; height: 4px; border-radius: 9px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.island .bar i { display: block; height: 100%; background: #34D399; }
@media (max-width: 900px) { .island { display: none; } }

/* Funil */
.funnel { display: grid; gap: 8px; }
.fr { display: grid; grid-template-columns: 150px 1fr 34px 38px; align-items: center; gap: 10px; font-size: 12.5px; }
.fr .fn { color: var(--ink-2); }
.fr .ft { height: 22px; border-radius: 7px; background: var(--paper-2); overflow: hidden; }
.fr .ft i { display: block; height: 100%; border-radius: 7px; background: var(--accent); transform-origin: left; animation: grow-x .9s var(--spring) both; }
@keyframes grow-x { from { transform: scaleX(0); } }
.fr b { font-variant-numeric: tabular-nums; text-align: right; }
.fr em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; }

/* Toggle */
.tg { width: 38px; height: 22px; border-radius: 999px; border: 0; padding: 0; background: var(--paper-3); position: relative; transition: background .25s; flex: none; }
.tg i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(21, 18, 15, .25); transition: transform .35s var(--spring); }
.tg.on { background: var(--accent); }
.tg.on i { transform: translateX(16px); }
.alert-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.alert-ic svg { width: 16px; height: 16px; }
.legend i { display: inline-block; }
@media (max-width: 700px) { .hide-sm { display: none; } }

/* ---------- Mobile: dock flutuante no lugar da sidebar ---------- */
.dock { display: none; }
@media (max-width: 1100px) {
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .phone-wrap { grid-template-columns: minmax(0, 1fr); }
  .phone { position: relative; top: 0; margin: 0 auto; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-102%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .menu-btn { display: grid; }
  .top { padding: 0 16px; }
  .search { width: auto; flex: 1; }
  .search .lbl, .search .kbd, .crumb { display: none; }
  .page { padding: 22px 16px 120px; }
  .money-hero { grid-template-columns: minmax(0, 1fr); }
  .regua { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dock {
    display: flex;
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    gap: 2px;
    padding: 6px;
    border-radius: 22px;
    background: rgba(21, 18, 15, .92);
    backdrop-filter: blur(12px);
    z-index: 30;
    box-shadow: var(--shadow-lg);
  }
  .dock a { width: 52px; height: 44px; border-radius: 16px; display: grid; place-items: center; color: rgba(243, 240, 234, .55); transition: background .2s, color .2s; }
  .dock a svg { width: 19px; height: 19px; }
  .dock a.on { background: rgba(255, 255, 255, .12); color: #fff; }
  .toasts { bottom: 84px; }
  .week { grid-template-columns: 44px repeat(6, minmax(110px, 1fr)); overflow-x: auto; }
}
@media (max-width: 560px) {
  .g-kpi { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .val { font-size: 26px; }
  .kpi svg.spark { display: none; }
  .kpi .foot { max-width: none; }
  .head .actions { width: 100%; }
  .form .two { grid-template-columns: 1fr; }
  .phone { width: 100%; max-width: 340px; }
}
