:root {
  --portal-panel: #0a1826;
  --portal-line: rgba(255, 255, 255, 0.14);
}

.access-body,
.portal-body {
  min-height: 100vh;
  background: #06111d;
}

.access-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  min-height: 76px;
  padding: 0 clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  border-bottom: 1px solid var(--portal-line);
}

.access-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.access-login {
  padding: 9px 12px;
  border: 1px solid rgba(6, 17, 29, 0.32);
  background: #fff;
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.access-login:hover,
.access-login:focus-visible {
  border-color: #06111d;
  background: #f2f4f6;
  color: #000;
}

.access-main {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(620px, 1.18fr);
  min-height: 100vh;
}

.access-intro {
  position: sticky;
  top: 0;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background: #030a11;
}

.access-intro-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 8, 14, 0.42), rgba(2, 8, 14, 0.96)),
    linear-gradient(90deg, rgba(4, 15, 25, 0.88), rgba(4, 15, 25, 0.18)),
    url("wavebelt-hero.webp") center / cover no-repeat;
}

.access-intro-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: clamp(126px, 15vh, 176px) clamp(28px, 5.5vw, 84px) 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.access-intro h1 {
  max-width: 720px;
  font-size: clamp(2.7rem, 5vw, 5.4rem);
}

.access-lead {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1rem, 1.35vw, 1.24rem);
}

.access-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(42px, 7vh, 72px);
  border-top: 1px solid var(--portal-line);
}

.access-steps > div {
  padding: 20px 18px 0 0;
}

.access-steps > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--portal-line);
}

.access-steps span,
.access-steps strong {
  display: block;
}

.access-steps span {
  color: var(--lime);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.access-steps strong {
  margin: 9px 0 6px;
  font-size: 0.88rem;
}

.access-steps p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  line-height: 1.5;
}

.access-request {
  padding: clamp(108px, 10vw, 150px) clamp(24px, 5vw, 82px) 70px;
  background: #f1f1ec;
}

.access-form {
  width: min(100%, 860px);
  margin: 0 auto;
}

.access-form-heading {
  margin-bottom: 44px;
}

.access-form-heading h2 {
  margin-bottom: 14px;
}

.access-form-heading > p:last-child {
  max-width: 620px;
  color: #68727c;
}

.access-fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(5, 9, 14, 0.15);
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 16, 35, 0.09);
}

.access-fieldset legend {
  padding: 0 10px;
  color: #3f75ff;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.access-fields label {
  min-width: 0;
}

.access-fields label > span {
  display: block;
  margin-bottom: 7px;
  color: #5f6972;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.access-fields input,
.access-fields select,
.access-fields textarea,
.portal-field input,
.portal-field textarea {
  width: 100%;
  min-height: 49px;
  padding: 12px 13px;
  border: 1px solid rgba(5, 9, 14, 0.19);
  border-radius: 0;
  background: #fafaf7;
  color: #05090e;
}

.access-fields textarea {
  min-height: 120px;
  resize: vertical;
}

.access-fields input:focus,
.access-fields select:focus,
.access-fields textarea:focus,
.portal-field input:focus,
.portal-field textarea:focus {
  outline: 2px solid #3f75ff;
  outline-offset: 1px;
}

.access-wide {
  grid-column: 1 / -1;
}

.agreement-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  margin-bottom: 14px;
  color: #67717a;
  font-size: 0.72rem;
}

.agreement-meta code {
  color: #3c4650;
  font-size: 0.66rem;
  word-break: break-all;
}

.agreement-scroll {
  height: 390px;
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(5, 9, 14, 0.16);
  background: #f6f6f1;
  scrollbar-color: #3f75ff #e3e5df;
}

.nda-document h2 {
  margin-bottom: 4px;
  font-size: 1.5rem;
}

.nda-version,
.nda-language-notice {
  color: #66717a;
  font-size: 0.78rem;
}

.nda-clause {
  margin-top: 24px;
}

.nda-clause h3 {
  margin-bottom: 10px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.nda-clause p,
.nda-clause li {
  color: #38434c;
  font-size: 0.82rem;
  line-height: 1.62;
}

.nda-clause ul {
  padding-left: 20px;
}

.signature-fields {
  margin-top: 20px;
}

.signature-fields small {
  display: block;
  margin-top: 6px;
  color: #737d85;
  font-size: 0.7rem;
}

.access-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  color: #4f5962;
  font-size: 0.8rem;
  line-height: 1.48;
}

.access-check input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.access-check a {
  color: #315fd5;
}

.access-submit,
.portal-button {
  min-height: 52px;
  padding: 14px 20px;
  border: 0;
  border-radius: 3px;
  background: #061321;
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.access-submit {
  width: 100%;
}

.access-submit:hover,
.portal-button:hover {
  background: #3f75ff;
}

.access-submit:disabled {
  cursor: wait;
  opacity: 0.58;
}

.access-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  font-size: 0.88rem;
}

.access-status.is-success {
  padding: 16px;
  border-left: 4px solid #2e8a52;
  background: #e8f5ed;
  color: #1e633b;
}

.access-status.is-error,
.portal-alert-error {
  padding: 16px;
  border-left: 4px solid #c94b42;
  background: #fff0ee;
  color: #862c26;
}

.access-footnote {
  margin: 18px 0 0;
  color: #707980;
  font-size: 0.72rem;
  line-height: 1.55;
}

.access-footer {
  padding: 22px clamp(20px, 4vw, 56px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: #030a11;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.7rem;
}

.access-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.access-footer a {
  color: #72ddf7;
  text-decoration: none;
}

.portal-shell {
  width: min(calc(100% - 32px), 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 90px 0;
  display: grid;
  place-items: center;
}

.portal-card {
  width: 100%;
  padding: clamp(28px, 5vw, 52px);
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.portal-card h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.portal-card > p {
  color: #65707a;
}

.portal-field {
  display: block;
  margin: 18px 0;
}

.portal-field span {
  display: block;
  margin-bottom: 7px;
  color: #59646d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
}

.portal-link {
  color: #315fd5;
  font-size: 0.82rem;
}

.portal-brand {
  position: absolute;
  top: 28px;
  left: 32px;
  color: #fff;
}

.private-header-link {
  color: var(--lime);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}


.private-header-logout-form {
  margin: 0;
}

.private-header-logout {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.private-header-logout:hover,
.private-header-logout:focus-visible {
  border-color: var(--lime);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.private-header-logout span {
  color: var(--lime);
  font-size: 0.9rem;
  line-height: 1;
}

.private-account {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: clamp(42px, 8vw, 120px);
  align-items: center;
}

.private-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: clamp(26px, 4vw, 42px);
  border-top: 4px solid var(--blue);
  background: #fff;
  box-shadow: var(--shadow);
}

.private-account-actions form {
  margin: 0;
}

.private-account-actions .button {
  border: 0;
  cursor: pointer;
}

.private-account-actions .direct-contact {
  width: 100%;
  margin-top: 18px;
}

.portal-summary {
  margin: 24px 0;
  padding: 18px;
  border-left: 4px solid #3f75ff;
  background: #f2f3ef;
}

.portal-summary p {
  margin: 0;
}

.portal-summary p + p {
  margin-top: 14px;
}

.portal-request-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0;
  background: #dfe3de;
}

.portal-request-detail > div {
  min-width: 0;
  padding: 14px;
  background: #f5f6f2;
}

.portal-request-detail small,
.portal-request-detail strong {
  display: block;
}

.portal-request-detail small {
  margin-bottom: 6px;
  color: #69737c;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-request-detail strong {
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-word;
}

.portal-message {
  margin: 24px 0;
  padding: 20px;
  border-left: 4px solid #3f75ff;
  background: #f3f4ef;
}

.portal-message small {
  color: #66717a;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-message p {
  margin: 8px 0 0;
}

.portal-decision-form {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid #dce0db;
}

.portal-button-danger {
  background: #7e2722;
}

.portal-button-small {
  min-height: 36px;
  padding: 9px 12px;
  font-size: 0.72rem;
}

.admin-page .portal-shell,
.agreement-page .portal-shell {
  width: min(calc(100% - 32px), 1240px);
  place-items: start stretch;
}

.admin-page .portal-card,
.agreement-page .portal-card {
  width: 100%;
}

.admin-heading,
.admin-section-title,
.admin-request,
.admin-user {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.admin-heading {
  margin-bottom: 40px;
}

.admin-heading h1 {
  margin-bottom: 8px;
}

.admin-heading p {
  margin: 0;
  color: #68727b;
}

.admin-section {
  margin-top: 54px;
}

.admin-section-title {
  padding-bottom: 16px;
  border-bottom: 1px solid #d8ddd7;
}

.admin-section-title h2 {
  margin: 0;
  font-size: 1.7rem;
}

.admin-section-title span {
  color: #3f75ff;
  font-weight: 850;
}

.admin-list {
  display: grid;
  gap: 1px;
  background: #dfe3de;
}

.admin-request,
.admin-user {
  padding: 18px;
  background: #f7f8f4;
}

.admin-request h3,
.admin-user h3 {
  margin: 9px 0 6px;
  font-size: 1rem;
}

.admin-request p,
.admin-user p,
.admin-request small,
.admin-user small {
  margin: 0;
  color: #68727b;
  font-size: 0.75rem;
}

.admin-request-actions,
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.admin-user-actions form {
  margin: 0;
}

.portal-link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #315fd5;
  cursor: pointer;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status-pill {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid #cbd1cb;
  background: #fff;
  color: #535e67;
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-active,
.status-verified,
.status-invited {
  border-color: #78bb91;
  background: #e9f7ee;
  color: #1c663b;
}

.status-disabled,
.status-rejected,
.status-mail_failed,
.status-approved_mail_failed,
.status-verified_notice_failed {
  border-color: #d7a29e;
  background: #fff0ee;
  color: #8a3029;
}

.agreement-full {
  margin-top: 38px;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid #d8ddd7;
  background: #f6f7f3;
}

.agreement-page .nda-clause p,
.agreement-page .nda-clause li {
  font-size: 0.9rem;
}

@media (max-width: 1120px) {
  .access-main {
    display: block;
  }

  .access-intro {
    position: relative;
    min-height: 700px;
  }

  .access-intro-content {
    min-height: 700px;
  }
}

@media (max-width: 720px) {
  .access-header {
    padding: 0 16px;
  }

  .access-header .language-switcher {
    display: none;
  }

  .access-login {
    font-size: 0.66rem;
  }

  .access-intro,
  .access-intro-content {
    min-height: 650px;
  }

  .access-intro-content {
    padding: 126px 22px 34px;
  }

  .access-steps {
    grid-template-columns: 1fr;
  }

  .access-steps > div {
    padding: 14px 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .access-steps > div + div {
    padding-left: 0;
    border-left: 0;
  }

  .access-steps p {
    display: none;
  }

  .access-request {
    padding: 72px 16px 54px;
  }

  .access-fieldset {
    padding: 22px 18px;
  }

  .access-fields {
    grid-template-columns: 1fr;
  }

  .access-wide {
    grid-column: auto;
  }

  .agreement-scroll {
    height: 340px;
    padding: 18px;
  }

  .access-footer {
    flex-direction: column;
  }

  .private-header-link {
    display: none;
  }

  .private-header-logout {
    width: 34px;
    padding: 6px;
  }

  .private-header-logout b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .private-account {
    grid-template-columns: 1fr;
  }

  .portal-request-detail {
    grid-template-columns: 1fr;
  }

  .admin-heading,
  .admin-request,
  .admin-user {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-request-actions,
  .admin-user-actions {
    justify-content: flex-start;
  }
}
