:root{
  --bg: #f8fafc;
  --surface: rgba(255,255,255,.92);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.10);
  --line-strong: rgba(15, 23, 42, 0.14);

  --pistachio: #97d8c6;
  --aqua: #7fd3cf;
  --lilac: #b7a7c8;
  --peach-red: #f2a3a7;
  --slate-soft: #1f2937;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-md: 0 18px 45px rgba(2, 6, 23, 0.10);
  --shadow-sm: 0 10px 24px rgba(2, 6, 23, 0.06);
  --focus-ring: 0 0 0 4px rgba(127, 211, 207, 0.18);
  --success-soft: rgba(151,216,198,.18);
  --success-text: #166534;
  --danger-soft: rgba(242,163,167,.18);
  --danger-text: #b42318;
}

*{
  box-sizing: border-box;
}

html,
body{
  height: 100%;
}

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-shell{
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(151,216,198,.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(183,167,200,.14), transparent 30%),
    linear-gradient(180deg, #fcfdff 0%, #f8fafc 100%);
}

.auth-shell__bg{
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(151,216,198,.08), transparent 25%),
    linear-gradient(315deg, rgba(127,211,207,.06), transparent 20%);
}

.auth-login{
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 440px);
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.auth-login--wide{
  grid-template-columns: minmax(280px, 1fr) minmax(380px, 500px);
}

.auth-simple{
  width: min(520px, 100%);
  position: relative;
  z-index: 1;
}

.auth-panel{
  position: relative;
}

.auth-panel--aside{
  padding: 18px 8px 18px 8px;
}

.auth-brand{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.auth-brand__mark{
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pistachio), var(--aqua));
  color: var(--slate-soft);
  font-weight: 900;
  font-size: 22px;
  box-shadow: var(--shadow-sm);
}

.auth-brand__meta{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-brand__eyebrow{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-brand__title{
  font-size: 18px;
  line-height: 1.2;
  color: var(--text);
}

.auth-copy h1{
  margin: 0;
  max-width: 560px;
  font-size: clamp(2rem, 3.2vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--text);
}

.auth-copy p{
  margin: 18px 0 0;
  max-width: 540px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.auth-points{
  display: grid;
  gap: 14px;
  margin-top: 30px;
  max-width: 460px;
}

.auth-point{
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.82);
}

.auth-point__dot{
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pistachio), var(--lilac));
  box-shadow: 0 0 0 4px rgba(151,216,198,.14);
}

.auth-panel--form{
  display: flex;
  justify-content: center;
}

.login-card{
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.login-card--compact{
  max-width: 520px;
  margin: 0 auto;
}

.login-card__topbar{
  height: 6px;
  background: linear-gradient(90deg, var(--pistachio), var(--aqua), var(--lilac));
}

.login-card__body{
  padding: 28px 28px 24px;
}

.login-head{
  margin-bottom: 18px;
}

.login-head__eyebrow{
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-head__title{
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text);
}

.login-head__text{
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.auth-status{
  margin-bottom: 16px;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--success-soft);
  color: var(--success-text);
  border: 1px solid rgba(151,216,198,.38);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-note{
  margin-bottom: 18px;
  border-radius: 16px;
  padding: 14px 15px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.76);
  font-size: 13px;
  line-height: 1.65;
}

.auth-note--success{
  background: var(--success-soft);
  color: var(--success-text);
  border-color: rgba(151,216,198,.38);
}

.form{
  margin-top: 0;
}

.field{
  margin-top: 14px;
}

.field:first-child{
  margin-top: 0;
}

.field__label{
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.90);
}

.control{
  position: relative;
}

.input{
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.92);
  color: var(--text);
  outline: none;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}

.input::placeholder{
  color: rgba(15, 23, 42, 0.35);
}

.input:hover{
  border-color: rgba(15, 23, 42, 0.20);
}

.input:focus{
  border-color: rgba(127, 211, 207, 0.85);
  box-shadow: var(--focus-ring);
  background: var(--surface-strong);
}

.input.is-invalid{
  border-color: rgba(242, 163, 167, .95);
  box-shadow: 0 0 0 4px rgba(242,163,167,.14);
}

.control--pw{
  position: relative;
}

.input--pw{
  padding-right: 52px;
}

.pw-toggle{
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(31, 41, 55, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color .15s ease,
    color .15s ease,
    transform .12s ease;
}

.pw-toggle:hover{
  background: rgba(151,216,198,.22);
  color: rgba(15, 23, 42, 0.92);
}

.pw-toggle:active{
  transform: translateY(-50%) scale(0.96);
}

.pw-toggle:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
}

.pw-ico{
  display: block;
}

.pw-ico--eyeoff{
  display: none;
}

.pw-toggle.is-on{
  background: rgba(242,163,167,.16);
  color: rgba(15, 23, 42, 0.92);
}

.pw-toggle.is-on .pw-ico--eye{
  display: none;
}

.pw-toggle.is-on .pw-ico--eyeoff{
  display: block;
}

.row{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.row--end{
  justify-content: flex-end;
}

.remember{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.remember input{
  accent-color: var(--pistachio);
}

.link{
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.82);
  text-decoration: none;
}

.link:hover{
  color: rgba(15, 23, 42, 1);
  text-decoration: underline;
}

.btn{
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(151,216,198,.98), rgba(127,211,207,.95));
  color: rgba(15, 23, 42, 0.95);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 16px 26px rgba(127,211,207,.20);
  transition:
    transform .12s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(127,211,207,.24);
  filter: brightness(1.01);
}

.btn:active{
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(127,211,207,.18);
}

.btn--muted{
  background: #fff;
  box-shadow: none;
  border-color: rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.82);
}

.btn--muted:hover{
  box-shadow: var(--shadow-sm);
}

.error{
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(210, 77, 87, .96);
}

.cta{
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(15, 23, 42, 0.60);
}

.cta a{
  color: rgba(15, 23, 42, 0.88);
  font-weight: 800;
  text-decoration: none;
}

.cta a:hover{
  text-decoration: underline;
}

.auth-actions{
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.auth-actions__inline{
  display: grid;
  gap: 12px;
}

.auth-actions__footer{
  margin-top: 12px;
  text-align: center;
}

@media (min-width: 481px){
  .auth-actions__inline{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px){
  .auth-login,
  .auth-login--wide{
    grid-template-columns: 1fr;
    gap: 22px;
    max-width: 520px;
  }

  .auth-panel--aside{
    padding: 0;
  }

  .auth-copy h1{
    font-size: clamp(1.9rem, 7vw, 2.5rem);
    max-width: none;
  }

  .auth-copy p,
  .auth-points{
    max-width: none;
  }
}

@media (max-width: 640px){
  .auth-shell{
    padding: 18px 14px;
  }

  .auth-panel--aside{
    display: none;
  }

  .login-card__body{
    padding: 22px 18px 20px;
  }

  .login-head__title{
    font-size: 24px;
  }

  .row{
    align-items: flex-start;
    flex-direction: column;
  }

  .row--end{
    align-items: stretch;
  }

  .link{
    font-size: 12.5px;
  }

  .auth-actions__inline{
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}