/* CareDesk login landing — brand-first, full-bleed hero */

.cd-login-body {
  margin: 0;
  min-height: 100vh;
  background: #0a2438;
  font-family: "Manrope", system-ui, sans-serif;
  color: #0b2f4a;
  overflow-x: hidden;
}

.cd-login-body #loading {
  background: #ffffff url("../images/loader-caredesk.png") no-repeat scroll center center !important;
  background-size: 90px auto !important;
}

.cd-login {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 480px);
  min-height: 100vh;
}

/* —— Hero —— */
.cd-login-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
}

.cd-login-hero__media {
  position: absolute;
  inset: 0;
  background-image: var(--cd-hero);
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.06);
  animation: cd-hero-drift 22s ease-in-out infinite alternate;
  z-index: 0;
}

.cd-login-hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(8, 28, 46, 0.82) 0%, rgba(11, 47, 74, 0.55) 42%, rgba(10, 36, 56, 0.28) 70%, rgba(10, 36, 56, 0.5) 100%),
    linear-gradient(0deg, rgba(8, 28, 46, 0.75) 0%, transparent 45%);
}

.cd-login-hero__content {
  position: relative;
  z-index: 2;
  max-width: 34rem;
  animation: cd-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cd-login-brand {
  display: inline-block;
  margin-bottom: 1.75rem;
}

.cd-login-brand img {
  display: block;
  height: clamp(52px, 7vw, 72px);
  width: auto;
  max-width: min(280px, 70vw);
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  padding: 0.55rem 0.85rem;
}

.cd-login-headline {
  margin: 0 0 1rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.35rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #f4f8fc;
}

.cd-login-headline em {
  font-style: italic;
  color: #b8e08a;
}

.cd-login-lede {
  margin: 0;
  max-width: 28rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(244, 248, 252, 0.82);
  font-weight: 400;
}

/* —— Sign-in panel —— */
.cd-login-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(109, 191, 63, 0.12), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
  animation: cd-panel-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.cd-login-panel__inner {
  width: 100%;
  max-width: 360px;
}

.cd-login-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a6fa8;
}

.cd-login-title {
  margin: 0 0 0.4rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  color: #0b2f4a;
  letter-spacing: -0.02em;
}

.cd-login-sub {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #5a6d7e;
}

.cd-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.cd-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0b2f4a;
}

.cd-field input,
.cd-password input {
  width: 100%;
  height: 48px;
  padding: 0 0.95rem;
  border: 1px solid #c9d5e2;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0b2f4a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cd-field input:focus,
.cd-password input:focus {
  outline: none;
  border-color: #1a6fa8;
  box-shadow: 0 0 0 3px rgba(26, 111, 168, 0.18);
}

.cd-password {
  position: relative;
}

.cd-password input {
  padding-right: 3rem;
}

.cd-password__toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48px;
  border: 0;
  background: transparent;
  color: #5a6d7e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cd-password__toggle:hover {
  color: #0b2f4a;
}

.cd-login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
}

.cd-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: #5a6d7e;
  cursor: pointer;
}

.cd-remember input {
  width: 1rem;
  height: 1rem;
  accent-color: #0b2f4a;
}

.cd-login-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.55rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(100deg, #0b2f4a 0%, #1a6fa8 100%);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 10px 24px rgba(11, 47, 74, 0.28);
}

.cd-login-btn:hover,
.cd-login-btn:focus {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 28px rgba(11, 47, 74, 0.32);
}

.cd-login-btn:active {
  transform: translateY(0);
}

.cd-login-foot {
  margin: 2.25rem 0 0;
  font-size: 0.78rem;
  color: #8a9bab;
  letter-spacing: 0.02em;
}

@keyframes cd-hero-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

@keyframes cd-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cd-panel-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 900px) {
  .cd-login {
    grid-template-columns: 1fr;
  }

  .cd-login-hero {
    min-height: 42vh;
    padding: 1.5rem 1.25rem 2rem;
    align-items: flex-end;
  }

  .cd-login-headline {
    font-size: clamp(1.9rem, 7vw, 2.5rem);
  }

  .cd-login-panel {
    min-height: 58vh;
    animation-name: cd-rise;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cd-login-hero__media,
  .cd-login-hero__content,
  .cd-login-panel {
    animation: none !important;
  }

  .cd-login-hero__media {
    transform: none;
  }
}
