:root {
  color-scheme: light;
  --font-ui: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-border: rgba(255, 255, 255, 0.76);
  --text: #16202d;
  --muted: #637083;
  --primary: #22c875;
  --primary-dark: #18ad62;
  --blue: #0b66c3;
  --blue-dark: #0753a0;
  --line: #ced8e4;
  --danger: #b42318;
  --shadow: 0 28px 70px rgba(4, 29, 62, 0.3);
  --login-bg: url("/static/login-landscapes/landscape-01.jpg");
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(3, 18, 42, 0.68), rgba(8, 47, 86, 0.24) 48%, rgba(4, 23, 43, 0.28)),
    radial-gradient(circle at 36% 52%, rgba(6, 95, 172, 0.16), transparent 38%),
    var(--login-bg) center / cover no-repeat,
    #0d5cab;
  color: var(--text);
  font: 15px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.loginShell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 424px) minmax(24px, 13vw);
  align-items: center;
  gap: 32px;
  padding: 48px;
}

.brandStage {
  justify-self: end;
  width: min(560px, 100%);
  color: #ffffff;
  text-shadow: 0 6px 24px rgba(0, 22, 62, 0.26);
}

.brandLockup {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brandMark {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid #cfe0f2;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #ffffff 0%, #eef6ff 58%, #dfeeff 100%);
  box-shadow: 0 18px 42px rgba(0, 26, 68, 0.22);
  overflow: hidden;
}

.loginBrandMark {
  width: 82px;
  height: 82px;
  border-radius: 20px;
}

.brandMark::before,
.brandMark::after {
  content: "";
  position: absolute;
  background: #f28c28;
}

.brandMark::before {
  width: 11px;
  height: 11px;
  right: 15px;
  top: 14px;
  border-radius: 3px;
}

.brandMark::after {
  width: 12px;
  height: 12px;
  left: 15px;
  bottom: 15px;
  border-radius: 50%;
}

.bar {
  position: absolute;
  bottom: 21px;
  width: 8px;
  border-radius: 7px 7px 3px 3px;
  background: var(--blue);
}

.b1 {
  left: 22px;
  height: 23px;
  opacity: 0.72;
}

.b2 {
  left: 33px;
  height: 37px;
  opacity: 0.86;
}

.b3 {
  left: 44px;
  height: 48px;
}

.b4 {
  left: 55px;
  height: 34px;
  opacity: 0.86;
}

.b5 {
  left: 66px;
  height: 20px;
  opacity: 0.72;
}

.trend {
  position: absolute;
  left: 19px;
  right: 14px;
  bottom: 21px;
  height: 28px;
  border-left: 4px solid transparent;
  border-bottom: 4px solid #f28c28;
  transform: skewY(-21deg);
  transform-origin: left bottom;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(44px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 800;
}

.brandLockup p {
  margin-top: 12px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
}

.authPanel {
  grid-column: 2;
  width: 100%;
  min-height: 462px;
  display: grid;
  align-items: center;
  padding: 54px 44px 40px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 254, 0.91));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.authForm {
  display: grid;
  gap: 16px;
}

.formHeader {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 12px;
  text-align: center;
}

.formLogo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  box-shadow: 0 11px 24px rgba(11, 102, 195, 0.16);
}

.formLogo::before {
  width: 8px;
  height: 8px;
  right: 11px;
  top: 10px;
}

.formLogo::after {
  width: 9px;
  height: 9px;
  left: 10px;
  bottom: 10px;
}

.formLogo .bar {
  bottom: 15px;
  width: 6px;
}

.formLogo .b1 {
  left: 15px;
  height: 17px;
}

.formLogo .b2 {
  left: 23px;
  height: 27px;
}

.formLogo .b3 {
  left: 31px;
  height: 35px;
}

.formLogo .b4 {
  left: 39px;
  height: 25px;
}

.formLogo .b5 {
  left: 47px;
  height: 15px;
}

.formLogo .trend {
  left: 14px;
  right: 10px;
  bottom: 15px;
  height: 20px;
  border-left-width: 3px;
  border-bottom-width: 3px;
}

.resetHeader {
  justify-items: start;
  text-align: left;
  gap: 16px;
  margin-bottom: 8px;
}

.resetHeader h2 {
  width: 100%;
  text-align: center;
}

.resetHeader p {
  color: #41536b;
  font-size: 16px;
  line-height: 1.45;
}

h2 {
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 600;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
button,
.bitrixLoginButton {
  min-height: 44px;
  border-radius: 6px;
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  padding: 0 15px;
}

input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(11, 102, 195, 0.16);
}

button,
.bitrixLoginButton {
  border: 0;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.primaryButton {
  margin-top: 2px;
  background: var(--primary);
  color: #ffffff;
}

.primaryButton:hover {
  background: var(--primary-dark);
}

.bitrixLoginButton {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
}

.bitrixLoginButton:hover {
  background: var(--blue-dark);
}

.bitrixLoginButton[hidden] {
  display: none;
}

.secondaryButton {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
}

.secondaryButton:hover {
  background: #ffffff;
}

.formActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}

.linkButton {
  min-height: 28px;
  padding: 0;
  background: transparent;
  color: #3d8df5;
  font-weight: 500;
}

.linkButton:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.message {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.message.error {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 900px) {
  .loginShell {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: 28px;
  }

  .brandStage,
  .authPanel {
    grid-column: 1;
    justify-self: center;
  }

  .brandStage {
    width: min(424px, 100%);
  }

  .loginBrandMark {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .loginBrandMark::before {
    width: 8px;
    height: 8px;
    right: 12px;
    top: 11px;
  }

  .loginBrandMark::after {
    width: 9px;
    height: 9px;
    left: 12px;
    bottom: 12px;
  }

  .loginBrandMark .bar {
    bottom: 16px;
    width: 6px;
  }

  .loginBrandMark .b1 { left: 17px; height: 18px; }
  .loginBrandMark .b2 { left: 26px; height: 29px; }
  .loginBrandMark .b3 { left: 35px; height: 38px; }
  .loginBrandMark .b4 { left: 44px; height: 27px; }
  .loginBrandMark .b5 { left: 53px; height: 16px; }

  .loginBrandMark .trend {
    left: 15px;
    right: 11px;
    bottom: 16px;
    height: 22px;
    border-left-width: 3px;
    border-bottom-width: 3px;
  }

  h1 {
    font-size: 40px;
  }

  .brandLockup p {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .loginShell {
    padding: 18px;
  }

  .brandLockup {
    gap: 13px;
  }

  .loginBrandMark {
    width: 52px;
    height: 52px;
  }

  .loginBrandMark::before {
    width: 7px;
    height: 7px;
    right: 10px;
    top: 9px;
  }

  .loginBrandMark::after {
    width: 8px;
    height: 8px;
    left: 9px;
    bottom: 9px;
  }

  .loginBrandMark .bar {
    bottom: 13px;
    width: 5px;
  }

  .loginBrandMark .b1 { left: 14px; height: 15px; }
  .loginBrandMark .b2 { left: 21px; height: 24px; }
  .loginBrandMark .b3 { left: 28px; height: 31px; }
  .loginBrandMark .b4 { left: 35px; height: 22px; }
  .loginBrandMark .b5 { left: 42px; height: 13px; }

  .loginBrandMark .trend {
    left: 12px;
    right: 9px;
    bottom: 13px;
    height: 18px;
    border-left-width: 3px;
    border-bottom-width: 3px;
  }

  h1 {
    font-size: 31px;
  }

  .brandLockup p {
    font-size: 15px;
  }

  .authPanel {
    min-height: 0;
    padding: 30px 22px 22px;
    border-radius: 16px;
  }
}
