/* ===================================================================
   RADAR DE CLIENTES - SISTEMA DE DISEÑO Y ESTILOS PRINCIPALES
   Estética profesional, sobria y de alta densidad para consultores B2B.
   =================================================================== */

:root {
  /* Paleta Base: Slate Oscuro / Obsidian */
  --bg-app: #090d16;
  --bg-sidebar: #0f1624;
  --bg-card: #131b2e;
  --bg-card-hover: #18223a;
  --bg-surface: #1e2942;
  --bg-surface-elevated: #253352;
  
  /* Bordes */
  --border-subtle: #1e293b;
  --border-focus: #38bdf8;
  --border-divider: rgba(255, 255, 255, 0.08);

  /* Tipografía y Textos */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;

  /* Semántica y Notas (Estricto: Verde, Ámbar, Rojo, Azul) */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.12);
  --color-success-border: rgba(16, 185, 129, 0.35);

  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.12);
  --color-warning-border: rgba(245, 158, 11, 0.35);

  --color-danger: #ef4444;
  --color-danger-bg: rgba(239, 68, 68, 0.12);
  --color-danger-border: rgba(239, 68, 68, 0.35);

  --color-primary: #0284c7;
  --color-primary-hover: #0369a1;
  --color-primary-light: #38bdf8;
  --color-primary-bg: rgba(14, 165, 233, 0.12);

  /* Espaciado y Radios */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --sidebar-width: 250px;
  --header-height: 64px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.45);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Layout General */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===================================================================
   BARRA LATERAL DE NAVEGACIÓN (SIDEBAR)
   =================================================================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.brand-header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-divider);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.nav-menu {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
  text-decoration: none;
  width: 100%;
}

.nav-item:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--bg-surface);
  color: var(--color-primary-light);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background-color: var(--color-primary-light);
  border-radius: 0 4px 4px 0;
}

.nav-item .icon {
  font-size: 18px;
  width: 22px;
  display: inline-flex;
  justify-content: center;
}

.nav-item .badge {
  margin-left: auto;
  background-color: var(--bg-card);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-divider);
  background-color: rgba(0, 0, 0, 0.15);
}

.quota-indicator {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quota-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.quota-bar-container {
  height: 6px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quota-bar {
  height: 100%;
  background-color: var(--color-success);
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.quota-bar.warning {
  background-color: var(--color-warning);
}

.quota-bar.danger {
  background-color: var(--color-danger);
}

/* ===================================================================
   CONTENIDO PRINCIPAL
   =================================================================== */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-bar {
  height: var(--header-height);
  background-color: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(8px);
}

.page-title-box h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.page-title-box p {
  font-size: 12px;
  color: var(--text-muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-container {
  padding: 24px 28px;
  flex: 1;
}

/* ===================================================================
   BOTONES Y CONTROLES UI
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
}

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

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

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-elevated);
}

.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--color-danger);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

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

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* Inputs y Formularios */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-focus);
}

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

/* Badges y Chips */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.badge-success {
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.badge-warning {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.badge-danger {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
}

.badge-info {
  background-color: var(--color-primary-bg);
  color: var(--color-primary-light);
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.badge-neutral {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ===================================================================
   TARJETA Y PANEL BASE
   =================================================================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
}

/* ===================================================================
   PANTALLA 1: BÚSQUEDA Y FILTROS
   =================================================================== */
.search-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 16px;
  align-items: flex-end;
}

.niche-chips-container {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chips-label {
  font-size: 12px;
  color: var(--text-muted);
}

.niche-chip {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.niche-chip:hover {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.niche-chip.active {
  background-color: var(--color-primary-bg);
  border-color: var(--color-primary-light);
  color: var(--color-primary-light);
  font-weight: 600;
}

.filters-bar {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-divider);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.filters-left {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.filters-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toolbar de Resultados */
.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.results-stats {
  font-size: 13px;
  color: var(--text-secondary);
}

.view-toggle {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.view-btn {
  padding: 6px 12px;
  font-size: 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.view-btn.active {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
}

/* Tabla de Negocios */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  background-color: var(--bg-sidebar);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-divider);
  color: var(--text-primary);
  vertical-align: middle;
}

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

/* Tarjetas de Negocios (Vista Grid) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.business-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  position: relative;
}

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

.business-card.selected {
  border-color: var(--color-primary-light);
  background-color: rgba(14, 165, 233, 0.05);
}

.business-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.business-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.business-niche {
  font-size: 12px;
  color: var(--text-muted);
}

.business-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-icon {
  font-size: 14px;
  color: var(--text-muted);
  width: 16px;
}

.phone-link {
  color: var(--color-primary-light);
  text-decoration: none;
  font-weight: 500;
}

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

.web-link {
  color: var(--text-secondary);
  text-decoration: none;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-link:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}

.card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Barra Flotante de Acciones en Lote */
.batch-actions-bar {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-width) + 50%);
  transform: translateX(-50%);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-focus);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 95;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* ===================================================================
   INDICADOR DE PUNTUACIÓN DE OPORTUNIDAD (0-100)
   =================================================================== */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.score-high {
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.score-medium {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.score-low {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
}

/* ===================================================================
   MODAL / FICHA DEL NEGOCIO (DOSSIER)
   =================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: var(--bg-sidebar);
  z-index: 10;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sección de PageSpeed y Gauges */
.pagespeed-gauges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gauge-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gauge-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  border: 4px solid var(--border-subtle);
}

.gauge-circle.score-green {
  border-color: var(--color-success);
  color: var(--color-success);
  background-color: var(--color-success-bg);
}

.gauge-circle.score-amber {
  border-color: var(--color-warning);
  color: var(--color-warning);
  background-color: var(--color-warning-bg);
}

.gauge-circle.score-red {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

.gauge-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

/* Captura de pantalla web */
.web-screenshot-container {
  display: flex;
  justify-content: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow: hidden;
}

.web-screenshot-img {
  max-width: 260px;
  max-height: 380px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-subtle);
}

/* Checklist de Auditoría */
.audit-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
}

.checklist-item.passed {
  border-color: var(--color-success-border);
}

.checklist-item.failed {
  border-color: var(--color-danger-border);
}

/* Borradores de Contacto */
.outreach-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-divider);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.tab-btn.active {
  background-color: var(--bg-surface);
  color: var(--color-primary-light);
  font-weight: 600;
}

.outreach-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.outreach-content {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.2);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-divider);
}

.legal-notice {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-warning);
}

/* ===================================================================
   PANTALLA 4: TABLERO KANBAN (MIS LEADS)
   =================================================================== */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: calc(100vh - 220px);
}

.kanban-column {
  flex: 0 0 280px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}

.kanban-column-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

.kanban-cards {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

.kanban-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
}

.kanban-card:hover {
  border-color: var(--border-focus);
  background-color: var(--bg-card-hover);
}

/* ===================================================================
   TOAST NOTIFICACIONES
   =================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
}

.toast {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease;
}

.toast.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast.toast-error {
  border-left: 4px solid var(--color-danger);
}

.toast.toast-warning {
  border-left: 4px solid var(--color-warning);
}

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

/* Spinner de carga */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* ===================================================================
   RESPONSIVE (MÓVIL Y TABLET)
   =================================================================== */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 70px;
  }

  .brand-text, .nav-item span:not(.icon), .badge, .sidebar-footer {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

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

  .pagespeed-gauges {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-content {
    margin: 10px;
    max-height: 95vh;
  }
}
