/* Auth page shared styles — extracted from login.html, signup.html,
   forgot_password.html, and reset_password.html. This is the canonical
   superset of all auth-specific CSS. */

html { min-height: 100%; }
body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg);
}

/* Card wrapper */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 0 16px;
}

/* Branding above card */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 32px;
  text-decoration: none;
}
.brand-name {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  color: var(--t1);
}
.brand-sub {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  color: var(--t3);
}

.login-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px 36px;
}

.login-card h1 {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  color: var(--t1);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 4px;
}
.login-card .subtitle {
  color: var(--t2);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 28px;
}
.login-card .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.login-card .field label {
  font-size: 0.75rem;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.login-card .field input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--t2);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.login-card .field input:focus {
  border-color: var(--teal);
}
.login-card .field input::placeholder { color: #3A5060; }

.login-card .error-msg {
  background: rgba(232,72,106,0.08);
  border: 1px solid rgba(232,72,106,0.25);
  color: var(--red);
  font-size: 0.85rem;
  padding: 10px 14px;
  margin-bottom: 18px;
  text-align: center;
}
.login-card .success-msg {
  background: rgba(46,221,216,0.08);
  border: 1px solid rgba(46,221,216,0.25);
  color: var(--teal);
  font-size: 0.85rem;
  padding: 10px 14px;
  margin-bottom: 18px;
  text-align: center;
}

/* TOS acceptance interstitial message */
.accept-terms-message {
  font-size: 0.85rem;
  color: var(--t2);
  line-height: 1.5;
  margin-bottom: 20px;
}
.accept-terms-message a {
  color: var(--teal);
  text-decoration: none;
}
.accept-terms-message a:hover {
  text-decoration: underline;
}

/* TOS acceptance checkbox */
.tos-field {
  margin-top: 4px;
  margin-bottom: 16px;
}
.tos-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--t3);
  cursor: pointer;
  line-height: 1.4;
}
.tos-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.tos-label a {
  color: var(--teal);
  text-decoration: none;
}
.tos-label a:hover {
  text-decoration: underline;
}

/* Inline client-side validation error (signup) */
.login-card .inline-error {
  color: var(--red);
  font-size: 0.8rem;
  margin-top: -12px;
  margin-bottom: 14px;
  display: none;
}

/* Primary sign-in button */
.btn-signin {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 11px;
  font-weight: 400;
  font-family: inherit;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--bg);
  background: var(--teal);
  border: 1px solid var(--teal);
  cursor: pointer;
  transition: background 0.2s;
}
.btn-signin:hover {
  background: #26c7c3;
  border-color: #26c7c3;
}
.btn-signin:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider-text {
  color: var(--t3);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Google button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  font-size: 11px;
  font-weight: 400;
  font-family: inherit;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--t2);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn-google:hover {
  border-color: #3A5060;
  background: var(--card);
}
.btn-google:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--teal);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-link:hover { color: #5ee8e4; }
.forgot-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--teal);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: #5ee8e4; }
.back-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Loading/processing message (reset password) */
#loading-msg {
  color: var(--t3);
  text-align: center;
  font-size: 0.85rem;
}

/* Footer text */
.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--t3);
  opacity: 0.7;
}
.login-footer a { color: var(--t3); text-decoration: none; }
.login-footer a:hover { color: var(--teal); }

/* -- Trial Ended Interstitial -- */
.trial-ended-stats {
  margin: 16px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.trial-ended-stats p {
  color: var(--t2);
  font-size: 14px;
  margin: 0 0 12px;
}
.trial-stat-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0;
}
.trial-stat-value {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: var(--teal);
}
.trial-stat-label {
  font-size: 13px;
  color: var(--t3);
}
.trial-ended-info {
  margin: 16px 0;
}
.trial-ended-info p {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.5;
}

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