/*
 * Login page modern refresh.
 * Loaded after AdminLTE.min.css (and modern-nav.css, which defines the
 * --nx-blue-* tokens + Inter font-import reused here) so these rules win
 * the cascade and the login page stays visually consistent with the
 * header/sidebar gradient used across the rest of the app.
 */

body.login-page.login-modern {
  /* 100vh on mobile browsers (Safari/Chrome) includes the space behind the
     address bar, so the flex centering below looks top-anchored instead of
     centered until the toolbar collapses. 100dvh tracks the actual visible
     viewport; vh stays as the fallback for browsers without dvh support. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--nx-blue-900) 0%, var(--nx-blue-700) 55%, var(--nx-blue-500) 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 24px;
}

.login-modern-wrap {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 42, 67, .28);
  padding: 36px 32px 28px;
}

.login-card-logo {
  text-align: center;
  margin-bottom: 18px;
}

.login-card-logo img {
  max-width: 220px;
  width: 100%;
  height: auto;
}

.login-card-subtitle {
  text-align: center;
  color: #5c7183;
  font-size: 13px;
  margin: 0 0 22px;
}

.login-card-subtitle a {
  color: var(--nx-blue-500);
  font-weight: 500;
}

.login-card-subtitle a:hover {
  color: var(--nx-blue-700);
  text-decoration: underline;
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fdecea;
  color: #b3261e;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

.login-alert i {
  font-size: 15px;
}

.login-field {
  position: relative;
  margin-bottom: 14px;
}

.login-field > i:first-child {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a6b4bf;
  font-size: 14px;
}

.login-field input {
  width: 100%;
  height: 46px;
  border: 1px solid #e1e7ec;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0 40px;
  font-size: 14px;
  color: #1a232b;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.login-field input::placeholder {
  color: #a6b4bf;
}

.login-field input:focus {
  outline: none;
  border-color: var(--nx-blue-500);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 134, 194, .15);
}

.login-field-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #a6b4bf;
  padding: 8px;
  cursor: pointer;
}

.login-field-toggle:hover {
  color: #5c7183;
}

.login-submit {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(100deg, var(--nx-blue-900) 0%, var(--nx-blue-700) 50%, var(--nx-blue-500) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .2px;
  cursor: pointer;
  margin-top: 6px;
  transition: filter .15s ease;
  box-shadow: 0 8px 20px rgba(15, 42, 67, .25);
}

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

.login-submit:disabled {
  cursor: default;
  filter: grayscale(.15) brightness(.95);
}

.login-submit.is-loading .login-submit-text::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: login-spin .6s linear infinite;
}

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

.login-info-panel {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #eef2f5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: #5c7183;
}

.login-info-row i {
  width: 12px;
  margin-top: 2px;
}

.login-info-ua span {
  word-break: break-all;
}

@media (max-width: 420px) {
  .login-card {
    padding: 28px 20px 22px;
    border-radius: 14px;
  }
}
