/* Executive Dashboard CSS - Correos de Chile v2.0 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  
  --navy-header: #1F4E78;
  --navy-accent: #3B82F6;
  --slate-text: #94A3B8;
  
  --coral-alert: #EF4444;
  --coral-bg: rgba(239, 68, 68, 0.12);
  
  --warning-yellow: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.12);
  
  --emerald-ok: #10B981;
  --emerald-bg: rgba(16, 185, 129, 0.12);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: #F8FAFC;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: var(--border-hover);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0F172A;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* KPI Card Animations */
.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--navy-accent);
}

.kpi-card.alert-critical::before {
  background: var(--coral-alert);
}

.kpi-card.alert-warning::before {
  background: var(--warning-yellow);
}

.kpi-card.alert-success::before {
  background: var(--emerald-ok);
}

/* Table Hover Effects */
.table-row-interactive {
  transition: background-color 0.15s ease;
}

.table-row-interactive:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.table-row-selected {
  background-color: rgba(59, 130, 246, 0.15) !important;
  border-left: 3px solid #3B82F6;
}

/* Smart Narrative Card Styling */
.narrative-card {
  border-left: 4px solid #3B82F6;
  background: rgba(30, 41, 59, 0.9);
}

.narrative-card.critica {
  border-left-color: var(--coral-alert);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(30, 41, 59, 0.9) 100%);
}

.narrative-card.alerta {
  border-left-color: var(--warning-yellow);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(30, 41, 59, 0.9) 100%);
}

.narrative-card.informativa {
  border-left-color: var(--emerald-ok);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(30, 41, 59, 0.9) 100%);
}

/* Badge Styles */
.badge-critical {
  background-color: var(--coral-bg);
  color: var(--coral-alert);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning-yellow);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
  background-color: var(--emerald-bg);
  color: var(--emerald-ok);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Tooltip Styling */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-box {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 50;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  background: #1E293B;
  color: #F1F5F9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.825rem;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.tooltip-container:hover .tooltip-box {
  visibility: visible;
  opacity: 1;
}

/* Tab Active State */
.nav-tab-active {
  color: #3B82F6 !important;
  border-bottom: 2px solid #3B82F6 !important;
  background: rgba(59, 130, 246, 0.08);
}

/* Print Optimization */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  .no-print {
    display: none !important;
  }
  .glass-card {
    background: white !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}
