:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07111e;
  color: #e8f2fa;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(29, 82, 123, .38), transparent 52%),
    #07111e;
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.login-card {
  width: min(100%, 420px);
  padding: clamp(24px, 7vw, 38px);
  border: 1px solid #294761;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(16, 34, 53, .98), rgba(9, 24, 39, .98));
  box-shadow: 0 24px 72px #0008;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #75b9e8;
  border-radius: 14px;
  color: #fff;
  background: #1d527b;
  font-size: 27px;
  font-weight: 800;
}

.eyebrow {
  margin: 25px 0 5px;
  color: #8fc9f0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(25px, 7vw, 31px); letter-spacing: -.025em; }
.intro { margin: 9px 0 25px; color: #a9bbca; line-height: 1.5; }

form { display: grid; gap: 10px; }
form > label:not(.remember-row) { margin-top: 4px; color: #d9e8f3; font-size: 14px; font-weight: 650; }

input[type="text"], input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #385b79;
  border-radius: 10px;
  outline: none;
  color: #f5fbff;
  background: #08131f;
  font: inherit;
  font-size: 16px;
}

input:focus-visible { border-color: #76b8e8; box-shadow: 0 0 0 3px #76b8e833; }

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 4px 0;
  color: #bfd2e0;
  font-size: 14px;
}

.remember-row input { width: 19px; height: 19px; margin: 0; accent-color: #50a7de; }

button {
  min-height: 50px;
  margin-top: 3px;
  border: 1px solid #75b9e8;
  border-radius: 10px;
  color: #fff;
  background: #1d527b;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover, button:focus-visible { background: #286994; outline: 2px solid #76b8e8; outline-offset: 2px; }
button:disabled { opacity: .65; cursor: progress; }
.message { min-height: 22px; margin: 1px 0 0; color: #ffb1a8; font-size: 14px; }
.message.success { color: #9ae2c4; }
.security-note { margin: 19px 0 0; color: #7894a9; font-size: 12px; text-align: center; }

@media (max-width: 480px) {
  .login-card { border-radius: 16px; }
  .login-shell { align-items: start; padding-top: max(8vh, env(safe-area-inset-top) + 24px); }
}
