/* Современное модальное окно вывода СБП */

#withdrawal-modal {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.withdrawal-modal-modern {
    max-width: 560px;
    width: 95%;
    max-height: 95vh;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.98) 0%, rgba(25, 25, 40, 0.98) 100%);
    border-radius: 24px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.withdrawal-modal-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(102, 126, 234, 0) 0%,
        rgba(102, 126, 234, 0.8) 50%,
        rgba(102, 126, 234, 0) 100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Заголовок */
.withdrawal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
}

.withdrawal-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.withdrawal-icon-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.withdrawal-main-icon {
    color: #667eea;
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.5));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.icon-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

.withdrawal-header-text h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.withdrawal-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: rgba(102, 126, 234, 0.8);
    font-weight: 500;
}

.modern-close-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-close-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.4);
    color: #ff3b30;
    transform: rotate(90deg);
}

/* Тело модального окна */
.withdrawal-modal-body {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(95vh - 120px);
}

.withdrawal-modal-body::-webkit-scrollbar {
    width: 6px;
}

.withdrawal-modal-body::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 3px;
}

.withdrawal-modal-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.withdrawal-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Блок баланса */
.balance-display-modern {
    position: relative;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid rgba(34, 197, 94, 0.4);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 
        0 8px 24px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.balance-gradient-overlay {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
    animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.balance-label-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(34, 197, 94, 0.9);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.balance-label-modern svg {
    width: 18px;
    height: 18px;
}

.balance-amount-modern {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.balance-value {
    font-size: 42px;
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
    animation: numberPulse 2s infinite;
}

@keyframes numberPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.balance-currency {
    font-size: 28px;
    font-weight: 700;
    color: rgba(34, 197, 94, 0.8);
}

/* Информационная карточка */
.withdrawal-info-card {
    display: flex;
    gap: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-icon-wrapper {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.info-icon-wrapper svg {
    color: #667eea;
}

.info-content {
    flex: 1;
}

.info-text {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.info-text strong {
    color: #ffffff;
    font-weight: 600;
}

.info-text-secondary {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.info-text-secondary strong {
    color: rgba(255, 255, 255, 0.9);
}

/* Форма */
.withdrawal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeInUp 0.5s ease both;
}

.form-group-modern:nth-child(1) {
    animation-delay: 0.3s;
}

.form-group-modern:nth-child(2) {
    animation-delay: 0.4s;
}

.form-group-modern:nth-child(3) {
    animation-delay: 0.5s;
}

.form-group-modern:nth-child(4) {
    animation-delay: 0.6s;
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.form-label-modern svg {
    width: 18px;
    height: 18px;
    color: #667eea;
    flex-shrink: 0;
}

.input-wrapper-modern {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-modern {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 15px;
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input-modern::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input-modern:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 4px 12px rgba(102, 126, 234, 0.2);
}

.currency-badge {
    position: absolute;
    right: 16px;
    font-size: 18px;
    font-weight: 700;
    color: rgba(102, 126, 234, 0.8);
    pointer-events: none;
}

.input-hint-modern {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.input-hint-modern svg {
    width: 14px;
    height: 14px;
    color: rgba(102, 126, 234, 0.6);
}

/* Кнопки */
.modal-actions-modern {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.btn-cancel-modern {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-cancel-modern:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-cancel-modern svg {
    width: 18px;
    height: 18px;
}

.btn-submit-modern {
    flex: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 
        0 4px 16px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(102, 126, 234, 0.2);
}

.btn-submit-modern:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.5),
        0 0 0 1px rgba(102, 126, 234, 0.3);
}

.btn-submit-modern:active {
    transform: translateY(0);
}

.btn-submit-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    transition: left 0.5s ease;
}

.btn-submit-modern:hover .button-shine {
    left: 100%;
}

.btn-submit-modern svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Секция заявок пользователя */
.withdrawal-requests-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.requests-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 16px 0;
}

.requests-section-title svg {
    width: 18px;
    height: 18px;
    color: #667eea;
}

.withdrawals-list-modern {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.withdrawals-list-modern::-webkit-scrollbar {
    width: 4px;
}

.withdrawals-list-modern::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 2px;
}

.withdrawals-list-modern::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.withdrawals-group {
    margin-bottom: 16px;
}

.group-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.withdrawal-item-modern {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    transition: all 0.3s ease;
}

.withdrawal-item-modern:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
}

.withdrawal-item-modern.active {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.05);
}

.withdrawal-item-modern.processed {
    opacity: 0.8;
}

.withdrawal-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.withdrawal-id {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
}

.withdrawal-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.withdrawal-status-badge.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.withdrawal-status-badge.processing {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.withdrawal-status-badge.completed {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.withdrawal-status-badge.partially_completed {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.withdrawal-status-badge.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.withdrawal-item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.withdrawal-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.withdrawal-item-row .row-label {
    color: rgba(255, 255, 255, 0.6);
}

.withdrawal-item-row .row-value {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.withdrawal-item-row.refund .row-value {
    color: #22c55e;
}

.btn-view-details {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-details:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

.btn-view-details svg {
    width: 14px;
    height: 14px;
}

.withdrawal-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-view-details,
.btn-cancel-withdrawal {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel-withdrawal {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-cancel-withdrawal:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.btn-cancel-withdrawal svg {
    width: 14px;
    height: 14px;
}

.withdrawal-processing-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
}

.withdrawal-processing-notice svg {
    width: 14px;
    height: 14px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-state,
.empty-state,
.error-state {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.error-state {
    color: rgba(239, 68, 68, 0.8);
}

/* Адаптивность */
@media (max-width: 768px) {
    .withdrawal-modal-modern {
        width: 98%;
        max-height: 98vh;
        border-radius: 20px;
    }
    
    .withdrawal-modal-header {
        padding: 20px;
    }
    
    .withdrawal-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .withdrawal-header-text h2 {
        font-size: 20px;
    }
    
    .withdrawal-modal-body {
        padding: 20px;
    }
    
    .balance-value {
        font-size: 36px;
    }
    
    .modal-actions-modern {
        flex-direction: column;
    }
    
    .btn-cancel-modern,
    .btn-submit-modern {
        width: 100%;
    }
}

