/* ── Auth body layout ── */
body {
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Subtle grid overlay */
body::before {
  content: ''; position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 40px 40px; pointer-events: none;
}

/* Radial accent glow */
body::after {
  content: ''; position: fixed; top: -200px; left: 50%;
  transform: translateX(-50%); width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Wrappers ── */
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 0 20px; }
.wrap       { position: relative; z-index: 1; width: 100%; max-width: 440px; padding: 0 20px; }

/* ── Brand ── */
.brand { text-align: center; margin-bottom: 32px; }
.brand-logo {
  display: inline-flex; justify-content: center; align-items: center;
  gap: 10px; margin-bottom: 10px; text-decoration: none;
}
.brand-logo img { height: 110px; width: auto; }
.brand-wordmark { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; color: var(--text); }
.brand-wordmark .accent { color: #F7931E; margin-left: 3px; }
.brand-sub  { color: var(--muted); font-size: 13px; font-family: 'DM Mono', monospace; }

/* ── Card ── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px; width: 100%; max-width: 420px;
  position: relative; z-index: 1;
}
.card-icon {
  width: 40px; height: 40px; background: var(--accent); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace; font-size: 18px; color: white; margin-bottom: 20px;
}
.card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.card-sub   { color: var(--muted); font-size: 13px; margin-bottom: 24px; line-height: 1.5; }
.lock-icon {
  width: 48px; height: 48px; background: var(--accent-dim); border: 1px solid rgba(59,130,246,0.3);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin: 0 auto 20px;
}
h1   { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

/* ── Email badge ── */
.email-badge {
  display: inline-block; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
  color: var(--accent); border-radius: 6px; padding: 3px 10px;
  font-size: 12px; font-family: 'DM Mono', monospace;
}

/* ── Form overrides ── */
.field { margin-bottom: 16px; }
input[type="email"], input[type="password"], input[type="text"] {
  border-radius: 7px; padding: 10px 14px;
}
input:focus { box-shadow: 0 0 0 3px var(--accent-dim); }

/* TOTP code input */
input[inputmode="numeric"] {
  font-family: 'DM Mono', monospace; font-size: 22px;
  text-align: center; letter-spacing: 0.3em; padding: 12px 14px;
}

/* ── Submit buttons ── */
.btn-login, .btn-submit {
  width: 100%; background: var(--accent); color: white; border: none;
  border-radius: 7px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  font-weight: 600; padding: 11px; cursor: pointer; transition: background 0.15s;
  margin-top: 8px;
}
.btn-login:hover, .btn-submit:hover { background: #2563eb; }
.btn { width: 100%; padding: 11px; border-radius: 8px; }

/* ── Messages ── */
.error-msg, .error {
  background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3);
  border-radius: 7px; color: var(--error); font-size: 13px;
  padding: 10px 14px; margin-bottom: 16px;
}
.success {
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3);
  border-radius: 8px; padding: 14px; font-size: 13px; color: #34d399;
}

/* ── Footer links ── */
.back-link {
  text-align: center; margin-top: 20px; font-size: 13px;
  color: var(--muted); font-family: 'DM Mono', monospace;
}
.back-link a  { color: var(--accent); text-decoration: none; }
a.back-link   { display: block; text-decoration: none; font-size: 12px; }
a.back-link:hover { color: var(--text); }
.login-link   { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }
.login-link a { color: var(--accent); text-decoration: none; }
.footer-note  { text-align: center; margin-top: 24px; font-size: 12px; color: var(--muted); font-family: 'DM Mono', monospace; }

/* ── TOTP setup steps ── */
.steps { margin-bottom: 24px; }
.step  { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.step-num {
  width: 22px; height: 22px; background: var(--accent-dim); border: 1px solid rgba(59,130,246,0.3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-family: 'DM Mono', monospace; color: var(--accent); flex-shrink: 0; margin-top: 1px;
}
.step-text { font-size: 13px; color: var(--muted); line-height: 1.5; }
.step-text strong { color: var(--text); }

/* ── QR code wrap ── */
.qr-wrap {
  background: white; border-radius: 10px; padding: 12px;
  display: flex; justify-content: center; margin-bottom: 20px;
}
.secret-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 14px; font-family: 'DM Mono', monospace; font-size: 13px;
  color: var(--accent); text-align: center; letter-spacing: 0.1em;
  margin-bottom: 20px; word-break: break-all;
}
.note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; font-family: 'DM Mono', monospace; }
