/* VELOX GO · Accesos (pasajero, conductor, panel) — estilo blanco y negro */
:root {
  color-scheme: light;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: #10182c;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #10182c;
  --muted: #6b6b6b;
  --line: #eeeeee;
  --field: #eeeeee;
  --green: #05944f;
  --red: #e11900;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: #fff;
  overflow-x: hidden;
}

/* ---------- Pantalla de acceso ---------- */
.page-shell {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 24px max(40px, calc(24px + env(safe-area-inset-bottom)));
}

.brand { display: flex; align-items: center; margin: 0 0 40px; }
.brand-lockup { display: block; width: 190px; max-width: 70%; height: auto; }

.auth-card { padding: 0; border: 0; background: transparent; box-shadow: none; }

.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.auth-card h1 { margin: 8px 0 8px; color: #10182c; font-size: clamp(28px, 7vw, 36px); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; }
.intro { margin: 0 0 28px; color: var(--muted); font-size: 16px; line-height: 1.5; }

.field { margin: 0 0 16px; }
.field label { display: block; margin-bottom: 8px; color: #10182c; font-size: 15px; font-weight: 600; }
.field input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 2px solid transparent;
  border-radius: 8px;
  outline: none;
  background: var(--field);
  color: #10182c;
  font: inherit;
  font-size: 16px;
  transition: border-color .15s ease, background .15s ease;
}
.field input::placeholder { color: #8a8a8a; }
.field input:focus { border-color: #185cf3; background: #fff; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s ease, opacity .15s ease;
}
.btn:focus-visible, .session-bar button:focus-visible { outline: 3px solid #185cf3; outline-offset: 2px; }
.btn-primary { margin-top: 8px; background: #185cf3; color: #fff; }
.btn-primary:hover { background: #1149c9; }
.btn-primary:disabled { background: #eeeeee; color: #a6a6a6; cursor: wait; }
.btn-secondary { margin-top: 12px; background: #eeeeee; color: #10182c; }
.btn-secondary:hover { background: #e2e2e2; }

.message { min-height: 20px; margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.message.error { color: var(--red); }
.message.success { color: var(--green); }
.helper { margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.55; }

.identity-consent { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; color: #333; font-size: 14px; line-height: 1.5; cursor: pointer; }
.identity-consent input { width: 20px; height: 20px; flex: none; margin: 1px 0; accent-color: #185cf3; }
.identity-privacy { margin: 4px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------- Portal: app a pantalla completa con barra fina ---------- */
body:has(.portal:not([hidden])) { overflow: hidden; }
.portal {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #fff;
}
.session-bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: max(8px, env(safe-area-inset-top)) 16px 8px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}
.session-bar > span { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-logo { display: block; height: 26px; width: auto; flex: none; }
.session-bar strong { color: #10182c; font-weight: 600; }
.session-bar button {
  flex: none;
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #eeeeee;
  color: #10182c;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.session-bar button:hover { background: #e2e2e2; }
.session-state { color: var(--green); font-weight: 600; }
.portal iframe { display: block; width: 100%; min-height: 0; flex: 1; border: 0; background: #fff; }

@media (max-width: 520px) {
  .page-shell { padding-left: 20px; padding-right: 20px; }
  .brand { margin-bottom: 32px; }
  .session-bar { padding-left: 12px; padding-right: 12px; }
  .session-bar #portalEmail, .session-bar .session-sep { display: none; }
  .session-bar #portalHeading { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Botón "Instalar app": discreto y sin tapar el formulario */
.page-shell { padding-bottom: max(110px, calc(90px + env(safe-area-inset-bottom))); }
body:has(.portal:not([hidden])) .pwa-install-button { display: none !important; }
