.modal--active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.3s;
}

.modal--active__box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    width: 90%;
    max-width: 840px;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.modal--open .modal--active__box {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal--active__head {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.modal--active__head strong {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal--active__head svg {
    flex-shrink: 0;
}

.iconbtn-close-error {
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1.25rem;
}

.iconbtn-close-error:hover {
    transform: rotate(90deg) scale(1.1);
}

.modal--open {
    opacity: 1;
    pointer-events: auto;
}

.modal--active__body {
    padding: 2rem 2rem 1.5rem 2rem;
}

.modal--active__content {
    margin-bottom: 2rem;
}

.modal--active__content p {
    margin: 0;
    padding: 0;
}

.modal--active__content p:first-child {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
}

.modal--active__content p:last-child {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-tertiary);
}

.modal--active__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.modal--active__actions .btn,
.modal--active__actions .btn--ghost {
    flex-shrink: 0;
    height: 40px;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal--error .modal--active__box {
    max-width: 520px;
}

.modal--error .modal--active__head {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.03) 100%);
    border-bottom: 1px solid rgba(239, 68, 68, 0.15);
}

.modal--error .modal--active__head strong {
    color: #ef4444;
}

.modal--error .iconbtn-close-error:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.modal--error .modal--active__actions .btn--ghost:first-child {
    margin-right: auto;
}

.modal--info .modal--active__box {
    max-width: 520px;
}

.modal--info .modal--active__head {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.modal--info .modal--active__head strong {
    color: #3b82f6;
}

.modal--info .iconbtn-close-error:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.modal--info .modal--active__actions .btn--ghost {
    margin-left: auto;
}

.modal--success .modal--active__box {
    max-width: 520px;
}

.modal--success .modal--active__head {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.03) 100%);
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.modal--success .modal--active__head strong {
    color: #10b981;
}

.modal--success .iconbtn-close-error:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.modal--success .modal--active__actions .btn--ghost {
    margin-left: auto;
}

.modal--warning .modal--active__box {
    max-width: 520px;
}

.modal--warning .modal--active__head {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.03) 100%);
    border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.modal--warning .modal--active__head strong {
    color: #f59e0b;
}

.modal--warning .iconbtn-close-error:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.modal--warning .modal--active__actions .btn {
    margin-left: auto;
}

.modal--confirm .modal--active__box {
    max-width: 520px;
}

.modal--confirm .modal--active__head {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.modal--confirm .modal--active__head strong {
    color: #3b82f6;
}

.modal--confirm .iconbtn-close-error:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.modal--confirm-danger .modal--active__head {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.03) 100%);
    border-bottom: 1px solid rgba(239, 68, 68, 0.15);
}

.modal--confirm-danger .modal--active__head strong {
    color: #ef4444;
}

.modal--confirm-danger .iconbtn-close-error:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.btn--danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35), 0 0 0 1px rgba(239, 68, 68, 0.1) inset;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45), 0 0 0 1px rgba(239, 68, 68, 0.2) inset;
}

.btn--danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

@media (max-width: 640px) {
    .modal--active__box {
        width: 95%;
        margin: 1rem;
    }

    .modal--active__head {
        padding: 1.25rem 1.5rem;
    }

    .modal--active__body {
        padding: 1.5rem 1.5rem 1.25rem 1.5rem;
    }

    .modal--error .modal--active__actions,
    .modal--confirm .modal--active__actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal--error .modal--active__actions .btn,
    .modal--error .modal--active__actions .btn--ghost,
    .modal--confirm .modal--active__actions .btn,
    .modal--confirm .modal--active__actions .btn--ghost {
        width: 100%;
    }

    .modal--error .modal--active__actions .btn--ghost:first-child {
        margin-right: 0;
        order: 1;
    }

    .modal--confirm .modal--active__actions {
        flex-direction: column-reverse;
    }
}