.record-form-modal { max-width: 740px; }
.record-form-modal .form-section + .form-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-section h3 { font-size: 14px; color: var(--navy); margin: 0 0 16px; }
.record-form-modal .field { min-width: 0; margin-bottom: 0; }
.record-form-modal .full { grid-column: 1 / -1; }
.record-form-modal textarea { min-height: 72px; }
.form-combo { position: relative; display: block; }
.form-options { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 5; max-height: 220px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-2); padding: 5px; }
.form-options [role=option], .form-no-matches { padding: 9px 10px; border-radius: var(--r-xs); overflow-wrap: anywhere; }
.form-options [role=option] { cursor: pointer; }
.form-options [aria-selected=true], .form-options [role=option]:hover { background: var(--bg-tint); color: var(--navy); }
.form-options mark { background: var(--brand-tint); color: inherit; font-weight: 700; }
.form-no-matches { color: var(--muted); }
.form-secret { position: relative; display: flex; align-items: center; }
.form-secret input { padding-right: 87px; font-family: var(--mono); }
.form-secret button { position: absolute; right: 5px; gap: 5px; }
.form-secret svg { width: 18px; height: 18px; }
.record-form-modal input.form-credential { font-family: var(--mono); }
.field-error { display: block; color: var(--danger); font-size: 12px; margin-top: 6px; }
.field-error[hidden] { display: none; }
[aria-invalid=true] { border-color: var(--danger) !important; }
.form-epic { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; color: var(--muted); font-size: 12px; }
.record-form-modal .modal-foot { position: sticky; bottom: 0; z-index: 6; }
@media (max-width: 560px) { .record-form-modal .modal-foot { gap: 8px; } .record-form-modal .modal-foot .btn { flex: 1 1 auto; } }
.record-form-modal { display: flex; flex-direction: column; max-height: calc(100dvh - 96px); }
.record-form-modal .modal-head, .record-form-modal .modal-foot { flex-shrink: 0; }
.record-form-modal .modal-body { min-height: 0; overflow-y: auto; }
@media (max-width: 560px) { .record-form-modal { max-height: calc(100dvh - 28px); } }
/* Keep transient save feedback above the form actions. */
body:has(.record-form-modal) .toast { bottom: 96px; pointer-events: none; }
@media (max-width: 760px) { body:has(.record-form-modal) .toast { bottom: auto; } }
