/* login.css — enroute.delivery sign-in page
 * Drop into static/css/. Expects tokens.css to be loaded first.
 * Self-contained: no imports needed beyond Manrope font + tokens. */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: #fff;
  background: #0A0D0B;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

/* ===== Stage ============================================== */
.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #0A0D0B;
  overflow: hidden;
  color: #fff;
}
.stage .map-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  pointer-events: none;
  z-index: 1;
}
.stage::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 25%, rgba(0,170,61,0.12), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(0,0,0,0.55), transparent 60%);
  pointer-events: none;
  z-index: 2;
}

/* ===== Topbar ============================================= */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 36px 44px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}
.brand .mark { width: 70px; height: 28px; flex: 0 0 auto; }
.brand .dot  { color: #00AA3D; }

/* ===== Hero (bottom-left) ================================= */
.hero {
  position: absolute;
  left: 44px;
  bottom: 48px;
  z-index: 5;
  max-width: 440px;
}
.hero .eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: #00AA3D;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero .eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: #00AA3D;
}
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 800;
  color: #fff;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: rgba(255,255,255,0.4);
}

/* ===== Card (right, glass) ================================ */
.card {
  position: absolute;
  top: 50%;
  right: 44px;
  transform: translateY(-50%);
  width: 380px;
  background: rgba(20, 26, 22, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  color: #fff;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 36px;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.6),
    0 6px 12px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.06);
  z-index: 5;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: rgba(20, 26, 22, 0.92); }
}
.card .card-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.card .heading h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.card .heading .sub {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

/* ===== Form =============================================== */
.form { display: flex; flex-direction: column; gap: 14px; }
.form .field { display: flex; flex-direction: column; gap: 8px; }
.form label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}
.form .input-wrap { position: relative; display: flex; align-items: center; }

.form input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  font: inherit;
  font-size: 15px;
  color: #fff;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}
.form input::placeholder { color: rgba(255,255,255,0.35); }
.form input:focus {
  border-color: #00AA3D;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(0,170,61,0.22);
}
.form input.with-trail { padding-right: 44px; }

.form .input-trail {
  position: absolute; right: 6px;
  height: 32px; width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
}
.form .input-trail:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.form .forgot-btn {
  align-self: flex-start;
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.25);
}
.form .forgot-btn:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.form .submit {
  height: 48px;
  border: none;
  border-radius: 8px;
  background: #00AA3D;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  margin-top: 18px;
  transition:
    background 150ms ease,
    transform 80ms ease,
    box-shadow 150ms ease;
}
.form .submit:hover {
  background: #009335;
  box-shadow: 0 8px 22px -6px rgba(0,170,61,0.5);
}
.form .submit:active { transform: translateY(1px); }
.form .submit[disabled] { opacity: 0.6; cursor: progress; box-shadow: none; }

.form .submit .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form .error {
  font-size: 12px;
  color: #ff8a8e;
  margin-top: -4px;
}

/* ===== Responsive ========================================= */
@media (max-width: 860px) {
  body { overflow: auto; }
  .stage {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    padding: 0 0 32px;
    display: flex;
    flex-direction: column;
  }
  .stage .map-bg {
    opacity: 0.14;
    background-position: center 30%;
  }
  .topbar { padding: 22px 22px 0; }
  .brand { font-size: 20px; gap: 10px; }
  .brand .mark { width: 54px; height: 22px; }
  .hero {
    position: static;
    max-width: none;
    padding: 28px 22px 0;
  }
  .hero .eyebrow {
    font-size: 10px;
    margin-bottom: 12px;
    letter-spacing: 0.18em;
  }
  .hero .eyebrow::before { width: 16px; }
  .hero h1 {
    font-size: clamp(32px, 9vw, 44px);
    line-height: 1;
    letter-spacing: -0.035em;
  }
  .card {
    position: static;
    transform: none;
    margin: 28px 16px 16px;
    width: auto;
    max-width: none;
    padding: 28px 22px;
    border-radius: 18px;
  }
  .card .card-inner { gap: 22px; }
  .card .heading h2 { font-size: 20px; }
  .form input { font-size: 16px; height: 48px; }
  .form .submit { height: 52px; font-size: 15px; margin-top: 14px; }
  .form .forgot-btn { margin-top: 8px; font-size: 13px; padding: 6px 0; }
}
@media (max-width: 480px) {
  .topbar { padding: 18px 18px 0; }
  .hero { padding: 22px 18px 0; }
  .hero h1 { font-size: clamp(30px, 10vw, 40px); }
  .card { margin: 22px 14px 14px; padding: 26px 20px; }
}
@media (max-height: 600px) and (max-width: 860px) {
  .hero h1 { font-size: 30px; }
  .card { margin-top: 16px; }
}
