/**
 * Estilos específicos: Histórico y mapa oficial de grandes incendios forestales de España (EGIF)
 * Fijate Tools
 */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta cromática tema claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --accent-fire: #dc2626;
  --accent-fire-hover: #b91c1c;
  --accent-fire-light: #fee2e2;
  --accent-fire-text: #991b1b;

  --color-catastrofe: #b91c1c;
  --color-mayor: #ea580c;
  --color-gif: #d97706;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

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

/* Tema oscuro unificado con selector corporativo [data-theme="dark"] */
[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #151d2c;
  --bg-card-hover: #1e293b;
  --bg-input: #1a2336;
  --border-color: #27354f;
  --border-subtle: #334466;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --accent-fire: #ef4444;
  --accent-fire-hover: #f87171;
  --accent-fire-light: rgba(239, 68, 68, 0.15);
  --accent-fire-text: #fca5a5;

  --color-catastrofe: #ef4444;
  --color-mayor: #f97316;
  --color-gif: #f59e0b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

/* Reseteo y contención global */
*, *::before, *::after {
  box-sizing: border-box;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
}

.text-mono {
  font-family: var(--font-mono);
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

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

@media (min-width: 1536px) {
  .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%;
}

/* 1. Tarjeta de introducción institucional */
.fire-intro-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.fire-intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background-color: var(--accent-fire-light);
  color: var(--accent-fire-text);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-fire);
}

.fire-intro-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.fire-intro-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* KPIs Grid */
.fire-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 900px) {
  .fire-kpis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .fire-kpis-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kpi-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.kpi-subtext {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* 2. Panel de filtros facetados */
.fire-filters-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.fire-filters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 960px) {
  .fire-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fire-filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-field-search {
  grid-column: 1 / -1;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input, .form-select {
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.92rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-fire);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.form-select {
  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='%2364748b' 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 12px center;
  padding-right: 40px;
  cursor: pointer;
}

[data-theme="dark"] .form-select {
  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='%2394a3b8' 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");
}

.form-select option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.btn-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.active-count-box {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.35rem;
}

/* 3. Mapa cartográfico Leaflet */
.fire-map-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.map-controls-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.map-title-wrap {
  flex: 1 1 300px;
}

.map-section-title {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.map-section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.map-layer-selector-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-page);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.layer-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

.btn-layer {
  background: transparent;
  border: none;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-layer:hover {
  color: var(--text-primary);
}

.btn-layer.active {
  background-color: var(--bg-card);
  color: var(--accent-fire);
  box-shadow: var(--shadow-sm);
}

.fire-map-container {
  height: 520px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  z-index: 5;
}

@media (max-width: 640px) {
  .fire-map-container {
    height: 400px;
  }
}

.map-legend-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.legend-catastrofe { background-color: var(--color-catastrofe); }
.legend-mayor { background-color: var(--color-mayor); }
.legend-gif { background-color: var(--color-gif); }

.legend-hint {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Popup Leaflet adaptado al tema */
.leaflet-popup-content-wrapper {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: var(--font-main) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
}

.fire-popup-box {
  padding: 0.85rem 1rem;
}

.fire-popup-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.fire-popup-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.fire-popup-metric {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 0.25rem;
}

.btn-popup-view {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.4rem;
  background-color: var(--accent-fire);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-popup-view:hover {
  background-color: var(--accent-fire-hover);
}

/* 4. Lista de incendios */
.fire-list-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

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

.list-title {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

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

.view-toggle-group {
  display: flex;
  gap: 0.35rem;
}

.btn-view {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-view.active {
  background-color: var(--accent-fire);
  color: #ffffff;
  border-color: var(--accent-fire);
}

/* Grid de tarjetas */
.fires-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .fires-cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.fire-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

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

.fire-card-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.strip-catastrofe { background-color: var(--color-catastrofe); }
.strip-mayor { background-color: var(--color-mayor); }
.strip-gif { background-color: var(--color-gif); }

.fire-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.fire-card-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.badge-ano {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--border-color);
  color: var(--text-primary);
}

.badge-causa {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--accent-fire-light);
  color: var(--accent-fire-text);
}

.badge-severidad {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: #ffffff;
}

.badge-severidad-catastrofe { background-color: var(--color-catastrofe); }
.badge-severidad-mayor { background-color: var(--color-mayor); }
.badge-severidad-gif { background-color: var(--color-gif); }

.fire-card-title {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.fire-card-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.fire-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  background-color: var(--bg-card);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 0.85rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.fire-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1 1 auto;
}

.fire-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-card-map, .btn-card-detail {
  flex: 1 1 0%;
  min-height: 38px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

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

.btn-card-map:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-card-detail {
  background-color: var(--accent-fire);
  border: 1px solid var(--accent-fire);
  color: #ffffff;
}

.btn-card-detail:hover {
  background-color: var(--accent-fire-hover);
}

/* Tabla pericial responsiva */
.seo-table-wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  margin: 1rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.table-scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background-color: var(--bg-page);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.seo-table {
  width: 100%;
  min-width: 750px;
  border-collapse: collapse;
  font-size: 0.86rem;
  background-color: var(--bg-card);
}

.seo-table th, .seo-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.seo-table th {
  background-color: var(--bg-page);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
}

.seo-table tr:hover td {
  background-color: var(--bg-card-hover);
}

/* 5. Guía técnica y acordeón SEO */
.fire-guide-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.guide-main-title {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.guide-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.guide-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-page);
}

.guide-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.guide-summary::-webkit-details-marker {
  display: none;
}

.guide-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.guide-item[open] .guide-arrow {
  transform: rotate(180deg);
}

.guide-content {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-content p {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.guide-content ul, .guide-content ol {
  margin: 0;
  padding-left: 1.25rem;
}

.guide-content li {
  margin-bottom: 0.5rem;
}

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

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

.fire-modal-dialog {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.fire-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.btn-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-badge-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.modal-fire-title {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.modal-fire-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.fire-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  background-color: var(--bg-page);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

@media (max-width: 580px) {
  .modal-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.modal-stat-box {
  display: flex;
  flex-direction: column;
}

.modal-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.modal-stat-val {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.modal-detail-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-title {
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.detail-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

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

.chip {
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

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

@media (max-width: 500px) {
  .fire-modal-footer button {
    flex: 1 1 100%;
  }
}

/* Botones genéricos */
.btn-primary, .btn-secondary {
  min-height: 40px;
  height: 40px;
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--accent-fire);
  color: #ffffff;
  border: 1px solid var(--accent-fire);
}

.btn-primary:hover {
  background-color: var(--accent-fire-hover);
}

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

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-sm {
  min-height: 34px;
  height: 34px;
  font-size: 0.8rem;
  padding: 0 0.75rem;
}
