.modal,
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
}

.modal-overlay {
    background: rgba(15, 23, 42, 0.48);
}

.modal-content,
.modal-dialog {
    width: min(680px, calc(100% - 24px));
    max-height: calc(100vh - 40px);
    margin: auto;
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-footer {
    border-top: 1px solid var(--border);
    border-bottom: 0;
}

.modal-body {
    padding: 16px;
}

.close,
.modal-close,
.alert-close {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--text-muted);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.modal-header h3,
.modal-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}
