/* ============================================================
   ALGO NODE TRADE — Auth pages (login)
   Shares the terminal design tokens. Keep :root in sync with
   terminal.css.
   ============================================================ */

:root {
  --ant-bg:            #050706;
  --ant-bg-2:          #080B09;
  --ant-panel:         #0B100D;
  --ant-raised:        #0E1410;
  --ant-inset:         #090D0A;

  --ant-border:        rgba(255,255,255,.08);
  --ant-border-strong: rgba(255,255,255,.12);

  --ant-text:          #F5F7F5;
  --ant-text-soft:     #A3ABA5;
  --ant-text-muted:    #68716B;

  --ant-accent:        #9AFF4B;
  --ant-accent-soft:   rgba(154,255,75,.12);
  --ant-accent-border: rgba(154,255,75,.25);
  --ant-down:          #FF4D5E;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  background:
    radial-gradient(900px 480px at 82% -10%, rgba(154,255,75,.06), transparent 60%),
    var(--ant-bg);
  color: var(--ant-text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
}

/* ---------- Split layout ---------- */

.ant-auth {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100dvh;
}

/* Brand / identity panel (desktop) */
.ant-auth__aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 56px;
  border-right: 1px solid var(--ant-border);
  background:
    radial-gradient(600px 420px at 18% 8%, rgba(154,255,75,.07), transparent 60%),
    var(--ant-bg-2);
}

.ant-auth__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ant-auth__brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.ant-auth__brand span {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .22em;
}

.ant-auth__pitch h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.ant-auth__pitch p {
  margin: 0;
  max-width: 400px;
  color: var(--ant-text-soft);
  font-size: 14px;
  line-height: 1.65;
}

.ant-auth__points {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ant-auth__points li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ant-text-soft);
  font-size: 13px;
}
.ant-auth__points li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--ant-accent);
  transform: translateY(-1px);
}

.ant-auth__foot {
  color: var(--ant-text-muted);
  font-size: 11px;
  letter-spacing: .08em;
}

/* ---------- Form panel ---------- */

.ant-auth__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.ant-auth__card {
  width: min(400px, 100%);
}

.ant-auth__mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}
.ant-auth__mobile-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.ant-auth__mobile-brand span {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .2em;
}

.ant-auth__title {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.ant-auth__sub {
  margin: 0 0 26px;
  color: var(--ant-text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.ant-field { margin-bottom: 15px; }

.ant-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ant-text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ant-input-wrap { position: relative; }

.ant-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--ant-border-strong);
  background: var(--ant-inset);
  color: var(--ant-text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ant-field input::placeholder { color: var(--ant-text-muted); }
.ant-field input:focus {
  border-color: rgba(154,255,75,.45);
  box-shadow: 0 0 0 3px rgba(154,255,75,.07);
}
.ant-field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px var(--ant-inset) inset;
  -webkit-text-fill-color: var(--ant-text);
  caret-color: var(--ant-text);
}

.ant-pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ant-text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  cursor: pointer;
}
.ant-pw-toggle:hover { color: var(--ant-text-soft); background: rgba(255,255,255,.05); }

.ant-submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  background: var(--ant-accent);
  color: #050706;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: filter .15s ease, transform .1s ease, opacity .15s ease;
}
.ant-submit:hover { filter: brightness(1.05); }
.ant-submit:active { transform: scale(.99); }
.ant-submit[disabled] { opacity: .55; cursor: default; }

.ant-submit .ant-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(5,7,6,.25);
  border-top-color: #050706;
  animation: ant-auth-spin .7s linear infinite;
  display: none;
}
.ant-submit.is-loading .ant-spinner { display: inline-block; }
@keyframes ant-auth-spin { to { transform: rotate(360deg); } }

.ant-error {
  background: rgba(255,77,94,.08);
  border: 1px solid rgba(255,77,94,.28);
  color: #FF8B95;
  padding: 11px 13px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 12.5px;
  line-height: 1.5;
}

.ant-auth__foot-link {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--ant-text-muted);
}
.ant-auth__foot-link a {
  color: var(--ant-accent);
  text-decoration: none;
  font-weight: 700;
}
.ant-auth__foot-link a:hover { text-decoration: underline; }

/* ---------- Install app CTA ---------- */

.ant-install {
  width: min(400px, 100%);
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(154,255,75,.10), rgba(154,255,75,.03));
  border: 1px solid var(--ant-accent-border);
  border-radius: 12px;
  padding: 14px 15px;
}
.ant-install[hidden] { display: none; }

.ant-install__head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 800;
}
.ant-install__head svg { width: 15px; height: 15px; color: var(--ant-accent); flex: none; }

.ant-install__sub {
  margin: 5px 0 0;
  color: var(--ant-text-soft);
  font-size: 11.5px;
  line-height: 1.55;
}

.ant-install__actions {
  display: flex;
  gap: 8px;
  margin-top: 11px;
}
.ant-install__btn {
  flex: 1;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--ant-accent);
  background: var(--ant-accent);
  color: #050706;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
}
.ant-install__btn:hover { filter: brightness(1.05); }
.ant-install__btn.ghost {
  flex: 0 0 auto;
  background: transparent;
  border-color: var(--ant-border-strong);
  color: var(--ant-text-muted);
}
.ant-install__btn.info {
  flex: 0 0 auto;
  background: transparent;
  border-color: var(--ant-accent-border);
  color: var(--ant-accent);
}

.ant-install__steps {
  margin: 11px 0 0;
  padding: 0 0 0 2px;
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 7px;
}
.ant-install__steps.open { display: flex; }
.ant-install__steps li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--ant-text-soft);
  font-size: 11.5px;
  line-height: 1.5;
}
.ant-install__steps b {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 99px;
  background: var(--ant-accent-soft);
  border: 1px solid var(--ant-accent-border);
  color: var(--ant-accent);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  line-height: 15px;
  transform: translateY(2px);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .ant-auth { grid-template-columns: 1fr; }
  .ant-auth__aside { display: none; }
  .ant-auth__main { padding: 34px 20px; justify-content: flex-start; padding-top: max(34px, env(safe-area-inset-top)); }
  .ant-auth__mobile-brand { display: flex; }
  body { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Step text wraps as one block (single flex child), not spread chunks */
.ant-install__steps li > span,
.ant-install-steps li > span { flex: 1; min-width: 0; }
