/*
  MeuTreino.Online — TEMA EDITORIAL FINAL
  Base visual do HTML de referência, sem fonte achatada.
  Paleta: #0f0f0f, #181818, #222222, #2a2a2a, #e8ff47, #47c5ff, #ff6b35, #ff4757, #2ed573.
*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #0f0f0f !important;
  --surface: #181818 !important;
  --surface-2: #222222 !important;
  --surface2: #222222 !important;
  --surface3: #141414 !important;
  --card: #181818 !important;
  --border: #2a2a2a !important;
  --line: #2a2a2a !important;
  --line-soft: rgba(42,42,42,.72) !important;

  --accent: #e8ff47 !important;
  --accent-soft: rgba(232,255,71,.055) !important;
  --accent-border: rgba(232,255,71,.34) !important;
  --accent2: #ff6b35 !important;
  --accent3: #47c5ff !important;
  --primary: #e8ff47 !important;
  --primary-2: #47c5ff !important;
  --orange: #ff6b35 !important;
  --blue: #47c5ff !important;
  --red: #ff4757 !important;
  --green: #2ed573 !important;
  --danger: #ff4757 !important;
  --success: #2ed573 !important;

  --text: #f0f0f0 !important;
  --muted: #888888 !important;
  --dim: #555555 !important;
  --text-muted: #888888 !important;
  --text-dim: #555555 !important;

  --radius: 0 !important;
  --radius-sm: 0 !important;
  --radius-lg: 0 !important;
  --shadow: none !important;
  --shadow-cut: none !important;
}

* { box-sizing: border-box; }

html, body {
  background: #0f0f0f !important;
  color: #f0f0f0 !important;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  overflow-x: hidden !important;
}

body {
  background:
    radial-gradient(circle at 92% 0%, rgba(232,255,71,.055), transparent 280px),
    linear-gradient(180deg, #0f0f0f 0%, #0b0b0b 100%) !important;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .055;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 72px 72px;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* Tipografia: técnica sem ficar esticada */
h1, h2, h3, h4, .topbar h1, .card h2, .card h3, .auth-card h1,
.admin-page h1, .admin-full h1, .sidebar-brand strong,
.training-visual-title strong, .ex-name, .item-title-row strong,
.metric-card strong, .hero-card-value {
  font-family: 'IBM Plex Sans', 'Inter', system-ui, sans-serif !important;
  letter-spacing: -.035em !important;
  text-shadow: none !important;
}

p, span, label, input, select, textarea, td, th, button, a, .btn {
  font-family: 'Inter', system-ui, sans-serif !important;
}

/* Remove a estética bolha */
.card, .metric-card, .auth-card, .mini-panel, .session-workout-card,
.session-item-card, .finish-session-box, .training-visual-item,
.visual-day-card, .day-block, .hero-card, .admin-card, .admin-list,
.admin-user-row, .import-card, .notice, .flash, .alert, .success,
.error, .callout, .exec-block, .warmup-block, .protocol-box,
.prog-card, .nutri-card, .week-day, .series-table-wrap, .table-wrap,
.modal, .dropdown, .popover, .btn, button, a.btn, input, select, textarea,
.pill, .badge, .tag, .chip, .status-badge, .day-badge,
.session-meta span, .training-prescription-chips span,
.item-pill-stack span, .user-chip, .logout-link, .tab-button,
.treino-view-button, .admin-filter, .admin-tab, .center-link {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Layout */
.app-shell, .single-content, .admin-page, .admin-full, .admin-shell {
  background: transparent !important;
}

.main-content { max-width: 1260px !important; }

/* Sidebar */
.sidebar {
  background: #0b0b0b !important;
  border-right: 1px solid #2a2a2a !important;
  box-shadow: none !important;
}

.sidebar-brand {
  border-bottom: 1px solid #2a2a2a !important;
  padding-bottom: 18px !important;
}

.brand-mark, .logo-mark, .auth-logo, .admin-logo, .user-avatar, .initials, .avatar {
  background: #e8ff47 !important;
  color: #000 !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-weight: 900 !important;
}

.sidebar-brand strong { color: #f0f0f0 !important; font-size: 1.03rem !important; }
.sidebar-brand span { color: #888888 !important; font-size: .82rem !important; }

.tab-nav { gap: 4px !important; }

.tab-button, .logout-link {
  background: transparent !important;
  color: #888888 !important;
  border: 1px solid transparent !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  font-weight: 750 !important;
}

.tab-button:hover, .logout-link:hover {
  background: #181818 !important;
  color: #f0f0f0 !important;
  border-color: #2a2a2a !important;
}

.tab-button.active {
  background: rgba(232,255,71,.075) !important;
  color: #e8ff47 !important;
  border-color: rgba(232,255,71,.35) !important;
  box-shadow: inset 3px 0 0 #e8ff47 !important;
}

/* Cabeçalho */
.topbar { align-items: flex-start !important; margin-bottom: 28px !important; }

.eyebrow, .hero-tag, .card .eyebrow, .admin-kicker, .section-kicker,
.training-block-heading span, .warmup-title, .exec-header, .callout-title,
.form-label, label.small-label {
  color: #e8ff47 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: .68rem !important;
  font-weight: 850 !important;
  letter-spacing: .22em !important;
  text-transform: uppercase !important;
}

.topbar h1, .auth-card h1, .admin-page h1, .admin-full h1 {
  color: #f0f0f0 !important;
  font-size: clamp(2.55rem, 5.4vw, 4.5rem) !important;
  line-height: .97 !important;
  font-weight: 850 !important;
  letter-spacing: -.06em !important;
}

.user-chip {
  background: #141414 !important;
  border: 1px solid #2a2a2a !important;
  color: #888888 !important;
}

/* Caixas com contorno editorial */
.card, .metric-card, .auth-card, .session-workout-card, .visual-day-card,
.day-block, .import-card, .admin-card, .admin-user-row, .admin-list,
.training-visual-item, .finish-session-box, .mini-panel {
  background: #181818 !important;
  border: 1px solid #2a2a2a !important;
  color: #f0f0f0 !important;
  position: relative;
  overflow: hidden;
}

.card::before, .metric-card::before, .auth-card::before,
.session-workout-card::before, .visual-day-card::before, .day-block::before,
.import-card::before, .training-visual-item::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #e8ff47 0%, rgba(71,197,255,.9) 42%, transparent 82%);
  opacity: .55;
}

.card h2, .card h3, .metric-card h3, .session-workout-card h2 { color: #f0f0f0 !important; }
.card p, .metric-card p, .mini-panel p { color: #888888 !important; }

/* Botões: verde neon como ação, laranja nunca como CTA principal */
.btn, button, input[type='submit'], input[type='button'], .treino-view-button,
.admin-filter, .admin-tab, .center-link, a.btn, .button, .inline-action {
  background: #222222 !important;
  border: 1px solid #2a2a2a !important;
  color: #f0f0f0 !important;
  min-height: 42px !important;
  font-weight: 850 !important;
  letter-spacing: -.01em !important;
  text-decoration: none !important;
}

.btn:hover, button:hover, input[type='submit']:hover, .treino-view-button:hover,
.admin-filter:hover, .admin-tab:hover, a.btn:hover {
  background: #181818 !important;
  border-color: #e8ff47 !important;
  color: #e8ff47 !important;
  transform: none !important;
}

.btn-primary, button[type='submit'].btn-primary, .treino-view-button.active,
.admin-filter.active, .admin-tab.active, .btn.active, .btn-primary.center-link {
  background: #e8ff47 !important;
  border-color: #e8ff47 !important;
  color: #000 !important;
}

.btn-secondary, button.btn-secondary, a.btn-secondary {
  background: #222222 !important;
  border-color: #2a2a2a !important;
  color: #f0f0f0 !important;
}

.btn-danger, .button-danger, button[name*='reprovar'], button[name*='excluir'] {
  background: rgba(255,71,87,.08) !important;
  border-color: rgba(255,71,87,.45) !important;
  color: #ff9aa3 !important;
}

/* Pílulas viram etiquetas quadradas */
.pill, .badge, .day-badge, .session-meta span, .training-prescription-chips span,
.item-pill-stack span, .chip, .status-badge, .tag, .avatar-badge {
  background: #222222 !important;
  border: 1px solid #2a2a2a !important;
  color: #888888 !important;
}

.session-meta span, .training-prescription-chips span, .item-pill-stack span,
.training-prescription-chips .load, .item-pill-stack .load, .ex-load {
  color: #e8ff47 !important;
  border-color: rgba(232,255,71,.28) !important;
  background: rgba(232,255,71,.05) !important;
}

/* Laranja apenas como acento técnico de bloco, igual ao HTML */
.superset-label, .training-block-heading:not(.aquecimento) span, .finalizer-label {
  color: #ff6b35 !important;
}
.training-block-heading {
  background: rgba(255,107,53,.035) !important;
  border: 1px solid rgba(255,107,53,.18) !important;
  border-left: 3px solid #ff6b35 !important;
}
.training-block-heading.aquecimento, .warmup-block {
  background: rgba(71,197,255,.035) !important;
  border-color: rgba(71,197,255,.20) !important;
  border-left: 3px solid #47c5ff !important;
}
.warmup-title, .training-block-heading.aquecimento span, .exec-section-title,
.tech-grid-inline h4 { color: #47c5ff !important; }

/* Inputs */
input, select, textarea {
  background: #141414 !important;
  border: 1px solid #2a2a2a !important;
  color: #f0f0f0 !important;
  box-shadow: none !important;
}
input::placeholder, textarea::placeholder { color: #555555 !important; }
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: #e8ff47 !important;
  box-shadow: 0 0 0 2px rgba(232,255,71,.10) !important;
}

/* Métricas e números */
.metric-list strong, .hero-card-value, .metric-card strong, .stat-value,
.hero-number, .protocol-value, .card .big, .metric-card .value,
.metric-card h2, .metric-card .number {
  color: #e8ff47 !important;
  font-family: 'IBM Plex Sans', 'Inter', sans-serif !important;
  font-weight: 850 !important;
}

.metric-list div { border-bottom-color: #2a2a2a !important; }

/* Tabelas */
table, .series-table, .ex-table, .vol-table {
  background: #181818 !important;
  border-collapse: collapse !important;
}
.series-table-wrap, .ex-table, .vol-table, .table-wrap, .data-table-wrap {
  border: 1px solid #2a2a2a !important;
  overflow: hidden;
}
table th, .series-table th, .ex-table th, .data-table th {
  background: #222222 !important;
  color: #555555 !important;
  font-size: .68rem !important;
  font-weight: 850 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid #2a2a2a !important;
}
table td, .series-table td, .ex-table td, .data-table td {
  border-color: rgba(42,42,42,.8) !important;
  color: #f0f0f0 !important;
}

/* Treino detalhado */
.treino-view-switch {
  border-bottom: 1px solid #2a2a2a !important;
  padding-bottom: 14px !important;
  margin-bottom: 22px !important;
}
.visual-day-header, .day-header, .treino-day-head {
  background: #181818 !important;
  border-bottom: 1px solid #2a2a2a !important;
}
.day-header-icon, .warmup-num {
  background: rgba(232,255,71,.08) !important;
  border: 1px solid rgba(232,255,71,.22) !important;
  color: #e8ff47 !important;
}
.training-visual-main {
  padding: 18px 20px !important;
  border-bottom: 1px solid rgba(42,42,42,.9) !important;
}
.training-visual-title strong, .ex-name, .item-title-row strong,
.session-item-card strong { color: #f0f0f0 !important; font-weight: 850 !important; }
.training-visual-title span, .item-muscles, .ex-muscles { color: #888888 !important; font-style: italic !important; }
.training-visual-note, .callout {
  border-left: 3px solid #e8ff47 !important;
  background: rgba(232,255,71,.035) !important;
  color: #888888 !important;
}
.training-tech-details summary {
  list-style: none !important;
  background: rgba(71,197,255,.045) !important;
  border: 1px solid rgba(71,197,255,.22) !important;
  color: #47c5ff !important;
}
.training-tech-details summary::-webkit-details-marker { display: none !important; }
.tech-grid-inline section, .exec-block {
  background: #222222 !important;
  border: 1px solid #2a2a2a !important;
}
.exec-header {
  background: rgba(255,255,255,.025) !important;
  border-bottom: 1px solid #2a2a2a !important;
  color: #888888 !important;
}
.exec-text, .training-visual-note, .ex-obs { color: #888888 !important; line-height: 1.65 !important; }
.exec-text strong, .ex-obs strong { color: #f0f0f0 !important; }

/* Admin e autenticação */
.admin-container, .admin-wrap { width: min(1440px, calc(100% - 48px)) !important; max-width: none !important; }
.auth-card { width: min(460px, calc(100% - 32px)) !important; }
.auth-card h1 { font-size: clamp(2.4rem, 7vw, 3.35rem) !important; }
.success, .alert-success { background: rgba(46,213,115,.08) !important; border-color: rgba(46,213,115,.28) !important; color: #c6ffd9 !important; }
.error, .alert-error { background: rgba(255,71,87,.08) !important; border-color: rgba(255,71,87,.28) !important; color: #ffc5ca !important; }

/* Mobile: troca a barra gigante por navegação inferior real */
@media (max-width: 960px) {
  html, body { background: #0f0f0f !important; }

  .app-shell { display: block !important; padding-bottom: 92px !important; }

  .sidebar {
    position: static !important;
    height: auto !important;
    padding: 14px 16px !important;
    border-right: 0 !important;
    border-bottom: 1px solid #2a2a2a !important;
    background: #0b0b0b !important;
  }

  .sidebar-brand {
    display: flex !important;
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .logout-link { display: none !important; }

  html.has-final-mobile-nav .sidebar .tab-nav { display: none !important; }

  .main-content, .single-content .main-content {
    max-width: 100% !important;
    padding: 24px 18px 118px !important;
  }

  .topbar { display: block !important; margin-bottom: 26px !important; }
  .topbar h1 { font-size: clamp(2.55rem, 15vw, 4rem) !important; }
  .user-chip { margin-top: 18px !important; width: fit-content !important; }

  .grid.two, .grid.three, .grid.four { grid-template-columns: minmax(0, 1fr) !important; }

  .card, .metric-card, .session-workout-card, .visual-day-card,
  .day-block, .training-visual-item { padding-left: 20px !important; padding-right: 20px !important; }

  .training-visual-main, .visual-day-header, .day-header { padding: 16px !important; }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .tech-grid-inline, .visual-variable-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .admin-container, .admin-wrap { width: calc(100% - 28px) !important; }

  .mobile-tabbar-final {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(11,11,11,.98);
    border-top: 1px solid #2a2a2a;
    box-shadow: 0 -10px 30px rgba(0,0,0,.38) !important;
  }

  .mobile-tabbar-final button {
    min-height: 54px !important;
    border: 1px solid #2a2a2a !important;
    background: #181818 !important;
    color: #888888 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 6px 3px !important;
    width: 100% !important;
    font-size: .68rem !important;
    line-height: 1.05 !important;
    letter-spacing: .01em !important;
  }

  .mobile-tabbar-final button .ico { font-size: 1.05rem; line-height: 1; }
  .mobile-tabbar-final button.active {
    background: rgba(232,255,71,.10) !important;
    border-color: rgba(232,255,71,.44) !important;
    color: #e8ff47 !important;
  }

  .mobile-more-panel-final {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 9998;
    background: #181818;
    border: 1px solid #2a2a2a;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    box-shadow: 0 -20px 48px rgba(0,0,0,.55) !important;
  }

  .mobile-more-panel-final.open { display: grid; }
  .mobile-more-panel-final button,
  .mobile-more-panel-final a {
    min-height: 46px !important;
    background: #222222 !important;
    border: 1px solid #2a2a2a !important;
    color: #f0f0f0 !important;
    text-align: center !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    font-weight: 800 !important;
  }

  .mobile-more-panel-final button.active {
    background: rgba(232,255,71,.10) !important;
    color: #e8ff47 !important;
    border-color: rgba(232,255,71,.44) !important;
  }
}

@media (min-width: 961px) {
  .mobile-tabbar-final, .mobile-more-panel-final { display: none !important; }
}

@media (max-width: 520px) {
  .btn, .button-row .btn, .button-row a.btn, button, input[type='submit'] {
    justify-content: center !important;
    text-align: center !important;
  }
}
