/* ===========================================================================
   public/auth/auth.css — Shared styling for the auth pages.
   ---------------------------------------------------------------------------
   Used by login.html, forgot.html, reset.html. Deliberately decoupled from
   the main SPA stylesheet (style.css + style/*.css) so unauthenticated
   pages don't pull in the full UI bundle. Inlined-feel layout: small card,
   centered, brand logo strip on top.
   =========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #e8f0fb;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;   /* dynamic viewport unit; == 100vh on desktop */
  color: #0f172a;
}

.topbar {
  height: 56px;
  background: #fff;
  border-top: 3px solid #2563eb;
  border-bottom: 1px solid #d8e0ed;
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
}
.logo {
  display: inline-flex;
  align-items: center;
}
.logo img {
  height: 34px;
  width: auto;
  display: block;
  border-radius: 6px;   /* soften the opaque logo-tile edges */
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  background: #fff;
  border: 1px solid #d8e0ed;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
}
.card h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.card p.sub { font-size: 13px; color: #64748b; margin-bottom: 28px; }

.field { margin-bottom: 16px; }
label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .7px;
  display: block;
  margin-bottom: 6px;
}
input[type=email],
input[type=password],
input[type=text] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d8e0ed;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  outline: none;
  transition: border-color .2s, background .2s;
  background: #f8fafc;
}
input:focus { border-color: #2563eb; background: #fff; }

.banner {
  font-size: 12.5px;
  line-height: 1.5;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 20px;
}
.banner.error {
  color: #b91c1c;
  background: rgba(239, 68, 68, .07);
  border: 1px solid rgba(239, 68, 68, .25);
}
.banner.info {
  color: #166534;
  background: rgba(22, 163, 74, .07);
  border: 1px solid rgba(22, 163, 74, .25);
}
.banner:empty { display: none; }

button {
  width: 100%;
  padding: 11px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  letter-spacing: .2px;
  transition: background .2s;
}
button:hover { background: #1d4ed8; }
button:disabled { background: #94a3b8; cursor: not-allowed; }

.foot {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin-top: 18px;
}
.foot a { color: #2563eb; text-decoration: none; font-weight: 500; }
.foot a:hover { text-decoration: underline; }

/* ── Mobile-only addition (phones ≤480px) ──────────────────────────────────
   Slimmer topbar + logo, tighter card that never overflows the viewport, and
   ≥44px touch targets / ≥16px inputs (the latter also stops iOS auto-zoom on
   focus). Safe-area padding keeps the topbar clear of the notch. Desktop
   (≥768px) keeps the 56px bar, 380px card and 40px card padding untouched. */
@media (max-width: 480px) {
  .topbar {
    height: 52px;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .logo img { height: 28px; }

  .card {
    padding: 28px 22px;
    max-width: calc(100vw - 32px);
  }

  input[type=email],
  input[type=password],
  input[type=text] {
    font-size: 16px;     /* ≥16px stops iOS focus auto-zoom */
    min-height: 44px;
  }
  button { min-height: 44px; }
}
