:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color-scheme: dark;

  --bg: #080b16;
  --panel: rgba(18, 22, 39, .92);
  --panel-soft: rgba(24, 29, 51, .76);
  --border: rgba(150, 160, 210, .14);
  --border-strong: rgba(151, 122, 255, .32);
  --text: #f4f6ff;
  --muted: #8991ad;
  --muted-2: #66708e;
  --primary: #7657ff;
  --primary-2: #9b78ff;
  --green: #36d399;
  --red: #ff6178;
  --yellow: #f3c65c;

  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);

  background:
    radial-gradient(
      circle at 14% 8%,
      rgba(74, 68, 197, .22),
      transparent 31%
    ),
    radial-gradient(
      circle at 86% 18%,
      rgba(83, 48, 169, .18),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      #080b16 0%,
      #0b0d19 52%,
      #090b14 100%
    );

  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, .011) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, .009) 1px,
      transparent 1px
    );

  background-size: 42px 42px;

  mask-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, .65),
      transparent 84%
    );
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

button:focus-visible,
input:focus-visible {
  outline:
    2px solid rgba(155, 120, 255, .9);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.shell {
  position: relative;
  z-index: 1;

  width:
    min(820px, calc(100% - 32px));

  margin: 0 auto;
  padding: 28px 0 42px;
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 26px;
  padding-bottom: 20px;

  border-bottom:
    1px solid rgba(153, 160, 199, .12);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  position: relative;

  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  border:
    1px solid rgba(159, 130, 255, .32);

  border-radius: 14px;

  color: #fff;

  background:
    linear-gradient(
      145deg,
      #805dff,
      #4f55ed
    );

  box-shadow:
    0 10px 32px rgba(100, 74, 255, .25),
    inset 0 1px 0 rgba(255, 255, 255, .22);

  font-size: 21px;
  font-weight: 950;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -5px;

  border:
    1px solid rgba(124, 91, 255, .08);

  border-radius: 18px;
  pointer-events: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.3px;
}

h2 {
  margin-bottom: 10px;
  font-size: 27px;
  line-height: 1.22;
}

h3 {
  margin-bottom: 7px;
  font-size: 19px;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.card {
  color: var(--text);

  background:
    linear-gradient(
      145deg,
      rgba(25, 30, 51, .94),
      rgba(15, 19, 34, .92)
    );

  border:
    1px solid var(--border);

  border-radius: 18px;

  box-shadow:
    0 18px 45px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .025);
}

.state-card {
  padding: 46px 30px;
  text-align: center;
}

.state-card p {
  max-width: 520px;
  margin: 0 auto;
}

.state-icon {
  width: 54px;
  height: 54px;

  margin: 0 auto 18px;

  display: grid;
  place-items: center;

  border-radius: 16px;

  font-size: 24px;
  font-weight: 900;
}

.error-icon {
  color: var(--red);
  background: rgba(255, 97, 120, .1);
  border: 1px solid rgba(255, 97, 120, .2);
}

.loading-icon {
  position: relative;

  background: rgba(118, 87, 255, .1);
  border: 1px solid rgba(118, 87, 255, .22);
}

.loading-icon span {
  width: 23px;
  height: 23px;

  border:
    2px solid rgba(155, 120, 255, .24);

  border-top-color:
    var(--primary-2);

  border-radius: 50%;

  animation:
    portal-spin .85s linear infinite;
}

@keyframes portal-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-layout {
  display: grid;
  gap: 18px;
}

.hero-card {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;

  padding: 28px;
}

.hero-copy {
  min-width: 0;
}

.hero-copy p {
  margin-bottom: 0;
  max-width: 580px;
}

.eyebrow {
  display: inline-block;

  margin-bottom: 10px;

  color: var(--primary-2);

  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
}

.security-badge,
.success-badge {
  flex: 0 0 auto;

  display: inline-flex;
  gap: 8px;
  align-items: center;

  padding: 9px 12px;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.security-badge {
  color: #c7bcff;
  background: rgba(118, 87, 255, .1);
  border: 1px solid rgba(145, 117, 255, .22);
}

.security-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--primary-2);

  box-shadow:
    0 0 0 4px rgba(155, 120, 255, .1);
}

.success-badge {
  color: #a7f3d0;
  background: rgba(54, 211, 153, .1);
  border: 1px solid rgba(54, 211, 153, .22);
}

.success-badge span {
  display: grid;
  place-items: center;

  width: 20px;
  height: 20px;

  border-radius: 50%;

  color: #08140f;
  background: var(--green);

  font-size: 12px;
  font-weight: 950;
}

.content-card {
  padding: 28px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading p {
  margin-bottom: 0;
}

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

.field label {
  color: #dce1f5;

  font-size: 13px;
  font-weight: 750;
}

.input {
  width: 100%;
  min-height: 48px;

  padding: 0 14px;

  color: var(--text);

  background:
    rgba(7, 10, 21, .72);

  border:
    1px solid rgba(148, 156, 197, .18);

  border-radius: 12px;

  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    background .16s ease;
}

.input:hover {
  border-color:
    rgba(158, 136, 255, .3);
}

.input:focus {
  border-color:
    rgba(151, 122, 255, .7);

  box-shadow:
    0 0 0 3px rgba(118, 87, 255, .1);

  background:
    rgba(8, 11, 24, .9);
}

.input::placeholder {
  color: #555f7c;
}

.code-input {
  letter-spacing: .26em;
  font-size: 21px;
  font-weight: 850;
  text-align: center;
}

.trust-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;

  margin-top: 18px;
  padding: 14px;

  color: var(--text);

  background:
    rgba(118, 87, 255, .055);

  border:
    1px solid rgba(135, 112, 255, .13);

  border-radius: 12px;

  cursor: pointer;
}

.trust-option input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.trust-option span {
  display: grid;
  gap: 4px;
}

.trust-option strong {
  font-size: 13px;
}

.trust-option small {
  color: var(--muted);
  line-height: 1.45;
}

.form-message {
  margin: 15px 0 0;
  padding: 11px 13px;

  color: #f2d9de;

  background:
    rgba(255, 97, 120, .075);

  border:
    1px solid rgba(255, 97, 120, .15);

  border-radius: 10px;

  font-size: 12px;
  line-height: 1.5;
}

.button-row,
.portal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;

  margin-top: 20px;
}

.button {
  min-height: 44px;

  padding: 0 17px;

  border-radius: 11px;

  border:
    1px solid transparent;

  font-size: 13px;
  font-weight: 800;

  transition:
    transform .15s ease,
    border-color .15s ease,
    background .15s ease,
    opacity .15s ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button-primary {
  color: #fff;

  background:
    linear-gradient(
      145deg,
      #7657ff,
      #5a54ed
    );

  border-color:
    rgba(160, 137, 255, .32);

  box-shadow:
    0 10px 26px rgba(102, 79, 255, .19);
}

.button-primary:not(:disabled):hover {
  background:
    linear-gradient(
      145deg,
      #866aff,
      #6863f4
    );
}

.button-secondary {
  color: #dce1f5;

  background:
    rgba(115, 126, 173, .08);

  border-color:
    rgba(145, 155, 196, .17);
}

.button-secondary:not(:disabled):hover {
  background:
    rgba(129, 140, 191, .13);

  border-color:
    rgba(152, 162, 207, .26);
}

.button-danger {
  color: #ffc3cc;

  background:
    rgba(255, 97, 120, .08);

  border-color:
    rgba(255, 97, 120, .18);
}

.button-danger:not(:disabled):hover {
  background:
    rgba(255, 97, 120, .13);

  border-color:
    rgba(255, 97, 120, .28);
}

.text-button {
  margin-top: 17px;
  padding: 0;

  color: var(--muted);

  background: transparent;
  border: 0;

  font-size: 12px;
  font-weight: 750;
}

.text-button:hover {
  color: var(--primary-2);
}

.portal-hero {
  margin-bottom: 18px;
}

#platformAccessCard {
  margin-bottom: 18px;
}

.platform-access-details {
  display: grid;
  gap: 16px;
}

.platform-value-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.platform-password-row {
  grid-template-columns:
    minmax(0, 1fr) auto auto;
}

.platform-access-message {
  margin: 0 0 18px;
  padding: 13px 14px;

  color: #dce1f5;

  background:
    rgba(115, 126, 173, .08);

  border:
    1px solid rgba(145, 155, 196, .17);

  border-radius: 11px;

  font-size: 12px;
  line-height: 1.5;
}

.account-status {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 12px;
}

.status-item {
  display: grid;
  gap: 7px;

  padding: 17px;

  background:
    var(--panel-soft);

  border:
    1px solid rgba(143, 153, 198, .12);

  border-radius: 13px;
}

.status-label {
  color: var(--muted-2);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.status-item strong {
  font-size: 14px;
}

.public-footer {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;

  margin-top: 26px;
  padding-top: 18px;

  color: var(--muted-2);

  border-top:
    1px solid rgba(153, 160, 199, .08);

  font-size: 11px;
  text-align: center;
}

@media (max-width: 680px) {
  .shell {
    width:
      min(100% - 22px, 820px);

    padding-top: 18px;
  }

  .public-header {
    margin-bottom: 18px;
  }

  .hero-card {
    display: grid;
    padding: 22px;
  }

  .security-badge,
  .success-badge {
    width: fit-content;
  }

  .content-card {
    padding: 22px;
  }

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

  .platform-value-row,
  .platform-password-row {
    grid-template-columns: 1fr;
  }

  .button-row,
  .portal-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  h2 {
    font-size: 23px;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 12px;
  }

  .state-card {
    padding:
      36px 20px;
  }

  .hero-card,
  .content-card {
    padding: 19px;
    border-radius: 15px;
  }

  .public-footer {
    flex-wrap: wrap;
  }
}
