:root {
  color-scheme: dark;
  --black: #000000;
  --white: #fcfcfc;
  --orange-input: #f2ad48;
  --orange-text: #d4a467;
  --cyan: #65a7b8;
  --button: #494949;
  --button-hover: #5a5a5a;
  --muted: #878787;
  --error: #ff4b4b;
  --ui-font: Arial, Helvetica, sans-serif;
  --terminal-font: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--black);
}

body {
  color: var(--white);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

.terminal-login {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--black);
}

.login-stage {
  display: grid;
  grid-template-columns: 39.5% 60.5%;
  min-height: 74vh;
  padding: 7.2vh 2.8vw 0;
}

.credential-column { min-width: 0; }

.credential-column h1 {
  position: relative;
  top: 3vh;
  margin: 0 0 6.6vh;
  color: var(--white);
  font-size: clamp(48px, 3.3vw, 76px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

#login-form {
  width: min(19.35vw, 570px);
  min-width: 284px;
}

.field-group + .field-group { margin-top: 0.15vh; }

.field-group label {
  display: block;
  margin: 0 0 0.9vh;
  color: var(--white);
  font-size: clamp(23px, 1.9vw, 39px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
}

.field-group input {
  display: block;
  width: 100%;
  height: clamp(31px, 1.95vw, 57px);
  border: 1px solid #c68e3c;
  border-radius: 0;
  outline: none;
  background: var(--orange-input);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 167, 0.18);
  color: #090909;
  caret-color: #090909;
  padding: 0 0.6vw;
  font-family: var(--terminal-font);
  font-size: clamp(21px, 1.65vw, 34px);
  font-weight: 700;
  line-height: 1;
}

.field-group input:focus {
  border-color: #f8e6c7;
  box-shadow: inset 0 0 0 2px #fff0d2;
}

#password { letter-spacing: 0.16em; }

.form-message {
  min-height: clamp(22px, 1.75vh, 31px);
  margin: 0.35vh 0 0.2vh;
  color: var(--error);
  font-family: var(--terminal-font);
  font-size: clamp(12px, 0.9vw, 18px);
  font-weight: 700;
  line-height: 1.2;
}

.login-button {
  display: grid;
  width: min(11.9vw, 355px);
  min-width: 174px;
  height: clamp(31px, 2vw, 57px);
  place-items: center;
  border: 1px solid #282828;
  border-radius: 0;
  background: var(--button);
  color: var(--white);
  cursor: pointer;
  font-size: clamp(22px, 1.55vw, 36px);
  font-weight: 400;
  line-height: 1;
}

.login-button:hover,
.login-button:focus-visible {
  background: var(--button-hover);
  outline: 1px solid #c7c7c7;
  outline-offset: 1px;
}

.login-button:disabled { cursor: wait; opacity: 0.72; }

.support-links {
  display: grid;
  justify-items: start;
  gap: 0.9vh;
  margin-top: 11.7vh;
}

.support-links button {
  border: 0;
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  padding: 0;
  font-size: clamp(22px, 1.75vw, 38px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-align: left;
}

.support-links button:hover,
.support-links button:focus-visible {
  color: #8ed1e1;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.support-links .support-row {
  display: grid;
  grid-template-columns: clamp(34px, 2.8vw, 57px) auto;
  align-items: center;
  margin-left: 0.45vw;
}

.support-links .new-login > span:last-child {
  min-width: min(24vw, 505px);
  border: 2px solid #8d8d8d;
  padding: 0 0.35vw;
  line-height: 1.02;
}

.support-icon {
  position: relative;
  display: block;
  width: clamp(27px, 2vw, 40px);
  height: clamp(27px, 2vw, 40px);
}

.phone-icon {
  border: clamp(5px, 0.4vw, 8px) solid #e7e7e7;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-42deg) scale(0.76);
}

.user-icon::before,
.user-icon::after {
  position: absolute;
  left: 50%;
  display: block;
  background: #e7e7e7;
  content: "";
  transform: translateX(-50%);
}

.user-icon::before {
  top: 0;
  width: 42%;
  height: 42%;
  border-radius: 50%;
}

.user-icon::after {
  bottom: 0;
  width: 88%;
  height: 52%;
  border-radius: 50% 50% 0 0;
}

.support-message {
  max-width: min(31vw, 610px);
  min-height: 1.2em;
  margin: 1vh 0 0;
  color: var(--muted);
  font-family: var(--terminal-font);
  font-size: clamp(11px, 0.82vw, 16px);
  line-height: 1.15;
}

.language-column {
  min-width: 0;
  padding-top: 16.5vh;
  padding-left: 3.6vw;
}

.language-column h2 {
  margin: 0 0 4.5vh;
  color: var(--white);
  font-family: var(--terminal-font);
  font-size: clamp(25px, 1.75vw, 42px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.language-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(34px, 3.8vw, 78px);
  max-width: 53vw;
  align-items: start;
  padding-left: 1.7vw;
}

.language-list {
  display: grid;
  gap: 0.25vh;
  color: var(--orange-text);
  font-family: var(--terminal-font);
  font-size: clamp(24px, 1.7vw, 40px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.02;
  white-space: nowrap;
}

.selected-language { position: relative; color: var(--white); }

.selected-language .check {
  position: absolute;
  top: -0.02em;
  left: -1.15em;
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78em;
  font-weight: 700;
}

.language-note {
  margin: 7vh 0 0;
  color: var(--white);
  font-family: var(--terminal-font);
  font-size: clamp(25px, 1.75vw, 42px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.terminal-footer {
  position: absolute;
  right: 1vw;
  bottom: 9.2vh;
  left: 2.8vw;
}

.system-line {
  margin: 0 0 3.6vh;
  color: var(--muted);
  font-family: var(--terminal-font);
  font-size: clamp(18px, 1.75vw, 36px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.legal-copy {
  max-width: 96vw;
  margin: 0;
  color: #d7d7d7;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 1.23vw, 25px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

@media (max-width: 1100px), (max-height: 720px) {
  .terminal-login { min-height: 760px; overflow: auto; }
  .login-stage { min-height: 570px; }
  .terminal-footer { position: relative; right: auto; bottom: auto; left: auto; padding: 18px 28px 30px; }
}

@media (max-width: 760px) {
  .terminal-login { min-height: 100vh; }
  .login-stage { grid-template-columns: 1fr; gap: 66px; padding: 34px 24px 50px; }
  #login-form,
  .support-message { width: 100%; min-width: 0; max-width: 570px; }
  .support-links .new-login > span:last-child { min-width: min(76vw, 470px); }
  .language-column { padding: 0; }
  .language-grid { grid-template-columns: 1fr 1fr; max-width: 100%; padding-left: 30px; }
  .terminal-footer { padding: 0 24px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
