/* ============================================================
   OPTC MODALS DARK + MANUFACTURER MODAL — v2.1 FINAL
   Единый файл: тёмная тема для всех модалок + layout карточек
   производителя + крестик + юридические документы.
   ============================================================ */

/* ============================================================
   1. ПОДЛОЖКА ВСЕХ МОДАЛОК
   ============================================================ */
html body .optc-mfr-modal,
html body .optc-discount-modal,
html body .optc-cat-welcome,
html body .optc-lens-welcome {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100500 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: rgba(0, 0, 0, 0.92) !important;
    background-color: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(14px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
}
html body .optc-mfr-modal.is-open,
html body .optc-discount-modal.is-open,
html body .optc-cat-welcome.is-open,
html body .optc-lens-welcome.is-open {
    display: flex !important;
}

/* Динамические оверлеи */
html body .optc-modal-overlay,
html body .optc-params-modal,
html body .optc-recipe-picker,
html body .optc-rx-sig-modal,
html body .optc-cat-image-overlay,
html body .optc-kit__modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100500 !important;
    background: rgba(0, 0, 0, 0.92) !important;
    background-color: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(14px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* Внутренние фоны-подложки */
html body .optc-mfr-modal__bg,
html body .optc-cat-welcome__bg,
html body .optc-rx-sig-modal__bg,
html body .optc-repair-modal__bg,
html body .optc-burger-menu-bg {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.85) !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
}

/* ============================================================
   2. ДИАЛОГ — общее оформление
   ============================================================ */
html body .optc-mfr-modal__dialog,
html body .optc-modal-content,
html body .optc-discount-box,
html body .optc-cat-welcome__dialog,
html body .optc-cat-info,
html body .optc-cat-color,
html body .optc-cat-grad,
html body .optc-cat-image,
html body .optc-recipe-picker__dialog,
html body .optc-params-modal .optc-modal-content,
html body .optc-rx-sig-modal__dialog,
html body .optc-kit__modal-inner,
html body .optc-lens-welcome__dialog,
html body .optc-repair-modal__sheet,
html body .optc-burger-menu-sheet {
    position: relative !important;
    background: #0f0f0f !important;
    background-color: #0f0f0f !important;
    background-image:
        linear-gradient(180deg, rgba(0, 230, 118, 0.04) 0%, rgba(0, 230, 118, 0.005) 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(0, 230, 118, 0.35) !important;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.85),
        0 0 80px rgba(0, 230, 118, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    margin: auto !important;
}

/* ============================================================
   3. МОДАЛКА ВЫБОРА ПРОИЗВОДИТЕЛЯ — диалог
   ============================================================ */
html body .optc-mfr-modal__dialog {
    width: 100% !important;
    max-width: 1100px !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    padding: 36px 32px 28px !important;
    border-radius: 28px !important;
    animation: optcMfrModalIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
@keyframes optcMfrModalIn {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

html body .optc-mfr-modal__head {
    text-align: center !important;
    margin-bottom: 28px !important;
}
html body .optc-mfr-modal__title {
    margin: 0 0 10px !important;
    font-size: clamp(22px, 3vw, 30px) !important;
    font-weight: 900 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.15 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    background: transparent !important;
}
html body .optc-mfr-modal__lead {
    margin: 0 auto !important;
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    color: #b8b8b8 !important;
    max-width: 640px !important;
}
html body .optc-mfr-modal__hint {
    margin: 22px 0 0 !important;
    text-align: center !important;
    font-size: 11.5px !important;
    line-height: 1.5 !important;
    color: #6b7280 !important;
}
html body .optc-mfr-modal__hint i {
    color: #4ade80 !important;
    margin-right: 6px !important;
}

/* ============================================================
   4. СЕТКА КАРТОЧЕК ПРОИЗВОДИТЕЛЕЙ
   ============================================================ */
html body .optc-mfr-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

html body .optc-mfr-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 24px 20px 18px !important;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.005) 60%),
        #141414 !important;
    background-color: #141414 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 22px !important;
    cursor: pointer !important;
    transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 8px 22px rgba(0, 0, 0, 0.5) !important;
    box-sizing: border-box !important;
    min-height: 240px !important;
    width: 100% !important;
    overflow: hidden !important;
}
html body .optc-mfr-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 20% !important;
    right: 20% !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.8), transparent) !important;
    opacity: 0 !important;
    transition: opacity 0.26s ease, left 0.26s ease, right 0.26s ease !important;
    border-radius: 2px !important;
    pointer-events: none !important;
}
html body .optc-mfr-card:hover {
    border-color: rgba(0, 230, 118, 0.55) !important;
    transform: translateY(-5px) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.10) inset,
        0 20px 44px rgba(0, 0, 0, 0.6),
        0 0 32px rgba(0, 230, 118, 0.22) !important;
    background:
        linear-gradient(160deg, rgba(0, 230, 118, 0.10) 0%, rgba(255, 255, 255, 0.02) 55%),
        #181818 !important;
    background-color: #181818 !important;
}
html body .optc-mfr-card:hover::before {
    opacity: 1 !important;
    left: 6% !important;
    right: 6% !important;
}

/* Логотип */
html body .optc-mfr-card__logo {
    position: relative !important;
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    min-height: 88px !important;
    max-height: 88px !important;
    margin: 0 auto 16px auto !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.10) 0%, rgba(0, 230, 118, 0.02) 100%) !important;
    border: 2px solid rgba(0, 230, 118, 0.55) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-shadow:
        0 0 24px rgba(0, 230, 118, 0.20),
        0 8px 20px rgba(0, 0, 0, 0.45) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.4, 0.4, 1) !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}
html body .optc-mfr-card__logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    padding: 12px !important;
    display: block !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}
html body .optc-mfr-card__logo.is-fallback {
    background: linear-gradient(135deg, #35ffa1 0%, #00c853 100%) !important;
    border-color: #35ffa1 !important;
}
html body .optc-mfr-card__logo.is-fallback img { display: none !important; }
html body .optc-mfr-card__letter {
    display: none !important;
    font-size: 2.4rem !important;
    font-weight: 900 !important;
    color: #001a0d !important;
    letter-spacing: -0.05em !important;
    line-height: 1 !important;
}
html body .optc-mfr-card__logo.is-fallback .optc-mfr-card__letter { display: block !important; }
html body .optc-mfr-card:hover .optc-mfr-card__logo {
    transform: scale(1.06) rotate(-3deg) !important;
    box-shadow:
        0 0 40px rgba(0, 230, 118, 0.50),
        0 12px 28px rgba(0, 0, 0, 0.55) !important;
}

/* Тело карточки */
html body .optc-mfr-card__body {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    text-align: center !important;
    min-width: 0 !important;
}
html body .optc-mfr-card__name {
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    margin: 0 !important;
}
html body .optc-mfr-card__meta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 2px !important;
}
html body .optc-mfr-card__country {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #909090 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
html body .optc-mfr-card__country i { color: #4ade80 !important; font-size: 10px !important; }
html body .optc-mfr-card__status {
    display: inline-block !important;
    padding: 3px 10px !important;
    background: rgba(0, 230, 118, 0.12) !important;
    border: 1px solid rgba(0, 230, 118, 0.40) !important;
    border-radius: 60px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #4ade80 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    line-height: 1.3 !important;
}
html body .optc-mfr-card__desc {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    color: #a8a8a8 !important;
    margin-top: 4px !important;
}
html body .optc-mfr-card__count {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    align-self: center !important;
    margin-top: 8px !important;
    padding: 5px 12px !important;
    background: rgba(0, 230, 118, 0.06) !important;
    border: 1px solid rgba(0, 230, 118, 0.25) !important;
    border-radius: 60px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #4ade80 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    line-height: 1.3 !important;
}
html body .optc-mfr-card__count i { font-size: 10px !important; color: #4ade80 !important; }

/* Кнопки в карточке */
html body .optc-mfr-card__actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: auto !important;
    width: 100% !important;
}
html body button.optc-mfr-card__select,
html body .optc-mfr-card__select {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 12px 18px !important;
    background: linear-gradient(180deg, #35ffa1 0%, #00e676 55%, #00c853 100%) !important;
    color: #001a0d !important;
    border-radius: 60px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    cursor: pointer !important;
    text-align: center !important;
    box-sizing: border-box !important;
    box-shadow:
        0 8px 22px rgba(0, 230, 118, 0.45),
        inset 0 2px 0 rgba(255, 255, 255, 0.35) !important;
    transition: all 0.22s ease !important;
    line-height: 1.2 !important;
    border: none !important;
}
html body button.optc-mfr-card__select i,
html body .optc-mfr-card__select i {
    color: inherit !important;
    font-size: 0.9em !important;
}
html body button.optc-mfr-card__select:hover,
html body .optc-mfr-card__select:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        0 14px 32px rgba(0, 230, 118, 0.60),
        inset 0 2px 0 rgba(255, 255, 255, 0.45) !important;
}
html body a.optc-mfr-card__cert,
html body .optc-mfr-card__cert {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 11px 18px !important;
    background: transparent !important;
    color: #4ade80 !important;
    border: 1.5px solid rgba(0, 230, 118, 0.45) !important;
    border-radius: 60px !important;
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transition: all 0.22s ease !important;
    line-height: 1.2 !important;
}
html body a.optc-mfr-card__cert i,
html body .optc-mfr-card__cert i { color: inherit !important; }
html body a.optc-mfr-card__cert:hover,
html body .optc-mfr-card__cert:hover {
    background: rgba(0, 230, 118, 0.12) !important;
    border-color: #00e676 !important;
    color: #35ffa1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(0, 230, 118, 0.20) !important;
}

/* ============================================================
   5. ЗАГОЛОВКИ И ТЕКСТ ВО ВСЕХ МОДАЛКАХ
   ============================================================ */
html body .optc-modal-content h1,
html body .optc-modal-content h2,
html body .optc-modal-content h3,
html body .optc-modal-content h4,
html body .optc-discount-box__title,
html body .optc-cat-welcome__title,
html body .optc-cat-info__title,
html body .optc-cat-color h3,
html body .optc-cat-grad h3,
html body .optc-cat-image__title,
html body .optc-recipe-picker__dialog h3,
html body .optc-params-modal h3,
html body .optc-rx-sig-modal__title,
html body .optc-kit__modal-title,
html body .optc-lens-welcome__title,
html body .optc-repair-modal__sheet h3 {
    color: #ffffff !important;
    background: transparent !important;
}
html body .optc-modal-content p,
html body .optc-discount-box__lead,
html body .optc-cat-welcome__lead,
html body .optc-cat-welcome__hint,
html body .optc-cat-welcome__note,
html body .optc-cat-info__body,
html body .optc-cat-info__body p,
html body .optc-cat-color__hint,
html body .optc-cat-grad__hint,
html body .optc-recipe-picker__dialog p,
html body .optc-params-modal p,
html body .optc-params-modal li,
html body .optc-rx-sig-modal__lead,
html body .optc-rx-sig-modal__consent,
html body .optc-kit__modal-body,
html body .optc-lens-welcome__lead,
html body .optc-lens-welcome__hint {
    color: #c8c8c8 !important;
}
html body .optc-modal-content strong,
html body .optc-modal-content b {
    color: #ffffff !important;
}

/* ============================================================
   6. КРЕСТИКИ (все модалки, кроме mfr)
   ============================================================ */
html body .optc-modal-close,
html body .optc-cat-info__close,
html body .optc-cat-image__close,
html body .optc-recipe-picker__close,
html body .optc-rx-sig-modal__close,
html body .optc-kit__modal-close,
html body .optc-repair-modal__close,
html body .optc-burger-menu-close {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.20) !important;
    opacity: 1 !important;
    cursor: pointer !important;
    z-index: 20 !important;
}
html body .optc-modal-close:hover,
html body .optc-cat-info__close:hover,
html body .optc-cat-image__close:hover,
html body .optc-recipe-picker__close:hover,
html body .optc-rx-sig-modal__close:hover,
html body .optc-kit__modal-close:hover,
html body .optc-repair-modal__close:hover {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Крестик модалки производителя */
html body .optc-mfr-modal__close {
    all: unset !important;
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.20) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 20 !important;
    box-sizing: border-box !important;
    transition: all 0.22s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
}
html body .optc-mfr-modal__close:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    transform: rotate(90deg) !important;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.55) !important;
}

/* ============================================================
   7. ПАНЕЛЬ «ПРОИЗВОДИТЕЛЬ + СЕРТИФИКАТ» В HERO
   ============================================================ */
html body .optc-cat .optc-cat-mfr-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
    margin: 0 0 22px !important;
    padding: 14px 20px !important;
    background: linear-gradient(180deg, rgba(0, 230, 118, 0.06) 0%, rgba(0, 230, 118, 0.01) 100%) !important;
    border: 1.5px solid rgba(0, 230, 118, 0.30) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
    box-sizing: border-box !important;
}
html body .optc-cat .optc-cat-mfr-bar__info {
    display: flex !important;
    align-items: baseline !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
html body .optc-cat .optc-cat-mfr-bar__label {
    font-size: 11.5px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #909090 !important;
}
html body .optc-cat .optc-cat-mfr-bar__name {
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
}
html body .optc-cat .optc-cat-mfr-bar__actions {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}
html body button.optc-cat-change-mfr-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 18px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 60px !important;
    color: #c8c8c8 !important;
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
}
html body button.optc-cat-change-mfr-btn i { color: inherit !important; font-size: 0.9em !important; }
html body button.optc-cat-change-mfr-btn:hover {
    background: rgba(0, 230, 118, 0.10) !important;
    border-color: rgba(0, 230, 118, 0.55) !important;
    color: #4ade80 !important;
    transform: translateY(-1px) !important;
}
html body a.optc-cat-cert-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 18px !important;
    background: rgba(0, 230, 118, 0.08) !important;
    border: 1.5px solid rgba(0, 230, 118, 0.45) !important;
    border-radius: 60px !important;
    color: #4ade80 !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    transition: all 0.22s ease !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}
html body a.optc-cat-cert-btn i { color: inherit !important; }
html body a.optc-cat-cert-btn:hover {
    background: rgba(0, 230, 118, 0.15) !important;
    border-color: #00e676 !important;
    color: #35ffa1 !important;
    transform: translateY(-2px) !important;
}

/* ============================================================
   8. ★ ЮРИДИЧЕСКИЕ ДОКУМЕНТЫ / СОГЛАСИЯ / ДОКУМЕНТЫ
   Универсальный фикс (диалоги получают класс .optc-modal-autofixed
   через JS-детектор)
   ============================================================ */
html body .optc-legal-modal__dialog,
html body .optc-docs-modal__dialog,
html body .optc-agreement-modal__dialog,
html body .optc-consent-modal__dialog,
html body .optc-docs-modal__content,
html body .optc-legal-modal .optc-modal-content,
html body .optc-modal-autofixed {
    background: #0f0f0f !important;
    background-color: #0f0f0f !important;
    background-image: linear-gradient(180deg, rgba(0, 230, 118, 0.04) 0%, rgba(0, 230, 118, 0.005) 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(0, 230, 118, 0.35) !important;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.85),
        0 0 80px rgba(0, 230, 118, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
    border-radius: 24px !important;
    box-sizing: border-box !important;
}

html body .optc-legal-modal__title,
html body .optc-docs-modal__title,
html body .optc-agreement-modal__title,
html body .optc-consent-modal__title,
html body .optc-modal-autofixed h1,
html body .optc-modal-autofixed h2,
html body .optc-modal-autofixed h3,
html body .optc-modal-autofixed h4,
html body .optc-modal-autofixed [class*="-title"] {
    color: #ffffff !important;
    background: transparent !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

html body .optc-modal-autofixed p,
html body .optc-modal-autofixed span:not([class*="badge"]):not([class*="icon"]),
html body .optc-modal-autofixed li,
html body .optc-modal-autofixed small,
html body .optc-modal-autofixed em {
    color: #c8c8c8 !important;
    background-color: transparent !important;
}
html body .optc-modal-autofixed strong,
html body .optc-modal-autofixed b {
    color: #ffffff !important;
    font-weight: 800 !important;
}
html body .optc-modal-autofixed a {
    color: #4ade80 !important;
    text-decoration: underline !important;
}
html body .optc-modal-autofixed a:hover {
    color: #35ffa1 !important;
}

/* Табы внутри документов */
html body .optc-modal-autofixed .optc-docs-tabs,
html body .optc-modal-autofixed [class*="docs-tabs"],
html body .optc-modal-autofixed [class*="legal-tabs"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
}
html body .optc-modal-autofixed .optc-docs-tab,
html body .optc-modal-autofixed [class*="docs-tab"]:not([class*="content"]),
html body .optc-modal-autofixed [class*="legal-tab"]:not([class*="content"]) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 16px !important;
    background: #0a0a0a !important;
    background-color: #0a0a0a !important;
    border: 1.5px solid #1f1f1f !important;
    border-radius: 60px !important;
    color: #b8b8b8 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
    text-decoration: none !important;
}
html body .optc-modal-autofixed .optc-docs-tab:hover,
html body .optc-modal-autofixed [class*="docs-tab"]:hover {
    border-color: rgba(0, 230, 118, 0.5) !important;
    color: #4ade80 !important;
}
html body .optc-modal-autofixed .optc-docs-tab.is-active,
html body .optc-modal-autofixed .optc-docs-tab.is-accepted,
html body .optc-modal-autofixed [class*="docs-tab"].is-active,
html body .optc-modal-autofixed [class*="docs-tab"].is-accepted {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.20) 0%, rgba(0, 230, 118, 0.06) 100%) !important;
    background-color: rgba(0, 230, 118, 0.15) !important;
    border-color: #4ade80 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 230, 118, 0.25) !important;
}

/* Контент документа */
html body .optc-modal-autofixed .optc-docs-content,
html body .optc-modal-autofixed [class*="docs-content"],
html body .optc-modal-autofixed [class*="legal-content"],
html body .optc-modal-autofixed [class*="doc-text"] {
    background: #0a0a0a !important;
    background-color: #0a0a0a !important;
    border: 1px solid #1f1f1f !important;
    border-radius: 14px !important;
    padding: 20px 22px !important;
    max-height: 45vh !important;
    overflow-y: auto !important;
    font-size: 13.5px !important;
    line-height: 1.7 !important;
    color: #c8c8c8 !important;
    box-sizing: border-box !important;
}
html body .optc-modal-autofixed .optc-docs-content p,
html body .optc-modal-autofixed [class*="docs-content"] p {
    margin: 0 0 12px !important;
    color: #c8c8c8 !important;
}
html body .optc-modal-autofixed .optc-docs-content h3,
html body .optc-modal-autofixed [class*="docs-content"] h3 {
    margin: 18px 0 10px !important;
    color: #ffffff !important;
    font-size: 15px !important;
}
html body .optc-modal-autofixed .optc-docs-content::-webkit-scrollbar,
html body .optc-modal-autofixed [class*="docs-content"]::-webkit-scrollbar {
    width: 6px;
}
html body .optc-modal-autofixed .optc-docs-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
html body .optc-modal-autofixed .optc-docs-content::-webkit-scrollbar-thumb {
    background: rgba(74, 222, 128, 0.5);
    border-radius: 3px;
}

/* Чекбоксы */
html body .optc-modal-autofixed .optc-docs-check,
html body .optc-modal-autofixed [class*="docs-check"],
html body .optc-modal-autofixed [class*="consent-row"] {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    margin: 8px 0 !important;
    background: #0a0a0a !important;
    background-color: #0a0a0a !important;
    border: 1.5px solid #1f1f1f !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
}
html body .optc-modal-autofixed .optc-docs-check:hover,
html body .optc-modal-autofixed [class*="docs-check"]:hover {
    border-color: rgba(0, 230, 118, 0.40) !important;
}
html body .optc-modal-autofixed .optc-docs-check.is-checked,
html body .optc-modal-autofixed [class*="docs-check"].is-checked {
    background: rgba(0, 230, 118, 0.08) !important;
    background-color: rgba(0, 230, 118, 0.08) !important;
    border-color: rgba(0, 230, 118, 0.40) !important;
}
html body .optc-modal-autofixed input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    accent-color: #00e676 !important;
    margin: 0 !important;
    cursor: pointer !important;
}
html body .optc-modal-autofixed .optc-docs-check label,
html body .optc-modal-autofixed [class*="docs-check"] label,
html body .optc-modal-autofixed .optc-docs-check span,
html body .optc-modal-autofixed [class*="docs-check"] span {
    color: #e5e5e5 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

/* Кнопка «Подтвердить и принять» */
html body .optc-modal-autofixed .optc-docs-submit,
html body .optc-modal-autofixed [class*="docs-submit"],
html body .optc-modal-autofixed [class*="docs-confirm"],
html body .optc-modal-autofixed button[type="submit"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 16px 24px !important;
    margin-top: 16px !important;
    background: linear-gradient(180deg, #35ffa1 0%, #00e676 55%, #00c853 100%) !important;
    background-color: #00e676 !important;
    color: #001a0d !important;
    border: none !important;
    border-radius: 60px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: 0.4px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    box-shadow:
        0 10px 28px rgba(0, 230, 118, 0.45),
        inset 0 2px 0 rgba(255, 255, 255, 0.35) !important;
    transition: all 0.22s ease !important;
    box-sizing: border-box !important;
}
html body .optc-modal-autofixed .optc-docs-submit:hover,
html body .optc-modal-autofixed button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        0 16px 40px rgba(0, 230, 118, 0.60),
        inset 0 2px 0 rgba(255, 255, 255, 0.45) !important;
}
html body .optc-modal-autofixed .optc-docs-submit i,
html body .optc-modal-autofixed button[type="submit"] i {
    color: inherit !important;
    font-size: 0.9em !important;
}

/* ============================================================
   9. МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================ */
@media (max-width: 720px) {
    html body .optc-mfr-modal { padding: 10px !important; }
    html body .optc-mfr-modal__dialog {
        padding: 24px 18px 20px !important;
        border-radius: 20px !important;
        max-height: 96vh !important;
    }
    html body .optc-mfr-modal__title {
        font-size: 20px !important;
        padding-right: 40px !important;
    }
    html body .optc-mfr-modal__lead { font-size: 13px !important; }
    html body .optc-mfr-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    html body .optc-mfr-card {
        padding: 18px 16px 14px !important;
        min-height: auto !important;
        border-radius: 18px !important;
    }
    html body .optc-mfr-card__logo {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
        margin-bottom: 12px !important;
        border-radius: 16px !important;
    }
    html body .optc-mfr-card__letter { font-size: 2rem !important; }
    html body .optc-mfr-card__name { font-size: 1.05rem !important; }
    html body .optc-mfr-card__desc { font-size: 12px !important; }

    html body .optc-cat .optc-cat-mfr-bar {
        padding: 12px 14px !important;
        gap: 10px !important;
    }
    html body .optc-cat .optc-cat-mfr-bar__actions { width: 100% !important; }
    html body .optc-cat .optc-cat-cert-btn,
    html body .optc-cat button.optc-cat-change-mfr-btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 10px 12px !important;
        font-size: 11.5px !important;
    }

    html body .optc-modal-autofixed {
        max-width: 96% !important;
        padding: 20px 16px !important;
        border-radius: 18px !important;
    }
    html body .optc-modal-autofixed .optc-docs-content,
    html body .optc-modal-autofixed [class*="docs-content"] {
        max-height: 40vh !important;
        padding: 16px 18px !important;
        font-size: 13px !important;
    }
}