:root {
  --panel: rgba(6, 22, 44, .86);
  --panel-solid: #0c2037;
  --field: rgba(3, 14, 30, .72);
  --border: rgba(118, 171, 226, .32);
  --border-strong: rgba(151, 203, 245, .72);
  --text: #e8f3ff;
  --muted: #b0cfea;
  --accent: #2f8cff;
  --accent-top: #3688f3;
  --accent-bottom: #1e64d0;
  --danger: #ff9aae;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  color: var(--text);
  background: #071a33 url("/assets/wallpaper.png") center / cover fixed no-repeat;
  font-family: "Noto Sans", "Segoe UI", system-ui, sans-serif;
}

button, input { font: inherit; }

.login {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: min(100%, 420px);
  margin: auto 0;
  padding: 34px 34px 32px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.login-logo { display: block; width: 158px; height: auto; margin: 0 auto 26px; }

.login-head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(118, 171, 226, .2);
  text-align: center;
}

.login-head h1 { margin: 0; font-size: 22px; font-weight: 600; }
.login-head p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }

label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 13px; font-weight: 500; }

input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  font-size: 16px;
}

input::placeholder { color: rgba(176, 207, 234, .5); }
input:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(47, 140, 255, .2); }
#phone { margin-bottom: 16px; letter-spacing: .3px; }

.password-field { position: relative; }
.password-field input { padding-right: 78px; }

.password-field button {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 36px;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.password-field button:hover { color: var(--text); background: rgba(118, 171, 226, .12); }

.form-error { margin: 12px 0 0; color: var(--danger); font-size: 13px; line-height: 1.4; }

.primary {
  width: 100%;
  height: 46px;
  margin-top: 20px;
  color: #f4f9ff;
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom));
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.primary:hover { filter: brightness(1.07); }
.primary:active { background: #1858bc; }
.primary:disabled { cursor: wait; opacity: .7; }
:is(button, input):focus-visible { outline: 2px solid var(--border-strong); outline-offset: 2px; }
input:focus-visible { outline: none; }

.two-factor-note { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.4; }
#two-factor-code { font-size: 20px; letter-spacing: 2px; text-align: center; }
#two-factor-form small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; }
.text-button { width: 100%; min-height: 40px; margin-top: 8px; color: #cfe3f8; background: none; border: 0; cursor: pointer; font-size: 14px; }
.license-link { display: block; margin-top: 16px; padding: 8px; color: #cfe3f8; font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; }
.license-link:hover { color: #fff; text-decoration: underline; }

.login-footer { margin-top: 18px; color: rgba(214, 232, 248, .72); font-size: 12px; }

@media (max-width: 460px) {
  .login-card { padding: 26px 20px 24px; }
}
