/* Auth pages (signup/login) -- a distinct split hero/form layout, separate
   from the internal console's minimal utility styling in app.css. Loaded
   only on these pages via base.html's extra_head block. */

/* app.css's .page wraps every {% block content %} in a 1080px-capped,
   centered container -- fine for the internal console, but the auth
   screens need to fill the full viewport edge-to-edge. Cancel it out
   only here via the body's :has(), scoped to auth pages. */
body:has(.auth-shell) .page {
  max-width: none;
  margin: 0;
  padding: 0;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
}

.auth-hero {
  flex: 0 0 44%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  color: #fff;
  /* Placeholder gradient standing in for a real photo -- once an image is
     supplied, add background-image/background-size/position here and keep
     this gradient as a semi-transparent overlay (::before) for legibility. */
  background: radial-gradient(120% 120% at 20% 15%, #1b2436 0%, #0a0e17 55%, #05070c 100%);
  overflow: hidden;
}

.auth-logo {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.auth-logo .sub {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.auth-hero-mid { margin: auto 0; padding: 40px 0; }
.auth-hero-mid h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 18px;
}
.auth-hero-mid h1 .accent { color: #4f8dff; }
.auth-hero-mid .divider {
  width: 46px;
  height: 3px;
  background: #4f8dff;
  border-radius: 2px;
  margin-bottom: 18px;
}
.auth-hero-mid p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem;
  max-width: 360px;
  margin: 0;
}

.auth-hero-features { display: flex; gap: 28px; flex-wrap: wrap; }
.auth-hero-feature { max-width: 160px; }
.auth-hero-feature svg { color: rgba(255, 255, 255, 0.85); margin-bottom: 10px; }
.auth-hero-feature h4 { margin: 0 0 4px; font-size: 0.92rem; font-weight: 700; }
.auth-hero-feature p { margin: 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); }

.auth-hero-footer {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 32px;
}

.auth-form-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  min-width: 0;
}
.auth-form-top {
  display: flex;
  justify-content: flex-end;
  padding: 24px 48px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px 48px;
}
.auth-form-card { width: 100%; max-width: 400px; }
.auth-form-card h2 { font-size: 1.6rem; margin: 0 0 6px; }
.auth-form-card > p.sub { color: var(--text-muted); margin: 0 0 28px; font-size: 0.95rem; }

.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input svg.leading {
  position: absolute;
  left: 14px;
  color: #9aa2b1;
  pointer-events: none;
}
/* [type] bumps specificity above app.css's "form input[type=...]" rules
   (which otherwise win on element-count and clobber this padding). */
.auth-input input[type] {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}
.auth-input input[type]:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.auth-input.has-toggle input[type] { padding-right: 42px; }
.auth-input .toggle-visibility {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9aa2b1;
  padding: 4px;
  display: flex;
}
.auth-input .toggle-visibility:hover { color: var(--text-muted); }

.auth-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.auth-submit:hover { background: var(--brand-dark); }

.auth-legal { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 22px; }
.auth-legal a { color: var(--brand); }

@media (max-width: 900px) {
  .auth-hero { display: none; }
  .auth-form-top { padding: 20px 20px 0; }
  .auth-form-wrap { padding: 20px 20px 40px; }
}

.auth-divider { border-top: 1px solid var(--border); margin: 22px 0 18px; }
.auth-forgot { display: block; text-align: right; font-size: 0.85rem; margin: -10px 0 20px; }

/* Hero footer with a legal nav alongside the copyright line (login page) --
   signup's hero footer is just the copyright text, this extends it. */
.auth-hero-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.auth-hero-footer nav a { color: rgba(255, 255, 255, 0.45); margin-left: 10px; }
.auth-hero-footer nav a:hover { color: rgba(255, 255, 255, 0.75); }
