/* 
 * Dashboard BetterHelppi - Design System
 * Tema Profissional Escuro (Dark Mode)
 */

/* ==========================================================================
   VARIÁVEIS GLOBAIS (Custom Properties)
   ========================================================================== */
:root {
  /* Paleta de Cores - Dark Mono (Monocromático Escuro Puro) */
  --bg-primary: #0A0B0E; /* Fundo principal preto carvão */
  --bg-surface: #12141A; /* Painéis e cartões monocromáticos */
  --bg-surface-hover: #181B24; /* Hover suave */
  
  --border-default: #222532; /* Bordas escuras sutis */
  --border-active: #4B5563; /* Bordas focadas neutras */
  
  --text-primary: #F9FAFB; /* Texto branco límpido */
  --text-secondary: #9CA3AF; /* Texto cinza secundário */
  --text-muted: #6B7280; /* Texto cinza escuro mutado */
  
  --accent-green: #EF4444; /* Red accent for monetary/financial values */
  --accent-green-bg: rgba(239, 68, 68, 0.1);
  
  /* Interativo/Destaques Monocromáticos (Branco / Cinza Claro) */
  --accent-mono: #F3F4F6;
  --accent-mono-bg: rgba(255, 255, 255, 0.08);
  --accent-mono-hover: rgba(255, 255, 255, 0.15);

  /* Variáveis legadas para compatibilidade sem roxo */
  --accent-indigo: #F3F4F6;
  --accent-indigo-bg: rgba(255, 255, 255, 0.08);
  
  --accent-amber: #F59E0B; /* Badge Urgente */
  --accent-amber-bg: rgba(245, 158, 11, 0.1);
  
  --accent-red: #EF4444; /* Destaques e Erros */
  --accent-red-bg: rgba(239, 68, 68, 0.1);
  
  /* Geometria */
  --radius: 8px; /* Cantos limpos e suaves */
  --radius-sm: 4px;
  
  /* Transições e Sombras */
  --transition: all 0.2s ease;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  
  /* Tipografia */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   RESET & BASE GLOBAIS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Estilo para barras de rolagem (Scrollbar) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}

/* Estilo de seleção de texto */
::selection {
  background-color: #374151;
  color: #FFFFFF;
}

/* Utilitários Gerais */
button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}
input {
  font-family: inherit;
}
a {
  color: var(--text-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--text-secondary);
}
ul, ol {
  list-style: none;
}

/* ==========================================================================
   TIPOGRAFIA & CLASSES UTILITÁRIAS
   ========================================================================== */
.text-green { color: var(--accent-red); }
.text-amber { color: var(--accent-amber); }
.text-red { color: var(--accent-red); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* SVG Icon Helper */
.svg-icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.fw-bold { font-weight: 700; }
.fw-medium { font-weight: 500; }

.hidden { display: none !important; }

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-between { justify-content: space-between; }
.flex-center { align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

/* Espaçamento utilities (Grid 8px) */
.gap-xs { gap: 4px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: var(--bg-primary);
}

.login-card {
  background-color: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 36px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}
.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

#login-form .form-group {
  margin-bottom: 20px;
}
#login-form .form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}
#login-form .form-input {
  width: 100%;
  background-color: #1A1D26;
  border: 1px solid #2D313E;
  color: #F9FAFB;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: var(--transition);
}
#login-form .form-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  outline: none;
}
#login-form .form-input::placeholder {
  color: var(--text-muted);
}

.btn-login-submit {
  width: 100%;
  background-color: var(--accent-red);
  color: #FFFFFF;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}
.btn-login-submit:hover {
  background-color: #DC2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.btn-login-submit:active {
  transform: translateY(0);
}
.btn-login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
  font-size: 0.875rem;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  text-align: center;
}

/* ==========================================================================
   DASHBOARD PRINCIPAL E LAYOUT
   ========================================================================== */
#dashboard {
  min-height: 100vh;
  padding: 16px 16px 90px 16px; /* padding confortável nas laterais para mobile */
  max-width: 600px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Ocultar elementos não ativos */
.tab-content {
  display: none;
  touch-action: pan-y;
}
.tab-content.active {
  display: block;
}

.calendar-card,
.wallet-calendar-card,
.wallet-week-selector {
  touch-action: pan-y;
}

/* ==========================================================================
   KPI CARDS (Layout de 2 Colunas Compacto e Sem Bordas)
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.kpi-card {
  background-color: var(--bg-surface);
  border: none;
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.kpi-icon {
  font-size: 1.25rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.kpi-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  flex: 1;
}

/* Card Próxima Agendada por último ocupando as 2 colunas */
.kpi-card.kpi-proxima {
  grid-column: 1 / -1;
  padding: 14px;
  background-color: var(--bg-surface);
  border: none;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
}

.kpi-proxima-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-default);
  width: 100%;
}

.kpi-proxima-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  width: 100%;
}

.proxima-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  text-align: center;
}

.proxima-row {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
}

.proxima-row strong {
  color: var(--text-primary);
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
  text-align: left;
  line-height: 1.25;
}
.kpi-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
  text-align: left;
  white-space: nowrap;
  overflow: visible;
}
.kpi-value-sm {
  font-size: 1.125rem;
}
.kpi-sublabel {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Modificadores de cor para KPIs */
.kpi-card.accent-green .kpi-value { color: var(--accent-green); }
.kpi-card.accent-indigo .kpi-value { color: var(--text-primary); }
.kpi-card.accent-amber .kpi-value { color: var(--accent-amber); }

/* ==========================================================================
   BARRA DE BUSCA E BOTÃO DE FILTROS (Mobile)
   ========================================================================== */
.search-filter-bar,
.history-search-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 2px;
}

.search-filter-bar .search-wrapper,
.history-search-section .search-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-filter-bar .search-input,
.history-search-section .search-input,
.search-input {
  width: 100%;
  background-color: #141720;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 10px 12px 10px 36px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  height: 40px;
  box-sizing: border-box;
  transition: var(--transition);
}
.search-filter-bar .search-input:focus,
.history-search-section .search-input:focus,
.search-input:focus {
  background-color: #1A1D28;
  border-color: rgba(255, 255, 255, 0.25);
  outline: none;
}
.search-filter-bar .search-icon,
.history-search-section .search-icon,
.search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.btn-filter-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #141720;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 0 14px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  transition: var(--transition);
}
.btn-filter-trigger:hover {
  background-color: #1A1D28;
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-badge {
  background-color: #EF4444;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

.btn-refresh-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  border: none;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  min-width: 40px;
  flex-shrink: 0;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
}
.btn-refresh-icon:hover {
  background-color: var(--bg-surface-hover);
}

.refresh-icon.spinning {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   MODAL / BOTTOM SHEET DE FILTROS (Mobile)
   ========================================================================== */
.filter-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.filter-modal-content {
  background-color: var(--bg-surface);
  border: none;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.8);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.filter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
}
.filter-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}
.filter-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  padding: 4px 8px;
  cursor: pointer;
}
.filter-modal-close:hover {
  color: var(--text-primary);
}

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

.filter-modal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-section-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-modal-body .filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-modal-body .filter-btn {
  padding: 10px 14px;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 500;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.filter-modal-body .filter-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}
.filter-modal-body .filter-btn.active {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #6B7280;
  color: var(--text-primary);
  font-weight: 600;
}

.date-picker-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.date-picker-icon {
  position: absolute;
  left: 10px;
  font-size: 0.875rem;
  pointer-events: none;
}
.filter-modal-body .date-input-picker {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 8px 12px 8px 32px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  height: 40px;
  color-scheme: dark;
  cursor: pointer;
}

.filter-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-default);
  display: flex;
  gap: 12px;
  background-color: var(--bg-surface);
}
.btn-clear-modal {
  flex: 1;
  height: 44px;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
}
.btn-clear-modal:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}
.btn-apply-modal {
  flex: 1.5;
  height: 44px;
  background-color: var(--text-primary);
  color: #0A0B0E;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.875rem;
}
.btn-apply-modal:hover {
  background-color: #E5E7EB;
}

/* ==========================================================================
   CARDS DE OFERTA (Offer Cards)
   ========================================================================== */
.offers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offer-card {
  background-color: #12141C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.offer-card:hover {
  background-color: #181B26;
  border-color: rgba(255, 255, 255, 0.18);
}

/* Card Modelo Helppi Oficial (Dark Mode Clean) */
.offer-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.offer-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chip-item {
  background-color: #1E222D;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #F3F4F6;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.offer-price-block, .agenda-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  line-height: 1.15;
}
.offer-price-green, .agenda-price-text {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #EF4444;
}
.offer-price-sub, .agenda-price-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 1px;
}
.offer-store-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.35;
}
.offer-role-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84375rem;
  color: var(--text-secondary);
}
.role-icon {
  font-size: 0.875rem;
}
.role-name {
  color: var(--text-secondary);
  flex: 1;
}
.offer-card-arrow {
  color: var(--text-muted);
  font-size: 1.375rem;
  font-weight: 300;
  line-height: 1;
  margin-left: auto;
  transition: var(--transition);
}
.offer-card:hover .offer-card-arrow {
  color: var(--text-secondary);
  transform: translateX(3px);
}

/* Badges */
.badges-container {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.badge {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-urgent {
  background-color: var(--accent-amber-bg);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
}
.badge-high-rate {
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}
.badge-active {
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}
.badge-expired {
  background-color: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--border-default);
}

/* ==========================================================================
   DETALHES DA OFERTA (Accordion)
   ========================================================================== */
.offer-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}
.offer-details.active {
  max-height: 600px;
  opacity: 1;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
  margin-top: 16px;
  overflow-y: auto;
}

.detail-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--border-default);
}
.detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.detail-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.requirements-block {
  background-color: var(--bg-primary);
  border-left: 3px solid var(--accent-green);
  padding: 12px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 16px;
}
.requirements-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.requirements-list li::before {
  content: "✓";
  color: var(--accent-green);
  font-weight: bold;
}

.detail-financials {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font-size: 0.875rem;
}
.fin-row {
  display: contents; /* Mantém os itens no grid */
}
.fin-label {
  color: var(--text-secondary);
}
.fin-value {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

.detail-tolerance {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.detail-address {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-primary);
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
}
.address-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
  padding-right: 16px;
}
.maps-btn {
  background-color: transparent;
  border: 1px solid var(--accent-indigo);
  color: var(--accent-indigo);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}
.maps-btn:hover {
  background-color: var(--accent-indigo-bg);
}

.detail-instructions {
  background-color: var(--bg-primary);
  padding: 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  white-space: pre-line;
  line-height: 1.6;
}

/* ==========================================================================
   TELA DE DETALHE DA OFERTA (Full-Screen Overlay)
   ========================================================================== */
.offer-detail-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-primary);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.offer-detail-screen.visible {
  transform: translateX(0);
}
.offer-detail-screen.hidden {
  display: none;
}

/* Barra de Ação Inferior (Voltar) */
.ods-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-default);
  background-color: var(--bg-surface);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.ods-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-default);
  transition: var(--transition);
  cursor: pointer;
  box-sizing: border-box;
}
.ods-back-btn:hover {
  border-color: var(--border-active);
  background-color: var(--bg-surface-hover);
}
.ods-back-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  line-height: 1;
}
.ods-back-icon .svg-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.ods-header-title {
  display: none;
}

/* Body scrollável */
.ods-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Hero block */
.ods-hero {
  margin-bottom: 16px;
  width: 100%;
}
.ods-hero-main {
  width: 100%;
}
.ods-store-name {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 6px;
  word-break: break-word;
}
.ods-role {
  font-size: 0.90625rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

/* Chips rápidos */
.ods-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.ods-chip {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Seções */
.ods-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.ods-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Linhas de detalhe */
.ods-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ods-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
}
.ods-row-label {
  color: var(--text-secondary);
}
.ods-row-value {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}
.ods-row-value.green {
  color: var(--accent-green);
}
.ods-row-divider {
  border: none;
  border-top: 1px dashed var(--border-default);
  margin: 4px 0;
}
.ods-row-total .ods-row-label,
.ods-row-total .ods-row-value {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

/* Lista de obrigatoriedades */
.ods-req-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
}
.ods-req-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.ods-req-item::before {
  content: "✓";
  color: var(--accent-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Descrição */
.ods-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-line;
}

/* Endereço */
.ods-address {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}
.ods-maps-btn {
  display: block;
  text-align: center;
  padding: 12px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}
.ods-maps-btn:hover {
  background-color: var(--bg-surface-hover);
  text-decoration: none;
  color: var(--text-primary);
}

/* ==========================================================================
   BARRA DE NAVEGAÇÃO INFERIOR (Floating Bottom Navbar)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 500px;
  background-color: rgba(18, 20, 26, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: none;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: space-between;
  z-index: 1000;
  padding: 4px 8px;
  overflow: hidden;
}

.nav-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  color: var(--text-secondary);
  border-radius: 16px;
  transition: var(--transition);
}
.nav-tab:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}
.nav-tab.active {
  color: #EF4444;
  background-color: rgba(239, 68, 68, 0.1);
  font-weight: 700;
}
.nav-icon {
  font-size: 1.25rem;
  margin-bottom: 3px;
  flex-shrink: 0;
}
.nav-tab span {
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

/* ==========================================================================
   TAB: AGENDA (#tab-agenda)
   ========================================================================== */
.epi-reminder {
  background-color: var(--accent-green-bg);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.day-column {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 12px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.day-column.today {
  border-bottom: 3px solid var(--text-primary);
  background-color: var(--bg-surface-hover);
}
.day-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.day-number {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}
.day-column.has-shift .day-number::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  background-color: var(--accent-green);
  border-radius: 50%;
  margin: 4px auto 0;
}

.shift-card {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--border-active);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.payment-info {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   TAB: CARTEIRA/WALLET (#tab-carteira)
   ========================================================================== */
.wallet-summary {
  background-color: var(--bg-surface);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
  background-image: linear-gradient(to bottom, var(--accent-green-bg), transparent);
}
.wallet-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.wallet-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 8px;
}
.wallet-pay-date {
  font-size: 0.875rem;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
}

.week-cycle {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  padding: 0 10px;
}
.week-cycle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 2px;
  background-color: var(--border-default);
  z-index: 0;
  transform: translateY(-50%);
}
.cycle-day {
  background-color: var(--bg-surface);
  border: 2px solid var(--border-default);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: bold;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.cycle-day.active {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background-color: var(--bg-primary);
}
.cycle-day.completed {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
}

.wallet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.wallet-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}

/* ==========================================================================
   TAB: MAPA (#tab-mapa)
   ========================================================================== */
#map-container {
  width: 100%;
  height: calc(100vh - 140px); /* Espaço para navbar e margens */
  background-color: var(--bg-surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  overflow: hidden;
  position: relative;
}

/* Estilos customizados para o Leaflet em modo dark */
.leaflet-container {
  background-color: var(--bg-primary) !important;
}
.leaflet-popup-content-wrapper {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border-default) !important;
  box-shadow: var(--shadow) !important;
}
.leaflet-popup-tip {
  background-color: var(--bg-surface) !important;
  border-top: 1px solid var(--border-default);
  border-left: 1px solid var(--border-default);
}
.map-pin {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--accent-green);
  padding: 4px 8px;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.map-popup-content {
  padding: 8px 4px;
}
.map-popup-content h4 {
  margin-bottom: 4px;
  font-size: 1rem;
}
.map-popup-content p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-bottom: 8px;
}
.map-popup-content .btn-view {
  background-color: #1F2937;
  color: var(--text-primary);
  border: 1px solid #374151;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  width: 100%;
  cursor: pointer;
}

/* ==========================================================================
   TAB: PERFIL (#tab-perfil)
   ========================================================================== */
.profile-card {
  background-color: var(--bg-surface);
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}
.profile-avatar {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px !important;
  min-height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 16px !important;
  border: 2px solid var(--border-active) !important;
  overflow: hidden !important;
  position: relative !important;
  flex-shrink: 0 !important;
}
.profile-avatar-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}
.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.profile-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.profile-status {
  display: inline-block;
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--accent-green);
}

.profile-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-default);
}

.profile-field {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-default);
}
.profile-field:last-child {
  border-bottom: none;
}
.field-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.field-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.uniform-sizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.size-box {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-default);
  padding: 12px;
  border-radius: var(--radius);
  text-align: center;
}
.size-box span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.size-box strong {
  font-size: 1.125rem;
  color: var(--text-primary);
}

.academy-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.academy-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 12px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.academy-item .course-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}
.academy-item .course-status {
  font-size: 0.75rem;
  color: var(--accent-green);
  background-color: var(--accent-green-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.logout-btn {
  width: 100%;
  background-color: transparent;
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 600;
  margin-top: 32px;
  transition: var(--transition);
}
.logout-btn:hover {
  background-color: var(--accent-red-bg);
}

/* ==========================================================================
   ERROR BANNER & EMPTY STATE & LOADING
   ========================================================================== */
.error-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--accent-red-bg);
  border-bottom: 2px solid var(--accent-red);
  color: var(--text-primary);
  padding: 12px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 1100;
}
.error-banner.active {
  transform: translateY(0);
}
.error-banner button {
  background-color: var(--accent-red);
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}
.empty-state-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state h3 {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.empty-state-btn {
  background-color: transparent;
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}
.empty-state-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--text-secondary);
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #12141A 25%, #181B24 50%, #12141A 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 15, 25, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(2px);
}

/* ==========================================================================
   ANIMAÇÕES (Keyframes)
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ======================================================================
   ANIMATION SYSTEM — Transições Suaves e Micro-interações
   ====================================================================== */

/* --- Tab Slide Animations (direcionais) --- */
@keyframes tabSlideInFromRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes tabSlideInFromLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Content Slide (Calendar / Wallet week) --- */
@keyframes contentSlideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes contentSlideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Card Entrance --- */
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Scale Pop-in (badges, small elements) --- */
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.7); }
  70%  { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

/* --- Number / Value fade --- */
@keyframes numberFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Gentle Glow pulse for active/live elements --- */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.18); }
  50%      { box-shadow: 0 0 14px 2px rgba(239,68,68,0.22); }
}

/* ---- Animation utility classes ---- */
.anim-slide-in-right {
  animation: tabSlideInFromRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both !important;
}
.anim-slide-in-left {
  animation: tabSlideInFromLeft 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both !important;
}
.content-slide-right {
  animation: contentSlideInRight 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.content-slide-left {
  animation: contentSlideInLeft 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.anim-pop-in {
  animation: popIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ======================================================================
   MICRO-INTERAÇÕES — Botões, Cards e Elementos Interativos
   ====================================================================== */

/* Active press feedback */
.btn-accept-offer:active,
.btn-agenda-action:active,
.cal-nav-btn:active,
.wallet-nav-btn:active,
.wallet-day-btn:active,
.nav-tab:active {
  transform: scale(0.92);
  transition: transform 0.08s ease;
}

/* Card press feedback */
.offer-card,
.agenda-shift-card,
.wallet-daily-card,
.kpi-card,
.wallet-banner-card,
.wallet-transfer-card {
  transition: transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.22s ease, opacity 0.3s ease;
}
.offer-card:active,
.agenda-shift-card:active,
.wallet-daily-card:active {
  transform: scale(0.975);
}

/* Calendar day tap feedback */
.cal-day {
  transition: background-color 0.2s ease, color 0.15s ease, transform 0.12s ease !important;
}
.cal-day:active:not(.empty) {
  transform: scale(0.85) !important;
}

/* Wallet day button tap */
.wallet-day-btn {
  transition: background-color 0.2s ease, color 0.15s ease, transform 0.12s ease, border-color 0.2s ease !important;
}
.wallet-day-btn:active {
  transform: scale(0.88);
}

/* Badge pop entrance */
.badge {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Wallet banner press */
.wallet-banner-card:active {
  transform: scale(0.98);
}

/* Calendar cards overflow hidden during animation */
.calendar-card,
.wallet-calendar-card {
  overflow: hidden;
}

/* Calendar month title as inline-block for transform support */
.calendar-month-title {
  display: inline-block;
}

/* Week range text smooth transition */
.wallet-week-range-text {
  display: inline-block;
}

/* Nav tab active indicator smooth transition */
.nav-tab {
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.12s ease !important;
}

/* Search input focus glow */
.search-input:focus {
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

/* Bottom nav entrance on page load */
@keyframes bottomNavSlideUp {
  from { transform: translateX(-50%) translateY(100%); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
.bottom-nav {
  animation: bottomNavSlideUp 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* KPI value smooth number update */
.kpi-value {
  transition: opacity 0.3s ease;
}

/* Profile avatar entrance */
.profile-avatar {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile-avatar:active {
  transform: scale(0.95);
}

/* Skeleton shimmer smoother */
.skeleton {
  animation: shimmer 1.8s ease-in-out infinite;
}

/* Refresh icon spin - smoother */
.refresh-icon.spinning svg {
  transition: transform 0.3s ease;
}

/* ==========================================================================
   RESPONSIVIDADE (Media Queries)
   ========================================================================== */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-group { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  #dashboard { padding: 16px 12px 100px 12px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { padding: 12px 10px; }
  .kpi-label { font-size: 0.75rem; margin-bottom: 4px; }
  .kpi-value { font-size: 1.25rem; }
  .kpi-value-sm { font-size: 0.9375rem !important; }
  .bottom-nav { width: 96%; bottom: 8px; }
  .nav-tab span { font-size: 0.625rem; }
  .offer-price { font-size: 1.25rem; }
  .wallet-value { font-size: 2rem; }
  .uniform-sizes { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ESTILOS COMPLEMENTARES (Classes usadas no HTML/JS)
   ========================================================================== */

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
}
.dashboard-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-avatar-img {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1px solid var(--border-active) !important;
  flex-shrink: 0 !important;
  display: block !important;
}
.header-user {
  font-size: 0.875rem;
  color: var(--text-secondary);
  background-color: var(--bg-surface);
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
}
/* Modal de Localização Obrigatória */
.location-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 11, 14, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
.location-modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}
.location-modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.location-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.location-modal-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}
.btn-gps {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-gps:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}
.btn-gps.active {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-green);
  background-color: var(--accent-green-bg);
}

/* Login Complementar */
.login-header {
  text-align: center;
  margin-bottom: 32px;
}
.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-default);
}
.login-divider span {
  padding: 0 12px;
}
.login-error {
  background-color: var(--accent-red-bg);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  margin-bottom: 12px;
}

/* Formulário */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.form-input {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: var(--transition);
}
.form-input:focus {
  border-color: var(--accent-indigo);
  outline: none;
}
.form-input::placeholder {
  color: var(--text-muted);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 16px;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background-color: var(--accent-indigo);
  color: white;
}
.btn-primary:hover {
  background-color: #4F46E5;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-outlined {
  background-color: transparent;
  border: 1px solid var(--accent-indigo);
  color: var(--accent-indigo);
}
.btn-outlined:hover {
  background-color: var(--accent-indigo-bg);
}
.btn-danger {
  background-color: transparent;
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}
.btn-danger:hover {
  background-color: var(--accent-red-bg);
}
.btn-full {
  width: 100%;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}
.btn-text {
  display: inline;
}
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent-indigo);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-refresh:hover {
  background-color: #4F46E5;
}
.btn-refresh:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Barra de Busca e Filtros Complementar */
.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  pointer-events: none;
}
.search-wrapper .search-input {
  padding-left: 36px;
}
.filter-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  width: 100%;
}

/* Offers Loading Skeleton */
.offers-loading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skeleton-card {
  height: 120px;
  border-radius: var(--radius);
}

/* Empty State Complementar */
.empty-icon {
  font-size: 3rem;
  opacity: 0.5;
  margin-bottom: 12px;
}
.empty-text {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Offer Card Layout Complementar */
.offer-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.offer-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.offer-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.offer-bairro {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 400;
}
.offer-date, .offer-location {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.offer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.offer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.offer-badges {
  display: flex;
  gap: 6px;
}
.offer-card.expanded {
  border-color: var(--accent-indigo);
}

/* Detail Row (Financeiro e Informações) */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.detail-row-total {
  border-top: 1px solid var(--border-default);
  padding-top: 10px;
  margin-top: 6px;
}
.detail-address-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* Obrigatoriedades */
.req-list {
  list-style: none;
  padding: 0;
}
.req-item {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 4px 0;
}

/* Shift Card Complementar */
.shift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.shift-company {
  font-weight: 600;
  color: var(--text-primary);
}
.shift-value {
  font-weight: 700;
}
.shift-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Wallet Stat */
.wallet-stat {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.wallet-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}
.wallet-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Section Title */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-default);
}

/* Week Cycle e Wallet History Complementar */
.week-cycle-section, .wallet-history-section {
  margin-bottom: 24px;
}
.cycle-today {
  border-color: var(--accent-indigo) !important;
  color: var(--accent-indigo) !important;
  background-color: var(--accent-indigo-bg) !important;
}
.cycle-past {
  background-color: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
  color: white !important;
}
.cycle-pay {
  background-color: var(--bg-surface);
  border: 2px solid var(--accent-green);
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 0.625rem;
  font-weight: bold;
  color: var(--accent-green);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Map Popup Complementar */
.map-pin-wrapper {
  background: transparent !important;
  border: none !important;
}
.dark-popup .leaflet-popup-content-wrapper {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius) !important;
}
.popup-role {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.popup-date {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.popup-valor {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.popup-actions {
  display: flex;
  gap: 6px;
}
.popup-btn {
  background-color: var(--accent-indigo);
  color: white !important;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none !important;
  display: inline-block;
}
.popup-btn:hover {
  background-color: #4F46E5;
  text-decoration: none !important;
}

/* Profile Complementar */
.profile-fields {
  text-align: left;
  margin-top: 20px;
}
.academy-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}
.academy-status {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.academy-status.completed {
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
}
.academy-status.pending {
  background-color: var(--accent-amber-bg);
  color: var(--accent-amber);
}

/* KPI Card Complementar */
.kpi-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kpi-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.kpi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
}
.kpi-value-sm {
  font-size: 0.875rem !important;
  font-weight: 600;
}

/* Error Banner Complementar */
.error-banner-icon {
  font-size: 1.25rem;
}
.error-banner-text {
  flex: 1;
  font-size: 0.875rem;
}
.error-banner-btn {
  background-color: var(--accent-red) !important;
  color: white !important;
  padding: 6px 14px !important;
  font-weight: 600;
}
.error-banner-close {
  background: transparent !important;
  color: var(--text-secondary) !important;
  font-size: 1.125rem;
  padding: 4px 8px !important;
  border: none !important;
}
.error-banner-close:hover {
  color: var(--text-primary) !important;
}

/* Payment e EPI */
.payment-icon, .epi-icon {
  font-size: 1.125rem;
}
.payment-text, .epi-text {
  font-size: 0.875rem;
}
.day-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Refresh spinning animation */
.spinning {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* Wallet Summary layout fix - display flex column */
.wallet-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wallet-label, .wallet-value, .wallet-pay-date {
  display: block;
}

/* ==========================================================================
   ESTILOS EXATOS DO CALENDÁRIO & CARDS DE ATENDIMENTOS AGENDADOS
   ========================================================================== */
.agenda-title-bar h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.calendar-card {
  background-color: var(--bg-surface);
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}

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

.calendar-month-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cal-nav-btn {
  background: transparent;
  border: none;
  color: #EF4444;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.cal-day {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  border-radius: 50% !important;
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: var(--transition);
  box-sizing: border-box;
}

.cal-day.empty {
  cursor: default;
}

.cal-day:hover:not(.empty) {
  background-color: var(--bg-surface-hover);
}

.cal-day.selected {
  background-color: #EF4444 !important;
  color: #FFFFFF !important;
  font-weight: 700;
  border-radius: 50% !important;
}

.cal-day.has-dot::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  background-color: #EF4444;
  border-radius: 50%;
  position: absolute;
  bottom: 2px;
}

.cal-day.selected.has-dot::after {
  background-color: #FFFFFF;
}

/* Cards da Agenda de Atendimentos */
.agenda-shift-card {
  background-color: var(--bg-surface);
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.agenda-shift-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.agenda-time-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.red-clock-icon, .red-pin-icon {
  color: #EF4444;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.agenda-price-text {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #EF4444;
}

.agenda-shift-store {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.agenda-shift-address {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding-left: 22px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.agenda-shift-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-left: 22px;
  margin-bottom: 10px;
}

.agenda-shift-rules {
  background-color: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-indigo);
  padding: 10px;
  margin-top: 10px;
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rule-item {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Botões de Ação no Card da Agenda */
.agenda-shift-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-agenda-action {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: #1F2430;
  color: #F9FAFB;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.btn-agenda-action:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: #272C3A;
  color: #FFFFFF;
  text-decoration: none;
}

/* ==================== ESTILOS DA ABA CARTEIRA (APP OFICIAL) ==================== */
.wallet-banner-card {
  background: linear-gradient(135deg, #FF4500 0%, #E50914 45%, #E60067 100%);
  border-radius: 16px;
  padding: 24px 20px;
  color: #FFFFFF;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.25);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallet-banner-label {
  font-size: 0.9375rem;
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: 0.2px;
}

.wallet-banner-value {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.wallet-banner-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.875rem;
}

.wallet-sub-label {
  opacity: 0.9;
  font-weight: 500;
}

.wallet-sub-value {
  font-weight: 700;
}

/* Lista de Ganhos Diários da Semana */
.wallet-daily-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.wallet-daily-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.9375rem;
}

.wallet-daily-date {
  color: var(--text-secondary);
  font-weight: 500;
}

.wallet-daily-val {
  color: #EF4444;
  font-weight: 700;
}

/* Seletor de Semana com Setas */
.wallet-week-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.wallet-nav-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.wallet-nav-btn:hover {
  border-color: var(--border-active);
  background-color: var(--bg-surface-hover);
}

.wallet-week-range-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Mini-Calendário Semanal */
.wallet-calendar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.wallet-calendar-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.wallet-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.wallet-day-btn {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.wallet-day-btn:hover {
  background-color: var(--bg-surface-hover);
}

.wallet-day-btn.selected {
  background-color: #E50914;
  color: #FFFFFF;
  border-radius: 8px;
}

.wallet-day-btn .day-dot {
  width: 5px;
  height: 5px;
  background-color: #E50914;
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
}

.wallet-day-btn.selected .day-dot {
  background-color: #FFFFFF;
}

/* Informação de Data Aproximada de Transferência */
.wallet-transfer-card {
  text-align: center;
  margin-bottom: 24px;
}

.wallet-transfer-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.wallet-transfer-date {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Cards de Atendimento do Dia */
.wallet-day-shifts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#proxima-ponto {
  width: 100%;
  box-sizing: border-box;
}

/* Componente de Barra de Progresso de Atendimento (Check-in/out) */
.shift-progress-box {
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 10px 0;
  margin: 6px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.spb-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.spb-planned-time {
  letter-spacing: 0.2px;
}

.spb-dur-badge {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.spb-status-text {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2px 0;
}

.spb-bar-track {
  width: 100%;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.spb-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.4s ease;
}

.spb-real-times-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0 2px;
}

/* Badges Discretos de Ponto (Entrada / Saída) */
.checkin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

/* Calendário Seletor de Datas no Modal de Filtros */
.filter-btn-all {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn-all:hover {
  background-color: var(--bg-surface-hover);
}

.filter-btn-all.active {
  background-color: #EF4444 !important;
  color: #FFFFFF !important;
  border-color: #EF4444 !important;
}

.filter-calendar-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 12px;
  margin-top: 6px;
}

.cal-day.disabled, .cal-day.no-offers {
  opacity: 0.18 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(1);
}

/* Botões de Ação do Atendimento Agendado (Tela de Detalhes - Estilo Sóbrio) */
.ods-action-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.btn-ods-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ods-action.btn-traveling {
  background-color: rgba(37, 99, 235, 0.08);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.btn-ods-action.btn-traveling:hover {
  background-color: rgba(37, 99, 235, 0.16);
  border-color: rgba(37, 99, 235, 0.35);
}

.btn-ods-action.btn-checkin {
  background-color: rgba(16, 185, 129, 0.08);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.btn-ods-action.btn-checkin:hover {
  background-color: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
}

.btn-ods-action.btn-checkout {
  background-color: rgba(245, 158, 11, 0.08);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.btn-ods-action.btn-checkout:hover {
  background-color: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.35);
}

.btn-ods-action.btn-cancel {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.8;
}

/* Modal de Desistência - Fundo Transparente Sem Bordas */
.cancel-app-modal-card {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: var(--text-primary);
  border-radius: 0;
  padding: 24px;
  max-width: 480px;
  width: 92%;
  text-align: center;
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
}

.cancel-app-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.cancel-app-modal-sub {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.cancel-app-modal-notice {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: transparent !important;
  border: none !important;
  padding: 0;
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: left;
}

.cancel-app-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-app-modal-back {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  border: none !important;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-app-modal-back:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.btn-app-modal-confirm {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  border: none !important;
  background-color: #EF4444;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-app-modal-confirm:hover {
  background-color: #DC2626;
  transform: translateY(-1px);
}
.btn-ods-action.btn-cancel:hover {
  background-color: rgba(239, 68, 68, 0.08);
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.25);
  opacity: 1;
}

@media (max-width: 480px) {
  .cancel-app-modal-card {
    padding: 16px 10px !important;
    width: 96% !important;
    max-width: 100% !important;
  }
  .cancel-app-modal-title {
    font-size: 1.125rem !important;
  }
  .cancel-app-modal-sub {
    font-size: 0.875rem !important;
  }
  .cancel-app-modal-notice {
    font-size: 0.78rem !important;
  }
}

/* ==========================================================================
   TAB: HISTÓRICO (#tab-historico)
   ========================================================================== */
.history-title-bar {
  margin-bottom: 20px;
}
.history-title-bar h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.history-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.history-filter-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg, 16px);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.history-preset-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.history-preset-btn {
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: 20px;
  padding: 8px 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.history-preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.history-preset-btn.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: #EF4444;
  color: #EF4444;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

@media (max-width: 420px) {
  .history-preset-btn {
    font-size: 0.72rem;
    padding: 7px 2px;
  }
}

.history-calendar-range-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 10px 0;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 0.78125rem;
  color: var(--text-secondary);
  text-align: center;
}

.history-calendar-range-banner .range-banner-icon {
  font-size: 0.875rem;
}

/* Histórico: dias clicáveis e seleção de período */
.history-calendar-card .cal-day {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.history-calendar-card .cal-day:hover {
  background-color: var(--bg-surface-hover);
}

.history-calendar-card .cal-day.range-start,
.history-calendar-card .cal-day.range-end {
  background-color: #EF4444 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border-radius: 50% !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.history-calendar-card .cal-day.in-range {
  background-color: rgba(239, 68, 68, 0.2) !important;
  color: #FFFFFF !important;
  border-radius: 6px !important;
}

.history-calendar-card .cal-day.has-dot::after {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  background-color: #EF4444;
  border-radius: 50%;
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.history-calendar-card .cal-day.range-start.has-dot::after,
.history-calendar-card .cal-day.range-end.has-dot::after,
.history-calendar-card .cal-day.selected.has-dot::after {
  background-color: #FFFFFF !important;
}

.history-calendar-card .cal-day.in-range.has-dot::after {
  background-color: #EF4444 !important;
}

.history-custom-range {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-default);
}

.history-date-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-date-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.history-date-input {
  background-color: var(--bg-card, #12141A);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8125rem;
  color-scheme: dark;
  outline: none;
  transition: border-color 0.2s ease;
}

.history-date-input:focus {
  border-color: #EF4444;
}

.history-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  height: 34px;
}

.history-kpi-grid {
  margin-bottom: 20px;
}

.history-potential-sub {
  display: block;
  margin-top: 3px;
  font-size: 0.6875rem;
  color: var(--text-muted, #94A3B8);
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

@media (min-width: 768px) {
  .history-kpi-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

.history-search-section {
  margin-bottom: 16px;
}

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

/* History Accordion Cards */
.history-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.history-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.history-card.expanded {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.history-card-header {
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
}

.history-card-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.history-card-store-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.history-store-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-job-date {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.history-card-pay-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.history-job-pay {
  font-size: 1.125rem;
  font-weight: 700;
  color: #EF4444;
}

.history-rate-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.history-card-punch-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.history-punch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
}

.punch-icon {
  font-size: 0.65rem;
}

.punch-icon.cin-icon {
  color: #10B981;
}

.punch-icon.cout-icon {
  color: #EF4444;
}

.punch-label {
  color: var(--text-muted);
}

.punch-val {
  color: var(--text-primary);
  font-weight: 600;
}

.history-hours-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
  color: #60A5FA;
  font-weight: 600;
}

.hours-icon {
  width: 14px;
  height: 14px;
}

.history-accordion-toggle {
  margin-left: auto;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--text-secondary);
  border-radius: 50%;
  transition: color 0.2s ease;
}

.accordion-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}

.history-card.expanded .accordion-arrow {
  transform: rotate(180deg);
  color: #EF4444;
}

.history-card-details {
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-details-divider {
  height: 1px;
  background-color: var(--border-default);
  margin-bottom: 4px;
}

.history-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-detail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-detail-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.btn-maps-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  margin-top: 4px;
  align-self: flex-start;
  transition: var(--transition);
}

.btn-maps-link:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

.history-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.breakdown-item {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.breakdown-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.breakdown-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.breakdown-item.breakdown-total {
  border-color: rgba(239, 68, 68, 0.3);
  background-color: rgba(239, 68, 68, 0.05);
}

@media (max-width: 480px) {
  .history-custom-range {
    flex-direction: column;
    align-items: stretch;
  }
  .history-date-group {
    justify-content: space-between;
  }
  .history-date-input {
    flex: 1;
  }
  .history-search-btn {
    width: 100%;
    justify-content: center;
  }
  .history-card-punch-row {
    font-size: 0.7rem;
  }
  .history-punch-badge, .history-hours-badge {
    padding: 2px 6px;
    font-size: 0.7rem;
  }
}

/* ======================================================================
   TELA DE BLOQUEIO: SERVIDOR OFFLINE
   ====================================================================== */
.offline-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 15, 29, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  animation: fadeIn 0.3s ease both;
}

.offline-screen.hidden {
  display: none !important;
}

body.is-offline {
  overflow: hidden !important;
}

.offline-card {
  background: var(--bg-surface, #1E293B);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(239, 68, 68, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: popIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.offline-icon-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #EF4444;
}

.offline-icon-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.35);
  animation: pulse 2s infinite ease-in-out;
}

.offline-svg {
  width: 36px;
  height: 36px;
}

.offline-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.offline-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #EF4444;
  box-shadow: 0 0 8px #EF4444;
  animation: pulse 1.5s infinite;
}

.offline-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #F8FAFC);
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.offline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary, #94A3B8);
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.offline-info-box {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offline-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
}

.offline-info-label {
  color: var(--text-muted, #64748B);
}

.offline-info-val {
  color: var(--text-primary, #F8FAFC);
  font-weight: 600;
}

.btn-offline-retry {
  width: 100%;
  padding: 14px 20px;
  background: #EF4444;
  color: #FFF;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.12s;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-offline-retry:hover {
  background: #DC2626;
}

.btn-offline-retry:active {
  transform: scale(0.96);
}

.btn-offline-retry.checking .retry-icon {
  animation: spin 0.8s linear infinite;
}

.offline-auto-check {
  font-size: 0.75rem;
  color: var(--text-muted, #64748B);
  margin-top: 14px;
}



