/* App-wide: no text caret on non-editable clicks. */
html, body {
  caret-color: transparent;
}
input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]),
textarea,
[contenteditable="true"],
[contenteditable=""] {
  caret-color: auto;
}

body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: var(--app-body-size);
  line-height: var(--app-line-height);
  background: #f2f4f7;
  color: var(--app-text);
  margin: 0;
  padding: 18px 22px max(5rem, calc(76px + env(safe-area-inset-bottom, 0px)));
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}



.app-footer-watermark {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(244, 251, 255, 0.92) 0%, rgba(250, 250, 252, 0.98) 100%);
  border-top: 0;
  box-sizing: border-box;
  color: #667085;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
  letter-spacing: 0.06em;
  margin-top: auto;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  position: relative;
  text-align: center;
  user-select: none;
}

.app-footer-watermark__text {
  align-items: baseline;
  display: inline-flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  gap: 0.35em;
  justify-content: center;
  line-height: 1.35;
}

.app-footer-watermark__year,
.app-footer-watermark__brand,
.app-footer-watermark__entity {
  color: #667085;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Password field + in-field visibility control. */
.password-field {
  align-items: stretch;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
  position: relative;
  vertical-align: middle;
}

.password-field--block {
  display: flex;
  width: 100%;
}

.password-field input[type="password"],
.password-field input[type="text"] {
  box-sizing: border-box;
  margin-bottom: 0;
  padding-right: 48px;
  width: 100%;
}

.password-field__show {
  align-items: center;
  color: #475467;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 500;
  gap: 6px;
  margin-top: 0;
  user-select: none;
}

.password-field__option-row {
  align-items: center;
  display: flex;
  height: var(--app-control-height, 38px);
  justify-content: center;
  position: absolute;
  right: 4px;
  top: 0;
  width: 40px;
  z-index: 1;
}

.password-field__option-row .login-form__save-password {
  order: 1;
}

.login-form .password-field--block {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-items: start;
}

.login-form .password-field--block > input[type="password"],
.login-form .password-field--block > input[type="text"] {
  grid-area: 1 / 1;
  justify-self: stretch;
  margin-top: 0;
  width: 100%;
}

.login-form .password-field--block > .password-field__option-row {
  align-self: stretch;
  grid-area: 1 / 1;
  height: auto;
  justify-self: end;
  position: relative;
  right: 0;
  top: auto;
  width: 40px;
}

.login-form .password-field--block > .login-form__save-password {
  align-items: center;
  display: inline-flex;
  grid-area: 2 / 1;
  justify-content: flex-start;
  justify-self: start;
  margin-inline: 0;
  margin-left: 4px;
  margin-top: 3px;
  max-width: max-content;
  text-align: left;
  width: auto;
}

.password-field__show-check {
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  cursor: pointer;
  flex: 0 0 var(--app-checkbox-size, 16px);
  height: var(--app-checkbox-size, 16px);
  max-height: var(--app-checkbox-size, 16px);
  max-width: var(--app-checkbox-size, 16px);
  min-height: var(--app-checkbox-size, 16px);
  min-width: var(--app-checkbox-size, 16px);
  padding: 0;
  width: var(--app-checkbox-size, 16px);
}

.password-field__option-row .password-field__show:not(.login-form__save-password) {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #344054;
  height: 100%;
  justify-content: center;
  margin-top: 0;
  padding: 0;
  position: relative;
  transition: color 140ms ease;
  width: 100%;
}

.password-field__option-row .password-field__show:not(.login-form__save-password):hover {
  background: transparent;
  border-color: transparent;
  color: #101828;
}

.password-field__option-row .password-field__show:not(.login-form__save-password):focus-within {
  border-color: transparent;
  box-shadow: none;
  color: var(--app-action-primary);
  outline: none;
}

.password-field__option-row .password-field__show-check:not([data-login-save-password]) {
  cursor: pointer;
  height: 100%;
  margin: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.password-field__visibility-icon {
  align-items: center;
  display: inline-flex;
  height: 18px;
  justify-content: center;
  pointer-events: none;
  width: 18px;
}

.password-field__eye {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.password-field__eye--visible {
  display: none;
}

.password-field__show-check:checked ~ .password-field__visibility-icon .password-field__eye--hidden {
  display: none;
}

.password-field__show-check:checked ~ .password-field__visibility-icon .password-field__eye--visible {
  display: block;
}


.login-page {
  align-items: center;
  background:
    radial-gradient(ellipse 70% 55% at 12% 8%, rgba(46, 197, 255, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 92% 12%, rgba(138, 43, 226, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 88%, rgba(58, 123, 255, 0.12), transparent 55%),
    linear-gradient(165deg, #f4fbff 0%, #f7f8ff 42%, #eef4ff 100%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-family: "Outfit", "Segoe UI", sans-serif;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding: max(24px, 17vh) 18px 48px;
  position: relative;
}

.login-page .app-footer-watermark {
  background: transparent;
  left: 0;
  margin-top: 0;
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.login-page__glow {
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.login-page__glow--cyan {
  animation: login-glow-drift 14s ease-in-out infinite alternate;
  background: rgba(46, 197, 255, 0.28);
  height: min(42vw, 420px);
  left: -8%;
  top: 6%;
  width: min(42vw, 420px);
}

.login-page__glow--violet {
  animation: login-glow-drift 18s ease-in-out infinite alternate-reverse;
  background: rgba(138, 43, 226, 0.18);
  bottom: 4%;
  height: min(36vw, 360px);
  right: -6%;
  width: min(36vw, 360px);
}

@keyframes login-glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18px, -14px, 0) scale(1.06); }
}

.login-panel {
  animation: login-panel-rise 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 255, 0.96) 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(138, 43, 226, 0.06),
    0 24px 70px rgba(15, 23, 42, 0.12),
    0 8px 24px rgba(46, 197, 255, 0.08);
  box-sizing: border-box;
  flex-shrink: 0;
  margin: 0 auto;
  max-width: 560px;
  overflow: hidden;
  padding: 40px 44px;
  position: relative;
  width: min(100%, 560px);
  z-index: 1;
}

.login-panel::before {
  background: linear-gradient(
    90deg,
    var(--keshero-teal, #2ec5ff) 0%,
    var(--keshero-blue, #3a7bff) 50%,
    var(--keshero-purple, #8a2be2) 100%
  );
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
}

@keyframes login-panel-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-panel__tagline {
  animation: login-tagline-in 700ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
  background: linear-gradient(105deg, var(--keshero-teal, #2ec5ff) 0%, var(--keshero-blue, #3a7bff) 48%, var(--keshero-purple, #8a2be2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 28px;
  text-align: center;
}

@keyframes login-tagline-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-panel__helper {
  color: #5b6b7f;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 20px;
}

.login-panel__error {
  background: var(--app-danger-surface);
  border: 1px solid #fecdca;
  border-radius: 10px;
  color: var(--app-action-danger);
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 16px;
  padding: 10px 12px;
}

.login-panel__success {
  background: var(--app-success-surface);
  border: 1px solid var(--app-success-border);
  border-radius: 10px;
  color: var(--app-success-fg);
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 16px;
  padding: 10px 12px;
}

.login-panel-logo {
  align-items: center;
  animation: login-tagline-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  border-radius: 12px;
  box-sizing: border-box;
  display: flex;
  height: 120px;
  justify-content: center;
  margin: 0 0 14px;
  max-width: 100%;
  overflow: hidden;
  width: 100%;
}

.login-panel-logo img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.login-panel input:not([type="checkbox"]):not([type="radio"]) {
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font: inherit;
  margin-top: 4px;
  max-width: 100%;
  padding: 9px 10px;
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-form__field {
  display: grid;
  gap: 6px;
}

.login-form__field > input,
.login-form__field .password-field {
  width: 100%;
}

.login-form__field > label,
.login-form__label-row,
.login-form__label-row > label {
  color: #344054;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.login-form__label-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.login-form__label-row > label {
  margin-left: 4px;
}

.login-form__label-row a,
.login-panel__links a {
  color: var(--keshero-blue, #3a7bff);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.login-form__label-row a {
  margin-right: 4px;
}

.login-form__label-row a:hover,
.login-panel__links a:hover {
  color: var(--keshero-purple, #8a2be2);
  text-decoration: underline;
}

.login-form__submit,
.login-panel button[type="submit"] {
  background: linear-gradient(105deg, var(--keshero-teal, #2ec5ff) 0%, var(--keshero-blue, #3a7bff) 100%);
  border: 0;
  box-shadow: 0 10px 24px rgba(46, 197, 255, 0.28);
  color: #fff;
  font-weight: 800;
  min-height: 44px;
  transition: box-shadow 0.16s ease, transform 0.16s ease, filter 0.16s ease;
  width: 100%;
}

.login-form__submit:hover,
.login-panel button[type="submit"]:hover {
  box-shadow: 0 14px 28px rgba(58, 123, 255, 0.32);
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.login-panel .password-field__show-check {
  --app-checkbox-size: 18px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  flex: 0 0 18px;
  height: 18px;
  max-height: 18px;
  max-width: 18px;
  min-height: 18px;
  min-width: 18px;
  padding: 0;
  width: 18px;
}

/* Save Password: rounded square + solid app blue (not green circle / light cyan). */
.login-panel .login-form__save-password .password-field__show-check,
.login-panel .login-form .login-form__save-password > .password-field__show-check[data-login-save-password] {
  --app-checkbox-size: 20px;
  --app-checkbox-radius: 4px;
  --app-checkbox-checked-bg: var(--keshero-blue, #3a7bff);
  --app-checkbox-checked-border: var(--keshero-blue, #3a7bff);
  accent-color: var(--app-checkbox-checked-bg, var(--keshero-blue, #3a7bff));
  border-radius: var(--app-checkbox-radius, 4px);
  flex: 0 0 20px;
  height: 20px;
  max-height: 20px;
  max-width: 20px;
  min-height: 20px;
  min-width: 20px;
  /* Optical vertical center vs label text (native checkbox sits slightly low). */
  transform: translateY(-2px);
  width: 20px;
}

.login-panel .login-form__save-password .password-field__show-check:checked {
  background-color: var(--app-checkbox-checked-bg, var(--keshero-blue, #3a7bff));
  background-size: var(--app-checkbox-mark-size, 14px) var(--app-checkbox-mark-size, 14px);
  border-color: var(--app-checkbox-checked-border, var(--keshero-blue, #3a7bff));
}

/* Keep the saved-password control compact and left aligned despite shared form rules. */
.login-panel .login-form .password-field--block > input[type="password"],
.login-panel .login-form .password-field--block > input[type="text"] {
  margin-top: 0;
  min-height: var(--app-control-height, 38px);
}

.login-panel .login-form .password-field--block > .password-field__option-row {
  height: auto;
  min-height: var(--app-control-height, 38px);
}

.login-panel .login-form .password-field--block > .login-form__save-password {
  align-items: center !important;
  display: inline-flex !important;
  gap: 8px !important;
  justify-content: flex-start !important;
  justify-self: start !important;
  line-height: 20px;
  margin: 4px 0 0 4px !important;
  max-width: max-content !important;
  min-height: 20px;
  width: max-content !important;
}

.login-panel .login-form .login-form__save-password > .password-field__show-check {
  flex: 0 0 20px !important;
  height: 20px !important;
  margin: 0 !important;
  max-height: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  min-width: 20px !important;
  transform: none;
  width: 20px !important;
}

.login-panel__sso {
  margin: 22px 0;
}

.login-panel__sso-button {
  align-items: center;
  background: #0f172a;
  border-radius: 10px;
  color: #fff;
  display: flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
  transition: background-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
  width: 100%;
}

.login-panel__sso-button:hover,
.login-panel__sso-button:focus-visible {
  background: #1e293b;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.login-panel__divider {
  align-items: center;
  border-top: 0 !important;
  color: #667085;
  display: flex;
  font-size: 13px;
  gap: 12px;
  margin: 24px 0 18px;
}

.login-panel__divider::before,
.login-panel__divider::after {
  background: linear-gradient(90deg, transparent, rgba(46, 197, 255, 0.45), rgba(138, 43, 226, 0.35), transparent);
  content: "";
  flex: 1;
  height: 2px;
}

.login-panel__links {
  margin-top: 14px;
}

.login-panel__fallback {
  background: #fffbeb;
  border: 1px solid #fedf89;
  border-radius: 12px;
  color: #713b12;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px;
}

.login-panel__fallback p {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.login-panel__fallback .app-button {
  width: max-content;
}

.login-panel .account-password-requirements {
  margin: 0;
}

/* Left arrow + "Back to ?" (shared by back_nav macro and back_link) */
.app-back-link {
  align-items: center;
  color: #2563eb;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 0.4em;
  line-height: 1.2;
  text-decoration: none;
  width: max-content;
}

.app-back-link:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.app-back-link__arrow {
  color: inherit;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.88;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.app-back-link:hover .app-back-link__arrow {
  opacity: 1;
  transform: translateX(-1px);
}

.app-back-link__text {
  white-space: nowrap;
}

.sr-only {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}
.password-req-list {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 12px;
  font-size: 13px;
  line-height: 1.45;
}
.password-req-list li {
  margin: 5px 0;
  padding: 6px 8px 6px 1.55em;
  position: relative;
  font-weight: 500;
  border-radius: 4px;
}
.password-req-list li::before {
  font-family: inherit;
  font-weight: 700;
  left: 8px;
  position: absolute;
  text-align: left;
  width: 1.1em;
}
.password-req-list li.password-req-unmet {
  color: var(--app-action-danger);
  background: rgba(180, 35, 24, 0.08);
}
.password-req-list li.password-req-unmet::before {
  content: "\00D7";
  color: var(--app-action-danger);
}
.password-req-list li.password-req-met {
  color: var(--app-success-fg);
  background: rgba(6, 118, 71, 0.08);
}
.password-req-list li.password-req-met::before {
  content: "\2713";
  color: var(--app-success-fg);
}
.password-req-list li.password-req-neutral {
  color: #666;
  background: transparent;
}
.password-req-list li.password-req-neutral::before {
  content: "\2013";
  color: #999;
}
.account-password-requirements {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  padding: 14px;
}
.account-password-requirements strong {
  color: #344054;
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.login-panel__links .app-back-link {
  font-weight: 600;
  gap: 0.45em;
}
.login-panel__links .app-back-link:hover {
  text-decoration: underline;
}
.login-panel__links .app-back-link__arrow {
  opacity: 0.9;
}
/* Shared control overrides needed by the standalone authentication pages. */
.login-panel input:not([type="checkbox"]):not([type="radio"]) {
  background: #fff; border-radius: var(--app-radius-control); box-sizing: border-box;
  color: var(--app-text); min-height: var(--app-control-height);
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .025);
}
.login-panel input:focus {
  border-color: var(--app-action-primary); box-shadow: 0 0 0 4px var(--app-focus-ring); outline: none;
}
.login-form__submit { border-radius: var(--app-radius-control); font: inherit; cursor: pointer; padding: 8px 14px; }
.login-form__submit:focus-visible { outline: 3px solid var(--app-focus-ring); outline-offset: 3px; }
.login-form__submit:hover {
  background: linear-gradient(105deg, var(--keshero-cyan-glow, #6fe3ff), var(--keshero-blue, #3a7bff) 55%, var(--keshero-purple, #8a2be2) 140%);
}
.required-star { color: var(--app-action-danger); font-weight: 800; margin-left: 2px; }
@media (max-width: 600px) {
  .login-page { padding-top: max(24px, 8vh); }
  .login-panel { padding: 30px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-page *, .login-page *::before { animation: none !important; transition: none !important; }
}

