.portal-body {
  background: #f7f2ea;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(247, 242, 234, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(22, 24, 32, 0.08);
}

.portal-header-inner,
.portal-top-nav {
  display: flex;
  align-items: center;
}

.portal-header-inner {
  min-height: 84px;
  justify-content: space-between;
  gap: 24px;
}

.portal-top-nav {
  gap: 26px;
  color: var(--muted);
  font-size: 0.94rem;
}

.portal-hero {
  background:
    linear-gradient(135deg, rgba(16, 20, 29, 0.98) 0%, rgba(24, 29, 41, 0.94) 55%, rgba(159, 115, 87, 0.78) 100%);
  color: white;
  padding: 92px 0 84px;
}

.portal-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
  gap: 36px;
  align-items: center;
}

.portal-hero-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
  max-width: 58ch;
}

.portal-hero-shell {
  padding: 20px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 80px rgba(5, 8, 16, 0.35);
}

.portal-window {
  border-radius: 26px;
  overflow: hidden;
  background: #f8f6f1;
  color: var(--ink);
}

.portal-window-top {
  display: flex;
  gap: 8px;
  padding: 16px 18px;
  background: #ece5da;
}

.portal-window-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(22, 24, 32, 0.22);
}

.portal-window-body {
  padding: 22px;
}

.portal-balance-card {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #171b25 0%, #252b39 100%);
  color: white;
}

.portal-balance-card small,
.portal-balance-card p {
  color: rgba(255, 255, 255, 0.7);
}

.portal-balance-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 2.1rem;
  font-family: "Baskerville", "Palatino Linotype", serif;
  font-weight: 500;
}

.portal-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.portal-mini-grid article,
.auth-card,
.workflow-grid article,
.product-card,
.funding-card,
.dashboard-panel,
.portal-preview-card {
  background: white;
  border-radius: 24px;
  border: 1px solid rgba(22, 24, 32, 0.08);
  box-shadow: var(--shadow);
}

.portal-mini-grid article {
  padding: 16px;
}

.portal-mini-grid span,
.mini-stat span,
.summary-row span,
.dashboard-list span,
.funding-methods span,
.panel-header span {
  color: var(--muted);
  font-size: 0.92rem;
}

.portal-mini-grid strong,
.mini-stat strong,
.summary-row strong,
.dashboard-list strong {
  display: block;
  margin-top: 6px;
}

.auth-grid,
.funding-layout,
.portal-preview-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.auth-card {
  padding: 28px;
}

.auth-card-accent {
  background: linear-gradient(180deg, rgba(196, 154, 122, 0.12), white 38%);
}

.portal-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.portal-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.portal-form input {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(22, 24, 32, 0.12);
  padding: 0 16px;
  background: #fbfaf7;
  font: inherit;
}

.auth-checklist {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.auth-checklist article {
  padding: 16px 18px;
  border-radius: 16px;
  background: #fbfaf7;
  border: 1px solid rgba(22, 24, 32, 0.08);
  color: var(--ink);
  font-weight: 500;
}

.portal-workflow {
  background: linear-gradient(180deg, rgba(196, 154, 122, 0.08), transparent 28%), var(--bg);
}

.workflow-grid,
.product-grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.workflow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-grid article {
  padding: 24px;
}

.workflow-grid span {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent-deep);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
}

.portal-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.status-card {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(22, 24, 32, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.status-label {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.status-card strong {
  display: block;
}

.status-card.is-complete {
  background: linear-gradient(180deg, rgba(196, 154, 122, 0.16), rgba(255, 255, 255, 0.96));
}

.status-card.is-progress {
  border-color: rgba(196, 154, 122, 0.34);
}

.portal-dark-heading p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.72);
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
}

.featured-product {
  outline: 2px solid rgba(196, 154, 122, 0.42);
  transform: translateY(-8px);
}

.product-tag {
  margin: 0 0 12px;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

.product-card ul,
.dashboard-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.product-card a {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent-deep);
  font-weight: 700;
}

.product-select-link {
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.product-option {
  transition: 180ms ease;
}

.product-option:hover {
  transform: translateY(-4px);
}

.product-option.is-selected {
  outline: 2px solid rgba(196, 154, 122, 0.62);
}

.funding-methods {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.funding-methods article {
  padding: 18px 0;
  border-top: 1px solid rgba(22, 24, 32, 0.1);
}

.funding-methods article:first-child {
  border-top: 0;
  padding-top: 0;
}

.funding-card {
  padding: 26px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.funding-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.progress-step {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(22, 24, 32, 0.1);
  background: #fbfaf7;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: 180ms ease;
}

.progress-step.is-active {
  background: #171b25;
  color: white;
  border-color: #171b25;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(22, 24, 32, 0.08);
}

.dashboard-section {
  background: #f1eadf;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr) minmax(280px, 1fr);
  align-items: stretch;
}

.dashboard-panel {
  padding: 24px;
  min-height: 100%;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-tab {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(22, 24, 32, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}

.dashboard-tab.is-active {
  background: #171b25;
  color: white;
  border-color: #171b25;
}

.dashboard-tab-panel[hidden] {
  display: none;
}

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

.dashboard-panel-wide {
  background: linear-gradient(135deg, #141824 0%, #242c3a 100%);
  color: white;
}

.dashboard-panel-wide .panel-header span,
.dashboard-panel-wide .overview-metrics span {
  color: rgba(255, 255, 255, 0.72);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-header > span:last-child {
  text-align: right;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.overview-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

.dashboard-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(22, 24, 32, 0.08);
}

.dashboard-list {
  list-style: none;
  padding-left: 0;
}

.dashboard-list span {
  max-width: 18ch;
}

.dashboard-list li:last-child {
  border-bottom: 0;
}

.portal-preview {
  background: linear-gradient(180deg, rgba(16, 20, 29, 0.04), transparent 45%), var(--bg);
}

.portal-preview-panel {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(22, 24, 32, 0.96) 0%, rgba(33, 38, 51, 0.92) 70%, rgba(159, 115, 87, 0.88) 100%);
  color: white;
  align-items: center;
}

.portal-preview-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.76);
}

.portal-preview-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mini-stat {
  padding: 16px;
  border-radius: 18px;
  background: rgba(196, 154, 122, 0.08);
}

.portal-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.button-dark-outline {
  border-color: rgba(255, 255, 255, 0.24);
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1080px) {
  .portal-hero-layout,
  .auth-grid,
  .funding-layout,
  .portal-preview-panel,
  .dashboard-grid,
  .product-grid,
  .workflow-grid,
  .portal-status-strip,
  .dashboard-grid-secondary {
    grid-template-columns: 1fr;
  }

  .portal-top-nav {
    display: none;
  }

  .overview-metrics,
  .portal-preview-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .portal-hero {
    padding: 72px 0 64px;
  }

  .portal-header-inner {
    min-height: 76px;
  }

  .portal-mini-grid,
  .overview-metrics,
  .portal-preview-card,
  .funding-progress {
    grid-template-columns: 1fr;
  }

  .portal-preview-panel,
  .auth-card,
  .funding-card,
  .dashboard-panel {
    padding: 22px;
  }
}

.portal-body {
  background: #f7f2ea;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(247, 242, 234, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(22, 24, 32, 0.08);
}

.portal-header-inner {
  min-height: 84px;
  justify-content: space-between;
  gap: 24px;
}

.portal-header-inner,
.portal-top-nav {
  display: flex;
  align-items: center;
}

.portal-top-nav {
  gap: 26px;
  color: var(--muted);
  font-size: 0.94rem;
}

.portal-login-hero {
  background:
    linear-gradient(135deg, rgba(16, 20, 29, 0.98) 0%, rgba(24, 29, 41, 0.94) 55%, rgba(159, 115, 87, 0.78) 100%);
  color: white;
  padding: 92px 0 84px;
}

.portal-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 36px;
  align-items: center;
}

.portal-login-copy {
  max-width: 64ch;
}

.portal-login-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
  max-width: 58ch;
}

.portal-login-card,
.portal-note-card {
  background: white;
  border-radius: 24px;
  border: 1px solid rgba(22, 24, 32, 0.08);
  box-shadow: var(--shadow);
}

.portal-login-card {
  padding: 30px;
  color: var(--ink);
}

.portal-login-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.portal-field {
  display: grid;
  gap: 8px;
}

.portal-field label {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 600;
}

.portal-field input {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(22, 24, 32, 0.12);
  padding: 0 16px;
  background: #fbfaf7;
  font: inherit;
  color: var(--ink);
  box-sizing: border-box;
}

.portal-field input:focus-visible {
  outline: none;
  border-color: rgba(196, 154, 122, 0.7);
  box-shadow: 0 0 0 4px rgba(196, 154, 122, 0.16);
}

.portal-forgot-link {
  color: var(--accent-deep);
  font-weight: 700;
  width: fit-content;
}

.portal-help-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.portal-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-note-card {
  padding: 24px;
}

.portal-note-card p {
  color: var(--muted);
  line-height: 1.7;
}

.portal-note-card h2 {
  margin-bottom: 10px;
}

.portal-login-hero .button-primary {
  margin-top: 8px;
}

@media (max-width: 1080px) {
  .portal-login-layout,
  .portal-notes-grid {
    grid-template-columns: 1fr;
  }

  .portal-top-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  .portal-login-hero {
    padding: 72px 0 64px;
  }

  .portal-header-inner {
    min-height: 76px;
  }

  .portal-login-card,
  .portal-note-card {
    padding: 22px;
  }
}
