.table > :not(caption) > * > * {
    padding-inline: 0.45rem;
}

.exchange-data-table-container {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    overflow: visible;
    direction: inherit;
}

.exchange-data-table-container .dt-container,
.exchange-data-table-container .dt-scroll {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.exchange-data-table-container .dt-scroll-body {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--bs-gray-400, #c4cada) transparent;
    direction: inherit;
}

.exchange-data-table-container .dt-scroll-body thead {
    display: none;
}

.exchange-data-table-container .dt-scroll-body::-webkit-scrollbar {
    height: 0.45rem;
}

.exchange-data-table-container .dt-scroll-body::-webkit-scrollbar-track {
    background: transparent;
}

.exchange-data-table-container .dt-scroll-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--bs-gray-400, #c4cada);
}

/* scrollX splits the grid into a header table and a body table. Both size their columns from
   content (auto layout + nowrap cells) and DataTables copies the body widths onto the header. */
.exchange-resizable-datatable {
    table-layout: auto;
    width: 100%;
    max-width: none;
    margin: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    direction: inherit;
    color: var(--bs-gray-700, #4b5675);
}

.exchange-resizable-datatable thead th {
    padding: 0.9rem 1rem;
    background: var(--bs-gray-100, #f9f9f9);
    border-bottom: 1px solid var(--bs-gray-200, #f1f1f4);
    color: var(--bs-gray-600, #78829d);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: start;
    white-space: nowrap;
}

.exchange-resizable-datatable thead th:first-child {
    border-start-start-radius: 0.75rem;
}

.exchange-resizable-datatable thead th:last-child {
    border-start-end-radius: 0.75rem;
}

.exchange-resizable-datatable tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.exchange-resizable-datatable tbody tr:hover {
    background: var(--bs-primary-light, #eef6ff);
}

.exchange-resizable-datatable tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--bs-gray-200, #f1f1f4);
    vertical-align: middle;
    text-align: start;
}

.exchange-resizable-datatable tbody tr:last-child td {
    border-bottom: 0;
}

.exchange-resizable-datatable tbody td {
    white-space: nowrap;
}

.exchange-resizable-datatable thead th,
.exchange-resizable-datatable tbody td {
    box-sizing: border-box;
}

.exchange-resizable-datatable thead th {
    position: relative;
}

.exchange-copy-value {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    min-height: 2rem;
    padding: 0.2rem 0.4rem;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: start;
}

.exchange-copy-value:hover,
.exchange-copy-value:focus-visible {
    background: var(--bs-primary-light, #eef6ff);
    color: var(--bs-primary, #1b84ff);
}

.exchange-copy-value:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.exchange-copy-value--copied {
    color: var(--bs-success, #17c653);
}

.exchange-copy-value__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exchange-copy-value i {
    flex: 0 0 auto;
}

.exchange-resizable-datatable tbody td:has(.exchange-copy-value) {
    white-space: nowrap;
}

.exchange-resizable-datatable tbody td:has(.exchange-copy-value) .exchange-copy-value {
    max-width: 100%;
}

.exchange-table-date {
    display: inline-block;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Row action buttons (icon + label, rendered by the services) wrap the label under the icon in
   narrow columns, because the cell allows breaks anywhere. Keep each button on one line. */
.table tbody td .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow-wrap: normal;
}

.table tbody td .btn > i {
    flex: 0 0 auto;
    padding: 0;
}

/* Export/filter/column toolbar buttons: a 20px icon only, at every screen size. The label stays
   for screen readers (and the button title gives the tooltip). */
.exchange-data-table-container .dt-container .dt-buttons .btn,
.exchange-data-table-container .dt-container .dt-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0.2rem;
}

.exchange-data-table-container .dt-container .dt-buttons .exchange-table-button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.exchange-data-table-container .dt-container .dt-buttons .dt-colvis.dropdown-toggle::after {
    display: none;
}

.exchange-data-table-container .dt-container .dt-buttons .exchange-table-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.exchange-data-table-container .dt-container .dt-buttons .exchange-table-button-icon--file {
    position: relative;
    width: 17px;
    height: 20px;
    padding-top: 6px;
    border: 1.6px solid currentColor;
    border-radius: 3px;
    font-size: 6px;
    font-weight: 800;
    line-height: 1;
}

.exchange-data-table-container .dt-container .dt-buttons .exchange-table-button-icon--file::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 6px;
    height: 6px;
    border-left: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    background: var(--bs-body-bg, #fff);
}

.exchange-data-table-container .dt-container .dt-buttons .exchange-table-button-icon--columns,
.exchange-data-table-container .dt-container .dt-buttons .exchange-table-button-icon--filter {
    width: 20px;
    height: 20px;
}

@media (max-width: 767.98px) {
    .exchange-data-table-container .exchange-table-toolbar {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.35rem;
        margin-inline: 0;
    }

    .exchange-data-table-container .exchange-table-toolbar > div {
        width: auto;
        min-width: 0;
        padding-inline: 0;
        margin-top: 0 !important;
    }

    .exchange-data-table-container .exchange-table-toolbar > div:first-child {
        flex: 1 1 0;
    }

    .exchange-data-table-container .exchange-table-toolbar > div:first-child > div {
        width: 100%;
        min-width: 0;
    }

    .exchange-data-table-container .exchange-table-toolbar input[type="search"] {
        width: 100%;
        min-width: 0;
        margin-inline: 0 !important;
    }

    .exchange-data-table-container .exchange-table-toolbar > div:last-child {
        flex: 0 0 auto;
    }

    .exchange-data-table-container .exchange-table-toolbar label[for^="dt-search"] {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .exchange-data-table-container {
        margin-inline: 0;
        width: 100%;
    }

    .exchange-resizable-datatable thead th,
    .exchange-resizable-datatable tbody td {
        padding-inline: 0.6rem;
    }

    .exchange-resizable-datatable thead th {
        padding-block: 0.7rem;
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

.exchange-column-resize-handle {
    position: absolute;
    top: 0;
    right: -0.4rem;
    width: 0.8rem;
    height: 100%;
    cursor: col-resize;
    z-index: 3;
    touch-action: none;
}

.exchange-column-resize-handle::after {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: transparent;
    transition: background-color 0.15s ease-in-out;
}

.exchange-resizable-datatable thead th:hover > .exchange-column-resize-handle::after,
.exchange-column-resize-handle:hover::after,
.exchange-column-resizing .exchange-column-resize-handle::after {
    background: var(--bs-primary, #0d6efd);
}

body.exchange-column-resizing-active,
body.exchange-column-resizing-active * {
    cursor: col-resize !important;
    user-select: none !important;
}

.exchange-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 6.25rem;
    justify-content: center;
    padding: 0.4rem 0.7rem;
    border-radius: 0.475rem;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.exchange-status-badge::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
}

.exchange-status-badge--success {
    color: var(--bs-success, #50cd89);
    background: var(--bs-success-light, #e8fff3);
    border-color: rgba(80, 205, 137, 0.22);
}

.exchange-status-badge--danger {
    color: var(--bs-danger, #f1416c);
    background: var(--bs-danger-light, #fff5f8);
    border-color: rgba(241, 65, 108, 0.22);
}

.exchange-status-badge--warning {
    color: var(--bs-warning, #ffc700);
    background: var(--bs-warning-light, #fff8dd);
    border-color: rgba(246, 192, 0, 0.28);
}

.exchange-status-badge--info {
    color: var(--bs-primary, #3e97ff);
    background: var(--bs-primary-light, #eef6ff);
    border-color: rgba(62, 151, 255, 0.2);
}

.exchange-status-badge--primary {
    color: var(--bs-info, #7239ea);
    background: var(--bs-info-light, #f8f5ff);
    border-color: rgba(114, 57, 234, 0.2);
}

.exchange-status-badge--muted {
    color: var(--bs-gray-600, #7e8299);
    background: var(--bs-gray-100, #f9f9f9);
    border-color: var(--bs-gray-200, #f1f1f4);
}

.exchange-status-value {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.exchange-status-value::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

.exchange-status-value--success {
    color: var(--bs-success, #50cd89);
}

.exchange-status-value--danger {
    color: var(--bs-danger, #f1416c);
}

.exchange-status-value--warning {
    color: var(--bs-warning, #f6c000);
}

.exchange-status-value--info {
    color: var(--bs-primary, #3e97ff);
}

.exchange-status-value--primary {
    color: var(--bs-info, #7239ea);
}

.exchange-status-value--muted {
    color: var(--bs-gray-600, #7e8299);
}

.currency-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: var(--bs-gray-100, #f9f9f9);
    color: var(--bs-gray-800, #3f4254);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.currency-icon--unknown {
    color: var(--bs-gray-600, #7e8299);
    border: 1px dashed var(--bs-gray-300, #dbdfe9);
}

.currency-flag-img,
.currency-crypto-img,
.currency-metal-img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    display: inline-block;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(25, 28, 50, 0.12);
    vertical-align: middle;
}

.billing-transactions-insights .card {
    border: 1px solid var(--bs-gray-200, #f1f1f4);
    box-shadow: 0 0.5rem 1.5rem rgba(25, 28, 50, 0.04) !important;
}

.billing-range-card .form-control {
    min-width: 11rem;
}

.billing-summary-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
}

.billing-summary-card .card-body {
    position: relative;
    padding: 1.45rem 1.5rem;
}

.billing-summary-accent {
    display: block;
    width: 2.4rem;
    height: 0.24rem;
    border-radius: 99px;
    margin-bottom: 1rem;
}

.billing-chart-card .card-header {
    min-height: auto;
    border-bottom: 0;
}

.billing-chart-card .card-body {
    min-height: 286px;
}

.billing-empty-insight {
    min-height: 220px;
    border: 1px dashed var(--bs-gray-300, #dbdfe9);
    border-radius: 0.625rem;
    background: var(--bs-gray-100, #f9f9f9);
}

.billing-donut {
    position: relative;
    display: grid;
    place-items: center;
    width: min(220px, 74vw);
    aspect-ratio: 1;
    border-radius: 50%;
    flex: 0 0 auto;
}

.billing-donut::after {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: var(--bs-card-bg, #fff);
    box-shadow: inset 0 0 0 1px var(--bs-gray-200, #f1f1f4);
}

.billing-donut-center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.billing-legend-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex: 0 0 auto;
}

.billing-line-chart {
    width: 100%;
    height: auto;
    min-height: 220px;
}

.billing-chart-axis {
    stroke: var(--bs-gray-300, #dbdfe9);
    stroke-width: 1;
}

.billing-line-area {
    fill: rgba(62, 151, 255, 0.12);
    stroke: none;
}

.billing-line-path {
    fill: none;
    stroke: var(--bs-primary, #3e97ff);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.billing-line-point {
    fill: var(--bs-card-bg, #fff);
    stroke: var(--bs-primary, #3e97ff);
    stroke-width: 3;
}

.billing-chart-label {
    fill: var(--bs-gray-600, #7e8299);
    font-size: 12px;
    font-weight: 600;
}

.billing-bar-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding-top: 0.25rem;
}

.billing-bar-track {
    width: 100%;
    height: 0.65rem;
    border-radius: 99px;
    overflow: hidden;
    background: var(--bs-gray-200, #f1f1f4);
}

.billing-bar-fill {
    height: 100%;
    min-width: 0.45rem;
    border-radius: inherit;
}

@media (max-width: 575.98px) {
    .exchange-status-badge {
        min-width: 5.5rem;
        padding-inline: 0.55rem;
    }

    .billing-chart-card .card-body {
        min-height: auto;
    }
}

/*
 * The "no rows" cell.
 *
 * DataTables spans this cell across every column, so it is the width of the whole grid, but
 * nothing in the theme or the plugin bundle styles .dt-empty -- it inherited the ordinary cell
 * alignment and sat hard against the starting edge of a full-width row, reading as a stray value
 * in the first column rather than a message about the table.
 *
 * text-align is direction-neutral, so this holds in both languages and rtlcss leaves it alone.
 */
.dataTable td.dt-empty,
.dataTable td.dataTables_empty,
table.dataTable td.dt-empty,
table.dataTable td.dataTables_empty {
    text-align: center;
    vertical-align: middle;
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
    color: var(--bs-gray-600, #78829d);
}

@media (max-width: 767.98px) {
    .table-responsive:not(.exchange-data-table-container) {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .exchange-data-table-container .dt-container .dt-layout-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin-block: 0.75rem;
    }

    .exchange-data-table-container .dt-container .dt-layout-cell,
    .exchange-data-table-container .dt-container .dt-search,
    .exchange-data-table-container .dt-container .dt-length {
        width: 100%;
        max-width: 100%;
    }

    .exchange-data-table-container .dt-container .dt-search {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .exchange-data-table-container .dt-container .dt-search input {
        width: 100%;
        min-width: 0;
        margin-inline-start: 0 !important;
    }

    .exchange-data-table-container .dt-container .dt-buttons {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.2rem;
        padding-inline: 0;
    }

    .exchange-data-table-container .dt-container .dt-buttons .btn,
    .exchange-data-table-container .dt-container .dt-buttons button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 36px;
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0.2rem;
    }

    .exchange-data-table-container .dt-container .dt-buttons .exchange-table-button-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .exchange-data-table-container .dt-container .dt-buttons .dt-colvis.dropdown-toggle::after {
        display: none;
    }

    .billing-range-card .card-body {
        padding: 1rem !important;
    }

    .billing-range-card .form-control {
        width: 100%;
        min-width: 0;
    }

    .billing-range-card .btn {
        width: 100%;
    }
}
