.dialog-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
}

.dialog {
    background-color: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.2rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.55);
    min-width: 20rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.dialog h2 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--clr-text);
    border-bottom: 1px solid var(--clr-border);
    padding-bottom: 0.45rem;
}

.dialog p {
    margin: 0.35rem 0;
    font-size: 0.92rem;
    color: var(--clr-text);
}

.dialog pre {
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
    overflow: auto;
    color: var(--clr-danger);
    max-height: 10rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0.4rem 0;
}

/* Global progress bar — covers entire viewport */
.progress-container {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    pointer-events: auto;
}

.circular-progress {
    width: 2.2rem;
    height: 2.2rem;
    border: 0.18rem solid var(--clr-border);
    border-top-color: var(--clr-accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}