:root {
  color-scheme: dark;
  --background: #090e14;
  --panel: rgba(17, 25, 35, .96);
  --line: #263446;
  --text: #edf3f9;
  --muted: #91a0b3;
  --blue: #66c0f4;
  --blue-strong: #1a9fff;
  --error: #ff8f98;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 8%, rgba(37, 77, 112, .38), transparent 32rem),
    radial-gradient(circle at 88% 88%, rgba(140, 25, 38, .16), transparent 28rem),
    var(--background);
  color: var(--text);
}
button, input { font: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.login-card {
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px;
  background: linear-gradient(145deg, rgba(19, 29, 41, .98), var(--panel));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}

.login-brand {
  display: flex;
  justify-content: center;
  min-height: 70px;
  margin-bottom: 18px;
}

.login-brand img {
  display: block;
  width: 144px;
  height: 70px;
  object-fit: contain;
}

.login-heading { text-align: center; }
.login-heading p {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.login-heading h1 {
  margin: 0;
  font-size: clamp(25px, 6vw, 32px);
  font-weight: 500;
  letter-spacing: -.025em;
}
.login-heading span {
  display: block;
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 9px;
  margin-top: 30px;
}
.login-form label {
  margin-top: 7px;
  color: #b8c4d1;
  font-size: 12px;
  font-weight: 500;
}
.login-form input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 13px;
  outline: none;
  background: #0c131c;
  color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.login-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(102, 192, 244, .12);
}

.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 7px;
  transform: translateY(-50%);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.password-toggle:hover, .password-toggle:focus-visible {
  background: rgba(102, 192, 244, .08);
  color: var(--text);
  outline: none;
}
.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.login-error {
  min-height: 19px;
  margin-top: 5px;
  color: var(--error);
  font-size: 12px;
  line-height: 1.5;
}

.sign-in-button {
  height: 46px;
  border: 0;
  border-radius: 7px;
  margin-top: 2px;
  background: linear-gradient(135deg, var(--blue-strong), #1679b9);
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(26, 159, 255, .2);
}
.sign-in-button:hover { filter: brightness(1.08); }
.sign-in-button:focus-visible {
  outline: 3px solid rgba(102, 192, 244, .3);
  outline-offset: 2px;
}
.sign-in-button i { display: none; }
.sign-in-button.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: wait;
  opacity: .78;
}
.sign-in-button.loading i {
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

@media (max-width: 520px) {
  .login-shell { padding: 18px 14px; }
  .login-card { padding: 28px 22px; border-radius: 11px; }
}

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