/* ==========================================================================
   MyBook auth pages — shared design
   Used by registration/login.html, signup.html, password_reset_*.html, etc.
   ========================================================================== */

:root {
  /* Aliases: pull from the brand palette in mybook.css */
  --auth-bg-1: #efe6cf;
  --auth-bg-2: #fbf7ec;
  --auth-bg-3: #f6f1e4;
  --auth-card-bg: #ffffff;
  --auth-card-shadow: 0 20px 50px -20px rgba(26, 23, 20, 0.20),
                      0 8px 20px -10px rgba(26, 23, 20, 0.10);
  --auth-card-border: 1px solid rgba(26, 23, 20, 0.08);
  --auth-text: #1A1714;
  --auth-text-muted: rgba(26, 23, 20, 0.62);
  --auth-text-faint: rgba(26, 23, 20, 0.40);
  --auth-primary: #1F4E8A;
  --auth-primary-hover: #173d6e;
  --auth-primary-fg: #ffffff;
  --auth-danger: #a02525;
  --auth-danger-bg: #fbe9e7;
  --auth-success: #1f6b3a;
  --auth-success-bg: #e8f3e9;
  --auth-input-bg: #ffffff;
  --auth-input-border: rgba(26, 23, 20, 0.18);
  --auth-input-border-focus: #1F4E8A;
  --auth-input-ring: rgba(31, 78, 138, 0.16);
  --auth-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--auth-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background:
    radial-gradient(80% 60% at 10% 0%, var(--auth-bg-1) 0%, transparent 60%),
    radial-gradient(60% 50% at 100% 100%, var(--auth-bg-3) 0%, transparent 60%),
    linear-gradient(180deg, var(--auth-bg-2) 0%, #ffffff 80%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--auth-card-bg);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-card-shadow);
  border: var(--auth-card-border);
  padding: 36px 32px 28px;
}

.auth-card--wide { max-width: 520px; }

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.auth-logo img {
  max-width: 200px;
  height: auto;
}

.auth-title {
  font-family: 'Instrument Serif', 'Times New Roman', Times, serif;
  font-style: italic;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 6px;
  text-align: center;
  letter-spacing: -0.015em;
  color: var(--auth-text);
}
.auth-subtitle {
  font-size: 14px;
  color: var(--auth-text-muted);
  text-align: center;
  margin: 0 0 24px;
}

.auth-field {
  margin-bottom: 14px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text);
  margin-bottom: 6px;
}
.auth-input {
  display: block;
  width: 100%;
  font-size: 15px;
  padding: 12px 14px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-border);
  border-radius: 10px;
  color: var(--auth-text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.auth-input::placeholder { color: var(--auth-text-faint); }
.auth-input:focus {
  outline: none;
  border-color: var(--auth-input-border-focus);
  box-shadow: 0 0 0 4px var(--auth-input-ring);
}

.auth-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--auth-text-muted);
}

.auth-field--error .auth-input {
  border-color: var(--auth-danger);
  background: var(--auth-danger-bg);
}
.auth-field-error {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--auth-danger);
}

.auth-actions {
  margin-top: 6px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, transform 60ms ease;
}
.auth-btn:active { transform: translateY(1px); }

.auth-btn--primary {
  background: var(--auth-primary);
  color: var(--auth-primary-fg);
}
.auth-btn--primary:hover { background: var(--auth-primary-hover); }
.auth-btn--ghost {
  background: transparent;
  color: var(--auth-text);
  border: 1px solid var(--auth-input-border);
}
.auth-btn--ghost:hover { background: #f8fafc; }

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  margin: 4px 0 18px;
}
.auth-row-between a { color: var(--auth-primary); text-decoration: none; }
.auth-row-between a:hover { text-decoration: underline; }

.auth-footer {
  text-align: center;
  font-size: 13.5px;
  color: var(--auth-text-muted);
  margin-top: 22px;
}
.auth-footer a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.auth-alert--error {
  background: var(--auth-danger-bg);
  color: var(--auth-danger);
  border: 1px solid #fecaca;
}
.auth-alert--success {
  background: var(--auth-success-bg);
  color: var(--auth-success);
  border: 1px solid #a7f3d0;
}
.auth-alert--info {
  background: #f0f9ff;
  color: #075985;
  border: 1px solid #bae6fd;
}

.auth-divider {
  height: 1px;
  background: #eef2f7;
  margin: 18px 0;
}

.auth-pwd-wrap { position: relative; }
.auth-pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--auth-text-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.auth-pwd-toggle:hover { color: var(--auth-text); background: #f1f5f9; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 22px 22px; border-radius: 12px; }
  .auth-title { font-size: 20px; }
}
