.login-page {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 45%, rgba(23, 105, 224, 0.08), transparent 32%),
    #f8fafe;
}

.login-topbar {
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.login-main {
  display: grid;
  min-height: calc(100dvh - 68px);
  place-items: center;
  padding: 48px;
}

.login-layout {
  display: grid;
  width: min(1120px, 100%);
  min-height: 660px;
  overflow: hidden;
  grid-template-columns: 1fr 1fr;
  background: var(--panel);
  border: 1px solid #dce2eb;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(29, 43, 68, 0.1);
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 72px 68px 54px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.8), transparent 55%),
    #f2f7ff;
  border-right: 1px solid #e0e6ef;
}

.intro-copy {
  position: relative;
  z-index: 2;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-kicker span {
  width: 7px;
  height: 7px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(23, 105, 224, 0.1);
}

.login-intro h2 {
  max-width: 430px;
  margin: 0;
  color: #102044;
  font-size: clamp(34px, 3vw, 46px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.login-intro p {
  max-width: 430px;
  margin: 22px 0 0;
  color: #68748a;
  font-size: 15px;
  line-height: 1.7;
}

.document-visual {
  position: relative;
  width: 390px;
  height: 290px;
  margin: 28px auto 0;
}

.visual-glow {
  position: absolute;
  inset: 10px 26px;
  background: radial-gradient(circle, rgba(54, 122, 229, 0.15), transparent 70%);
  filter: blur(5px);
}

.visual-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d7e1ef;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(47, 78, 126, 0.11);
}

.visual-card-back {
  right: 14px;
  bottom: 8px;
  width: 180px;
  height: 174px;
  padding: 30px 22px;
  transform: rotate(3deg);
}

.visual-card-back span {
  display: block;
  height: 8px;
  margin-bottom: 14px;
  background: #e7edf6;
  border-radius: 8px;
}

.visual-card-main {
  left: 48px;
  bottom: 30px;
  width: 250px;
  height: 224px;
  padding: 22px;
  transform: rotate(-2deg);
}

.visual-card-brand {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 19px;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: var(--blue);
  border-radius: 9px;
}

.visual-line {
  display: block;
  width: 100%;
  height: 8px;
  margin: 10px 0;
  background: #e8edf5;
  border-radius: 8px;
}

.visual-line-short {
  width: 58%;
}

.visual-line-medium {
  width: 76%;
}

.visual-list {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px 9px;
  margin-top: 24px;
}

.visual-list i {
  width: 8px;
  height: 8px;
  background: #5d9bf0;
  border-radius: 50%;
}

.visual-list span {
  height: 7px;
  background: #eef2f7;
  border-radius: 7px;
}

.visual-search {
  position: absolute;
  z-index: 3;
  right: 30px;
  top: 46px;
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  color: var(--blue);
  background: #fff;
  border: 1px solid #d7e1ef;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(39, 76, 132, 0.14);
}

.visual-search svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.login-form-side {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.login-form-wrap {
  width: min(390px, calc(100% - 64px));
  margin: auto;
  padding: 60px 0 38px;
}

.login-mobile-mark {
  display: none;
}

.login-heading h2 {
  margin: 0;
  color: #111d38;
  font-size: 34px;
  font-weight: 760;
  letter-spacing: -0.035em;
}

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

.login-form {
  display: grid;
  gap: 20px;
  margin-top: 38px;
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field > label {
  color: #27344c;
  font-size: 13px;
  font-weight: 680;
}

.field-control {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  color: #818b9d;
  background: #fff;
  border: 1px solid #d7dce5;
  border-radius: 12px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.field-control:focus-within {
  color: var(--blue);
  border-color: #6b9fea;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.1);
}

.field-control > svg {
  width: 18px;
  height: 18px;
  margin-left: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.field-control input {
  width: 100%;
  min-width: 0;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  background: transparent;
  border: 0;
  outline: 0;
}

.field-control input::placeholder {
  color: #9aa2b1;
}

.password-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  margin-right: 4px;
  place-items: center;
  color: #7d8799;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.password-toggle:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-error {
  margin: -4px 0 0;
  padding: 11px 13px;
  color: #a33a3a;
  font-size: 12.5px;
  line-height: 1.5;
  background: #fff3f2;
  border: 1px solid #f2d1cf;
  border-radius: 10px;
}

.login-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(23, 105, 224, 0.2);
  transition:
    background 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.login-button:hover:not(:disabled) {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(23, 105, 224, 0.24);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.75s linear infinite;
}

.login-form.is-submitting .login-button-label {
  display: none;
}

.login-form.is-submitting .login-spinner {
  display: block;
}

.login-access-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 25px 0 0;
  color: #6f7889;
  font-size: 12px;
}

.login-access-note svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #2ca25a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-footer {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7b8495;
  font-size: 11.5px;
  border-top: 1px solid var(--line);
}

.login-footer svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

html[data-theme="dark"] .login-page {
  background:
    radial-gradient(circle at 16% 45%, rgba(60, 126, 224, 0.1), transparent 32%),
    #101216;
}

[data-theme="dark"] .login-topbar {
  background: rgba(16, 18, 22, 0.9);
  border-color: #2c313a;
}

[data-theme="dark"] .login-layout {
  background: #171a20;
  border-color: #303640;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

[data-theme="dark"] .login-intro {
  background:
    linear-gradient(150deg, rgba(28, 39, 57, 0.78), transparent 55%),
    #151d29;
  border-color: #303640;
}

[data-theme="dark"] .login-intro h2,
[data-theme="dark"] .login-heading h2 {
  color: #edf2fa;
}

[data-theme="dark"] .login-intro p {
  color: #939dac;
}

[data-theme="dark"] .visual-card,
[data-theme="dark"] .visual-search {
  background: #20252d;
  border-color: #354052;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .visual-line,
[data-theme="dark"] .visual-card-back span {
  background: #343c48;
}

[data-theme="dark"] .visual-list span {
  background: #2c333e;
}

[data-theme="dark"] .login-field > label {
  color: #cbd2dd;
}

[data-theme="dark"] .field-control {
  background: #20242b;
  border-color: #383f4a;
}

[data-theme="dark"] .field-control:focus-within {
  border-color: #5c88c8;
  box-shadow: 0 0 0 3px rgba(91, 156, 255, 0.1);
}

[data-theme="dark"] .field-control input {
  color: #e2e6ed;
}

[data-theme="dark"] .password-toggle:hover {
  background: #1a2a43;
}

[data-theme="dark"] .login-error {
  color: #ee9b9b;
  background: #291b1d;
  border-color: #593238;
}

[data-theme="dark"] .login-footer {
  border-color: #303640;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .login-main {
    padding: 24px 48px;
  }

  .login-layout {
    min-height: calc(100dvh - 116px);
  }

  .login-intro {
    padding: 42px 60px 24px;
  }

  .login-intro h2 {
    font-size: 38px;
  }

  .login-intro p {
    margin-top: 15px;
  }

  .document-visual {
    height: 230px;
    margin-top: 12px;
    transform: scale(0.82);
    transform-origin: bottom center;
  }

  .login-form-wrap {
    padding: 34px 0 24px;
  }

  .login-form {
    gap: 16px;
    margin-top: 26px;
  }

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

@media (max-width: 900px) {
  .login-main {
    padding: 32px;
  }

  .login-layout {
    max-width: 560px;
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-intro {
    display: none;
  }

  .login-form-side {
    min-height: 620px;
  }

  .login-mobile-mark {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 28px;
    place-items: center;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    background: var(--blue);
    border-radius: 12px;
  }
}

@media (max-width: 640px) {
  .login-topbar {
    height: 60px;
    padding: 0 16px;
  }

  .login-main {
    min-height: calc(100dvh - 60px);
    align-items: start;
    padding: 18px 14px;
  }

  .login-layout {
    border-radius: 16px;
  }

  .login-form-side {
    min-height: calc(100dvh - 98px);
  }

  .login-form-wrap {
    width: calc(100% - 40px);
    padding: 44px 0 28px;
  }

  .login-heading h2 {
    font-size: 29px;
  }

  .login-form {
    margin-top: 30px;
  }

  .login-footer {
    padding: 0 18px;
    text-align: center;
  }
}
