.app-confirm-dialog {
    width: min(92vw, 470px);
    max-width: 470px;
    padding: 0;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    color: #10233f;
    background: #ffffff;
    border: 1px solid rgba(30, 64, 175, 0.12);
    border-radius: 22px;
    box-shadow: 0 28px 75px rgba(15, 35, 65, 0.3);
}

.app-confirm-dialog::backdrop {
    background: rgba(8, 20, 40, 0.62);
    backdrop-filter: blur(4px);
}

.app-confirm-layout {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
    padding: 28px 28px 22px;
}

.app-confirm-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: #1d4ed8;
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 18px;
}

.app-confirm-icon svg {
    width: 29px;
    height: 29px;
}

.app-confirm-copy {
    min-width: 0;
}

.app-confirm-message { white-space: pre-line; }
.app-confirm-button[hidden] { display: none !important; }

.app-confirm-eyebrow {
    display: block;
    margin: 1px 0 7px;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-confirm-title {
    margin: 0;
    color: #0f2545;
    font-size: clamp(1.2rem, 3vw, 1.42rem);
    font-weight: 800;
    line-height: 1.25;
}

.app-confirm-message {
    margin: 11px 0 0;
    color: #52647c;
    font-size: 0.96rem;
    line-height: 1.58;
    overflow-wrap: anywhere;
}

.app-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 11px;
    padding: 17px 28px 22px;
    background: #f8fafc;
    border-top: 1px solid #e7edf5;
}

.app-confirm-button {
    min-height: 44px;
    padding: 0 19px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 750;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.app-confirm-button:hover {
    transform: translateY(-1px);
}

.app-confirm-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.app-confirm-button.cancel {
    color: #334155;
    background: #ffffff;
    border-color: #cbd5e1;
}

.app-confirm-button.cancel:hover {
    background: #f1f5f9;
}

.app-confirm-button.confirm {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 9px 20px rgba(37, 99, 235, 0.25);
}

.app-confirm-dialog.is-danger .app-confirm-icon {
    color: #b91c1c;
    background: linear-gradient(145deg, #fff1f2, #fee2e2);
    border-color: #fecaca;
}

.app-confirm-dialog.is-danger .app-confirm-eyebrow {
    color: #b91c1c;
}

.app-confirm-dialog.is-danger .app-confirm-button.confirm {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 9px 20px rgba(185, 28, 28, 0.24);
}

@media (max-width: 520px) {
    .app-confirm-layout {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 14px;
        padding: 23px 20px 19px;
    }

    .app-confirm-icon {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .app-confirm-icon svg {
        width: 25px;
        height: 25px;
    }

    .app-confirm-actions {
        padding: 15px 20px 20px;
    }

    .app-confirm-button {
        flex: 1 1 0;
        padding-inline: 12px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .app-confirm-dialog[open] {
        animation: app-confirm-enter 0.18s ease-out;
    }

    @keyframes app-confirm-enter {
        from {
            opacity: 0;
            transform: translateY(9px) scale(0.985);
        }
    }
}
