.app-dialog {
    width: min(1100px, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 0;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    color: var(--app-text);
    background: var(--app-surface);
    box-shadow: var(--app-dialog-shadow);
    overscroll-behavior: contain;
}

body:has(dialog.app-dialog[open]) {
    overflow: hidden;
}

.app-dialog::backdrop {
    background: var(--app-overlay);
}

.app-dialog-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface);
}

.app-dialog-body {
    padding: 1.5rem;
}

.app-dialog-body > .card:first-child {
    margin-top: 0 !important;
}

.app-kiosk-provision {
    border: 2px solid var(--app-primary-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--app-primary-soft);
}

.app-kiosk-secret {
    display: block;
    padding: 1rem;
    margin: .5rem 0 1rem;
    border: 1px solid var(--app-primary-border);
    border-radius: 12px;
    background: var(--app-surface);
    color: var(--app-primary-active);
    font-family: ui-monospace, Consolas, monospace;
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 750;
    letter-spacing: .12em;
    overflow-wrap: anywhere;
    user-select: all;
}

.app-kiosk-secret-label {
    display: block;
    font-size: 1rem;
    font-weight: 650;
}

.kiosk-shell #activation-code {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: .18em;
}

@media (max-width: 600px) {
    .app-dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 14px;
    }

    .app-dialog-header, .app-dialog-body {
        padding: 1rem;
    }

}

/* As listas pertencem ao top layer do modal e usam coordenadas da janela. */
.app-dialog > .e-ddl.e-popup {
    position: fixed !important;
}
