/* Custom Modal Styles */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
}

.custom-modal-box {
    background: var(--bg-card, #ffffff);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border, #e2e8f0);
}

.custom-modal-overlay.active .custom-modal-box {
    transform: translateY(0) scale(1);
}

.custom-modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.icon-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.icon-error {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.icon-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.icon-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.custom-modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-heading, #1e293b);
}

.custom-modal-message {
    font-size: 15px;
    color: var(--text-muted, #64748b);
    margin-bottom: 25px;
    line-height: 1.5;
}

.custom-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.custom-modal-btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 100px;
}

.custom-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.custom-modal-btn:active {
    transform: translateY(0);
}

.btn-primary-modal {
    background: var(--primary, #6366f1);
    color: white;
}

.btn-secondary-modal {
    background: var(--bg-input, #f1f5f9);
    color: var(--text-main, #334155);
    border: 1px solid var(--border, #cbd5e1);
}

/* Dark Mode Overrides (if variables not present) */
@media (prefers-color-scheme: dark) {
    .custom-modal-box {
        background: #1e293b;
        border-color: #334155;
    }

    .custom-modal-title {
        color: #f8fafc;
    }

    .custom-modal-message {
        color: #94a3b8;
    }

    .btn-secondary-modal {
        background: #334155;
        color: #f8fafc;
    }
}