:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #121826;
  --bg-surface: #182234;
  --bg-surface-hover: #202d44;
  --border-color: #243248;
  --border-subtle: #1c273a;
  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);
  --accent-rose: #f43f5e;
  --accent-rose-bg: rgba(244, 63, 94, 0.12);
  --accent-cyan: #06b6d4;
  --accent-cyan-bg: rgba(6, 182, 212, 0.12);
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.brand h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* Progress Banner */
.progress-banner {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.875rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.badge-pending {
  background-color: #374151;
  color: #9ca3af;
}

.badge-prio-high {
  background-color: #7c2d12;
  color: #fdba74;
}
.badge-prio-med {
  background-color: #78350f;
  color: #fde68a;
}
.badge-prio-low {
  background-color: #1e293b;
  color: #94a3b8;
}

/* Processes Section */
.processes-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.processes-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background-color: var(--bg-surface);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.process-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.process-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: border-color 0.2s ease;
}

.process-card:hover {
  border-color: #4b5563;
}

.process-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.process-card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.process-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

.process-meta-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.process-step-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telemetry-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background-color: rgba(15, 23, 42, 0.4);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.process-domain-pill {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: var(--bg-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.process-domain-pill strong {
  color: #38bdf8;
  font-family: var(--font-mono);
}

.process-actions {
  display: flex;
  gap: 8px;
}

.process-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--accent-blue-hover);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
  font-size: 0.8125rem;
  padding: 6px 12px;
}
.btn-outline:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
  align-items: stretch;
}

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.kpi-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 125px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
}

.kpi-card.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.16) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-3px) scale(1.02);
}

.kpi-card.active .kpi-label {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

.kpi-card.active .kpi-value {
  color: #67e8f9 !important;
  text-shadow: 0 0 12px rgba(103, 232, 249, 0.6) !important;
}

.kpi-card.active .kpi-sub {
  color: #bae6fd !important;
  font-weight: 600 !important;
}

.kpi-card.highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-secondary) 100%);
}

/* Split Dual KPI Card (Descubiertos Hoy / Ayer) */
.kpi-card-split {
  padding: 0 !important;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  justify-content: stretch !important;
}

.kpi-split-half {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.kpi-split-half:hover {
  background: rgba(245, 158, 11, 0.12);
}

.kpi-split-half.active {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: inset 0 0 14px rgba(245, 158, 11, 0.4) !important;
}

.kpi-split-half.active .kpi-label {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.kpi-split-half.active .kpi-value {
  color: #fde68a !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6) !important;
}

.kpi-split-divider {
  height: 1px;
  background: rgba(245, 158, 11, 0.22);
  width: 100%;
  margin: 0;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 28px;
  gap: 8px;
  width: 100%;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin: 0;
  flex: 1;
}

.kpi-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-top: 3px;
}

.kpi-dot.dot-idle {
  background-color: #334155;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.kpi-dot.dot-new {
  background-color: #10b981;
  border: 1.5px solid #6ee7b7;
  box-shadow: 0 0 10px #10b981, 0 0 18px rgba(16, 185, 129, 0.6);
  animation: pulse-dot-new 1.2s infinite;
}

@keyframes pulse-dot-new {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 12px #10b981, 0 0 18px rgba(16,185,129,0.5); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 4px 0;
  min-height: 34px;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-family: var(--font-mono);
  margin: 0;
}

.kpi-card.highlight .kpi-value {
  color: var(--accent-emerald);
}

.kpi-new-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  font-family: var(--font-mono);
  animation: fade-in 0.3s ease;
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controls Panel */
.controls-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeframe-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-group {
  display: flex;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.pill-btn, .mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover, .mode-btn:hover {
  color: #fff;
}

.pill-btn.active, .mode-btn.active {
  background-color: var(--accent-blue);
  color: #fff;
}

.custom-date-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.custom-date-container input[type="date"] {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 4px 8px;
  font-family: inherit;
}

/* Search Section */
.search-section {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
}

.search-mode-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.zone-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
}

.status-filters select,
.confidence-filters select,
.sort-box select {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.8125rem;
  outline: none;
  cursor: pointer;
}

.export-box {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

/* Data Table */
.table-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.table-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.1s ease;
  height: 40px;
}

.data-table tbody tr:hover {
  background-color: var(--bg-surface-hover);
}

.domain-link {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #60a5fa;
  cursor: pointer;
  text-decoration: none;
}
.domain-link:hover {
  text-decoration: underline;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.badge-available {
  background-color: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-registered {
  background-color: var(--accent-rose-bg);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-exact {
  background-color: var(--accent-cyan-bg);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-size: 0.625rem;
}

.badge-bounded {
  background-color: var(--accent-amber-bg);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.625rem;
}

.badge-unknown {
  background-color: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.625rem;
}

.badge-zone {
  font-family: var(--font-mono);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* Pagination */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 840px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  display: inline-block;
  margin-right: 12px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.75rem;
  cursor: pointer;
}
.btn-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.8125rem;
}

.section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
  margin-left: 8px;
}

.timeline-item {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  border: 2px solid var(--bg-secondary);
}

.timeline-item.drop::before {
  background-color: var(--accent-emerald);
}

.timeline-item.registered::before {
  background-color: var(--accent-amber);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 700;
}

.timeline-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Registrants and Obs */
.registrants-list, .observations-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8125rem;
}

.obs-row {
  display: flex;
  justify-content: space-between;
  background-color: var(--bg-surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

/* Jobs Table */
.jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.jobs-table th {
  text-align: left;
  padding: 8px;
  background-color: var(--bg-surface);
}
.jobs-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Utils */
.hidden {
  display: none !important;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================================
   FASE 3: NAVIGATION BAR, WHOARE.IO PORTFOLIOS & TIMELINE MODAL
   ========================================================================= */
.main-nav-bar {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background-color: var(--bg-secondary) !important;
  padding: 10px 14px !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: visible !important;
  width: 100% !important;
}

.nav-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
}

.nav-row-secondary {
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding-top: 8px !important;
}

.nav-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 14px !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid transparent !important;
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  font-family: var(--font-main) !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-tab:hover {
  background-color: var(--bg-surface-hover) !important;
  color: var(--text-primary) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-1px) !important;
}

.nav-tab.active {
  background-color: var(--accent-blue) !important;
  color: #fff !important;
  border-color: var(--accent-blue-hover) !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35) !important;
}

.registrant-portfolio-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.registrant-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.registrant-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.portfolio-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.portfolio-column {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portfolio-column h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.portfolio-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.portfolio-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.portfolio-list li a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.portfolio-list li a:hover {
  text-decoration: underline;
}

.portfolio-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.empty-li {
  color: var(--text-muted);
  font-style: italic;
  justify-content: center !important;
  background: transparent !important;
}

.history-summary-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.summary-item {
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
  margin-left: 10px;
}

.timeline-node {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -27px;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  border: 2px solid var(--bg-secondary);
}

.timeline-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
}

.timeline-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================================================================= */
/* ESTILOS CARRITO / WATCHLIST DE DOMINIOS INTERESANTES                      */
/* ========================================================================= */
.nav-tab-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab-cart:hover {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #10b981 !important;
  transform: translateY(-1px);
}

.btn-cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn-cart-toggle:hover {
  filter: brightness(1.15);
  transform: scale(1.02);
}

.btn-cart-toggle.active {
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

/* ========================================================================= */
/* ESTILOS DISTINTIVOS PARA BOTONES ACTIVOS EN BARRA DE CAÍDOS               */
/* ========================================================================= */
#quick-caidos-controls button {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

#quick-caidos-controls button:hover {
  transform: translateY(-1px);
  filter: brightness(1.18);
}

/* 1. Nivel Comercial (Tiers) Activo: Ámbar / Dorado Neón */
#tier-blocks-nav button.active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45) !important;
  font-weight: 800 !important;
}

/* 2. Filtro de Zonas Activo: Azul Eléctrico */
#zone-quick-nav button.active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.45) !important;
  font-weight: 800 !important;
}

/* 3. Filtro de Descubrimiento (Timeframe) Activo: Ámbar / Dorado Neón */
#timeframe-quick-nav button {
  border-color: rgba(245, 158, 11, 0.35);
  color: #e5e7eb;
}

#timeframe-quick-nav button:hover {
  border-color: #fbbf24;
  color: #fef08a;
  background-color: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

#timeframe-quick-nav button.active {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  color: #ffffff !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5) !important;
  font-weight: 800 !important;
}

/* =========================================================================
   4. ALARMA VISUAL TITILANTE (CARTERA DE SEGUIMIENTO)
   ========================================================================= */
@keyframes pulse-tracking-alarm {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    border-color: rgba(239, 68, 68, 0.8);
    background: rgba(239, 68, 68, 0.16);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px 6px rgba(239, 68, 68, 0.95);
    border-color: #ff3b30;
    background: rgba(239, 68, 68, 0.35);
    transform: scale(1.03);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    border-color: rgba(239, 68, 68, 0.8);
    background: rgba(239, 68, 68, 0.16);
    transform: scale(1);
  }
}

.tracking-btn-alarm {
  animation: pulse-tracking-alarm 1.1s infinite ease-in-out !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
}

/* =========================================================================
   5. LATIDO / ANIMACIÓN ACTIVA MOTOR RDAP (#nav-btn-monitor)
   ========================================================================= */
@keyframes pulse-rdap-active {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45);
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.12);
  }
  50% {
    box-shadow: 0 0 16px 3px rgba(245, 158, 11, 0.7), 0 0 8px rgba(251, 191, 36, 0.5);
    border-color: #fbbf24;
    background: rgba(245, 158, 11, 0.26);
    color: #ffffff;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45);
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.12);
  }
}

@keyframes flash-bolt {
  0%, 100% {
    opacity: 0.85;
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.6));
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
    filter: drop-shadow(0 0 8px #fbbf24) drop-shadow(0 0 12px #f59e0b);
  }
}

#nav-btn-monitor {
  animation: pulse-rdap-active 2.2s infinite ease-in-out !important;
  transition: all 0.3s ease;
}

#nav-btn-monitor svg {
  animation: flash-bolt 2.2s infinite ease-in-out !important;
  display: inline-block;
  vertical-align: middle;
}

@keyframes pulseAlarm {
  0% {
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.4), 0 20px 50px rgba(0,0,0,0.8);
    border-color: #ef4444;
  }
  100% {
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.85), 0 0 30px rgba(248, 113, 113, 0.6), 0 20px 50px rgba(0,0,0,0.9);
    border-color: #f87171;
  }
}


/* AUTH OVERLAY MODAL (MODO PRIVADO) */
.auth-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.auth-modal-card { background: #111827; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; width: 100%; max-width: 400px; padding: 28px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); }
.auth-modal-title { font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: 6px; }
.auth-modal-sub { font-size: 0.85rem; color: #94a3b8; margin-bottom: 20px; }
.auth-form-group { margin-bottom: 14px; text-align: left; }
.auth-form-group label { display: block; font-size: 0.78rem; font-weight: 600; color: #94a3b8; margin-bottom: 6px; }
.auth-form-group input { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 6px; padding: 10px 12px; color: #fff; font-size: 0.9rem; outline: none; box-sizing: border-box; }
.auth-form-group input:focus { border-color: #38bdf8; }
.auth-btn-submit { width: 100%; background: #38bdf8; color: #0f172a; font-weight: 700; border: none; padding: 10px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; margin-top: 10px; }
.auth-btn-submit:hover { background: #7dd3fc; }
.auth-err-msg { color: #f87171; font-size: 0.8rem; margin-top: 10px; display: none; text-align: center; }
