body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.98)),
    var(--kb-bg);
  color: var(--kb-text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../assets/KEST_Logo_Standard_Blue Secondary.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: min(1040px, 115vw) auto;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

.login-root {
  width: 100%;
  min-height: 100vh;
  padding: 32px 16px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.login-card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.11);
  padding: 34px;
}

.login-heading {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.38rem;
  font-size: 22px;
  font-weight: 700;
  color: var(--kb-text);
  margin: 0 0 24px;
  text-align: center;
  line-height: 1.15;
}

.login-heading span {
  display: inline-flex;
  align-items: baseline;
}

.login-heading-wordmark img {
  height: 26px;
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  top: 4px;
}

.login-form .kb-form-group {
  margin-bottom: 12px;
}

.login-form .kb-input {
  min-height: 44px;
  font-size: 15px;
}

.login-demo-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin: 0 0 18px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.login-demo-copy {
  display: grid;
  gap: 5px;
}

.login-demo-eyebrow {
  margin: 0;
  color: var(--kb-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-demo-copy h2 {
  margin: 0;
  color: var(--kb-text);
  font-size: 16px;
  line-height: 1.25;
}

.login-demo-copy p:last-child {
  margin: 0;
  color: var(--kb-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.login-demo-btn {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(30, 58, 138, 0.26);
  border-radius: 10px;
  background: #ffffff;
  color: var(--kb-blue);
  font-family: var(--kb-font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.login-demo-btn:hover {
  background: var(--kb-blue);
  border-color: var(--kb-blue);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(30, 58, 138, 0.18);
}

.login-demo-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  box-shadow: none;
}

.login-verification-form[hidden] {
  display: none;
}

.login-verification-copy {
  margin: 0 0 12px;
  color: var(--kb-text-muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.kb-input-wrapper {
  position: relative;
}

.c09-login-style-001 {
  padding-right: 48px;
}

.c09-login-style-002 {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 36px;
  min-width: 36px;
  height: 36px;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: var(--kb-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.c09-login-style-002:hover,
.c09-login-style-002:focus-visible {
  color: var(--kb-blue);
  background: rgba(30, 58, 138, 0.08);
  outline: none;
}

.c09-login-style-003 {
  display: none;
}

.login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: var(--kb-blue);
  color: #ffffff;
  font-family: var(--kb-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.login-submit:hover {
  background: var(--kb-blue-hover);
  box-shadow: 0 10px 20px rgba(30, 58, 138, 0.18);
}

.login-submit:focus-visible,
.login-demo-btn:focus-visible,
.social-btn:focus-visible,
.forgot-link:focus-visible,
.login-footer a:focus-visible,
.page-footer a:focus-visible {
  outline: 3px solid rgba(180, 83, 9, 0.28);
  outline-offset: 3px;
}

.login-submit:disabled,
.social-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  box-shadow: none;
}

.login-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.login-spinner.active {
  display: block;
}

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

.login-error,
.login-status {
  display: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.login-status {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.login-error.visible,
.login-status.visible {
  display: block;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background: var(--kb-border);
}

.login-divider-text {
  font-size: 12px;
  color: var(--kb-text-light);
  white-space: nowrap;
}

.social-btn {
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
  padding: 11px 14px;
  border: 1px solid var(--kb-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--kb-text);
  font-family: var(--kb-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.social-btn:last-child {
  margin-bottom: 0;
}

.social-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.social-btn.is-loading {
  border-color: var(--kb-blue);
  background: #eff6ff;
}

.social-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-img-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: inline-block;
}

.password-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

.forgot-link,
.login-footer a,
.page-footer a {
  color: var(--kb-blue);
  text-decoration: none;
  font-weight: 700;
}

.forgot-link:hover,
.login-footer a:hover,
.page-footer a:hover {
  text-decoration: underline;
}

.forgot-link {
  font-size: 14px;
}

.login-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 15px;
  color: var(--kb-text-muted);
  font-weight: 600;
}

.page-footer {
  margin-top: 24px;
  font-size: 14px;
  color: var(--kb-text-light);
  text-align: center;
  font-weight: 600;
}

.page-footer a {
  color: var(--kb-text-light);
}

.page-footer a:hover {
  color: var(--kb-text-muted);
}

@media (max-width: 480px) {
  .login-root {
    justify-content: flex-start;
    padding: 24px 14px;
  }

  .login-card {
    padding: 26px 18px 22px;
  }

  .login-heading {
    font-size: 20px;
  }

  .login-footer {
    margin-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}