:root {
      --asclin-heading: #091321;
      --asclin-heading-soft: #3a434f;
      --asclin-navy: #11172d;
      --asclin-dark: #091321;
      --asclin-footer: #0a1320;
      --asclin-blue: #2f76a8;
      --asclin-orange: #e07c26;
      --asclin-page-bg: #f6f8fb;
      --asclin-card-bg: #f5f8fc;
      --asclin-badge-blue: #e6f1fa;
      --asclin-badge-grey: #eef3f7;
      --asclin-badge-grey-text: #526175;
      --asclin-muted: #93a2b4;
      --asclin-field-border: #c8d4e0;
      --asclin-placeholder: #d9d9d9;
      --asclin-hero-circle: #16222f;
      --asclin-hero-dot: #8296ab;
      --asclin-hero-line: #33465c;
      --asclin-border: #e3eaf2;
      /* Фон секций — на весь экран, контент — не шире 1248px по центру */
      --asclin-gutter: max(96px, calc((100% - 1248px) / 2));
    }

    body {
      margin: 0;
      background: var(--asclin-page-bg);
    }

    /* Стили усилены против CSS темы сайта: селекторы со scope .asclin-auth
       и !important на цветах, которые темы чаще всего перебивают. */

    .asclin-auth,
    .asclin-auth * {
      box-sizing: border-box;
      font-family: "Montserrat", Arial, sans-serif;
    }

    /* Подвал прижат к низу даже на короткой странице */
    .asclin-auth {
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      width: 100%;
      background: #ffffff;
      color: var(--asclin-navy);
    }

    .asclin-auth .page-main {
      flex: 1 0 auto;
    }

    /* ===================== ШАПКА + ПЕРВЫЙ ЭКРАН ===================== */

    .asclin-auth .hero {
      position: relative;
      background: var(--asclin-dark);
      color: #ffffff;
      padding: 28px var(--asclin-gutter) 58px;
      overflow: hidden;
    }

    .asclin-auth .hero__decor {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }

    .asclin-auth .hero__circle {
      position: absolute;
      border-radius: 50%;
      background: var(--asclin-hero-circle);
    }

    .asclin-auth .hero__circle--left {
      width: 360px;
      height: 360px;
      left: -160px;
      top: 180px;
    }

    .asclin-auth .hero__circle--right {
      width: 480px;
      height: 480px;
      right: -70px;
      top: -250px;
    }

    .asclin-auth .hero__dot {
      position: absolute;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--asclin-hero-dot);
      opacity: .85;
    }

    .asclin-auth .hero__dot--small {
      width: 8px;
      height: 8px;
    }

    .asclin-auth .hero__line {
      position: absolute;
      height: 1px;
      background: var(--asclin-hero-line);
    }

    .asclin-auth .hero__content {
      position: relative;
      max-width: 1248px;
      margin: 64px auto 0;
      z-index: 1;
    }

    .asclin-auth .hero__breadcrumbs {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
      margin: 0;
      color: #aeb9c6;
      font-size: 14px;
      line-height: 1.2;
      font-weight: 400;
    }

    .asclin-auth .hero__breadcrumbs a {
      color: #dfe6ee !important;
      text-decoration: none;
    }

    .asclin-auth .hero__breadcrumbs a:hover {
      text-decoration: underline;
    }

    .asclin-auth .hero__title {
      margin: 14px 0 0;
      max-width: 960px;
      color: #ffffff !important;
      font-size: clamp(28px, 3.2vw, 42px);
      line-height: 1.15;
      font-weight: 700;
      letter-spacing: .01em;
      text-transform: none;
    }

    .asclin-auth .hero__subtitle {
      margin: 12px 0 0;
      max-width: 960px;
      color: #dfe6ee;
      font-size: 16px;
      line-height: 1.5;
      font-weight: 400;
    }

    /* ===================== ПАНЕЛЬ: ВОЗВРАТ НА ГЛАВНУЮ ===================== */

    .asclin-auth .toolbar {
      background: var(--asclin-card-bg);
      padding: 22px var(--asclin-gutter);
      border-bottom: 1px solid var(--asclin-border);
    }

    .asclin-auth .toolbar__row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 16px;
      min-height: 31px;
    }

    .asclin-auth a.toolbar__back {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--asclin-blue) !important;
      font-size: 14px;
      line-height: 1.2;
      font-weight: 600;
      text-decoration: none;
      white-space: nowrap;
    }

    .asclin-auth a.toolbar__back:hover {
      text-decoration: underline;
    }

    .asclin-auth .toolbar__spacer {
      flex: 1;
    }

    .asclin-auth .toolbar__note {
      color: var(--asclin-badge-grey-text);
      font-size: 13px;
      line-height: 1.4;
      font-weight: 500;
    }

    /* ===================== ДВЕ КОЛОНКИ: ВХОД / РЕГИСТРАЦИЯ ===================== */

    .asclin-auth .auth {
      padding: 48px var(--asclin-gutter) 64px;
      background: #ffffff;
    }

    .asclin-auth .auth__grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 24px;
      align-items: start;
    }

    .asclin-auth .auth__col {
      display: flex;
      flex-direction: column;
      gap: 24px;
      min-width: 0;
    }

    .asclin-auth .card {
      background: var(--asclin-card-bg);
      border-radius: 8px;
      padding: 32px;
    }

    .asclin-auth .card__title {
      margin: 0;
      color: var(--asclin-heading) !important;
      font-size: 24px;
      line-height: 1.2;
      font-weight: 700;
      text-transform: none;
    }

    .asclin-auth .card__title--small {
      font-size: 20px;
      line-height: 1.25;
    }

    .asclin-auth .card__lead {
      margin: 10px 0 0;
      color: var(--asclin-badge-grey-text);
      font-size: 14px;
      line-height: 20px;
      font-weight: 400;
    }

    /* ---------- поля формы (светлая форма по карте стилей) ---------- */

    .asclin-auth .form {
      margin: 26px 0 0;
    }

    .asclin-auth .form__row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 24px;
    }

    .asclin-auth .form__field {
      margin: 0 0 26px;
      min-width: 0;
    }

    .asclin-auth .form__label {
      display: block;
      margin: 0 0 8px;
      color: var(--asclin-navy);
      font-size: 14px;
      line-height: 1.2;
      font-weight: 600;
    }

    .asclin-auth .form__req {
      color: var(--asclin-orange);
    }

    .asclin-auth .form__control {
      position: relative;
    }

    .asclin-auth .form__input,
    .asclin-auth .form__select {
      display: block;
      width: 100%;
      height: 48px;
      margin: 0;
      border: 1px solid var(--asclin-field-border);
      border-radius: 8px;
      background: #ffffff;
      padding: 0 18px;
      color: var(--asclin-navy);
      font-family: "Montserrat", Arial, sans-serif;
      font-size: 14px;
      line-height: 1.3;
      font-weight: 400;
      -webkit-appearance: none;
      appearance: none;
    }

    .asclin-auth .form__input--password {
      padding-right: 52px;
      font-size: 16px;
      font-weight: 700;
      letter-spacing: 3px;
    }

    .asclin-auth .form__input--password::placeholder {
      font-size: 14px;
      font-weight: 400;
      letter-spacing: 0;
    }

    .asclin-auth .form__input::placeholder {
      color: var(--asclin-muted);
      opacity: 1;
    }

    .asclin-auth .form__input:focus,
    .asclin-auth .form__select:focus {
      outline: none;
      border-color: var(--asclin-blue);
    }

    .asclin-auth .form__select {
      padding-right: 48px;
      background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10' fill='none'%3E%3Cpath d='m0 0 8 8 8-8' stroke='%23526175' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 20px center;
      background-size: 16px 10px;
      cursor: pointer;
    }

    .asclin-auth .form__eye {
      position: absolute;
      top: 50%;
      right: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      margin-top: -16px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      padding: 0;
      color: var(--asclin-muted);
      cursor: pointer;
    }

    .asclin-auth .form__eye:hover,
    .asclin-auth .form__eye.is-on {
      color: var(--asclin-blue);
    }

    .asclin-auth .form__eye:focus-visible {
      outline: 2px solid var(--asclin-blue);
      outline-offset: 1px;
    }

    .asclin-auth .form__hint {
      margin: -12px 0 0;
      color: var(--asclin-muted);
      font-size: 12px;
      line-height: 1.4;
      font-weight: 400;
    }

    /* ---------- чекбокс: 20×20, скругление 4, заливка голубым ---------- */

    .asclin-auth .checkbox {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      color: var(--asclin-heading-soft);
      font-size: 14px;
      line-height: 1.3;
      font-weight: 400;
      user-select: none;
    }

    .asclin-auth .checkbox input {
      position: absolute;
      width: 1px;
      height: 1px;
      margin: 0;
      opacity: 0;
      pointer-events: none;
    }

    .asclin-auth .checkbox__box {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      border: 1px solid var(--asclin-field-border);
      border-radius: 4px;
      background: #ffffff;
      transition: background .15s ease, border-color .15s ease;
    }

    .asclin-auth .checkbox__box svg {
      opacity: 0;
    }

    .asclin-auth .checkbox input:checked + .checkbox__box {
      background: var(--asclin-blue);
      border-color: var(--asclin-blue);
    }

    .asclin-auth .checkbox input:checked + .checkbox__box svg {
      opacity: 1;
    }

    .asclin-auth .checkbox input:focus-visible + .checkbox__box {
      outline: 2px solid var(--asclin-blue);
      outline-offset: 2px;
    }

    .asclin-auth .checkbox a,
    .asclin-auth a.form__link {
      color: var(--asclin-blue) !important;
      font-weight: 600;
      text-decoration: none;
    }

    .asclin-auth .checkbox a:hover,
    .asclin-auth a.form__link:hover {
      text-decoration: underline;
    }

    .asclin-auth .form__options {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px 20px;
      margin: -2px 0 0;
    }

    .asclin-auth a.form__forgot {
      color: var(--asclin-blue) !important;
      font-size: 14px;
      line-height: 1.3;
      font-weight: 600;
      text-decoration: none;
      white-space: nowrap;
    }

    .asclin-auth a.form__forgot:hover {
      text-decoration: underline;
    }

    /* ---------- кнопки ---------- */

    .asclin-auth .btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 48px;
      margin: 28px 0 0;
      border: 0;
      border-radius: 8px;
      padding: 0 24px;
      color: #ffffff !important;
      font-family: "Montserrat", Arial, sans-serif;
      font-size: 14px;
      line-height: 1;
      font-weight: 600;
      cursor: pointer;
      transition: opacity .2s ease;
    }

    .asclin-auth .btn:hover {
      opacity: .85;
    }

    .asclin-auth .btn--navy {
      background: var(--asclin-navy) !important;
    }

    .asclin-auth .btn--orange {
      background: var(--asclin-orange) !important;
    }

    .asclin-auth .btn--after-divider {
      margin-top: 24px;
    }

    .asclin-auth .form__divider {
      height: 1px;
      margin: 36px 0 0;
      border: 0;
      background: var(--asclin-border);
    }

    .asclin-auth .form__note {
      margin: 24px 0 0;
      color: var(--asclin-badge-grey-text);
      font-size: 14px;
      line-height: 1.4;
      font-weight: 400;
    }

    .asclin-auth .form__note--small {
      margin-top: 16px;
      color: var(--asclin-muted);
      font-size: 13px;
      line-height: 18px;
    }

    /* Ошибка входа (выводит Битрикс: неверный логин или пароль) */
    .asclin-auth .form__error {
      margin: 0 0 20px;
      padding: 12px 16px;
      border-radius: 8px;
      background: #fdeeee;
      color: #d64541;
      font-size: 14px;
      line-height: 1.4;
    }

    /* ---------- «Что даёт личный кабинет» ---------- */

    .asclin-auth .benefits {
      margin: 18px 0 0;
      padding: 0;
      list-style: none;
    }

    .asclin-auth .benefits li {
      position: relative;
      margin: 0;
      padding: 0 0 0 24px;
      color: var(--asclin-heading-soft);
      font-size: 14px;
      line-height: 20px;
      font-weight: 400;
    }

    .asclin-auth .benefits li + li {
      margin-top: 20px;
    }

    .asclin-auth .benefits li::before {
      content: "";
      position: absolute;
      left: 5px;
      top: 7px;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--asclin-blue);
    }

    /* ===================== АДАПТИВ ===================== */

    @media (max-width: 1200px) {
      :root {
        --asclin-gutter: 40px;
      }
    }

    /* «форма справа» на десктопе / «форма ниже», когда колонки встают в столбик */
    .asclin-auth .only-narrow {
      display: none;
    }

    @media (max-width: 960px) {
      .asclin-auth .auth__grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .asclin-auth .only-wide {
        display: none;
      }

      .asclin-auth .only-narrow {
        display: inline;
      }
    }

    @media (max-width: 640px) {
      :root {
        --asclin-gutter: 20px;
      }

      .asclin-auth .hero__content {
        margin-top: 40px;
      }

      /* На телефоне точки и линии декора попадают на текст — скрываем */
      .asclin-auth .hero__dot,
      .asclin-auth .hero__line,
      .asclin-auth .br-desktop {
        display: none;
      }

      .asclin-auth .toolbar__spacer {
        display: none;
      }

      /* Мобильный фрейм mobile-auth.svg: в панели только «← На главную», высота 56 */
      .asclin-auth .hero {
        padding-bottom: 44px;
      }

      .asclin-auth .hero__breadcrumbs {
        font-size: 13px;
      }

      .asclin-auth .hero__subtitle {
        font-size: 14px;
        line-height: 21px;
      }

      .asclin-auth .toolbar {
        padding-top: 12px;
        padding-bottom: 12px;
      }

      .asclin-auth .toolbar__note {
        display: none;
      }

      .asclin-auth .auth {
        padding-top: 24px;
        padding-bottom: 40px;
      }

      .asclin-auth .auth__grid,
      .asclin-auth .auth__col {
        gap: 20px;
      }

      .asclin-auth .card {
        padding: 24px 20px 20px;
      }

      .asclin-auth .card__title {
        font-size: 22px;
      }

      .asclin-auth .card__title--small {
        font-size: 18px;
      }

      .asclin-auth .card__lead {
        margin-top: 8px;
        font-size: 13px;
        line-height: 19px;
      }

      /* поля в столбик: подпись → 8 → поле 48 → 10 → следующая подпись */
      .asclin-auth .form {
        margin-top: 16px;
      }

      .asclin-auth .form__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
      }

      .asclin-auth .form__field {
        margin-bottom: 10px;
      }

      .asclin-auth .form__hint {
        margin-top: -3px;
      }

      .asclin-auth .form__input,
      .asclin-auth .form__select {
        padding-left: 16px;
      }

      .asclin-auth .form__select {
        padding-right: 40px;
        background-position: right 16px center;
        text-overflow: ellipsis;
      }

      .asclin-auth .form__field + .form__options {
        margin-top: 2px;
      }

      .asclin-auth .form__hint + .form__options {
        margin-top: 32px !important;
      }

      .asclin-auth .btn {
        margin-top: 24px;
      }

      .asclin-auth .form__divider {
        margin-top: 24px;
      }

      .asclin-auth .form__options + .form__divider {
        margin-top: 20px;
      }

      .asclin-auth .form__note {
        margin-top: 16px;
      }

      .asclin-auth .form__note--small {
        font-size: 12px;
        line-height: 17px;
      }

      .asclin-auth .benefits {
        margin-top: 14px;
      }

      .asclin-auth .benefits li + li {
        margin-top: 10px;
      }
    }

    /* 390: «Врач функциональной диагностики» целиком помещается в поле рядом с шевроном */
    @media (max-width: 420px) {
      .asclin-auth .form__select {
        font-size: 13px;
      }
    }
