/* =========================================================
   BOLÃO DO EMAGRECIMENTO — DESIGN SYSTEM & VISUAL UPGRADE
   ========================================================= */

:root {
  /* Cores Principais — Tons Esmeralda, Jade e Bem-Estar */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #10b981;
  --primary-ultralight: #ecfdf5;
  --primary-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --primary-glow: rgba(16, 185, 129, 0.35);

  --accent-rose: #f43f5e;
  --accent-rose-soft: #fff1f2;
  --accent-rose-glow: rgba(244, 63, 94, 0.25);

  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --silver: #94a3b8;
  --bronze: #b45309;

  /* Superfícies & Fundo */
  --bg-page: #0f172a;
  --bg-app: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --surface-dark-glass: rgba(15, 23, 42, 0.82);

  --border-light: rgba(226, 232, 240, 0.8);
  --border-glass: rgba(255, 255, 255, 0.3);
  --border-focus: #10b981;

  /* Tipografia */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;

  /* Sombras */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-float: 0 20px 35px -10px rgba(5, 150, 105, 0.2);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  /* Bordas Arredondadas */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Fontes */
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #09131f 0%, #064e3b 50%, #0f172a 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  overflow-x: hidden;
}

/* Container Responsivo Estilo Smartphone & Tablet Moderno */
#app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
  transition: max-width 0.25s ease;
}

@media (min-width: 768px) {
  #app-container {
    max-width: 680px; /* Mais amplitude e excelente navegabilidade no desktop */
  }
}

.hidden {
  display: none !important;
}

/* =========================================================
   1. TELA DE AUTENTICAÇÃO / LOGIN
   ========================================================= */
.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px;
  position: relative;
  background: linear-gradient(180deg, #064e3b 0%, #042f2e 100%);
  color: white;
  overflow: hidden;
}

.auth-background-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.35) 0%, rgba(5, 150, 105, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.auth-brand {
  text-align: center;
  margin-bottom: 16px;
}

.auth-logo-badge {
  font-size: 34px;
  background: rgba(255, 255, 255, 0.12);
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.15;
}

.auth-tagline {
  font-size: 0.85rem;
  color: #a7f3d0;
  margin-top: 4px;
  font-weight: 500;
}

.campaign-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin: 0 auto 20px;
  display: flex;
  width: fit-content;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.default-pass-hint {
  font-size: 0.7rem;
  color: #a7f3d0;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1.1rem;
  opacity: 0.7;
}

.input-icon-wrapper input {
  width: 100%;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 13px 44px 13px 44px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.input-icon-wrapper input:focus {
  border-color: #34d399;
  background: rgba(15, 23, 42, 0.65);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.input-icon-wrapper input::placeholder {
  color: #64748b;
}

.password-toggle-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-toggle-wrapper input {
  width: 100%;
  padding-right: 44px !important;
}

.btn-toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.15s ease;
  user-select: none;
  z-index: 2;
  color: inherit;
}

.btn-toggle-pass:hover {
  opacity: 1;
  transform: scale(1.12);
}

.btn-toggle-pass:active {
  transform: scale(0.95);
}

.auth-error-msg {
  font-size: 0.75rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: none;
}

.btn-auth-submit {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-auth-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

.btn-admin-direct-login {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #0f172a;
  border: 1px solid rgba(254, 240, 138, 0.7);
  padding: 13px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
  margin-top: 6px;
}

.btn-admin-direct-login:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.55);
}

.btn-admin-direct-login:active {
  transform: translateY(0);
}

.user-chip-btn.is-admin-chip {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  border: 1px solid #fef08a !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

/* Chips de Acesso Rápido */
.quick-access-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-access-label {
  display: block;
  font-size: 0.72rem;
  color: #cbd5e1;
  text-align: center;
  margin-bottom: 10px;
  font-weight: 600;
}

.quick-user-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.user-chip-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.user-chip-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: white;
  transform: scale(1.04);
}

.user-chip-btn.is-vip {
  background: rgba(219, 39, 119, 0.2);
  border-color: #f472b6;
  color: #fbcfe8;
}

.auth-footer-note {
  font-size: 0.68rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 18px;
  line-height: 1.4;
}

/* =========================================================
   2. APP PRINCIPAL AUTENTICADO
   ========================================================= */
.main-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

/* Header */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 14px 10px;
  position: sticky;
  top: 0;
  z-index: 45;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.user-greeting-box {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 4px 12px var(--primary-glow);
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.user-greeting {
  font-size: 0.86rem;
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-greeting strong {
  font-weight: 800;
  color: var(--primary);
}

.user-status-role {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header-icon-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.header-icon-btn:hover {
  background: var(--primary-ultralight);
  border-color: var(--primary-light);
  transform: scale(1.06);
}

/* No mobile, oculta botão redundante de regras no header (já fixo no menu inferior) */
@media (max-width: 600px) {
  #btn-open-rules {
    display: none !important;
  }
}

.header-icon-btn.cloud-sync {
  position: relative;
}

.header-icon-btn.cloud-sync.connected {
  border-color: #10b981;
  background: var(--primary-ultralight);
}

.header-icon-btn.cloud-sync.connected::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  border: 1.5px solid white;
}

.header-icon-btn.logout:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* Supabase Setup Modal Styles */
.supabase-intro-text {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 14px;
}

.supabase-guide-box {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 10px;
}

.supabase-guide-box strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 6px;
}

.supabase-guide-box ol {
  padding-left: 18px;
}

.supabase-guide-box a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

/* Banner de Métricas Vidro Verde */
.stats-glass-banner {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: white;
  box-shadow: 0 8px 20px rgba(6, 78, 59, 0.25);
  margin-bottom: 10px;
}

.stat-glass-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-highlight-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-highlight-val.text-emerald {
  color: #34d399;
}

.stat-subtext {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
  margin-top: 2px;
}

.banner-separator {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
}

.motto-strip {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sparkle {
  color: var(--gold);
}

/* Conteúdo Principal */
.app-content {
  padding: 16px;
  flex: 1;
}

.tab-view {
  display: none;
  animation: fadeInTab 0.25s ease-out;
}

.tab-view.active {
  display: block;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   3. ABA: RANKING & PÓDIO
   ========================================================= */
.ranking-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
}

.ranking-toolbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.toolbar-aux-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-weight-main-action {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  letter-spacing: -0.2px;
}

@media (min-width: 600px) {
  .ranking-toolbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .btn-weight-main-action {
    width: auto;
    border-radius: var(--radius-full);
    padding: 10px 18px;
  }
}

.switch-ui {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.switch-ui input {
  display: none;
}

.switch-slider {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 20px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--primary);
}

input:checked + .switch-slider:before {
  transform: translateX(16px);
}

.switch-caption {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-whatsapp-share {
  background: #25D366;
  color: white;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-whatsapp-share:hover {
  background: #22bf5b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.btn-whatsapp-share:active {
  transform: translateY(1px);
}

.btn-glow-primary {
  background: var(--primary-gradient);
  color: white;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 18px var(--primary-glow);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-glow-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-glow-primary:active {
  transform: translateY(1px);
}

.btn-glow-primary.full-width {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 0.95rem;
}

/* Pódio 3D dos Top 3 */
/* Pódio 3D dos Top 3 — Gamificação Visual */
.podium-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 8px;
  align-items: flex-end;
  margin: 14px 0 22px;
  padding: 16px 4px 0;
}

.podium-step {
  background: var(--surface);
  border-radius: var(--radius-md) var(--radius-md) 10px 10px;
  padding: 10px 4px 0;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.podium-step:hover {
  transform: translateY(-4px);
}

.podium-step.silver {
  order: 1;
  border-color: #cbd5e1;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.95) 0%, var(--surface) 100%);
  box-shadow: 0 10px 20px rgba(148, 163, 184, 0.15);
}

.podium-step.gold {
  order: 2;
  border-color: #fbbf24;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28), 0 0 20px rgba(251, 191, 36, 0.2);
  transform: translateY(-12px);
  z-index: 2;
}

.podium-step.gold:hover {
  transform: translateY(-16px);
}

.podium-step.bronze {
  order: 3;
  border-color: #fed7aa;
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.95) 0%, var(--surface) 100%);
  box-shadow: 0 8px 18px rgba(180, 83, 9, 0.12);
}

.podium-crown-float {
  position: absolute;
  top: -22px;
  font-size: 1.5rem;
  filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.6));
  animation: crownBounce 2.5s infinite ease-in-out;
}

@keyframes crownBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.08); }
}

.podium-badge {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 4px;
}

.podium-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-ultralight);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  position: relative;
}

.podium-step.gold .podium-circle {
  width: 56px;
  height: 56px;
  font-size: 1.35rem;
  border-color: #fbbf24;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.podium-step.silver .podium-circle {
  border-color: #94a3b8;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
}

.podium-step.bronze .podium-circle {
  border-color: #f97316;
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  color: #9a3412;
}

.podium-participant-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

.podium-pct-val {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 2px;
}

.podium-step.gold .podium-pct-val {
  color: #d97706;
  font-size: 1.05rem;
}

.podium-kg-val {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.podium-pedestal-block {
  width: 100%;
  border-radius: 6px 6px 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-top: auto;
}

.podium-step.gold .podium-pedestal-block {
  height: 52px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  font-size: 1.8rem;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.4);
}

.podium-step.silver .podium-pedestal-block {
  height: 40px;
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
  font-size: 1.5rem;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.podium-step.bronze .podium-pedestal-block {
  height: 30px;
  background: linear-gradient(180deg, #ea580c 0%, #c2410c 100%);
  font-size: 1.25rem;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

/* Board da Classificação Geral */
.ranking-board {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.board-header {
  padding: 14px 18px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.board-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
}

.board-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-ultralight);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.ranking-rows-container {
  display: flex;
  flex-direction: column;
}

.ranking-row-item {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ranking-row-item:last-child {
  border-bottom: none;
}

.ranking-row-item:hover {
  background: #f8fafc;
}

.ranking-row-item.is-me {
  background: #f0fdf4;
  border-left: 4px solid var(--primary);
}

.rank-position-col {
  width: 26px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
}

.rank-details-col {
  flex: 1;
  min-width: 0;
}

.name-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.person-name {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vip-pill {
  font-size: 0.72rem;
  background: #fdf2f8;
  color: #db2777;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.stats-line {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 6px;
}

.rank-metrics-col {
  text-align: right;
}

.pct-metric-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.pct-metric-val.negative {
  color: var(--accent-rose);
}

.kg-metric-val {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================================================
   4. ABA: MURAL DE VITÓRIAS (FEED)
   ========================================================= */
.feed-hero-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.feed-hero-text h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.feed-hero-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-feed-action {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: var(--shadow-subtle);
}

.btn-feed-action:hover {
  background: var(--primary-ultralight);
}

.feed-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-card-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.feed-header-profile {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-ultralight);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.author-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.post-timestamp {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.feed-visual-wrapper {
  width: 100%;
  height: 250px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.feed-visual-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-text-area {
  padding: 12px 16px 8px;
}

.post-caption-copy {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-main);
}

.feed-footer-reactions {
  padding: 8px 16px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #f1f5f9;
}

.btn-reaction-pill {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 5px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.btn-reaction-pill:hover {
  background: var(--primary-ultralight);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* =========================================================
   5. ABA: MEU PERFIL & EVOLUÇÃO
   ========================================================= */
.profile-header-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 6px 16px var(--primary-glow);
}

.profile-hero-meta h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
}

.profile-hero-meta p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--surface-alt);
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
}

.grid-cell-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.grid-cell-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 3px;
}

.grid-cell-value.highlight-green {
  color: var(--primary);
}

/* Card de Configurações / Senha */
.settings-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.settings-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
}

.settings-header p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  margin-bottom: 12px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-save-settings {
  background: var(--surface-alt);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  padding: 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-save-settings:hover {
  background: var(--primary-ultralight);
  border-color: var(--primary);
  color: var(--primary);
}

/* Linha do Tempo Histórica */
.history-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.history-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-entry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
}

.history-date {
  font-size: 0.8rem;
  font-weight: 700;
}

.history-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-weight-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}

/* =========================================================
   6. ABA: REGRAS & TABELA ORIGINAL
   ========================================================= */
.rules-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.rules-main-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.rule-box {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

.rule-icon-circle {
  font-size: 1.3rem;
  background: var(--primary-ultralight);
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rule-body h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.rule-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.original-table-card {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.original-table-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.original-table-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.table-img-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-subtle);
}

.table-img {
  width: 100%;
  display: block;
}

/* =========================================================
   7. BARRA DE NAVEGAÇÃO INFERIOR (MODERN FLEX DOCK)
   ========================================================= */
.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding: 0 4px env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  z-index: 95;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  transition: max-width 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 768px) {
  .bottom-tab-bar {
    max-width: 680px;
  }
}

.tab-bar-item {
  flex: 1 1 0;
  min-width: 0;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 1px 3px;
  gap: 2px;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.tab-bar-item:active {
  transform: scale(0.93);
}

/* Indicador sutil de aba ativa no topo */
.tab-bar-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-bar-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-bar-label {
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

.tab-bar-item.active {
  color: var(--primary);
}

.tab-bar-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.tab-bar-item.active .tab-bar-icon {
  transform: scale(1.15) translateY(-1px);
}

.tab-bar-item.active .tab-bar-label {
  font-weight: 800;
  color: var(--primary);
}

/* =========================================================
   8. MODAIS
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 28px;
  box-shadow: var(--shadow-modal);
  animation: slideModalUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
  .modal-dialog {
    border-radius: 24px;
    max-width: 520px;
  }
}

@keyframes slideModalUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-header-row h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-close-btn {
  background: var(--surface-alt);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-form .form-group {
  margin-bottom: 14px;
}

.modal-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.styled-select,
.styled-date-input,
.modal-form input[type="password"],
.modal-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface);
  outline: none;
}

.styled-select:focus,
.styled-date-input:focus,
.modal-form input:focus,
.modal-form textarea:focus {
  border-color: var(--border-focus);
}

.weight-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.weight-input-wrapper input {
  width: 100%;
  padding: 12px 48px 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  outline: none;
}

.weight-unit-badge {
  position: absolute;
  right: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-muted);
}

.weight-hint-text {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 5px;
}

/* Grid de Escolha de Fotos */
.photo-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.photo-choice-card {
  cursor: pointer;
}

.photo-choice-card input {
  display: none;
}

.choice-content {
  background: var(--surface-alt);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  text-align: center;
  transition: all 0.15s ease;
}

.choice-content span {
  font-size: 1.4rem;
  display: block;
  line-height: 1.2;
}

.choice-content small {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
}

.photo-choice-card input:checked + .choice-content {
  border-color: var(--primary);
  background: var(--primary-ultralight);
}

.photo-choice-card input:checked + .choice-content small {
  color: var(--primary);
}

.photo-preview-container {
  height: 120px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

.photo-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hidden-file-input {
  display: none;
}

.posting-as-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.modal-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions-row button {
  flex: 1;
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Modal Primeiro Acesso (Troca Obrigatória) */
.first-access-dialog {
  border-radius: 24px;
  margin: auto;
  width: 90%;
  max-width: 400px;
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.first-access-badge {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.first-access-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
}

/* =========================================================
   9. TOAST DE CELEBRAÇÃO & CANVAS
   ========================================================= */
.toast-card {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  width: 90%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary-light);
  box-shadow: 0 12px 35px rgba(5, 150, 105, 0.28);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 200;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-card.active {
  transform: translateX(-50%) translateY(0);
}

.toast-icon-wrap {
  font-size: 2rem;
  line-height: 1;
}

.toast-text-wrap strong {
  display: block;
  font-size: 0.95rem;
  font-family: var(--font-display);
  color: var(--text-main);
}

.toast-text-wrap p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
  width: 100vw;
  height: 100vh;
}

/* =========================================================
   10. PAINEL DE ADMINISTRAÇÃO & GESTÃO
   ========================================================= */
.auth-admin-access {
  text-align: center;
  margin-top: 14px;
}

.btn-admin-access-link {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.btn-admin-access-link:hover {
  color: #34d399;
  background: rgba(255, 255, 255, 0.08);
}

.header-icon-btn.admin:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.admin-auth-dialog {
  margin: auto;
  width: 90%;
  max-width: 380px;
  border-radius: 20px;
}

.admin-auth-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.admin-panel-dialog {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 18px 24px;
  transition: max-width 0.25s ease;
}

@media (min-width: 640px) {
  .admin-panel-dialog {
    max-width: 860px !important; /* Espaço amplo e sem aperto no desktop */
    border-radius: 24px;
    max-height: 86vh;
    padding: 26px 28px 28px;
  }
}

.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.admin-panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.admin-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding-bottom: 6px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.admin-tabs-nav::-webkit-scrollbar {
  display: none; /* Chrome, Edge, Safari — Oculta a barra cinza feia da captura */
}

@media (min-width: 640px) {
  .admin-tabs-nav {
    flex-wrap: wrap; /* Todas as abas visíveis sem corte em telas médias/grandes */
  }
}

.admin-tab-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  background: #ffffff;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.admin-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.admin-tab-content-area {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(5, 150, 105, 0.25) transparent;
}

.admin-tab-content-area::-webkit-scrollbar {
  width: 6px;
}

.admin-tab-content-area::-webkit-scrollbar-thumb {
  background: rgba(5, 150, 105, 0.25);
  border-radius: 9999px;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
  animation: fadeInTab 0.2s ease-out;
}

.admin-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-pane-header h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
}

.admin-pane-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-mini-primary {
  background: var(--primary);
  color: white;
  border: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* Cards de Participantes do Admin */
.admin-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-participant-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-card-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-card-name {
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-card-login {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.admin-card-weights {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  background: white;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.admin-card-weights span strong {
  color: var(--primary);
}

.admin-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-adm-action {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-adm-action:hover {
  background: var(--surface-alt);
  border-color: #cbd5e1;
}

.btn-adm-action.edit:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.btn-adm-action.reset:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.btn-adm-action.delete:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

/* Tabela de Pesagens do Admin */
.admin-table-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-weighin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.admin-weighin-info {
  display: flex;
  flex-direction: column;
}

.admin-weighin-name {
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-weighin-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.admin-weighin-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-weighin-val {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
}

.btn-icon-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
  padding: 4px;
  border-radius: 4px;
  transition: opacity 0.15s;
}

.btn-icon-del:hover {
  opacity: 1;
  background: #fee2e2;
}

/* Moderação de Posts do Admin */
.admin-posts-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-post-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.admin-post-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.admin-post-info {
  flex: 1;
  min-width: 0;
}

.admin-post-author {
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-post-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-form-box {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.admin-edit-dialog {
  margin: auto;
  width: 90%;
  max-width: 380px;
  border-radius: 20px;
}

/* =========================================================
   SUPERPODERES E MODO ADMINISTRADOR (ACESSO TOTAL)
   ========================================================= */

/* Botão de Acesso Direto de Admin na Tela de Login */
.btn-admin-direct-login {
  width: 100%;
  margin-top: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fef08a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-admin-direct-login:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #f59e0b;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

/* Chip Dourado de Administrador nos chips rápidos de login */
.user-chip-btn.is-admin-chip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-weight: 800;
}

.user-chip-btn.is-admin-chip:hover {
  background: #f59e0b;
  color: #0f172a;
}

/* Barra Master do Administrador (Fixada no Topo do App) */
.admin-master-bar {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  border-bottom: 2px solid #eab308;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: slideDown 0.3s ease-out;
  position: sticky;
  top: 0;
  z-index: 40;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.admin-master-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-master-tag {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-crown-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 2px 6px rgba(234, 179, 8, 0.4));
}

.admin-master-titles {
  display: flex;
  flex-direction: column;
}

.admin-master-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: #fef08a;
  text-transform: uppercase;
}

.admin-master-sub {
  font-size: 0.68rem;
  color: #a7f3d0;
  font-weight: 600;
}

.admin-master-quick-btns {
  display: flex;
  gap: 6px;
}

.btn-admin-pill-action {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-admin-pill-action:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-admin-pill-action.highlight {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0f172a;
}

.btn-admin-pill-action.highlight:hover {
  background: #fbbf24;
}

/* Seletor de Impersonate / Alternância de Identidade */
.admin-master-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-switcher-label {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
  white-space: nowrap;
}

.admin-switcher-select {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.admin-switcher-select:focus {
  border-color: #f59e0b;
}

/* Botões do Modal de Autenticação */
.admin-auth-actions-stacked {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.btn-admin-login-app {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fef08a;
  padding: 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-admin-login-app:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
}

/* Botão de Excluir Post Direto no Feed */
.btn-feed-del-post {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  border-radius: var(--radius-full);
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-feed-del-post:hover {
  background: #ef4444;
  color: white;
}

/* Ações Rápidas do Administrador em cada Linha do Ranking */
.ranking-row-admin-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(226, 232, 240, 0.8);
  width: 100%;
}

.btn-adm-mini-act {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}

.btn-adm-mini-act:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.btn-adm-mini-act.weight:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.btn-adm-mini-act.edit:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.btn-adm-mini-act.reset:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

/* Painel Executivo do Administrador na Aba Meu Perfil */
.admin-exec-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-exec-hero {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  border-radius: var(--radius-lg);
  padding: 22px;
  color: white;
  border: 2px solid rgba(234, 179, 8, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.admin-exec-hero::after {
  content: "👑";
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 6rem;
  opacity: 0.08;
  pointer-events: none;
}

.admin-exec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fef08a;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.admin-exec-hero h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.admin-exec-hero p {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.admin-metric-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-metric-card .metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.admin-metric-card .metric-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-main);
}

.admin-metric-card .metric-val.green {
  color: var(--primary);
}

.admin-metric-card .metric-val.gold {
  color: #d97706;
}

.admin-metric-card .metric-sub {
  font-size: 0.68rem;
  color: var(--text-light);
}

.admin-actions-menu-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-subtle);
}

.admin-actions-menu-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-quick-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-quick-link-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-quick-link-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateX(3px);
  box-shadow: var(--shadow-subtle);
}

.admin-quick-link-btn.primary {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.12));
  border-color: rgba(16, 185, 129, 0.3);
  color: #065f46;
}

.admin-quick-link-btn.primary:hover {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(16, 185, 129, 0.2));
  border-color: #10b981;
}

.admin-quick-link-icon-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-quick-link-icon {
  font-size: 1.1rem;
}

/* =========================================================
   CRM & CENTRAL DE CONTROLE DO BOLÃO
   ========================================================= */

/* Hero Banner do CRM */
.crm-hero-banner {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  color: white;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fef08a;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.crm-hero-text h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.crm-hero-text p {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.crm-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-crm-action {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-crm-action:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-crm-action.highlight {
  background: #10b981;
  border-color: #10b981;
  color: #064e3b;
  font-weight: 800;
}

.btn-crm-action.highlight:hover {
  background: #34d399;
  color: #064e3b;
}

/* Métricas & Funil do CRM */
.crm-metrics-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .crm-metrics-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.crm-metric-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-subtle);
}

.crm-metric-icon {
  font-size: 1.5rem;
}

.crm-metric-body {
  display: flex;
  flex-direction: column;
}

.crm-metric-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
}

.crm-metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.text-gold {
  color: #d97706;
}

.text-amber {
  color: #f59e0b;
}

/* Painel de Busca e Filtros */
.crm-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.crm-search-box {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-subtle);
}

.crm-search-icon {
  font-size: 1rem;
  opacity: 0.6;
}

.crm-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.85rem;
  outline: none;
  font-family: var(--font-body);
}

.crm-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.crm-filter-pills::-webkit-scrollbar {
  display: none;
}

.crm-filter-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.crm-filter-btn:hover {
  background: var(--surface-alt);
  color: var(--text-main);
}

.crm-filter-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fef08a;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

/* Grid de Cards de Participantes do CRM */
.crm-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .crm-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

.crm-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
  position: relative;
}

.crm-card:hover {
  box-shadow: var(--shadow-card);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.crm-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.crm-card-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.crm-user-details h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.crm-user-login-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.crm-status-pill {
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.crm-status-pill.ontrack {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.crm-status-pill.pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.crm-card-data-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--surface-alt);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.crm-data-cell .label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
}

.crm-data-cell .val {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.crm-data-cell .val.green {
  color: var(--primary);
}

.crm-data-cell .val.warning {
  color: #ea580c;
}

.crm-last-weighin-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crm-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.btn-crm-wa {
  flex: 1;
  background: #25d366;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-crm-wa:hover {
  background: #1eb956;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-crm-mini-act {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-crm-mini-act:hover {
  background: var(--surface-alt);
  border-color: #cbd5e1;
}

/* Sub-aba CRM no Modal */
.admin-crm-quick-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Destaque para aba CRM no Bottom Bar */
.tab-bar-item.is-admin-tab {
  color: #d97706;
}

.tab-bar-item.is-admin-tab.active {
  color: #b45309;
}

.tab-bar-item.is-admin-tab .tab-bar-icon {
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}

/* =========================================================
   BARRA DE PROGRESSO COLETIVO (META DA EQUIPE 50KG)
   ========================================================= */
.collective-goal-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
}

.goal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.goal-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.goal-icon {
  font-size: 1.1rem;
}

.goal-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.goal-target-badge {
  background: var(--primary-ultralight);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
}

.goal-progress-bar-bg {
  width: 100%;
  height: 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-light);
}

.goal-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669 0%, #10b981 60%, #fbbf24 100%);
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  position: relative;
}

.goal-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.7rem;
}

.goal-status-text {
  font-weight: 700;
  color: var(--primary);
}

.goal-remaining-text {
  color: var(--text-muted);
}

/* =========================================================
   BANNER DE MINI-DESAFIO SEMANAL
   ========================================================= */
.weekly-challenge-card {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.05) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
}

.challenge-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.challenge-badge-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-dismiss-challenge-card {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.btn-dismiss-challenge-card:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-main);
}

.challenge-pill {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.challenge-days-left {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.challenge-body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  transition: transform 0.15s ease;
}

.challenge-body:hover {
  transform: translateY(-1px);
}

.challenge-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-subtle);
  flex-shrink: 0;
}

.challenge-text-content h4 {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 2px;
}

.challenge-text-content p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.challenge-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  padding-top: 8px;
}

.challenge-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-open-challenge-popup-link {
  background: none;
  border: none;
  color: #d97706;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-open-challenge-popup-link:hover {
  text-decoration: underline;
}

.btn-challenge-check {
  background: var(--surface);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-challenge-check:hover {
  background: var(--primary-ultralight);
}

.btn-challenge-check.completed {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.challenge-participants-done {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Pílula Compacta do Desafio (quando descartado) */
.challenge-compact-strip {
  margin-bottom: 12px;
}

.btn-open-challenge-popup {
  width: 100%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(6, 78, 59, 0.06) 100%);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-challenge-popup:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.18);
}

.compact-strip-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.compact-challenge-cta {
  font-size: 0.68rem;
  color: #d97706;
  font-weight: 800;
}

/* Modal Popup do Desafio da Semana */
.challenge-popup-dialog {
  max-width: 420px;
  text-align: center;
}

.challenge-popup-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.challenge-popup-body {
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.challenge-popup-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

.challenge-popup-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.challenge-popup-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  max-width: 320px;
}

.challenge-popup-check-box {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.challenge-popup-stats {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================================================
   THUMB ZONE: FLOATING ACTION BUTTON (FAB)
   ========================================================= */
.fab-container {
  position: fixed;
  right: max(16px, calc(50% - 240px + 16px));
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  z-index: 98;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

@media (min-width: 768px) {
  .fab-container {
    right: calc(50% - 340px + 20px);
  }
}

.fab-main-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #f59e0b 100%);
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: white;
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.fab-main-btn:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.55);
}

.fab-main-btn:active {
  transform: scale(0.95);
}

.fab-main-btn .fab-icon-active {
  display: none;
}

.fab-container.active .fab-main-btn {
  background: #0f172a;
  border-color: #334155;
  transform: rotate(90deg);
}

.fab-container.active .fab-main-btn .fab-icon-default {
  display: none;
}

.fab-container.active .fab-main-btn .fab-icon-active {
  display: block;
}

.fab-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab-container.active .fab-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.fab-menu-item {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.fab-menu-item:hover {
  background: var(--primary-ultralight);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-4px);
}

/* Botão Wrapped no Toolbar */
.btn-wrapped-pill {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 9px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-wrapped-pill:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* =========================================================
   SISTEMA DE CONQUISTAS (BADGES)
   ========================================================= */
.badges-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  margin-top: 16px;
}

.badges-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.badges-header h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
}

.badge-count-pill {
  background: var(--primary-ultralight);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.badge-item {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.badge-item.unlocked {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(236, 253, 245, 0.9) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

.badge-item.locked {
  opacity: 0.55;
  filter: grayscale(0.8);
}

.badge-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.badge-item.unlocked .badge-icon-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24;
}

.badge-info h4 {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.badge-info p {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.mini-badges-inline {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

.mini-badge-icon {
  font-size: 0.78rem;
  cursor: help;
}

/* =========================================================
   EMPTY STATES AMIGÁVEIS
   ========================================================= */
.feed-empty-state {
  text-align: center;
  padding: 36px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-light);
  box-shadow: var(--shadow-subtle);
  margin: 10px 0;
}

.empty-icon-wrap {
  font-size: 2.8rem;
  margin-bottom: 10px;
  animation: floatEmpty 3s infinite ease-in-out;
}

@keyframes floatEmpty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.feed-empty-state h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.feed-empty-state p {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 300px;
  margin: 0 auto 16px;
  line-height: 1.4;
}

.history-empty-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface-alt);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.history-empty-hint .hint-icon {
  font-size: 1.6rem;
}

.history-empty-hint strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.history-empty-hint p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}

/* Botão Carregar Mais no Feed */
.feed-load-more-wrap {
  text-align: center;
  margin: 16px 0;
}

.btn-load-more-feed {
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
}

.btn-load-more-feed:hover {
  background: var(--primary-ultralight);
  border-color: var(--primary);
  color: var(--primary);
}

/* =========================================================
   COMPRESSÃO DE IMAGENS NO CLIENTE
   ========================================================= */
.photo-compression-status {
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #065f46;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.spinner-mini {
  display: inline-block;
  animation: pulseRotate 1s infinite alternate ease-in-out;
}

@keyframes pulseRotate {
  from { transform: scale(0.9); }
  to { transform: scale(1.15); }
}

/* =========================================================
   MODAL: SPOTIFY WRAPPED DO EMAGRECIMENTO
   ========================================================= */
.wrapped-dialog {
  max-width: 440px;
  padding: 16px;
}

.wrapped-scrollable-container {
  max-height: 70vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

.wrapped-story-card {
  background: linear-gradient(160deg, #064e3b 0%, #022c22 45%, #0f172a 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.wrapped-bg-stars {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.5;
  pointer-events: none;
}

.wrapped-story-header {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
}

.wrapped-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #34d399;
  font-weight: 800;
  margin-bottom: 4px;
}

.wrapped-main-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.wrapped-user-spot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}

.wrapped-avatar-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: #0f172a;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.5);
  margin-bottom: 8px;
}

.wrapped-user-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.wrapped-user-role {
  font-size: 0.75rem;
  color: #94a3b8;
}

.wrapped-big-metric-card {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.wrapped-metric-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: #34d399;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
}

.wrapped-metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #cbd5e1;
  margin-top: 4px;
}

.wrapped-stats-triplet {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.wrapped-stat-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
}

.wrapped-stat-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
}

.wrapped-stat-box span {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.wrapped-badges-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.wrapped-badge-pill {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.wrapped-quote-box {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  font-style: italic;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* =========================================================
   MODAL: BOLETIM SEMANAL DE IA
   ========================================================= */
.bulletin-dialog {
  max-width: 520px;
}

.bulletin-intro {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.bulletin-textarea {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.5;
  resize: vertical;
}

/* =========================================================
   MODO ESCURO (DARK MODE) COMPLETO
   ========================================================= */
[data-theme="dark"] {
  --bg-page: #030712;
  --bg-app: #0b1329;
  --surface: #131e3a;
  --surface-alt: #0d152a;
  --surface-glass: rgba(19, 30, 58, 0.94);
  --surface-dark-glass: rgba(11, 19, 41, 0.96);

  --border-light: rgba(51, 65, 85, 0.7);
  --border-glass: rgba(255, 255, 255, 0.12);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
  background: linear-gradient(135deg, #020617 0%, #062e24 50%, #030712 100%);
}

[data-theme="dark"] .app-header {
  background: var(--surface);
  border-bottom-color: var(--border-light);
}

[data-theme="dark"] .bottom-tab-bar {
  background: rgba(15, 23, 42, 0.94);
  border-top-color: rgba(51, 65, 85, 0.7);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .tab-bar-item {
  color: #94a3b8;
}

[data-theme="dark"] .tab-bar-item.active {
  color: #34d399;
}

[data-theme="dark"] .tab-bar-item.active::before {
  background: #34d399;
}

[data-theme="dark"] .tab-bar-item.active .tab-bar-label {
  color: #34d399;
}

[data-theme="dark"] .tab-bar-item.is-admin-tab {
  color: #fbbf24;
}

[data-theme="dark"] .tab-bar-item.is-admin-tab::before {
  background: #f59e0b;
}

[data-theme="dark"] .tab-bar-item.is-admin-tab.active {
  color: #fde047;
}

[data-theme="dark"] .tab-bar-item.is-admin-tab.active .tab-bar-label {
  color: #fde047;
}

[data-theme="dark"] .modal-dialog {
  background: var(--surface);
  color: var(--text-main);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .styled-select,
[data-theme="dark"] .styled-date-input,
[data-theme="dark"] .weight-input-wrapper input,
[data-theme="dark"] .crm-search-box input {
  background: #0d152a;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .ranking-row-item {
  background: var(--surface);
  border-bottom-color: var(--border-light);
}

[data-theme="dark"] .ranking-row-item:hover {
  background: #1c2b50;
}

[data-theme="dark"] .crm-card {
  background: var(--surface);
  border-color: var(--border-light);
}

[data-theme="dark"] .feed-card-item {
  background: var(--surface);
  border-color: var(--border-light);
}

[data-theme="dark"] .settings-card,
[data-theme="dark"] .history-card,
[data-theme="dark"] .rules-container,
[data-theme="dark"] .rule-box {
  background: var(--surface);
  border-color: var(--border-light);
}

[data-theme="dark"] .btn-crm-mini-act,
[data-theme="dark"] .btn-adm-mini-act,
[data-theme="dark"] .btn-load-more-feed {
  background: #1a2744;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .btn-secondary {
  background: #1a2744;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .photo-choice-card .choice-content {
  background: #0d152a;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .posting-as-chip {
  background: #0d152a;
  border-color: #334155;
}

[data-theme="dark"] .motto-strip {
  background: var(--surface-alt);
  border-color: var(--border-light);
  color: var(--text-muted);
}

/* ================= 1. BOLÔMETRO & POTE DE PREMIAÇÃO ================= */
.prize-pot-card {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.6) 0%, rgba(236, 253, 245, 0.7) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px -6px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(8px);
}

.prize-pot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.prize-pot-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prize-pot-icon {
  font-size: 1.6rem;
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.prize-pot-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.prize-pot-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.prize-pot-total-badge {
  text-align: right;
  background: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.prize-pot-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b45309;
}

.prize-pot-total-badge strong {
  font-size: 1.15rem;
  font-weight: 900;
  color: #b45309;
}

.prize-split-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.prize-split-item {
  background: white;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease;
}

.prize-split-item:hover {
  transform: translateY(-2px);
}

.prize-split-item.gold {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.prize-split-item.silver {
  border-color: rgba(148, 163, 184, 0.5);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.prize-split-item.bronze {
  border-color: rgba(217, 119, 6, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

.prize-rank-medal {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.prize-rank-amount {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-main);
}

.prize-split-item.gold .prize-rank-amount {
  color: #b45309;
  font-size: 1.05rem;
}

.prize-rank-tag {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
}

.prize-pot-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px dashed rgba(245, 158, 11, 0.3);
  padding-top: 8px;
}

/* ================= 2. GRÁFICO DE EVOLUÇÃO SVG ================= */
.chart-evolution-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.chart-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-icon {
  font-size: 1.4rem;
  background: rgba(16, 185, 129, 0.12);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.chart-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}

.chart-trend-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.chart-svg-container {
  width: 100%;
  height: 190px;
  position: relative;
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chart-svg-container svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
}

.chart-empty-state span {
  font-size: 2rem;
  display: block;
  margin-bottom: 6px;
}

.chart-empty-state p {
  font-size: 0.8rem;
  margin: 0;
  max-width: 320px;
}

.chart-tooltip-text {
  font-size: 11px;
  font-weight: 800;
  fill: var(--text-main);
  text-anchor: middle;
}

.chart-axis-label {
  font-size: 10px;
  font-weight: 600;
  fill: var(--text-muted);
  text-anchor: middle;
}

/* ================= 3. EXPORTAR STORY PNG ================= */
.btn-export-story-img {
  background: linear-gradient(135deg, #e1306c 0%, #fd1d1d 50%, #f77737 100%);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px -4px rgba(225, 48, 108, 0.4);
  transition: all 0.2s ease;
}

.btn-export-story-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(225, 48, 108, 0.5);
}

.btn-export-story-img:active {
  transform: translateY(0);
}

/* ================= 4. NOTIFICAÇÕES PUSH ================= */
.header-icon-btn.notifications.active {
  background: #ecfdf5;
  border-color: #10b981;
  color: #059669;
  position: relative;
}

.header-icon-btn.notifications.active::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

/* ================= DARK MODE OVERRIDES ================= */
[data-theme="dark"] .prize-pot-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.7) 0%, rgba(6, 78, 59, 0.4) 100%);
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .prize-pot-icon {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .prize-pot-total-badge {
  background: #1e293b;
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .prize-split-item {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .prize-split-item.gold {
  background: linear-gradient(180deg, #1e293b 0%, #292524 100%);
  border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .prize-split-item.silver {
  background: linear-gradient(180deg, #1e293b 0%, #1e293b 100%);
}

[data-theme="dark"] .prize-split-item.bronze {
  background: linear-gradient(180deg, #1e293b 0%, #292524 100%);
}

[data-theme="dark"] .chart-evolution-card {
  background: var(--surface);
  border-color: var(--border-light);
}

[data-theme="dark"] .chart-svg-container {
  background: #090e1a;
}

[data-theme="dark"] .chart-tooltip-text {
  fill: #f8fafc;
}

[data-theme="dark"] .chart-axis-label {
  fill: #94a3b8;
}

[data-theme="dark"] .header-icon-btn.notifications.active {
  background: #064e3b;
  border-color: #10b981;
  color: #34d499;
}

/* =========================================================
   SUPRESSÃO DE ELEMENTOS INVASIVOS EXTERNOS (NETLIFY BADGE / DRAWER)
   Impede que badges flutuantes cubram ou obstruam a barra de navegação
   ========================================================= */
[data-netlify-badge],
[data-netlify-drawer],
[data-netlify-feedback],
.netlify-badge,
#netlify-badge,
iframe[title*="Netlify" i],
iframe[src*="netlify" i],
div[class*="netlify-badge" i],
div[id*="netlify-drawer" i],
div[class*="netlify-drawer" i],
div[data-testid*="netlify" i],
.netlify-feedback-button,
netlify-drawer {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  z-index: -9999 !important;
}

/* =========================================================
   SISTEMA DE VERSÃO E ATUALIZAÇÕES DO APP (PWA v6.1)
   ========================================================= */

/* Banner Flutuante de Atualização */
.app-update-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
  animation: slideDownBanner 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownBanner {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.update-banner-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.update-banner-icon {
  font-size: 1.1rem;
}

.btn-update-banner-action {
  background: white;
  color: #065f46;
  border: none;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.btn-update-banner-action:active {
  transform: scale(0.95);
}

/* Versão na Tela de Login */
.auth-version-row {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-light);
}

.app-version-pill-text {
  color: var(--primary);
  background: var(--primary-ultralight);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

/* Card de Versão e Diagnóstico no Perfil */
.system-info-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  box-shadow: var(--shadow-subtle);
  transition: all 0.25s ease;
}

.system-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.system-version-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.system-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.system-version-label {
  font-size: 0.75rem;
  color: #065f46;
  font-weight: 600;
}

.system-version-label strong {
  font-weight: 800;
  color: #047857;
}

.system-build-tag {
  font-size: 0.68rem;
  color: var(--text-light);
  font-weight: 600;
}

.system-info-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 14px 0;
}

.system-actions-row {
  display: flex;
  width: 100%;
}

.btn-system-refresh {
  width: 100%;
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-system-refresh:hover {
  background: var(--primary-ultralight);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-system-refresh:active {
  transform: scale(0.98);
}

.refresh-spin-icon {
  font-size: 0.95rem;
  transition: transform 0.4s ease;
}

.btn-system-refresh:active .refresh-spin-icon {
  transform: rotate(180deg);
}

/* Rodapé de Regras */
.rules-version-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-light);
  padding: 12px;
  border-top: 1px dashed var(--border-light);
}

.rules-version-footer strong {
  color: var(--primary);
}

/* Tag no Admin Modal */
.admin-version-tag {
  font-size: 0.65rem;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 800;
  vertical-align: middle;
  margin-left: 6px;
}

/* Adaptações Dark Mode */
[data-theme="dark"] .system-version-pill {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
}

[data-theme="dark"] .system-version-label {
  color: #34d399;
}

[data-theme="dark"] .system-version-label strong {
  color: #6ee7b7;
}

[data-theme="dark"] .btn-system-refresh {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .btn-system-refresh:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #34d399;
}

[data-theme="dark"] .auth-version-row strong {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

[data-theme="dark"] .admin-version-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.4);
}

