/* --- UI LIMPA E SIMPLES - SEM BAGUNÇA --- */

/* --- REMOVER TODOS OS ELEMENTOS ANTIGOS --- */
.status-bar,
.action-buttons,
.action-btn,
.search-btn,
.notification-btn,
.offline-indicator,
.sync-status,
.global-search-trigger,
.notification-toggle {
  display: none !important;
}

/* --- BOTÕES FLUTUANTES SIMPLES --- */
.floating-actions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  padding: 4px;
  text-align: center;
}

.btn-icon {
  font-size: 20px;
}

.float-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.float-btn.has-notifications {
  background: #ef4444;
}

/* --- NOTIFICAÇÕES SIMPLIFICADAS --- */
.notification-container {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.notification-container:not(.hidden) {
  transform: translateX(0);
}

/* --- BUSCA AVANÇADA SIMPLIFICADA --- */
.advanced-search-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.advanced-search-container:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.advanced-search {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* --- DASHBOARD MELHORADO --- */
.dashboard-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.dashboard-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.last-update {
  color: #6b7280;
  font-size: 0.875rem;
}

/* --- KPI CARDS RESPONSIVOS --- */
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.kpi-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease;
  min-height: 88px;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kpi-icon {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.kpi-content {
  flex: 1;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 4px;
}

/* --- GRÁFICOS RESPONSIVOS --- */
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.chart-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}

.chart-container h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
}

.chart {
  height: 200px;
  background: #f9fafb;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.875rem;
  position: relative;
}

.chart canvas {
  display: block !important;
  max-width: 100%;
  height: auto;
}

/* --- ALERTAS SIMPLIFICADOS --- */
.dashboard-alerts {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}

.dashboard-alerts h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
}

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

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  border-left: 4px solid;
}

.alert-warning {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.alert-info {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

.alert-success {
  background: #d1fae5;
  border-left-color: #10b981;
}

.alert-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.alert-warning .alert-icon {
  background: #f59e0b;
}

.alert-info .alert-icon {
  background: #3b82f6;
}

.alert-success .alert-icon {
  background: #10b981;
}

.alert-message {
  flex: 1;
  color: #1f2937;
  font-weight: 500;
}

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 16px;
  }
  
  .dashboard-kpis {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .dashboard-charts {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .kpi-card {
    padding: 16px;
  }
  
  .kpi-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
    padding: 3px;
    line-height: 1.0;
    white-space: nowrap;
    overflow: hidden;
  }
  
  .chart-container {
    padding: 16px;
  }
  
  .notification-container {
    width: 100%;
  }
  
  .floating-actions {
    bottom: 16px;
    right: 16px;
  }
  
  .float-btn {
    width: 48px;
    height: 48px;
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .dashboard-header h2 {
    font-size: 1.5rem;
  }
  
  .dashboard-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .kpi-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    min-height: auto;
    padding: 12px;
  }
  
  .kpi-icon {
    width: 56px;
    height: 56px;
    font-size: 22px;
    padding: 2px;
    line-height: 1.0;
    white-space: nowrap;
    overflow: hidden;
  }
  
  .floating-actions {
    flex-direction: row;
    gap: 8px;
  }
  
  .float-btn {
    width: 44px;
    height: 44px;
    font-size: 8px;
  }
}

/* --- EMOJIS UNIVERSAIS --- */
.kpi-icon.chickens::before { content: "chickens"; }
.kpi-icon.weight::before { content: "weight"; }
.kpi-icon.alert::before { content: "alert"; }
.kpi-icon.food::before { content: "food"; }
.kpi-icon.money::before { content: "money"; }

.btn-icon.search::before { content: "search"; }
.btn-icon.bell::before { content: "bell"; }
