.bd-placeholder-img {
    font-size: 1.125rem;
    text-anchor: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

@media (min-width: 768px) {
    .bd-placeholder-img-lg {
        font-size: 3.5rem;
    }
}

.rp-topbar {
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    backdrop-filter: blur(8px);
    min-height: 72px;
    position: sticky;
    top: 0;
    z-index: 1040;
    width: 100%;
}

.rp-navbar-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 40px;
    line-height: 0;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
    min-height: 44px;
    margin: 0;
    padding: 0;
}

.rp-navbar-brand img {
    display: block;
    height: 34px;
    width: auto;
    vertical-align: middle;
    transform: translateY(1px);
}

.rp-brand__rub {
    color: #ffffff;
}

.rp-brand__pay {
    color: #a4adba;
}

.rp-topbar .navbar-nav {
    gap: 4px;
}

.rp-topbar .nav-link {
    color: rgba(226, 232, 240, 0.86);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.rp-topbar .nav-link:hover,
.rp-topbar .nav-link.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.18);
}

.rp-topbar .nav-link svg,
.rp-topbar .nav-link i {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.rp-topbar .dropdown-menu {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
}

.rp-topbar__toggler {
    border-color: rgba(148, 163, 184, 0.4);
    z-index: 2002;
}

.rp-topbar__toggler:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

/* Slightly wider layout containers (still not full-width) */
@media (min-width: 576px) {
    .container,
    .container-sm {
        max-width: min(620px, calc(100vw - 28px));
    }
}

@media (min-width: 768px) {
    .container,
    .container-sm,
    .container-md {
        max-width: min(820px, calc(100vw - 32px));
    }
}

@media (min-width: 992px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg {
        max-width: min(1100px, calc(100vw - 36px));
    }
}

@media (min-width: 1200px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        max-width: min(1320px, calc(100vw - 44px));
    }
}

@media (min-width: 1400px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        max-width: min(1520px, calc(100vw - 52px));
    }
}

/* Unified button theme: neutral + one accent */
.btn {
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.18s ease;
    border-width: 1px;
}

.btn:focus,
.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn.btn-primary,
.btn.btn-success {
    color: #ffffff;
    background-color: #10b981;
    border-color: #10b981;
}

.btn.btn-primary:hover,
.btn.btn-success:hover {
    color: #ffffff;
    background-color: #0ea271;
    border-color: #0ea271;
}

.btn.btn-dark,
.btn.btn-secondary,
.btn.btn-info {
    color: #f8fafc;
    background-color: #1e293b;
    border-color: #1e293b;
}

.btn.btn-dark:hover,
.btn.btn-secondary:hover,
.btn.btn-info:hover {
    color: #ffffff;
    background-color: #0f172a;
    border-color: #0f172a;
}

.btn.btn-warning,
.btn.btn-light {
    color: #0f172a;
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn.btn-warning:hover,
.btn.btn-light:hover {
    color: #020617;
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.btn.btn-danger {
    color: #ffffff;
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn.btn-danger:hover {
    color: #ffffff;
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.btn.btn-outline-primary,
.btn.btn-outline-success {
    color: #0ea271;
    border-color: #10b981;
}

.btn.btn-outline-primary:hover,
.btn.btn-outline-success:hover {
    color: #ffffff;
    background-color: #10b981;
    border-color: #10b981;
}

.btn.btn-outline-dark,
.btn.btn-outline-secondary,
.btn.btn-outline-info {
    color: #1e293b;
    border-color: #334155;
}

.btn.btn-outline-dark:hover,
.btn.btn-outline-secondary:hover,
.btn.btn-outline-info:hover {
    color: #ffffff;
    background-color: #1e293b;
    border-color: #1e293b;
}

.btn.btn-outline-warning,
.btn.btn-outline-light {
    color: #334155;
    border-color: #cbd5e1;
}

.btn.btn-outline-warning:hover,
.btn.btn-outline-light:hover {
    color: #0f172a;
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.btn.btn-outline-danger {
    color: #b91c1c;
    border-color: #dc2626;
}

.btn.btn-outline-danger:hover {
    color: #ffffff;
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.58;
}

/* Pagination in brand palette */
.pagination {
    gap: 6px;
}

.pagination .page-item .page-link {
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    transition: all 0.18s ease;
}

.pagination .page-item .page-link:hover {
    color: #0f172a;
    background: #f1f5f9;
    border-color: #94a3b8;
}

.pagination .page-item.active .page-link {
    color: #ffffff;
    background: #10b981;
    border-color: #10b981;
}

.pagination .page-item.disabled .page-link {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.rp-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    margin-bottom: 1rem;
}

.rp-table-wrap .table-rp {
    margin-bottom: 0;
    min-width: 920px;
}

.rp-table-wrap .table-rp thead th {
    background: #f8fafc;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
}

.rp-table-wrap .table-rp th,
.rp-table-wrap .table-rp td {
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.75rem 0.85rem;
    border-color: #eef2f7;
}

.rp-table-wrap .table-rp tbody tr:hover {
    background: #f8fafc;
}

.rp-table-wrap .table-rp tbody tr:nth-child(even) {
    background: #fcfdff;
}

/* Same table language for admin/traders tables without wrapper */
.table.table-rp thead th {
    background: #f8fafc !important;
    color: #1e293b !important;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0 !important;
}

.table.table-rp th,
.table.table-rp td {
    vertical-align: middle;
    border-color: #eef2f7 !important;
}

.table.table-rp {
    --bs-table-bg: #ffffff;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: #fcfdff;
    --bs-table-hover-bg: #f8fafc;
    --bs-table-striped-color: #0f172a;
    --bs-table-hover-color: #0f172a;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.table.table-rp > :not(caption) > * > * {
    background-color: #ffffff !important;
    box-shadow: none !important;
    padding: 0.72rem 0.85rem;
}

.table.table-rp tbody tr:nth-child(even) > * {
    background: #fcfdff !important;
}

.table.table-rp tbody tr:hover > * {
    background: #f8fafc !important;
}

.table.table-rp .table-success > *,
.table.table-rp .table-warning > *,
.table.table-rp .table-danger > *,
.table.table-rp .table-info > *,
.table.table-rp .table-secondary > * {
    background: inherit !important;
    color: inherit !important;
    box-shadow: none !important;
}

.table.table-rp tbody tr:hover {
    background: #f8fafc;
}

.rp-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

.rp-status-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.rp-status-warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.rp-status-danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.rp-status-info {
    color: #1e3a8a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.rp-status-secondary {
    color: #334155;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.rp-status-primary {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.rp-status-dark {
    color: #0f172a;
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.rp-status-light {
    color: #475569;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.rp-status-white {
    color: #334155;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.rp-rates-widget {
    position: relative;
}

.rp-rates-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rp-rates-menu {
    min-width: 260px;
    padding: 0;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.rp-rates-menu__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #0f172a;
    color: #f8fafc;
    font-weight: 600;
}

.rp-rates-menu__head small {
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

.rp-rates-menu__body {
    padding: 8px;
    background: #ffffff;
}

.rp-rate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 8px;
    border-bottom: 1px solid #eef2f7;
    font-size: 13px;
    color: #334155;
}

.rp-rate-row:last-child {
    border-bottom: 0;
}

.rp-rate-row strong {
    font-size: 14px;
    color: #0f172a;
}

.trader-payouts-disabled {
    position: relative;
    min-height: calc(100vh - 210px);
    margin: 24px 0 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.trader-payouts-disabled__background {
    position: relative;
    padding: 28px;
    filter: blur(4px);
    transform: scale(1.015);
    transform-origin: center;
    opacity: 0.62;
    pointer-events: none;
    user-select: none;
}

.trader-payouts-disabled__background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.18), rgba(248, 250, 252, 0.78)),
        radial-gradient(circle at 18% 12%, rgba(16, 185, 129, 0.18), transparent 32%),
        radial-gradient(circle at 86% 20%, rgba(37, 99, 235, 0.14), transparent 34%);
}

.trader-payouts-disabled__toolbar,
.trader-payouts-disabled__filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.trader-payouts-disabled__tabs,
.trader-payouts-disabled__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trader-payouts-disabled__tab,
.trader-payouts-disabled__export,
.trader-payouts-disabled__filters span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.trader-payouts-disabled__tab--active,
.trader-payouts-disabled__export {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
}

.trader-payouts-disabled__export svg,
.trader-payouts-disabled__export i {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.trader-payouts-disabled__filters {
    justify-content: flex-start;
}

.trader-payouts-disabled__filters span {
    min-width: 120px;
    justify-content: flex-start;
    color: #64748b;
}

.trader-payouts-disabled__table {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.trader-payouts-disabled__row {
    display: grid;
    grid-template-columns: 0.7fr 1.1fr 1.5fr 1fr 1fr 1fr;
    min-height: 54px;
    border-bottom: 1px solid #eef2f7;
}

.trader-payouts-disabled__row:last-child {
    border-bottom: 0;
}

.trader-payouts-disabled__row span {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    color: #64748b;
}

.trader-payouts-disabled__row--head span {
    background: #f8fafc;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.trader-payouts-disabled__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(248, 250, 252, 0.18);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.trader-payouts-disabled__notice {
    width: min(560px, 100%);
    padding: 34px 36px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.trader-payouts-disabled__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: 50%;
    color: #0f766e;
    background: #ccfbf1;
    border: 1px solid #99f6e4;
}

.trader-payouts-disabled__icon svg,
.trader-payouts-disabled__icon i {
    width: 27px;
    height: 27px;
}

.trader-payouts-disabled__eyebrow {
    margin: 0 0 8px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.trader-payouts-disabled__notice h1 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
}

.trader-payouts-disabled__text {
    margin: 14px auto 0;
    max-width: 420px;
    color: #475569;
    font-size: 15px;
    line-height: 1.55;
}

.rp-table-wrap::-webkit-scrollbar {
    height: 8px;
}

.rp-table-wrap::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.rp-table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

.rp-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@media (max-width: 992px) {
    .rp-topbar > .container {
        width: 100%;
        max-width: 100%;
    }

    .rp-navbar-brand {
        min-height: 38px;
    }

    .rp-navbar-brand img {
        height: 28px;
        transform: translateY(0);
    }

    .rp-topbar .navbar-collapse {
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.24);
        border-radius: 12px;
        margin-top: 10px;
        padding: 10px;
    }

    .rp-topbar .navbar-nav.ms-auto {
        margin-left: 0 !important;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid rgba(148, 163, 184, 0.2);
    }

    .rp-topbar .nav-link {
        font-size: 16px;
        padding: 10px 12px;
    }

    .rp-rates-menu {
        min-width: min(280px, calc(100vw - 24px));
    }

    .rp-table-wrap {
        margin-bottom: 0.75rem;
    }

    .rp-table-wrap .table-rp {
        min-width: 760px;
    }

    .rp-table-wrap .table-rp thead th {
        font-size: 12px;
        padding: 0.65rem 0.7rem;
    }

    .rp-table-wrap .table-rp td {
        font-size: 13px;
        padding: 0.65rem 0.7rem;
    }

    /* Mobile tables: single horizontal scroll only on wrapper */
    .rp-table-wrap {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: auto;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
    }

    .rp-table-wrap > .table.table-rp {
        display: table;
        width: max-content;
        min-width: 760px;
        margin-bottom: 0;
        white-space: nowrap;
    }

    .rp-table-wrap > .table.table-rp > :not(caption) {
        display: table-row-group;
        width: auto;
        min-width: 0;
    }

    body {
        overflow-x: hidden;
    }

    /* Prevent tiny page overflow from non-table layout blocks */
    html,
    body,
    .rp-topbar,
    .container,
    .footer-nav {
        max-width: 100vw;
    }

    /* footer-nav uses .row outside .container -> negative gutters can widen page */
    .footer-nav {
        overflow-x: hidden;
    }

    .footer-nav .row {
        margin-left: 0;
        margin-right: 0;
        --bs-gutter-x: 0;
    }

    .footer-nav [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .trader-payouts-disabled {
        min-height: 560px;
        margin-top: 16px;
    }

    .trader-payouts-disabled__background {
        padding: 18px;
    }

    .trader-payouts-disabled__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .trader-payouts-disabled__tab,
    .trader-payouts-disabled__export,
    .trader-payouts-disabled__filters span {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .trader-payouts-disabled__filters span {
        min-width: 96px;
    }

    .trader-payouts-disabled__row {
        grid-template-columns: 0.7fr 1fr 1.2fr 0.9fr 1fr 1fr;
        min-width: 720px;
    }

    .trader-payouts-disabled__table {
        overflow-x: hidden;
    }

    .trader-payouts-disabled__notice {
        padding: 28px 20px;
    }

    .trader-payouts-disabled__notice h1 {
        font-size: 22px;
    }
}

@media (min-width: 992px) {
    .rp-topbar .container {
        display: flex;
        align-items: center;
    }

    .rp-topbar .navbar-brand {
        margin-right: 18px;
    }

    .rp-topbar .navbar-nav:first-child {
        margin-left: 8px;
    }
}

.rp-topbar__toggler {
    margin-left: auto;
}

/* Keep bootstrap modal layer above any custom sticky/fixed UI */
.modal-backdrop {
    z-index: 1050;
}

.modal {
    z-index: 1060;
}

/* Strong override for helper pagination */
nav[aria-label="Pages"] .pagination {
    gap: 6px !important;
    margin-top: 12px;
    margin-bottom: 12px;
}

nav[aria-label="Pages"] .pagination .page-item .page-link {
    color: #1e293b !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    min-width: 38px;
    text-align: center;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: none !important;
}

nav[aria-label="Pages"] .pagination .page-item .page-link:hover {
    color: #0f172a !important;
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

nav[aria-label="Pages"] .pagination .page-item.active .page-link {
    color: #ffffff !important;
    background: rgba(37, 99, 235, 0.9) !important;
    border-color: #2563eb !important;
}

nav[aria-label="Pages"] .pagination .page-item.disabled .page-link {
    color: #94a3b8 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

@media (max-width: 767.98px) {
    nav[aria-label="Pages"] {
        max-width: 100%;
        overflow: hidden;
    }

    nav[aria-label="Pages"] .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px !important;
        margin-top: 10px;
        margin-bottom: 10px;
        max-width: 100%;
    }

    nav[aria-label="Pages"] .pagination .page-item .page-link {
        min-width: 34px;
        padding: 0.35rem 0.45rem;
    }

    /* Usually first/last elements are "Назад" / "Далее" */
    nav[aria-label="Pages"] .pagination .page-item:first-child,
    nav[aria-label="Pages"] .pagination .page-item:last-child {
        display: none;
    }
}

/* Admin users page */
.admin-users-toolbar {
    display: grid;
    grid-template-columns: auto minmax(420px, 1fr) minmax(280px, 420px);
    align-items: end;
    gap: 12px;
}

.admin-users-toolbar > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    min-height: 38px;
}

.admin-users-filter-panel {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.admin-users-filter-field {
    min-width: 0;
}

.admin-users-filter-field--role {
    flex: 0 1 230px;
}

.admin-users-filter-field--active {
    flex: 0 1 auto;
}

.admin-users-filter-label {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.admin-users-select {
    position: relative;
}

.admin-users-select svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 16px;
    height: 16px;
    color: #64748b;
    pointer-events: none;
    transform: translateY(-50%);
}

.admin-users-select .form-select {
    min-height: 38px;
    padding-left: 36px;
    font-size: 14px;
}

.admin-users-segmented {
    position: relative;
    display: inline-flex;
    min-height: 38px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-users-segmented .btn-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-users-segmented label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 74px;
    padding: 7px 12px;
    border-right: 1px solid #cbd5e1;
    color: #334155;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.admin-users-segmented label:last-child {
    border-right: 0;
}

.admin-users-segmented label svg {
    width: 15px;
    height: 15px;
}

.admin-users-segmented input:checked + label {
    background: #0f172a;
    color: #ffffff;
}

.admin-users-segmented input:focus-visible + label {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

.admin-users-reset-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding-left: 11px;
    padding-right: 11px;
    white-space: nowrap;
}

.admin-users-search {
    min-width: 220px;
    max-width: none;
}

.admin-users-search .form-control {
    min-width: 0;
}

.admin-users-search .input-group-text {
    background: #ffffff;
}

.admin-users-table-wrap {
    margin-bottom: 14px;
}

.admin-users-table {
    min-width: 980px;
}

.admin-users-id {
    font-weight: 700;
    color: #0f172a;
}

.admin-users-name {
    font-weight: 700;
    color: #0f172a;
}

.admin-users-login {
    color: #475569;
    font-size: 13px;
}

.admin-users-comment-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
    padding: 2px 8px;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-users-comment-full {
    color: #1e293b;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-users-contact {
    color: #334155;
    font-size: 13px;
}

.admin-users-contact span {
    color: #64748b;
}

.admin-users-telegram-short {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.admin-users-telegram-btn {
    margin-left: 6px;
    padding: 2px 8px;
    line-height: 1.2;
}

.admin-users-telegram-empty {
    color: #94a3b8;
}

.admin-users-telegram-full {
    word-break: break-word;
    white-space: normal;
    color: #1e293b;
}

.admin-users-balance {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.admin-users-balance-value {
    white-space: nowrap;
}

.admin-users-balance-value--positive {
    color: #15803d !important;
}

.admin-users-balance-value--negative {
    color: #dc2626 !important;
}

.admin-users-balance-value--zero {
    color: #64748b !important;
}

.admin-users-balance-meta {
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}

.admin-users-features {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.admin-users-feature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.admin-users-feature svg {
    width: 17px;
    height: 17px;
}

.admin-users-feature--on {
    color: #15803d;
}

.admin-users-feature--off {
    color: #cbd5e1;
}

.admin-users-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-users-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.admin-users-summary__item {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 10px 12px;
}

.admin-users-summary__item span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 4px;
}

.admin-users-summary__item strong {
    color: #0f172a;
    font-size: 16px;
}

@media (max-width: 992px) {
    .admin-users-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .admin-users-search {
        min-width: 0;
    }

    .admin-users-filter-panel {
        align-items: stretch;
    }

    .admin-users-filter-field--role,
    .admin-users-filter-field--active {
        flex: 1 1 100%;
    }

    .admin-users-segmented {
        display: flex;
        width: 100%;
    }

    .admin-users-segmented label {
        flex: 1 1 0;
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    .admin-users-reset-filter {
        width: 100%;
    }

    .admin-users-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Projects page */
.projects-table {
    min-width: 1120px;
}

.projects-table th:nth-child(3) {
    width: 280px;
}

.projects-id {
    font-weight: 700;
    color: #0f172a;
}

.projects-name {
    font-weight: 700;
    color: #0f172a;
}

.projects-url {
    color: #64748b;
    font-size: 13px;
}

.projects-api-cell {
    width: 280px;
    max-width: 280px;
    min-width: 280px;
    white-space: normal !important;
}

.projects-api-key {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.projects-api-key__value {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.4;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.projects-api-key__actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.projects-api-key__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.18s ease;
}

.projects-api-key__btn:hover {
    color: #0f172a;
    background: #f8fafc;
    border-color: #94a3b8;
}

.projects-api-key__btn svg,
.projects-api-key__icon svg {
    width: 16px;
    height: 16px;
}

.projects-api-key__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.projects-api-key__icon--hide {
    display: none;
}

.projects-api-key.is-visible .projects-api-key__icon--show {
    display: none;
}

.projects-api-key.is-visible .projects-api-key__icon--hide {
    display: inline-flex;
}

.projects-api-key__empty {
    color: #94a3b8;
    font-size: 13px;
}

.projects-balance {
    font-weight: 700;
    color: #0f172a;
}

.projects-balance-meta {
    color: #64748b;
    font-size: 13px;
}

.projects-balance-empty {
    color: #94a3b8;
    font-size: 13px;
}

/* Trader cards page */
.trader-cards-page {
    margin-top: 20px;
}

.trader-cards-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin: 22px 0 12px;
}

.trader-cards-heading__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.trader-cards-heading h1 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}

.trader-cards-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.trader-cards-toolbar__actions .btn,
.trader-cards-filters .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    white-space: nowrap;
}

.trader-cards-toolbar__actions .btn svg,
.trader-cards-filters .btn svg,
.trader-cards-search svg {
    width: 16px;
    height: 16px;
}

.trader-cards-filters {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 180px auto auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.trader-cards-search .input-group-text {
    color: #64748b;
    background: #ffffff;
}

.trader-cards-table-wrap {
    margin-bottom: 12px;
}

.trader-cards-table {
    min-width: 1240px;
}

.trader-cards-table th,
.trader-cards-table td {
    white-space: normal !important;
}

.trader-cards-table th:nth-child(1) {
    width: 270px;
}

.trader-cards-table th:nth-child(3),
.trader-cards-table th:nth-child(4) {
    width: 150px;
}

.trader-cards-table th:nth-child(5) {
    width: 130px;
}

.trader-cards-table th:nth-child(6) {
    width: 170px;
}

.trader-cards-table th:nth-child(7) {
    width: 118px;
}

.trader-cards-table th:nth-child(8) {
    width: 184px;
}

.trader-cards-table td:nth-child(7),
.trader-cards-table td:nth-child(8) {
    white-space: nowrap !important;
}

.trader-cards-card {
    min-width: 0;
}

.trader-cards-card__meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.trader-cards-card__meta span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.trader-cards-card__meta strong {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.3;
    word-break: break-word;
}

.trader-cards-requisites {
    display: grid;
    gap: 5px;
}

.trader-cards-requisite {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.trader-cards-requisite span {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.trader-cards-requisite strong {
    color: #1e293b;
    font-size: 13px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.trader-cards-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.trader-cards-methods span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #1e3a8a;
    background: #eff6ff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.trader-cards-bank,
.trader-cards-limits {
    color: #0f172a;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.trader-cards-muted {
    color: #64748b;
    font-size: 12px;
}

.trader-cards-metric {
    min-width: 0;
}

.trader-cards-metric__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    font-variant-numeric: tabular-nums;
}

.trader-cards-metric__head strong {
    color: #0f172a;
    font-size: 14px;
}

.trader-cards-metric__head span {
    color: #64748b;
    font-size: 12px;
}

.trader-cards-progress {
    display: block;
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.trader-cards-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #10b981;
}

.trader-cards-progress--blue span {
    background: #2563eb;
}

.trader-cards-counterparties {
    max-width: 150px;
    margin-top: 6px;
    color: #334155;
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trader-cards-counterparties__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.trader-cards-counterparties__stats span {
    display: inline-flex;
    padding: 2px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
    line-height: 1.3;
}

.trader-cards-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.18s ease;
}

.trader-cards-status svg {
    width: 14px;
    height: 14px;
}

.trader-cards-status--success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.trader-cards-status--success:hover {
    background: #dcfce7;
}

.trader-cards-status--warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.trader-cards-status--warning:hover {
    background: #fef3c7;
}

.trader-cards-status--danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.trader-cards-status--danger:hover {
    background: #fee2e2;
}

.trader-cards-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
}

.trader-cards-actions .btn.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
}

.trader-cards-actions svg {
    width: 14px;
    height: 14px;
}

.trader-cards-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 90px;
    color: #64748b;
    font-weight: 600;
}

.trader-cards-empty svg {
    width: 18px;
    height: 18px;
}

.trader-cards-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.trader-cards-settings-grid .mb-3 {
    margin-bottom: 0 !important;
}

.trader-cards-settings-form .form-label {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.trader-cards-stats-box {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.trader-card-method-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trader-card-method-picker__item {
    min-height: 34px;
    margin: 0;
    padding: 7px 10px 7px 34px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
}

.trader-card-method-picker__item .form-check-input {
    margin-top: 2px;
    margin-left: -24px;
}

.trader-card-method-picker__item .form-check-label {
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
}

.trader-card-requisite-field.is-hidden {
    display: none;
}

@media (max-width: 992px) {
    .trader-cards-toolbar {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .trader-cards-toolbar__actions {
        justify-content: flex-start;
    }

    .trader-cards-filters {
        grid-template-columns: minmax(220px, 1fr) 180px auto;
    }

    .trader-cards-table {
        min-width: 1240px;
    }
}

@media (max-width: 767.98px) {
    .trader-cards-page {
        margin-top: 14px;
    }

    .trader-cards-heading h1 {
        font-size: 22px;
    }

    .trader-cards-toolbar__actions .btn,
    .trader-cards-filters .btn {
        width: 100%;
    }

    .trader-cards-filters {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .trader-cards-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Trader payins / payouts pages */
.trader-deals-page {
    margin-top: 20px;
}

.trader-deals-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin: 22px 0 12px;
}

.trader-deals-heading__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.trader-deals-heading h1 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}

.trader-deals-toolbar__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.trader-deals-toolbar__actions .btn,
.trader-deals-export-form .btn,
.trader-deals-filters .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    white-space: nowrap;
}

.trader-deals-toolbar__actions svg,
.trader-deals-export-form svg,
.trader-deals-filters svg {
    width: 16px;
    height: 16px;
}

.trader-deals-collapse {
    margin-bottom: 12px;
}

.trader-deals-panel {
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.trader-deals-export-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

.trader-deals-filters {
    display: grid;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.trader-deals-filters--payins {
    grid-template-columns: minmax(170px, 220px) minmax(150px, 190px) minmax(150px, 220px) minmax(130px, 170px) auto;
}

.trader-deals-filters--payouts {
    grid-template-columns: minmax(170px, 220px) minmax(150px, 190px) minmax(150px, 210px) minmax(130px, 160px) minmax(180px, 220px) auto;
}

.trader-deals-filters .input-group-text {
    color: #64748b;
    background: #ffffff;
}

.trader-deals-active-filters {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: -2px 0 12px;
}

.trader-deals-filter-chip,
.trader-deals-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.trader-deals-filter-chip:hover,
.trader-deals-filter-reset:hover {
    color: #0f172a;
    background: #f8fafc;
    border-color: #94a3b8;
}

.trader-deals-filter-chip svg {
    width: 13px;
    height: 13px;
}

.trader-deals-filter-reset {
    color: #64748b;
    background: #f8fafc;
}

.trader-deals-table-wrap {
    margin-bottom: 12px;
}

.trader-deals-table {
    min-width: 1040px;
}

.trader-deals-table--payouts {
    min-width: 1120px;
}

.trader-deals-table th,
.trader-deals-table td {
    white-space: normal !important;
}

.trader-deals-table th:nth-child(1) {
    width: 110px;
}

.trader-deals-table th:nth-child(2) {
    width: 180px;
}

.trader-deals-table th:nth-child(3) {
    width: 170px;
}

.trader-deals-table th:nth-child(4) {
    width: 140px;
}

.trader-deals-table th:nth-child(5) {
    width: 170px;
}

.trader-deals-table th:nth-child(6) {
    width: 140px;
}

.trader-deals-table th:nth-child(7) {
    width: 160px;
}

.trader-deals-table--payouts th:nth-child(2) {
    width: 150px;
}

.trader-deals-table--payouts th:nth-child(3) {
    width: 260px;
}

.trader-deals-id {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.trader-deals-id strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
}

.trader-deals-mood {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
}

.trader-deals-mood svg {
    width: 14px;
    height: 14px;
}

.trader-deals-mood--success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.trader-deals-mood--warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.trader-deals-mood--danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.trader-deals-method {
    color: #0f172a;
    font-weight: 700;
}

.trader-deals-requisite {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.trader-deals-requisite strong {
    color: #0f172a;
    font-size: 13px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.trader-deals-requisite span {
    color: #64748b;
    font-size: 12px;
}

.trader-deals-requisite__line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.trader-deals-requisite__line strong {
    min-width: 0;
}

.trader-deals-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155 !important;
    background: #f8fafc;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1;
}

.trader-deals-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
}

.trader-deals-copy:hover {
    color: #0f172a;
    border-color: #94a3b8;
    background: #f8fafc;
}

.trader-deals-copy svg {
    width: 14px;
    height: 14px;
}

.trader-deals-amount {
    display: grid;
    gap: 4px;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.trader-deals-amount strong {
    font-size: 14px;
    font-weight: 700;
}

.trader-deals-amount__old {
    color: #94a3b8;
    font-size: 12px;
    text-decoration: line-through;
}

.trader-deals-fee {
    display: inline-flex;
    width: fit-content;
    padding: 2px 7px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #166534;
    background: #f0fdf4;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.trader-deals-date {
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.trader-deals-date__meta,
.trader-deals-status-meta {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.trader-deals-status-meta--danger {
    color: #b91c1c;
}

.trader-deals-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.trader-deals-actions .btn.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
}

.trader-deals-actions svg {
    width: 15px;
    height: 15px;
}

.trader-deals-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 90px;
    color: #64748b;
    font-weight: 600;
}

.trader-deals-empty svg {
    width: 18px;
    height: 18px;
}

.trader-deals-modal-form .form-label {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

/* Trader balance page */
.trader-balance-page {
    margin-top: 20px;
}

.trader-balance-alert {
    margin: 16px 0 0;
}

.trader-balance-page .btn {
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.trader-balance-page .btn-sm {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
}

.trader-balance-page .form-control,
.trader-balance-page .form-select {
    min-height: 42px;
    border-color: #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.trader-balance-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin: 22px 0 12px;
}

.trader-balance-heading__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.trader-balance-heading h1 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}

.trader-balance-toolbar__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.trader-balance-toolbar__actions .btn,
.trader-balance-export-form .btn,
.trader-balance-filters .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    white-space: nowrap;
}

.trader-balance-toolbar__actions svg,
.trader-balance-export-form svg,
.trader-balance-filters svg,
.trader-balance-actions svg {
    width: 16px;
    height: 16px;
}

.trader-balance-summary {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, .8fr);
    gap: 10px;
    margin-bottom: 12px;
}

.trader-balance-account-card {
    display: grid;
    grid-template-columns: minmax(116px, .24fr) minmax(0, 1fr);
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.trader-balance-account-card__cell {
    display: grid;
    align-content: center;
    gap: 5px;
    min-height: 86px;
    padding: 13px 14px;
    border-left: 1px solid #e2e8f0;
}

.trader-balance-account-card__cell:first-child {
    border-left: 0;
}

.trader-balance-account-card__cell span,
.trader-balance-rate-card > span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.trader-balance-account-card__cell strong {
    display: block;
    color: #0f172a;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.trader-balance-account-card__cell--available strong {
    font-size: 24px;
}

.trader-balance-tariffs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.25;
}

.trader-balance-tariffs span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-transform: none;
}

.trader-balance-tariffs b {
    color: #334155;
    font-weight: 700;
}

.trader-balance-available-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.trader-balance-available-main {
    display: grid;
    gap: 2px;
}

.trader-balance-available-row .trader-balance-actions {
    margin-top: 0;
    margin-left: auto;
}

.trader-balance-metrics {
    display: grid;
    gap: 1px;
}

.trader-balance-metrics__row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    color: #64748b;
}

.trader-balance-metrics__row span {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}

.trader-balance-metrics__row b {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.trader-balance-rate-card {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 86px;
    padding: 13px 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.trader-balance-rate-card strong {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    color: #0f172a;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.trader-balance-rate-card p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.trader-balance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 5px;
}

.trader-balance-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trader-balance-wallet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.trader-balance-wallet__info {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.trader-balance-wallet__label {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.trader-balance-wallet__address {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.trader-balance-wallet__address a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #0f172a;
    font-size: 13px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trader-balance-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
}

.trader-balance-copy:hover {
    color: #0f172a;
    background: #f8fafc;
    border-color: #94a3b8;
}

.trader-balance-copy svg {
    width: 15px;
    height: 15px;
}

.trader-balance-warning {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.trader-balance-warning svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.trader-balance-wallet__qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 118px;
    height: 118px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.trader-balance-wallet__qr img {
    display: block;
    width: 100%;
    height: 100%;
}

.trader-balance-collapse {
    margin-bottom: 12px;
}

.trader-balance-collapse--top .trader-balance-panel {
    width: min(620px, 100%);
    margin-left: auto;
}

.trader-balance-panel {
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.trader-balance-export-form,
.trader-balance-filters {
    display: grid;
    align-items: end;
    gap: 10px;
}

.trader-balance-export-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
}

.trader-balance-filters {
    grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) auto auto;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.trader-balance-table {
    min-width: 900px;
}

.trader-balance-table th:nth-child(1) {
    width: 110px;
}

.trader-balance-table th:nth-child(2) {
    width: 210px;
}

.trader-balance-table th:nth-child(3) {
    width: 220px;
}

.trader-balance-table th:nth-child(4) {
    width: 170px;
}

.trader-balance-id {
    color: #0f172a;
    font-weight: 700;
}

.trader-balance-aml {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 3px 7px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1e3a8a;
    background: #eff6ff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.trader-balance-payment {
    display: grid;
    gap: 3px;
}

.trader-balance-payment strong {
    color: #0f172a;
    font-size: 13px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    overflow-wrap: anywhere;
}

.trader-balance-payment span {
    color: #64748b;
    font-size: 12px;
}

.trader-balance-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.trader-balance-amount--positive {
    color: #15803d;
}

.trader-balance-amount--negative {
    color: #dc2626;
}

.trader-balance-amount--neutral {
    color: #0f172a;
}

.trader-balance-date {
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.trader-balance-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 90px;
    color: #64748b;
    font-weight: 600;
}

.trader-balance-empty svg {
    width: 18px;
    height: 18px;
}

#sendMoneyModal .form-label,
#withdrawMoneyModal .form-label {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

@media (max-width: 992px) {
    .trader-deals-toolbar {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .trader-deals-toolbar__actions {
        justify-content: flex-start;
    }

    .trader-deals-export-form,
    .trader-deals-filters--payins,
    .trader-deals-filters--payouts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trader-deals-export-form .btn,
    .trader-deals-filters .btn {
        width: 100%;
    }

    .trader-balance-toolbar {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .trader-balance-toolbar__actions {
        justify-content: flex-start;
    }

    .trader-balance-summary {
        grid-template-columns: 1fr;
    }

    .trader-balance-account-card {
        grid-template-columns: minmax(116px, .24fr) minmax(0, 1fr);
    }

    .trader-balance-collapse--top .trader-balance-panel {
        width: 100%;
        margin-left: 0;
    }

    .trader-balance-export-form,
    .trader-balance-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trader-balance-export-form .btn,
    .trader-balance-filters .btn {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .trader-deals-page {
        margin-top: 14px;
    }

    .trader-deals-heading h1 {
        font-size: 22px;
    }

    .trader-deals-export-form,
    .trader-deals-filters--payins,
    .trader-deals-filters--payouts {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .trader-balance-page {
        margin-top: 14px;
    }

    .trader-balance-heading h1 {
        font-size: 22px;
    }

    .trader-balance-summary,
    .trader-balance-account-card,
    .trader-balance-wallet,
    .trader-balance-export-form,
    .trader-balance-filters {
        grid-template-columns: 1fr;
    }

    .trader-balance-account-card__cell {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .trader-balance-account-card__cell:first-child {
        border-top: 0;
    }

    .trader-balance-available-row .trader-balance-actions {
        width: 100%;
        margin-left: 0;
    }

    .trader-balance-rate-card strong {
        font-size: 24px;
    }

    .trader-balance-wallet__qr {
        width: 110px;
        height: 110px;
    }
}

/* Payins page */
.payins-table-wrap {
    border-radius: 0;
}

.payins-table {
    min-width: 1180px;
}

.payins-maincell__id,
.payins-maincell__order {
    display: block;
    text-decoration: none;
}

.payins-maincell__id {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 2px;
}

.payins-maincell__order {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.payins-amounts {
    min-width: 190px;
}

.payins-amounts__main {
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.payins-amounts__credited,
.payins-amounts__first {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.payins-table .badge {
    border-radius: 0;
}

.payins-table .btn.btn-sm {
    padding: 0.34rem 0.58rem;
}

.payins-page .pagination {
    margin-top: 8px;
}

.payins-check-link,
.payouts-check-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
}

.payins-check-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.payins-check-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.payins-check-link svg,
.payouts-check-link svg {
    width: 16px;
    height: 16px;
}

.payins-check-copy svg {
    width: 16px;
    height: 16px;
}

.payins-check-link:hover,
.payouts-check-link:hover,
.payins-check-copy:hover {
    color: #0f172a;
}

.payouts-check-summary {
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    line-height: 1;
}

button.payouts-check-summary {
    cursor: pointer;
}

.payouts-check-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #1e293b;
    font-size: 11px;
    font-weight: 700;
}

/* Payouts table */
.payouts-table {
    min-width: 1060px;
}

.payouts-maincell__id,
.payouts-maincell__order {
    display: block;
}

.payouts-maincell__id {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.payouts-maincell__order {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.payouts-api-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    color: #475569;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
}

.payouts-amounts {
    min-width: 220px;
}

.payouts-amounts__main {
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.payouts-amounts__credited,
.payouts-amounts__meta {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.payouts-gate-menu {
    max-height: min(320px, calc(100vh - 16px));
    overflow-y: auto;
    z-index: 1060;
}

.payouts-gate-menu.show {
    position: fixed !important;
    transform: none !important;
}

.payouts-info-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.payouts-receipt-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.payouts-receipt-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    text-decoration: none;
    background: #f8fafc;
}

.payouts-receipt-item:hover {
    color: #0f172a;
    border-color: #94a3b8;
}

/* Payouts page toolbar */
@media (max-width: 992px) {
    .rp-rates-widget,
    .rp-rates-toggle {
        width: 100%;
    }
}

/* Mobile modal layout: no horizontal overflow */
@media (max-width: 767.98px) {
    .modal-dialog,
    .modal-dialog.modal-xl,
    .modal-dialog.modal-lg {
        max-width: calc(100vw - 12px);
        margin: 6px auto;
    }

    .modal-content {
        width: 100%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 12px;
    }

    .modal-title {
        font-size: 16px;
        line-height: 1.25;
    }

    .modal-body {
        overflow-x: hidden;
    }

    .modal-body img,
    .modal-body video,
    .modal-body iframe {
        max-width: 100%;
        height: auto;
    }

    .modal-body .table,
    .modal-body .table.table-rp {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    .modal-body .table th,
    .modal-body .table td,
    .modal-body .table.table-rp th,
    .modal-body .table.table-rp td {
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .modal-body .table.table-rp > :not(caption) > * > * {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        max-width: 100% !important;
        padding-left: 10px;
        padding-right: 10px;
    }

    .modal-body .modal-tariff-table {
        border: 0;
        background: transparent;
    }

    .modal-body .modal-tariff-table tbody tr {
        display: block;
        margin-bottom: 8px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
    }

    .modal-body .modal-tariff-table tbody tr td {
        display: block;
        width: 100% !important;
        border: 0 !important;
        border-top: 1px solid #e2e8f0 !important;
        background: transparent !important;
        padding: 9px 10px !important;
    }

    .modal-body .modal-tariff-table tbody tr td:first-child {
        border-top: 0 !important;
    }

    .modal-body .modal-tariff-table tbody tr:not(.tariff-section-row) td:nth-child(1)::before,
    .modal-body .modal-tariff-table tbody tr:not(.tariff-section-row) td:nth-child(2)::before,
    .modal-body .modal-tariff-table tbody tr:not(.tariff-section-row) td:nth-child(3)::before {
        display: block;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #64748b;
        margin-bottom: 3px;
    }

    .modal-body .modal-tariff-table tbody tr:not(.tariff-section-row) td:nth-child(1)::before {
        content: "Метод";
    }

    .modal-body .modal-tariff-table tbody tr:not(.tariff-section-row) td:nth-child(2)::before {
        content: "Лимит";
    }

    .modal-body .modal-tariff-table tbody tr:not(.tariff-section-row) td:nth-child(3)::before {
        content: "Комиссия";
    }

    .modal-body .modal-tariff-table tbody tr.tariff-section-row {
        margin: 12px 0 6px;
        border: 0;
        background: transparent;
    }

    .modal-body .modal-tariff-table tbody tr.tariff-section-row td {
        border: 0 !important;
        padding: 0 2px 6px !important;
        background: transparent !important;
    }

    .modal-body .modal-tariff-table .tariff-section-spacer {
        display: none;
    }

    .modal-body .form-control,
    .modal-body .form-select,
    .modal-body input,
    .modal-body textarea,
    .modal-body select {
        max-width: 100%;
    }

    .modal-body .btn-group {
        display: flex;
        width: 100%;
    }

    .modal-footer {
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .payouts-table {
        min-width: 820px;
    }

    .payouts-table th,
    .payouts-table td {
        white-space: normal !important;
        vertical-align: top;
        font-size: 12px;
        line-height: 1.3;
        padding: 0.55rem 0.45rem !important;
    }

    .payouts-maincell__order {
        font-size: 12px;
    }
}
