* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f5f6f8;
  color: #1c1e21;
}

.pantalla-centrada {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tarjeta {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 32px;
  width: 100%;
  max-width: 360px;
}

.tarjeta h1 {
  font-size: 1.4rem;
  margin: 0 0 24px;
  text-align: center;
}

.campo {
  margin-bottom: 16px;
}

.campo label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d3d9;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.boton-primario {
  padding: 10px 18px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.boton-primario:disabled {
  background: #9db8e8;
  cursor: not-allowed;
}

.boton-secundario {
  background: none;
  border: 1px solid #d0d3d9;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.boton-peligro {
  padding: 10px 18px;
  background: #fff;
  color: #b42318;
  border: 1px solid #fda29b;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.boton-exito {
  padding: 8px 16px;
  background: #12b76a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.boton-rechazo {
  padding: 8px 16px;
  background: #fff;
  color: #b42318;
  border: 1px solid #fda29b;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.mensaje-error {
  color: #d92d20;
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 1em;
  text-align: center;
}

/* --- Layout general --- */

.barra-superior {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.barra-superior h1 {
  font-size: 1.1rem;
  margin: 0;
}

.nav-secciones {
  display: flex;
  gap: 4px;
  background: #fff;
  padding: 0 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
}

.nav-secciones a {
  display: inline-block;
  padding: 12px 16px;
  text-decoration: none;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.nav-secciones a.activo {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.contenido {
  padding: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.contenido h1 {
  margin-top: 0;
}

/* --- Tarjetas y grillas --- */

.grilla-resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.tarjeta-resumen {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tarjeta-resumen .numero {
  font-size: 1.6rem;
  font-weight: 700;
}

.tarjeta-resumen .etiqueta {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 4px;
}

.grupo-titulo {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 20px 0 10px;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sin-datos {
  color: #6b7280;
  font-size: 0.9rem;
  padding: 12px 0;
}

/* --- Listas / tablas simples --- */

.fila-lista {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.fila-lista .principal {
  font-weight: 600;
}

.fila-lista .secundario {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
}

.badge-estado {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-estado.pendiente { background: #fef0c7; color: #b54708; }
.badge-estado.en_revision { background: #d1e9ff; color: #175cd3; }
.badge-estado.validado { background: #d1fadf; color: #027a48; }
.badge-estado.rechazado { background: #fee4e2; color: #b42318; }
.badge-estado.activo { background: #d1fadf; color: #027a48; }
.badge-estado.inactivo { background: #f2f4f7; color: #475467; }
.badge-estado.taller { background: #fef0c7; color: #b54708; }
.badge-estado.sin_chofer { background: #f2f4f7; color: #475467; }
.badge-estado.baja { background: #fee4e2; color: #b42318; }

.filtros {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filtros button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #d0d3d9;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

.filtros button.activo {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* --- Modal simple --- */

.fondo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.modal-acciones {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.foto-evidencia {
  max-width: 100%;
  border-radius: 8px;
  margin: 10px 0;
}

.oculto {
  display: none !important;
}

.fila-resumen {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid #f2f4f7;
}

.fila-resumen.destacada {
  font-weight: 700;
  border-bottom: none;
}

.secundario {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0 0 10px;
}
