/* CountaTrade auth — V3 split-card layout, Counta green theme */
:root {
  --auth-font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --auth-font-title: "Fraunces", Georgia, serif;
  --auth-ink: #122018;
  --auth-text: #122018;
  --auth-muted: #5f6d65;
  --auth-muted2: #87928a;
  --auth-accent: #0b7a3b;
  --auth-accent-hover: #064e27;
  --auth-soft: #e8f5ee;
  --auth-panel-line: #d5e3da;
  --auth-field-line: rgba(18, 32, 24, 0.35);
  --auth-field-bg: #ffffff;
  --auth-danger: #c62828;
  --auth-black-rgb: 18, 32, 24;
  --auth-bg: #f3f7f4;
  --auth-hero-bg: #041c11;
  --auth-card-shadow: 0 20px 60px rgba(6, 78, 39, 0.12);
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: clamp(20px, 4vw, 48px);
  font-family: var(--auth-font-body);
  color: var(--auth-text);
  background:
    radial-gradient(900px 320px at 50% -120px, rgba(11, 122, 59, 0.12), transparent 55%),
    radial-gradient(700px 260px at 18% 120px, rgba(var(--auth-black-rgb), 0.04), transparent 55%),
    var(--auth-bg);
}

.auth-back {
  position: absolute;
  top: clamp(16px, 3vw, 28px);
  left: clamp(16px, 3vw, 28px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--auth-accent);
  text-decoration: none;
}

.auth-back:hover {
  color: var(--auth-accent-hover);
}

.auth-back__arrow {
  font-size: 1.15em;
  line-height: 1;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  width: min(1040px, 100%);
  min-height: min(640px, calc(100vh - 40px));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--auth-card-shadow);
  background: #fff;
  border: 1px solid var(--auth-panel-line);
}

.auth-card--form-only {
  grid-template-columns: 1fr;
  width: min(460px, 100%);
  min-height: 0;
}

.auth-byline {
  margin: 0;
  max-width: min(1040px, 100%);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--auth-muted);
}

.auth-hero {
  position: relative;
  isolation: isolate;
  min-height: 280px;
  background: linear-gradient(165deg, #0a3d22 0%, #062818 48%, #041c11 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(480px 280px at 70% 30%, rgba(11, 122, 59, 0.45), transparent 60%),
    radial-gradient(360px 220px at 20% 80%, rgba(232, 245, 238, 0.08), transparent 55%);
}

.auth-hero__track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.auth-hero__photo {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  pointer-events: none;
  user-select: none;
}

.auth-hero__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(4, 28, 17, 0.55) 0%, rgba(4, 28, 17, 0.18) 38%, rgba(4, 28, 17, 0.72) 100%),
    linear-gradient(90deg, rgba(4, 28, 17, 0.35), transparent 55%);
  pointer-events: none;
}

.auth-hero__top,
.auth-hero__bottom {
  position: relative;
  z-index: 3;
  padding: clamp(20px, 3vw, 28px);
}

.auth-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #fff;
}

.auth-brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  padding: 3px;
  box-sizing: border-box;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
  object-fit: contain;
}

.auth-brand span > small,
.auth-brand small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

.auth-hero__tagline {
  margin: 0 0 18px;
  font-family: var(--auth-font-title);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  min-height: 3.2em;
  animation: ctHeroTagline 0.55s ease both;
}

@keyframes ctHeroTagline {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-hero__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-hero__dot {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.auth-hero__dot.is-active {
  width: 36px;
  background: #fff;
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 48px) clamp(24px, 4vw, 44px);
  background: #fff;
}

.auth-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.auth-form-head .auth-title {
  margin: 0;
  align-self: center;
}

.auth-form-brand {
  flex: 0 0 auto;
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-form-brand__logo {
  width: 160px;
  height: 80px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid var(--auth-panel-line);
}

.auth-title {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
  font-family: var(--auth-font-title);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--auth-ink);
}

.auth-lead {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--auth-muted);
}

.auth-field-grid {
  display: grid;
  gap: 16px;
}

.auth-field-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--auth-text);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.auth-field input,
.auth-field select {
  width: 100%;
  border-radius: 6px;
  border: 1.5px solid var(--auth-field-line);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--auth-muted);
  background: var(--auth-field-bg);
  outline: none;
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: rgba(11, 122, 59, 0.72);
  box-shadow: 0 0 0 3px rgba(11, 122, 59, 0.12);
}

.auth-field--password {
  position: relative;
}

.auth-field--password input {
  padding-right: 44px;
}

.auth-pw-toggle {
  position: absolute;
  right: 8px;
  bottom: 6px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(var(--auth-black-rgb), 0.45);
  cursor: pointer;
}

.auth-pw-toggle:hover {
  color: var(--auth-accent);
  background: var(--auth-soft);
}

.auth-pw-toggle svg {
  display: block;
}

.auth-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-muted);
  cursor: pointer;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-accent);
}

.auth-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--auth-accent);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.auth-link:hover {
  color: var(--auth-accent-hover);
  text-decoration: underline;
}

.auth-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 16px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  transition: background 0.15s, opacity 0.15s;
}

.auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-btn--primary {
  background: var(--auth-accent);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

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

.auth-btn--ghost {
  background: #f5f7f5;
  color: var(--auth-accent);
  border: 1.5px solid rgba(var(--auth-black-rgb), 0.15);
  margin-top: 10px;
}

.auth-btn--secondary {
  background: #fff;
  color: var(--auth-ink);
  border: 1px solid rgba(var(--auth-black-rgb), 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 13px;
}

.auth-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.auth-alert--error {
  background: rgba(198, 40, 40, 0.08);
  color: #991b1b;
  border: 1px solid rgba(198, 40, 40, 0.2);
}

.auth-alert--success {
  background: rgba(11, 122, 59, 0.1);
  color: #166534;
  border: 1px solid rgba(11, 122, 59, 0.25);
}

.auth-alert--info {
  background: rgba(11, 122, 59, 0.06);
  color: #0b4d28;
  border: 1px solid rgba(11, 122, 59, 0.18);
}

.auth-alt {
  margin-top: 22px;
}

.auth-alt-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-alt-divider__line {
  flex: 1;
  height: 1px;
  background: rgba(var(--auth-black-rgb), 0.08);
}

.auth-alt-divider__label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-muted2);
}

.auth-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px;
  background: rgba(var(--auth-black-rgb), 0.05);
  border-radius: 999px;
}

.auth-method-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 11px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  color: var(--auth-muted);
}

.auth-method-tab.is-active {
  background: #fff;
  color: var(--auth-ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.auth-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--auth-muted2);
  line-height: 1.5;
}

.pw-guide {
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid var(--auth-panel-line);
  border-radius: 14px;
  background: var(--auth-soft);
}

.pw-guide__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--auth-ink);
}

.pw-guide__terms {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--auth-muted);
}

.pw-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.pw-checklist li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  line-height: 1.35;
  color: var(--auth-muted);
}

.pw-checklist__mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--auth-panel-line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: transparent;
}

.pw-checklist li.is-met {
  color: var(--auth-accent-hover);
  font-weight: 600;
}

.pw-checklist li.is-met .pw-checklist__mark {
  border-color: var(--auth-accent);
  background: var(--auth-accent);
  color: #fff;
}

.auth-footnote {
  margin-top: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-muted);
  text-align: center;
}

.auth-footnote a,
.auth-footnote button {
  color: var(--auth-accent);
  font-weight: 700;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.auth-footnote a:hover,
.auth-footnote button:hover {
  text-decoration: underline;
}

.auth-progress {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
}

.auth-progress__step {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(var(--auth-black-rgb), 0.1);
}

.auth-progress__step.is-done,
.auth-progress__step.is-active {
  background: var(--auth-accent);
}

.auth-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--auth-accent);
}

.auth-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.auth-actions-row .auth-btn {
  flex: 1;
  min-width: 120px;
  margin-top: 0;
}

.ob-shell {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.ob-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 32px);
  background: rgba(243, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(var(--auth-black-rgb), 0.06);
}

.ob-topbar .auth-brand {
  color: var(--auth-ink);
}

.ob-topbar .auth-brand small {
  color: rgba(var(--auth-black-rgb), 0.55);
}

.ob-topbar__links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(var(--auth-black-rgb), 0.65);
}

.ob-topbar__links button,
.ob-topbar__links a {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  font-weight: 600;
}

.ob-topbar__links button:hover,
.ob-topbar__links a:hover {
  color: var(--auth-accent);
}

.ob-card {
  background: #fff;
  border: 1px solid var(--auth-panel-line);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 12px 36px rgba(6, 78, 39, 0.06);
}

@media (max-width: 860px) {
  .auth-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-hero {
    min-height: 220px;
  }

  .auth-field-grid--2 {
    grid-template-columns: 1fr;
  }
}
