@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-obsidian: #F8FAFC; /* Fondo Slate Claro ultra limpio */
  --bg-card: #FFFFFF;    /* Tarjetas blancas sólidas premium */
  --bg-card-hover: #F1F5F9;
  --border-glass: rgba(15, 23, 42, 0.08); /* Borde sutil gris oscuro */
  --glow-green: #10B981;
  --glow-blue: #3B82F6;
  --glow-amber: #F59E0B;
  --glow-coral: #EF4444;
  --glow-purple: #8B5CF6;
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-obsidian);
  color: #000000 !important; /* Letras negro puro sólido para máximo contraste */
  font-family: var(--font-body);
  min-height: 100vh;
  background-image: 
    radial-gradient(at 10% 20%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(139, 92, 246, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: #000000 !important; /* Títulos en negro puro absoluto */
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Glassmorphism Cards en Modo Claro */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  background: #FFFFFF;
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.08);
}

/* Premium Navbar Claro */
.glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
}

.navbar-brand {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-dark .navbar-nav .nav-link {
  color: #475569 !important; /* Gris oscuro para enlaces inactivos */
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: #3B82F6 !important; /* Azul para activos */
}

.navbar-dark .navbar-toggler {
  color: #0F172A !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.navbar-dark .navbar-toggler-icon {
  filter: invert(1); /* Invierte color para que se vea negro */
}

/* Custom Buttons with Glow */
.btn-glow-blue {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
  border: none;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
  transition: all 0.3s ease;
  font-family: var(--font-title);
  font-weight: 500;
  border-radius: 10px;
}

.btn-glow-blue:hover {
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
  color: white;
}

.btn-glow-green {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  color: white;
  border: none;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
  transition: all 0.3s ease;
  font-family: var(--font-title);
  font-weight: 500;
  border-radius: 10px;
}

.btn-glow-green:hover {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
  color: white;
}

/* Glow Borders on Focus */
.form-control, .form-select {
  background-color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #0F172A;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  background-color: #FFFFFF;
  border-color: #3B82F6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
  color: #0F172A;
}

.form-control::placeholder {
  color: #94A3B8;
}

/* Status Badges */
.badge-status {
  padding: 6px 12px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.badge-recibido {
  background: rgba(59, 130, 246, 0.08);
  color: #2563EB;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-diagnostico {
  background: rgba(139, 92, 246, 0.08);
  color: #7C3AED;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge-repuesto {
  background: rgba(245, 158, 11, 0.08);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-reparado {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-entregado {
  background: rgba(236, 72, 153, 0.08);
  color: #DB2777;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.badge-sinreparacion {
  background: rgba(239, 68, 68, 0.08);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Metric Cards */
.metric-val {
  font-size: 2.2rem;
  font-weight: 700;
  color: #0F172A; /* Números en negro sólido */
  margin-top: 8px;
  margin-bottom: 0;
}

.metric-lbl {
  font-size: 0.85rem;
  color: #475569; /* Gris oscuro nítido */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Web Camera Interface */
.camera-preview {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px;
  background-color: #0F172A;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  overflow: hidden;
  position: relative;
}

.camera-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captured-image-container {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  overflow: hidden;
}

.captured-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Clean Custom Table */
.custom-table {
  color: #000000 !important; /* Letras de celdas en negro puro */
  vertical-align: middle;
}

.custom-table th {
  border-top: none;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  font-family: var(--font-title);
  color: #000000 !important; /* Negro puro para los th */
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 16px;
}

.custom-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.custom-table tr:hover td {
  background-color: rgba(0, 0, 0, 0.01);
}

/* Timelines (Trazabilidad) */
.timeline-trak {
  border-left: 2px solid rgba(59, 130, 246, 0.3);
  padding-left: 24px;
  position: relative;
  margin-left: 10px;
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item::before {
  content: '';
  width: 12px;
  height: 12px;
  background-color: #3B82F6;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  position: absolute;
  left: -31px;
  top: 4px;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.timeline-time {
  font-size: 0.8rem;
  color: #64748B;
  font-weight: 500;
}

/* Autocomplete indicators */
.autocomplete-active {
  animation: autocomplete-glow 1.5s infinite alternate;
}

@keyframes autocomplete-glow {
  from {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.15);
  }
  to {
    border-color: #3B82F6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.35);
  }
}

/* Micro-animations */
.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

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

/* Estilo Personalizado Distintivo para el Módulo de Órdenes Activas */
.active-orders-card {
  background: #FFFFFF !important; /* Fondo blanco sólido para máximo contraste claro */
  border: 1px solid rgba(59, 130, 246, 0.18) !important; /* Delicado borde azul */
  box-shadow: 0 10px 40px -15px rgba(59, 130, 246, 0.08) !important; /* Suave sombra cian */
  transition: all 0.3s ease;
}

.active-orders-card:hover {
  border-color: rgba(59, 130, 246, 0.35) !important;
  box-shadow: 0 15px 45px -10px rgba(59, 130, 246, 0.15) !important;
}

/* =========================================================================
   Corrección de Visibilidad de Tipografía en Tabla de Órdenes de Servicio Activas (Modo Claro)
   ========================================================================= */
.active-orders-card .custom-table th {
  color: #000000 !important; /* Negro puro absoluto para máximo contraste */
  font-weight: 750 !important;
  font-size: 0.85rem !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.12) !important;
}

.active-orders-card .custom-table td {
  color: #000000 !important; /* Negro puro sólido para máxima legibilidad de celdas */
  font-weight: 600 !important; /* Grosor aumentado para lectura instantánea */
}

.active-orders-card .custom-table .text-muted {
  color: #000000 !important; /* Negro puro para subtextos (DNI, specs) para evitar desvanecimiento */
  font-weight: 500;
}

.active-orders-card .custom-table .font-monospace.text-muted {
  color: #000000 !important; /* Negro puro para el IMEI */
  font-weight: 600;
}

/* Modales del Sistema en Modo Claro */
.modal-content.glass-card {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.modal-header, .modal-footer {
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.modal-title {
  color: #0F172A !important;
}

.modal-body select, .modal-body textarea, .modal-body input {
  background-color: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #0F172A !important;
}

.modal-body select:focus, .modal-body textarea:focus, .modal-body input:focus {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15) !important;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.08) !important;
  color: #1D4ED8 !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
}

.btn-close-white {
  filter: invert(1);
}

/* Alta Visibilidad para Etiquetas de Formulario (Evita transparencia) */
label, .form-label {
  color: #000000 !important; /* Negro puro de alto contraste */
  font-weight: 700 !important;
  opacity: 1 !important;
  font-family: var(--font-title);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

/* Botón Premium para Pagar Crédito Granular */
.btn-pay-credit {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-family: var(--font-title);
  font-weight: 600 !important;
  letter-spacing: 0.02em;
}

.btn-pay-credit:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%) !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35) !important;
  transform: translateY(-1.5px);
  color: #FFFFFF !important;
}

.btn-pay-credit:active {
  transform: translateY(0.5px);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15) !important;
}

/* =========================================================================
   BARRAS DE BÚSQUEDA PREMIUM (Con Icono de Lupa Integrado y Estilo Pill)
   ========================================================================= */
.search-bar-group {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
  border-radius: 30px !important;
  overflow: hidden;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
}

.search-bar-group:focus-within {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 4px 15px -4px rgba(59, 130, 246, 0.1) !important;
}

.search-bar-group .input-group-text {
  background: transparent !important;
  border: none !important;
  color: #3B82F6 !important; /* Lupa azul brillante premium */
  font-size: 0.92rem !important;
  padding-left: 14px !important;
  padding-right: 6px !important;
  display: flex !important;
  align-items: center !important;
}

.search-bar-group .input-group-text i {
  font-weight: bold !important;
  font-size: 0.95rem !important;
  color: #3B82F6 !important;
  transition: transform 0.3s ease !important;
  display: inline-block !important;
}

.search-bar-group:focus-within .input-group-text i {
  transform: scale(1.18); /* Micro-animación de lupa al hacer foco */
}

.search-bar-group .form-control {
  border: none !important;
  background: transparent !important;
  color: #000000 !important;
  font-weight: 500 !important;
  padding-left: 4px !important;
  box-shadow: none !important;
  font-size: 0.85rem !important;
}

.search-bar-group .form-control::placeholder {
  color: #94A3B8 !important;
  font-weight: 400 !important;
}
