#walletModal .modal-dialog {
    max-width: 550px;
}

#walletModal .modal-content {
    color: #cdd3e6;
    border-radius: 14px;
    padding: 8px 4px;
    width: 550px;
    min-height: 220px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

#walletModal .modal-content:has(.wallet-body-fixed) {
    min-height: 420px;
}

#walletModal .modal-header {
    border-bottom: none;
    align-items: center;
    padding: 8px 12px;
    display: flex;
    justify-content: center;
    position: relative;      
}

#walletModal .modal-title {
    color: #fff;
    font-size: 18px;
    margin: 0;
    text-align: center;
    width: 100%;
}

#walletModal .modal-header .close-btn {
    position: absolute !important;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0A0B29;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23fff"><path d="M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z" fill="%23ffffff000"/></svg>');
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 25%;
    width: 26px;
    height: 26px;
    opacity: 0.85;
    cursor: pointer;
    padding: 0;
    margin: 0 !important;
    z-index: 10;
    transition: opacity 0.2s ease;
}

#walletModal .modal-header .close-btn:hover {
    opacity: 1;
}

#walletModal .modal-header .close-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

#walletModal .modal-body {
    padding: 2px 12px 8px;
    flex: 1;
    min-height: auto;
    overflow: visible;
}

.wallet-body-fixed {
    height: 380px;
    overflow: hidden;
}

@media (max-width: 760px) {
    #walletModal .modal-dialog {
        max-width: 100%;
        margin: 10px;
    }
    #walletModal .modal-content {
        width: 100%;
        min-height: auto;
        max-height: 95vh;
        padding: 6px 2px;
        overflow-y: auto;
    }
    #walletModal .modal-body {
        padding: 2px 8px 8px;
        min-height: auto;
        overflow: visible;
    }
    .wallet-body-fixed {
        height: auto;
        overflow: visible;
    }

    .wallet-filters-row {
        flex-wrap: wrap;
        gap: 8px;
        position: relative;
    }
    .wallet-filters-row .wallet-currency-dd-wrap {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }
    .wallet-filters-row .wallet-calendar-wrap {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }
    .wallet-filters-row .wallet-calendar-btn {
        width: 100%;
        height: 36px;
        border-radius: 6px;
    }
    .wallet-filters-row .wallet-calendar-list {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }
    .wallet-dd-list {
        max-width: calc(100vw - 32px);
    }
    .wallet-tx-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: #1c2240;
        border: 1px solid #2a3156;
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 8px;
        font-size: 13px;
    }
    .wallet-tx-row:last-child {
        margin-bottom: 0;
    }
    .wallet-tx-row > span {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .wallet-tx-row > span::before {
        content: attr(data-label);
        color: #8b91ab;
        font-size: 11px;
        flex-shrink: 0;
    }
    .wallet-row {
        gap: 8px;
        margin-bottom: 8px;
    }
    .wallet-qr-block {
        flex-direction: column;
        align-items: center;
    }
    .wallet-tabs {
        margin: 0 8px 10px;
        gap: 3px;
    }
    .wallet-tab {
        font-size: 11px;
        padding: 6px 0;
    }
    .wallet-qr {
        width: 160px;
        height: 160px;
    }
    .wallet-copy-notification {
        font-size: 10px;
        bottom: -18px;
    }
    #walletModal .modal-body {
        padding: 2px 8px 8px;
        min-height: auto;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .wallet-filters-row .wallet-currency-dd-wrap {
        flex: 1 1 100%;
    }
    .wallet-filters-row .wallet-calendar-wrap {
        flex: 1 1 100%;
    }
    .wallet-calendar-wrap .wallet-calendar-btn {
        width: 100%;
    }
    .wallet-filters-row .wallet-calendar-list {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }
    .wallet-tx-row {
        font-size: 12px;
        padding: 8px 10px;
    }
}

.wallet-tabs {
    display: flex;
    gap: 4px;
    background: #181e38;
    border-radius: 10px;
    padding: 4px;
    margin: 0 12px 14px;
}

.wallet-tab {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #8b91ab;
    padding: 9px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.wallet-tab:focus,
.wallet-tab:focus-visible {
    outline: none;
}

.wallet-tab.is-active {
    background: linear-gradient(180deg, rgba(54, 117, 170, 1) 0%, rgba(37, 67, 105, 1) 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.wallet-tab:not(.is-active):hover {
    color: #fff;
}

.wallet-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.wallet-row:last-child {
    margin-bottom: 0;
}

.wallet-field {
    flex: 1;
    margin-bottom: 12px;
    position: relative;
}

.wallet-field:last-child {
    margin-bottom: 0;
}

.wallet-row .wallet-field {
    margin-bottom: 0;
}

.wallet-field label {
    display: block;
    font-size: 12px;
    color: #8b91ab;
    margin-bottom: 4px;
}

.wallet-field__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    min-height: 18px;
}

.wallet-field__head label {
    font-size: 12px;
    color: #8b91ab;
    margin: 0;
    line-height: 18px;
    display: block;
    padding: 0;
}

.wallet-available {
    font-size: 12px;
    color: #8b91ab;
    line-height: 1.2;
}

.wallet-available span {
    color: #fff;
    font-weight: 500;
}

.wallet-input,
.wallet-currency-dd__trigger,
.wallet-copy-field,
.wallet-calendar-btn {
    background: #181e38;
    border: none;
    outline: 2px solid gray;
    border-radius: 7px;
    color: #cdd3e6;
    font-size: 13px;
    font-family: inherit;
    height: 36px;
    box-sizing: border-box;
}

.wallet-currency-dd__trigger:focus,
.wallet-currency-dd__trigger:focus:not(:focus-visible),
.wallet-calendar-btn:focus,
.wallet-calendar-btn:focus:not(:focus-visible) {
    outline: 2px solid gray;
}

.wallet-input {
    width: 100%;
    padding: 8px 12px;
    line-height: 1.2;
}

.wallet-input:hover,
.wallet-currency-dd__trigger:hover,
.wallet-copy-field:hover,
.wallet-calendar-btn:hover {
    outline: 2px solid rgb(160, 160, 160);
}

.wallet-input:focus,
.wallet-currency-dd.is-open .wallet-currency-dd__trigger,
.wallet-copy-field:focus-within,
.wallet-calendar-btn:focus {
    outline: 2px solid lightgray;
}

.wallet-currency-dd {
    position: relative;
    width: 100%;
}

.wallet-currency-dd__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    width: 100%;
}

.wallet-currency-dd__left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.wallet-currency-dd__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.wallet-currency-dd__icon,
.wallet-currency-dd__item-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wallet-currency-dd__icon[src=""],
.wallet-currency-dd__icon:not([src]),
.wallet-currency-dd__icon[src="#"] {
    display: none !important;
}

.wallet-currency-dd__chevron {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 4px 0 4px;
    border-color: gray transparent transparent transparent;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.wallet-currency-dd:hover .wallet-currency-dd__chevron {
    border-color: rgb(160, 160, 160) transparent transparent transparent;
}

.wallet-currency-dd.is-open .wallet-currency-dd__chevron {
    border-width: 0 4px 5px 4px;
    border-color: transparent transparent lightgray transparent;
}

.wallet-currency-dd__list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #181e38;
    border: none;
    outline: 2px solid lightgray;
    border-radius: 7px;
    padding: 6px;
    z-index: 1060;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.wallet-currency-dd.is-open .wallet-currency-dd__list {
    display: block;
}

.wallet-currency-dd__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #cdd3e6;
    transition: background 0.2s ease;
}

.wallet-currency-dd__item:hover {
    background: #242c53;
}

.wallet-currency-dd__item.is-selected {
    color: #fff;
    font-weight: 600;
}

.wallet-copy-field {
    display: flex;
    align-items: center;
    padding: 2px 6px 2px 12px;
    height: 36px;
}

.wallet-copy-field input {
    flex: 1;
    background: transparent;
    border: none;
    color: #cdd3e6;
    font-size: 12px;
    padding: 6px 0;
    cursor: pointer;
    font-family: monospace;
    letter-spacing: 0.3px;
    outline: none;
}

.wallet-copy-btn {
    background: transparent;
    border: none;
    color: #8b91ab;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.wallet-copy-btn:hover {
    color: #ffffff;
}

.wallet-copy-btn svg {
    width: 16px;
    height: 16px;
}

.wallet-copy-notification {
    position: absolute;
    bottom: auto;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #4caf6b;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.wallet-copy-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.wallet-qr-block {
    display: flex;
    flex-direction: column;
    align-items: center;    
    justify-content: center;
    gap: 16px;
    text-align: center;    
}

.wallet-qr {
    width: 200px;
    height: 200px;
    background: #fff;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wallet-qr img,
.wallet-qr canvas,
.wallet-qr table {
    width: 100% !important;
    height: 100% !important;
}

.wallet-warning {
    font-size: 13px;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.wallet-warning b,
.wallet-strong {
    font-weight: 700;
    color: #fff;
}

.wallet-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    margin-bottom: 0;
}

.wallet-btn--primary {
    background: #4caf6b;
    color: #fff;
}

.wallet-btn--primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.wallet-btn--primary:not(:disabled):hover {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.wallet-field__error {
    display: none;
    color: #dc143c;
    font-size: 11px;
    margin-top: 6px;
    min-height: 16px;
    animation: fadeIn 0.3s ease;
}

.wallet-field.has-error .wallet-input {
    border-color: #dc143c;
}

.wallet-field.has-error .wallet-field__error {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wallet-subtitle {
    color: #8b91ab;
    font-size: 12px;
    margin: 0 0 8px;
}

.wallet-calendar-wrap {
    position: relative;
}

.wallet-calendar-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8b91ab;
}

.wallet-calendar-btn svg {
    width: 16px;
    height: 16px;
}

.wallet-dd-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 190px;
    background: #181e38;
    border: none;
    outline: 2px solid lightgray;
    border-radius: 7px;
    padding: 6px;
    z-index: 1060;
    display: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.wallet-dd-list.is-open {
    display: block;
}

.wallet-dd-item {
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #cdd3e6;
    transition: background 0.2s ease;
}

.wallet-dd-item:hover {
    background: #242c53;
}

.wallet-dd-item.is-selected {
    color: #fff;
    font-weight: 600;
}

.wallet-calendar-custom {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 6px 4px;
}

.wallet-calendar-custom.is-open {
    display: flex;
}

.wallet-calendar-date {
    flex: 1 1 60px;
    min-width: 0;
    background: #181e38;
    border: 1px solid #333c5c;
    border-radius: 6px;
    color: #cdd3e6;
    font-size: 11px;
    padding: 4px 6px;
    box-sizing: border-box;
    color-scheme: dark;
}

.wallet-calendar-sep {
    color: #656c88;
    font-size: 11px;
}

.wallet-calendar-error {
    flex-basis: 100%;
    color: #dc143c;
    font-size: 11px;
    min-height: 14px;
}

.wallet-calendar-apply {
    flex-basis: 100%;
    background: #4caf6b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wallet-calendar-apply:hover {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.wallet-tx-list {
    background: #181e38;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.wallet-tx-list::-webkit-scrollbar {
    width: 4px;
}

.wallet-tx-list::-webkit-scrollbar-track {
    background: #181e38;
    border-radius: 8px;
}

.wallet-tx-list::-webkit-scrollbar-thumb {
    background: #333c5c;
    border-radius: 8px;
}

.wallet-tx-list::-webkit-scrollbar-thumb:hover {
    background: #cdd3e6;
}

.wallet-tx-row {
    display: grid;
    grid-template-columns: 1fr 0.5fr 0.8fr 0.9fr 1.1fr 1.4fr;
    gap: 6px;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    border-bottom: 1px solid #232a45;
    font-variant-numeric: tabular-nums;
}

.wallet-tx-row:last-child {
    border-bottom: none;
}

.wallet-tx-row > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.wallet-tx-status--completed { color: #4caf6b; }
.wallet-tx-status--processing { color: #e0a83c; animation: pulse 2s infinite; }
.wallet-tx-status--failed,
.wallet-tx-status--cancelled { color: #dc143c; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.wallet-tx-empty {
    padding: 20px;
    text-align: center;
    color: #656c88;
    font-size: 13px;
}

.wallet-transactions-wrapper {
    display: flex;
    gap: 4px;
    flex-direction: column;
}

.wallet-transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.wallet-transactions-header .wallet-subtitle {
    margin: 0;
}

.wallet-filters-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
}

.wallet-filters-row .wallet-currency-dd-wrap {
    flex: 1;
    min-width: 0;
}

.wallet-filters-row .wallet-calendar-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.wallet-currency-dd-wrap {
    display: flex;
    flex-direction: column;
}

.wallet-filters-row .wallet-currency-dd-wrap label {
    display: none;
}

.wallet-calendar-wrap .wallet-calendar-btn {
    width: 36px;
    height: 36px;
    border: none;
    outline: 2px solid gray;
    border-radius: 7px;
    background: #181e38;
    color: #8b91ab;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.wallet-calendar-wrap .wallet-calendar-btn:hover {
    color: #fff;
    outline: 2px solid rgb(160, 160, 160);
}

.wallet-calendar-wrap .wallet-calendar-btn:focus {
    outline: 2px solid lightgray;
}

.wallet-calendar-wrap .wallet-calendar-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.wallet-tx-list-wrapper {
    margin-top: 2px;
}

.wallet-currency-dd-wrap .wallet-currency-dd {
    width: 100%;
}

.wallet-currency-dd-wrap .wallet-currency-dd__trigger {
    height: 36px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.wallet-currency-dd-wrap .wallet-currency-dd__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-available-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8b91ab;
    line-height: 1;
}

.wallet-available-left .wallet-available-label {
    color: #8b91ab;
    line-height: 1;
}

.wallet-available-left .wallet-available-value {
    color: #fff;
    font-weight: 600;
    line-height: 1;
}

@media (max-width: 760px) {
    .wallet-filters-row {
        flex-wrap: wrap;
        gap: 8px;
        position: relative;
    }
    .wallet-filters-row .wallet-currency-dd-wrap {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }
    .wallet-filters-row .wallet-calendar-wrap {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }
    .wallet-filters-row .wallet-calendar-btn {
        width: 100%;
        height: 36px;
        border-radius: 6px;
    }
    .wallet-filters-row .wallet-calendar-list {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }
    .wallet-dd-list {
        max-width: calc(100vw - 32px);
    }
    .wallet-tx-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: #1c2240;
        border: 1px solid #2a3156;
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 8px;
        font-size: 13px;
    }
    .wallet-tx-row:last-child {
        margin-bottom: 0;
    }
    .wallet-tx-row > span {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .wallet-tx-row > span::before {
        content: attr(data-label);
        color: #8b91ab;
        font-size: 11px;
        flex-shrink: 0;
    }
    .wallet-row {
        gap: 8px;
        margin-bottom: 8px;
    }
    .wallet-qr-block {
        flex-direction: column;
        align-items: center;
    }
    .wallet-tabs {
        margin: 0 8px 10px;
        gap: 3px;
    }
    .wallet-tab {
        font-size: 11px;
        padding: 6px 0;
    }
    .wallet-qr {
        width: 160px;
        height: 160px;
    }
    .wallet-copy-notification {
        font-size: 10px;
        bottom: -18px;
    }
    #walletModal .modal-body {
        padding: 2px 8px 8px;
        min-height: auto;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .wallet-filters-row .wallet-currency-dd-wrap {
        flex: 1 1 100%;
    }
    .wallet-filters-row .wallet-calendar-wrap {
        flex: 1 1 100%;
    }
    .wallet-calendar-wrap .wallet-calendar-btn {
        width: 100%;
    }
    .wallet-filters-row .wallet-calendar-list {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }
    .wallet-tx-row {
        font-size: 12px;
        padding: 8px 10px;
    }
}

.wallet-row {
    align-items: flex-start;
}

.wallet-field label {
    display: block;
    font-size: 12px;
    color: #8b91ab;
    margin-bottom: 4px;
    min-height: 16px;
    line-height: 1.2;
}

.wallet-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.wallet-field__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    height: 18px;
}

.wallet-field__head label {
    font-size: 12px;
    color: #8b91ab;
    margin: 0;
    line-height: 18px;
    display: block;
    padding: 0;
}

.wallet-available-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8b91ab;
    height: 18px;
}

.wallet-available-left .wallet-available-label {
    color: #8b91ab;
    line-height: 18px;
}

.wallet-available-left .wallet-available-value {
    color: #fff;
    font-weight: 600;
    line-height: 18px;
}

#walletModal .modal-body .wallet-field:last-of-type {
    margin-bottom: 0;
}