.portal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(17, 17, 16, 0.05), transparent 28rem),
    var(--bg);
}

.portal-nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(24px, calc((100vw - var(--maxw)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.portal-nav .nav__logo img { height: 46px; }
.portal-nav__back { color: var(--muted); text-decoration: none; font-weight: 700; }
.portal-nav__back:hover { color: var(--ink); }

.portal-shell {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 90px;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 640px);
  justify-content: space-between;
  gap: clamp(48px, 6vw, 72px);
  align-items: start;
}

.portal-intro { position: sticky; top: 48px; padding: 30px 0 0; }
.portal-intro h1 {
  max-width: 420px;
  font-family: "Anton", sans-serif;
  font-size: clamp(3.25rem, 5vw, 4.25rem);
  font-weight: 400;
  line-height: 0.96;
  text-transform: uppercase;
}
.portal-intro > p:not(.eyebrow) { max-width: 500px; margin-top: 24px; color: var(--muted); font-size: 1.05rem; }
.portal-intro ul { list-style: none; margin-top: 34px; display: grid; gap: 13px; }
.portal-intro li { color: var(--ink); font-weight: 650; }
.portal-intro li::before { content: "✓"; color: var(--ink); margin-right: 12px; }

.account-card,
.client-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(17, 17, 16, 0.1);
}
.account-card { padding: 0; }

.account-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.account-tab {
  position: relative;
  padding: 20px 16px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.account-tab:hover { color: var(--ink); }
.account-tab.is-active { color: var(--ink); background: var(--bg-2); }
.account-tab.is-active::after { content: ""; position: absolute; left: 16%; right: 16%; bottom: -1px; height: 3px; background: var(--ink); border-radius: 999px; }

.account-panel { padding: clamp(28px, 5vw, 48px); }
.account-heading { margin-bottom: 32px; }
.account-heading h2,
.client-card h2 {
  font-family: "Anton", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}
.account-heading > p:last-child,
.client-card__top p { color: var(--muted); margin-top: 12px; }

.account-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.account-form--login { grid-template-columns: 1fr; }
.address-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 120px 150px; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { color: var(--ink); font-size: 0.84rem; font-weight: 750; }
.field label span { color: var(--muted); font-weight: 500; }
.field label .required-mark,
.required-mark { margin-left: 0.2em; color: #c62828; font-weight: 800; }
.field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--bg-2);
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 16, 0.1); }
.field small { color: var(--muted); }

.privacy-check { display: flex; align-items: flex-start; gap: 11px; color: var(--muted); font-size: 0.85rem; line-height: 1.5; cursor: pointer; }
.privacy-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); }
.privacy-check a { color: var(--ink); font-weight: 800; text-underline-offset: 3px; }
.privacy-check a:hover { color: #000; }
.consent-note { margin-top: -12px; color: var(--muted); font-size: 0.78rem; }
.consent-note.is-ready { color: #1f5c30; }

.account-form .btn { width: 100%; margin-top: 2px; }
.account-form .btn[disabled] { cursor: not-allowed; opacity: 0.4; transform: none; box-shadow: none; }
.form-message { display: none; border-radius: 10px; padding: 12px 14px; font-size: 0.9rem; }
.form-message.is-visible { display: block; }
.form-message.is-error { color: #8d2116; background: #fff1ee; border: 1px solid #e7b4aa; }
.form-message.is-success { color: #1f5c30; background: #edf8ef; border: 1px solid #b4d8bc; }

.client-card { padding: clamp(28px, 5vw, 48px); }
.client-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.client-status { display: flex; gap: 16px; align-items: center; margin: 34px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.client-status__icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; }
.client-status p { color: var(--muted); font-size: 0.9rem; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.profile-grid > div { min-width: 0; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-grid > div:nth-child(2n) { border-right: 0; }
.profile-grid > div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
.profile-grid span,
.next-step > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.profile-grid strong { display: block; overflow-wrap: anywhere; }

.next-step { margin-top: 28px; padding: 26px; border-radius: 16px; background: var(--bg-2); }
.next-step h3 { font-size: 1.25rem; }
.next-step p { margin: 8px 0 20px; color: var(--muted); }

@media (max-width: 920px) {
  .portal-shell { grid-template-columns: 1fr; padding-top: 40px; }
  .portal-intro { position: static; padding-top: 0; }
  .portal-intro h1 { max-width: 680px; }
}

@media (max-width: 620px) {
  .portal-nav { padding-inline: 20px; }
  .portal-shell { width: min(100% - 24px, var(--maxw)); padding-top: 30px; gap: 30px; }
  .portal-intro h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .portal-intro ul { display: none; }
  .account-form { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .address-row { grid-column: auto; grid-template-columns: 1fr; }
  .client-card__top { flex-direction: column; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-grid > div { border-right: 0; }
  .profile-grid > div:last-child { grid-column: auto; }
}
