/**
 * GoCar Integration Hub - Hoja de Estilos Corporativa Grupo GoCar
 * Paleta: Azul Marino Corporativo (#0b2545, #134074), Acento Rojo (#d90429), Fondos Neutros (#f8f9fa, #ffffff)
 */

:root {
  --gocar-primary: #0b2545;
  --gocar-secondary: #134074;
  --gocar-accent: #d90429;
  --gocar-accent-hover: #b50322;
  --gocar-bg-light: #f4f6f9;
  --gocar-card-bg: #ffffff;
  --gocar-border: #e2e8f0;
  --gocar-text-dark: #1e293b;
  --gocar-text-muted: #64748b;
  --gocar-sidebar-width: 260px;
  --gocar-salesforce-blue: #00a1e0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--gocar-bg-light);
  color: var(--gocar-text-dark);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Sidebar Corporativo */
.gocar-sidebar {
  width: var(--gocar-sidebar-width);
  background-color: var(--gocar-primary);
  color: #ffffff;
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gocar-sidebar .brand {
  padding: 1.1rem 1.25rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-logo {
  max-height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.topbar-brand-logo {
  max-height: 28px;
  width: auto;
}

.gocar-sidebar .brand h5 {
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  color: #ffffff;
}

.gocar-sidebar .brand span.hub-tag {
  color: #60a5fa;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gocar-nav {
  padding: 1rem 0;
  flex-grow: 1;
  overflow-y: auto;
}

.gocar-nav .nav-item {
  margin: 2px 12px;
}

.gocar-nav .nav-link {
  color: #cbd5e1;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}

.gocar-nav .nav-link i {
  font-size: 1.15rem;
  margin-right: 0.85rem;
  width: 22px;
  text-align: center;
}

.gocar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.gocar-nav .nav-link.active {
  background-color: var(--gocar-secondary);
  color: #ffffff;
  font-weight: 600;
  border-left: 4px solid var(--gocar-accent);
}

/* Área de Contenido Principal */
.gocar-main {
  margin-left: var(--gocar-sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gocar-topbar {
  background-color: #ffffff;
  height: 64px;
  border-bottom: 1px solid var(--gocar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 900;
}

.gocar-content {
  padding: 2rem;
  flex-grow: 1;
}

/* Cards Corporativas */
.card-kpi {
  background: #ffffff;
  border: 1px solid var(--gocar-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-kpi .kpi-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gocar-text-muted);
  font-weight: 600;
}

.card-kpi .kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gocar-primary);
  margin-top: 0.35rem;
}

/* Badges de Estado */
.badge-status-ok {
  background-color: #dcfce7;
  color: #166534;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.badge-status-error {
  background-color: #fee2e2;
  color: #991b1b;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.badge-status-untested {
  background-color: #f1f5f9;
  color: #475569;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.badge-sandbox {
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

.badge-prod {
  background-color: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
}

/* Línea de Tiempo de Trazabilidad */
.timeline-container {
  position: relative;
  padding: 1rem 0 1rem 2rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #cbd5e1;
}

.timeline-step {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 3px solid var(--gocar-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-marker.completed {
  border-color: #22c55e;
  background-color: #22c55e;
  color: #ffffff;
}

.timeline-marker.failed {
  border-color: #ef4444;
  background-color: #ef4444;
  color: #ffffff;
}

/* Tabla Estilizada */
.table-gocar {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gocar-border);
}

.table-gocar thead th {
  background-color: #f8fafc;
  color: var(--gocar-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  border-bottom: 2px solid var(--gocar-border);
  padding: 0.85rem 1rem;
}

.table-gocar tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gocar-border);
}

/* Botones Corporativos */
.btn-gocar {
  background-color: var(--gocar-primary);
  color: #ffffff;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  border: none;
  transition: all 0.2s ease;
}

.btn-gocar:hover {
  background-color: var(--gocar-secondary);
  color: #ffffff;
}

.btn-gocar-accent {
  background-color: var(--gocar-accent);
  color: #ffffff;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  border: none;
  transition: all 0.2s ease;
}

.btn-gocar-accent:hover {
  background-color: var(--gocar-accent-hover);
  color: #ffffff;
}

/* Loader Inicial de la Aplicación (Previene FOUC de Menú) */
#initial-app-loader {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

@keyframes pulseLogo {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.88;
  }
}

.animate-pulse {
  animation: pulseLogo 1.6s infinite ease-in-out;
}

