/* Auth pages — sign-in.html, sign-up.html */

:root {
  --black: #000;
  --bg-0: #fff;
  --bg-1: #fafafa;
  --bg-2: #f5f5f5;
  --bg-warm: rgba(245, 242, 239, 0.8);
  --text: #000;
  --text-2: #4e4e4e;
  --text-3: #777169;
  --text-4: #a1a1aa;
  --border-0: #e5e5e5;
  --border-1: #d4d4d4;
  --green: #16a34a;
  --green-soft: rgba(22,163,74,.10);
  --red: #dc2626;
  --red-soft: rgba(220,38,38,.10);
  --r-sm: 8px;
  --r-md: 12px;
  --r-xl: 20px;
  --r-pill: 9999px;
  --shadow-card: rgba(0,0,0,.06) 0 0 0 1px, rgba(0,0,0,.04) 0 4px 4px;
  --shadow-button: rgba(0,0,0,.4) 0 0 1px, rgba(0,0,0,.04) 0 4px 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px; line-height: 1.5; letter-spacing: 0.16px;
  color: var(--text);
  background: var(--bg-2);
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
input, button { font-family: inherit; font-size: inherit; }

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 20px;
}

.back-link {
  font-size: 0.82rem;
  color: var(--text-3);
  transition: color 0.15s ease;
  text-align: center;
}
.back-link:hover { color: var(--text); }

.card-logo {
  display: block;
  line-height: 0;
  margin-bottom: 18px;
}
.card-logo img { height: 26px; width: auto; display: block; }

.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-0); border-radius: var(--r-xl);
  padding: 40px 36px 36px;
}

.trial {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: var(--bg-warm); border-radius: var(--r-pill);
  font-size: 0.72rem; font-weight: 500; margin-bottom: 16px;
}
.trial::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

.auth-title {
  font-size: 1.85rem; font-weight: 300; letter-spacing: -0.02em;
  line-height: 1.15; margin-bottom: 8px;
}
.auth-sub { font-size: 0.9rem; color: var(--text-3); margin-bottom: 28px; line-height: 1.55; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.78rem; font-weight: 500; color: var(--text-2); }
.field-hint { font-size: 0.74rem; color: var(--text-3); }

.input {
  width: 100%; background: var(--bg-0); border: 1px solid var(--border-0);
  border-radius: var(--r-md); padding: 11px 14px; font-size: 0.9rem; color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input.code-input {
  text-align: center;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  padding: 16px 14px;
}
.input::placeholder { color: var(--text-4); }
.input:hover { border-color: var(--border-1); }
.input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }

.row { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; }
.row a, .row button { color: var(--text-2); background: none; border: none; cursor: pointer; }
.row a:hover, .row button:hover { color: var(--text); }

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-2); cursor: pointer; }
.checkbox input { accent-color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--r-pill);
  font-weight: 500; cursor: pointer; padding: 14px 30px; font-size: 0.95rem;
  transition: background 0.15s ease;
}
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #1a1a1a; }
.btn-secondary { background: var(--bg-0); color: var(--text); box-shadow: var(--shadow-button); }
.btn-secondary:hover { background: var(--bg-1); }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0; font-size: 0.72rem; color: var(--text-3);
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-0); }

.alert { padding: 10px 12px; border-radius: var(--r-sm); font-size: 0.78rem; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-success { background: var(--green-soft); color: var(--green); }

.bottom-link { margin-top: 24px; text-align: center; font-size: 0.85rem; color: var(--text-3); }
.bottom-link a { color: var(--text); font-weight: 500; }

@media (max-width: 480px) {
  .auth-card { padding: 32px 24px 28px; }
}
