.member-portal.app-shell {
  display: block;
  min-height: 100vh;
}

.member-portal .sidebar {
  position: fixed;
  z-index: 18;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: auto;
  padding: 7px max(12px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
  background: #fff;
  color: var(--ink);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 22px rgba(19, 35, 48, 0.1);
}

.member-portal .sidebar .brand,
.member-portal .sidebar .sidebar-foot {
  display: none;
}

.member-portal .nav {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px;
  width: min(720px, 100%);
  margin: 0 auto;
  overflow: visible !important;
}

.member-portal .nav button {
  display: flex;
  min-width: 0;
  height: 56px;
  padding: 5px 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  border-radius: 5px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.member-portal .nav button:hover,
.member-portal .nav button.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.member-portal .nav .nav-icon,
.member-portal .nav button.active .nav-icon {
  display: inline-grid !important;
  color: currentColor;
}

.member-portal .content {
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.member-portal .secondary-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.member-portal .secondary-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.member-portal .secondary-entry:hover {
  border-color: #8ba1ae;
  background: #f7fafb;
}

.member-portal .secondary-entry-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand);
}

.member-portal .secondary-chevron {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.member-portal .credential-history-note {
  margin: 12px 0;
}

.member-portal .member-preprod {
  background: #f0f6f7;
  border-bottom-color: #c8dcdf;
  color: #345c62;
}

.member-portal .status-center {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-portal .product-source-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.member-portal .trade-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--line);
}

.member-portal .trade-summary-item {
  min-height: 78px;
  padding: 13px;
  background: #fff;
}

.member-portal .trade-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.member-portal .trade-summary-item strong {
  display: block;
  margin-top: 7px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.member-portal .locked-reason {
  margin: 0 0 16px;
}

.member-portal .profile-help-card .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.member-portal .record-ledger-list {
  display: grid;
  gap: 10px;
}

.member-portal .record-ledger-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.member-portal .record-ledger-item strong,
.member-portal .record-ledger-item small {
  display: block;
}

.member-portal .record-ledger-item small {
  margin-top: 5px;
  color: var(--muted);
}

.member-portal .record-ledger-item .amount {
  text-align: right;
  white-space: nowrap;
}

.member-portal .status-card-actionable {
  align-content: start;
}

.member-portal .status-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.member-portal .status-card-actions .button {
  min-height: 38px;
  white-space: normal;
}

.member-portal .status-card-actionable.is-targeted {
  outline: 3px solid #d99b33;
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .member-portal .status-center,
  .member-portal .trade-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .member-portal .status-center,
  .member-portal .trade-summary-grid {
    grid-template-columns: 1fr;
  }

  .member-portal .secondary-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-portal .mobile-primary-dock {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .member-portal .content {
    padding-bottom: calc(154px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .member-portal .nav button {
    min-height: 54px;
    white-space: normal;
    line-height: 1.25;
  }

  .member-portal .secondary-entry-grid {
    grid-template-columns: 1fr;
  }

  .member-portal .record-ledger-item {
    grid-template-columns: 1fr;
  }

  .member-portal .record-ledger-item .amount {
    text-align: left;
  }

  .member-portal .status-card-actions {
    grid-template-columns: 1fr;
  }
}

.member-portal .credential-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
  line-height: 1.55;
}

.member-portal .credential-confirmation input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
}
.legal-confirmation-panel{margin-top:16px;padding:14px;border:1px solid var(--line);background:#f8fafb}.legal-section-list{display:grid;gap:10px;max-height:260px;overflow:auto;padding-right:4px}.legal-section-list article{padding:10px 0;border-bottom:1px solid var(--line)}.legal-section-list article:last-child{border-bottom:0}.legal-section-list h4{margin:0 0 5px;font-size:14px}.legal-section-list p{margin:0;color:var(--muted);line-height:1.65}.check-row{display:flex;gap:10px;align-items:flex-start;margin-top:14px;line-height:1.6}.check-row input{width:18px;height:18px;flex:0 0 auto;margin-top:3px}.check-row span{min-width:0}
