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

:root {
  --bg:        #f7f6f2;
  --surface:   #ffffff;
  --ink:       #111110;
  --muted:     #888884;
  --border:    #e2e1da;
  --accent:    #111110;
  --error:     #c0392b;
  --radius:    6px;
}

body {
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ── card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 44px;
  width: 100%;
  max-width: 400px;
  animation: rise 0.45s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── header ── */
.wordmark {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}

h1 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ── form ── */
.field {
  margin-bottom: 18px;
  animation: rise 0.45s cubic-bezier(.22,.68,0,1.2) both;
}
.field:nth-child(1) { animation-delay: 0.05s; }
.field:nth-child(2) { animation-delay: 0.10s; }
.field:nth-child(3) { animation-delay: 0.15s; }
.field:nth-child(4) { animation-delay: 0.20s; }

label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

input::placeholder { color: #bbb9b2; }

input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17,17,16,0.07);
  background: #fff;
}

input.error-input { border-color: var(--error); }

.field-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 5px;
  min-height: 16px;
  font-family: 'DM Mono', monospace;
}

/* ── password strength ── */
.strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-bar span {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s;
}

.strength-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

/* ── submit ── */
.btn {
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.btn:hover  { opacity: 0.88; }
.btn:active { transform: scale(0.985); }

.btn.loading { pointer-events: none; }

.btn .label  { transition: opacity 0.2s; }
.btn .spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn.loading .label  { opacity: 0; }
.btn.loading .spinner { opacity: 1; }

.spinner-ring {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── footer ── */
.footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

.footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}

.footer a:hover { border-color: var(--ink); }

/* ── success state ── */
.success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0;
  animation: rise 0.4s ease both;
}

.success-icon {
  width: 48px; height: 48px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

.success-icon svg { width: 20px; height: 20px; }

.success-state h2 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.success-state p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.error-banner {
  background: #fdf0ef;
  border: 1px solid #e8c4c0;
  color: #c0392b;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-family: 'DM Mono', monospace;
}

/* ── add these to your existing style.css ── */

.tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 9px;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab.active {
  background: var(--ink);
  color: #fff;
}

.success-banner {
  background: #edfaf3;
  border: 1px solid #b7e4c7;
  color: #1a7a40;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-family: 'DM Mono', monospace;
}