body.login {
  font-family: 'Montserrat', sans-serif;
  background-color: #f8f9fa;
  background-image:
    linear-gradient(rgba(0, 125, 186, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 125, 186, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding-top: 90px;
  padding-bottom: 70px;
  box-sizing: border-box;
}

body.login #login {
  width: 100%;
  max-width: 544px;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
  margin: 0;
}

body.login #login h1 { display: none; }

.techportal-login-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  z-index: 10;
  flex-wrap: wrap;
  gap: 10px;
}
.techportal-login-topbar-brand { display: flex; align-items: center; gap: 12px; }
.techportal-login-topbar-logo { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.techportal-login-topbar-logo-fallback { width: 40px; height: 40px; border-radius: 6px; background: #007dba; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.techportal-login-topbar-title { font-size: 17px; font-weight: 700; color: #212529; }
.techportal-login-topbar-subtitle { font-size: 11px; color: #6c757d; }
.techportal-login-topbar-tagline { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: #007dba; text-transform: uppercase; }

.techportal-login-footer-wrap {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 5;
}

body.login #login {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 27, 51, 0.12);
  padding: 40px 36px 28px;
}

.techportal-login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 4px; user-select: none; }
.techportal-login-icon { width: 64px; height: 64px; border-radius: 10px; background: #007dba; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.techportal-login-icon-custom { background: transparent; box-shadow: none; width: auto; height: auto; }
.techportal-login-logo-img { max-width: 90px; max-height: 90px; border-radius: 10px; object-fit: cover; }
.techportal-login-title { font-size: 24px; font-weight: 700; color: #212529; letter-spacing: 0.01em; text-align: center; }
.techportal-login-subtitle { font-size: 13px; color: #6c757d; text-align: center; margin-top: 6px; line-height: 1.5; }
.techportal-login-intro { font-size: 12.5px; color: #495057; line-height: 1.6; text-align: center; margin-top: 14px; margin-bottom: 20px; }

.techportal-login-features { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 28px; flex-wrap: wrap; }
.techportal-login-features span { font-size: 12.5px; color: #007dba; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.techportal-login-features i { font-size: 11px; }
.techportal-login-features-sep { color: #dee2e6 !important; font-weight: 400 !important; }

body.login form#loginform { background: transparent; border: none; box-shadow: none; padding: 0; margin: 0; }
body.login .login-username label, body.login .login-password label, body.login .forgetmenot label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #6c757d; letter-spacing: 0.03em; }
body.login p.forgetmenot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 !important;
  padding: 0;
  float: none;
  width: auto;
  overflow: visible;
}
body.login p.forgetmenot label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  color: #212529;
  letter-spacing: normal;
}

body.login p.forgetmenot input[type="checkbox"] {
  margin: 0;
  border-color: #adb5bd;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}
body.login p.forgetmenot input[type="checkbox"]:checked {
  background-color: #007dba !important;
  border-color: #007dba !important;
}
body.login p.forgetmenot input[type="checkbox"]:focus-visible {
  outline: 2px solid #007dba;
  outline-offset: 2px;
}
body.login p.submit { clear: both; overflow: visible; margin-top: 18px !important; }
body.login .user-pass-wrap,
body.login .wp-pwd,
body.login form#loginform > p { overflow: visible; }

#login .techportal-login-field-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fff;
  flex: 1;
  min-width: 0;
  align-self: stretch;
  height: 42px;
  overflow: visible;
  margin: 1px;
}
#login .wp-pwd { display: flex; align-items: stretch; }
#login .techportal-login-field-wrap:focus-within { border-color: #007dba; box-shadow: 0 0 0 1px #007dba; }
#login .techportal-login-field-wrap .techportal-login-field-icon { color: #adb5bd; font-size: 13px; margin-left: 12px; margin-right: 12px; flex-shrink: 0; position: static; transform: none; }
#login .techportal-login-field-wrap input[type="text"],
#login .techportal-login-field-wrap input[type="password"] {
  border: none !important;
  box-shadow: none !important;
  padding: 0 12px 0 0 !important;
  margin: 0 !important;
  flex: 1;
  min-width: 0;
  background: transparent !important;
  font-size: 14px !important;
  font-family: 'Montserrat', sans-serif !important;
  line-height: normal !important;
  height: 100% !important;
}
#login .techportal-login-field-wrap input[type="text"]:focus,
#login .techportal-login-field-wrap input[type="password"]:focus { box-shadow: none !important; }

#login .techportal-login-field-wrap input:-webkit-autofill,
#login .techportal-login-field-wrap input:-webkit-autofill:hover,
#login .techportal-login-field-wrap input:-webkit-autofill:focus,
#login .techportal-login-field-wrap input:-webkit-autofill:active {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 14px !important;
  line-height: normal !important;
  padding: 0 12px 0 0 !important;
  margin: 0 !important;
  -webkit-text-fill-color: #212529;
  caret-color: #212529;
  box-shadow: 0 0 0 1000px #eef6fc inset !important;
  -webkit-box-shadow: 0 0 0 1000px #eef6fc inset !important;
  transition: background-color 5000s ease-in-out 0s;
}
body.login input[type="password"] { padding-right: 12px; }
body.login .wp-hide-pw { color: #6c757d; }

body.login .button-primary,
.techportal-access-card button,
.techportal-2fa-modal button,
.techportal-login-error-close {
  background: #007dba;
  border: 1px solid #005a8a;
  box-shadow: none;
  text-shadow: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: 100%;
  padding: 11px 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}
body.login .button-primary:hover, body.login .button-primary:focus,
.techportal-access-card button:hover,
.techportal-2fa-modal button:hover,
.techportal-login-error-close:hover {
  background: #005a8a;
  border-color: #005a8a;
}
body.login #nav, body.login #backtoblog { text-align: center; margin-top: 16px; }
body.login #nav a, body.login #backtoblog a { color: #007dba; font-size: 12px; text-decoration: none; }
body.login #nav a:hover, body.login #backtoblog a:hover { text-decoration: underline; }
body.login #backtoblog { display: none; }

body.login .privacy-policy-page-link { display: none; }

.techportal-access-link { text-align: center; margin-top: 16px; }
#techportal-access-open { background: none; border: none; color: #007dba; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; font-family: 'Montserrat', sans-serif; }
.techportal-access-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; align-items: center; justify-content: center; padding: 16px; }
.techportal-access-overlay.is-open { display: flex; }
.techportal-access-card { background: #fff; border-radius: 8px; max-width: 400px; width: 100%; padding: 24px; font-family: 'Montserrat', sans-serif; text-align: center; }
.techportal-access-card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: #212529; }
.techportal-access-card p { font-size: 13px; color: #6c757d; line-height: 1.6; margin: 0 0 18px; }
.techportal-access-card p a { color: #007dba; }

.techportal-login-error-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; align-items: center; justify-content: center; padding: 16px; }
.techportal-login-error-overlay.is-open { display: flex; }
.techportal-login-error-card { background: #fff; border-radius: 8px; max-width: 400px; width: 100%; padding: 24px; font-family: 'Montserrat', sans-serif; text-align: center; }
.techportal-login-error-icon { font-size: 28px; color: #cf222e; margin-bottom: 12px; }
.techportal-login-error-text { font-size: 13px; color: #495057; line-height: 1.6; margin: 0 0 18px; }
.techportal-login-error-text a { color: #007dba; }

body.techportal-2fa-pending { overflow: hidden; }
.techportal-2fa-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 999999;
  display: flex; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box;
}
.techportal-2fa-modal {
  background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
  max-width: 380px; width: 100%; padding: 32px 28px; text-align: center; font-family: 'Montserrat', sans-serif;
}
.techportal-2fa-icon { font-size: 32px; margin-bottom: 12px; color: #007dba; }
.techportal-2fa-modal h2 { margin: 0 0 8px; font-size: 18px; color: #212529; }
.techportal-2fa-modal p { margin: 0 0 18px; font-size: 13px; color: #6c757d; line-height: 1.6; }
.techportal-2fa-modal .techportal-2fa-error { color: #cf222e; font-weight: 600; }
.techportal-2fa-modal label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #6c757d;
  letter-spacing: .03em; margin-bottom: 8px; text-align: left;
}
.techportal-2fa-modal input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 22px; letter-spacing: 6px; text-align: center;
  border: 1px solid #dee2e6; border-radius: 6px; font-family: 'Montserrat', sans-serif; font-weight: 700; margin-bottom: 16px;
}
.techportal-2fa-modal input:focus { outline: none; border-color: #007dba; box-shadow: 0 0 0 2px rgba(0,125,186,.15); }
.techportal-2fa-cancel { display: inline-block; margin-top: 14px; font-size: 12px; color: #6c757d; text-decoration: none; }
.techportal-2fa-cancel:hover { color: #007dba; text-decoration: underline; }

@media (max-width: 660px) {

  .techportal-login-topbar { display: none; }
  .techportal-login-footer-wrap { display: none; }

  body.login {
    justify-content: flex-start;
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
