.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ink-950);
}

.login-shell {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 0.92fr) minmax(480px, 1.08fr);
  margin: 0;
  padding: 0;
}

.login-context {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--ink-950);
  color: #f8f9ff;
  padding: clamp(32px, 5vw, 72px);
}

.login-brand {
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.login-brand > span {
  display: grid;
  line-height: 1.05;
}

.login-brand strong {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-brand small {
  margin-top: 4px;
  color: #aeb7cd;
  font-family: var(--font-data);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-context-copy {
  position: relative;
  z-index: 2;
  max-width: 570px;
  margin-top: clamp(64px, 10vh, 120px);
}

.login-context-copy .eyebrow {
  color: #3ec9f5;
}

.login-context-copy h1 {
  max-width: 560px;
  color: #ffffff;
  font-size: clamp(2.4rem, 4.8vw, 5rem);
  line-height: 0.98;
}

.login-context-copy > p:last-child {
  max-width: 520px;
  margin: 22px 0 0;
  color: #aeb7cd;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.65;
}

.scan-seal {
  position: relative;
  width: min(360px, 76%);
  height: 188px;
  margin-top: clamp(46px, 9vh, 88px);
  border: 1px solid #2e3855;
  border-radius: 18px;
}

.seal-axis {
  position: absolute;
  background: #35405f;
}

.seal-axis.horizontal {
  top: 76px;
  right: 24px;
  left: 24px;
  height: 1px;
}

.seal-axis.vertical {
  top: 20px;
  bottom: 34px;
  left: 72px;
  width: 1px;
}

.seal-frame {
  position: absolute;
  top: 42px;
  left: 38px;
  width: 69px;
  height: 69px;
  border: 1px solid #6978df;
  border-radius: 15px;
  transform: rotate(45deg);
}

.seal-core {
  position: absolute;
  top: 68px;
  left: 64px;
  width: 17px;
  height: 17px;
  border: 4px solid var(--ink-950);
  border-radius: 50%;
  background: #3ec9f5;
  box-shadow: 0 0 0 1px #bfe9fb;
}

.seal-threshold {
  position: absolute;
  top: 70px;
  right: 29px;
  left: 134px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 13px;
}

.seal-threshold i {
  display: block;
  width: 11px;
  height: 11px;
  border: 1px solid #637094;
  border-radius: 3px;
  background: var(--ink-950);
}

.seal-threshold i:first-child {
  border-color: #3ec9f5;
  background: #3ec9f5;
}

.scan-seal small {
  position: absolute;
  right: 24px;
  bottom: 19px;
  color: #7f8aa3;
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-trust {
  display: flex;
  gap: 32px;
  margin: auto 0 0;
  border-top: 1px solid #2b3550;
  padding-top: 24px;
}

.login-trust div {
  min-width: 0;
}

.login-trust dt {
  color: #7f8aa3;
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-trust dd {
  margin: 5px 0 0;
  color: #d7dcee;
  font-size: 13px;
  font-weight: 700;
}

.login-panel {
  display: grid;
  min-width: 0;
  place-items: center;
  background: var(--canvas);
  padding: clamp(28px, 6vw, 96px);
}

.login-card {
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-panel);
  background: var(--surface);
  padding: clamp(28px, 4vw, 48px);
}

.login-card h2 {
  margin: 0;
  color: var(--ink-950);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.login-intro {
  margin: 12px 0 30px;
  color: var(--ink-600);
  font-size: 15px;
  line-height: 1.6;
}

.auth-form label {
  display: block;
  margin: 18px 0 7px;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 800;
}

.auth-form > label:first-child {
  margin-top: 0;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fbfcfe;
  color: var(--ink-950);
  padding: 11px 13px;
  font: 600 14px/1.4 var(--font-interface);
}

.auth-form input:focus {
  border-color: var(--focus);
  outline: 3px solid rgb(22 136 229 / 16%);
  outline-offset: 0;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 82px;
}

.password-field button {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 68px;
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.password-field button:hover {
  background: var(--primary-soft);
}

.login-error {
  margin: 16px 0 0;
  border-left: 3px solid var(--critical);
  background: var(--critical-soft);
  color: #982d3a;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.login-submit {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: #ffffff;
  padding: 11px 15px 11px 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 7px 18px rgb(63 82 227 / 20%);
}

.login-submit:hover:not(:disabled) {
  background: var(--primary-strong);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.login-submit svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.auth-submit-link {
  text-decoration: none;
}

.account-panel {
  align-items: start;
  overflow-y: auto;
}

.account-stack {
  display: grid;
  width: min(100%, 720px);
  gap: 20px;
}

.account-stack .login-card {
  width: 100%;
}

.account-actions {
  margin: 0;
  border: 0;
  padding: 0 4px;
}

.account-actions button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--critical);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.invite-reveal {
  margin-top: 0;
}

.team-card {
  border-top-color: var(--ink-950);
}

.team-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.team-card-heading .login-intro {
  margin-bottom: 0;
}

.team-count {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--canvas);
  color: var(--ink-700);
  padding: 7px 10px;
  font-family: var(--font-data);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.team-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.team-loading {
  margin: 0;
  color: var(--ink-500);
  font-size: 14px;
}

.team-member {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fbfcfe;
  padding: 16px 16px 16px 20px;
}

.member-status-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--live);
}

.team-member.is-suspended .member-status-rail {
  background: #aab3c4;
}

.member-identity,
.member-access {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.member-identity strong {
  overflow: hidden;
  color: var(--ink-950);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-identity span,
.member-identity small,
.member-access small {
  overflow: hidden;
  color: var(--ink-500);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-status {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 7px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-status.active {
  background: var(--live-soft);
  color: #05645e;
}

.member-status.suspended {
  background: #edf0f5;
  color: var(--ink-600);
}

.member-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.member-action {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-700);
  padding: 7px 9px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.member-action:hover:not(:disabled) {
  border-color: #aab3c4;
  background: var(--canvas);
}

.member-action.danger {
  border-color: #e9c3c8;
  color: var(--critical);
}

.member-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.audit-card {
  border-top-color: #5365f4;
  background: #11182b;
  color: #f7f8ff;
}

.audit-card h2,
.audit-card .eyebrow {
  color: #f7f8ff;
}

.audit-card .login-intro {
  color: #9da8c1;
}

.audit-integrity {
  flex: 0 0 auto;
  border: 1px solid #46506a;
  border-radius: 999px;
  color: #aeb8cf;
  padding: 7px 10px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.audit-integrity.is-verified {
  border-color: #287b75;
  background: rgba(20, 157, 145, 0.1);
  color: #6ee0d5;
}

.audit-list {
  display: grid;
  margin-top: 24px;
  border-top: 1px solid #28324a;
}

.audit-card .team-loading {
  color: #9da8c1;
  padding-top: 18px;
}

.audit-entry {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid #28324a;
  padding: 15px 0;
}

.audit-marker {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border: 2px solid #11182b;
  border-radius: 50%;
  background: #54d1c5;
  box-shadow: 0 0 0 1px #398f88;
}

.audit-entry.is-warning .audit-marker {
  background: #ffb06a;
  box-shadow: 0 0 0 1px #b86d32;
}

.audit-entry-content {
  min-width: 0;
}

.audit-entry-content > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.audit-entry-content strong {
  color: #f7f8ff;
  font-size: 14px;
}

.audit-entry-content time {
  flex: 0 0 auto;
  color: #7f8aa5;
  font-family: var(--font-data);
  font-size: 11px;
}

.audit-entry-content p {
  overflow-wrap: anywhere;
  margin: 5px 0 0;
  color: #9da8c1;
  font-size: 12.5px;
  line-height: 1.55;
}

.login-footnote {
  margin: 22px 0 0;
  color: var(--ink-500);
  font-family: var(--font-data);
  font-size: 11.5px;
  line-height: 1.6;
}

.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-links a,
.auth-text-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.auth-links a:hover,
.auth-text-link:hover {
  color: var(--primary-strong);
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--ink-500);
  font-size: 12.5px;
  line-height: 1.5;
}

.recovery-panel {
  border: 1px solid #9ad9f3;
  border-radius: var(--radius-control);
  background: var(--primary-soft);
  padding: 18px;
}

.recovery-panel h3 {
  margin: 0;
  color: var(--ink-950);
  font-size: 17px;
}

.recovery-panel p {
  margin: 8px 0 0;
  color: var(--ink-700);
  font-size: 13px;
  line-height: 1.55;
}

.recovery-code {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 14px;
  border: 1px dashed #5cbfe3;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-950);
  padding: 12px;
  font-family: var(--font-data);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  user-select: all;
}

.secondary-auth-button {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-800);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.secondary-auth-button:hover {
  border-color: #aab3c4;
  background: #f8f9fc;
}

.auth-success {
  margin: 16px 0 0;
  border-left: 3px solid var(--live);
  background: var(--live-soft);
  color: #05645e;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: minmax(300px, 0.78fr) minmax(420px, 1.22fr);
  }

  .login-context {
    padding: 36px;
  }

  .scan-seal {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .login-shell {
    display: block;
  }

  .login-context {
    min-height: 390px;
    padding: 24px 20px 28px;
  }

  .login-context-copy {
    margin-top: 44px;
  }

  .login-context-copy h1 {
    max-width: 420px;
    font-size: clamp(2.25rem, 11vw, 3.35rem);
  }

  .login-context-copy > p:last-child {
    margin-top: 16px;
  }

  .scan-seal {
    width: min(100%, 335px);
    height: 112px;
    margin-top: 28px;
  }

  .seal-axis.horizontal {
    top: 52px;
  }

  .seal-axis.vertical {
    top: 13px;
    bottom: 18px;
    left: 54px;
  }

  .seal-frame {
    top: 27px;
    left: 31px;
    width: 47px;
    height: 47px;
    border-radius: 10px;
  }

  .seal-core {
    top: 45px;
    left: 49px;
    width: 12px;
    height: 12px;
    border-width: 3px;
  }

  .seal-threshold {
    top: 47px;
    right: 20px;
    left: 105px;
    gap: 8px;
  }

  .seal-threshold i {
    width: 9px;
    height: 9px;
  }

  .scan-seal small {
    right: 15px;
    bottom: 10px;
    font-size: 11px;
  }

  .login-trust {
    display: none;
  }

  .login-panel {
    padding: 24px 16px 36px;
  }

  .login-card {
    padding: 28px 22px;
  }

  .team-member {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .member-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .team-card-heading,
  .audit-entry-content > div {
    display: grid;
  }

  .audit-integrity {
    width: fit-content;
  }
}

@media (max-width: 360px) {
  .login-context {
    min-height: 360px;
  }

  .login-context-copy > p:last-child {
    font-size: 15px;
  }

  .login-card {
    padding-inline: 18px;
  }
}
