.nv-document-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: min(90vh, 1000px);
  padding: 0;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgb(19 37 57 / 24%);
  color: #14263a;
}
.nv-document-dialog::backdrop { background: rgb(13 28 43 / 62%); }
.nv-document-dialog [hidden] { display: none !important; }
.nv-document-form { display: flex; flex-direction: column; max-height: inherit; }
.nv-document-form > header,
.nv-document-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 26px; }
.nv-document-form > header { border-bottom: 1px solid #e1e8ef; }
.nv-document-form > header small { color: #17627b; font-weight: 800; letter-spacing: .08em; }
.nv-document-form h2 { margin: 4px 0; font-size: clamp(22px, 3vw, 30px); }
.nv-document-form header p { margin: 0; color: #64748b; }
.nv-document-form header button { border: 0; background: transparent; font-size: 30px; cursor: pointer; color: #475569; }
.nv-document-warning { margin: 18px 26px 0; padding: 11px 14px; border-radius: 9px; background: #fff8e8; color: #72500e; font-size: 14px; }
.nv-document-scroll { overflow: auto; padding: 24px 26px; }
.nv-document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nv-document-grid label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.nv-document-grid label.wide { grid-column: 1 / -1; }
.nv-document-grid input,
.nv-document-grid textarea,
.nv-document-line input { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid #cbd8e3; border-radius: 8px; background: white; color: #14263a; font: inherit; }
.nv-document-grid input:focus,
.nv-document-grid textarea:focus,
.nv-document-line input:focus { outline: 2px solid #17627b; outline-offset: 1px; }
.nv-document-lines { margin-top: 28px; }
.nv-document-lines > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nv-document-lines h3 { margin: 0 0 12px; }
.nv-document-lines button,
.nv-document-form footer button { border: 1px solid #b7c9d8; border-radius: 8px; padding: 9px 13px; background: #fff; color: #145169; font: inherit; font-weight: 700; cursor: pointer; }
.nv-document-line-head,
.nv-document-line { display: grid; grid-template-columns: minmax(230px, 3fr) 80px 110px 90px 36px; gap: 9px; align-items: center; margin-bottom: 9px; }
.nv-document-line-head { color: #64748b; font-size: 12px; font-weight: 800; }
.nv-document-line button { border: 0; padding: 6px; color: #a43236; font-size: 22px; }
.nv-document-lines > strong { display: block; text-align: right; margin-top: 16px; }
.nv-document-dialog.delivery-note .invoice-only { display: none; }
.nv-document-dialog.delivery-note .nv-document-line-head,
.nv-document-dialog.delivery-note .nv-document-line { grid-template-columns: minmax(230px, 1fr) 80px 36px; }
.nv-document-form > footer { border-top: 1px solid #e1e8ef; }
.nv-document-form footer p { margin: 0; font-size: 13px; color: #17627b; }
.nv-document-form footer p.error { color: #a43236; }
.nv-document-form footer > div { display: flex; gap: 9px; }
.nv-document-form footer button[type="submit"] { background: #17627b; border-color: #17627b; color: white; }
.nv-document-form button:disabled { opacity: .55; cursor: wait; }
.sales-admin-row-actions { flex-wrap: wrap; }
@media (max-width: 700px) {
  .nv-document-form > header,
  .nv-document-form > footer { padding: 16px; }
  .nv-document-warning { margin: 14px 16px 0; }
  .nv-document-scroll { padding: 16px; }
  .nv-document-grid { grid-template-columns: 1fr; }
  .nv-document-grid label.wide { grid-column: auto; }
  .nv-document-line-head { display: none; }
  .nv-document-line,
  .nv-document-dialog.delivery-note .nv-document-line { grid-template-columns: 1fr 80px 36px; }
  .nv-document-line .invoice-only { grid-column: span 1; }
  .nv-document-form > footer { align-items: stretch; flex-direction: column; }
  .nv-document-form footer > div { justify-content: space-between; flex-wrap: wrap; }
}
