/*
  TATAME DESIGN SYSTEM v2.0
  Arquivo: tatame-design-system.css
  Uso: incluir em academia.tatame.site e tatame.site (app do aluno)
  Substitui tatame-brand.css + theme.css em ambos os apps
  ─────────────────────────────────────────────────────────────────
  - Verde suave (sem neon): #3ecf6b → shades funcionais
  - Dark mode (padrão) + Light mode via [data-theme="light"]
  - Toggle de tema via JS: document.documentElement.setAttribute('data-theme', 'light'|'dark')
  - Tipografia: 'Plus Jakarta Sans' + 'JetBrains Mono'
  - Layout desktop: sidebar + topbar, igual para aluno e academia
*/

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════════════════════════
   TOKENS — Dark (padrão)
══════════════════════════════════════════════════════════════ */
:root,
[data-theme="dark"] {
  /* Backgrounds */
  --bg-base:    #0d0f12;
  --bg-surface: #131619;
  --bg-card:    #1a1e24;
  --bg-raised:  #21262e;
  --bg-hover:   #282e38;

  /* Borders */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.18);

  /* Text */
  --text-primary:   #edf0f5;
  --text-secondary: #8a95a3;
  --text-muted:     #4e5764;

  /* Green — suave, não-neon */
  --green:          #3ecf6b;
  --green-dim:      rgba(62,207,107,0.10);
  --green-mid:      rgba(62,207,107,0.22);
  --green-strong:   rgba(62,207,107,0.35);
  --green-text:     #2db85a;   /* para texto sobre fundos claros */
  --green-on-bg:    #3ecf6b;   /* para ícones/textos no dark */

  /* Accent colors */
  --blue:    #4a90d9;
  --blue-dim: rgba(74,144,217,0.12);
  --amber:   #d4922a;
  --amber-dim: rgba(212,146,42,0.12);
  --red:     #d95c5c;
  --red-dim: rgba(217,92,92,0.12);
  --purple:  #8b6fd9;

  /* Sidebar */
  --sidebar-bg:     #0d0f12;
  --sidebar-border: rgba(255,255,255,0.07);
  --sidebar-width:  248px;

  /* Topbar */
  --topbar-h:  64px;
  --topbar-bg: rgba(13,15,18,0.92);

  /* Shadows (sutis) */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);

  /* Transition */
  --t: 0.15s ease;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ══════════════════════════════════════════════════════════════
   TOKENS — Light
══════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-base:    #f4f6f9;
  --bg-surface: #ffffff;
  --bg-card:    #ffffff;
  --bg-raised:  #f0f2f6;
  --bg-hover:   #e8ecf2;

  --border-subtle:  rgba(0,0,0,0.06);
  --border-default: rgba(0,0,0,0.10);
  --border-strong:  rgba(0,0,0,0.18);

  --text-primary:   #111827;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;

  --green:          #27a854;
  --green-dim:      rgba(39,168,84,0.10);
  --green-mid:      rgba(39,168,84,0.22);
  --green-strong:   rgba(39,168,84,0.35);
  --green-text:     #1a8040;
  --green-on-bg:    #1e7a43;

  --blue:    #2b72c7;
  --blue-dim: rgba(43,114,199,0.10);
  --amber:   #b5720d;
  --amber-dim: rgba(181,114,13,0.10);
  --red:     #c0392b;
  --red-dim: rgba(192,57,43,0.10);
  --purple:  #6d4ec7;

  --sidebar-bg:     #ffffff;
  --sidebar-border: rgba(0,0,0,0.08);

  --topbar-bg: rgba(255,255,255,0.92);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
}

/* ══════════════════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overscroll-behavior: none;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-sans); cursor: pointer; }
input, select, textarea { font-family: var(--font-sans); }

/* ══════════════════════════════════════════════════════════════
   APP SHELL — Mobile
══════════════════════════════════════════════════════════════ */
.tatame-shell {
  min-height: 100dvh;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  position: relative;
  z-index: 0;
}

.tatame-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 84px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tatame-scroll::-webkit-scrollbar { display: none; }

.tatame-page {
  padding: 16px 16px 0;
}

/* ══════════════════════════════════════════════════════════════
   APP SHELL — Desktop (≥900px)
   Aplica-se via classe .tatame-desktop-shell
   (funciona igual para aluno e academia)
══════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .tatame-shell {
    --sidebar: var(--sidebar-width);
    --topbar:  var(--topbar-h);
    display: grid !important;
    grid-template-columns: var(--sidebar) minmax(0,1fr) !important;
    grid-template-rows: var(--topbar) minmax(0,1fr) !important;
    min-height: 100dvh !important;
    background: var(--bg-base) !important;
  }

  /* Topbar */
  .tatame-topbar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 70 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 0 28px !important;
    height: var(--topbar) !important;
    background: var(--topbar-bg) !important;
    -webkit-backdrop-filter: blur(16px) !important; backdrop-filter: blur(16px) !important; -webkit-backdrop-filter: blur(16px) !important; backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
  }

  .tatame-topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
  }

  .tatame-topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  /* Content area */
  .tatame-scroll {
    grid-column: 2 !important;
    grid-row: 2 !important;
    height: calc(100dvh - var(--topbar)) !important;
    overflow: auto !important;
    padding: 0 28px 36px !important;
    background: var(--bg-base) !important;
  }

  .tatame-page {
    width: min(100%, 1200px) !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 28px 0 0 !important;
  }

  /* Sidebar / Bottom nav vira sidebar */
  .tatame-bnav {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    position: sticky !important;
    top: 0 !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    padding: 20px 12px 20px !important;
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border) !important;
    overflow-y: auto !important;
    transform: none !important;
    left: unset !important;
    bottom: unset !important;
    right: unset !important;
    max-width: none !important;
    width: auto !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    border-top: none !important;
    border-radius: 0 !important;
  }

  /* Sidebar logo */
  .tatame-bnav::before {
    content: 'Tatame.';
    display: block !important;
    padding: 4px 10px 20px !important;
    font-weight: 800 !important;
    font-size: 17px !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.3px !important;
  }

  /* Nav buttons viram itens de sidebar */
  .tatame-nb {
    width: 100% !important;
    min-height: 40px !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 12px !important;
    border-radius: var(--r-md) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--text-secondary) !important;
    background: none !important;
    border: none !important;
    text-decoration: none !important;
    transition: all var(--t) !important;
  }

  .tatame-nb svg, .tatame-nb .nb-icon svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
  }

  .tatame-nb.on,
  .tatame-nb:hover {
    background: var(--green-dim) !important;
    color: var(--green-on-bg) !important;
  }

  .tatame-nb.on::after { display: none !important; }

  /* Indicador ativo no mobile (dot embaixo) → hidden no desktop */
  .tatame-nb-dot { display: none !important; }

  /* Separador de seção */
  .tatame-nav-sep {
    height: 1px;
    background: var(--border-subtle);
    margin: 8px 0;
  }

  /* Overlay / modal centralizado no desktop */
  .tatame-overlay {
    align-items: center !important;
    padding-left: var(--sidebar) !important;
  }

  .tatame-sheet {
    width: min(720px, calc(100vw - var(--sidebar) - 40px)) !important;
    border-radius: var(--r-xl) !important;
    max-height: 88dvh !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   BOTTOM NAV — Mobile
══════════════════════════════════════════════════════════════ */
.tatame-bnav {
  position: fixed;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: var(--shadow-md);
}

.tatame-nb {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: color var(--t);
  text-decoration: none;
  position: relative;
}

.tatame-nb svg { width: 22px; height: 22px; }
.tatame-nb.on { color: var(--green-on-bg); }

/* Dot indicator mobile */
.tatame-nb.on::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  position: absolute;
  bottom: 5px;
}

/* ══════════════════════════════════════════════════════════════
   TOPBAR (Mobile — aparece sempre no mobile)
══════════════════════════════════════════════════════════════ */
.tatame-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 70;
}

.tatame-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tatame-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ══════════════════════════════════════════════════════════════
   BRAND MARK
══════════════════════════════════════════════════════════════ */
.tatame-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--green-dim);
  border: 1px solid var(--green-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--green-on-bg);
  flex-shrink: 0;
}

.tatame-brand-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.tatame-brand-name span { color: var(--green-on-bg); }

.tatame-brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

/* ══════════════════════════════════════════════════════════════
   TOPBAR BUTTONS
══════════════════════════════════════════════════════════════ */
.tatame-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--t);
}

.tatame-icon-btn:hover {
  border-color: var(--green-mid);
  color: var(--green-on-bg);
  background: var(--green-dim);
}

.tatame-icon-btn svg { width: 18px; height: 18px; }

.tatame-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--green);
  color: #061006;
  border: 2px solid var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
}

/* Pill de plano */
.tatame-plan-pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-dim);
  border: 1px solid var(--green-mid);
  color: var(--green-on-bg);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* Theme toggle */
.tatame-theme-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--t);
}

.tatame-theme-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.tatame-theme-btn svg { width: 16px; height: 16px; }

/* ══════════════════════════════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════════════════════════════ */
.t-hero {
  font-weight: 800;
  font-size: 26px;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.t-title {
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.t-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  margin: 20px 0 10px;
}

.t-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.t-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.t-mono {
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════ */
.tatame-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 10px;
}

.tatame-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  margin-bottom: 7px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}

.tatame-row:hover {
  background: var(--bg-raised);
  border-color: var(--border-default);
}

/* ══════════════════════════════════════════════════════════════
   METRIC CARDS / STATS
══════════════════════════════════════════════════════════════ */
.tatame-metric-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

@media (min-width: 900px) {
  .tatame-metric-board { grid-template-columns: repeat(4, 1fr); }
}

.tatame-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}

.tatame-metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tatame-metric-value {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  color: var(--green-on-bg);
  line-height: 1;
}

.tatame-metric-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   STATUS BADGES
══════════════════════════════════════════════════════════════ */
.tatame-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.tatame-status.em_dia {
  background: var(--green-dim);
  color: var(--green-on-bg);
  border: 1px solid var(--green-mid);
}

.tatame-status.pendente {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(212,146,42,0.3);
}

.tatame-status.atrasado {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(217,92,92,0.3);
}

/* ══════════════════════════════════════════════════════════════
   STREAK / HERO CARD
══════════════════════════════════════════════════════════════ */
.tatame-streak-hero {
  background: var(--bg-card);
  border: 1px solid var(--green-mid);
  border-radius: var(--r-xl);
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.tatame-streak-num {
  font-family: var(--font-mono);
  font-size: 68px;
  font-weight: 500;
  line-height: 1;
  color: var(--green-on-bg);
  letter-spacing: -2px;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.tatame-btn-primary {
  width: 100%;
  background: var(--green);
  color: #05180c;
  border: none;
  border-radius: var(--r-md);
  padding: 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity var(--t), transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tatame-btn-primary:active { transform: scale(0.98); opacity: 0.9; }
.tatame-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

[data-theme="light"] .tatame-btn-primary { color: #052210; }

.tatame-btn-ghost {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  border-radius: var(--r-md);
  padding: 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.tatame-btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--bg-raised);
}

.tatame-btn-sm {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity var(--t);
  white-space: nowrap;
  border: none;
}

.tatame-btn-sm:active { opacity: 0.8; }

.tatame-btn-green {
  background: var(--green);
  color: #05180c;
}

[data-theme="light"] .tatame-btn-green { color: #052210; }

.tatame-btn-blue {
  background: var(--blue-dim);
  border: 1px solid rgba(74,144,217,0.3);
  color: var(--blue);
}

.tatame-btn-red {
  background: var(--red-dim);
  border: 1px solid rgba(217,92,92,0.3);
  color: var(--red);
}

.tatame-btn-amber {
  background: var(--amber-dim);
  border: 1px solid rgba(212,146,42,0.3);
  color: var(--amber);
}

.tatame-btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════════════════════════ */
.tatame-input,
.tatame-select,
.tatame-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color var(--t);
  -webkit-appearance: none;
  appearance: none;
}

.tatame-input:focus,
.tatame-select:focus,
.tatame-textarea:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.tatame-textarea { resize: none; height: 72px; }

.tatame-frow { margin-bottom: 13px; }

/* ══════════════════════════════════════════════════════════════
   CHIPS / FILTER
══════════════════════════════════════════════════════════════ */
.tatame-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.tatame-chips::-webkit-scrollbar { display: none; }

.tatame-chip {
  flex-shrink: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--t);
  -webkit-user-select: none; user-select: none;
}

.tatame-chip.on {
  background: var(--green-dim);
  border-color: var(--green-mid);
  color: var(--green-on-bg);
}

/* ══════════════════════════════════════════════════════════════
   OVERLAY / SHEET (modal bottom)
══════════════════════════════════════════════════════════════ */
.tatame-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: tatameFadeIn 0.2s ease;
}

[data-theme="light"] .tatame-overlay {
  background: rgba(0,0,0,0.4);
}

.tatame-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 0 20px 36px;
  width: 100%;
  max-width: 720px;
  animation: tatameSlideUp 0.3s cubic-bezier(0.16,1,0.3,1);
  max-height: 92dvh;
  overflow-y: auto;
}

.tatame-handle {
  width: 36px;
  height: 3px;
  background: var(--border-strong);
  border-radius: 999px;
  margin: 12px auto 20px;
}

.tatame-sheet-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

/* ══════════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════════ */
.tatame-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-raised);
  border: 1px solid var(--green-mid);
  color: var(--green-on-bg);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 999;
  white-space: nowrap;
  pointer-events: none;
  animation: tatameTIn 0.25s cubic-bezier(0.16,1,0.3,1), tatameTOut 0.25s ease 2.5s forwards;
}

@media (min-width: 900px) {
  .tatame-toast { bottom: 28px; }
}

/* ══════════════════════════════════════════════════════════════
   AUTH SCREEN
══════════════════════════════════════════════════════════════ */
.tatame-auth-wrap {
  min-height: 100dvh;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  isolation: isolate;
}

.tatame-auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 26px 22px;
}

.tatame-err {
  background: var(--red-dim);
  border: 1px solid rgba(217,92,92,0.3);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 13px;
}

/* ══════════════════════════════════════════════════════════════
   FAIXA COLORS — helpers
══════════════════════════════════════════════════════════════ */
.faixa-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════════ */
.tatame-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.tatame-empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.6;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR EXTRAS — Desktop
══════════════════════════════════════════════════════════════ */
.tatame-sidebar-logout {
  margin-top: auto;
}

@media (max-width: 899px) {
  .tatame-sidebar-logout { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   MAIS DRAWER — Mobile (academia)
══════════════════════════════════════════════════════════════ */
.tatame-mais-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: tatameFadeIn 0.18s;
}

.tatame-mais-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 0 20px calc(env(safe-area-inset-bottom) + 20px);
  width: 100%;
  max-width: 720px;
  animation: tatameSlideUp 0.28s cubic-bezier(0.16,1,0.3,1);
}

.tatame-mais-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.tatame-mais-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.tatame-mais-btn:active { background: var(--bg-hover); border-color: var(--border-default); }

.tatame-mais-btn.accent {
  color: var(--green-on-bg);
  border-color: var(--green-mid);
  background: var(--green-dim);
}

.tatame-mais-btn.danger {
  color: var(--red);
  border-color: rgba(217,92,92,0.25);
}

.tatame-mais-btn svg { width: 24px; height: 24px; stroke-width: 1.7; }

/* ══════════════════════════════════════════════════════════════
   PLAN STATUS CARD (Dashboard academia)
══════════════════════════════════════════════════════════════ */
.tatame-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tatame-plan-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tatame-plan-name {
  font-weight: 800;
  font-size: 18px;
  color: var(--text-primary);
}

.tatame-plan-meter {
  height: 5px;
  background: var(--bg-raised);
  border-radius: 999px;
  overflow: hidden;
}

.tatame-plan-meter-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ══════════════════════════════════════════════════════════════
   CRONÔMETRO
══════════════════════════════════════════════════════════════ */
.tatame-timer-track { fill: none; stroke: var(--bg-raised); }
.tatame-timer-prog  { fill: none; transition: stroke-dashoffset 0.4s linear, stroke 0.3s; }

.tatame-timer-time {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -2px;
}

.tatame-wakelock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: all 0.3s;
}

.tatame-wakelock-badge.active {
  background: var(--green-dim);
  border-color: var(--green-mid);
  color: var(--green-on-bg);
}

.tatame-wakelock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}

.tatame-wakelock-badge.active .tatame-wakelock-dot {
  background: var(--green);
  animation: tatamePulseDot 1.5s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════ */
@keyframes tatameFadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes tatameSlideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
@keyframes tatameTIn  { from { opacity: 0; transform: translateX(-50%) translateY(10px) } to { opacity: 1; transform: translateX(-50%) translateY(0) } }
@keyframes tatameTOut { to { opacity: 0; transform: translateX(-50%) translateY(10px) } }
@keyframes tatamePulseDot { 0%,100% { opacity: 1 } 50% { opacity: 0.4 } }
@keyframes tatamePing { 0% { transform: scale(1); opacity: 1 } 100% { transform: scale(2.2); opacity: 0 } }

/* ══════════════════════════════════════════════════════════════
   SDOTS (sequência de treino)
══════════════════════════════════════════════════════════════ */
.tatame-sdots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 14px;
}

.tatame-sdot {
  height: 28px;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
}

.tatame-sdot .sd-d {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.tatame-sdot .sd-i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.2s;
}

.tatame-sdot.done { background: var(--green-dim); border-color: var(--green-mid); }
.tatame-sdot.done .sd-d { color: var(--green-on-bg); }
.tatame-sdot.done .sd-i { background: var(--green); }
.tatame-sdot.today { border-color: var(--green-mid); }
.tatame-sdot.today .sd-d { color: var(--green-on-bg); }

/* ══════════════════════════════════════════════════════════════
   TÉCNICA CARD
══════════════════════════════════════════════════════════════ */
.tatame-tec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 15px;
  margin-bottom: 8px;
}

.tatame-tec-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 15px;
  flex-shrink: 0;
  color: var(--green-on-bg);
}

.tatame-diff-dots { display: flex; gap: 3px; }
.tatame-dd {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--border-default);
}
.tatame-dd.on { background: var(--green); border-color: var(--green); }

/* ══════════════════════════════════════════════════════════════
   CAMPEONATOS / EVENTOS
══════════════════════════════════════════════════════════════ */
.tatame-cal-date {
  flex-shrink: 0;
  background: var(--bg-raised);
  border-radius: var(--r-md);
  width: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

.tatame-cal-month {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 1px;
}

.tatame-cal-day {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
  color: var(--green-on-bg);
}

/* ══════════════════════════════════════════════════════════════
   BETA BADGE
══════════════════════════════════════════════════════════════ */
.tatame-beta-badge {
  background: var(--green-dim);
  border: 1px solid var(--green-mid);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 800;
  color: var(--green-on-bg);
  letter-spacing: 1.5px;
}

/* ══════════════════════════════════════════════════════════════
   TRIAL BANNER
══════════════════════════════════════════════════════════════ */
.tatame-trial-banner {
  background: var(--green-dim);
  border-bottom: 1px solid var(--green-mid);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   EMAIL VERIFY BANNER
══════════════════════════════════════════════════════════════ */
.tatame-verify-banner {
  background: rgba(212,146,42,0.08);
  border-bottom: 1px solid rgba(212,146,42,0.3);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD HERO — Academia
══════════════════════════════════════════════════════════════ */
.tatame-dash-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 900px) {
  .tatame-dash-hero {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
  }

  .tatame-dash-hero > div:first-child { flex: 1; }
  .tatame-dash-hero > aside { flex: 0 0 260px; }
}

.tatame-dash-kicker {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green-on-bg);
  margin-bottom: 4px;
  opacity: 0.8;
}

.tatame-dash-title {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.tatame-dash-copy {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 560px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVIDADE GERAL
══════════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  .tatame-topbar-brand-sub { display: none; }
  .tatame-plan-pill { max-width: 90px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
}

/* ══════════════════════════════════════════════════════════════
   AVATAR / INICIAL
══════════════════════════════════════════════════════════════ */
.tatame-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  font-family: var(--font-sans);
  font-weight: 800;
}
