:root {
  --bg: #06111d;
  --panel-top: #0d1b29;
  --panel-bottom: #091622;
  --field-bg: #07131f;
  --line: #30485d;
  --line-soft: #304457;
  --blue: #1762c7;
  --blue-2: #124d9e;
  --blue-focus: #1d73d4;
  --text: #ffffff;
  --text-soft: #aebac6;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 75% 12%, rgba(24, 98, 199, 0.13), transparent 31%),
    linear-gradient(180deg, var(--bg), #071522);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.login-panel {
  width: min(100%, 440px);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  padding: 30px;
}

.login-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(48, 68, 87, 0.8);
}

.brand-mark {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  border: 1px solid #2768ad;
  border-radius: 12px;
  background: linear-gradient(135deg, #1763ca, #124d9e);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  margin: 2px 0 7px;
  color: #77b7ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.login-subtitle {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 9px;
  margin-top: 24px;
}

.login-form label {
  margin-top: 7px;
  color: #d8e0e8;
  font-size: 13px;
}

.login-form input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid #34536d;
  border-radius: 8px;
  outline: none;
  background: var(--field-bg);
  color: #fff;
  padding: 0 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form input:focus {
  border-color: var(--blue-focus);
  box-shadow: 0 0 0 3px rgba(29, 115, 212, 0.16);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 88px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  height: 32px;
  border: 0;
  border-left: 1px solid var(--line-soft);
  background: transparent;
  color: #77b7ff;
  padding: 0 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.password-toggle:focus-visible,
.login-submit:focus-visible {
  outline: 2px solid #77b7ff;
  outline-offset: 2px;
}

.login-submit {
  width: 100%;
  height: 50px;
  margin-top: 16px;
  border: 1px solid var(--blue-focus);
  border-radius: 9px;
  background: linear-gradient(135deg, #1763ca, var(--blue-2));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.login-submit:hover {
  filter: brightness(1.06);
}

@media (max-width: 520px) {
  .login-page {
    padding: 20px 14px;
  }

  .login-panel {
    padding: 22px 18px;
  }

  .login-header {
    gap: 12px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 10px;
    font-size: 14px;
  }

  .login-header h1 {
    font-size: 21px;
  }
}

@media (max-width: 360px) {
  .login-header {
    display: block;
  }

  .brand-mark {
    margin-bottom: 14px;
  }
}


.login-message {
  margin: 0 0 4px;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
}

.login-message--error {
  border: 1px solid rgba(255, 115, 115, 0.45);
  background: rgba(164, 35, 35, 0.16);
  color: #ffd2d2;
}
