:root {
  color-scheme: dark;

  --bg: #071019;
  --surface: rgba(15, 28, 41, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.11);
  --text: #f2f6f8;
  --muted: #9db0bd;
  --accent: #52c8b6;
  --accent-strong: #72dfcf;
  --danger: #ffb4b4;
  --success: #98e6c2;

  --shadow:
    0 28px 90px
    rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;

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

  color: var(--text);

  background:
    radial-gradient(
      circle at 15% 10%,
      rgba(82, 200, 182, 0.11),
      transparent 32rem
    ),
    radial-gradient(
      circle at 85% 90%,
      rgba(79, 121, 168, 0.12),
      transparent 34rem
    ),
    var(--bg);
}

button,
input {
  font: inherit;
}

.login-shell {
  width: 100%;
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 32px 18px;
}

.login-card {
  width: min(100%, 470px);

  padding:
    34px
    34px
    26px;

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

  border-radius: 22px;

  background:
    var(--surface);

  box-shadow:
    var(--shadow);

  backdrop-filter:
    blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 36px;
}

.brand-mark {
  width: 43px;
  height: 43px;

  display: grid;
  place-items: center;

  border:
    1px solid
    rgba(114, 223, 207, 0.42);

  border-radius: 12px;

  background:
    rgba(82, 200, 182, 0.10);

  color:
    var(--accent-strong);

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

.brand-name,
.brand-subtitle {
  margin: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 720;
}

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

.intro {
  margin-bottom: 27px;
}

.eyebrow {
  margin: 0 0 8px;

  color: var(--accent);

  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;

  font-size:
    clamp(
      28px,
      8vw,
      38px
    );

  line-height: 1.05;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.intro-copy,
.stage-heading p,
.security-note {
  color: var(--muted);
  line-height: 1.55;
}

.intro-copy {
  margin: 12px 0 0;
  font-size: 14px;
}

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

.auth-form[hidden],
.success-panel[hidden],
.message[hidden],
.secondary-field[hidden] {
  display: none;
}

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

.field label {
  font-size: 13px;
  font-weight: 650;
}

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

  padding: 11px 13px;

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

  border-radius: 10px;

  outline: none;

  background:
    rgba(0, 0, 0, 0.20);

  color: var(--text);

  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.field input:focus {
  border-color:
    rgba(82, 200, 182, 0.78);

  box-shadow:
    0 0 0 3px
    rgba(82, 200, 182, 0.11);

  background:
    rgba(0, 0, 0, 0.29);
}

.field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.primary-button {
  min-height: 47px;

  border: 0;
  border-radius: 10px;

  padding: 12px 16px;

  cursor: pointer;

  background: var(--accent);
  color: #06120f;

  font-weight: 780;
}

.primary-button:hover:not(:disabled) {
  filter: brightness(1.07);
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.text-button {
  border: 0;
  padding: 4px;

  background: transparent;
  color: var(--muted);

  cursor: pointer;
}

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

.message {
  margin: 0 0 20px;
  padding: 11px 13px;

  border:
    1px solid
    rgba(255, 180, 180, 0.21);

  border-radius: 10px;

  background:
    rgba(255, 95, 95, 0.07);

  color: var(--danger);

  font-size: 13px;
  line-height: 1.45;
}

.stage-heading p {
  margin: 0;
  font-size: 13px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 13px;

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

  border-radius: 10px;

  background:
    var(--surface-soft);

  color: var(--muted);

  font-size: 13px;
  line-height: 1.45;

  cursor: pointer;
}

.check-row input {
  margin-top: 2px;
}

.security-note {
  margin: 0;
  font-size: 12px;
  text-align: center;
}

.success-panel {
  padding: 12px 0 4px;
  text-align: center;
}

.success-icon {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  margin: 0 auto 18px;

  border:
    1px solid
    rgba(152, 230, 194, 0.33);

  border-radius: 50%;

  background:
    rgba(152, 230, 194, 0.09);

  color: var(--success);

  font-size: 25px;
  font-weight: 800;
}

.success-panel > p {
  margin: 6px 0;
  color: var(--muted);
}

.login-footer {
  display: flex;
  justify-content: center;
  gap: 7px;

  margin-top: 30px;
  padding-top: 20px;

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

  color:
    rgba(157, 176, 189, 0.68);

  font-size: 11px;
}

@media (max-width: 520px) {
  .login-shell {
    padding: 14px;
  }

  .login-card {
    padding: 27px 21px 22px;
    border-radius: 17px;
  }

  .brand {
    margin-bottom: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}



.device-label-panel {
  display: grid;
  gap: 18px;
}

.device-label-panel[hidden] {
  display: none;
}

.device-label-copy {
  margin:
    -8px
    0
    0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.55;
}

.post-login-actions {
  display: grid;
  gap: 10px;
}

.brand {
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.intro {
  margin-bottom: 0.65rem;
}

.intro-copy {
  margin-top: 0.3rem;
}

.auth-form {
  gap: 0.7rem;
}

.field {
  gap: 0.28rem;
}

.login-footer {
  margin-top: 0.8rem;
  padding-top: 0.65rem;
}

.footer-area {
  font-weight: 600;
}

.footer-signature {
  margin-top: 0.22rem;
  line-height: 1.35;
}

.footer-signature a {
  color: inherit;
  text-decoration: none;
}

.footer-signature a:hover,
.footer-signature a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 640px) {
  html,
  body {
    min-height: 100%;
  }

  body {
    min-height: 100dvh;
    padding-top: max(0.4rem, env(safe-area-inset-top));
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  }

  .brand {
    gap: 0.45rem;
    margin-bottom: 0.4rem;
  }

  .brand-mark {
    width: 2.55rem;
    height: 2.55rem;
  }

  .brand-name,
  .brand-subtitle {
    line-height: 1.15;
  }

  .intro {
    margin-bottom: 0.45rem;
  }

  .intro-copy {
    margin-top: 0.2rem;
    line-height: 1.3;
  }

  .auth-form {
    gap: 0.52rem;
  }

  .field {
    gap: 0.18rem;
  }

  .field input {
    min-height: 2.55rem;
  }

  .check-row {
    margin-block: 0.08rem;
  }

  .login-footer {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
  }

  .footer-signature {
    font-size: 0.78rem;
    line-height: 1.25;
  }
}



.login-shell {
  min-height: 100dvh;
  place-items: start center;

  padding:
    8px
    18px
    18px;
}

.login-card {
  padding:
    20px
    30px
    18px;
}

.brand {
  align-items: center;

  gap: 14px;

  margin-bottom:
    18px;
}

.brand-mark {
  width: 76px;
  height: 48px;

  padding:
    4px
    6px;

  object-fit: contain;
  flex: 0 0 auto;
}

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

.brand-name {
  margin: 0;

  font-size: 22px;
  font-weight: 760;

  line-height: 1.05;

  letter-spacing:
    -0.025em;
}

.brand-subtitle {
  margin-top: 4px;

  color:
    var(--accent);

  font-size: 11px;
  font-weight: 760;

  letter-spacing:
    0.12em;

  line-height: 1.1;

  text-transform:
    uppercase;
}

.login-footer {
  display: flex;

  flex-direction:
    column;

  align-items:
    center;

  justify-content:
    center;

  gap: 3px;

  margin-top:
    0.8rem;

  padding-top:
    0.65rem;

  text-align:
    center;
}

.footer-area {
  color:
    rgba(
      242,
      246,
      248,
      0.82
    );

  font-weight: 760;

  line-height:
    1.25;
}

.footer-signature {
  margin-top: 0;

  color:
    rgba(
      157,
      176,
      189,
      0.68
    );

  line-height:
    1.35;
}

@media (max-width: 640px) {
  html,
  body {
    min-height: 100%;
  }

  body {
    min-height: 100dvh;
    padding: 0;
  }

  .login-shell {
    min-height: 100dvh;

    place-items:
      start center;

    padding:
      max(
        4px,
        env(safe-area-inset-top)
      )
      10px
      max(
        10px,
        env(safe-area-inset-bottom)
      );
  }

  .login-card {
    width: 100%;

    padding:
      14px
      18px
      13px;

    border-radius:
      16px;
  }

  .brand {
    gap: 10px;

    margin-bottom:
      0.5rem;
  }

  .brand-mark {
    width: 64px;
    height: 40px;

    padding:
      3px
      5px;
  }

  .brand-name {
    font-size:
      19px;
  }

  .brand-subtitle {
    margin-top:
      3px;

    font-size:
      10px;
  }

  .auth-form {
    gap: 0.5rem;
  }

  .field {
    gap: 0.15rem;
  }

  .field input {
    min-height:
      2.45rem;
  }

  .check-row {
    margin-block:
      0.05rem;

    padding:
      10px
      11px;
  }

  .primary-button {
    min-height:
      44px;
  }

  .login-footer {
    gap: 2px;

    margin-top:
      0.5rem;

    padding-top:
      0.4rem;
  }

  .footer-area {
    font-size:
      0.76rem;
  }

  .footer-signature {
    font-size:
      0.72rem;

    line-height:
      1.2;
  }
}

.login-shell {
  min-height: 100dvh;

  place-items:
    start center;

  padding:
    clamp(18px, 3.2dvh, 42px)
    18px
    max(
      18px,
      env(safe-area-inset-bottom)
    );
}

.login-card {
  width:
    min(100%, 470px);

  min-height:
    min(
      78dvh,
      1040px
    );

  display:
    flex;

  flex-direction:
    column;

  padding:
    24px
    30px
    20px;
}

.brand {
  gap: 14px;

  margin-bottom:
    clamp(
      20px,
      2.5dvh,
      30px
    );
}

.brand-mark {
  width: 76px;
  height: 52px;
}

.brand-name {
  font-size:
    clamp(
      20px,
      4.8vw,
      24px
    );

  white-space:
    nowrap;
}

.brand-subtitle {
  margin-top: 5px;
}

#stage1-form {
  flex: 1;

  align-content:
    space-between;

  gap:
    clamp(
      12px,
      1.65dvh,
      20px
    );
}

.field {
  gap: 7px;
}

.field input {
  min-height:
    clamp(
      48px,
      5.3dvh,
      58px
    );
}

.check-row {
  padding:
    13px
    14px;

  align-items:
    center;
}

.primary-button {
  min-height:
    clamp(
      48px,
      5.5dvh,
      56px
    );
}

.login-footer {
  margin-top:
    clamp(
      17px,
      2.2dvh,
      28px
    );

  padding-top:
    clamp(
      12px,
      1.6dvh,
      20px
    );
}

.footer-area {
  font-weight: 780;
}

.footer-signature {
  margin-top: 2px;
}

@media (max-width: 640px) {
  body {
    min-height:
      100dvh;
  }

  .login-shell {
    min-height:
      100dvh;

    padding:
      max(
        14px,
        env(safe-area-inset-top)
      )
      10px
      max(
        14px,
        env(safe-area-inset-bottom)
      );
  }

  .login-card {
    width: 100%;

    min-height:
      min(
        80dvh,
        1020px
      );

    padding:
      18px
      18px
      16px;
  }

  .brand {
    margin-bottom:
      clamp(
        15px,
        2dvh,
        23px
      );
  }

  .brand-mark {
    width: 68px;
    height: 46px;
  }

  .brand-name {
    font-size:
      clamp(
        18px,
        5.1vw,
        22px
      );
  }

  #stage1-form {
    gap:
      clamp(
        9px,
        1.35dvh,
        15px
      );
  }

  .field input {
    min-height:
      clamp(
        44px,
        5.1dvh,
        54px
      );
  }

  .check-row {
    padding:
      11px
      12px;
  }

  .primary-button {
    min-height:
      50px;
  }

  .login-footer {
    margin-top:
      clamp(
        14px,
        1.8dvh,
        22px
      );

    padding-top:
      11px;
  }
}
