:root {
  color-scheme: dark;
  --bg: #07131c;
  --surface: #0d1d28;
  --surface-2: #112633;
  --line: rgba(193, 220, 228, 0.18);
  --text: #f3f8fa;
  --muted: #8fa3ae;
  --teal: #45dfd0;
  --orange: #ff835b;
  --danger: #ff8294;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, rgba(69, 223, 208, 0.14), transparent 32rem),
    radial-gradient(circle at 105% 20%, rgba(255, 131, 91, 0.09), transparent 25rem),
    var(--bg);
  color: var(--text);
}

button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.login-shell {
  width: min(100% - 34px, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(34px, env(safe-area-inset-top)) 0 max(34px, env(safe-area-inset-bottom));
  display: grid;
  align-content: center;
  gap: 34px;
}

.login-copy { display: grid; align-content: center; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 60px; }
.login-brand img { width: 48px; height: 48px; }
.login-brand span { display: flex; align-items: baseline; }
.login-brand strong { font-size: 1.05rem; letter-spacing: 0.15em; }
.login-brand strong:last-child { color: var(--teal); }
.eyebrow { color: var(--teal); font-size: 0.75rem; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
.login-copy h1 { margin: 13px 0 16px; font-size: clamp(2.8rem, 9vw, 5.3rem); line-height: 0.96; letter-spacing: -0.06em; }
.login-copy > p { max-width: 540px; margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.55; }

.login-card {
  display: grid;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(17, 38, 51, 0.98), rgba(8, 22, 31, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}
.login-card small { color: var(--teal); font-weight: 850; letter-spacing: 0.12em; }
.login-card h2 { margin: 5px 0 3px; font-size: 2rem; }
.login-card p { margin: 0; color: var(--muted); }
form { display: grid; gap: 18px; }
.text-field, .password-field { display: grid; }
.text-field > span, .password-field > span { margin-bottom: 8px; color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.text-field input {
  min-width: 0;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: #06131b;
  color: var(--text);
}
.text-field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(69, 223, 208, 0.1); }
.password-field { display: grid; }
.password-control { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--line); border-radius: 14px; background: #06131b; }
.password-control:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(69, 223, 208, 0.1); }
.password-control input { min-width: 0; height: 52px; padding: 0 15px; border: 0; outline: 0; background: transparent; color: var(--text); }
.password-control input.masked-input { -webkit-text-security: disc; }
.password-control button { padding: 0 14px; border: 0; background: transparent; color: var(--teal); font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.login-submit { min-height: 52px; border: 0; border-radius: 14px; background: var(--teal); color: #031513; font-weight: 900; cursor: pointer; }
.login-submit:disabled { cursor: wait; opacity: 0.65; }
.login-error { color: var(--danger) !important; font-size: 0.84rem; }
.privacy-note { padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.78rem; }
[hidden] { display: none !important; }

@media (min-width: 800px) {
  .login-shell { grid-template-columns: 1.1fr 0.9fr; gap: 74px; }
  .login-card { padding: 32px; }
}
