/* =========================================================
   Identidade visual — Academia de Jiu-Jitsu
   Preto e branco como base, cinza secundário, vermelho de destaque.
   ========================================================= */
:root {
  --bjj-black: #111111;
  --bjj-sidebar: #121212;
  --bjj-sidebar-hover: #1f1f1f;
  --bjj-sidebar-active: #262626;
  --bjj-sidebar-text: #a3a3a3;
  --bjj-red: #B3261E;
  --bjj-red-hover: #961f18;
  --bjj-red-soft: #fbeceb;
  --bjj-bg: #f4f4f5;
  --bjj-surface: #ffffff;
  --bjj-border: #e4e4e7;
  --bjj-text: #18181b;
  --bjj-muted: #71717a;
  --sidebar-w: 256px;
  --topbar-h: 64px;
  --bottom-nav-h: 68px;
  --radius: 12px;

  /* Cores das faixas (usadas a partir da Fase 2) */
  --faixa-branca: #f5f5f5;
  --faixa-cinza: #8e8e8e;
  --faixa-amarela: #f2c200;
  --faixa-laranja: #ef7d00;
  --faixa-verde: #1e8a3a;
  --faixa-azul: #1e5bb8;
  --faixa-roxa: #6a2c91;
  --faixa-marrom: #6b3e1f;
  --faixa-preta: #111111;

  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-bg: var(--bjj-bg);
  --bs-body-color: var(--bjj-text);
  --bs-border-color: var(--bjj-border);
  --bs-link-color-rgb: 17, 17, 17;
  --bs-link-hover-color-rgb: 179, 38, 30;
  --bs-focus-ring-color: rgba(179, 38, 30, .25);
}

body { background: var(--bjj-bg); -webkit-font-smoothing: antialiased; }
.min-w-0 { min-width: 0; }
.fw-medium { font-weight: 500; }

/* ---------- Botões ---------- */
.btn { border-radius: 10px; font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--bjj-red); --bs-btn-border-color: var(--bjj-red);
  --bs-btn-hover-bg: var(--bjj-red-hover); --bs-btn-hover-border-color: var(--bjj-red-hover);
  --bs-btn-active-bg: var(--bjj-red-hover); --bs-btn-active-border-color: var(--bjj-red-hover);
  --bs-btn-disabled-bg: var(--bjj-red); --bs-btn-disabled-border-color: var(--bjj-red);
  --bs-btn-focus-shadow-rgb: 179, 38, 30;
}
.btn-dark { --bs-btn-bg: var(--bjj-black); --bs-btn-border-color: var(--bjj-black); }
.btn-icon {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--bjj-sidebar-text); background: transparent; border: 0;
}
.btn-icon:hover { color: #fff; background: var(--bjj-sidebar-hover); }
.form-control, .form-select { background-color: #fff; }
.form-control:focus, .form-check-input:focus { border-color: #a1a1aa; box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bjj-black); border-color: var(--bjj-black); }

/* ---------- Estrutura ---------- */
.app { min-height: 100vh; }
.app-main { min-height: 100vh; display: flex; flex-direction: column; }
.app-content { flex: 1; padding: 24px; width: 100%; max-width: 1400px; }

@media (min-width: 992px) {
  .app-main { margin-left: var(--sidebar-w); }
  .app-content { padding: 28px 32px; }
}

/* ---------- Sidebar escura (opção A) ---------- */
.sidebar {
  background: var(--bjj-sidebar); color: var(--bjj-sidebar-text);
  width: var(--sidebar-w); flex-direction: column;
}
aside.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1030; }
.sidebar-offcanvas { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--bjj-sidebar); display: flex; }
.sidebar-brand {
  display: flex; align-items: center; height: var(--topbar-h); padding: 0 20px;
  border-bottom: 1px solid #222; flex-shrink: 0;
}
.logo-img { border-radius: 50%; flex-shrink: 0; }
.sidebar-brand-text { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .2px; line-height: 1.2; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.sidebar-section {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: #5c5c5c; padding: 18px 12px 6px;
}
.sidebar .nav-link {
  display: flex; align-items: center; gap: 12px; color: var(--bjj-sidebar-text);
  padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
  position: relative; transition: background .15s, color .15s;
}
.sidebar .nav-link i { font-size: 18px; width: 20px; text-align: center; }
.sidebar .nav-link:hover { color: #fff; background: var(--bjj-sidebar-hover); }
.sidebar .nav-link.active { color: #fff; background: var(--bjj-sidebar-active); }
.sidebar .nav-link.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  background: var(--bjj-red); border-radius: 0 4px 4px 0;
}
.sidebar .nav-link.active i { color: var(--bjj-red); }
.badge-soon {
  margin-left: auto; font-size: 10px; font-weight: 500; color: #6b6b6b;
  border: 1px solid #333; border-radius: 999px; padding: 1px 7px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-top: 1px solid #222; flex-shrink: 0;
}
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; }
.sidebar-user-role { font-size: 12px; color: #737373; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--bjj-red); color: #fff; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bjj-border);
}
@media (min-width: 992px) { .topbar { padding: 0 32px; } }
.topbar-brand { display: flex; align-items: center; gap: 10px; color: var(--bjj-text); font-weight: 700; font-size: 15px; }
.topbar-title { font-size: 18px; font-weight: 600; margin: 0; }
.topbar-user { display: flex; align-items: center; gap: 8px; border: 0; padding: 4px 8px; font-size: 14px; }
.topbar-user:hover, .topbar-user:focus { background: var(--bjj-bg); }

/* ---------- Página ---------- */
.page-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.page-greeting { font-size: 24px; font-weight: 700; margin: 0 0 2px; letter-spacing: -.01em; }

.panel {
  background: var(--bjj-surface); border: 1px solid var(--bjj-border);
  border-radius: var(--radius); padding: 20px;
}
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-title { font-size: 15px; font-weight: 600; margin: 0; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 32px 16px; color: var(--bjj-text);
}
.empty-state > i { font-size: 36px; color: #c4c4c8; margin-bottom: 8px; }

/* ---------- Cards de indicadores ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 992px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.kpi-card {
  display: flex; align-items: flex-start; gap: 14px; background: var(--bjj-surface);
  border: 1px solid var(--bjj-border); border-radius: var(--radius); padding: 18px;
}
.kpi-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bjj-black); color: #fff;
}
.kpi-card-destaque .kpi-icon { background: var(--bjj-red); }
.kpi-label { font-size: 13px; color: var(--bjj-muted); font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.kpi-note { font-size: 11px; color: #a1a1aa; margin-top: 2px; }
@media (max-width: 575.98px) {
  .kpi-card { flex-direction: column; gap: 10px; padding: 14px; }
  .kpi-icon { width: 36px; height: 36px; font-size: 17px; }
  .kpi-value { font-size: 24px; }
}

/* ---------- Navegação inferior (celular) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bjj-black); display: flex; align-items: stretch; justify-content: space-around;
  border-top: 1px solid #222;
}
.bottom-nav-item, .bottom-nav-cta {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #8a8a8a; font-size: 11px; font-weight: 500; text-decoration: none;
  background: none; border: 0; min-width: 0; padding: 0;
}
.bottom-nav-item i { font-size: 21px; line-height: 1; }
.bottom-nav-item.active, .bottom-nav-cta.active { color: #fff; }
.bottom-nav-item.active i { color: var(--bjj-red); }
.bottom-nav-cta { justify-content: flex-end; padding-bottom: 8px; color: #d4d4d4; }
.bottom-nav-cta-btn {
  width: 58px; height: 58px; border-radius: 50%; margin-top: -26px; margin-bottom: 2px;
  background: var(--bjj-red); color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  border: 4px solid var(--bjj-bg); box-shadow: 0 4px 12px rgba(179, 38, 30, .35);
}
@media (max-width: 991.98px) {
  .app-content { padding: 16px 16px calc(var(--bottom-nav-h) + 28px); }
  .btn-lg, .form-control-lg { min-height: 48px; }
}

/* ---------- Login ---------- */
.auth { display: flex; min-height: 100vh; }
.auth-side {
  flex: 1; background: var(--bjj-black); color: #fff; align-items: center; justify-content: center;
  padding: 48px; position: relative; overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px;
  border: 46px solid #1b1b1b; border-radius: 50%;
}
.auth-side-inner { max-width: 420px; position: relative; z-index: 1; }
.auth-side-title { font-size: 36px; font-weight: 700; margin: 24px 0 12px; letter-spacing: -.02em; }
.auth-side-text { color: #a3a3a3; font-size: 17px; line-height: 1.6; }
.belt-stripe { display: flex; gap: 6px; margin-top: 32px; }
.belt-stripe span { width: 44px; height: 10px; border-radius: 3px; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; }
@media (min-width: 992px) { .auth-main { max-width: 560px; } }

/* ---------- Faixa (etiqueta visual com graus) ---------- */
.faixa { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.faixa-tira {
  position: relative; display: inline-block; width: 64px; height: 14px; border-radius: 3px;
  background: var(--cor); border: 1px solid rgba(0, 0, 0, .2); flex-shrink: 0;
}
.faixa-listrada { background: linear-gradient(var(--cor) 0 33%, var(--listra) 33% 67%, var(--cor) 67%); }
.faixa-ponta {
  position: absolute; top: -1px; bottom: -1px; right: 8px; width: 22px;
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.faixa-ponta i { display: block; width: 2px; height: 10px; background: #fff; }
.faixa-grau { color: var(--bjj-muted); font-weight: 500; }
.faixa-compacta .faixa-tira { width: 44px; height: 12px; }
.faixa-compacta .faixa-ponta { right: 5px; width: 18px; }
.faixa-compacta .faixa-ponta i { height: 8px; width: 1.5px; }

/* ---------- Avatar com foto ---------- */
.avatar-img { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e4e4e7; }
.avatar-neutro { background: #27272a; color: #fff; font-weight: 600; }

/* ---------- Componentes de listagem ---------- */
.page-heading { font-size: 22px; font-weight: 700; margin: 0 0 2px; letter-spacing: -.01em; }
.link-voltar { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--bjj-muted); text-decoration: none; margin-bottom: 8px; }
.link-voltar:hover { color: var(--bjj-text); }
.chip {
  display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 8px; margin: 1px 2px 1px 0;
  border-radius: 6px; background: #f4f4f5; border: 1px solid var(--bjj-border); white-space: nowrap;
}
.etiqueta {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 2px 10px 2px 8px; border-radius: 999px; background: #f4f4f5;
}
.etiqueta::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cor); }

.tabela thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--bjj-muted);
  font-weight: 600; background: #fafafa; padding: 12px 16px; border-bottom-color: var(--bjj-border);
}
.tabela td { padding: 12px 16px; }
.tabela tbody tr:last-child td { border-bottom: 0; }
.panel.p-0 { overflow: hidden; }

.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--bjj-muted); }
.input-icon > input { padding-left: 36px; }
.filtros { padding: 12px; }

.lista-cards { display: flex; flex-direction: column; gap: 8px; }
.card-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bjj-surface);
  border: 1px solid var(--bjj-border); border-radius: var(--radius); color: inherit; text-decoration: none;
}
.card-item:active { background: #fafafa; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card-turma { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.card-turma:hover { border-color: #a1a1aa; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
.inativo { opacity: .65; }

/* ---------- Detalhe ---------- */
.perfil-header { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.perfil-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 575.98px) { .perfil-acoes { width: 100%; } .perfil-acoes > .btn { flex: 1; } }
.dados { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.dados dt { color: var(--bjj-muted); font-weight: 500; }
.dados dd { margin: 0; }
.dados-compacto { grid-template-columns: 1fr auto; font-size: 13px; }
.dados-compacto dd { text-align: right; }
.turma-linha { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bjj-border); }
.turma-linha:first-of-type { padding-top: 0; }
.turma-linha:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline { list-style: none; padding: 0 0 0 20px; margin: 0; border-left: 2px solid var(--bjj-border); }
.timeline li { position: relative; padding: 0 0 18px 8px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -27px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--bjj-black);
}
.timeline li:first-child::before { border-color: var(--bjj-red); }
.timeline-data { font-size: 12px; color: var(--bjj-muted); font-weight: 600; margin-bottom: 4px; }
.lista-alunos { list-style: none; padding: 0; margin: 0; }
.lista-alunos li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bjj-border); }
.lista-alunos li:last-child { border-bottom: 0; }
.form-matricular select { min-width: 220px; }
@media (max-width: 575.98px) { .form-matricular { width: 100%; } .form-matricular select { min-width: 0; } }

/* ---------- Formulários ---------- */
.form-acoes {
  display: flex; justify-content: flex-end; gap: 8px; padding: 16px 0 0;
}
@media (max-width: 991.98px) {
  .form-acoes {
    position: sticky; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); z-index: 5;
    background: var(--bjj-bg); margin: 0 -16px; padding: 12px 16px; border-top: 1px solid var(--bjj-border);
  }
  .form-acoes .btn { flex: 1; min-height: 48px; }
}
.turmas-check { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.turma-opcao {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--bjj-border);
  border-radius: 10px; cursor: pointer; margin: 0;
}
.turma-opcao input { margin-top: 3px; accent-color: var(--bjj-black); width: 16px; height: 16px; }
.turma-opcao:has(input:checked) { border-color: var(--bjj-black); background: #fafafa; }
.turma-opcao-corpo { display: flex; flex-direction: column; line-height: 1.3; }
.panel-lgpd { border-left: 3px solid var(--bjj-black); border-radius: 0 var(--radius) var(--radius) 0; }

/* Escolha de avatar */
.avatar-escolha { display: flex; gap: 12px; flex-wrap: wrap; }
.avatar-opcao {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
  padding: 12px 18px; border: 2px solid var(--bjj-border); border-radius: 12px; background: #fff;
  font-size: 14px; font-weight: 500; min-width: 110px; margin: 0;
}
.avatar-opcao input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-opcao img { border-radius: 50%; }
.avatar-opcao:has(input:checked) { border-color: var(--bjj-red); background: #fbeceb; }
.avatar-opcao:has(input:focus-visible) { outline: 2px solid var(--bjj-black); outline-offset: 2px; }

/* Aviso de cookies (fica acima da barra inferior do celular) */
.aviso-cookies {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1080; max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px;
  background: #18181b; color: #f4f4f5; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.aviso-cookies[hidden] { display: none; }
.aviso-cookies a { color: #fff; text-decoration: underline; }
.aviso-cookies .btn { flex-shrink: 0; }
@media (max-width: 991.98px) { .app ~ .aviso-cookies { bottom: 80px; } }

/* Verificação em 2 etapas */
.qr-2fa svg { width: 200px; height: 200px; border: 1px solid var(--bjj-border); border-radius: 8px; }
.codigo-2fa { max-width: 220px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.codigos-recuperacao { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; list-style: none; }
.codigos-recuperacao code { display: block; padding: 8px 10px; border-radius: 8px; background: #f4f4f5; color: #18181b; font-size: 15px; text-align: center; }
.passos-2fa li { margin-bottom: 8px; }

/* Política de privacidade */
.texto-legal { max-width: 760px; line-height: 1.6; }
.texto-legal h2 { font-size: 1.1rem; font-weight: 700; margin-top: 1.5rem; }

/* Link de acesso */
.link-acesso-campo { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.btn-whatsapp { background: #1FAF38; border-color: #1FAF38; color: #fff; }
.btn-whatsapp:hover, .btn-whatsapp:focus { background: #178F2D; border-color: #178F2D; color: #fff; }
.horario-linha { padding: 10px 0; border-bottom: 1px dashed var(--bjj-border); }
.horario-linha:last-child { border-bottom: 0; }
.mt-n2 { margin-top: -.5rem; }

/* ---------- Aulas de hoje ---------- */
.aulas-hoje { list-style: none; padding: 0; margin: 0; }
.aulas-hoje li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--bjj-border); }
.aulas-hoje li:last-child { border-bottom: 0; }
.aula-hora { font-weight: 700; font-size: 15px; width: 52px; line-height: 1.1; }
.aula-hora span { display: block; font-size: 12px; font-weight: 500; color: var(--bjj-muted); }
.aula-encerrada { opacity: .55; }
.aula-andamento .aula-hora { color: var(--bjj-red); }

/* ---------- Check-in ---------- */
.dia-nav { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.dia-nav .btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.dia-nav-input { width: 22px; border: 0; background: transparent; color: transparent; cursor: pointer; padding: 0; }
.dia-nav-input::-webkit-datetime-edit { display: none; }

.sugestao {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius);
  background: var(--bjj-black); color: #fff; text-decoration: none;
  border-left: 5px solid var(--bjj-red);
}
.sugestao:hover { color: #fff; background: #1c1c1c; }
.sugestao-icone {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bjj-red); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}

.lista-aulas { display: flex; flex-direction: column; gap: 8px; }
.aula-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--bjj-surface);
  border: 1px solid var(--bjj-border); border-radius: var(--radius); color: inherit; text-decoration: none;
}
a.aula-card:hover { border-color: #a1a1aa; }
.aula-card.aula-andamento { border-color: var(--bjj-red); box-shadow: inset 4px 0 0 var(--bjj-red); }
.aula-card.aula-encerrada { opacity: .75; }
.aula-data {
  width: 46px; flex-shrink: 0; text-align: center; border-radius: 8px; padding: 4px 0;
  background: #f4f4f5; line-height: 1.1;
}
.aula-data-dia { display: block; font-size: 18px; font-weight: 700; }
.aula-data-mes { display: block; font-size: 11px; text-transform: uppercase; color: var(--bjj-muted); font-weight: 600; }

.chamada-topo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.ck-contador {
  display: flex; align-items: baseline; gap: 2px; background: var(--bjj-black); color: #fff;
  padding: 8px 14px; border-radius: 12px; flex-shrink: 0; line-height: 1;
}
.ck-contador strong { font-size: 26px; font-weight: 700; }
.ck-contador span { font-size: 15px; color: #a3a3a3; }
.ck-contador small { display: block; font-size: 11px; color: #a3a3a3; margin-left: 6px; }
.chamada-barra {
  position: sticky; top: var(--topbar-h); z-index: 10; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 0; background: var(--bjj-bg); margin-bottom: 4px;
}
.chamada-barra .btn-group .btn { min-height: 38px; display: inline-flex; align-items: center; }

.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ck-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; min-height: 84px;
  padding: 12px 14px; background: var(--bjj-surface); border: 2px solid var(--bjj-border);
  border-radius: 14px; color: inherit; transition: border-color .15s, background .15s, transform .08s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ck-card:hover { border-color: #a1a1aa; }
.ck-card:active { transform: scale(.98); }
.ck-card.htmx-request { opacity: .6; }
.ck-card[hidden] { display: none; }
.ck-presente { border-color: #1e8a3a; background: #eef8f0; }
.ck-presente:hover { border-color: #166b2c; }
.ck-ausente { background: #fafafa; }
.ck-ausente .ck-nome { color: var(--bjj-muted); }
.ck-foto { position: relative; flex-shrink: 0; }
.ck-selo {
  position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%;
  background: #1e8a3a; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; border: 2px solid #fff;
}
.ck-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ck-nome { font-weight: 600; font-size: 15px; line-height: 1.25; }
.ck-faixa { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--bjj-muted); }
.ck-status { font-size: 13px; font-weight: 500; color: var(--bjj-muted); }
.ck-presente .ck-status { color: #1e8a3a; }
.ck-ausente .ck-status { color: var(--bjj-red); }
.ck-tag { margin-left: 4px; font-size: 11px; background: #f4f4f5; border-radius: 4px; padding: 1px 6px; color: var(--bjj-muted); }
.ck-erro { font-size: 12px; color: var(--bjj-red); font-weight: 600; }
details.panel summary { cursor: pointer; }
@media (max-width: 575.98px) {
  .ck-grid { grid-template-columns: 1fr; }
  .chamada-barra .btn-group { width: 100%; }
  .chamada-barra .btn-group .btn { flex: 1; justify-content: center; }
}

/* ---------- Presença do aluno ---------- */
.barras { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 20px; }
.barra { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.barra-coluna { width: 100%; max-width: 42px; min-height: 3px; background: var(--bjj-black); border-radius: 6px 6px 2px 2px; }
.barra:last-child .barra-coluna { background: var(--bjj-red); }
.barra-valor { font-size: 12px; font-weight: 700; }
.barra-rotulo { font-size: 11px; color: var(--bjj-muted); }
.lista-checkins { list-style: none; padding: 0; margin: 0; }
.lista-checkins li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bjj-border); }
.lista-checkins li:last-child { border-bottom: 0; }
.lista-ultimos { list-style: none; padding: 0; margin: 0; }
.lista-ultimos li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--bjj-border); }
.lista-ultimos li:last-child { border-bottom: 0; }

/* ---------- Planejamento ---------- */
.nav-pills-dark .nav-link { color: var(--bjj-text); font-weight: 500; border-radius: 10px; }
.nav-pills-dark .nav-link.active { background: var(--bjj-black); color: #fff; }
.dia-titulo { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bjj-muted); margin: 18px 0 8px; }
.dia-titulo:first-of-type { margin-top: 0; }
.plano-card .btn { flex-shrink: 0; }
.roteiro { list-style: none; counter-reset: etapa; padding: 0; margin: 0; }
.roteiro li { counter-increment: etapa; position: relative; padding: 0 0 16px 44px; }
.roteiro li:last-child { padding-bottom: 0; }
.roteiro li::before {
  content: counter(etapa); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--bjj-black); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.roteiro li:not(:last-child)::after {
  content: ""; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 2px; background: var(--bjj-border);
}
.lista-posicoes { list-style: none; padding: 0; margin: 0; }
.lista-posicoes li { display: flex; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--bjj-border); font-weight: 500; }
.lista-posicoes li:last-child { border-bottom: 0; }
.lista-posicoes i { color: var(--bjj-red); font-size: 22px; line-height: 0; margin-left: -6px; }
.etapas-lista { display: flex; flex-direction: column; gap: 10px; }
.etapa-linha { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--bjj-border); border-radius: 10px; background: #fcfcfc; }
.etapa-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bjj-black); color: #fff; flex-shrink: 0;
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 5px;
}
.etapa-acoes { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 575.98px) { .etapa-acoes { flex-direction: row; } .etapa-linha { flex-wrap: wrap; } .etapa-acoes { width: 100%; justify-content: flex-end; } }
.chamada-tema { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--bjj-border); margin-bottom: 10px; font-size: 14px; text-decoration: none; color: inherit; }

/* ---------- Biblioteca técnica ---------- */
.categorias-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.categoria-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 14px;
  border-radius: 999px; background: var(--bjj-surface); border: 1px solid var(--bjj-border);
  color: var(--bjj-text); font-size: 14px; font-weight: 500; text-decoration: none;
}
.categoria-chip:hover { border-color: #a1a1aa; color: var(--bjj-text); }
.categoria-chip.ativa { background: var(--bjj-black); border-color: var(--bjj-black); color: #fff; }
.categoria-chip.ativa i { color: var(--bjj-red); }

.grid-tecnicas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
@media (max-width: 575.98px) { .grid-tecnicas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card-tecnica {
  display: flex; flex-direction: column; background: var(--bjj-surface); border: 1px solid var(--bjj-border);
  border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card-tecnica:hover { border-color: #a1a1aa; box-shadow: 0 4px 16px rgba(0, 0, 0, .07); transform: translateY(-2px); }
.card-tecnica-img { position: relative; aspect-ratio: 16 / 10; background: #18181b; }
.card-tecnica-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tecnica-rascunho { position: absolute; top: 8px; left: 8px; }
.tecnica-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #18181b 0%, #27272a 100%); color: #52525b; font-size: 44px;
  position: relative;
}
.tecnica-placeholder::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 18%; height: 10px; background: #0b0b0b;
  box-shadow: inset -36px 0 0 var(--bjj-red);
}
.tecnica-placeholder-grande { aspect-ratio: 16 / 9; font-size: 72px; }
.card-tecnica-corpo { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card-tecnica-titulo { font-size: 16px; font-weight: 700; margin: 0 0 4px; line-height: 1.25; }
.card-tecnica-resumo {
  font-size: 13px; color: var(--bjj-muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 575.98px) {
  .card-tecnica-corpo { padding: 10px; }
  .card-tecnica-titulo { font-size: 14px; }
  .card-tecnica-resumo { display: none; }
}
.nivel { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.nivel-iniciante { background: #e7f6ea; color: #166b2c; }
.nivel-intermediario { background: #fff4d6; color: #8a5a00; }
.nivel-avancado { background: var(--bjj-red-soft); color: var(--bjj-red); }

.tecnica-capa { background: #18181b; }
.tecnica-capa-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tecnica-capa img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #18181b; }
.tecnica-zoom {
  position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 8px;
  background: rgba(0, 0, 0, .6); color: #fff; display: flex; align-items: center; justify-content: center;
}
.galeria-miniaturas { display: flex; gap: 8px; padding: 12px; overflow-x: auto; }
.miniatura { flex-shrink: 0; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #e4e4e7; }
.miniatura img { width: 100%; height: 100%; object-fit: cover; }
.miniatura.ativa { border-color: var(--bjj-red); }
.passos li { padding-bottom: 20px; }
.passo-img { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; margin-top: 8px; border: 1px solid var(--bjj-border); }
.lista-relacionadas { list-style: none; padding: 0; margin: 0; }
.lista-relacionadas li { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--bjj-border); }
.lista-relacionadas li:last-child { border-bottom: 0; }
.lista-relacionadas a { display: flex; flex-direction: column; padding: 10px 0; color: inherit; text-decoration: none; flex: 1; }
.miniatura-form { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bjj-border); flex-shrink: 0; }
.etapa-tecnica { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; margin-top: 4px; }

/* ---------- Grade semanal ---------- */
.grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.grade-dia { background: var(--bjj-surface); border: 1px solid var(--bjj-border); border-radius: var(--radius); padding: 12px; }
@media (min-width: 1200px) { .grade-dia { order: 0 !important; } /* desktop: segunda a domingo */ }
.grade-dia.hoje { border-color: var(--bjj-black); box-shadow: inset 0 3px 0 var(--bjj-red); }
.grade-dia-titulo { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.grade-item { border-left: 3px solid var(--cor); background: #fafafa; border-radius: 0 8px 8px 0; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; }
.grade-item.minha { background: var(--bjj-red-soft); box-shadow: inset 0 0 0 1px rgba(179, 38, 30, .25); }
.grade-hora { font-weight: 700; font-size: 12px; color: var(--bjj-muted); }
.legenda-minha { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--bjj-red-soft); border: 1px solid rgba(179, 38, 30, .4); vertical-align: -1px; }
@media (max-width: 1199.98px) {
  /* No celular: lista por dia começando por hoje */
  .grade { display: flex; flex-direction: column; }
}
