/* =========================================================
   SYNE - Sign-in page (/Login, Views/User/LoginNew.cshtml)
   Same design as the NEO sign-in page (neo-qa.syne.com/login).
   Colours and sizes are taken from that page; they are kept here as
   tokens so the page is easy to adjust in one place.
   ========================================================= */

:root {
  --login-navy: #041549;        /* top band, "Forgot password?" link */
  --login-cyan: #16c0ef;        /* Sign in button (SYNE brand cyan) */
  --login-cyan-hover: #0e9bc4;  /* button hover (SYNE --syne-cyan-dim) */
  --login-page: #f9fafc;        /* page background */
  --login-card: #ffffff;
  --login-border: #e4e7ea;      /* card, input and checkbox borders */
  --login-text: #2a3844;        /* title, labels, input text */
  --login-muted: #5f6b7a;       /* subtitle, footer links */
  --login-error: #c62828;
  --login-error-bg: #fdecec;
  --login-info-bg: #e8f8fd;
  --login-radius-card: 16px;
  --login-radius-field: 5.6px;
  --login-font: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.login-page {
  font-family: var(--login-font);
  color: var(--login-text);
  background: var(--login-page);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Page shell: full-height, card centred ---------- */
.login-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  overflow: hidden;
}

/* ---------- Background ---------- */
/* Navy band across the top 42% of the page */
.login-bg-band {
  position: absolute;
  inset: 0 0 auto 0;
  height: 42%;
  background: var(--login-navy);
  overflow: hidden;
  z-index: -1;
}
/* Fine white dot grid on the band, fading out towards the bottom */
.login-bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
/* Cyan glow at the bottom edge of the band, behind the card */
.login-bg-glow {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 56rem;
  height: 28rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(22, 192, 239, 0.3);
  filter: blur(64px);
}
/* Soft navy glow in the bottom-left corner */
.login-bg-blob {
  position: absolute;
  left: -12rem;
  bottom: -14rem;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  background: rgba(4, 21, 73, 0.07);
  filter: blur(64px);
  z-index: -1;
}
/* Very fine grain over the whole page */
.login-bg-grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(42, 56, 68, 0.055) 1px, transparent 0);
  background-size: 3px 3px;
  background-position: 3px 3px;
  pointer-events: none;
  z-index: -1;
}

/* ---------- Column: logo, card, footer ---------- */
.login-column {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-logo {
  display: inline-flex;
  color: #ffffff;
  margin-bottom: 24px;
  border-radius: 6px;
}
.login-logo svg {
  height: 36px;
  width: auto;
}

/* ---------- Card ---------- */
.login-card {
  width: 100%;
  background: var(--login-card);
  border: 1px solid var(--login-border);
  border-radius: var(--login-radius-card);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: login-rise 0.3s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .login-card {
    animation: none;
  }
}

.login-card-header {
  padding: 24px;
  text-align: center;
}
.login-card-header h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: var(--login-text);
}
.login-card-header p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--login-muted);
}

.login-card-body {
  padding: 0 24px 32px;
}

/* ---------- Messages (session expired / sign-in error) ---------- */
.login-alert {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: var(--login-radius-field);
  font-size: 13.5px;
  line-height: 1.45;
}
.login-alert[hidden] {
  display: none;
}
.login-alert-error {
  color: var(--login-error);
  background: var(--login-error-bg);
  border: 1px solid rgba(198, 40, 40, 0.2);
}
.login-alert-info {
  color: var(--login-navy);
  background: var(--login-info-bg);
  border: 1px solid rgba(22, 192, 239, 0.3);
}

/* ---------- Fields ---------- */
.login-field {
  margin-bottom: 24px;
}
.login-field-password {
  margin-bottom: 20px;
}
.login-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  color: var(--login-text);
}
/* Password label with "Forgot password?" on the right */
.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
  margin-bottom: 8px;
}
.login-label-row label {
  margin-bottom: 0;
}

.login-input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  color: var(--login-text);
  background: transparent;
  border: 1px solid var(--login-border);
  border-radius: var(--login-radius-field);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-input:focus {
  border-color: var(--login-cyan);
  box-shadow: 0 0 0 3px rgba(22, 192, 239, 0.2);
}
.login-input.is-invalid {
  border-color: rgba(198, 40, 40, 0.6);
}

/* Password field with the eye button inside it */
.login-password-wrap {
  position: relative;
}
.login-password-wrap .login-input {
  padding-right: 44px;
}
.login-eye {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--login-text);
  cursor: pointer;
  border-radius: var(--login-radius-field);
}
.login-eye .eye-closed,
.login-eye.is-showing .eye-open {
  display: none;
}
.login-eye.is-showing .eye-closed {
  display: block;
}

/* "Keep me signed in" */
.login-check {
  display: flex; /* block-level flex so the row is exactly 16px tall (inline-flex picked up extra line spacing) */
  width: max-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 16px;
  color: var(--login-text);
  cursor: pointer;
}
.login-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid var(--login-border);
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.login-check input::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.login-check input:checked {
  background: var(--login-cyan);
  border-color: var(--login-cyan);
}
.login-check input:checked::after {
  opacity: 1;
}

/* ---------- Sign in button ---------- */
.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--login-cyan);
  border: 0;
  border-radius: var(--login-radius-field);
  cursor: pointer;
  transition: background-color 0.15s;
}
.login-submit:hover {
  background: var(--login-cyan-hover);
}
/* "Signing in…" while the form is being sent */
.login-submit-busy,
.login-submit.is-busy .login-submit-text {
  display: none;
}
.login-submit.is-busy .login-submit-busy {
  display: inline;
}

/* ---------- Links ---------- */
.login-link-strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--login-navy);
  text-decoration: none;
}
.login-link-strong:hover {
  text-decoration: underline;
}

.login-signup {
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: var(--login-muted);
}
.login-signup .login-link-strong {
  color: var(--login-text);
}

/* Keyboard focus ring for links and buttons */
.login-page a:focus-visible,
.login-page button:focus-visible,
.login-check input:focus-visible {
  outline: 2px solid var(--login-cyan);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */
.login-footer {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}
.login-footer a {
  font-size: 12px;
  line-height: 24px;
  color: var(--login-muted);
  text-decoration: none;
}
.login-footer a:hover {
  color: var(--login-text);
  text-decoration: underline;
}

/* ---------- Phones ---------- */
@media (max-width: 480px) {
  .login-card-header {
    padding: 20px 20px 16px;
  }
  .login-card-body {
    padding: 0 20px 20px;
  }
  /* 16px on phones: iPhone Safari zooms the page in when a field with text smaller than 16px is tapped */
  .login-input {
    font-size: 16px;
  }
}
