/* Infinite ERP login page — scoped to the public login route only. */
body[data-path="login"] {
  min-height: 100vh;
  /* Background shown exactly as supplied — no gradient/overlay layers. */
  background: url("/assets/infinite_erp_branding/images/login-background.jpg") center / cover fixed no-repeat;
}

body[data-path="login"] .navbar,
body[data-path="login"] .web-footer {
  display: none;
}

body[data-path="login"] .page-content,
body[data-path="login"] .page-content-wrapper,
body[data-path="login"] #page-login,
body[data-path="login"] .container {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Frappe's login.js shows/hides sections with inline display (toggle → display:
   block / display: none), and core CSS hides .for-signup / .for-email-login /
   .for-login-with-email-link. Only restyle a section that is actually visible
   so we never fight its hidden state. */
body[data-path="login"] section[class*="for-"][style*="display: block"],
body[data-path="login"] section.for-login:not([style*="display: none"]):not([style*="display:none"]) {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 48px 24px;
}

body[data-path="login"] .login-content.page-card {
  width: min(100%, 430px);
  margin: 0;
  padding: 28px 38px 30px;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(19, 39, 73, 0.24), 0 4px 14px rgba(19, 39, 73, 0.10);
  backdrop-filter: blur(18px) saturate(160%);
}

body[data-path="login"] .page-card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  text-align: center;
}

body[data-path="login"] .page-card-head .app-logo {
  width: min(100%, 290px) !important;
  max-width: 290px !important;
  height: 142px !important;
  max-height: 142px !important;
  object-fit: contain;
  object-position: center;
  content: url("/assets/infinite_erp_branding/images/logo-login-full-1024x1024.png");
}

body[data-path="login"] .page-card-head-text h4 {
  margin: 0;
  color: #14213d;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

body[data-path="login"] .page-card-head-text .page-card-subtitle {
  margin-top: 2px;
  color: #62708a;
  font-size: 0.96rem;
}

body[data-path="login"] .form-label {
  color: #34415b;
  font-size: 0.86rem;
  font-weight: 600;
}

body[data-path="login"] .form-control {
  min-height: 48px;
  border: 1px solid #d8e0ed;
  border-radius: 11px;
  background: #f8faff;
  color: #14213d;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

body[data-path="login"] .form-control:focus {
  border-color: #169fd2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 159, 210, 0.16);
}

body[data-path="login"] .login-content.page-card .btn-login {
  min-height: 48px;
  border: 0 !important;
  border-radius: 11px;
  background: linear-gradient(100deg, #303896, #08b8e8) !important;
  box-shadow: 0 8px 18px rgba(30, 113, 176, 0.25);
  color: #fff !important;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

body[data-path="login"] .login-content.page-card .btn-login:hover,
body[data-path="login"] .login-content.page-card .btn-login:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 11px 22px rgba(30, 113, 176, 0.32);
}

body[data-path="login"] .btn-login-option {
  min-height: 46px;
  border: 1px solid #dce4ef;
  border-radius: 11px;
  color: #303896;
  font-weight: 600;
}

body[data-path="login"] .forgot-password-message a {
  color: #168fc2;
  font-weight: 600;
}

@media (max-width: 520px) {
  body[data-path="login"] section[class*="for-"][style*="display: block"],
  body[data-path="login"] section.for-login:not([style*="display: none"]):not([style*="display:none"]) {
    padding: 24px 14px;
  }

  body[data-path="login"] .login-content.page-card {
    padding: 28px 22px 24px;
    border-radius: 20px;
  }

  body[data-path="login"] .page-card-head .app-logo {
    height: 96px;
  }
}
