/* ============================================================
   login.css — экран входа
   ============================================================ */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 20% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, var(--accent-soft), transparent 55%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Логотип ---------- */
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(47, 128, 237, 0.28);
}

.login-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.login-logo-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.login-logo-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Форма ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.login-field input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast),
              background var(--t-fast);
}

.login-field input::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

.login-field input:hover {
  border-color: var(--text-faint);
}

.login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

/* ---------- Ошибка ---------- */
.login-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.35;
}

/* ---------- Кнопка ---------- */
.login-submit {
  height: 42px;
  margin-top: 4px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--t-fast), opacity var(--t-fast),
              transform var(--t-fast);
}

.login-submit:hover:not(:disabled) {
  background: var(--accent-hover);
}

.login-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Спиннер внутри кнопки, когда идёт запрос */
.login-submit.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.7s linear infinite;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Подсказка снизу ---------- */
.login-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

.login-hint code {
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11.5px;
}

/* ---------- Мобильная адаптация ---------- */
@media (max-width: 420px) {
  .login-card {
    padding: 24px 20px 20px;
    border-radius: var(--radius);
  }
  .login-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 16px;
  }
}