/* Modal dialogs */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
.modal-backdrop.open { display: flex; }

.modal {
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 18px 20px;
    width: min(90vw, 480px);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.modal-title {
    font-size: 1rem;
    font-weight: 600;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-body { font-size: 0.85rem; color: var(--text-secondary); }
.modal-body p { margin: 0 0 10px 0; }
.modal-body .field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.modal-body .field label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.modal-body .field input,
.modal-body .field select,
.modal-body .field textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}
.modal-body .field textarea { min-height: 80px; resize: vertical; }
.modal-body .row {
    display: flex;
    gap: 10px;
}
.modal-body .row .field { flex: 1; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.82rem;
}
.help-list li { padding: 4px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; }
.help-list li:last-child { border-bottom: none; }
.help-list kbd {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    color: var(--text);
}
