/* Login page: a split layout with a road-cycling photo on the left.
   Loaded after dashboard.css, whose tokens (--page, --surface, --text-*,
   --series-*) it uses. Photo: Urban Vintage on Unsplash (Unsplash License),
   self-hosted because the CSP only allows same-origin images. */

/* ---------------------------------------------------------------- layout */

.login-page {
  min-height: 100vh; min-height: 100dvh;
  max-width: none; margin: 0; padding: 0; gap: 0;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
}
.login-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  justify-content: space-between;
  background-color: #2b3a4a;
  background-image:
    linear-gradient(180deg, rgba(8, 14, 24, 0.62) 0%, rgba(8, 14, 24, 0.18) 42%, rgba(8, 14, 24, 0) 62%, rgba(8, 14, 24, 0.35) 100%),
    url("login-hero.jpg");
  background-size: cover;
  background-position: center 62%;
}
.hero-copy { position: relative; padding: 48px 48px 0; max-width: 560px; color: #fff; }
.hero-copy .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
.hero-copy h2 {
  margin-top: 8px; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1;
  color: #fff; letter-spacing: -0.02em; font-weight: 700;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero-copy p { margin-top: 12px; font-size: 16px; color: rgba(255, 255, 255, 0.88); max-width: 36ch; }
.photo-credit {
  position: relative; margin: 0; padding: 0 16px 12px; align-self: flex-end;
  font-size: 11px; color: rgba(255, 255, 255, 0.7);
}

.login-side { display: grid; place-items: center; padding: 32px 24px; background: var(--page); }
.login-card { width: min(100%, 360px); display: grid; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand-ring { fill: none; stroke: var(--series-1); stroke-width: 3; }
.brand-teeth { fill: none; stroke: var(--series-1); stroke-width: 5; stroke-dasharray: 3.2 3.08; }
.brand-hub { fill: var(--series-1); }
.login-card h1 { margin: 0; font-size: 22px; font-weight: 700; }
.login-card .lede { color: var(--text-secondary); margin-top: -6px; }
.login-card label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.login-card input {
  font: inherit; font-size: 16px; color: var(--text-primary); background: var(--surface);
  border: 1px solid var(--baseline); border-radius: 8px; padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-card input:focus { outline: none; border-color: var(--series-1); box-shadow: 0 0 0 3px var(--area-1); }
.login-card button {
  font: inherit; font-size: 15px; font-weight: 600; color: #fff; background: var(--series-1);
  border: 0; border-radius: 8px; padding: 11px 14px; cursor: pointer; margin-top: 4px;
  transition: filter 0.15s, transform 0.05s;
}
.login-card button:hover { filter: brightness(1.08); }
.login-card button:active { transform: translateY(1px); }
.login-error {
  color: var(--critical); background: color-mix(in srgb, var(--critical) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--critical) 30%, transparent);
  border-radius: 8px; padding: 8px 12px;
}
.login-foot { color: var(--text-muted); font-size: 12px; text-align: center; }

/* Phone and narrow tablet: the photo becomes a banner above the form. */
@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-hero {
    min-height: 260px;
    background-image:
      linear-gradient(180deg, rgba(8, 14, 24, 0.6) 0%, rgba(8, 14, 24, 0.1) 65%, rgba(8, 14, 24, 0.3) 100%),
      url("login-hero-small.jpg");
    background-position: center 70%;
  }
  .hero-copy { padding: 24px 16px 0; }
  .hero-copy p { display: none; }
  .photo-credit { padding: 0 12px 8px; }
  .login-side { align-items: start; padding: 24px 16px 32px; }
}
