/* Fastments client authentication — login & register */

:root {
  --auth-primary: #2563eb;
  --auth-primary-hover: #1d4ed8;
  --auth-navy: #0f172a;
  --auth-navy-2: #1e293b;
  --auth-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-bg-left: #f0f7ff;
  --auth-white: #ffffff;
}

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

.auth-page {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--auth-navy-2);
  background: var(--auth-white);
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* —— Left brand panel —— */
.auth-brand {
  position: relative;
  flex: 0 0 46%;
  max-width: 46%;
  background: var(--auth-bg-left);
  overflow: hidden;
  display: flex;
}

.auth-brand-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.04));
}

.auth-shape--1 {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -80px;
}

.auth-shape--2 {
  width: 280px;
  height: 280px;
  left: -60px;
  top: 35%;
  background: linear-gradient(135deg, rgba(147, 197, 253, 0.35), rgba(219, 234, 254, 0.2));
}

.auth-shape--3 {
  width: 180px;
  height: 180px;
  right: 15%;
  top: 12%;
  background: rgba(191, 219, 254, 0.25);
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 36px 40px 28px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 20px;
}

.auth-logo-icon {
  flex-shrink: 0;
  line-height: 0;
}

.auth-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-logo-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--auth-navy);
  letter-spacing: -0.02em;
}

.auth-logo-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--auth-muted);
}

.auth-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #dbeafe;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 22px;
}

.auth-trust-badge svg {
  width: 14px;
  height: 14px;
  color: #16a34a;
  flex-shrink: 0;
}

.auth-trust-dot {
  color: #94a3b8;
  font-weight: 400;
}

.auth-hero-title {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--auth-navy);
  letter-spacing: -0.03em;
}

.auth-hero-text {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--auth-muted);
  max-width: 400px;
}

.auth-features {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--auth-primary);
}

.auth-feature-icon svg {
  width: 18px;
  height: 18px;
}

.auth-features strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-navy);
  margin-bottom: 2px;
}

.auth-features p {
  margin: 0;
  font-size: 12px;
  color: var(--auth-muted);
  line-height: 1.4;
}

.auth-testimonial {
  margin-top: auto;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
  max-width: 380px;
}

.auth-quote-icon {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  color: var(--auth-primary);
  margin-bottom: 4px;
}

.auth-testimonial p,
.auth-testimonial-by {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.auth-testimonial.is-transitioning p,
.auth-testimonial.is-transitioning .auth-testimonial-by,
.auth-testimonial.is-transitioning .auth-stars {
  opacity: 0;
  transform: translateY(8px);
}

.auth-testimonial p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--auth-navy-2);
}

.auth-stars {
  font-size: 12px;
  color: #f59e0b;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.auth-testimonial-by {
  font-size: 11px;
  color: var(--auth-muted);
}

.auth-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 8px;
  font-size: 10px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.auth-brand-footer__trusted {
  flex: 1;
  min-width: 120px;
}

.auth-brand-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.auth-brand-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease, border-radius 0.3s ease;
}

.auth-brand-dots span.is-active {
  background: var(--auth-primary);
  width: 14px;
  border-radius: 999px;
}

.auth-brand-footer__tags {
  flex: 1;
  text-align: right;
  min-width: 100px;
}

/* —— Right form panel —— */
.auth-form-panel {
  flex: 1;
  min-width: 0;
  background: var(--auth-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
}

.auth-form-panel__inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  min-height: min(100vh - 64px, 720px);
}

.auth-steps--register {
  margin-bottom: 20px;
}

.auth-reg-back {
  display: block;
  margin-top: 14px;
  text-align: center;
  width: 100%;
}

.auth-panel-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 28px;
  margin-top: -8px;
}

.auth-panel-top__text {
  font-size: 13px;
  color: var(--auth-muted);
}

.auth-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #fff;
  color: var(--auth-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.auth-btn-outline:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.auth-form-head {
  margin-bottom: 22px;
}

.auth-form-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: var(--auth-navy);
  letter-spacing: -0.02em;
}

.auth-form-head p {
  margin: 0;
  font-size: 14px;
  color: var(--auth-muted);
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--auth-navy);
  margin-bottom: 6px;
}

.auth-field--full {
  grid-column: 1 / -1;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  display: flex;
  pointer-events: none;
}

.auth-input-icon svg {
  width: 16px;
  height: 16px;
}

.auth-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--auth-navy-2);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-input-wrap input::placeholder {
  color: #94a3b8;
}

.auth-password-toggle {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.auth-password-toggle:hover {
  color: var(--auth-primary);
  background: #f8fafc;
}

.auth-password-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-forgot-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.auth-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--auth-primary);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--auth-muted);
  cursor: pointer;
}

.auth-check input {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--auth-primary);
}

.auth-check a {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-check a:hover {
  text-decoration: underline;
}

.auth-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: none;
  border-radius: 8px;
  background: var(--auth-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-btn-primary:hover {
  background: var(--auth-primary-hover);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
}

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

.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--auth-navy-2);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.auth-social-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.auth-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-security-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  font-size: 11px;
  color: #94a3b8;
}

.auth-security-msg svg {
  width: 14px;
  height: 14px;
  color: #93c5fd;
}

.auth-page--login .auth-form-panel__inner {
  justify-content: center;
}

@media (max-width: 1024px) {
  .auth-shell {
    flex-direction: column;
  }

  .auth-brand {
    flex: none;
    max-width: none;
    min-height: auto;
  }

  .auth-brand-inner {
    min-height: auto;
    padding: 28px 24px;
  }

  .auth-testimonial {
    margin-top: 20px;
  }

  .auth-brand-footer {
    display: none;
  }

  .auth-form-panel {
    padding: 28px 24px 32px;
  }

  .auth-form-panel__inner {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .auth-form-grid,
  .auth-social-row {
    grid-template-columns: 1fr;
  }

  .auth-hero-title {
    font-size: 26px;
  }
}

/* Toast */
.auth-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.auth-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-toast--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-toast--success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.auth-link-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--auth-primary);
  cursor: pointer;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

.auth-view[hidden] {
  display: none !important;
}

.auth-back {
  border: none;
  background: none;
  color: var(--auth-primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 0;
}

.auth-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.auth-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--auth-muted);
}

.auth-step__n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--auth-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.auth-step.is-active {
  color: var(--auth-primary);
  font-weight: 600;
}

.auth-step.is-active .auth-step__n {
  background: var(--auth-primary);
  color: #fff;
  border-color: var(--auth-primary);
}

.auth-step.is-done .auth-step__n {
  background: #dbeafe;
  color: var(--auth-primary);
  border-color: #93c5fd;
}

.auth-forgot-panel[hidden] {
  display: none !important;
}

.auth-forgot-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-otp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.auth-otp-box {
  width: 44px;
  height: 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
}

.auth-otp-timer {
  text-align: center;
  font-size: 12px;
  color: var(--auth-muted);
  margin: 0;
}

.auth-otp-resend {
  text-align: center;
  font-size: 12px;
  color: var(--auth-muted);
  margin: 0;
}

.auth-pw-reqs {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 11px;
  color: var(--auth-muted);
}

.auth-pw-reqs li.is-met {
  color: #15803d;
}

.auth-success-msg {
  font-size: 14px;
  color: var(--auth-muted);
  margin: 0 0 8px;
}

.auth-btn-primary:disabled,
.auth-btn-primary.is-loading {
  cursor: wait;
  opacity: 0.92;
}

.auth-btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.65s linear infinite;
}

.auth-btn-primary.is-loading .auth-btn-spinner {
  display: inline-block;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}
