:root {
  color-scheme: dark;
  --night: #07101e;
  --panel: #0d1929;
  --panel-edge: rgba(170, 197, 229, 0.16);
  --ink: #f5f8fc;
  --muted: #8fa0b6;
  --blue: #5ca8ff;
  --blue-deep: #2679db;
  --green: #55d89d;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  background: var(--night);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(127, 166, 211, 0.045) 50%, transparent 50.1%),
    linear-gradient(0deg, transparent 49.9%, rgba(127, 166, 211, 0.035) 50%, transparent 50.1%),
    radial-gradient(circle at 50% 15%, #132945 0, var(--night) 43%);
  background-size: 88px 88px, 88px 88px, auto;
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 28px;
  padding: max(28px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
}

.login-panel {
  position: relative;
  width: min(100%, 420px);
  padding: 26px 28px 24px;
  overflow: hidden;
  border: 1px solid var(--panel-edge);
  border-radius: 22px;
  background: rgba(13, 25, 41, 0.94);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.035);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--blue), rgba(92, 168, 255, 0.08));
}

.brand-lockup {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 11px;
}

.mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(139, 191, 252, 0.38);
  border-radius: 10px;
  color: #fff;
  background: #132741;
  font-size: 15px;
  font-weight: 730;
}

.brand-name {
  letter-spacing: 0.15em;
  font-size: 13px;
  font-weight: 680;
}

.access-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.access-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(85, 216, 157, 0.55);
}

.login-copy { margin: 50px 0 28px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  letter-spacing: -0.035em;
  font-size: clamp(28px, 7vw, 34px);
  font-weight: 590;
  line-height: 1.1;
}

form { display: grid; gap: 10px; }

label {
  color: #b9c5d4;
  font-size: 12px;
  font-weight: 600;
}

input,
button {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  font: inherit;
}

input {
  border: 1px solid rgba(163, 188, 219, 0.2);
  outline: none;
  padding: 0 15px;
  color: var(--ink);
  caret-color: var(--blue);
  background: #081422;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder { color: #607086; }

input:focus {
  border-color: rgba(92, 168, 255, 0.76);
  box-shadow: 0 0 0 3px rgba(92, 168, 255, 0.12);
}

button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  border: 0;
  padding: 0 17px;
  color: #fff;
  background: var(--blue-deep);
  font-weight: 680;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

button b { font-size: 19px; font-weight: 400; }
button:hover:not(:disabled) { background: #3288eb; transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }
button:focus-visible { outline: 3px solid rgba(92, 168, 255, 0.34); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: 0.7; }

.status {
  min-height: 18px;
  margin: 13px 0 0;
  color: #ffb6ad;
  font-size: 12px;
  line-height: 1.45;
}

.login-foot {
  margin: 0;
  color: rgba(169, 185, 206, 0.58);
  font-size: 10px;
  letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  .login-panel { padding: 22px 20px 20px; border-radius: 18px; }
  .brand-lockup { grid-template-columns: 34px 1fr; }
  .access-state { grid-column: 2; margin-top: -7px; }
  .login-copy { margin: 42px 0 25px; }
}

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