/* =================================================
   Credorra — Login page
   ================================================= */

body.auth {
  background: var(--paper);
  color: var(--ink-950);
  overflow: hidden;
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ============ LEFT (form) ============ */
.auth-form-side {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 32px 48px;
  position: relative;
  background: var(--paper);
  overflow-y: auto;
}
.auth-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.auth-top .brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 19px;
  color: var(--ink-950);
}
.auth-top__right { font-size: 13.5px; color: var(--ink-500); display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.auth-top__right .muted { color: var(--ink-400); }
.auth-top__cta {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--ink-100);
  font-size: 13.5px; font-weight: 500;
  color: var(--ink-950);
  transition: border-color .15s ease, background .15s ease;
}
.auth-top__cta:hover { border-color: var(--blue-300); background: var(--blue-50); color: var(--blue-700); }

.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 40px 0;
}
.auth-form-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.auth-form-card h1 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin-top: 18px;
}
.auth-form-card .lead {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-500);
  line-height: 1.5;
}

/* --- OAuth --- */
.oauth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 32px;
}
.oauth-btn {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--ink-100);
  background: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink-950); cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.oauth-btn:hover { border-color: var(--ink-300); background: var(--paper-soft); transform: translateY(-1px); }
.oauth-btn:active { transform: translateY(0); }

.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0 4px;
  color: var(--ink-400);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.divider span { white-space: nowrap; }
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--ink-100);
}

/* --- form fields --- */
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field .lbl {
  font-size: 13px; font-weight: 500;
  color: var(--ink-700);
  display: flex; justify-content: space-between; align-items: center;
}
.field .forgot { font-size: 12.5px; color: var(--blue-600); }
.field .forgot:hover { color: var(--blue-700); text-decoration: underline; }
.input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.input-wrap .ico {
  position: absolute; left: 14px;
  color: var(--ink-400);
  pointer-events: none;
}
.input-wrap input {
  width: 100%; height: 46px;
  padding: 0 14px 0 42px;
  border-radius: 12px;
  border: 1px solid var(--ink-100);
  background: var(--paper-soft);
  font: inherit; font-size: 14.5px;
  color: var(--ink-950);
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.input-wrap input::placeholder { color: var(--ink-300); }
.input-wrap input:hover { border-color: var(--ink-200); }
.input-wrap input:focus {
  border-color: var(--blue-400);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(124, 59, 237, 0.12);
}
.field.is-invalid .input-wrap input { border-color: #D94E76; box-shadow: 0 0 0 4px rgba(217, 78, 118, 0.10); }
.field .err {
  font-size: 12px; color: #B6304A;
  display: none;
}
.field.is-invalid .err { display: block; }

.reveal-btn {
  position: absolute; right: 8px;
  width: 30px; height: 30px;
  border: 0; background: transparent;
  border-radius: 8px;
  color: var(--ink-400); cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s ease, color .15s ease;
}
.reveal-btn:hover { background: var(--paper-dim); color: var(--ink-700); }

/* password strength */
.strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.strength span {
  height: 4px;
  background: var(--ink-100);
  border-radius: 999px;
  transition: background .2s ease;
}
.strength.lvl-1 span:nth-child(1) { background: #E07A5F; }
.strength.lvl-2 span:nth-child(-n+2) { background: #F0A560; }
.strength.lvl-3 span:nth-child(-n+3) { background: var(--blue-400); }
.strength.lvl-4 span:nth-child(-n+4) { background: #2BB877; }
.strength .lab {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-400);
  font-style: normal;
  letter-spacing: 0.04em;
  margin-left: 6px;
  white-space: nowrap;
}

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.check {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  color: var(--ink-700);
  cursor: pointer;
  user-select: none;
}
.check input { display: none; }
.check .box {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--ink-200);
  background: var(--paper);
  display: grid; place-items: center;
  color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.check input:checked + .box {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: #fff;
}

.submit-btn {
  margin-top: 6px;
  height: 50px;
  border-radius: 12px;
  border: 0;
  background: var(--ink-950);
  color: var(--paper);
  font: inherit; font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
  position: relative;
}
.submit-btn:hover { background: var(--blue-600); box-shadow: var(--shadow-blue); }
.submit-btn:active { transform: translateY(1px); }
.submit-btn svg { transition: transform .2s ease; }
.submit-btn:hover svg { transform: translateX(3px); }
.submit-btn.is-loading { color: transparent; pointer-events: none; }
.submit-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authspin .7s linear infinite;
}
@keyframes authspin { to { transform: rotate(360deg); } }

.legal {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-400);
  line-height: 1.5;
  text-align: center;
}
.legal a { color: var(--ink-700); text-decoration: underline; text-underline-offset: 2px; }

.auth-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: var(--ink-400);
  padding-top: 16px;
}
.auth-foot .dots { display: flex; gap: 18px; }
.auth-foot a:hover { color: var(--ink-700); }

/* ============ RIGHT (brand panel) ============ */
.auth-brand-side {
  position: relative;
  overflow: hidden;
  background: var(--ink-950);
  color: var(--paper);
}
.brand-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(55% 60% at 80% 10%, rgba(124,59,237,0.55), transparent 65%),
    radial-gradient(40% 50% at 0% 100%, rgba(124,59,237,0.25), transparent 60%),
    linear-gradient(160deg, #15103A 0%, #0E0A22 70%);
}
.brand-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(75% 70% at 60% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(75% 70% at 60% 40%, #000 30%, transparent 85%);
}
.brand-content {
  position: relative;
  height: 100vh;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  overflow-y: auto;
}
.brand-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-300);
}
.brand-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(151, 96, 241, 0.25);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  0%, 60%, 100% { box-shadow: 0 0 0 3px rgba(151, 96, 241, 0.25); }
  30% { box-shadow: 0 0 0 10px rgba(151, 96, 241, 0); }
}
.auth-brand-side h2 {
  margin-top: 14px;
  font-size: clamp(34px, 3.4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--paper);
  max-width: 460px;
}
.auth-brand-side h2 .serif { color: var(--blue-300); }

/* floating cards */
.float-stack {
  position: relative;
  flex: 1;
  margin-top: 28px;
  min-height: 320px;
}
.float-card {
  position: absolute;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5);
  transform-style: preserve-3d;
}
.float-card--main {
  top: 0; left: 0; right: 30%;
  animation: floatA 8s ease-in-out infinite;
}
.float-card--review {
  bottom: 8px; right: 0; width: 70%;
  animation: floatB 9s ease-in-out infinite;
}
.float-card--queue {
  top: 30%; right: -20px; width: 240px;
  animation: floatC 7s ease-in-out infinite;
}
@keyframes floatA {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(1.5deg); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.fc-top { display: flex; align-items: center; justify-content: space-between; }
.fc-title { font-size: 14px; font-weight: 500; color: #fff; }
.fc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(43,184,119,0.15); color: #5BE39C;
  letter-spacing: 0.04em;
}
.fc-pill .d {
  width: 6px; height: 6px; border-radius: 50%; background: #5BE39C;
  box-shadow: 0 0 0 3px rgba(91,227,156,0.2);
  animation: ping 1.6s ease-out infinite;
}
.fc-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.fc-lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}
.fc-val { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: #fff; margin-top: 3px; }
.fc-val .s { font-size: 12px; color: rgba(255,255,255,0.5); margin-left: 2px; }
.fc-delta { font-family: var(--font-mono); font-size: 10.5px; color: #5BE39C; margin-top: 2px; }
.fc-chart { width: 100%; height: 56px; margin-top: 12px; }

.fc-r-head { display: flex; align-items: center; gap: 10px; }
.fc-r-head .av {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #FFD37A, #FF8E53);
  flex-shrink: 0;
}
.fc-r-meta { flex: 1; min-width: 0; }
.fc-r-name { font-size: 13px; font-weight: 500; color: #fff; }
.fc-r-verify { font-family: var(--font-mono); font-size: 10px; color: var(--blue-300); letter-spacing: 0.04em; }
.fc-stars { color: #F5A623; font-size: 13px; letter-spacing: -1px; }
.float-card--review p {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.45;
}

.fc-q-row { display: flex; align-items: center; gap: 10px; }
.fc-q-row .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #B5F0CF, #1E9D63);
  flex-shrink: 0;
}
.fc-q-row .av.b { background: linear-gradient(135deg, #B68AF6, #7C3BED); }
.fc-q-meta { flex: 1; min-width: 0; }
.fc-q-meta .n { font-size: 13px; font-weight: 500; color: #fff; }
.fc-q-meta .m { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 2px; }
.fc-q-btn {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--blue-500); color: #fff;
  display: grid; place-items: center;
  font-size: 14px;
}

/* KPI strip */
.kpi-strip {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.kpi-strip .kv {
  font-size: 24px; font-weight: 500;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1;
}
.kpi-strip .kl { font-size: 11.5px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.kpi-strip .sep { width: 1px; height: 28px; background: rgba(255,255,255,0.1); }

.brand-quote {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.brand-quote p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.3;
  color: rgba(255,255,255,0.85);
  max-width: 480px;
}
.brand-quote footer {
  margin-top: 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.qav {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #FFB5C5, #D94E76);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; }
  body.auth { overflow: auto; }
  .auth-brand-side { display: none; }
  .auth-form-side { padding: 28px 32px; min-height: auto; }
  .auth-form-card h1 { font-size: 32px; }
}
@media (max-width: 560px) {
  .auth-form-side { padding: 22px 20px; }
  .oauth-row { grid-template-columns: 1fr; }
  .auth-form-card h1 { font-size: 28px; }
  .auth-top__right .muted { display: none; }
  .auth-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
}
