/*
 * Sign-in pages (login, register, forgot/reset password, verify email): the look
 * shared by onboarding/auth_base.html, then the few rules of single pages, scoped
 * by the page class each template sets in {% block page_class %}.
 * Same token names as the backoffice (style.css); values set on :root below.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The website's colours and font, same values as the website stylesheet. These
   pages never load that stylesheet: it would recolour every Tailwind utility. */
:root {
  --color-primary: #1B1B20;
  --color-text-light: #6E6E78;
  --color-border: #E6E6EA;
  /* Only the values that differ from the backoffice; --color-action and the other
     tokens come from style.css (bundled in tailwind.css). Buttons, links and focus
     are near-black, not red: on a form, red reads as an error. */
  --color-input-focus-border: #CCCCCC;
  --color-link: #3B3B43;
  --color-link-hover: #1B1B20;
  --font-display: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;
}

.login-split {
  display: flex;
  min-height: 100vh;
}

/* ── Left: form panel ── */
.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.login-logo {
  padding: 24px 32px;
}
.login-logo img {
  height: 32px;
}

.login-form-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px 40px;
}

.login-form-wrapper {
  width: 100%;
  max-width: 380px;
}

/* Heading */
.login-form-wrapper h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--color-primary);
  margin: 0 0 6px;
}
.login-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--color-text-light);
  font-weight: 400;
  margin: 0 0 32px;
  line-height: 1.5;
}

/* Form fields */
.login-field {
  margin-bottom: 20px;
}
.login-field label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 6px;
}
.login-field .ob-form__input {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--color-primary);
  background: #fff;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.login-field .ob-form__input:focus {
  outline: none;
  border-color: var(--color-input-focus-border);
  border-width: 1px;
  box-shadow: 0 0 0 3px var(--color-input-focus-ring);
}
.login-field .ob-form__input::placeholder {
  color: #94a3b8;
}

/* Password label row */
.login-password-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.login-forgot {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-color: var(--color-link-underline);
  text-underline-offset: 3px;
  transition: color 200ms, text-decoration-color 200ms;
}
.login-forgot:hover {
  color: var(--color-link-hover);
  text-decoration-color: currentColor;
}

/* Submit button (.login-btn) and the button-styled link of the confirmation
   pages (.login-btn-link): one look, different layout. */
.login-btn,
.login-btn-link {
  background: var(--color-action);
  color: var(--color-action-text);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms, transform 150ms;
}
.login-btn {
  display: block;
  width: 100%;
  padding: 12px 24px;
}
.login-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  margin-top: 24px;
}
.login-btn:hover,
.login-btn-link:hover {
  background: var(--color-action-hover);
  box-shadow: 0 4px 14px var(--color-action-shadow);
  color: var(--color-action-text);
  text-decoration: none;
}
.login-btn:active,
.login-btn-link:active {
  transform: scale(0.98);
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.login-divider span {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Google button */
.login-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 24px;
  background: #fff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms, border-color 200ms;
}
.login-google:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
}

/* Error alerts */
.login-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}
.login-alert--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

/* Notice beside the Google button. Continuing through that button is an
   agreement to the terms and is recorded as one, so the notice has to be
   visible at the point of the click — not only inside the form above it. */
.login-legal-note {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-light);
}
.login-legal-note a {
  color: var(--color-text-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-legal-note a:hover {
  color: var(--color-link-hover);
}

/* Bottom links ("Already have an account? Login", "← Back to login") */
.login-register,
.login-back {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: var(--color-text-light);
  font-weight: 400;
}
.login-register a,
.login-back a {
  color: var(--color-link);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 200ms;
}
.login-register a { margin-left: 4px; }
.login-register a:hover,
.login-back a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Field error */
.login-field-error {
  font-size: 12px;
  color: var(--color-error);
  margin-top: 4px;
}

/* Detail text (confirmation pages) */
.login-detail {
  font-size: 13px;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.6;
}

/* ── Right: dark panel ──
   Black at the top fading to charcoal, with a soft white highlight at the top
   right and a soft glow along the bottom. */
.login-right {
  flex: 1;
  background:
    radial-gradient(70% 40% at 80% 0%, rgba(255, 255, 255, 0.08), transparent 70%),
    radial-gradient(80% 45% at 50% 100%, rgba(255, 255, 255, 0.16), transparent 70%),
    linear-gradient(180deg, #0F0F12 0%, #1B1B20 40%, #2E2E35 75%, #4A4A52 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 150px;
  position: relative;
  overflow: hidden;
}

.login-right::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  top: -80px;
  right: -100px;
}
.login-right::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  bottom: -60px;
  left: -60px;
}

.login-right-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 40px;
  max-width: 400px;
}
.login-right-icon {
  width: 64px;
  height: 64px;
  margin: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-right-icon svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.login-right-dot {
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  animation: chat-dot 7s ease-in-out infinite;
}
.login-right-content h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.3;
}
.login-right-content p {
  font-size: 16px;
  opacity: 0.8;
  line-height: 1.6;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .login-right {
    display: none;
  }
  .login-left {
    min-height: 100vh;
  }
}

/* 7s cycle: 2s human dwell, 1.5s travel, 2s robot dwell, 1.5s travel */
@keyframes chat-dot {
  0%, 28% { left: calc(100% - 8px); }
  43%, 71% { left: 0; }
  86%, 100% { left: calc(100% - 8px); }
}
@keyframes icon-glow-human {
  0%, 28% { box-shadow: 0 0 14px rgba(255,255,255,0.4); }
  35%, 78% { box-shadow: none; }
  86%, 100% { box-shadow: 0 0 14px rgba(255,255,255,0.4); }
}
@keyframes icon-glow-robot {
  0%, 35% { box-shadow: none; }
  43%, 71% { box-shadow: 0 0 14px rgba(255,255,255,0.4); }
  78%, 100% { box-shadow: none; }
}

/* Line between the robot and the guest icons, with the moving dot. */
.login-right-line {
  position: relative;
  align-self: center;
  width: 70px;
  height: 2px;
  margin: 0 7px;
  background: rgba(255, 255, 255, 0.2);
}

/* register.html: the terms checkbox and tighter field spacing. */
.login-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--color-text-light);
  font-weight: 500;
}
.login-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-action);
  cursor: pointer;
  flex-shrink: 0;
}
.login-checkbox a {
  color: var(--color-link);
  font-weight: 600;
  text-decoration: none;
}
.login-checkbox a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-page--register .login-field { margin-bottom: 18px; }

/* forgot_password.html */
.auth-page--forgot-password .login-form-area { padding: 0 24px 70px; }

/* Confirmation pages (sent, closed, verified, link error): centred text. The
   subtitle gap is 16px, or 0 / 24px with the --flush / --loose modifier. */
.auth-page--centered .login-form-wrapper { text-align: center; }
.auth-page--centered .login-subtitle { margin-bottom: 16px; }
.auth-page--subtitle-flush .login-subtitle { margin-bottom: 0; }
.auth-page--subtitle-loose .login-subtitle { margin-bottom: 24px; }
