/* Variáveis CSS modernas e profissionais */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  
  /* Variáveis para compatibilidade com novos módulos */
  --bg-primary: var(--bg);
  --bg-secondary: var(--bg-secondary);
  --text-primary: var(--text);
  --text-secondary: var(--text-light);
  --border-color: var(--border);
  --bg-hover: var(--border-light);
  
  /* Gradientes profissionais */
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  --gradient-secondary: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  --gradient-accent: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
  --gradient-header: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  --gradient-nav: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --gradient-button: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --gradient-button-hover: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-error: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-info: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  
  --bg: #f8fafc;
  --bg-secondary: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-colored: 0 10px 30px -5px rgba(37, 99, 235, 0.3);
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  
  --danger: #ef4444;
  /* Cores antigas mantidas para compatibilidade */
  --verde: #2563eb;
  --marrom: #f59e0b;
  --bege: #fef3c7;
  --texto: #1e293b;
  --bg2: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Header profissional e moderno */
.app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-header);
  color: #ffffff;
  padding: 16px 20px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  min-height: 64px;
  width: 100%;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.brand-icon {
  font-size: 36px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

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

/* Material Icons styling */
.material-icons {
  font-size: 24px !important;
  vertical-align: middle;
}

/* Larger icons for buttons */
.btn .material-icons,
.nav-btn .material-icons {
  font-size: 20px !important;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  color: #ffffff;
}

.header-actions {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.menu-toggle {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 24px;
  display: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.menu-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.menu-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.offline-indicator {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-error);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: 1;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: var(--shadow-lg); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.1); }
}

.offline-icon {
  font-size: 16px;
}

.offline-text {
  white-space: nowrap;
}

/* Navegação moderna e profissional */
.app-nav {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: var(--gradient-nav);
  position: sticky;
  top: 64px;
  z-index: 99;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-top: 0;
  width: 100%;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  flex: 0 0 auto;
  min-width: 120px;
  padding: 12px 20px;
  font-size: 1.1rem;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  color: var(--primary-dark);
}

.nav-btn.active {
  background: var(--gradient-button) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-colored);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

.nav-btn.active:hover {
  background: var(--gradient-button-hover) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.nav-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Main content */
main {
  padding: 24px 20px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
  position: relative;
  z-index: 1;
}

.view {
  display: none;
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
  display: block;
}

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

/* Títulos modernos */
h1 {
  margin: 0 0 24px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.75px;
  line-height: 1.2;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  line-height: 1.3;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* Cards profissionais */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.list {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

/* Labels e inputs */
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
}

input, select, textarea {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  color: var(--text);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--primary-light);
}

input:invalid {
  border-color: #ef4444;
}

input:invalid:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

input.error, select.error, textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.error-message::before {
  content: '⚠';
  font-size: 1.125rem;
}

textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

/* Botões profissionais */
.btn {
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9375rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
  border: 2px solid transparent;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn.primary {
  background: var(--gradient-button);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn.primary:hover {
  background: var(--gradient-button-hover);
  box-shadow: var(--shadow-colored);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn:not(.primary) {
  background: var(--bg-secondary);
  color: var(--primary);
  border: 2px solid var(--border);
}

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

/* Grid */
.grid.two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.summary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Grid de cards */
.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.tile {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tile-icon {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--gradient-nav);
  margin-bottom: 16px;
}

.tile-emoji {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tile-title {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.tile-sub {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
}

.table th {
  background: var(--gradient-nav);
  color: var(--primary);
  font-weight: 700;
  padding: 16px;
  text-align: left;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s ease;
}

.table tbody tr:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

/* Toast moderno */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 12px;
  z-index: 10000;
  pointer-events: none;
  max-width: 480px;
  width: calc(100% - 40px);
}

.toast {
  background: var(--bg-secondary);
  border: 0;
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  font-size: 0.9375rem;
  line-height: 1.5;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.toast-success {
  border-left-color: #10b981;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.toast.toast-error {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
}

.toast.toast-warning {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.toast.toast-info {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

/* Drawer profissional */
.drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1001;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.drawer.hidden {
  display: none !important;
}

.drawer-body {
  width: 85%;
  max-width: 400px;
  height: 100%;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-2xl);
  padding: 24px;
  animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.drawer-title {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.drawer-close {
  border: 0;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Estilos para linhas interativas da tabela de animais */
.animal-row {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.animal-row:hover {
  background-color: var(--bg-secondary) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.animal-row:active {
  background-color: var(--primary-light) !important;
  transform: translateY(0px);
}

.animal-row td {
  position: relative;
}

.animal-row:hover::after {
  content: "👁️ Ver detalhes";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  opacity: 0.8;
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 10;
}

.animal-row:hover::after {
  opacity: 1;
}

/* Estilo especial para o prefixo destacado */
.animal-row td:first-child strong {
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 0.95em;
  display: inline-block;
  line-height: 1.2;
}

/* Estilo para o modal de detalhes */
#modal-animal-numero {
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 1.1em;
  color: var(--primary);
}

/* Foco para acessibilidade */
.animal-row:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  background-color: var(--primary-light) !important;
}

/* Animação de carregamento para a tabela */
.table {
  animation: fadeInTable 0.3s ease-in;
}

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

/* Regras de impressão para relatórios individuais */
@media print {
  /* Oculta interface do app e botões de ação */
  .app-header, .app-nav, .subnav, button, #admin-login-btn { 
    display: none !important; 
  }
  
  /* Quebra o grid para o relatório ocupar a folha toda */
  #view-relatorios > .grid.two { 
    display: block !important; 
  }
  
  /* Lógica de ocultação condicional baseada na classe do body */
  body.print-animais #card-relatorio-financeiro { 
    display: none !important; 
  }
  
  body.print-financeiro #card-relatorio-animais { 
    display: none !important; 
  }
  
  /* Garante que o relatório visível ocupe 100% da largura */
  #card-relatorio-animais, #card-relatorio-financeiro {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Oculta elementos desnecessários na impressão */
  .nav, .drawer, .btn, .modal, .loading-overlay, .toast-container, .auth-modal, .admin-menu-modal, .confirm-modal, .animal-details-modal {
    display: none !important;
  }
  
  /* Ajusta layout da página */
  body {
    margin: 0;
    padding: 10mm;
    font-size: 12px;
  }
  
  /* Diminuir fonte da tabela */
  .table {
    font-size: 10px;
  }
  
  .table th, .table td {
    padding: 4px 6px;
  }
  
  /* Evitar quebras de linha na tabela */
  .table tr {
    page-break-inside: avoid;
  }
  
  /* Ajustar cabeçalhos e títulos */
  h1, h2, h3 {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  /* Espaçamentos menores */
  .space {
    height: 10px;
  }
  
  .card {
    margin-bottom: 10px;
    padding: 10px;
  }
  
  .row {
    margin-bottom: 5px;
  }
  
  .pill {
    font-size: 10px;
    padding: 4px 8px;
    font-weight: bold;
    line-height: 1;
  }
}

.drawer-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
}

.drawer-close:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mobile-nav {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  width: 64px;
  height: 64px;
  border: 5px solid rgba(37, 99, 235, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}

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

.loading-text {
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}

/* Estilos de modal estão em components.css */

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-button-hover);
}

/* Utilitários de visibilidade */
.hidden {
  display: none !important;
}

/* Botão Admin */
#admin-login-btn {
  display: inline-flex;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 10px;
  height: 28px;
  min-width: 60px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

#admin-login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

#admin-login-btn:hover::before {
  left: 100%;
}

#admin-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

#admin-login-btn:active {
  transform: translateY(0) scale(0.98);
}

#admin-login-btn.hidden {
  display: none !important;
}

/* Botão Auth (Entrar/Sair) */
#auth-toggle-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 10px;
  height: 28px;
  min-width: 50px;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

#auth-toggle-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

#auth-toggle-btn:hover::before {
  left: 100%;
}

#auth-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

#auth-toggle-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Nome do usuário */
#user-display-name {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  color: #ffffff;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  transition: all 0.3s ease;
}

#user-display-name:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* Subviews navigation */
.subview {
  display: none;
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.subview.active {
  display: block;
}

/* Classes dedicadas para cores dos KPIs do Dashboard */
.bg-kpi-peso { background-color: #dcfce7 !important; color: #059669 !important; }
.bg-kpi-mort { background-color: #fee2e2 !important; color: #dc2626 !important; }
.bg-kpi-conv { background-color: #ffedd5 !important; color: #ea580c !important; }
.bg-kpi-valor { background-color: #d1fae5 !important; color: #047857 !important; }
