/**
 * Estilos corporativos para Radar Oficial de Ciberestafas y Phishing en España
 * Fijate Tools
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores Corporativos Tema Claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: #eff6ff;

  --danger: #ef4444;
  --danger-subtle: #fef2f2;
  --danger-border: #fecaca;

  --warning: #f97316;
  --warning-subtle: #fff7ed;
  --warning-border: #fed7aa;

  --caution: #eab308;
  --caution-subtle: #fefce8;

  --success: #10b981;
  --success-subtle: #ecfdf5;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #151d2c;
  --bg-card-subtle: #1c2638;
  --border-color: #27354a;
  --border-focus: #60a5fa;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-subtle: rgba(59, 130, 246, 0.15);

  --danger: #f87171;
  --danger-subtle: rgba(239, 68, 68, 0.12);
  --danger-border: #7f1d1d;

  --warning: #fb923c;
  --warning-subtle: rgba(249, 115, 22, 0.12);
  --warning-border: #7c2d12;

  --caution: #facc15;
  --caution-subtle: rgba(234, 179, 8, 0.12);

  --success: #34d399;
  --success-subtle: rgba(16, 185, 129, 0.12);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.45);
}

/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-headline,
.section-title,
.faq-section-title,
.em-title {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.mono, code, .em-phone-link, .score-number {
  font-family: var(--font-mono);
}

/* Layout */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Hero Card */
.hero-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(239, 68, 68, 0.05) 100%), var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background-color: var(--primary-subtle);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
}

.status-dot.pulsing {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-badge-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-light);
  background-color: var(--bg-card-subtle);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.hero-headline {
  font-size: 1.625rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.hero-subline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 900px;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  box-shadow: var(--shadow-sm);
}

.kpi-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-value.text-warning {
  color: var(--warning);
}

.kpi-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Main */
.card-main {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.section-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.tool-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  background-color: var(--primary-subtle);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.tool-tag.tag-emergency {
  background-color: var(--danger-subtle);
  color: var(--danger);
}

.updated-notice {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.section-title {
  font-size: 1.375rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

/* Formulario Analizador */
.analyzer-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 {
  flex: 1 1 0%;
  min-width: 0;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.text-area-input,
.text-input,
.search-alerts-input {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  color: var(--text-main);
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.text-area-input {
  min-height: 95px;
  resize: vertical;
  line-height: 1.45;
}

.text-area-input:focus,
.text-input:focus,
.search-alerts-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background-color: var(--bg-card);
}

/* Quick Examples */
.quick-examples-box {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.examples-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-chip {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.btn-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-subtle);
}

/* Botones de acción */
.form-actions-bar {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn-primary-action,
.btn-secondary-action,
.btn-refresh {
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-primary-action {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

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

.btn-secondary-action {
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary-action:hover {
  background-color: var(--border-color);
}

/* Resultados del analizador */
.analyzer-results-box {
  margin-top: 1.5rem;
  border-top: 2px dashed var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease;
}

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

.results-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card-subtle);
  border-left: 6px solid var(--danger);
}

.risk-score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid var(--danger);
  box-shadow: var(--shadow-sm);
}

.score-number {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1;
  color: var(--danger);
}

.score-max {
  font-size: 0.6875rem;
  color: var(--text-light);
  line-height: 1;
}

.risk-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.risk-badge {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--danger);
  letter-spacing: 0.02em;
}

.risk-title {
  font-size: 1.15rem;
  margin: 0;
}

.risk-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Alertas Oficiales Coincidentes */
.matched-box {
  background-color: var(--danger-subtle);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.matched-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--danger);
  margin: 0 0 0.75rem;
}

.matched-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.matched-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.matched-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 0.2rem;
}

.matched-item-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.matched-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.matched-link:hover {
  text-decoration: underline;
}

/* Señales de alarma */
.flags-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.flags-title {
  font-size: 0.9375rem;
  margin: 0 0 0.75rem;
}

.flags-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flag-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-main);
}

.flag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--danger);
  margin-top: 6px;
  flex-shrink: 0;
}

/* Protocolo a medida */
.protocol-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%), var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.protocol-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.protocol-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.protocol-title {
  font-size: 1rem;
  margin: 0;
}

.protocol-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.protocol-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.protocol-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-main);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Pestañas de Emergencia */
.tabs-emergency-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
}

.tab-btn {
  min-height: 44px;
  padding: 0.5rem 1rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.tab-btn:hover {
  background-color: var(--border-color);
  color: var(--text-main);
}

.tab-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.tab-content-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.protocol-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.protocol-card.highlight-danger {
  border-left: 5px solid var(--danger);
  background-color: var(--danger-subtle);
}

.protocol-card.highlight-warning {
  border-left: 5px solid var(--warning);
  background-color: var(--warning-subtle);
}

.protocol-step-num {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  background-color: var(--primary-subtle);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  height: fit-content;
  white-space: nowrap;
}

.highlight-danger .protocol-step-num {
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.15);
}

.protocol-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.step-title {
  font-size: 1rem;
  margin: 0;
}

.step-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* Monitor Header Row */
.monitor-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.btn-refresh {
  min-height: 38px;
  padding: 0.4rem 0.875rem;
  font-size: 0.8125rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-refresh:hover {
  background-color: var(--border-color);
}

/* Filtros de Categoría */
.filter-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pill-btn {
  min-height: 36px;
  padding: 0.35rem 0.875rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  background-color: var(--border-color);
  color: var(--text-main);
}

.pill-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Buscador de Alertas */
.search-alerts-box {
  margin-bottom: 1.25rem;
}

/* Grid de Alertas */
.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.alert-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.875rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

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

.alert-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.alert-category-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--primary-subtle);
  color: var(--primary);
}

.alert-category-tag.cat-smishing,
.alert-category-tag.cat-banco {
  background-color: var(--danger-subtle);
  color: var(--danger);
}

.alert-date-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

.alert-card-title {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.35;
  color: var(--text-main);
}

.alert-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.alert-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.btn-card-detail {
  min-height: 34px;
  padding: 0.25rem 0.75rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-detail:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.loading-state,
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.spinner-dot {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Directorio de Emergencias */
.emergency-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.emergency-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.card-incibe-focus {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%), var(--bg-card);
}

.em-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.em-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background-color: var(--primary-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.em-status {
  font-size: 0.75rem;
  color: var(--text-light);
}

.em-title {
  font-size: 1.05rem;
  margin: 0;
}

.em-phone-big {
  margin: 0.25rem 0;
}

.em-phone-link {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  transition: opacity 0.15s ease;
}

.em-phone-link:hover {
  opacity: 0.85;
}

.em-phone-duo {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.duo-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.duo-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.duo-item .em-phone-link {
  font-size: 1.625rem;
  color: var(--danger);
}

.em-hours {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.em-channels {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.em-channels strong {
  color: var(--text-main);
}

/* Directorio de Bancos */
.banks-directory-box {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.banks-title {
  font-size: 1.05rem;
  margin: 0 0 1rem;
}

.banks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
}

.bank-item-card {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.15s ease;
}

.bank-item-card:hover {
  border-color: var(--primary);
}

.bank-item-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.bank-item-phone {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.bank-item-phone:hover {
  text-decoration: underline;
}

.bank-item-desc {
  font-size: 0.6875rem;
  color: var(--text-light);
}

/* FAQ Accordion */
.faq-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-section-title {
  font-size: 1.375rem;
  margin: 0 0 0.5rem;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--border-focus);
}

.faq-question {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--text-light);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.faq-answer p {
  margin: 0 0 0.75rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.faq-answer li {
  margin-bottom: 0.35rem;
}

/* Modal Accesible */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(11, 15, 23, 0.7);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 10000;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--danger-subtle);
  color: var(--danger);
  text-transform: uppercase;
}

.modal-date {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-modal-close:hover {
  color: var(--text-main);
  background-color: var(--bg-card-subtle);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scrollbar-width: thin;
}

.modal-title {
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.3;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-subtitle {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin: 0;
}

.modal-text {
  font-size: 0.9375rem;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}

.modal-solution-box {
  background-color: var(--success-subtle);
  border-left: 4px solid var(--success);
  padding: 0.875rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.modal-solution-box .modal-subtitle {
  color: var(--success);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card-subtle);
}

/* Responsividad */
@media (max-width: 900px) {
  .hero-headline {
    font-size: 1.375rem;
  }

  .form-row {
    flex-direction: column;
  }

  .results-header {
    flex-direction: column;
    text-align: center;
    border-left: none;
    border-top: 6px solid var(--danger);
  }

  .risk-meta {
    align-items: center;
  }

  .matched-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .tool-layout {
    padding: 0 0.75rem;
    margin: 1rem auto 2rem;
  }

  .card-main,
  .hero-card {
    padding: 1.25rem 1rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .form-actions-bar {
    flex-direction: column;
  }

  .btn-primary-action,
  .btn-secondary-action {
    width: 100%;
  }

  .alerts-grid {
    grid-template-columns: 1fr;
  }

  .emergency-cards-grid {
    grid-template-columns: 1fr;
  }

  .em-phone-big .em-phone-link {
    font-size: 1.875rem;
  }
}
