/*
 * Aired AI — auth pages (sign in, register, forgot/reset password,
 * resend verification). Shares the v2 marketing/workspace design tokens
 * (see /airedai-v2/styles.css and /v2/v2-shell.css).
 */

:root {
  --ink: #092f33;
  --deep: #075c60;
  --deep-2: #064a4e;
  --aqua: #58e0d0;
  --mint: #b9f3e8;
  --cream: #f5f0e6;
  --paper: #fffdf8;
  --coral: #ff755c;
  --yellow: #f5d75a;
  --line: rgba(9, 47, 51, .16);
  --muted: rgba(9, 47, 51, .68);
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Manrope", "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--cream); }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 78% 18%, rgba(185, 243, 232, .85), transparent 32%),
    radial-gradient(circle at 6% 88%, rgba(245, 215, 90, .22), transparent 26%),
    var(--cream);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a { color: inherit; }
button, input { font: inherit; }

main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 2rem clamp(1rem, 4vw, 2rem);
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: 0 24px 60px rgba(9, 47, 51, .10);
}

/* Brand */
.login-brand {
  margin: 0 0 1.5rem;
}

.login-brand a,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: max-content;
  color: var(--ink);
}

.brand-mark {
  width: 50px;
  height: 25px;
  flex-shrink: 0;
  display: block;
}

.brand-name {
  font: 800 22px/1 var(--display);
  letter-spacing: -.06em;
}

.brand-name span { color: var(--coral); }

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font: 800 11px/1.2 var(--display);
  color: var(--deep);
}

.login-card h1 {
  margin: 0 0 .6rem;
  font: 700 clamp(1.7rem, 3vw, 2rem)/1.1 var(--display);
  letter-spacing: -.045em;
}

.login-lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: .98rem;
}

/* Forms */
.auth-form {
  display: grid;
  gap: .95rem;
  margin-bottom: 1.25rem;
}

.auth-form label {
  display: grid;
  gap: .4rem;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink);
}

.auth-form input {
  width: 100%;
  min-height: 50px;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: .98rem;
  font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}

.auth-form input::placeholder { color: rgba(9, 47, 51, .4); }

.auth-form input:focus {
  outline: none;
  border-color: var(--deep);
  box-shadow: 0 0 0 4px rgba(88, 224, 208, .35);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 23px;
  border: 0;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .2s, background .2s;
}

.primary-btn:hover { transform: translateY(-2px); background: var(--coral); }
.primary-btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }
.primary-btn:disabled { opacity: .7; cursor: wait; transform: none; background: var(--deep); }

.auth-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  font-size: .88rem;
  font-weight: 700;
  margin-top: -.25rem;
}

.auth-links a,
.auth-footer a,
.secondary-link a {
  color: var(--deep);
  text-decoration: none;
  font-weight: 700;
}

.auth-links a:hover,
.auth-footer a:hover,
.secondary-link a:hover { color: var(--coral); }

.divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  min-height: 54px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  transition: background .15s, box-shadow .15s, border-color .15s, transform .2s;
}

.google-btn:hover {
  border-color: var(--deep);
  box-shadow: 0 8px 24px rgba(9, 47, 51, .08);
  transform: translateY(-2px);
}

.google-mark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Messages */
.message {
  padding: .8rem 1rem;
  border-radius: 14px;
  font-size: .9rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.message:empty { display: none; }

.message-error {
  background: rgba(255, 117, 92, .12);
  border: 1px solid rgba(255, 117, 92, .5);
  color: #7a2a1a;
}

.message-success {
  background: rgba(185, 243, 232, .5);
  border: 1px solid rgba(7, 92, 96, .35);
  color: var(--deep-2);
}

.message-action { margin-top: .65rem; }

.message-action a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* Secondary text / footer */
.secondary-link {
  display: block;
  margin-top: .75rem;
  font-size: .88rem;
  text-align: center;
}

.auth-footer {
  font-size: .9rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.4rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover { color: var(--coral); }

.auth-legal {
  margin: 0;
  padding: 0 1rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .login-card { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .primary-btn, .google-btn { transition: none; }
  .primary-btn:hover, .google-btn:hover { transform: none; }
}
