/* ──────────────── SuperBot auth pages ────────────────
   login.php · register.php · forgot-password.php · reset-password.php · verify-email.php

   One centred card on --paper, standing on a quiet --grad-blue band at the top of
   the viewport. Every colour is a brand.css token. RTL-safe (logical properties).
   ──────────────────────────────────────────────────── */

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow-x: hidden;
}

/* The dark band. Purely structural: it gives the card something to sit on. */
body::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 280px;
  background: var(--grad-blue);
  z-index: 0;
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

/* Logo above the card — sits on the dark band, so it is plain white */
.auth-logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--on-ink);
  text-align: center;
  text-decoration: none;
  display: block;
  margin-bottom: 18px;
  user-select: none;
}
.auth-logo:hover { color: var(--on-ink); opacity: 0.88; }

/* Card */
.auth-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 38px 34px;
  box-shadow: var(--shadow-lux);
}

.auth-title {
  font-family: var(--font-head);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.6px;
  text-align: center;
  margin: 0 0 6px;
  color: var(--ink);
}

.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 26px;
  line-height: 1.6;
}

/* Form */
.form-group { margin-bottom: 15px; }

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

.form-label-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-dark);
  text-decoration: none;
}
.form-label-link:hover { text-decoration: underline; }

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s var(--easing), box-shadow 0.16s var(--easing);
}
.form-input:focus {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px var(--sky);
}
.form-input::placeholder { color: var(--muted); opacity: 1; }
.form-input[readonly] {
  background: var(--paper);
  color: var(--muted);
  cursor: not-allowed;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.55;
}

/* Password input + eye toggle */
.input-with-toggle { position: relative; }
.input-with-toggle .form-input { padding-inline-end: 46px; }
.input-toggle {
  position: absolute;
  inset-inline-end: 8px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s var(--easing), background 0.15s var(--easing);
}
.input-toggle:hover { color: var(--royal); background: var(--sky); }

/* Checkbox row */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
  margin: 16px 0 20px;
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--royal);
  cursor: pointer;
  flex-shrink: 0;
}

/* Buttons — full-width variants of the brand pills */
.btn-primary,
.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s var(--easing), border-color 0.18s var(--easing),
              color 0.18s var(--easing), box-shadow 0.18s var(--easing), transform 0.18s var(--easing);
}
.btn-primary {
  padding: 13px 22px;
  background: var(--grad-royal);
  color: var(--on-ink);
  border: none;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--accent-glow); color: var(--on-ink); }
.btn-primary:active { transform: none; }

.btn-secondary {
  padding: 12px 22px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--royal); color: var(--accent-dark); background: var(--sky); }

/* Divider with "or" */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 16px;
}
.alert i { flex-shrink: 0; font-size: 15px; margin-top: 1px; }
.alert-error   { background: var(--error-soft);   color: #b91c1c; }
.alert-success { background: var(--success-soft); color: #047857; }
.alert-info    { background: var(--info-soft);    color: #1d4ed8; }
.alert-warn    { background: var(--warn-soft);    color: #b45309; }

/* Info box (after a magic link is sent) */
.auth-info {
  background: var(--sky);
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0 0;
}
.auth-info > i {
  font-size: 20px;
  color: var(--royal);
  flex-shrink: 0;
  margin-top: 2px;
}
.auth-info strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}
.auth-info p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.auth-info a { color: var(--accent-dark); text-decoration: underline; }

/* Status icon (verify success / failure) */
.auth-status {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 18px;
}
.auth-status-success { background: var(--success-soft); color: #047857; }
.auth-status-error   { background: var(--error-soft);   color: #b91c1c; }

/* Footer links */
.auth-foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 20px 0 0;
}
.auth-foot a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.auth-fine {
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
  margin: 18px 0 0;
  line-height: 1.6;
}
.auth-fine a { color: var(--accent-dark); text-decoration: none; }
.auth-fine a:hover { text-decoration: underline; }

/* Back-link below the card */
.back-link {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.15s var(--easing);
}
.back-link:hover { color: var(--royal); }
.back-link i { margin-inline-start: 4px; font-size: 11px; }

/* Mobile */
@media (max-width: 480px) {
  body { padding: 28px 14px; align-items: flex-start; }
  body::before { height: 220px; }
  .auth-card { padding: 28px 20px; border-radius: var(--r); }
  .auth-logo { font-size: 34px; margin-bottom: 14px; }
  .auth-title { font-size: 20px; }
}
