/* ============================================
   AGROTECH MVP - MODERNIZADO 2026
   Metodología de Sistemas II - UTN
   ============================================ */

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

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Colores primarios - Paleta Agrícola */
  --primary-50:  #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;
  --primary-900: #064e3b;

  /* Colores financieros */
  --finance-500: #3b82f6;
  --finance-600: #2563eb;
  --finance-700: #1d4ed8;

  /* Alertas */
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --success-500: #22c55e;

  /* Neutros */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Superficies */
  --bg-body: #f0f4f0;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.65);
  --border-glass: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --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-glow: 0 0 20px rgba(16, 185, 129, 0.15);

  /* Texto */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  /* Bordes */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MODO OSCURO ===== */
[data-theme="dark"] {
  --bg-body: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(30, 41, 59, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-800: #e2e8f0;
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition: background var(--transition-base);
  overflow-x: hidden;
}

/* ===== CONTENEDOR MÓVIL ===== */
.mobile-container {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  max-height: 100vh;
  background: var(--bg-body);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 440px) {
  .mobile-container {
    max-height: 900px;
    min-height: 800px;
    border-radius: 32px;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.05);
    border: 1px solid var(--border-glass);
  }
  body { background: linear-gradient(135deg, #e0e7e0 0%, #d1ddd1 50%, #c8d5c8 100%); }
  [data-theme="dark"] body { background: linear-gradient(135deg, #0f172a 0%, #1a1f2e 50%, #0f172a 100%); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

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

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

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

@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }
.animate-slide-in { animation: slideInRight 0.4s ease-out forwards; }
.animate-pulse-glow { animation: pulse-glow 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-spin-slow { animation: spin-slow 8s linear infinite; }

.stagger-1 { animation-delay: 0.05s; opacity: 0; }
.stagger-2 { animation-delay: 0.1s; opacity: 0; }
.stagger-3 { animation-delay: 0.15s; opacity: 0; }
.stagger-4 { animation-delay: 0.2s; opacity: 0; }
.stagger-5 { animation-delay: 0.25s; opacity: 0; }
.stagger-6 { animation-delay: 0.3s; opacity: 0; }

/* ===== GLASSMORPHISM ===== */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-glass);
}

.glass-strong {
  background: var(--bg-card);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--border-glass);
}

/* ===== HEADER ===== */
.app-header {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  padding: 24px 20px 32px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -10%;
  width: 120%;
  height: 60px;
  background: var(--bg-body);
  border-radius: 50% 50% 0 0;
}

.header-content {
  position: relative;
  z-index: 1;
}

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

.header-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.header-badge {
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.2);
}

.header-badge:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.05);
}

/* ===== TARJETAS ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-elevated {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
}

.card-elevated::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.card-danger {
  background: linear-gradient(135deg, var(--danger-500) 0%, var(--danger-600) 100%);
  color: white;
  border: none;
}

.card-warning {
  background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
  color: white;
  border: none;
}

.card-finance {
  background: linear-gradient(135deg, var(--finance-600) 0%, var(--finance-700) 100%);
  color: white;
  border: none;
}

.card-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
  margin-bottom: 4px;
}

.card-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-icon {
  font-size: 2rem;
  opacity: 0.9;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* ===== ALERTAS ===== */
.alert {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fadeInUp 0.4s ease-out;
  border-left: 4px solid transparent;
}

.alert-danger {
  background: linear-gradient(90deg, rgba(239,68,68,0.1) 0%, rgba(239,68,68,0.05) 100%);
  border-left-color: var(--danger-500);
}

.alert-warning {
  background: linear-gradient(90deg, rgba(245,158,11,0.1) 0%, rgba(245,158,11,0.05) 100%);
  border-left-color: var(--warning-500);
}

.alert-success {
  background: linear-gradient(90deg, rgba(34,197,94,0.1) 0%, rgba(34,197,94,0.05) 100%);
  border-left-color: var(--success-500);
}

.alert-info {
  background: linear-gradient(90deg, rgba(59,130,246,0.1) 0%, rgba(59,130,246,0.05) 100%);
  border-left-color: var(--finance-500);
}

.alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content h4 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.alert-content p {
  font-size: 0.7rem;
  line-height: 1.5;
  opacity: 0.85;
}

/* ===== BOTONES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.btn-finance {
  background: linear-gradient(135deg, var(--finance-600) 0%, var(--finance-700) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-finance:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-500) 0%, var(--danger-600) 100%);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.btn-sm { padding: 8px 14px; font-size: 0.75rem; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ===== BOTONES DE ACCIÓN RÁPIDA ===== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.action-btn .action-icon {
  font-size: 1.5rem;
  transition: transform var(--transition-fast);
}

.action-btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-300);
}

.action-btn:hover .action-icon {
  transform: scale(1.15);
}

.action-btn-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: white;
  border: none;
}

.action-btn-finance {
  background: linear-gradient(135deg, var(--finance-500) 0%, var(--finance-600) 100%);
  color: white;
  border: none;
}

.action-btn-dark {
  background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
  color: white;
  border: none;
}

/* ===== FORMULARIOS ===== */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.form-input, .form-select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ===== CHIPS / CONCEPTOS ===== */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.chip {
  padding: 10px 8px;
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
  background: var(--bg-card);
  text-align: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  user-select: none;
}

.chip:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--primary-700);
}

.chip.active {
  border-color: var(--primary-500);
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  color: var(--primary-800);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* ===== SECCIONES ===== */
.section-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary-500) 0%, var(--primary-700) 100%);
  border-radius: 2px;
}

/* ===== LISTAS / ITEMS ===== */
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.list-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.list-item-name {
  font-size: 0.8rem;
  font-weight: 700;
}

.list-item-value {
  font-size: 0.9rem;
  font-weight: 800;
}

/* ===== BARRAS DE PROGRESO ===== */
.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease-out;
}

/* ===== TOAST / NOTIFICACIONES ===== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  animation: fadeInUp 0.3s ease-out;
  pointer-events: all;
  min-width: 280px;
}

.toast-success { border-left: 4px solid var(--success-500); }
.toast-error { border-left: 4px solid var(--danger-500); }
.toast-warning { border-left: 4px solid var(--warning-500); }
.toast-info { border-left: 4px solid var(--finance-500); }

/* ===== SWITCH TOGGLE ===== */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--gray-300);
  border-radius: 13px;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.toggle-switch.active {
  background: var(--primary-500);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch.active::after {
  transform: translateX(22px);
}

/* ===== CHECKBOX CUSTOM ===== */
.checkbox-custom {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 2px solid var(--gray-200);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checkbox-custom:hover {
  border-color: var(--primary-300);
}

.checkbox-custom input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary-600);
  cursor: pointer;
}

.checkbox-custom.checked {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

/* ===== LOADING ===== */
.loading-shimmer {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  animation: spin-slow 0.8s linear infinite;
}

/* ===== NAVBAR INFERIOR ===== */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  position: sticky;
  bottom: 0;
  z-index: 50;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  padding: 4px 12px;
  border-radius: var(--radius-md);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--primary-600);
}

.bottom-nav-item .nav-icon {
  font-size: 1.25rem;
  transition: transform var(--transition-fast);
}

.bottom-nav-item:hover .nav-icon,
.bottom-nav-item.active .nav-icon {
  transform: scale(1.1);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--gray-300);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* ===== UTILIDADES ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.text-center { text-align: center; }
.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.8rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.flex-1 { flex: 1; }
.min-h-0 { min-height: 0; }

/* Scroll area */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 100px;
}

/* Chart container */
.chart-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 12px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-ok { background: rgba(34,197,94,0.1); color: var(--success-500); }
.status-ok::before { background: var(--success-500); }
.status-warn { background: rgba(245,158,11,0.1); color: var(--warning-600); }
.status-warn::before { background: var(--warning-500); }
.status-danger { background: rgba(239,68,68,0.1); color: var(--danger-500); }
.status-danger::before { background: var(--danger-500); }

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
  margin: 16px 0;
}

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

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 0.75rem;
}

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--gray-800);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}
