:root {
  --auth-black: #0a0a0a;
  --auth-panel: #111111;
  --auth-white: #fafafa;
  --auth-gold: #c9a84c;
  --auth-grey: rgba(255,255,255,.4);
  --auth-border: rgba(255,255,255,.1);
  --auth-serif: 'Cormorant Garamond', Georgia, serif;
  --auth-sans: 'Montserrat', sans-serif;
  --auth-ease: cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-page {
  font-family: var(--auth-sans);
  background: var(--auth-black);
  color: var(--auth-white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Brand panel (left) ── */
.auth-brand {
  position: relative;
  background: #090909;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 56px;
  overflow: hidden;
}
.auth-brand-img {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=900&fit=crop&q=70') center/cover no-repeat;
  opacity: .16;
}
.auth-brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(10,10,10,.6) 0%, rgba(10,10,10,.2) 100%);
}

.auth-brand-top,
.auth-brand-bottom { position: relative; z-index: 1; }

.auth-logo {
  font-family: var(--auth-serif);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: .55em;
  color: var(--auth-white);
  text-decoration: none;
  display: inline-block;
}
.auth-logo-mobile { display: none; }

.auth-brand-eyebrow {
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--auth-gold);
  margin-bottom: 20px;
}
.auth-brand-headline {
  font-family: var(--auth-serif);
  font-size: clamp(38px, 4.5vw, 62px);
  font-weight: 300;
  line-height: 1.12;
  color: var(--auth-white);
  margin-bottom: 20px;
}
.auth-brand-headline em {
  font-style: italic;
  color: var(--auth-gold);
}
.auth-brand-sub {
  font-size: 11px;
  letter-spacing: .15em;
  color: rgba(255,255,255,.32);
  text-transform: uppercase;
}
.auth-brand-rule {
  width: 40px;
  height: 1px;
  background: var(--auth-gold);
  margin: 0 0 32px;
}

/* ── Form panel (right) ── */
.auth-form-panel {
  background: var(--auth-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 56px;
}
.auth-form-inner {
  width: 100%;
  max-width: 400px;
}

.auth-title {
  font-family: var(--auth-serif);
  font-size: 44px;
  font-weight: 300;
  letter-spacing: .02em;
  color: var(--auth-white);
  margin-bottom: 8px;
}
.auth-subtitle {
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(255,255,255,.38);
  margin-bottom: 44px;
}
.auth-subtitle a {
  color: var(--auth-gold);
  text-decoration: none;
  font-weight: 500;
}
.auth-subtitle a:hover { text-decoration: underline; }

/* ── Error banner ── */
.auth-error {
  background: rgba(180,40,40,.12);
  border: 1px solid rgba(200,60,60,.35);
  border-radius: 2px;
  color: #e08080;
  font-size: 13px;
  line-height: 1.5;
  padding: 13px 16px;
  margin-bottom: 28px;
  display: none;
}
.auth-error.visible { display: block; }

/* ── Form elements ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.form-group { margin-bottom: 22px; }

.form-group label,
.form-row label {
  display: block;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  margin-bottom: 9px;
}

.form-group input,
.form-row input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--auth-border);
  border-radius: 2px;
  padding: 14px 16px;
  color: var(--auth-white);
  font-size: 14px;
  font-family: var(--auth-sans);
  letter-spacing: .03em;
  transition: border-color .2s var(--auth-ease), background .2s var(--auth-ease);
  outline: none;
  appearance: none;
}
.form-group input:focus,
.form-row input:focus {
  border-color: var(--auth-gold);
  background: rgba(201,168,76,.04);
}
.form-group input::placeholder { color: rgba(255,255,255,.18); }
.form-row input::placeholder { color: rgba(255,255,255,.18); }

/* password toggle wrap */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.28);
  padding: 4px;
  transition: color .2s;
  line-height: 0;
}
.toggle-password:hover { color: rgba(255,255,255,.7); }

/* ── Password strength ── */
.strength-track {
  height: 2px;
  background: rgba(255,255,255,.07);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.strength-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width .3s, background .3s;
}

/* ── Submit button ── */
.auth-btn {
  width: 100%;
  background: var(--auth-gold);
  color: var(--auth-black);
  border: none;
  border-radius: 2px;
  padding: 17px;
  font-family: var(--auth-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.auth-btn:hover:not(:disabled) { background: #b8962f; }
.auth-btn:active:not(:disabled) { transform: scale(.99); }
.auth-btn:disabled { opacity: .55; cursor: not-allowed; }

@keyframes spin-kf { to { transform: rotate(360deg); } }
.btn-spinner svg { animation: spin-kf .7s linear infinite; }

/* ── Footer back link ── */
.auth-footer {
  margin-top: 36px;
  text-align: center;
}
.auth-footer a {
  font-size: 11px;
  letter-spacing: .07em;
  color: rgba(255,255,255,.28);
  text-decoration: none;
  transition: color .2s;
}
.auth-footer a:hover { color: var(--auth-white); }

/* ── Responsive ── */
@media (max-width: 840px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-logo-mobile {
    display: block;
    text-align: center;
    margin-bottom: 44px;
  }
  .auth-form-panel {
    padding: 56px 28px;
    justify-content: flex-start;
  }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
