/*
 * theme.css — цветовой слой кабинета трейдера.
 * Переводит синий акцент кабинета (#3e97ff, #007bff, #2196F3) в бирюзовый,
 * тот же, что в трейдерской админке (#0f766e). Ничего не двигает: только цвета.
 * Подключается в AppAsset последним, поэтому перекрывает main/btn/filters/dark.
 */

/* ---------- из main.css ---------- */
a.blue-button,
input[type=button].blue-button,
button.blue-button {
    background-color: #0f766e;
    border: 1px solid #0f766e;
}
header .section .header_left ul li a.active {
    border-bottom: 2px solid #0f766e;
    color: #0f766e;
}
section.login .section .login_body #login-form p.signup a,
section.login .section .login_body #form-signup p.signup a,
section.login .section .login_body #request-password-reset-form p.signup a,
section.login .section .login_body #reset-password-form p.signup a {
    color: #0f766e;
}
section.login .section .login_body #login-form .password-reset a,
section.login .section .login_body #form-signup .password-reset a,
section.login .section .login_body #request-password-reset-form .password-reset a,
section.login .section .login_body #reset-password-form .password-reset a {
    color: #0f766e;
}
section.login .section .login_body #login-form .socials_login a,
section.login .section .login_body #form-signup .socials_login a,
section.login .section .login_body #request-password-reset-form .socials_login a,
section.login .section .login_body #reset-password-form .socials_login a {
    border: 1px solid #0f766e;
}
section.cabinet_table .section .table_div .filter .item_filter .inputs input:focus,
.grid-view .list_operations thead .filters input:focus,
.modal-wrapper-update-device-modal:focus,
select#page_size:focus {
    border-color: #0f766e;
}
section.cabinet_table .section .table_div .filter .item_filter .SumoSelect .optWrapper .opt:hover {
    color: #0f766e;
}
section.cabinet_table .section .table_div .table_div_body table.list_operations tr td.type span i {
    color: #0f766e;
}
section.cabinet .section .section_top .tabs a {
    border: 1px solid #0f766e;
}
section.cabinet .section .section_top .tabs a.active {
    background-color: #0f766e;
}
section.cabinet .section .section_body .home_page .tabs a {
    border: 1px solid #0f766e;
}
section.cabinet .section .section_body .home_page .tabs a.active {
    background-color: #0f766e;
}
section.cabinet .section .section_body .home_page .price_blocks .price_block_p i {
    color: #0f766e;
}
section.cabinet .section .section_body .home_page .price_blocks .price_block_p p {
    background-color: #0f766e;
}
section.cabinet .section .section_body .home_page .price_blocks .price_block_p span.sum {
    color: #0f766e;
}
section.cabinet .section .section_body .home_page .load_doc {
    border: 1px dashed #0f766e;
}
section.cabinet .section .section_body .home_page .deals.deals_change .deal_div:hover {
    border: 1px dashed #0f766e;
}
section.cabinet .section .section_body .home_page .deals.deals_change .deal_div:hover span, section.cabinet .section .section_body .home_page .deals.deals_change .deal_div:hover i {
    color: #0f766e;
}
section.cabinet .section .section_body .home_page .deals.deals_change .deal_div.active span, section.cabinet .section .section_body .home_page .deals.deals_change .deal_div.active i {
    color: #0f766e;
}
section.cabinet .section .section_body .home_page .deals .deal_div.deal_div_add:hover {
    border: 1px dashed #0f766e;
}
section.cabinet .section .section_body .home_page .deals .deal_div.deal_div_add:hover .add_deal span, section.cabinet .section .section_body .home_page .deals .deal_div.deal_div_add:hover .add_deal i {
    color: #0f766e;
}
section.cabinet .section .section_body .home_page .home_page_block.active {
    border: 1px solid #0f766e;
}
section.cabinet .section .section_body .home_page .home_page_block.active .home_page_block_body .form-group input[type=text], section.cabinet .section .section_body .home_page .home_page_block.active .home_page_block_body .form-group select, section.cabinet .section .section_body .home_page .home_page_block.active .home_page_block_body .form-group input[type=password] {
    border: 1px solid #0f766e;
}
section.cabinet .section .section_body .home_page .home_page_block .doc_items .doc_item.doc_item_word > i, section.cabinet .section .section_body .home_page .home_page_block .doc_items .doc_item.doc_item_doc > i, section.cabinet .section .section_body .home_page .home_page_block .doc_items .doc_item.doc_item_docx > i {
    color: #0f766e;
}
section.cabinet .section .section_body .home_page .home_page_block .doc_items .doc_item .change_file .bx-download {
    color: #0f766e;
}
section.cabinet .section .section_body .home_page .home_page_block .home_page_block_body .table_generate .table_head {
    background-color: #0f766e;
}
section.cabinet .section .section_body .home_page .home_page_block .home_page_block_body .table_generate .table_item .table_it {
    border-right: 1px solid #0f766e;
}
footer .section ul li a:hover {
    color: #0f766e;
}
footer .section ul li a.link_all {
    color: #0f766e;
}
.modal .modal_top span {
    color: #0f766e;
}
.modal .modal_body .SumoSelect .CaptionCont {
    border: 1px solid #0f766e;
}
.modal .modal_body .SumoSelect .optWrapper .opt:hover {
    color: #0f766e;
}
.modal .modal_body .doc_items .doc_item.doc_item_word > i, .modal .modal_body .doc_items .doc_item.doc_item_doc > i, .modal .modal_body .doc_items .doc_item.doc_item_docx > i {
    color: #0f766e;
}
.modal .modal_body .doc_items .doc_item .change_file .bx-download {
    color: #0f766e;
}
.modal .modal_body .load_doc {
    border: 1px dashed #0f766e;
}
.modal .modal_body form select {
    border: 1px solid #0f766e;
}
.modal .modal_body form input[type=text], .modal .modal_body form input[type=email], .modal .modal_body form input[type=password], .modal .modal_body form input[type=number], .modal .modal_body form input[type=date], .modal .modal_body form input[type=time], .modal .modal_body form input[type=datetime-local], .modal .modal_body form input[type=file], .modal .modal_body form input[type=card_number], .modal .modal_body form input[type=tel], .modal .modal_body form #requisitesform-number, .modal .modal_body form #requisites-number {
    border: solid 1px #0f766e;
}
.modal .modal_footer p a {
    color: #0f766e;
}
.styled-grid .filters input:focus,
.styled-grid .filters select:focus {
    border-color: #0f766e;
}
.box-success .box-header i {
    color: #0f766e;
}
.box-success .slimScrollDiv .chat .item a {
    color: #0f766e;
}
.box-success .box-footer .input-group button {
    border: 1px solid #0f766e;
    background-color: #0f766e;
}
.pagination li.active a, .pagination li.active span {
    background-color: #0f766e;
    border-color: #0f766e;
}
.pagination li:not(.active) > a:hover, .pagination li:not(.active) > a:focus,
.pagination li:not(.active) > span:hover,
.pagination li:not(.active) > span:focus {
    color: #0f766e;
}
input:checked + .slider {
    background-color: #0f766e;
}
.modal.qr_modal .modal_top span {
    color: #0f766e;
}
#confirmModal .confirm-yes {
    background-color: #0f766e !important;
}
.modal.stats_modal .stats-section h3 {
    color: #0f766e;
}
.sms_message_modal .modal_top {
    color: #0f766e;
}
.sms_message_modal .modal_body .control-label {
    color: #0f766e;
}
.copy-button {
    color: #0f766e;
}

/* ---------- из btn.css ---------- */
.btn-primary {
    background-color: #0f766e;
    border-color: #0f766e;
}
.btn-primary.disabled, .btn-primary:disabled {
    background-color: #0f766e;
    border-color: #0f766e;
}
.btn-outline-primary {
    color: #0f766e;
    border-color: #0f766e;
}
.btn-outline-primary:hover {
    background-color: #0f766e;
    border-color: #0f766e;
}
.btn-outline-primary.disabled, .btn-outline-primary:disabled {
    color: #0f766e;
}
.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn-outline-primary.dropdown-toggle {
    background-color: #0f766e;
    border-color: #0f766e;
}
.btn-link {
    color: #0f766e;
}

/* ---------- из filters.css ---------- */
.list_operations .requisite_filter_link:hover {
    color: #0f766e;
    border-bottom-color: #0f766e;
}

/* ---------- из dark.css ---------- */
[data-theme="dark"] input:checked + .slider {
    background-color: #0f766e !important;
}
[data-theme="dark"] .styled-pager li.active a,
[data-theme="dark"] .styled-pager li.active span {
    background-color: #0f766e !important;
}
[data-theme="dark"] .list_operations input:focus,
[data-theme="dark"] .list_operations select:focus {
    border-color: #0f766e !important;
}
[data-theme="dark"] section.cabinet_table .section .table_div .filter .item_filter .inputs input:focus,
[data-theme="dark"] .grid-view .list_operations thead .filters input:focus,
[data-theme="dark"] .modal-wrapper-update-device-modal:focus,
[data-theme="dark"] select#page_size:focus {
    border-color: #0f766e !important;
}

/* ---------- Шапка ---------- */

/* Меню с правым блоком не помещались в 1200px: «Активные ордеры» переносились
   на две строки и шапка становилась в полтора раза выше. Даём всю ширину */
@media (min-width: 993px) {
    header .section {
        max-width: none;
        padding: 0 28px;
        gap: 20px;
    }

    header .section .header_left ul {
        margin-left: 0;
        flex-wrap: nowrap;
        gap: 2px;
    }

    header .section .header_left ul li a {
        padding: 20px 10px;
        margin-left: 0;
        white-space: nowrap;
        font-size: 14px;
    }
}

/* Правый блок: почта, выход, тема и язык на одной линии и одной высоты */
header .section .header_right {
    gap: 10px;
}

header .section .header_right .user a {
    white-space: nowrap;
}

header .section .header_right .icon a,
header .section .header_right #theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #e6e8ef;
    border-radius: 8px;
    background: #fff;
    color: #4b5675;
}

header .section .header_right .icon a:hover,
header .section .header_right #theme-toggle:hover {
    border-color: #0f766e;
    color: #0f766e;
    background: #f4f8f8;
}

header .section .header_right .language-selector select {
    height: 34px;
    border: 1px solid #e6e8ef;
    border-radius: 8px;
    background: #fff;
    color: #4b5675;
    font-weight: 600;
    padding: 0 8px;
}

[data-theme="dark"] header .section .header_right .icon a,
[data-theme="dark"] header .section .header_right #theme-toggle,
[data-theme="dark"] header .section .header_right .language-selector select {
    background: #1c1f26;
    border-color: #2c303a;
    color: #dce2f2;
}

/* На окне поуже меню упиралось в правый блок и растягивало страницу.
   Теперь оно ужимается, а при совсем узком окне прокручивается внутри шапки */
@media (min-width: 993px) {
    header .section .header_left-wrap,
    header .section .header_left {
        min-width: 0;
        flex: 1 1 auto;
    }

    header .section .header_left ul {
        min-width: 0;
    }

    header .section .header_right {
        flex: 0 0 auto;
    }
}

@media (min-width: 993px) and (max-width: 1460px) {
    header .section {
        padding: 0 16px;
        gap: 12px;
    }

    header .section .header_left ul li a {
        padding: 20px 7px;
        font-size: 13.5px;
    }
}

/* В тёмной теме у пунктов меню снизу светилась белая рамка из main.css */
[data-theme="dark"] header .section .header_left ul li a {
    border-bottom-color: transparent;
}

[data-theme="dark"] header .section .header_left ul li a.active {
    border-bottom-color: #2dd4bf;
    color: #2dd4bf;
}

[data-theme="dark"] header .section .header_left .nav-group__btn.active {
    border-bottom-color: #2dd4bf;
    color: #2dd4bf;
}

[data-theme="dark"] header .section .header_left ul li a:hover,
[data-theme="dark"] header .section .header_left .nav-group__btn:hover {
    color: #2dd4bf;
}

/* У неактивных пунктов меню белая рамка снизу давала лишние чёрточки */
header .section .header_left ul li a {
    border-bottom-color: transparent;
}

header .section .header_left ul li a.active {
    border-bottom-color: #0f766e;
}

/* ---------- Левая панель навигации ---------- */

.cab-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 240px;
    padding: 18px 12px 24px;
    overflow-y: auto;
    background: #1b2b33;
    z-index: 40;
    scrollbar-width: thin;
}

.cab-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cab-nav__group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 14px;
}

.cab-nav__caption {
    padding: 0 12px 4px;
    color: #7c8f97;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cab-nav__link {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #b6c7cc;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cab-nav__link:hover {
    background: #253a44;
    color: #fff;
    text-decoration: none;
}

.cab-nav__link.active {
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.55), rgba(15, 118, 110, 0.22));
    color: #fff;
}

.cab-sidebar__backdrop {
    display: none;
}

/* Десктоп: шапка и содержимое начинаются за панелью */
@media (min-width: 1104px) {
    header .section,
    .container .right_container {
        margin-left: 240px;
    }

    header .section {
        max-width: none;
        padding: 0 28px;
    }

    .menu__hamburger {
        display: none;
    }
}

/* Узкие экраны: панель выезжает по кнопке, фон затемняется */
@media (max-width: 1103px) {
    .cab-sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
    }

    body.sidebar-open .cab-sidebar {
        transform: none;
    }

    body.sidebar-open .cab-sidebar__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(17, 31, 37, 0.45);
    }
}

/* Шапка: название текущего раздела слева, блок пользователя справа */
header .section {
    min-height: 56px;
}

.header_title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2430;
    white-space: nowrap;
}

[data-theme="dark"] .header_title {
    color: #e8eaf0;
}

/* Раньше на мобильном скрывали .header_left вместе с меню.
   Меню переехало в левую панель, поэтому оставляем там заголовок раздела */
@media (max-width: 1103px) {
    .header_left {
        display: flex !important;
        align-items: center;
    }

    .header_title {
        font-size: 15px;
    }
}

/* Плашки страхового депозита заданы в шаблонах светлым фоном — в тёмной теме
   они выглядели наклейками, поэтому перебиваем */
[data-theme="dark"] .deposit-security {
    background-color: #20242c !important;
    color: #b9c2d0 !important;
}

/* Всплывающее уведомление об успехе было светло-зелёным — в тёмной теме слепило */
[data-theme="dark"] .alert.alert-success {
    background-color: #123a2a;
    border-color: #1c5a41;
    color: #7ee2b8;
}

[data-theme="dark"] .alert.alert-success .alert-container,
[data-theme="dark"] .alert.alert-success .alert-info,
[data-theme="dark"] .alert.alert-success .alert-icon,
[data-theme="dark"] .alert.alert-success span {
    color: #7ee2b8;
}

/* В тёмной теме кое-где оставались светлые рамки из основной темы */
[data-theme="dark"] section.cabinet_table .section .table_div,
[data-theme="dark"] section.cabinet .section .table_div,
[data-theme="dark"] .table_div,
[data-theme="dark"] .table_div_top,
[data-theme="dark"] header,
[data-theme="dark"] .modal_top,
[data-theme="dark"] .grid-view th,
[data-theme="dark"] .grid-view td,
[data-theme="dark"] table th,
[data-theme="dark"] table td {
    border-color: #2a2f3a;
}

/* ---------- Подтверждение входа и настройка 2FA ---------- */

/* стили формы входа завязаны на конкретные id, поэтому повторяем их для нашей формы */
section.login .section .login_body #mfa-verify-form {
    margin-top: 24px;
}

section.login .section .login_body #mfa-verify-form .form-control {
    width: 100%;
    height: 43px;
    border: 1px solid #dbdfe9;
    background-color: #fff;
    border-radius: 5px;
    text-indent: 12px;
    font-size: 16px;
    letter-spacing: 0.18em;
}

section.login .section .login_body #mfa-verify-form .form-control:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    outline: none;
}

section.login .section .login_body #mfa-verify-form .invalid-feedback {
    padding: 5px 0;
    color: #da3f3f;
}

section.login .section .login_body #mfa-verify-form .btn {
    width: 100%;
    height: 43px;
    margin-top: 6px;
}

section.login .mfa-hint {
    margin: 10px 0 0;
    color: #78829d;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

section.login .mfa-hint:first-of-type {
    margin: 0;
}

/* страница настройки: шаги, QR и подтверждение */
.mfa-setup {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

.mfa-setup .rq-head__title {
    margin-bottom: 6px;
}

.mfa-steps {
    margin: 18px 0;
    padding-left: 20px;
    text-align: left;
    color: #4b5675;
    font-size: 14px;
    line-height: 1.7;
}

.mfa-qr {
    display: flex;
    justify-content: center;
    padding: 16px;
    margin: 0 auto 14px;
    width: max-content;
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
}

.mfa-secret {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 14px;
    background: #f1f2f5;
    border-radius: 8px;
    font-size: 14px;
    letter-spacing: 0.08em;
    word-break: break-all;
}

.mfa-confirm {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.mfa-input {
    height: 42px;
    min-width: 200px;
    padding: 0 14px;
    border: 1px solid #e6e8ef;
    border-radius: 8px;
    font-size: 16px;
    letter-spacing: 0.18em;
}

.mfa-input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    outline: none;
}

.mfa-result {
    margin-top: 12px;
    font-size: 14px;
    min-height: 20px;
}

.mfa-result.is-ok { color: #0f8a4a; }
.mfa-result.is-error { color: #c62828; }

[data-theme="dark"] .mfa-qr {
    background: #ffffff;
    border-color: #2c303a;
}

[data-theme="dark"] .mfa-secret {
    background: #262a33;
    color: #e8eaf0;
}

[data-theme="dark"] .mfa-input,
[data-theme="dark"] section.login .section .login_body #mfa-verify-form .form-control {
    background: #1c1f26;
    border-color: #2c303a;
    color: #e8eaf0;
}

[data-theme="dark"] .mfa-steps { color: #b9c2d0; }

/* при наведении main.css возвращал синий — держим акцент темы */
a.blue-button:hover,
button.blue-button:hover,
input[type=button].blue-button:hover {
    background-color: #115e59;
    border-color: #115e59;
    background: #115e59;
    color: #ffffff;
}

.deposit .payin-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-self: end;
    padding-left: 18px;
    border-left: 1px solid #e1e5ea;
}
.deposit .payin-rate span {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}
.deposit .payin-rate p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    color: #1E3A5F;
    white-space: nowrap;
}
.deposit .payin-rate p i {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: #757575;
}
.deposit .payin-rate small {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    color: #757575;
    white-space: nowrap;
}
.deposit .payin-rate small b {
    font-weight: 600;
    color: #333;
    margin-left: 6px;
}
[data-theme="dark"] .deposit .payin-rates {
    border-left-color: #2a2f3a;
}
[data-theme="dark"] .deposit .payin-rate span {
    color: #8d97a6;
}
[data-theme="dark"] .deposit .payin-rate p {
    color: #e3e8ef;
}
[data-theme="dark"] .deposit .payin-rate p i,
[data-theme="dark"] .deposit .payin-rate small {
    color: #9aa3b2;
}
[data-theme="dark"] .deposit .payin-rate small b {
    color: #e3e8ef;
}
