/* Login / auth screens: split layout with a pine brand panel. Builds on the
   tokens in app.css; light + dark both handled via data-bs-theme. */

:root,
[data-bs-theme="light"] {
  --auth-hero-from: #134e47;
  --auth-hero-to: #1d7a6e;
  --auth-ridge-far: rgba(255, 255, 255, 0.08);
  --auth-ridge-near: rgba(255, 255, 255, 0.14);
  --auth-panel-bg: #ffffff;
}

[data-bs-theme="dark"] {
  --auth-hero-from: #0b2420;
  --auth-hero-to: #14524a;
  --auth-ridge-far: rgba(255, 255, 255, 0.05);
  --auth-ridge-near: rgba(255, 255, 255, 0.09);
  --auth-panel-bg: #14191b;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 992px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

/* Brand panel. */
.auth-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 80% 15%, rgba(255, 214, 140, 0.22), transparent 30%),
    linear-gradient(160deg, var(--auth-hero-from), var(--auth-hero-to));
}
.auth-hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  width: 100%;
  padding: 2.5rem 3rem 0;
}
.auth-hero-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 14ch;
  margin-bottom: 1rem;
}
.auth-hero-lead {
  max-width: 38ch;
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 1.75rem;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  opacity: 0.92;
}
.auth-features i {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.12);
}

.auth-scene {
  display: block;
  width: calc(100% + 6rem);
  height: auto;
  margin: 0 -3rem;
}
.auth-scene .ridge-far { fill: var(--auth-ridge-far); }
.auth-scene .ridge-near { fill: var(--auth-ridge-near); }
.auth-scene .road { fill: rgba(0, 0, 0, 0.18); }
.auth-scene .rv rect:first-child,
.auth-scene .rv-cab { fill: #f4f1ea; }
.auth-scene .rv-window { fill: #4dcbb8; }
.auth-scene .rv-wheel { fill: #1b2124; stroke: #f4f1ea; stroke-width: 2; }

/* Brand lockup. */
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}
.auth-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.15);
}
.auth-brand-compact { color: var(--bs-body-color); }
.auth-brand-compact .auth-brand-mark {
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
}

/* Form panel. */
.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem 2rem;
  background: var(--auth-panel-bg);
}
@media (min-width: 576px) {
  .auth-panel { padding: 1.5rem 2.5rem 2.5rem; }
}
.auth-panel-top {
  display: flex;
  align-items: center;
}
.auth-form-wrap {
  width: 100%;
  max-width: 24rem;
  margin: auto;
  padding: 2.5rem 0;
}
.auth-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
}
.auth-subtitle {
  color: var(--bs-secondary-color);
  margin-bottom: 2rem;
}

.auth-form-wrap .form-control {
  border-radius: 0.65rem;
}
.auth-form-wrap .form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.18);
}

.auth-password .form-control { padding-right: 3rem; }
.auth-reveal {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--bs-secondary-color);
}
.auth-reveal:hover { color: var(--bs-body-color); }
.auth-reveal:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}
/* Keep the eye clear of the invalid-state icon. */
.auth-password .form-control.is-invalid { background-position: right 3rem center; }

.auth-submit {
  border-radius: 0.65rem;
  font-weight: 600;
  min-height: 48px;
}
/* The dark-theme teal is light, so white text would fail contrast. */
[data-bs-theme="dark"] .auth-submit {
  --bs-btn-color: #0b2420;
  --bs-btn-hover-color: #0b2420;
  --bs-btn-active-color: #0b2420;
}
.auth-submit i { transition: transform 0.15s ease; }
.auth-submit:hover i { transform: translateX(3px); }

.auth-help {
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit i { transition: none; }
}
