:root {
  --auth-text: #151a36;
  --auth-muted: #8d94aa;
  --auth-line: #e8ebf3;
  --auth-surface: #ffffff;
  --auth-bg: #f7f9fd;
  --auth-primary: #376ff1;
  --auth-purple: #7d34ed;
  --auth-turquoise: #37c8d3;
  --auth-green: #42c7a5;
  --auth-danger: #ef476f;
  --auth-shadow: 0 24px 70px rgba(39, 59, 112, .14);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.auth-page {
  margin: 0;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 7% 10%, rgba(55, 200, 211, .12), transparent 24rem),
    radial-gradient(circle at 92% 87%, rgba(125, 52, 237, .10), transparent 27rem),
    var(--auth-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-layout {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  overflow: hidden;
  border: 1px solid rgba(226, 231, 242, .9);
  border-radius: 30px;
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow);
}

.auth-visual {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px;
  color: #fff;
  background: linear-gradient(145deg, #2bc6d4 0%, #4389e9 48%, #8a34e8 100%);
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  width: 360px;
  height: 360px;
  top: -150px;
  right: -150px;
  background: rgba(255, 255, 255, .13);
}

.auth-visual::after {
  width: 270px;
  height: 270px;
  left: -125px;
  bottom: -100px;
  border: 1px solid rgba(255, 255, 255, .20);
  background: rgba(255, 255, 255, .06);
}

.auth-grid-pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .24;
  background-image:
    linear-gradient(rgba(255,255,255,.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.15) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 84%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 84%);
}

.auth-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 18px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 14px 32px rgba(26, 53, 133, .16);
}

.auth-brand img {
  display: block;
  width: min(245px, 100%);
  height: auto;
  max-height: 62px;
  object-fit: contain;
}

.auth-visual-copy { max-width: 390px; }

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.auth-eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #76ffcf;
  box-shadow: 0 0 0 6px rgba(118, 255, 207, .17);
}

.auth-visual h2 {
  margin: 0;
  font-size: clamp(33px, 4.2vw, 50px);
  line-height: 1.08;
  letter-spacing: -1.6px;
}

.auth-visual p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  line-height: 1.65;
}

.auth-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.auth-benefit {
  min-width: 0;
  padding: 13px 11px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 15px;
  background: rgba(255, 255, 255, .11);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.auth-benefit svg {
  width: 20px;
  height: 20px;
  margin-bottom: 7px;
}

.auth-benefit strong,
.auth-benefit span { display: block; }

.auth-benefit strong {
  font-size: 12px;
  line-height: 1.25;
}

.auth-benefit span {
  margin-top: 3px;
  color: rgba(255, 255, 255, .67);
  font-size: 10px;
}

.auth-visual-footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, .64);
  font-size: 12px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px clamp(34px, 5vw, 72px);
  background: rgba(255, 255, 255, .96);
}

.auth-form-wrap { width: min(430px, 100%); }

.auth-mobile-brand { display: none; }

.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 25px;
  color: #7e879f;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}

.auth-back-home:hover {
  color: var(--auth-primary);
  transform: translateX(-2px);
}

.auth-back-home svg { width: 17px; height: 17px; }

.auth-heading { margin-bottom: 29px; }

.auth-heading-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 7px 11px;
  color: #4a70db;
  border-radius: 999px;
  background: #eef4ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.auth-heading-badge svg { width: 15px; height: 15px; }

.auth-heading h1 {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(29px, 3.2vw, 39px);
  line-height: 1.12;
  letter-spacing: -1.15px;
}

.auth-heading p {
  margin: 11px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-heading a,
.auth-form-meta a,
.auth-bottom-link a {
  color: #536ff0;
  font-weight: 750;
  text-decoration: none;
}

.auth-heading a:hover,
.auth-form-meta a:hover,
.auth-bottom-link a:hover { text-decoration: underline; }

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-field {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field-icon {
  position: absolute;
  left: 17px;
  z-index: 1;
  display: inline-flex;
  color: #98a1b8;
  pointer-events: none;
}

.auth-field-icon svg { width: 20px; height: 20px; }

.auth-field input {
  width: 100%;
  height: 58px;
  padding: 0 52px 0 51px;
  color: var(--auth-text);
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  outline: none;
  background: #fbfcff;
  font: inherit;
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-field input::placeholder { color: #adb4c5; }

.auth-field input:focus {
  border-color: rgba(61, 123, 238, .65);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(61, 123, 238, .10);
}

.auth-password-toggle {
  position: absolute;
  right: 11px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #98a1b8;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
}

.auth-password-toggle:hover { color: #526ff1; background: #eef3ff; }
.auth-password-toggle svg { width: 19px; height: 19px; }

.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 22px;
  margin-top: -1px;
  font-size: 13px;
}

.auth-submit {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 3px;
  padding: 0 23px;
  overflow: hidden;
  color: #fff;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(110deg, #30c6d2 0%, #3f88e8 48%, #8538e9 100%);
  box-shadow: 0 14px 28px rgba(73, 105, 224, .24);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.auth-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.20) 48%, transparent 75%);
  transform: translateX(-115%);
  transition: transform .65s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(73, 105, 224, .31);
  filter: saturate(1.06);
}

.auth-submit:hover::before { transform: translateX(115%); }
.auth-submit svg { width: 20px; height: 20px; }

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 17px;
  padding: 12px 14px;
  color: #7f889e;
  border-radius: 13px;
  background: #f7f9fd;
  font-size: 11px;
  line-height: 1.55;
}

.auth-note svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: #48bda8;
}

.auth-bottom-link {
  margin: 21px 0 0;
  color: #8f96aa;
  font-size: 13px;
  text-align: center;
}

.auth-security-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  color: #abb1c0;
  font-size: 10px;
}

.auth-security-row svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .auth-shell { padding: 0; display: block; }
  .auth-layout {
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .auth-visual { display: none; }
  .auth-panel {
    min-height: 100vh;
    min-height: 100dvh;
    align-items: flex-start;
    padding: max(28px, env(safe-area-inset-top)) 22px max(30px, env(safe-area-inset-bottom));
  }
  .auth-form-wrap { width: min(480px, 100%); margin: auto; }
  .auth-mobile-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 31px;
  }
  .auth-mobile-brand a:first-child {
    display: inline-flex;
    max-width: 245px;
  }
  .auth-mobile-brand img {
    display: block;
    width: 100%;
    max-height: 63px;
    object-fit: contain;
  }
  .auth-home-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    color: #66718b;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(50, 68, 116, .08);
  }
  .auth-home-icon svg { width: 20px; height: 20px; }
  .auth-back-home { display: none; }
}

@media (max-width: 520px) {
  .auth-panel { padding-left: 18px; padding-right: 18px; }
  .auth-mobile-brand { margin-bottom: 25px; }
  .auth-mobile-brand a:first-child { max-width: 220px; }
  .auth-heading { margin-bottom: 23px; }
  .auth-heading h1 { font-size: 29px; }
  .auth-heading p { font-size: 13px; }
  .auth-form { gap: 13px; }
  .auth-field input { height: 55px; border-radius: 15px; }
  .auth-submit { min-height: 55px; border-radius: 15px; }
}

@media (max-height: 720px) and (min-width: 901px) {
  .auth-shell { padding: 16px; }
  .auth-layout { min-height: 590px; }
  .auth-visual, .auth-panel { padding-top: 30px; padding-bottom: 30px; }
}
