/* ═══════════════════════════════════════════════════════════
   ECLYSS WEB — AUTH / LOGIN / QR
   ═══════════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

/* ── Left panel — decorative ─────────────────────────────── */
.auth-page__left {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3xl);
  position: relative;
  overflow: hidden;
}

.auth-page__left::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 60% 50%, rgba(124,58,237,0.18) 0%, transparent 65%);
  pointer-events: none;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  z-index: 1;
}

.auth-brand__logo {
  width: 80px; height: 80px;
  border-radius: 22px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  color: white;
  box-shadow: var(--shadow-purple), var(--shadow-glow);
  animation: scaleInSpring 0.6s ease;
}

.auth-brand__name {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -1.5px;
  background: var(--gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand__tagline {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  max-width: 320px;
}

.auth-features {
  margin-top: var(--sp-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  width: 100%;
  max-width: 320px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.4s ease both;
}

.auth-feature__icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.auth-feature__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.auth-feature__desc {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ── Right panel — form ──────────────────────────────────── */
.auth-page__right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3xl) var(--sp-2xl);
  overflow-y: auto;
}

.auth-form-container {
  width: 100%;
  max-width: 400px;
  animation: fadeInUp 0.35s ease;
}

.auth-form__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  margin-bottom: var(--sp-xs);
}

.auth-form__subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  margin-bottom: var(--sp-xl);
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.auth-form__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
}

.auth-form__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--sp-lg);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-form__footer a {
  font-weight: 600;
  color: var(--accent-glow);
}

/* ── Error banner ────────────────────────────────────────── */
.auth-error {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 12px var(--sp-md);
  background: var(--error-bg);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--error);
  font-weight: 500;
  animation: fadeInDown 0.2s ease;
}

/* ── QR Login panel ──────────────────────────────────────── */
.qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  padding: var(--sp-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.qr-panel__title {
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.3px;
}

.qr-panel__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}

/* QR Code frame */
.qr-frame {
  position: relative;
  padding: var(--sp-md);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-purple);
}

.qr-frame__canvas {
  display: block;
}

/* Scan line animation */
.qr-frame__scan {
  position: absolute;
  left: var(--sp-md);
  right: var(--sp-md);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  border-radius: var(--radius-full);
  animation: qrScanLine 2.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(168,85,247,0.5);
}

/* Corner decorations */
.qr-frame::before,
.qr-frame::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--accent);
  border-style: solid;
  border-radius: 2px;
}
.qr-frame::before {
  top: 6px; left: 6px;
  border-width: 3px 0 0 3px;
}
.qr-frame::after {
  bottom: 6px; right: 6px;
  border-width: 0 3px 3px 0;
}

/* QR states */
.qr-status {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
}
.qr-status--pending  { background: var(--bg-tertiary); color: var(--text-secondary); }
.qr-status--scanned  { background: var(--info-bg); color: var(--info); }
.qr-status--confirmed { background: var(--success-bg); color: var(--success); }
.qr-status--expired  { background: var(--error-bg); color: var(--error); }

.qr-status__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.qr-status--pending  .qr-status__dot { background: var(--text-tertiary); animation: pulse 1.5s ease infinite; }
.qr-status--scanned  .qr-status__dot { background: var(--info); }
.qr-status--confirmed .qr-status__dot { background: var(--success); }

.qr-countdown {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-align: center;
}

/* ── Responsive auth ─────────────────────────────────────── */
@media (max-width: 800px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-page__left {
    display: none;
  }
  .auth-page__right {
    padding: var(--sp-xl) var(--sp-lg);
  }
}
