/* Pay Debt Modal Styles */
#payDebtModal {
    display: none;
    z-index: 1000;
}

#payDebtModal.show {
    display: flex;
}

.pay-debt-modal-content {
    background: var(--bg-primary);
    width: 100%;
    height: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pay-debt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.pay-debt-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pay-debt-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-primary);
}

/* Bank Account Info Card */
.bank-info-card {
    background: #8b5cf6;
    border-radius: 12px;
    padding: 20px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    position: relative;
    overflow: hidden;
}

.bank-info-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.bank-info-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 8px;
    display: block;
}

.bank-account-num {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-family: monospace;
}

.bank-account-name {
    font-size: 1.1rem;
    font-weight: 500;
}

.bank-name {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-weight: 700;
    opacity: 0.9;
    font-style: italic;
}

/* Upload Section */
.upload-section {
    margin-bottom: 24px;
}

.upload-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #8b5cf6;
    background: rgba(27, 38, 59, 0.05);
}

.upload-area.has-image {
    padding: 10px;
    border-style: solid;
}

.upload-icon {
    margin-bottom: 12px;
    color: #94a3b8;
}

.upload-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#payDebtImageInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

#payDebtImagePreview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    display: none;
    margin: 0 auto;
}

#payDebtRemoveImg {
    display: none;
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    line-height: 28px;
    text-align: center;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Optional Note */
.note-section {
    margin-bottom: 24px;
}

#payDebtNote {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    font-size: 0.95rem;
}

#payDebtNote:focus {
    outline: none;
    border-color: #8b5cf6;
}

/* Actions */
.pay-debt-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

#submitPayDebtBtn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

#submitPayDebtBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#submitPayDebtBtn .loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

@media (min-width: 768px) {
    .pay-debt-modal-content {
        width: 500px;
        height: auto;
        max-height: 90vh;
        margin: auto;
        position: relative;
        top: 50%;
        transform: translateY(-50%);
        animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* ===== Pay Debt Cropper Overlay ===== */
.pd-cropper-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.pd-cropper-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.pd-cropper-image-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.pd-cropper-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.pd-cropper-actions {
    display: flex;
    gap: 8px;
    padding-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

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

/* Crop action buttons (user-side) */
.crop-action-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    transition: 0.2s;
    min-width: 58px;
}
.crop-action-btn:hover {
    background: rgba(255,255,255,0.2);
}
.crop-action-btn.cancel-btn {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.crop-action-btn.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.35);
}
.crop-action-btn.confirm-btn {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}
.crop-action-btn.confirm-btn:hover {
    background: rgba(16, 185, 129, 0.4);
}




