:root {
  --navy: #07194d;
  --navy-soft: #18316e;
  --blue: #315cf5;
  --cyan: #20c9c2;
  --muted: #6f81aa;
  --line: #d6deeb;
  --surface: rgba(255, 255, 255, 0.94);
  --shadow: 0 24px 70px rgba(27, 67, 125, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f4faff;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--navy);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

button,
input {
  font: inherit;
}

button,
label,
input[type="checkbox"] {
  -webkit-tap-highlight-color: transparent;
}

.login-page {
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(250, 253, 255, 0.08), rgba(250, 253, 255, 0.08)),
    url("./login-background.8365b77a9152.png") center / cover fixed no-repeat;
}

.login-page::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(247, 252, 255, 0.16);
  content: "";
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1480px, calc(100% - 64px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 48px 0;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.78fr);
  align-items: center;
  gap: clamp(48px, 7vw, 112px);
}

.login-intro {
  min-width: 0;
}

.intro-logo {
  display: block;
  width: 132px;
  height: auto;
  margin-bottom: 40px;
}

.intro-copy {
  max-width: 720px;
}

.intro-copy h1,
.auth-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.intro-copy h1 {
  font-size: clamp(42px, 4.2vw, 66px);
  line-height: 1.04;
}

.intro-copy p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 1.55vw, 25px);
  line-height: 1.4;
}

.funnel-stage {
  position: relative;
  width: min(100%, 790px);
  height: 390px;
  margin-top: 30px;
}

.signal-card,
.insight-card {
  position: absolute;
  border: 1px solid rgba(217, 227, 241, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 35px rgba(49, 90, 150, 0.1);
  backdrop-filter: blur(12px);
}

.signal-card {
  left: 0;
  display: flex;
  width: 215px;
  min-height: 88px;
  padding: 16px;
  align-items: center;
  gap: 12px;
}

.signal-card--telegram {
  top: 30px;
}

.signal-card--max {
  top: 190px;
  left: 18px;
}

.signal-card strong,
.signal-card small {
  display: block;
}

.signal-card strong {
  font-size: 13px;
}

.signal-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.channel-badge {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.channel-badge--telegram {
  background: #269bdc;
}

.channel-badge--max {
  background: #5755e7;
}

.funnel-visual {
  position: absolute;
  top: 0;
  left: 215px;
  display: grid;
  width: 390px;
  justify-items: center;
  gap: 8px;
}

.funnel-step {
  display: grid;
  height: 82px;
  padding: 14px 24px;
  place-content: center;
  text-align: center;
  clip-path: polygon(4% 0, 96% 0, 87% 100%, 13% 100%);
}

.funnel-step span,
.funnel-step strong {
  display: block;
}

.funnel-step span {
  margin-bottom: 2px;
  color: #2d5fa2;
  font-size: 12px;
  text-transform: uppercase;
}

.funnel-step strong {
  font-size: 24px;
}

.funnel-step--one {
  width: 100%;
  background: rgba(188, 215, 255, 0.72);
}

.funnel-step--two {
  width: 82%;
  background: rgba(171, 239, 236, 0.75);
}

.funnel-step--three {
  width: 64%;
  background: rgba(211, 201, 255, 0.72);
}

.funnel-step--four {
  width: 44%;
  background: rgba(173, 239, 229, 0.8);
}

.insight-card {
  right: 0;
  width: 190px;
  padding: 18px;
}

.insight-card span,
.insight-card strong,
.insight-card small {
  display: block;
}

.insight-card span {
  font-size: 13px;
}

.insight-card strong {
  margin-top: 5px;
  font-size: 25px;
}

.insight-card small {
  margin-top: 4px;
  color: #0e9e92;
  font-size: 12px;
}

.conversion-card {
  top: 42px;
  min-height: 150px;
}

.active-card {
  top: 224px;
  min-height: 116px;
}

.sparkline {
  display: flex;
  height: 36px;
  margin-top: 10px;
  align-items: end;
  gap: 7px;
}

.sparkline i {
  width: 16px;
  border-top: 2px solid #69acf1;
  background: linear-gradient(to top, rgba(105, 172, 241, 0.08), rgba(105, 172, 241, 0.42));
}

.mini-bars {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  height: 44px;
  align-items: end;
  gap: 6px;
}

.mini-bars i {
  width: 10px;
  border-radius: 4px 4px 0 0;
  background: #91bdf6;
}

.mini-bars i:nth-child(1) { height: 25%; }
.mini-bars i:nth-child(2) { height: 42%; }
.mini-bars i:nth-child(3) { height: 58%; }
.mini-bars i:nth-child(4) { height: 76%; }
.mini-bars i:nth-child(5) { height: 100%; }

.intro-note {
  margin: 10px 0 0;
  color: #8394b5;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-panel {
  width: 100%;
  min-width: 0;
  max-width: 530px;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.auth-panel__inner {
  min-width: 0;
  padding: clamp(34px, 4.2vw, 62px);
}

.auth-logo {
  display: block;
  width: 118px;
  height: auto;
  margin: 0 auto 36px;
}

.auth-header {
  margin-bottom: 30px;
  text-align: center;
}

.auth-header h2 {
  font-size: clamp(29px, 2.5vw, 37px);
}

.auth-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.form-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #f0b9bb;
  border-radius: 8px;
  background: #fff2f2;
  color: #9e2b31;
  font-size: 14px;
  line-height: 1.4;
}

.login-form {
  display: grid;
  min-width: 0;
  gap: 19px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 650;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  max-width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input::placeholder {
  color: #98a6c1;
}

.field input:hover {
  border-color: #aebbd0;
}

.field input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(49, 92, 245, 0.12);
}

.field input[aria-invalid="true"] {
  border-color: #ca565b;
}

.field-error {
  color: #a92f35;
  font-size: 12px;
}

.password-field {
  position: relative;
  width: 100%;
  min-width: 0;
}

.password-field input {
  padding-right: 92px !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  height: 38px;
  padding: 0 10px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.password-toggle:focus-visible {
  border-radius: 6px;
  outline: 3px solid rgba(49, 92, 245, 0.2);
}

.remember {
  display: inline-flex;
  width: fit-content;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  color: var(--navy-soft);
  cursor: pointer;
  font-size: 14px;
}

.remember input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--blue);
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(100deg, var(--blue), #2e83e8 55%, var(--cyan));
  box-shadow: 0 12px 28px rgba(49, 92, 245, 0.2);
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 750;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(49, 92, 245, 0.25);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:focus-visible {
  outline: 4px solid rgba(49, 92, 245, 0.22);
  outline-offset: 3px;
}

.submit-arrow {
  font-size: 25px;
  line-height: 1;
}

.access-note {
  margin: 30px 0 0;
  padding-top: 24px;
  border-top: 1px solid #e0e6f0;
  color: #8695b2;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1180px) {
  .login-shell {
    width: min(1120px, calc(100% - 48px));
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.82fr);
    gap: 42px;
  }

  .funnel-stage {
    transform: scale(0.88);
    transform-origin: left top;
  }
}

@media (max-width: 920px) {
  .login-page {
    background-attachment: scroll;
  }

  .login-shell {
    width: min(720px, calc(100% - 40px));
    padding: 32px 0 48px;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .auth-panel {
    max-width: 560px;
    justify-self: center;
    order: -1;
  }

  .login-intro {
    max-width: 680px;
    margin: 0 auto;
  }

  .intro-logo {
    display: none;
  }

  .intro-copy {
    text-align: center;
  }

  .intro-copy h1 {
    font-size: 42px;
  }

  .intro-copy p {
    margin-right: auto;
    margin-left: auto;
    font-size: 18px;
  }

  .funnel-stage {
    margin-right: auto;
    margin-left: auto;
    transform: scale(0.84);
    transform-origin: top center;
  }

  .intro-note {
    text-align: center;
  }
}

@media (max-width: 680px) {
  .login-shell {
    width: min(calc(100% - 24px), 500px);
    min-height: 100svh;
    padding: 12px 0;
    place-items: center;
  }

  .login-intro {
    display: none;
  }

  .auth-panel {
    width: 100%;
    max-width: none;
  }

  .auth-panel__inner {
    padding: 30px 22px;
  }

  .auth-logo {
    width: 104px;
    margin-bottom: 26px;
  }

  .auth-header {
    margin-bottom: 24px;
  }

  .auth-header h2 {
    font-size: 28px;
  }

  .auth-header p {
    font-size: 14px;
  }

  .field input[type="text"],
  .field input[type="password"] {
    height: 52px;
    font-size: 16px;
  }

  .remember {
    min-height: 44px;
  }

  .submit-button {
    min-height: 54px;
  }

  .access-note {
    margin-top: 24px;
    padding-top: 20px;
  }
}

@media (max-width: 380px) {
  .login-shell {
    width: calc(100% - 16px);
  }

  .auth-panel__inner {
    padding: 26px 16px;
  }

  .password-field input {
    padding-right: 82px !important;
  }

  .password-toggle {
    right: 4px;
    padding: 0 8px;
  }
}

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