/* ═══════════════════════════════════════════════════
   InvestPNG — Auth Pages (Login / Register)
   Split-screen layout: dark brand panel + light form panel.
   Sovereign-grade institutional UI.
═══════════════════════════════════════════════════ */

/* ── Split Container ──────────────────────────────── */
.ip-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 60px); /* viewport minus nav */
}

/* ── Brand Panel (left) ───────────────────────────── */
.ip-split__brand {
  position: relative;
  background-color: var(--navy-deep);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: stretch;
}
.ip-split__brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(35, 46, 50, 0.92) 0%,
    rgba(35, 46, 50, 0.82) 50%,
    rgba(35, 46, 50, 0.90) 100%
  );
}
.ip-split__brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  width: 100%;
}

/* Headline block */
.ip-split__brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
}
.ip-split__headline {
  font-size: 32px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.ip-split__subline {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin: 0;
  max-width: 400px;
}

/* ── Proof Stats (login) ──────────────────────────── */
.ip-split__proof {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.ip-split__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ip-split__stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: -0.02em;
  line-height: 1;
}
.ip-split__stat-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

/* ── Value Props (register) ───────────────────────── */
.ip-split__value-props {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.ip-split__value-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ip-split__value-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(164, 140, 72, 0.2);
  color: var(--gold-light);
  align-self: flex-start;
}
.ip-split__value-badge--partner {
  background: rgba(164, 140, 72, 0.2);
  color: var(--gold-light);
}
.ip-split__value-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
  margin: 0;
}

/* ── Form Panel (right) ──────────────────────────── */
.ip-split__form {
  background: var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  overflow-y: auto;
}
.ip-split__form-inner {
  width: 100%;
  max-width: 480px;
}
.ip-split--register .ip-split__form-inner {
  max-width: 560px;
}

/* ── Card ──────────────────────────────────────── */
.ip-split__form .ip-auth__card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}
.ip-split__form .ip-auth__card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 8px;
  line-height: 1.3;
}
.ip-split__form .ip-auth__card-subtitle {
  font-size: 14px;
  color: var(--slate);
  margin: 0 0 28px;
  line-height: 1.5;
}

/* ── Notices ───────────────────────────────────── */
.ip-split__form .ip-auth__notice {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}
.ip-split__form .ip-auth__notice p { margin: 0; }
.ip-split__form .ip-auth__notice ul { margin: 0; padding-left: 18px; }
.ip-split__form .ip-auth__notice li { margin-bottom: 4px; }
.ip-split__form .ip-auth__notice li:last-child { margin-bottom: 0; }
.ip-split__form .ip-auth__notice a { color: inherit; font-weight: 600; text-decoration: underline; }
.ip-auth__notice--success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.ip-auth__notice--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.ip-auth__notice--info    { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.ip-auth__notice--warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ── Form Fields ───────────────────────────────── */
.ip-split__form .ip-auth__field {
  margin-bottom: 20px;
}
.ip-split__form .ip-auth__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.ip-split__form .ip-auth__input,
.ip-split__form .ip-auth__select,
.ip-split__form .ip-auth__textarea {
  display: block;
  width: 100%;
  height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 12px;
  background: #fff;
  font-family: var(--font);
  font-size: 16px;
  color: var(--charcoal);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.ip-split__form .ip-auth__textarea {
  height: auto;
  min-height: 100px;
  resize: vertical;
}
.ip-split__form .ip-auth__input::placeholder,
.ip-split__form .ip-auth__textarea::placeholder {
  color: rgba(90, 97, 112, 0.5);
}
.ip-split__form .ip-auth__input:hover,
.ip-split__form .ip-auth__select:hover,
.ip-split__form .ip-auth__textarea:hover {
  border-color: rgba(17, 24, 39, 0.32);
}
.ip-split__form .ip-auth__input:focus,
.ip-split__form .ip-auth__select:focus,
.ip-split__form .ip-auth__textarea:focus {
  outline: none;
  border-color: #1a6b35;
  box-shadow: 0 0 0 4px rgba(31, 138, 76, 0.14);
}

/* Error state */
.ip-split__form .ip-auth__input--error {
  border-color: #dc2626;
}
.ip-split__form .ip-auth__input--error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

/* ── Form Row (side-by-side fields) ────────────── */
.ip-split__form .ip-auth__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Meta Row (Remember me + Forgot password) ──── */
.ip-split__form .ip-auth__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.ip-split__form .ip-auth__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--slate);
  cursor: pointer;
}
.ip-split__form .ip-auth__remember input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  accent-color: #1a6b35;
  cursor: pointer;
}
.ip-split__form .ip-auth__forgot {
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.ip-split__form .ip-auth__forgot:hover {
  color: var(--gold-dark);
}

/* ── Submit Button ─────────────────────────────── */
.ip-split__form .ip-auth__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0 24px;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.ip-split__form .ip-auth__submit:hover {
  background: var(--gold-dark);
}
.ip-split__form .ip-auth__submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(164, 140, 72, 0.25);
}

/* ── Footer ────────────────────────────────────── */
.ip-split__form .ip-auth__footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--slate);
}
.ip-split__form .ip-auth__footer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.ip-split__form .ip-auth__footer a:hover {
  color: var(--gold-dark);
}

/* ── Role Selector (Register) ──────────────────── */
.ip-split__form .ip-auth__roles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ip-split__form .ip-auth__role-option {
  cursor: pointer;
}
.ip-split__form .ip-auth__role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

/* ── Password Toggle ─────────────────────────────── */
.ip-auth__pw-wrap {
  position: relative;
}
.ip-auth__pw-wrap .ip-auth__input {
  padding-right: 44px;
}
.ip-auth__pw-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--slate);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.ip-auth__pw-toggle:hover {
  color: var(--charcoal);
}
.ip-auth__pw-toggle:focus-visible {
  outline: 2px solid #1a6b35;
  outline-offset: 2px;
  border-radius: 4px;
}
.ip-auth__pw-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Inline Validation Errors ────────────────────── */
.ip-auth__field-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
  display: none;
}
.ip-auth__field-error.is-visible {
  display: block;
}
.ip-auth__roles-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 6px;
  display: none;
}
.ip-auth__roles-error.is-visible {
  display: block;
}
.ip-split__form .ip-auth__role-card {
  display: block;
  padding: 16px 20px;
  border: 2px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.ip-split__form .ip-auth__role-card strong {
  display: block;
  font-size: 15px;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.ip-split__form .ip-auth__role-card span {
  display: block;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.4;
}
.ip-split__form .ip-auth__role-option input:checked + .ip-auth__role-card {
  border-color: #1a6b35;
  background: rgba(31, 138, 76, 0.04);
  box-shadow: 0 0 0 4px rgba(31, 138, 76, 0.08);
}
.ip-split__form .ip-auth__role-option input:focus-visible + .ip-auth__role-card {
  outline: 2px solid #1a6b35;
  outline-offset: 2px;
}

/* ── Password Strength ─────────────────────────── */
.ip-split__form .ip-auth__pw-strength {
  margin-top: 8px;
  height: 4px;
  border-radius: 2px;
  background: rgba(17, 24, 39, 0.08);
  overflow: hidden;
}
.ip-split__form .ip-auth__pw-note {
  font-size: 12px;
  color: var(--slate);
  line-height: 1.5;
  margin: 0;
}

/* ── Disclaimer ────────────────────────────────── */
.ip-split__form .ip-auth__disclaimer {
  font-size: 12px;
  color: var(--slate);
  line-height: 1.6;
  margin-top: 16px;
}

/* ── Honeypot (keep hidden) ────────────────────── */
.ip-split__form .ip-auth__hp {
  position: absolute;
  left: -9999px;
}

/* ── Register: compact overrides for viewport fit ── */
.ip-split--register .ip-split__form { padding: 32px 48px; }
.ip-split--register .ip-auth__card { padding: 28px 32px; }
.ip-split--register .ip-auth__card-title { margin-bottom: 16px; }
.ip-split--register .ip-auth__field { margin-bottom: 14px; }
.ip-split--register .ip-auth__label { margin-bottom: 4px; font-size: 12px; }
.ip-split--register .ip-auth__input,
.ip-split--register .ip-auth__select {
  height: 42px;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
}
.ip-split--register .ip-auth__submit {
  height: 44px;
  border-radius: 8px;
}
.ip-split--register .ip-auth__footer {
  margin-top: 16px;
  padding-top: 14px;
}
.ip-split--register .ip-auth__disclaimer { margin-top: 10px; }
.ip-split--register .ip-auth__pw-note { font-size: 11px; }
.ip-split--register .ip-auth__row { gap: 12px; }

/* Compact role selector — inline radio rows instead of stacked cards */
.ip-split--register .ip-auth__roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ip-split--register .ip-auth__role-card {
  padding: 12px 14px;
  border-radius: 8px;
  border-width: 1.5px;
}
.ip-split--register .ip-auth__role-card strong {
  font-size: 13px;
  margin-bottom: 2px;
}
.ip-split--register .ip-auth__role-card span {
  font-size: 11px;
  line-height: 1.35;
}

/* ═══════════════════════════════════════════════════
   Responsive
═══════════════════════════════════════════════════ */

/* Tablet: stack to single column */
@media (max-width: 960px) {
  .ip-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  /* Form on top, brand condensed below */
  .ip-split__form { order: 1; padding: 40px 24px; }
  .ip-split__brand { order: 2; }

  .ip-split__brand-inner {
    padding: 40px 32px;
  }
  .ip-split__brand-content {
    padding: 0 0 24px;
  }
  .ip-split__headline { font-size: 24px; }
}

/* Mobile */
@media (max-width: 640px) {
  .ip-split__form { padding: 32px 16px; }
  .ip-split__form .ip-auth__card {
    padding: 28px 24px;
    border-radius: 8px;
  }
  .ip-split__form .ip-auth__card-title { font-size: 20px; }
  .ip-split__form .ip-auth__row { grid-template-columns: 1fr; }
  .ip-split__form .ip-auth__input,
  .ip-split__form .ip-auth__select,
  .ip-split__form .ip-auth__submit {
    height: 44px;
    font-size: 15px;
    border-radius: 8px;
  }
  .ip-split__form .ip-auth__role-card { border-radius: 8px; }
  .ip-split--register .ip-auth__roles { grid-template-columns: 1fr; }
  .ip-split--register .ip-split__form { padding: 32px 16px; }
  .ip-split--register .ip-auth__card { padding: 24px 20px; }
  .ip-split__form .ip-auth__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ip-split__brand-inner { padding: 32px 20px; }
  .ip-split__headline { font-size: 22px; }
  .ip-split__proof { gap: 20px; flex-wrap: wrap; }
  .ip-split__stat-value { font-size: 20px; }
}

/* ── Hide brand panel entirely on very small screens ── */
@media (max-width: 480px) {
  .ip-split__brand { display: none; }
}

/* ═══════════════════════════════════════════════════
   Legal Pages (Privacy Policy / Terms of Use)
   Split hero + single-column document body.
═══════════════════════════════════════════════════ */

/* ── Legal split: shorter hero, no min-height ── */
.ip-split--legal { min-height: auto; }
.ip-split--legal .ip-split__brand { min-height: 360px; }
.ip-split--legal .ip-split__form {
  align-items: flex-start;
  padding: 56px 48px;
}
.ip-split--legal .ip-split__form-inner {
  max-width: 480px;
}

/* ── Summary panel (right side of hero) ── */
.ip-legal-summary {}
.ip-legal-updated {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.ip-legal-intro {
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.75;
  margin: 0 0 28px;
}
.ip-legal-scroll {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s, gap 0.2s;
}
.ip-legal-scroll:hover { color: var(--gold); gap: 10px; }

/* ── Document body ── */
.ip-legal {
  background: var(--stone);
  padding: 72px 48px;
  border-top: none;
}
.ip-legal__inner {
  max-width: 740px;
  margin: 0 auto;
}

.ip-legal__section {
  margin-bottom: 0;
  padding: 32px 36px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 16px;
}
.ip-legal__section:last-child {
  margin-bottom: 0;
}

.ip-legal__section h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
  line-height: 1.3;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.ip-legal__section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin: 20px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ip-legal__section p {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.8;
  margin: 0 0 14px;
}
.ip-legal__section p:last-child { margin-bottom: 0; }
.ip-legal__section ul {
  margin: 0 0 14px;
  padding-left: 20px;
}
.ip-legal__section li {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.8;
  margin-bottom: 8px;
}
.ip-legal__section li:last-child { margin-bottom: 0; }
.ip-legal__section a {
  color: var(--gold-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.ip-legal__section a:hover { color: var(--gold); text-decoration: underline; }
.ip-legal__section strong { color: var(--navy); }

/* Important legal disclaimers */
.ip-legal__section p:has(strong:first-child) {
  background: var(--stone);
  padding: 14px 18px;
  border-radius: 3px;
  border-left: 3px solid var(--gold);
  margin: 16px 0;
}

/* Contact block at end of legal sections */
.ip-legal__section:last-child p:last-of-type:has(strong:first-child) {
  background: var(--navy);
  padding: 20px 24px;
  border-radius: 4px;
  border-left: none;
}
.ip-legal__section:last-child p:last-of-type:has(strong:first-child),
.ip-legal__section:last-child p:last-of-type:has(strong:first-child) a {
  color: var(--white);
}
.ip-legal__section:last-child p:last-of-type:has(strong:first-child) strong {
  color: var(--gold);
}
.ip-legal__section:last-child p:last-of-type:has(strong:first-child) a:hover {
  color: var(--gold-light);
}

/* ── Legal page table of contents ── */
.ip-legal__nav {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px 32px;
  margin-bottom: 24px;
}
.ip-legal__nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
.ip-legal__nav-list {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}
.ip-legal__nav-list li {
  font-size: 13px;
  color: var(--charcoal);
  margin-bottom: 6px;
  break-inside: avoid;
}
.ip-legal__nav-list a {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.ip-legal__nav-list a:hover {
  color: var(--gold-dark);
}
@media (max-width: 640px) {
  .ip-legal__nav { padding: 20px; }
  .ip-legal__nav-list { columns: 1; }
}

/* ── Legal page responsive ── */
@media (max-width: 960px) {
  .ip-split--legal .ip-split__brand { min-height: 260px; }
  .ip-split--legal .ip-split__form { padding: 40px 24px; }
  .ip-legal { padding: 56px 24px; }
}
@media (max-width: 640px) {
  .ip-legal { padding: 40px 16px; }
  .ip-legal__section { padding: 24px 20px; margin-bottom: 12px; }
  .ip-legal__section h2 { font-size: 15px; }
}
@media (max-width: 480px) {
  .ip-split--legal .ip-split__form { padding: 32px 16px; }
  .ip-legal__section { padding: 20px 16px; }
}
