:root {
  /* PALETA INGENIERÍA AUTOMOTRIZ */
  --bg-color: #111418;           /* Gris Carbón Oscuro (Chasis) */
  --card-bg: #1a1f26;           /* Acero Titanio Oscuro (Componentes) */
  --card-inner: #14181f;        /* Interior de Tarjeta Metalizado */
  --border: #2d3542;            /* Gris Acero Industrial */
  --accent: #ff4500;            /* Rojo Freno / Naranja Turbo Alto Octanaje */
  --accent-hover: #e03e00;      /* Rojo Caliper de Competición */
  --text-main: #f1f5f9;         /* Blanco Titanio */
  --text-muted: #94a3b8;        /* Gris Aluminio Opaco */
  
  /* ESTADOS AUTOMOTRICES */
  --status-pendiente: #f59e0b;  /* Naranja Alerta / Precaución */
  --status-proceso: #3b82f6;    /* Azul Eléctrico Servicio */
  --status-completado: #10b981; /* Verde Inspección Aprobada */
  --status-entregado: #64748b;  /* Gris Metalizado Finalizado */
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  padding: 24px;
  font-size: 1.02rem; /* Zoom tipográfico general */
}

/* ANCHO AMPLIADO Y FLUIDO */
.container { 
  max-width: 1440px; /* Expandido de 1180px a 1440px para cubrir bordes vacíos */
  width: 95%;        /* Adaptabilidad en diferentes monitores */
  margin: 0 auto; 
}

header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 18px;
}

header h1 {
  color: var(--accent);
  margin: 0;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 2.2rem;
}

header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 2px;
  margin-top: 6px;
}

.grid { 
  display: grid; 
  grid-template-columns: 1fr 1.4fr; 
  gap: 24px; 
  margin-top: 24px; 
}

.card { 
  background: var(--card-bg); 
  padding: 24px; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
  box-shadow: 0 4px 16px rgba(0,0,0,0.4); 
}

.hidden { display: none !important; }

.search-group { display: flex; gap: 12px; margin-top: 12px; }
.results-list { margin-top: 12px; }
.result-item { 
  background: var(--card-inner); 
  padding: 14px 16px; 
  border-radius: 6px; 
  margin-bottom: 8px; 
  cursor: pointer; 
  border: 1px solid var(--border); 
  transition: border 0.2s; 
}
.result-item:hover { border-color: var(--accent); }

label { 
  display: block; 
  font-size: 0.88rem; 
  color: var(--text-muted); 
  margin-top: 14px; 
  margin-bottom: 6px; 
  text-transform: uppercase; 
  font-weight: 600; 
}

input, textarea, select { 
  width: 100%; 
  padding: 12px 14px; 
  border-radius: 6px; 
  border: 1px solid var(--border); 
  background: var(--card-inner); 
  color: #fff; 
  box-sizing: border-box; 
  font-size: 1rem; 
}

input:focus, textarea:focus, select:focus { 
  outline: none; 
  border-color: var(--accent); 
}

.btn { 
  padding: 12px 18px; 
  background-color: var(--accent); 
  color: #fff; 
  font-weight: bold; 
  border: none; 
  border-radius: 6px; 
  cursor: pointer; 
  transition: background 0.2s; 
  text-transform: uppercase; 
  font-size: 0.88rem; 
}
.btn:hover { background-color: var(--accent-hover); }
.btn-secondary { background: #2d3542; color: #fff; }
.btn-secondary:hover { background: #3e4859; }
.btn-sm { font-size: 0.82rem; padding: 8px 14px; }

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

.client-details p { margin: 6px 0; color: var(--text-muted); font-size: 0.95rem; }

.vehicle-card { 
  background: var(--card-inner); 
  border-radius: 8px; 
  padding: 18px; 
  border: 1px solid var(--border); 
  margin-bottom: 18px; 
  border-left: 5px solid var(--accent); 
}

.vehicle-header { display: flex; justify-content: space-between; align-items: center; }

.service-card { 
  background: #1a2028; 
  padding: 14px; 
  border-radius: 6px; 
  border-left: 4px solid var(--accent); 
  margin-top: 12px; 
  font-size: 0.92rem; 
}

.badge { 
  font-size: 0.78rem; 
  padding: 4px 12px; 
  border-radius: 12px; 
  font-weight: bold; 
  text-transform: uppercase; 
}
.badge-Pendiente { background: var(--status-pendiente); color: #000; }
.badge-En-Proceso { background: var(--status-proceso); color: #fff; }
.badge-Completado { background: var(--status-completado); color: #000; }
.badge-Entregado { background: var(--status-entregado); color: #fff; }

hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

/* MODALES AMPLIAOS */
.modal { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0,0,0,0.85); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 100; 
}

.modal-content { 
  background: var(--card-bg); 
  width: 100%; 
  max-width: 650px; 
  padding: 28px; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
  box-shadow: 0 8px 28px rgba(0,0,0,0.7); 
}

.modal-actions { display: flex; gap: 12px; margin-top: 22px; }

/* ESTILOS DE ELEMENTOS DE REFACCIONES */
.ref-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-inner);
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.92rem;
}

.ref-item span { color: var(--text-main); }
.ref-item strong { color: var(--accent); }

.ref-item-btn-del {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: bold;
  margin-left: 10px;
}

.ref-item-btn-del:hover { background: #dc2626; }

footer { 
  text-align: center; 
  margin-top: 45px; 
  color: var(--text-muted); 
  font-size: 0.85rem; 
  border-top: 1px solid var(--border); 
  padding-top: 18px; 
}

/* BARRA DE ACCESOS RÁPIDOS */
.quick-links-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--card-bg);
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.quick-links-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
  margin-right: 4px;
}

.quick-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-inner);
  color: var(--text-main);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.quick-link-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #1f2631;
  transform: translateY(-2px);
}

/* SISTEMA DE LOGIN (GLASSMORPHISM) */
#login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 24, 0.75); /* Fondo oscuro translúcido */
  backdrop-filter: blur(12px); /* Difuminado o Glassmorphism */
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-box {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-box h2 {
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}