/* css/styles.css - Identidad Visual Seduka Cargo (Light Corporate + Dark Header) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --dark-header: #0F1115;
  --dark-elevated: #1A1D24;
  --border-light: #E2E8F0;
  --border-dark: #2A2F3B;
  --primary: #FF6B00;
  --primary-hover: #E55D00;
  --primary-soft: rgba(255, 107, 0, 0.10);
  --text-dark: #0F172A;
  --text-muted: #475569;
  --text-light: #FFFFFF;
  --text-light-muted: #94A3B8;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* FRANJA SUPERIOR NEGRA (Navbar) */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--dark-header);
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: var(--text-light);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links button, .nav-links a {
  background: none;
  border: none;
  color: var(--text-light-muted);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-links button:hover, .nav-links a:hover, .nav-links button.active-nav {
  color: var(--primary);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.28);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--dark-header);
  color: var(--text-light);
}

.btn-dark:hover {
  background: var(--dark-elevated);
}

.btn-outline-light {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-dark);
}

.btn-outline-light:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.84rem;
}

/* HERO COMPACTO CON CONTRASTE BLANCO/NEGRO */
.hero-banner {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 44px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
}

.hero-banner h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.hero-banner h1 span {
  color: var(--primary);
}

.hero-banner p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 22px;
  max-width: 560px;
}

.hero-kpis {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.kpi strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
}

.kpi span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* TARJETA RASTREADOR EN CONTRASTE OSCURO */
.tracker-card {
  background: var(--dark-header);
  color: var(--text-light);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.tracker-card .form-control {
  background: var(--dark-elevated);
  border-color: var(--border-dark);
  color: var(--text-light);
}

/* SISTEMA DE PESTAÑAS DINÁMICAS (TABS) */
.tabs-wrapper {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 74px;
  z-index: 90;
}

.tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-dark);
  background: #E2E8F0;
}

.tab-btn.active {
  background: var(--dark-header);
  color: var(--text-light);
  border-color: var(--dark-header);
  box-shadow: 0 4px 12px rgba(15, 17, 21, 0.15);
}

.tab-btn.active .tab-dot {
  background: var(--primary);
}

.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94A3B8;
}

/* CONTENIDO DE PESTAÑAS CON ANIMACIÓN SUAVE */
.tab-panel {
  display: none;
  padding: 38px 0 64px;
  animation: slideFadeIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-panel.active {
  display: block;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TARJETAS BLANCAS Y FORMULARIOS */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 0.94rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

/* CAJA DE RESULTADO DE COTIZACIÓN (CONTRASTE NEGRO/NARANJA) */
.quote-box {
  background: var(--dark-header);
  color: var(--text-light);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.quote-price {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary);
  margin: 6px 0;
}

.quote-line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-dark);
  font-size: 0.88rem;
  color: var(--text-light-muted);
}

.quote-line strong {
  color: var(--text-light);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-dark);
}

.checkbox-row input[type="checkbox"] {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
}

/* BADGES Y TIMELINE */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-orange { background: var(--primary-soft); color: var(--primary); }
.badge-green { background: rgba(16, 185, 129, 0.14); color: var(--success); }
.badge-yellow { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.badge-red { background: rgba(239, 68, 68, 0.14); color: var(--danger); }

.timeline {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.timeline-step {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light-muted);
}

.timeline-step.active {
  color: var(--text-light);
  font-weight: 700;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border-dark);
  margin: 0 auto 6px;
}

.timeline-step.active .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.28);
}

/* FOOTER NEGRO */
footer {
  background: var(--dark-header);
  color: var(--text-light-muted);
  padding: 36px 0;
  font-size: 0.88rem;
  border-top: 1px solid var(--border-dark);
}

@media (max-width: 860px) {
  .hero-grid, .calc-layout, .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

/* PANTALLA DE ENTRADA CORPORATIVA (SPLASH SCREEN RÁPIDO) */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #0F1115;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  animation: pulseLogo 0.9s ease-out;
}

.splash-bar {
  width: 180px;
  height: 3px;
  background: #1E222B;
  border-radius: 999px;
  margin-top: 18px;
  overflow: hidden;
}

.splash-progress {
  width: 100%;
  height: 100%;
  background: #FF6B00;
  transform-origin: left;
  animation: loadProgress 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseLogo {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes loadProgress {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* INTEGRACIÓN PROFESIONAL DE LOGOTIPO */
.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
  display: block;
}

.splash-logo-img {
  width: 260px;
  max-width: 80vw;
  height: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
  animation: pulseLogo 0.9s ease-out;
}

/* TAMAÑO INTELIGENTE DEL LOGOTIPO (IMPONENTE EN PC / COMPACTO EN MÓVIL) */
.navbar {
  height: auto;
}

.nav-content {
  height: 86px;
}

.tabs-wrapper {
  top: 86px;
}

.brand-logo-img {
  height: 58px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
  display: block;
}

@media (max-width: 768px) {
  .nav-content {
    height: 70px;
  }
  .tabs-wrapper {
    top: 70px;
  }
  .brand-logo-img {
    height: 42px;
  }
}