/**
 * Fijate Tools - Comprobador de Registros DNS y Propagación DoH
 * Hoja de estilos con variables corporativas, tema claro/oscuro y diseño responsivo
 */

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

  /* Paleta Base Tema Oscuro por defecto */
  --bg-page: #080c14;
  --bg-card: #0f172a;
  --bg-card-elevated: #1e293b;
  --bg-input: #131d31;
  --border-color: #334155;
  --border-color-focus: #38bdf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --color-primary: #38bdf8;
  --color-primary-hover: #0ea5e9;
  --color-accent: #f59e0b;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-elevated: #f8fafc;
  --bg-input: #f8fafc;
  --border-color: #cbd5e1;
  --border-color-focus: #0284c7;

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

  --color-primary: #0284c7;
  --color-primary-hover: #0369a1;

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

  color-scheme: light;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: 65px; /* Espacio para cabecera fija */
}

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

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

.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* Layout con barra lateral para publicidad sticky */
.tool-with-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 12px;
}

@media (min-width: 1024px) {
  .tool-with-sidebar {
    flex-direction: row;
    align-items: flex-start;
  }
  .tool-main-content {
    flex: 1 1 0%;
    min-width: 0;
  }
  .tool-ad-sidebar {
    width: 300px;
    flex-shrink: 0;
  }
}

.ad-sticky-container {
  position: sticky;
  top: 80px;
}

/* Banner de Publicidad Responsive */
.tools-ad-banner-section {
  width: 100%;
  margin: 12px 0;
  display: flex;
  justify-content: center;
}

.ad-container-responsive {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Tarjeta Hero / Formulario de búsqueda */
.dns-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.dns-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #f59e0b);
}

.hero-top-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

@media (min-width: 768px) {
  .hero-top-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.hero-headline {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.pill-doh {
  color: var(--color-primary);
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 1.8s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Grid del Formulario */
.dns-search-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .form-grid-main {
    grid-template-columns: 2.2fr 1.5fr 1.5fr 1.2fr;
    align-items: flex-end;
  }
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-field-box {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  height: 44px;
  padding: 0 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field-box:focus-within {
  border-color: var(--border-color-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.input-icon {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  margin-right: 8px;
  flex-shrink: 0;
}

.dns-input-text {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-main);
}

.btn-clear-input {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 50%;
}

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

/* Desplegables Select */
.select-field-box {
  width: 100%;
}

.dns-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 10px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.2s;
}

.dns-select:focus {
  border-color: var(--border-color-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.dns-select option {
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 8px;
}

/* Botón Principal */
.btn-primary-action {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}

.btn-primary-action:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-primary-action:active {
  transform: scale(0.98);
}

/* Chips de muestras rápidas */
.quick-samples-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

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

.samples-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-sample-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-sample-chip:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(56, 189, 248, 0.08);
}

/* Navegación por pestañas */
.dns-tabs-navigation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .dns-tabs-navigation {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tab-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 42px;
}

.tab-nav-btn:hover {
  background: var(--bg-card-elevated);
  color: var(--text-main);
}

.tab-nav-btn.active {
  background: var(--bg-card-elevated);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.tab-counter-badge {
  font-size: 0.7rem;
  background: var(--bg-input);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  color: var(--text-main);
}

.tab-grade-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: #10b981;
  color: #ffffff;
}

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

/* Pestaña: Barra de Estado de Registros */
.results-status-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .results-status-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.status-left-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-domain-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.status-rcode-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-rcode-badge.badge-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-latency-badge {
  font-size: 0.75rem;
  color: var(--color-accent);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-dnssec-badge {
  font-size: 0.75rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.status-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-action-tool {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s;
}

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

/* Filtro Chips */
.records-filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.filter-chip:hover {
  color: var(--text-main);
  background: var(--bg-card-elevated);
}

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

/* Contenedor de Registros */
.dns-records-container {
  min-height: 200px;
}

.records-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Tarjeta individual de Registro DNS */
.dns-record-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.15s;
}

.dns-record-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.record-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.record-badges-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-pill {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Colores de badges por tipo de registro */
.type-pill.type-A { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.type-pill.type-AAAA { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.4); }
.type-pill.type-MX { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.type-pill.type-TXT { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.type-pill.type-CNAME { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.4); }
.type-pill.type-NS { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.4); }
.type-pill.type-SOA { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.type-pill.type-CAA { background: rgba(234, 179, 8, 0.2); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.4); }
.type-pill.type-SRV { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.4); }
.type-pill.type-PTR { background: rgba(132, 204, 22, 0.2); color: #a3e635; border: 1px solid rgba(132, 204, 22, 0.4); }
.type-pill.type-DS, .type-pill.type-DNSKEY { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.4); }

.record-name-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.record-ttl-text {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.record-data-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-input);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.record-data-val {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-main);
  word-break: break-all;
  line-height: 1.4;
}

.btn-copy-record {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-copy-record:hover {
  color: var(--color-primary);
  background: rgba(56, 189, 248, 0.1);
}

/* Desglose especial de SOA y MX */
.record-details-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  padding-top: 4px;
}

.detail-item-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

.detail-item-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.detail-item-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-main);
}

/* Estados de Carga y Vacío */
.dns-loading-placeholder, .dns-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  gap: 12px;
}

.dns-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Pestaña: Propagación Global */
.propagation-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .propagation-header-card {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.prop-stat-box {
  flex: 1;
}

.prop-stat-title {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.prop-stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: #10b981;
}

.prop-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.prop-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.5s ease;
}

.prop-meta-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prop-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.meta-label {
  color: var(--text-dim);
}

.meta-value {
  color: var(--text-main);
  font-weight: 600;
}

.propagation-nodes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .propagation-nodes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prop-node-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.node-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.node-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-flag {
  font-size: 1.2rem;
}

.node-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.node-location {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.node-status-led {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.node-status-led.synced {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.node-status-led.unsynced {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.node-values-box {
  background: var(--bg-input);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-main);
  word-break: break-all;
}

.node-footer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Pestaña: Auditoría de Seguridad */
.security-score-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .security-score-banner {
    flex-direction: row;
    text-align: left;
    gap: 24px;
  }
}

.score-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-grade-pill {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.score-numeric {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 6px;
}

.score-title {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.score-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.security-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.audit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.audit-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.audit-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audit-icon {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
}

.audit-card-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.audit-status-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.tag-success { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.tag-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.tag-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.tag-neutral { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.raw-record-box {
  background: var(--bg-input);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-main);
  word-break: break-all;
  margin-bottom: 8px;
}

.audit-explanation {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.mechanisms-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.mech-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.btn-copy-code {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.btn-copy-code:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Pestaña: Generador SPF / DMARC */
.generator-container-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.generator-main-title {
  font-size: 1.2rem;
}

.generator-lead {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -12px;
}

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

.gen-box-title {
  font-size: 1rem;
  color: var(--color-primary);
}

.gen-form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gen-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.checkbox-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .checkbox-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.check-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-main);
  background: var(--bg-input);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.check-option-label input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
}

.gen-output-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

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

.output-type-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
}

.gen-code-preview {
  font-size: 0.85rem;
  color: #38bdf8;
  word-break: break-all;
  line-height: 1.4;
}

/* Guía Didáctica SEO */
.dns-seo-guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.guide-heading {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.guide-subheading {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.guide-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.guide-list {
  list-style: disc;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-list li {
  margin-bottom: 6px;
}

.guide-list strong {
  color: var(--text-main);
}

/* Modales */
.dns-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

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

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-box h3 {
  font-size: 1.1rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-dim);
  cursor: pointer;
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.modal-code-area {
  width: 100%;
  height: 280px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-main);
  font-size: 0.8rem;
  line-height: 1.4;
  resize: vertical;
  outline: none;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-modal-action {
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
}

.btn-copy-bind {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

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

/* Toast de Notificación */
.dns-toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #38bdf8;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.dns-toast-notification.active {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  color: #10b981;
  font-weight: 800;
}
