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

:root {
  --primary-color: #3b82f6; /* Modern Blue */
  --primary-dark: #2563eb;
  --secondary-color: #64748b;
  --danger-color: #ef4444;
  --success-color: #10b981;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  
  --font-family: 'Inter', sans-serif;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --primary-color: #60a5fa;
  --primary-dark: #3b82f6;
  --secondary-color: #94a3b8;
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --border-color: #334155;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(var(--card-bg-rgb), 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
}

/* Header Refactoring */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-nav h1 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}
/* =========================================================
   DRIVERPROFIT - DESIGN SYSTEM (LIGHT MODE DEFAULT & DARK MODE)
   ========================================================= */

/* --- LIGHT THEME (PADRÃO) --- */
:root, [data-theme="light"] {
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --bg-input: #F1F5F9;
  --bg-glass: rgba(255, 255, 255, 0.92);

  --border-color: #E2E8F0;
  --border-focus: #2563EB;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --profit-color: #059669;
  --profit-bg: rgba(5, 150, 105, 0.1);
  --profit-glow: rgba(5, 150, 105, 0.2);

  --cost-color: #E11D48;
  --cost-bg: rgba(225, 29, 72, 0.1);

  --warning-color: #D97706;
  --warning-bg: rgba(217, 119, 6, 0.1);

  --brand-primary: #2563EB;
  --brand-gradient: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
  --profit-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);

  --card-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --card-shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.1);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* --- DARK THEME --- */
[data-theme="dark"] {
  --bg-main: #0B0F19;
  --bg-card: #131B2E;
  --bg-card-hover: #1A243D;
  --bg-input: #0E1524;
  --bg-glass: rgba(19, 27, 46, 0.88);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3B82F6;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --profit-color: #10B981;
  --profit-bg: rgba(16, 185, 129, 0.12);
  --profit-glow: rgba(16, 185, 129, 0.25);

  --cost-color: #F43F5E;
  --cost-bg: rgba(244, 63, 94, 0.12);

  --warning-color: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.12);

  --brand-primary: #3B82F6;
  --brand-gradient: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
  --profit-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);

  --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
}

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

/* Remove as setinhas padrão (spinners) dos campos numéricos */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.app-container {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
  padding-bottom: 140px; /* INCREASED from 90px */
  transition: background-color 0.25s ease;
}

/* =========================================================
   HEADER
   ========================================================= */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #FFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.brand-subtitle {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}

.btn-icon:hover, .btn-icon:active {
  color: var(--text-primary);
  border-color: var(--brand-primary);
  background: var(--bg-card-hover);
}

/* =========================================================
   NAVIGATION BAR
   ========================================================= */

.nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 8px 8px 14px;
  z-index: 100;
  transition: all 0.25s ease;
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
}

.nav-tab i {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.nav-tab.active {
  color: var(--brand-primary);
}

.nav-tab.active i {
  transform: scale(1.12);
}

.nav-tab:hover {
  color: var(--text-primary);
}

/* =========================================================
   APP CONTENT & TABS
   ========================================================= */

.app-content {
  padding: 16px 18px;
  flex: 1;
}

.tab-content {
  /* display none removido */ bottom: 150px !important; background: blue !important; z-index: 200;
  animation: fadeIn 0.25s ease forwards;
}

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

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

.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.section-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.section-header.with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* =========================================================
   FORMS & INPUTS
   ========================================================= */

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

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

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.input-wrapper input,
.input-group input[type="date"],
.input-group input[type="number"],
.input-group input[type="text"],
.select-clean {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-main);
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

/* Garante padding adequado quando há prefixo R$ */
.input-wrapper .prefix ~ input,
.input-wrapper .prefix + input {
  padding-left: 46px !important;
  font-family: var(--font-mono);
}

/* Garante padding adequado quando há unidade à direita (km, horas) */
.input-wrapper input {
  padding-left: 14px;
  padding-right: 14px;
  font-family: var(--font-mono);
}

.input-wrapper:has(.unit) input,
.input-wrapper input:has(~ .unit) {
  padding-right: 56px !important;
}

.input-wrapper .prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 5;
  user-select: none;
}

.input-wrapper .unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 5;
  user-select: none;
}

.input-wrapper input:focus,
.input-group input:focus,
.select-clean:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: var(--bg-card);
}

.highlight-input input {
  font-size: 17px;
}

/* Fuel Selector Radio Buttons */
.fuel-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fuel-selector-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 540px) {
  .fuel-selector-4 {
    grid-template-columns: 1fr 1fr;
  }
}

.fuel-option {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  color: var(--text-secondary);
}

.fuel-option input {
  display: none;
}

.fuel-option.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 700;
}

/* Custom Toggle Card (Ar-Condicionado) */
.toggle-card-custom {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.toggle-card-custom:hover {
  border-color: var(--brand-primary);
}

.ar-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s ease;
}

.ar-icon-box.ar-off {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

/* 24h Countdown Badge */
.group-countdown-badge {
  font-size: 11px;
  font-weight: 800;
  color: #D97706;
  background: rgba(245, 158, 11, 0.15);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* =========================================================
   LIVE PREVIEW CARD (REAL-TIME PROFIT DISPLAY)
   ========================================================= */

.live-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.live-preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--profit-gradient);
}

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

.preview-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.km-rate-tag {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  color: var(--text-primary);
}

.km-rate-tag.tag-good {
  background: var(--profit-bg);
  color: var(--profit-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.km-rate-tag.tag-warn {
  background: var(--warning-bg);
  color: var(--warning-color);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.km-rate-tag.tag-bad {
  background: var(--cost-bg);
  color: var(--cost-color);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

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

.preview-metric {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-metric.total-profit {
  grid-column: 1 / -1;
  background: var(--profit-bg);
  border-color: rgba(16, 185, 129, 0.35);
  padding: 14px;
}

.metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}

.total-profit .metric-val {
  font-size: 24px;
}

.text-profit { color: var(--profit-color); }
.text-cost { color: var(--cost-color); }
.text-rate { color: var(--brand-primary); }

.preview-footer {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: var(--profit-gradient);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: white;
  font-weight: 700;
  font-size: 16px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  margin-bottom: 60px; /* FORCE SCROLL SPACE */
  z-index: 10;
  position: relative;
}

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

/* =========================================================
   BARRA DE SALVAR FIXA (sempre visível, acima do nav)
   ========================================================= */
.sticky-salvar-bar {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  padding: 10px 18px;
  z-index: 9999 !important;
  display: block !important;
  background: blue !important;
  box-sizing: border-box;
}

.sticky-salvar-bar.show {
  display: block;
}

.btn-salvar-fixo {
  width: 100%;
  background: linear-gradient(135deg, #10B981, #059669);
  border: none;
  border-radius: 14px;
  padding: 15px 20px;
  color: white;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.btn-salvar-fixo:active {
  filter: brightness(0.92);
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* =========================================================
   KPI CARDS & DASHBOARD
   ========================================================= */

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
}

.kpi-card.highlight-kpi {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--card-shadow-hover);
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.kpi-icon.profit-icon {
  background: var(--profit-bg);
  color: var(--profit-color);
}

.kpi-icon.warning-icon {
  background: var(--cost-bg);
  color: var(--cost-color);
}

.kpi-icon.info-icon {
  background: var(--warning-bg);
  color: var(--warning-color);
}

.kpi-data {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

.highlight-kpi .kpi-value {
  font-size: 24px;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Goal Progress Card */
.goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--profit-gradient);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Charts */
.charts-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--card-shadow);
}

.chart-box h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.chart-canvas-container {
  position: relative;
  height: 220px;
  width: 100%;
}

/* =========================================================
   HISTÓRICO DE TURNOS LIST
   ========================================================= */

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

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s ease;
}

.history-item:hover {
  border-color: var(--brand-primary);
}

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

.history-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-mono);
}

.hist-cell {
  display: flex;
  flex-direction: column;
}

.hist-cell span {
  font-size: 10px;
  font-family: var(--font-main);
  color: var(--text-muted);
}

.hist-cell strong {
  font-size: 12px;
  color: var(--text-primary);
}

.history-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.history-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.hist-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hist-badge-detail {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.hist-badge-detail.badge-ar-on {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-primary);
  border-color: rgba(37, 99, 235, 0.25);
}

.hist-badge-detail.badge-ar-off {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.25);
}

.hist-badge-detail.badge-hours {
  background: rgba(16, 185, 129, 0.1);
  color: var(--profit-color);
  border-color: rgba(16, 185, 129, 0.25);
}

.group-countdown-badge.badge-closed {
  color: #DC2626;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.room-closed-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-card) 100%);
  border: 2px dashed rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.room-closed-card h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--cost-color);
  display: flex;
  align-items: center;
  gap: 6px;
}

.room-closed-card p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.btn-delete-entry {
  background: none;
  border: none;
  color: var(--cost-color);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: var(--radius-sm);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-delete-entry:hover {
  opacity: 1;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
  line-height: 1.5;
}

/* =========================================================
   SIMULADORES (SUB-ABAS: CORRIDA, POSTO, IPVA)
   ========================================================= */

.sim-subtabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.sim-subtab {
  background: none;
  border: none;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.sim-subtab i {
  font-size: 18px;
}

.sim-subtab:hover {
  color: var(--brand-primary);
  background: rgba(37, 99, 235, 0.05);
}

.sim-subtab.active {
  background: var(--brand-primary);
  color: #FFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sim-subcontent {
  display: none;
  animation: fadeIn 0.25s ease;
}

.sim-subcontent.active {
  display: block;
}

/* =========================================================
   PHONE MOCKUP PREVIEW (SMARTPHONE FRAME COM OVERLAY)
   ========================================================= */

.phone-mockup-frame {
  max-width: 330px;
  margin: 0 auto;
  background: #000;
  border-radius: 36px;
  border: 10px solid #1E293B;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  height: 520px;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 18px;
  background: #1E293B;
  border-radius: 12px;
  z-index: 30;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #FFF;
  background: rgba(0, 0, 0, 0.6);
  z-index: 20;
}

.phone-map-bg {
  flex: 1;
  background: radial-gradient(circle at center, #242f3e 0%, #17263c 100%);
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9));
  background-size: 20px 20px, 100% 100%;
  position: relative;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Background Uber Incoming Offer Card */
.uber-incoming-card {
  margin-top: auto;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  color: #000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

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

.uber-tag-x {
  background: #000;
  color: #FFF;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.uber-card-price {
  font-size: 20px;
  font-weight: 900;
  color: #000;
}

.uber-card-details {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
}

.uber-accept-btn {
  background: #2563EB;
  color: #FFF;
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* =========================================================
   GIGU OVERLAY WIDGET (PADRÃO EXATO DA SCREENSHOT DO GIGU)
   ========================================================= */

.gigu-overlay-widget {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 140px;
  background: #050505;
  border-radius: 14px;
  padding: 8px 10px;
  z-index: 25;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.6);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 3.5px solid #22C55E;
}

.gigu-overlay-widget.border-good {
  border-color: #22C55E;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.35), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.gigu-overlay-widget.border-warn {
  border-color: #EAB308;
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.35), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.gigu-overlay-widget.border-bad {
  border-color: #EF4444;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.35), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.gigu-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 2px;
}

.gigu-bar {
  width: 3.5px;
  height: 15px;
  border-radius: 2px;
  margin-right: 4px;
}

.gigu-bar.bar-good {
  background: #22C55E;
}

.gigu-bar.bar-warn {
  background: #EAB308;
}

.gigu-bar.bar-bad {
  background: #EF4444;
}

.gigu-val {
  font-size: 16px;
  font-weight: 900;
  color: #FFFFFF;
  font-family: var(--font-mono);
  letter-spacing: -0.4px;
}

.gigu-unit {
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
}

.gigu-star {
  font-size: 11px;
  color: #EAB308;
  font-weight: 800;
  margin-left: 2px;
}

.gigu-divider {
  height: 1px;
  background: #262626;
  margin: 4px 0;
}

.gigu-footer-trip {
  font-size: 9.5px;
  font-weight: 700;
  color: #94A3B8;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Tema Branco / Claro do Widget */
.gigu-overlay-widget.theme-white {
  background: #FFFFFF;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.gigu-overlay-widget.theme-white .gigu-val {
  color: #0F172A;
}

.gigu-overlay-widget.theme-white .gigu-unit {
  color: #64748B;
}

.gigu-overlay-widget.theme-white .gigu-divider {
  background: #E2E8F0;
}

.gigu-overlay-widget.theme-white .gigu-footer-trip {
  color: #64748B;
}

.gigu-side-bubble {
  position: absolute;
  right: 0px;
  top: 150px;
  background: #F97316;
  color: #FFF;
  font-size: 10px;
  font-weight: 900;
  padding: 5px 8px 5px 10px;
  border-radius: 14px 0 0 14px;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
  z-index: 20;
  cursor: pointer;
}

/* =========================================================
   HUD TOGGLES & CUSTOMIZER (CHECKBOXES DE EXIBIÇÃO)
   ========================================================= */

.hud-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.hud-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.hud-toggle-card:hover {
  border-color: var(--brand-primary);
  background: rgba(37, 99, 235, 0.04);
}

.hud-toggle-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.hud-toggle-info i {
  font-size: 16px;
  color: var(--brand-primary);
}

.hud-checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

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

/* =========================================================
   COMPARADOR DE COMBUSTÍVEL & IPVA CARDS
   ========================================================= */

.comparator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--card-shadow);
}

.comparator-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.comparator-result {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.result-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-gasolina {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.badge-etanol {
  background: var(--profit-bg);
  color: var(--profit-color);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.comparator-result h3 {
  font-size: 18px;
  font-weight: 800;
}

.comparator-result p {
  font-size: 13px;
  color: var(--text-secondary);
}

.comp-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.comp-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--card-shadow);
}

.comp-box-title {
  font-size: 11px;
  color: var(--text-muted);
}

.comp-box-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.comp-box small {
  font-size: 10px;
  color: var(--text-secondary);
}

.comp-tip {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--warning-bg);
  border: 1px solid rgba(217, 119, 6, 0.25);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================
   MODAL CONFIGURAÇÕES
   ========================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--card-shadow-hover);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.config-group h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 10px;
}

.modal-section-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-section-card h4 {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.modal-section-card h4 i {
  color: var(--brand-primary);
  font-size: 16px;
}

.modal-info-box {
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.4;
}

.btn-share-whatsapp-cta {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
  width: 100%;
}

.btn-share-whatsapp-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

/* =========================================================
   FILE UPLOAD IN NOVO DIA
   ========================================================= */

.file-upload-wrapper {
  display: flex;
  flex-direction: column;
}

.file-upload-btn {
  background: var(--bg-input);
  border: 1px dashed var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-btn:hover {
  background: rgba(37, 99, 235, 0.08);
}

/* =========================================================
   DESAFIOS & RANKING EM GRUPO
   ========================================================= */

.challenge-category-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.challenge-cat-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}

.challenge-cat-tab i {
  font-size: 18px;
}

.challenge-cat-tab.active {
  background: var(--brand-primary);
  color: #FFF;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Pódio */
.podium-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 0;
}

.podium-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
}

.podium-step.rank-1 {
  order: 2;
  border-color: #F59E0B;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, var(--bg-card) 100%);
  transform: translateY(-8px);
}

.podium-step.rank-2 {
  order: 1;
  border-color: #94A3B8;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12) 0%, var(--bg-card) 100%);
}

.podium-step.rank-3 {
  order: 3;
  border-color: #D97706;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.1) 0%, var(--bg-card) 100%);
}

.podium-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
  position: relative;
}

.rank-1 .podium-avatar { border-color: #F59E0B; }
.rank-2 .podium-avatar { border-color: #94A3B8; }
.rank-3 .podium-avatar { border-color: #D97706; }

.podium-medal {
  position: absolute;
  top: -8px;
  right: -6px;
  font-size: 16px;
}

.podium-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-score {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--profit-color);
  margin: 2px 0;
}

.podium-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* Leaderboard Table */
.leaderboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 16px;
}

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

.leaderboard-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.leaderboard-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaderboard-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-primary);
  transform: translateX(2px);
}

.leaderboard-row.is-user {
  border-color: var(--brand-primary);
  background: rgba(37, 99, 235, 0.08);
}

.lead-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-position {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
}

.lead-info strong {
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lead-info span {
  font-size: 11px;
  color: var(--text-secondary);
}

.lead-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.lead-score {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--profit-color);
}

.lead-view-pill {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-primary);
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* =========================================================
   MODAL DE EXTRATO DE CORRIDAS INDIVIDUAIS
   ========================================================= */

.modal-lg {
  max-width: 520px;
  max-height: 85vh;
}

.trips-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trip-detail-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.trip-detail-card.is-contested {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.08);
}

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

.trip-detail-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.trip-detail-fare {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--profit-color);
}

.trip-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.trip-detail-rate {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-primary);
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-contest-trip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-contest-trip:hover {
  border-color: #F59E0B;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
}

.btn-contest-trip.active-contested {
  background: rgba(245, 158, 11, 0.2);
  border-color: #F59E0B;
  color: #D97706;
}

.lead-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-proof-view {
  background: none;
  border: none;
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}

.btn-proof-view:hover {
  transform: scale(1.15);
}

/* Antifraud Info Card */
.antifraud-info-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.antifraud-icon {
  font-size: 24px;
  color: var(--profit-color);
  flex-shrink: 0;
}

.antifraud-info-card strong {
  font-size: 12px;
  color: var(--profit-color);
  display: block;
}

.antifraud-info-card p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}

/* Banner de Meta da Sala */
.group-meta-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, var(--bg-card) 100%);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--card-shadow);
}

.meta-tag-mode {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-banner-info h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2px 0;
}

.meta-banner-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Painel Independente do Desafiante (Lançamento Rápido) */
.challenger-quick-card {
  background: var(--bg-card);
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
  animation: fadeIn 0.3s ease;
}

.challenger-quick-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.challenger-quick-header h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-quick-live {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-primary);
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

@media (max-width: 480px) {
  .form-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Card do Vencedor & Auditoria */
.winner-audit-card {
  background: var(--bg-card);
  border: 2px solid #F59E0B;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
}

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

.winner-badge {
  font-size: 12px;
  font-weight: 800;
  color: #F59E0B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.winner-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

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

.winner-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFF;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.winner-profile strong {
  font-size: 15px;
  color: var(--text-primary);
  display: block;
}

.winner-profile span {
  font-size: 12px;
  color: var(--text-secondary);
}

.winner-proof-box {
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  margin-bottom: 12px;
}

.winner-proof-box i {
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.winner-proof-box p {
  font-size: 12px;
  color: var(--text-secondary);
}

.winner-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-vote-approve {
  background: var(--profit-bg);
  color: var(--profit-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-vote-approve:hover {
  background: var(--profit-color);
  color: #FFF;
}

.btn-vote-contest {
  background: var(--warning-bg);
  color: var(--warning-color);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-vote-contest:hover {
  background: var(--warning-color);
  color: #FFF;
}

/* Feed de Viagens (Corrida a Corrida) */
.trips-feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-feed-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trip-feed-info strong {
  font-size: 13px;
  color: var(--text-primary);
}

.trip-feed-info span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.trip-feed-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-feed-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--profit-color);
}

.btn-request-proof {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--warning-color);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-request-proof:hover {
  border-color: var(--warning-color);
  background: var(--warning-bg);
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}

.toggle-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-item strong {
  font-size: 13px;
  color: var(--text-primary);
}

.toggle-item span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Switch styling */
.switch-input {
  display: none;
}

.switch-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.switch-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFF;
  border-radius: 50%;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

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

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-input);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--brand-primary);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--card-shadow-hover);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 300;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}
.status-badge.finished {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}
