/* === Auth pages — signup / login / reset =================================
 * Adds the bits the Saqqar shell doesn't already ship: email chip,
 * OTP input, link-style buttons, resend row, step fade.
 * All other styling (.t-text, .t-input, .btn-gradient, .btn-ghost, etc)
 * comes from the existing app.css / chat-v2.css. */

[hidden] { display: none !important; }

.auth-step {
  display: grid;
  gap: 18px;
  animation: auth-fade 0.22s ease;
}

@keyframes auth-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Email chip (shown above OTP / password steps to remind user) */
.email-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2, var(--surface-1, rgba(15,23,42,0.6)));
  font-size: 13px;
  animation: auth-fade 0.22s ease;
}

.email-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #22D3EE;
  flex-shrink: 0;
}

.email-chip-text {
  flex: 1;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  text-align: start;
}

.email-chip-edit {
  background: none;
  border: 0;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #22D3EE;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.email-chip-edit:hover { background: rgba(6,182,212,0.10); }

/* OTP input */
.otp-input {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  letter-spacing: 0.6em;
  text-align: center;
  font-weight: 600;
  padding-block: 16px;
}
.otp-input::placeholder { letter-spacing: 0.6em; font-weight: 400; }

/* Field help text */
.field-help {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #94A3B8);
  line-height: 1.5;
}

/* Resend row inside OTP step */
.resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}

.resend-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #22D3EE;
  font-weight: 600;
  cursor: pointer;
}
.resend-link:hover { text-decoration: underline; }
.resend-link[disabled] {
  color: var(--muted, #94A3B8);
  cursor: not-allowed;
  text-decoration: none;
}

.resend-timer { color: var(--muted, #94A3B8); font-size: 12px; }
.resend-timer b { color: var(--text); font-weight: 600; }

/* Divider with centered label */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 4px 0;
}
.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline: 0;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 0 14px;
  font-size: 11px;
  color: var(--muted, #94A3B8);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Link-style buttons used to switch flow (not action buttons) */
.link-row {
  text-align: center;
  padding-top: 4px;
}

.link-action {
  background: none;
  border: 0;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #22D3EE;
  cursor: pointer;
}
.link-action:hover { text-decoration: underline; }

/* Inline form error */
.auth-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  color: #EF4444;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}

/* Forgot link aligned inside password field label row */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.field-row .field-hint-link {
  font-size: 11px;
  font-weight: 600;
  color: #22D3EE;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.field-row .field-hint-link:hover { text-decoration: underline; }
