/**
 * Buscador de ayudas y subvenciones públicas de España
 * Fijate Tools - Estilos Canónicos
 */

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

  /* Colores Tema Claro */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-card: #e2e8f0;
  --border-focus: #0284c7;

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

  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-subtle: #e0f2fe;
  --primary-text: #0369a1;

  --success: #16a34a;
  --success-subtle: #dcfce7;
  --success-text: #15803d;

  --amber: #d97706;
  --amber-subtle: #fef3c7;
  --amber-text: #b45309;

  --purple: #7c3aed;
  --purple-subtle: #ede9fe;
  --purple-text: #6d28d9;

  --danger: #dc2626;
  --danger-subtle: #fee2e2;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  --bg-body: #0b0f17;
  --bg-card: #131b28;
  --bg-card-subtle: #1a2436;
  --border-card: #243046;
  --border-focus: #38bdf8;

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

  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-subtle: rgba(56, 189, 248, 0.15);
  --primary-text: #38bdf8;

  --success: #22c55e;
  --success-subtle: rgba(34, 197, 94, 0.15);
  --success-text: #4ade80;

  --amber: #fbbf24;
  --amber-subtle: rgba(251, 191, 36, 0.15);
  --amber-text: #fcd34d;

  --purple: #a78bfa;
  --purple-subtle: rgba(167, 139, 250, 0.15);
  --purple-text: #c4b5fd;

  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Reset y estructura general */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-title,
.guide-title {
  font-family: var(--font-heading);
}

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

.main-wrapper.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  flex: 1 0 auto;
}

.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease;
}

/* Hero block */
.hero-block {
  margin-bottom: 2rem;
}

.hero-badge-wrap {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-text);
  background: var(--primary-subtle);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 9999px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 850px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Tarjetas de métricas */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

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

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon-green { background: var(--success-subtle); color: var(--success-text); }
.metric-icon-blue { background: var(--primary-subtle); color: var(--primary-text); }
.metric-icon-amber { background: var(--amber-subtle); color: var(--amber-text); }

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Pestañas de audiencia */
.tabs-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  background: var(--bg-card-subtle);
  padding: 0.4rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
  transition: all 0.2s ease;
  user-select: none;
}

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

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: var(--bg-card-subtle);
  color: var(--text-muted);
}

.tab-btn.active .tab-badge {
  background: var(--primary-subtle);
  color: var(--primary-text);
}

/* Buscador por texto */
.search-box-wrap {
  margin-bottom: 1.25rem;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-light);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 2.75rem 0 2.75rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-input:focus {
  background: var(--bg-card);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-clear {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.btn-clear:hover {
  color: var(--text-main);
}

/* Filtros desplegables */
.filters-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr auto;
  gap: 1rem;
  align-items: flex-end;
}

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

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

.filter-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 40px 0 0.85rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-main);
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  appearance: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  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;
  background-size: 16px;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  border-color: var(--border-focus);
}

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

/* Checkbox pill (NextGen EU) */
.filter-col-checkbox {
  justify-content: flex-end;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 44px;
  padding: 0 1rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: border-color 0.2s ease;
}

.checkbox-pill input[type="checkbox"] {
  display: none;
}

.pill-slider {
  width: 34px;
  height: 20px;
  background-color: var(--text-light);
  border-radius: 9999px;
  position: relative;
  transition: background-color 0.2s ease;
}

.pill-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.checkbox-pill input:checked + .pill-slider {
  background-color: var(--primary);
}

.checkbox-pill input:checked + .pill-slider::after {
  transform: translateX(14px);
}

.pill-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Resultados */
.results-section {
  margin-bottom: 2rem;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.results-count-box {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.results-sorting-info .sort-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Tarjetas de ayudas */
.grants-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grant-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.grant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(2, 132, 199, 0.35);
}

.grant-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.grant-badges-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-open { background: var(--success-subtle); color: var(--success-text); }
.badge-closed { background: var(--bg-card-subtle); color: var(--text-muted); }
.badge-particular { background: var(--primary-subtle); color: var(--primary-text); }
.badge-profesional { background: var(--amber-subtle); color: var(--amber-text); }
.badge-ambos { background: var(--purple-subtle); color: var(--purple-text); }
.badge-mrr { background: #fef08a; color: #854d0e; }
[data-theme="dark"] .badge-mrr { background: rgba(250, 204, 21, 0.2); color: #fde047; }
.badge-ccaa { background: var(--bg-card-subtle); color: var(--text-main); border: 1px solid var(--border-card); }

.grant-bdns-ref {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
}

.grant-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.grant-organo {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.grant-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-card);
  padding-top: 0.85rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.grant-budget-box {
  display: flex;
  flex-direction: column;
}

.grant-budget-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.grant-budget-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.grant-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-card-detail {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.15s ease;
}

.btn-card-detail:hover {
  background: var(--primary-hover);
}

/* Loading & Empty States */
.loading-state,
.empty-state-box {
  padding: 3.5rem 1.5rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
}

.spinner-circle {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-card);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.empty-icon {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.empty-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.btn-primary-compact {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

/* Paginación */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-page {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 40px;
  transition: all 0.15s ease;
}

.btn-page:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-num {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

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

/* Bloque FAQ / Guía */
.info-guide-section {
  margin-top: 2.5rem;
}

.guide-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.guide-card {
  padding: 1.25rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  position: relative;
}

.guide-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}

.guide-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.guide-p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Modal de Detalle */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  transition: transform 0.2s ease;
  overflow: hidden;
}

.modal-backdrop.open .modal-card {
  transform: translateY(0);
}

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

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-bdns-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-card-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.modal-status-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.btn-close-modal {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

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

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
}

.modal-key-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  background: var(--bg-card-subtle);
  padding: 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}

.modal-key-item {
  display: flex;
  flex-direction: column;
}

.modal-key-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.modal-key-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.modal-sec-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.modal-sec-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-docs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.modal-doc-item a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.modal-doc-item a:hover {
  background: var(--primary-subtle);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-card);
  background: var(--bg-card-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.modal-actions-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-secondary-action,
.btn-outline-action,
.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  min-height: 40px;
  transition: all 0.15s ease;
}

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

.btn-secondary-action:hover {
  background: var(--bg-card-subtle);
}

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

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

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

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

/* Toast sin alert */
.toast-box {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  z-index: 10000;
}

.toast-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsividad móvil estricta */
@media (max-width: 992px) {
  .filters-row {
    grid-template-columns: 1fr 1fr;
  }
  .filter-col-checkbox {
    grid-column: span 2;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .tabs-container {
    grid-template-columns: 1fr;
  }
  .filters-row {
    grid-template-columns: 1fr;
  }
  .filter-col-checkbox {
    grid-column: span 1;
  }
  .modal-key-data-grid {
    grid-template-columns: 1fr;
  }
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .modal-actions-right {
    flex-direction: column;
    width: 100%;
  }
  .btn-card-detail,
  .btn-primary-action,
  .btn-outline-action,
  .btn-secondary-action {
    width: 100%;
    justify-content: center;
  }
}
