/* auth.css — Soren login / create-workspace gate.
   Restraint is the brand: paper field, charcoal type, one deep-green CTA. */

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--dark);
}
.auth-gate[hidden] { display: none; }

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px 32px;
}

.auth-brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--primary);
}
.auth-tagline {
  margin: 2px 0 28px;
  font-size: 12px;
  font-style: italic;
  color: var(--stone);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 4px;
}
.auth-sub {
  font-size: 13.5px;
  color: var(--mid);
  margin: 0 0 24px;
}

/* ── SSO provider buttons ──────────────────────────────────────────────── */
.auth-providers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.auth-providers[hidden] { display: none; }

.auth-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.auth-provider:hover { border-color: var(--stone); background: var(--bg); }
.auth-provider svg { flex-shrink: 0; display: block; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--stone);
  font-size: 12px;
}
.auth-divider[hidden] { display: none; }
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

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

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mid);
}
.auth-field > span em {
  font-style: normal;
  font-weight: 400;
  color: var(--stone);
}
.auth-field input {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dark);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s ease;
}
.auth-field input::placeholder { color: var(--stone); }
.auth-field input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Signup-only fields hidden in sign-in mode. */
.auth-gate:not(.is-signup) .auth-signup-only { display: none; }

.auth-error {
  font-size: 13px;
  color: var(--rose);
  background: var(--rose-light);
  border: 1px solid rgba(184, 64, 64, 0.25);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.auth-error[hidden] { display: none; }

/* The one deep-green focal moment of this view. */
.auth-submit {
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.auth-submit:hover { opacity: 0.92; }
.auth-submit:disabled { opacity: 0.55; cursor: default; }

.auth-toggle {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--mid);
  text-align: center;
}
.auth-toggle a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}
.auth-toggle a:hover { text-decoration: underline; }
