.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    max-width: 640px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    position: relative;
    border: 1px solid #e5e5e5;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: #ffffff;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}


.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}

.modal-close:hover {
    background: #e5e5e5;
}

.modal-close:hover svg {
    color: #ffffff;
}

.modal-close svg {
    width: 18px;
    height: 18px;
    color: #666;
    transition: color 0.3s;
}

.modal-body {
    padding: 20px 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-message {
    font-size: 17px;
    color: #2d3748;
    line-height: 1.7;
    margin: 0;
    text-align: center;
    font-weight: 500;
}

.modal-footer {
    padding: 12px 24px 20px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: #ffffff;
    flex-shrink: 0;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-btn-primary {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.modal-btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.modal-btn-secondary {
    background: #ffffff;
    color: #333;
    border-color: #e5e5e5;
}

.modal-btn-secondary:hover {
    border-color: #d0d0d0;
    background: #f5f5f5;
}


.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
}

.modal-icon.success {
    background: #d4edda;
}

.modal-icon.success svg {
    color: #28a745;
    width: 32px;
    height: 32px;
}

.modal-icon.error {
    background: #f8d7da;
}

.modal-icon.error svg {
    color: #dc3545;
    width: 32px;
    height: 32px;
}

.modal-icon.warning {
    background: #fff3cd;
}

.modal-icon.warning svg {
    color: #ff9800;
    width: 32px;
    height: 32px;
}

.modal-icon.info {
    background: #d1ecf1;
}

.modal-icon.info svg {
    color: #17a2b8;
    width: 32px;
    height: 32px;
}

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 48px 40px;
}

.modal-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid #f0f7ff;
    border-top-color: #007BFF;
    border-right-color: #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-loading-text {
    font-size: 15px;
    color: #4a5568;
    text-align: center;
    font-weight: 500;
}

.simple-success-modal {
    max-width: 320px;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: none;
}

.simple-success-modal::before {
    display: none;
}

.simple-success-body {
    padding: 32px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}


.simple-success-message {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
}

