/* ==========================================================================
   lineasat.cl - Plataforma de Extracción de Variables Climáticas y Ambientales
   Cumplimiento Normativo CEN / NTSyCS / IEEE 738 / IEC 60826
   © 2026 Desarrollado por repositorIA
   ========================================================================== */

:root {
  --bg-primary: #0b1320;
  --bg-secondary: #111e33;
  --bg-card: #162642;
  --bg-card-hover: #1c3054;
  --border-color: #243b61;
  --border-focus: #38bdf8;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #38bdf8;
  --accent-blue: #2563eb;
  --accent-teal: #14b8a6;
  --accent-green: #22c55e;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --critical-bg: rgba(34, 197, 94, 0.15);
  --critical-border: #22c55e;
  --critical-text: #4ade80;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background-color: rgba(17, 30, 51, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-title span {
  color: var(--accent-cyan);
}

.brand-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.norm-badge {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Main Layout */
.app-container {
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  padding: 20px 24px;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1200px) {
  .app-container {
    grid-template-columns: 1fr;
  }
}

/* Sidebar & Controls */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tab selector */
.mode-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}

.mode-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.mode-tab.active {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

/* File Drop Area */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px 16px;
  text-align: center;
  background: rgba(11, 19, 32, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}

.dropzone-icon {
  font-size: 28px;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.dropzone-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.dropzone-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Sample line loader */
.sample-btn-box {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.btn-secondary {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
}

/* Manual Coordinates Form */
.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-input, .form-select {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
}

.coords-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Parameters Panel */
.param-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.param-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
}

.param-input-sm {
  width: 90px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 6px 8px;
  font-size: 0.82rem;
  text-align: right;
  font-family: var(--font-mono);
}

/* Action Button */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Main Display Area */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Top KPI Bar */
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.kpi-icon.len { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.kpi-icon.alt { background: rgba(20, 184, 166, 0.15); color: var(--accent-teal); }
.kpi-icon.wind { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.kpi-icon.temp { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.kpi-info {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.kpi-value span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Map Container */
.map-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.map-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.map-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.start { background: #22c55e; }
.legend-dot.mid { background: #f59e0b; }
.legend-dot.end { background: #ef4444; }

#map {
  height: 380px;
  width: 100%;
  background: #0f172a;
}

/* Comparative Table Card */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow: hidden;
}

.table-header-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.table-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-export {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-export:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-export.pdf:hover { border-color: var(--accent-red); color: var(--accent-red); }
.btn-export.excel:hover { border-color: var(--accent-green); color: var(--accent-green); }
.btn-export.kmz:hover { border-color: var(--accent-blue); color: var(--accent-cyan); }

/* Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.eng-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.eng-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 700;
  padding: 9px 12px;
  border-bottom: 2px solid var(--border-color);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.eng-table th.crit-col {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
  text-align: center;
}

.eng-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(36, 59, 97, 0.5);
}

.eng-table tr:hover td {
  background: rgba(28, 48, 84, 0.4);
}

.eng-table tr.category-sep td {
  background: rgba(17, 30, 51, 0.9);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 12px;
}

.cell-center { text-align: center; }
.cell-mono { font-family: var(--font-mono); }
.cell-critical {
  background: var(--critical-bg) !important;
  color: var(--critical-text);
  font-weight: 800;
  font-family: var(--font-mono);
  text-align: center;
  border-left: 1px solid var(--critical-border);
  border-right: 1px solid var(--critical-border);
}

.crit-reason {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.source-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

.source-pill.era5 {
  background: rgba(147, 51, 234, 0.12);
  color: #c084fc;
  border-color: rgba(147, 51, 234, 0.25);
}

.source-pill.norm {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}

.source-pill.geo {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

/* EMA Cards */
.ema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.ema-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ema-point-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.ema-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.ema-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.ema-dist {
  color: var(--accent-teal);
  font-weight: 700;
}

/* Spinner */
.spinner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 19, 32, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  border-radius: var(--radius-md);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-text {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Footer (Mandatory rule: © 2026 Desarrollado por repositorIA) */
.app-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: auto;
}

.app-footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

.footer-credit {
  font-weight: 600;
  color: var(--text-main);
  margin-top: 4px;
}

/* ==========================================================================
   Sección y Componentes de Fuentes de Datos Oficiales y Trazabilidad Técnica
   ========================================================================== */

/* Botón en el Header */
.btn-sources-header {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-sources-header:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

/* Barra de Trazabilidad al Pie de la Tabla */
.table-sources-footer {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.table-sources-footer b {
  color: var(--accent-cyan);
}

.tsf-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tsf-icon {
  font-size: 1rem;
}

.tsf-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.tsf-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Tarjeta Principal de Fuentes */
.sources-main-card {
  margin-top: 18px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: linear-gradient(180deg, rgba(22, 38, 66, 0.95) 0%, rgba(17, 30, 51, 0.95) 100%);
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.btn-sources-detail {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-sources-detail:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.sources-intro-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Grilla de Fuentes */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.source-item {
  background: rgba(11, 19, 32, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.source-item:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.source-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.source-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.source-badge.topografia {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.source-badge.clima {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.source-badge.ema {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.source-badge.carto {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.source-badge.norma {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.source-org {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 600;
}

.source-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.source-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.source-item-desc b {
  color: var(--text-main);
}

.source-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(36, 59, 97, 0.6);
}

.source-tag {
  background: rgba(36, 59, 97, 0.4);
  color: #94a3b8;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
}

/* Modal Informativo */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 19, 32, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 0.84rem;
  color: var(--text-main);
}

.modal-table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.modal-sources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  text-align: left;
}

.modal-sources-table th {
  background: var(--bg-secondary);
  color: var(--accent-cyan);
  padding: 8px 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.modal-sources-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(36, 59, 97, 0.5);
  color: #cbd5e1;
}

.modal-sources-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

.modal-sources-table a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}

.modal-sources-table a:hover {
  text-decoration: underline;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-secondary);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}


.source-pill.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.45);
}
