/* ================================================================
   RankHarbour — account.css
   Account / sign-in page. Builds on rankharbour.css tokens.
   ================================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.auth-page [hidden] { display: none !important; }

/* ── BACKGROUND ── */
.auth-page { min-height: 100vh; color: var(--chalk); }
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('assets/images/harbour-hero-v1.png') center / cover no-repeat;
}
.auth-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(245, 245, 250, 0.30) 0%, rgba(245, 245, 250, 0.62) 80%),
    linear-gradient(180deg, rgba(245, 245, 250, 0.35) 0%, rgba(245, 245, 250, 0.05) 40%, rgba(245, 245, 250, 0.55) 100%);
}

/* ── HEADER ── */
.auth-header__logout {
  margin-left: auto;
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--chalk);
  white-space: nowrap;
  background: rgba(32, 35, 41, 0.04);
  border: 1px solid rgba(32, 35, 41, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.auth-header__logout:hover { border-color: var(--brass); background: rgba(133, 94, 182, 0.12); }
.auth-header__logout:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.auth-header__logout:disabled { opacity: 0.6; cursor: progress; }

/* ── LAYOUT ── */
.auth-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 112px var(--gutter) 56px;
}

/* ── GLASS CARD ── */
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 34px 32px 30px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(245, 245, 250, 0.42) 100%);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.auth-eyebrow { color: var(--brass); margin-bottom: 14px; }
.auth-title {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--chalk);
  margin-bottom: 22px;
}
.auth-title:focus { outline: none; }
.auth-title:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }
.auth-lede {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(32, 35, 41, 0.78);
  margin: -8px 0 22px;
}
.auth-lede--warn { color: #896015; margin-top: 0; }

/* ── NOTICE (live region) ── */
.auth-notice {
  font-size: 14px;
  line-height: 1.5;
  padding: 11px 14px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid rgba(32, 35, 41, 0.18);
  background: rgba(32, 35, 41, 0.06);
  color: var(--chalk);
}
.auth-notice:empty { display: block; padding: 0; margin: 0; border: 0; }
.auth-notice[data-tone="error"] {
  border-color: rgba(232, 133, 120, 0.5);
  background: rgba(176, 64, 52, 0.18);
  color: #a13244;
}
.auth-notice[data-tone="success"] {
  border-color: rgba(133, 94, 182, 0.55);
  background: rgba(133, 94, 182, 0.14);
  color: #6e4c96;
}

/* ── FORMS ── */
.auth-form fieldset { border: 0; min-width: 0; }
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(32, 35, 41, 0.86);
  margin-bottom: 7px;
}
.auth-field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.auth-field__row label { margin-bottom: 7px; }
.auth-optional { color: var(--muted); font-weight: 400; }

.auth-field input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  color: var(--chalk);
  background: rgba(245, 245, 250, 0.45);
  border: 1px solid rgba(32, 35, 41, 0.2);
  border-radius: 8px;
  padding: 11px 13px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.auth-field input:hover { border-color: rgba(32, 35, 41, 0.34); }
.auth-field input:focus {
  outline: none;
  border-color: var(--brass);
  background: rgba(245, 245, 250, 0.6);
  box-shadow: 0 0 0 3px rgba(133, 94, 182, 0.22);
}
.auth-field input[aria-invalid="true"] { border-color: rgba(232, 133, 120, 0.8); }
.auth-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--chalk);
  -webkit-box-shadow: 0 0 0 40px #fff inset;
  caret-color: var(--chalk);
}
.auth-hint {
  font-size: 12.5px;
  color: rgba(32, 35, 41, 0.55);
  margin-top: 6px;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  border-radius: 2px;
}
.auth-form fieldset:disabled .auth-submit { opacity: 0.6; cursor: progress; }
.auth-form fieldset:disabled input { opacity: 0.75; }

.auth-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--brass);
  text-decoration: underline;
  text-decoration-color: rgba(133, 94, 182, 0.4);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.auth-link:hover, .auth-link:focus-visible { color: #7950ad; text-decoration-color: currentColor; }

.auth-switch {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(32, 35, 41, 0.1);
  font-size: 13.5px;
  color: rgba(32, 35, 41, 0.65);
  text-align: center;
}
.auth-switch .auth-link { font-size: 13.5px; }

/* ── ACCOUNT VIEW ── */
.auth-details {
  border-top: 1px solid rgba(133, 94, 182, 0.18);
  margin-bottom: 26px;
}
.auth-details__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(133, 94, 182, 0.12);
  font-size: 14.5px;
}
.auth-details dt { color: rgba(32, 35, 41, 0.55); flex-shrink: 0; }
.auth-details dd { color: var(--chalk); text-align: right; overflow-wrap: anywhere; }
.auth-actions { display: flex; gap: 10px; }
.auth-actions > * { flex: 1 1 0; justify-content: center; }
.auth-actions .btn-brass:disabled { opacity: 0.6; cursor: progress; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .auth-main { padding-top: 100px; align-items: flex-start; }
  .auth-card { padding: 28px 22px 24px; }
  .auth-title { font-size: 28px; }
  .auth-actions { flex-direction: column; }
}

@supports not (backdrop-filter: blur(1px)) {
  .auth-card { background: rgba(245, 245, 250, 0.92); }
}
