/* ---------- Okno dialogowe (app/ui/dialog.php → ms_dialog) ---------- */
.ms-dialog {
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--ms-bg);
    color: var(--ms-text);
    box-shadow: 0 24px 64px rgba(0, 20, 40, 0.28);
    font: 400 15px/1.55 var(--ms-font);
}

.ms-dialog::backdrop {
    background: rgba(0, 20, 40, 0.55);
}

.ms-dialog__head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px 24px;
    border-bottom: 1px solid var(--ms-line);
    background: var(--ms-bg);
}

.ms-dialog__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--ms-navy);
}

.ms-dialog__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ms-muted);
    cursor: pointer;
}

.ms-dialog__close:hover {
    background: var(--ms-panel);
    color: var(--ms-ink);
}

.ms-dialog__close .ms-icon {
    width: 22px;
    height: 22px;
}

.ms-dialog__body {
    padding: 20px 24px 24px;
}

.ms-dialog__body > * + * {
    margin-top: 12px;
}
