/* Demo — login page */

.a1-auth {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Brand panel ---------- */
.a1-auth__brand {
  position: relative;
  display: flex; align-items: center;
  padding: 56px clamp(32px, 5vw, 80px);
  background:
    radial-gradient(900px 520px at -10% -10%, rgba(108, 43, 255, .13), transparent 60%),
    radial-gradient(700px 480px at 110% 110%, rgba(6, 182, 212, .12), transparent 60%),
    var(--a1-canvas);
  overflow: hidden;
}
.a1-auth__brand-inner { width: 100%; max-width: 580px; margin: 0 auto; }

.a1-auth__logo { display: block; height: 46px; width: auto; }
.a1-auth__logo--mobile { display: none; }

.a1-auth__title {
  margin-top: 36px !important;
  font-size: clamp(30px, 2.9vw, 40px) !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.028em !important;
  max-width: 17ch;
}
.a1-auth__lede { margin-top: 16px !important; max-width: 48ch; font-size: 17px; color: var(--a1-ink-2); }


/* Commission flow card */
.a1-flow { margin: 28px 0 0; padding: 18px 20px; }
.a1-flow__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.a1-flow__title { font: 650 16px/1.3 var(--a1-font-display); color: var(--a1-ink); }

.a1-flow__txn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--a1-r-md);
  background: var(--a1-surface); border: 1px solid var(--a1-line);
}
.a1-flow__txn-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--a1-brand-gradient); color: #fff;
}
.a1-flow__txn-text { display: grid; gap: 2px; min-width: 0; }
.a1-flow__txn-text strong { color: var(--a1-ink); font-weight: 600; }
.a1-flow__txn-text span { font-size: var(--a1-text-sm); color: var(--a1-ink-3); }
.a1-flow__txn-amt { display: grid; justify-items: end; gap: 4px; }
.a1-flow__txn-amt .a1-money { font-size: 17px; }

.a1-flow__levels { position: relative; list-style: none; margin: 6px 0 0; padding: 4px 0 0 34px; }
/* The connector: drawn once on load, from the transaction down to each earner */
.a1-flow__levels::before {
  content: ""; position: absolute; left: 33px; top: 0; width: 2px; height: calc(100% - 22px);
  background: linear-gradient(#6C2BFF, #2563EB 60%, #06B6D4);
  border-radius: 2px; transform-origin: top;
  animation: a1-flow-draw 900ms var(--a1-ease) 250ms both;
}
.a1-flow__levels li {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "role rate earn" "name rate earn";
  column-gap: 14px; align-items: center;
  margin-top: 6px; padding: 8px 14px 8px 22px;
  border-radius: var(--a1-r-sm); background: rgba(255, 255, 255, .62);
  animation: a1-flow-in 420ms var(--a1-ease) both;
  animation-delay: calc(450ms + var(--i) * 220ms);
}
.a1-flow__levels li::before {
  content: ""; position: absolute; left: -1px; top: 50%; width: 15px; height: 2px;
  background: #2563EB; opacity: .5;
}
.a1-flow__levels li::after {
  content: ""; position: absolute; left: -5px; top: calc(50% - 4px); width: 10px; height: 10px; border-radius: 50%;
  background: var(--a1-surface); border: 2px solid var(--a1-primary);
}
.a1-flow__role { grid-area: role; font-size: 12px; font-weight: 600; color: var(--a1-ink-3); }
.a1-flow__name { grid-area: name; font-weight: 600; color: var(--a1-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a1-flow__rate { grid-area: rate; font-size: var(--a1-text-sm); color: var(--a1-ink-3); }
.a1-flow__earn { grid-area: earn; color: var(--a1-success-700); min-width: 62px; text-align: right; }
.a1-flow__note { margin-top: 14px !important; font-size: var(--a1-text-sm); color: var(--a1-ink-3); }

@keyframes a1-flow-draw { from { transform: scaleY(0); } }
@keyframes a1-flow-in   { from { opacity: 0; transform: translateX(-8px); } }

.a1-auth__features {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px;
  margin: 24px 0 0; padding: 0; list-style: none;
}
.a1-auth__features li { display: flex; align-items: center; gap: 10px; color: var(--a1-ink-2); font-weight: 500; }
.a1-auth__features .a1-ico {
  width: 20px; height: 20px; padding: 3px; border-radius: 50%;
  background: var(--a1-success-50); color: var(--a1-success-500); stroke-width: 3;
}

/* ---------- Sign-in panel ---------- */
.a1-auth__main {
  display: flex; align-items: center; justify-content: center;
  padding: 48px clamp(24px, 4vw, 64px);
  background: var(--a1-surface);
  border-left: 1px solid var(--a1-line);
}
.a1-auth__card { width: 100%; max-width: 420px; }
.a1-auth__heading { margin-top: 14px !important; font-size: 28px !important; letter-spacing: -0.02em; }
.a1-auth__sub { margin: 8px 0 24px !important; color: var(--a1-ink-3); }

.a1-auth .a1-seg { margin-bottom: 20px; }
.a1-auth .a1-seg .a1-ico { width: 17px; height: 17px; }
.a1-auth .a1-alert { margin-bottom: 18px; }

.a1-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; font-size: var(--a1-text-md); }
.a1-auth__row a { font-weight: 600; }

/* Demo credentials */
.a1-creds {
  margin-top: 24px; padding: 4px 16px;
  border: 1px dashed #CDBDFF; border-radius: var(--a1-r-md);
  background: var(--a1-primary-soft);
}
.a1-creds__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0 6px; }
.a1-creds__head h3 { font: 650 14px/1.3 var(--a1-font) !important; color: var(--a1-ink); }
.a1-creds__head span { font-size: 12px; color: var(--a1-ink-3); }
.a1-creds__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid rgba(108, 43, 255, .14);
}
.a1-creds__row div { display: grid; gap: 1px; min-width: 0; }
.a1-creds__row strong { font-size: var(--a1-text-sm); color: var(--a1-ink); }
.a1-creds__row .a1-mono { color: var(--a1-ink-2); font-size: 13.5px; }
.a1-creds .a1-btn--soft { background: var(--a1-surface); border: 1px solid #D9CCFF; min-width: 64px; }

.a1-auth__foot { margin-top: 28px !important; font-size: var(--a1-text-sm); color: var(--a1-ink-3); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .a1-auth { grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); }
  .a1-auth__features { grid-template-columns: 1fr; }
}

@media (max-width: 1023px) {
  .a1-auth { grid-template-columns: 1fr; }
  .a1-auth__main { order: 1; border-left: 0; padding: 32px 20px 40px; align-items: flex-start; }
  .a1-auth__brand { order: 2; padding: 40px 20px 48px; border-top: 1px solid var(--a1-line); }
  .a1-auth__brand .a1-auth__logo { display: none; }
  .a1-auth__logo--mobile { display: block; height: 40px; margin-bottom: 22px; }
  .a1-auth__card, .a1-auth__brand-inner { max-width: 520px; }
  .a1-auth__title { margin-top: 0 !important; font-size: 28px !important; }
  .a1-auth__features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575px) {
  .a1-auth__main { padding: 24px 16px 32px; padding-top: max(24px, env(safe-area-inset-top)); }
  .a1-auth__brand { padding: 32px 16px 40px; }
  .a1-auth__heading { font-size: 24px !important; }
  .a1-auth__title { font-size: 25px !important; }
  .a1-auth__lede { font-size: 15.5px; }
  .a1-auth__features { grid-template-columns: 1fr; }
  .a1-flow { padding: 16px; }
  .a1-flow__txn { grid-template-columns: auto 1fr; }
  .a1-flow__txn-amt { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .a1-flow__levels { padding-left: 22px; }
  .a1-flow__levels::before { left: 21px; }
  .a1-flow__levels li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "role earn" "name rate"; }
  .a1-flow__rate { text-align: right; }
}

@media (max-width: 374px) {
  .a1-creds__row { flex-wrap: wrap; }
}
