/* ── AUTH LAYOUT ─────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - var(--nav-h));
  margin-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
}

/* Faint background suits for atmosphere */
.auth-wrap::before {
  content: '♠ ♥ ♦ ♣';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18vw;
  color: var(--gold);
  opacity: .018;
  letter-spacing: .4em;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
  font-family: var(--font-heading);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 64px rgba(0,0,0,.9), var(--glow-gold);
  overflow: hidden;
}

/* Top gold accent bar */
.auth-card::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .6;
}

/* ── AUTH HEADER ─────────────────────────────────────────── */
.auth-header {
  padding: 36px 36px 28px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-card-2), var(--bg-card));
}

.auth-suit {
  display: block;
  font-size: 2.4rem;
  color: var(--gold);
  opacity: .55;
  margin-bottom: 12px;
  line-height: 1;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: .83rem;
  color: var(--cream-dim);
  letter-spacing: .03em;
}

/* ── AUTH BODY ───────────────────────────────────────────── */
.auth-body {
  padding: 32px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-body .form-group { gap: 7px; }

/* ── SUBMIT BUTTON ───────────────────────────────────────── */
.auth-submit {
  width: 100%;
  margin-top: 4px;
  padding: 14px;
  font-size: .78rem;
}

/* ── ERROR / SUCCESS ALERTS ──────────────────────────────── */
.auth-error {
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius);
  border-left: 3px solid var(--red-bright);
  background: rgba(201,51,51,.07);
  color: var(--cream-dim);
  font-size: .85rem;
  line-height: 1.55;
}

.auth-success {
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius);
  border-left: 3px solid #22C55E;
  background: rgba(34,197,94,.07);
  color: var(--cream-dim);
  font-size: .85rem;
  line-height: 1.55;
}

.auth-error.visible,
.auth-success.visible { display: block; }

/* ── FOOTER LINKS ────────────────────────────────────────── */
.auth-footer {
  padding: 18px 36px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-card-2);
}

.auth-link {
  font-family: var(--font-heading);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  transition: color .2s;
}

.auth-link:hover { color: var(--gold); }

/* ── 2FA OTP INPUT ───────────────────────────────────────── */
.otp-input {
  font-family: var(--font-mono) !important;
  font-size: 1.8rem !important;
  text-align: center;
  letter-spacing: .5em;
  padding: 14px 16px !important;
  color: var(--gold) !important;
}

.otp-input::placeholder { letter-spacing: .3em; font-size: 1.4rem; color: var(--text-dim); }

/* ── DIVIDER ─────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── BACK STEP LINK ──────────────────────────────────────── */
.auth-back {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0;
  transition: color .2s;
}

.auth-back:hover { color: var(--gold); }

/* ── NOTICE BELOW CARD ───────────────────────────────────── */
.auth-notice {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-size: .77rem;
  color: var(--text-dim);
  text-align: center;
  font-family: var(--font-heading);
  letter-spacing: .06em;
}

/* ── ACCOUNT PAGE ────────────────────────────────────────── */
.account-wrap {
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 80px;
  min-height: 100vh;
  background: var(--bg-1);
}

.account-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

.account-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.account-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.account-nav-label {
  font-family: var(--font-heading);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 14px 18px 8px;
  opacity: .7;
}

.account-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-family: var(--font-heading);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  transition: color .2s, background .2s;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.account-nav-link:last-child { border-bottom: none; }
.account-nav-link:hover { color: var(--gold); background: rgba(201,168,76,.05); }
.account-nav-link.active { color: var(--gold); background: rgba(201,168,76,.08); }
.account-nav-icon { font-size: .9rem; opacity: .6; }

.account-section { display: none; }
.account-section.active { display: block; }

/* 2FA QR */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card-2);
  margin: 20px 0;
}

.qr-placeholder {
  width: 160px;
  height: 160px;
  background: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  color: #333;
  font-family: var(--font-mono);
  text-align: center;
}

.qr-instruction {
  font-size: .83rem;
  color: var(--cream-dim);
  text-align: center;
  line-height: 1.6;
  max-width: 300px;
}

/* Sessions list */
.session-list { display: grid; gap: 10px; }

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.session-item.current { border-color: rgba(201,168,76,.4); }

.session-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.session-device {
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: .05em;
}

.session-detail {
  font-size: .77rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.session-current-badge {
  font-family: var(--font-heading);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: rgba(34,197,94,.12);
  color: #22C55E;
  border: 1px solid rgba(34,197,94,.25);
}

.btn-revoke {
  font-family: var(--font-heading);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red-bright);
  background: transparent;
  border: 1px solid rgba(201,51,51,.3);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
}

.btn-revoke:hover { background: rgba(201,51,51,.1); border-color: var(--red-bright); }

/* Password strength */
.password-strength {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
  margin-top: 6px;
}

.password-strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: width .3s, background .3s;
  width: 0%;
}

/* ── 403 PAGE ────────────────────────────────────────────── */
.forbidden-wrap {
  min-height: calc(100vh - var(--nav-h));
  margin-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.forbidden-suit {
  font-size: 5rem;
  color: var(--red-bright);
  opacity: .25;
  margin-bottom: 24px;
  display: block;
}

.forbidden-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--red-bright);
  opacity: .2;
  line-height: .9;
  margin-bottom: 24px;
}

.forbidden-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 12px;
}

.forbidden-desc {
  font-size: .95rem;
  color: var(--cream-dim);
  max-width: 400px;
  line-height: 1.75;
  margin-bottom: 36px;
}

.forbidden-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 680px) {
  .auth-header { padding: 28px 24px 22px; }
  .auth-body   { padding: 24px 24px 28px; }
  .auth-footer { padding: 14px 24px; }

  .account-grid { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .account-section { display: block; }
  .account-nav { display: none; }
}
