:root {
  color-scheme: light;
  --login-text: #30333f;
  --login-muted: #717586;
  --login-surface: rgba(255,255,255,.86);
  --login-surface-strong: #fff;
  --login-line: rgba(111,119,163,.22);
  --login-blue: #789be8;
  --login-pink: #ed8dbe;
  --login-purple: #a87de7;
  --login-error: #b74162;
  --login-success: #347968;
  font-family: "Manrope",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #f4f6fc; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 12%,rgba(120,155,232,.16),transparent 34%),
    radial-gradient(circle at 91% 88%,rgba(237,141,190,.15),transparent 37%),
    linear-gradient(145deg,#f4f7fe 0%,#fffafc 53%,#f8f3fe 100%);
  color: var(--login-text);
}

button,input { font: inherit; }

.login-ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .48;
  pointer-events: none;
}

.login-ambient-one {
  top: -125px;
  left: -105px;
  width: 330px;
  height: 330px;
  background: linear-gradient(145deg,rgba(120,155,232,.26),rgba(168,125,231,.06));
}

.login-ambient-two {
  right: -135px;
  bottom: -155px;
  width: 390px;
  height: 390px;
  background: linear-gradient(145deg,rgba(237,141,190,.2),rgba(168,125,231,.12));
}

.login-shell {
  display: grid;
  min-height: 100vh;
  padding: 34px 22px;
  place-items: center;
}

.login-card {
  position: relative;
  width: min(100%,450px);
  overflow: hidden;
  padding: 38px;
  border: 1px solid var(--login-line);
  border-radius: 28px;
  background: var(--login-surface);
  box-shadow: 0 26px 70px rgba(60,64,98,.12);
  backdrop-filter: blur(22px) saturate(1.15);
}

.login-card-accent {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg,var(--login-blue),var(--login-purple),var(--login-pink));
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}

.login-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid rgba(120,155,232,.34);
  border-radius: 18px;
  background: linear-gradient(145deg,rgba(120,155,232,.14),rgba(237,141,190,.11));
  color: #6d78bd;
  place-items: center;
}

.login-icon svg { width: 25px; height: 25px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }

.login-eyebrow {
  margin: 0 0 5px;
  background: linear-gradient(90deg,#587ecc,#9b60c6,#c65b96);
  background-clip: text;
  color: transparent;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

h1 { margin: 0; font-size: clamp(1.65rem,5vw,2.08rem); line-height: 1.08; }

.login-intro {
  margin: 25px 0 26px;
  color: var(--login-muted);
  font-size: .95rem;
  line-height: 1.65;
}

.login-form { display: grid; }
.login-form > label { margin-bottom: 9px; color: #555968; font-size: .79rem; font-weight: 750; }

.password-field { position: relative; }

.password-field input {
  width: 100%;
  height: 52px;
  padding: 0 52px 0 16px;
  border: 1px solid rgba(105,112,148,.28);
  border-radius: 15px;
  outline: 0;
  background: rgba(255,255,255,.9);
  color: var(--login-text);
  transition: border-color 150ms ease,box-shadow 150ms ease,background 150ms ease;
}

.password-field input:hover { border-color: rgba(120,126,166,.48); }
.password-field input:focus { border-color: var(--login-blue); box-shadow: 0 0 0 4px rgba(120,155,232,.14); background: var(--login-surface-strong); }
.password-field input[aria-invalid="true"] { border-color: rgba(183,65,98,.72); box-shadow: 0 0 0 4px rgba(183,65,98,.1); }

.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #7b8092;
  cursor: pointer;
  place-items: center;
}

.password-toggle:hover,.password-toggle:focus-visible { background: rgba(120,155,232,.1); color: #606ca8; outline: 0; }
.password-toggle svg { width: 20px; height: 20px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.password-toggle .eye-closed { display: none; }
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.login-status {
  min-height: 21px;
  margin: 8px 2px 7px;
  color: var(--login-error);
  font-size: .76rem;
  font-weight: 650;
  line-height: 1.45;
}

.login-status[data-state="success"] { color: var(--login-success); }

.login-submit {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(105deg,#718fe0,#9b70d4 55%,#dc7bad);
  box-shadow: 0 12px 25px rgba(127,107,193,.2);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: filter 150ms ease,transform 150ms ease,box-shadow 150ms ease;
}

.login-submit:hover { filter: saturate(1.08) brightness(1.02); transform: translateY(-1px); box-shadow: 0 15px 29px rgba(127,107,193,.24); }
.login-submit:focus-visible { outline: 3px solid rgba(113,143,224,.28); outline-offset: 3px; }
.login-submit:disabled { cursor: wait; filter: grayscale(.12); opacity: .68; transform: none; }
.login-submit svg { width: 19px; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }

.login-security {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 25px;
  padding-top: 19px;
  border-top: 1px solid var(--login-line);
  color: var(--login-muted);
  font-size: .72rem;
  line-height: 1.5;
}

.login-security svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; stroke: #7186c3; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }

@media (max-width:520px) {
  .login-shell { padding: 18px 13px; }
  .login-card { padding: 31px 23px 27px; border-radius: 23px; }
  .login-heading { align-items: flex-start; }
  .login-icon { width: 47px; height: 47px; border-radius: 16px; }
  .login-intro { margin-top: 22px; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
