:root {
  --navy: #102b50;
  --ink: #17365d;
  --red: #ed1c2e;
  --line: #7f8da1;
  --soft-line: #cbd4df;
  --screen-paper-width: 900px;
  --screen-paper-height: 1164.706px;
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: #061b31;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { position: relative; isolation: isolate; min-width: 320px; background: #061b31; }
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body::before { background: #061b31 url("assets/moonlit-tow-rope-lake-chart.png") 62% center / cover no-repeat; }
body::after { background: linear-gradient(90deg, rgba(2, 16, 31, .18), rgba(2, 20, 38, .04) 52%, rgba(1, 12, 25, .16)); }
button, input, select, textarea { font: inherit; }
button, .filebutton { touch-action: manipulation; }

/* Application chrome */
.toolbar { position: sticky; inset-block-start: 0; z-index: 20; display: flex; align-items: center; gap: 9px; min-height: 56px; padding: 9px 20px; color: #fff; background: #092544; border-bottom: 3px solid var(--red); box-shadow: 0 3px 16px rgba(0, 12, 28, .38); }
.toolbar b { flex: 0 0 auto; white-space: nowrap; }
.toolbar button, .toolbar .filebutton { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 12px; color: var(--navy); font-size: 13px; font-weight: 700; background: #fff; border: 1px solid rgba(255,255,255,.7); border-radius: 5px; cursor: pointer; }
.toolbar button:hover, .toolbar .filebutton:hover { background: #edf3f9; }
.toolbar .small { min-width: 0; margin-left: auto; overflow: hidden; color: #cbd8e8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.layout { position: relative; z-index: 1; width: 100%; min-height: calc(100vh - 56px); padding: 30px 28px 64px 332px; }
.paper { width: var(--screen-paper-width); height: var(--screen-paper-height); margin: 0 auto; padding: 0 20px 11px; overflow: hidden; color: #112d50; background: #fff; border: 1px solid rgba(189, 200, 212, .9); box-shadow: 0 24px 68px rgba(0, 11, 24, .56), 0 7px 20px rgba(0, 11, 24, .42); zoom: 1.2; }
.side { position: fixed; inset-block-start: 84px; inset-inline-start: 22px; z-index: 3; width: 286px; max-height: calc(100vh - 106px); padding: 15px 16px 20px; overflow: auto; background: #fbfcfe; border: 1px solid #cad5e2; border-top: 4px solid var(--red); border-radius: 7px; box-shadow: 0 14px 38px rgba(0, 15, 30, .55); }
.side h2 { margin: 0 0 6px; color: var(--navy); font-size: 18px; }
.side h3 { margin: 15px 0 5px; padding-top: 12px; color: var(--navy); font-size: 13px; border-top: 1px solid #d9e1ea; }
.side p { margin: 5px 0 9px; color: #52677f; font-size: 11.5px; line-height: 1.45; }
.side label { display: block; margin: 8px 0 3px; color: var(--navy); font-size: 11.5px; font-weight: 700; }
.side input, .side select, .side textarea { width: 100%; padding: 7px; color: #122c4c; font-size: 12px; background: #fff; border: 1px solid #aebed0; border-radius: 4px; }
.side button { margin-top: 7px; padding: 7px 9px; color: var(--navy); background: #eef3f8; border: 1px solid #aebed0; border-radius: 4px; cursor: pointer; }
.info, .warning { margin: 8px 0; padding: 9px 10px; font-size: 11px; line-height: 1.4; }
.info { color: #234c77; background: #edf5ff; border-radius: 4px; }
.warning { color: #6e4714; background: #fff4dc; border-left: 4px solid #cc8217; }
.mini { font-size: 10px; }
.muted { color: #66798f; }

/* Screen invoice: a relaxed 900 px rendering of an 8.5 x 11 inch page. */
.head { height: 142px; margin: 0 -20px 2px; background: url("assets/invoice-header.png") center / 100% 100% no-repeat; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.section { position: relative; display: flex; align-items: center; width: 100%; height: 44px; margin: 1px 0; background: url("assets/section-divider.png") left center / 100% 100% no-repeat; }
.section span { padding: 1px 0 0 30px; color: var(--navy); font-size: 14.5px; font-weight: 700; line-height: 1; letter-spacing: -.1px; }
.two { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(0, .93fr); gap: 18px; }
.fields { display: grid; gap: 1px; align-content: start; }
.line { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 7px; min-height: 22px; }
.two > .fields:nth-child(2) { padding-left: 14px; border-left: 1px solid #c6d1de; }
.stretch-line { align-items: start; }
.line label { display: flex; align-items: center; gap: 5px; min-width: 0; color: #173657; font-size: 14.5px; font-weight: 400; line-height: 1.12; white-space: nowrap; }
.dispatch-grid .line label { font-weight: 400; }
.field-icon { display: inline-flex; flex: 0 0 15px; align-items: center; justify-content: center; width: 15px; height: 15px; color: #173c68; }
.field-icon svg, .charge-icon { width: 14px; height: 14px; }
.charge-icon { display: inline-block; margin-right: 4px; vertical-align: -2px; }
.field, .fieldarea { width: 100%; min-width: 0; padding: 3px 3px 2px; color: #0f2034; font: 400 14.5px/1.2 Arial, sans-serif; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.paper [data-f].entered-value { font-weight: 700; }
.paper .combo-input.entered-value { font-weight: 700; }
.field:focus, .fieldarea:focus { outline: 2px solid #75a8d4; outline-offset: 1px; }
.field:disabled, .charge input:disabled { color: #6f7e90; background: #e2e7ee; cursor: not-allowed; }
.longtext { font-size: 14px; }
.expanding { overflow: hidden; resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere; }
.dispatch-grid { align-items: start; }
.time-list .line { grid-template-columns: 156px minmax(0, 1fr); }
.time-list .line label { position: relative; justify-self: start; }
.time-list .line label::after { content: ""; position: absolute; left: calc(100% + 7px); bottom: -3px; width: calc(156px - 100%); border-bottom: 1px solid var(--line); pointer-events: none; }
.time-field { font-variant-numeric: tabular-nums; }
.fuel-inline { display: grid; grid-template-columns: .82fr 1fr; gap: 6px; }
.distress-wrap { position: relative; min-width: 0; }
.distress-suggestions { position: absolute; inset: 100% 0 auto; z-index: 30; max-height: 190px; overflow: auto; background: #fff; border: 1px solid #9fb1c8; box-shadow: 0 7px 20px rgba(16,43,80,.24); }
.distress-suggestions button { display: block; width: 100%; padding: 6px 8px; color: var(--navy); text-align: left; background: #fff; border: 0; cursor: pointer; }
.distress-suggestions button:hover, .distress-suggestions button:focus { background: #eaf1f8; }
.common-combobox { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 22px; min-width: 0; }
.common-combobox > .combo-input { grid-column: 1 / -1; grid-row: 1; padding-right: 23px; }
.combo-source { display: none !important; }
.combo-toggle { grid-column: 2; grid-row: 1; z-index: 2; width: 22px; padding: 0; color: #17365d; background: transparent; border: 0; cursor: pointer; }
.combo-toggle::before { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.combo-menu { position: absolute; inset: calc(100% + 1px) 0 auto; z-index: 45; max-height: 190px; padding: 3px; overflow-y: auto; background: #fff; border: 1px solid #9fb1c8; box-shadow: 0 7px 20px rgba(16,43,80,.24); }
.combo-menu button { display: block; width: 100%; padding: 6px 8px; color: var(--navy); text-align: left; background: #fff; border: 0; cursor: pointer; }
.combo-menu button:hover, .combo-menu button:focus, .combo-menu button.active-option { background: #eaf1f8; outline: 0; }
.combo-menu .combo-clear { color: #687a90; border-top: 1px solid #d6dee8; }
.common-combobox.open > .combo-input { outline: 2px solid #75a8d4; outline-offset: 1px; }
.dispatch-picker { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 22px; min-width: 0; }
.dispatch-picker > .field { grid-column: 1 / -1; grid-row: 1; padding-right: 23px; }
.dispatch-picker-toggle { grid-column: 2; grid-row: 1; z-index: 2; width: 22px; padding: 0; color: #17365d; background: transparent; border: 0; cursor: pointer; }
.dispatch-picker-toggle::before { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.dispatch-picker-menu { position: absolute; inset: calc(100% + 1px) 0 auto; z-index: 40; padding: 3px; background: #fff; border: 1px solid #9fb1c8; box-shadow: 0 7px 20px rgba(16,43,80,.24); }
.dispatch-picker-menu button { display: block; width: 100%; padding: 6px 8px; color: var(--navy); text-align: left; background: #fff; border: 0; cursor: pointer; }
.dispatch-picker-menu button:hover, .dispatch-picker-menu button:focus, .dispatch-picker-menu button.active-option { background: #eaf1f8; outline: 0; }
.dispatch-picker-menu .clear-option { color: #687a90; border-top: 1px solid #d6dee8; }
.notes-zone { margin-top: 5px; }
.notes-heading-row { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.notes-heading-row > label { flex: 0 0 auto; color: var(--navy); font-size: 13.5px; font-weight: 400; white-space: nowrap; }
.note-editor-shell { position: relative; }
.notes-zone textarea { position: relative; z-index: 2; min-height: 78px; color: transparent; caret-color: #0f2034; line-height: 20px; resize: vertical; background: repeating-linear-gradient(to bottom, transparent 0, transparent 18px, #9aa6b5 19px, #fff 20px); border-bottom: 0; }
.notes-zone textarea::selection { color: #fff; background: #315d8a; }
.notes-render { position: absolute; inset: 0; z-index: 1; padding: 3px 3px 2px; overflow: hidden; color: #0f2034; font: 700 14.5px/20px Arial, sans-serif; letter-spacing: -.018em; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
.notes-render .membership-note { color: var(--red); }
.inline-tools { display: flex; flex: 1 1 auto; align-items: center; gap: 7px; min-width: 0; margin: 0; color: #425b78; font-size: 11.5px; }
.inline-tools select, .inline-tools input { min-width: 0; padding: 4px; color: var(--navy); font-size: 11.5px; border: 1px solid #afbece; }
.inline-tools select { width: min(100%, 350px); max-width: 350px; }
.inline-tools button { padding: 4px 8px; color: var(--navy); background: #eef3f8; border: 1px solid #afbece; cursor: pointer; }
.inline-tools .push { margin-left: auto; }
.suggested-note-capacity-notice { position: fixed; top: 16px; left: 50%; z-index: 240; max-width: min(520px, calc(100vw - 32px)); padding: 7px 11px; color: #fff; font: 600 12px/1.35 Arial, sans-serif; text-align: center; background: rgba(12, 36, 66, .96); border: 1px solid rgba(255, 255, 255, .32); border-radius: 7px; box-shadow: 0 8px 22px rgba(5, 23, 44, .24); transform: translateX(-50%); }
.suggested-note-capacity-notice[hidden] { display: none; }

/* Service Charges uses spacing and soft bands rather than a rule-heavy grid. */
.charge-head, .charge { display: grid; grid-template-columns: minmax(0, 1fr) 120px 160px 118px; gap: 6px; align-items: center; }
.charge-head { padding: 2px 6px 5px; color: #29415f; font-size: 10.5px; font-weight: 700; border-bottom: 1px solid #9aa8b9; }
#charges { display: grid; gap: 1px; padding-top: 2px; }
.charge { min-height: 28px; padding: 3px 10px 3px 6px; border: 0; }
.charge:nth-child(even) { background: linear-gradient(90deg, #dce6f1, #eef3f8); }
.charge strong { display: flex; align-items: center; min-width: 0; color: #15365c; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.charge input { width: 100%; min-width: 0; padding: 2px; color: #111f32; font-size: 13.5px; background: transparent; border: 0; border-bottom: 1px solid #95a1b0; border-radius: 0; }
.charge .money { color: #102b50; font-size: 13.5px; font-weight: 700; text-align: right; }
.charge-controls { display: flex; align-items: center; gap: 4px; margin: 0 0 0 7px; font-size: 11px; font-weight: 400; }
.charge-controls select { width: 100%; max-width: 240px; padding: 1px 18px 2px 2px; color: #17365d; font-size: 11px; font-weight: 400; line-height: 1.15; appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2317365d' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 4px center / 9px 6px no-repeat; border: 0; border-bottom: 1px solid #8497ad; border-radius: 0; outline-offset: 1px; }
.charge-controls select:focus { outline: 2px solid #75a8d4; }
.charge-controls.membership-control { display: inline-flex; margin: 0 0 0 6px; vertical-align: 1px; }
.charge-controls.fuel-location-control { display: inline-flex; flex: 0 1 176px; min-width: 118px; max-width: 176px; margin-left: 7px; }
.fuel-location-control .common-combobox { width: 100%; }
.fuel-location-control .combo-input { padding: 1px 18px 2px 2px; color: #17365d; font-size: 11px; font-weight: 400; line-height: 1.15; }
.fuel-location-control .combo-menu { min-width: 176px; font-size: 11px; }
.membership-choice { display: inline-flex; align-items: baseline; gap: 3px; margin: 0; }
.membership-choice button { padding: 0 2px; color: #8290a2; font-size: 11px; font-weight: 400; line-height: 1.15; background: transparent; border: 0; cursor: pointer; }
.membership-choice button + button::before { content: "/"; margin-right: 4px; color: #a7b1bd; font-weight: 400; }
.membership-choice button.active { font-weight: 800; }
.membership-choice button[data-choice="yes"].active { color: var(--red); }
.membership-choice button[data-choice="no"].active { color: var(--navy); }
.membership-choice button:disabled { color: #a5afbb; cursor: default; opacity: .58; }
.membership-tier-status { margin-left: 8px; color: #728195; font-size: 11px; font-style: italic; font-weight: 400; letter-spacing: 0; }
.membership-unavailable [data-rate="membership"],
.membership-unavailable [data-qty="membership"] { color: #718094; background: transparent; }
.membership-eligibility { margin-top: 6px; }
.membership-draft-conflict { display: flex; flex-direction: column; gap: 5px; color: #79222a; background: #fff0f1; border-left-color: var(--red); }
.membership-draft-conflict[hidden] { display: none; }
.membership-draft-conflict button { align-self: flex-start; margin-top: 0; padding: 5px 7px; font-size: 10.5px; }
.unit-field { display: flex; align-items: center; min-width: 0; gap: 3px; }
.charge > .unit-field:nth-child(2) { width: 100px; }
.charge > .unit-field:nth-child(3) { width: 122px; }
.unit-field input { flex: 1 1 auto; }
.unit-prefix { color: #17365d; font-size: 11px; font-weight: 700; }
.quantity-field { justify-content: flex-start; gap: 4px; }
.quantity-field input { flex: 0 1 auto; width: calc(var(--qty-ch, 1) * 1ch + 14px); min-width: 30px; max-width: 100%; font-variant-numeric: tabular-nums; }
.quantity-field.has-unit input { max-width: calc(100% - 31px); }
.unit-suffix { flex: 0 0 auto; color: #68798c; font-size: 11px; font-weight: 400; white-space: nowrap; }
.input-note { color: #5b7088; font-size: 10.5px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 5px; padding: 0; background: none; border: 0; }
.summary > b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.summary div { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 41px; margin: 0; padding: 6px 9px; color: #17365d; font-size: 12.5px; background: linear-gradient(#f8fafc, #e1e8f1); border: 1px solid #adbed1; border-top: 2px solid #7289a6; }
.summary div > span:first-child { font-weight: 700; }
.summary .total { font-weight: 700; border-top-color: var(--red); }
.summary strong, .summary .total span:last-child { min-width: 78px; padding: 3px 4px; color: #102b50; font-size: 15px; font-weight: 800; text-align: right; background: #fff; border-bottom: 1px solid #8492a4; }
.summary .total span:last-child { font-size: 15px; }
.footer { display: none; }
.invalid { outline: 2px solid #c83b38 !important; background: #ffeded !important; }
.charge [data-qty="unground"].needed { outline: 2px solid #ca7c1c; background: #fff0df; }
.membership-status .warning { margin-top: 6px; }
.membership-status .membership-error { color: #79222a; background: #fff0f1; border-left-color: var(--red); }
.member-not-applicable { opacity: .48; }
.member-not-applicable .field:disabled { color: #6f7e90; background: transparent; }
.paper [data-f="dispatchNumber"].redcraft-missing { border-bottom-color: var(--red); box-shadow: inset 0 -1px 0 rgba(237, 28, 46, .62); background: rgba(237, 28, 46, .045); }

/* v0.15 screen-only polish. Section-divider dimensions and typography stay locked. */
@media screen {
  .paper .line label,
  .paper .field,
  .paper .fieldarea,
  .paper .notes-heading-row,
  .paper .charge-head,
  .paper .charge,
  .paper .summary { letter-spacing: -.018em; }
  .paper .time-field { letter-spacing: -.01em; }
  .paper .member-required.member-attention > label::after,
  .paper .redcraft-required.redcraft-attention > label::after { content: "*"; margin-left: 2px; color: var(--red); font-weight: 700; }
  .charge-head, .charge { grid-template-columns: minmax(0, 1fr) 116px 150px 112px; padding-right: 18px; }
  .charge-head > :last-child { display: flex; justify-content: flex-end; padding-right: 4px; text-align: right !important; }
  .charge > :last-child { padding-right: 4px; }
}

@media (max-width: 1230px) {
  .layout { display: flex; flex-direction: column; align-items: center; min-width: 930px; padding: 24px 15px 54px; overflow-x: auto; }
  .paper { flex: 0 0 auto; margin-inline: auto; }
  .side { position: static; order: 2; width: 900px; max-height: none; margin-top: 20px; }
}
@media (max-width: 760px) {
  .toolbar { align-items: stretch; min-width: 930px; }
  .toolbar b, .toolbar .small { width: 100%; }
  .toolbar .small { margin-left: 0; }
}

/* Print remains a separate exact Letter presentation. */
@media print {
  @page { size: Letter; margin: 0; }
  html, body { width: 8.5in; height: 11in; background: #fff !important; }
  body::before, body::after { display: none !important; }
  .toolbar, .side, .no-print, .inline-tools, .charge-controls { display: none !important; }
  .layout { display: block; width: 8.5in; height: 11in; min-width: 0; min-height: 0; margin: 0; padding: 0; overflow: visible; }
  .paper { width: 8.5in; height: 11in; min-height: 11in; margin: 0; padding: 0 .19in .14in; border: 0; box-shadow: none; break-after: avoid; break-inside: avoid; print-color-adjust: exact; -webkit-print-color-adjust: exact; zoom: 1; }
  .head { height: 1.36in; margin: 0 -.19in .035in; }
  .section { height: 32px; margin: 5px 0 2px; }
  .section span { padding: 0 0 2px 24px; font-size: 12.5px; }
  .two { grid-template-columns: 1fr 1fr; gap: 16px; }
  .fields { gap: 0; }
  .line, .towboat-grid > .fields:first-child .line, .customer-grid > .fields:first-child .line, .dispatch-grid > .fields:first-child .line, .two > .fields:nth-child(2) .line { grid-template-columns: 144px minmax(0, 1fr); gap: 4px; min-height: 21px; }
  .customer-grid > .fields:first-child .line { grid-template-columns: max-content minmax(0, 1fr); }
  .two > .fields:nth-child(2) { padding-left: 10px; border-left: 1px solid #c6d1de; }
  .paper > .line { grid-template-columns: 220px minmax(0, 1fr); gap: 4px; }
  .line label { gap: 4px; font-size: 11.5px; font-weight: 400; }
  .field-icon { flex-basis: 14px; width: 14px; height: 14px; }
  .field-icon svg, .charge-icon { width: 13px; height: 13px; }
  .field, .fieldarea { padding: 2px 3px 1px; font-size: 12px; }
  .longtext { font-size: 11.2px; }
  .time-list { padding-left: 10px; }
  .time-list .line { grid-template-columns: 116px minmax(0, 1fr); }
  .time-list .line label::after { left: calc(100% + 4px); width: calc(116px - 100%); }
  .fuel-inline { grid-template-columns: .85fr 1fr; gap: 5px; }
  .notes-zone { margin-top: 3px; }
  .notes-heading-row { display: block; min-height: 0; }
  .notes-heading-row > label { display: block; padding-bottom: 2px; font-size: 11px; }
  .notes-zone textarea { min-height: 72px; line-height: 18px; resize: none; background: repeating-linear-gradient(to bottom, transparent 0, transparent 16px, #9aa6b5 17px, #fff 18px); }
  .notes-render { padding: 2px 3px 1px; font-size: 12px; line-height: 18px; letter-spacing: normal; }
  .charge-head, .charge { grid-template-columns: 1.55fr .62fr .85fr .62fr; gap: 7px; padding-right: 14px; }
  .charge-head { padding-top: 0; padding-bottom: 3px; padding-left: 3px; font-size: 8.7px; }
  #charges { gap: 0; padding-top: 0; }
  .charge { min-height: 23px; padding: 1px 14px 1px 3px; }
  .charge strong, .charge input, .charge .money { font-size: 11px; }
  .membership-tier-status { font-size: 9px; }
  .unit-prefix, .unit-suffix { font-size: 9px; }
  .summary { gap: 7px; margin-top: 6px; }
  .summary div { min-height: 35px; padding: 5px 7px; font-size: 10px; border-top-width: 1px; }
  .summary strong, .summary .total span:last-child { min-width: 70px; padding: 2px 3px; font-size: 12px; }
  .summary .total span:last-child { font-size: 12.5px; }
  .field, .fieldarea, .charge input { color: #111 !important; }
  .notes-zone .note-editor { color: transparent !important; }
  .field:disabled, .charge input:disabled { color: #111 !important; background: transparent !important; }
  .paper .member-attention > label::after,
  .paper .redcraft-attention > label::after { content: none !important; display: none !important; }
  .invalid, .charge [data-qty="unground"].needed, .paper [data-f="dispatchNumber"].redcraft-missing { outline: 0 !important; box-shadow: none !important; background: transparent !important; border-bottom-color: var(--line) !important; }
  .head, .section, .charge:nth-child(even), .summary div { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* Expandable Additional Charges. */
.legacy-extra-control,.legacy-extra-row{display:none!important}
.additional-charge-actions{display:grid;grid-template-columns:1fr auto;gap:6px;align-items:center;margin:0 0 12px}
.additional-charge-actions button{min-height:30px;padding:5px 8px;color:#102b50;font-weight:700;background:#eef3f8;border:1px solid #9fb0c5;border-radius:3px;cursor:pointer}
.additional-charge-actions button:disabled{opacity:.5;cursor:not-allowed}
.additional-charge-actions span{color:#5e6f84;font-size:10px}
.additional-charge-actions p{grid-column:1/-1;margin:0;color:#5e6f84;font-size:10px;line-height:1.3}
.additional-charge-title{gap:4px}
.additional-charge-editor{display:flex;align-items:center;min-width:0;flex:1;gap:6px}
.additional-type-select{flex:0 0 118px;min-width:0;padding:1px 18px 2px 2px;color:#17365d;font-size:11px;font-weight:600;line-height:1.15;appearance:none;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2317365d' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 4px center / 9px 6px no-repeat;border:0;border-bottom:1px solid #8497ad;border-radius:0}
.additional-type-select:focus{outline:2px solid #75a8d4;outline-offset:1px}
.charge .additional-description{flex:1;min-width:70px;padding:1px 2px;font-size:11px;font-weight:500}
.additional-print-label{display:none}
.additional-remove{flex:0 0 20px;width:20px;height:20px;margin-left:2px;padding:0;color:#7b2732;font-size:16px;line-height:18px;background:transparent;border:0;border-radius:2px;cursor:pointer}
.additional-remove:hover,.additional-remove:focus-visible{background:#fde7e9;outline:1px solid #d58c95}
.additional-min-note{margin-left:4px;color:#8a5600;font-size:9px;font-weight:700;white-space:nowrap}
.additional-min-note[hidden]{display:none}
.additional-square-qty{display:block;padding:2px;color:#69798d;text-align:left}
.additional-square-qty[hidden]{display:none}
.additional-charge-row.minimum-applied .money{color:#8a5600}
@media print{
  .additional-charge-row{break-inside:avoid}
  .additional-print-label{display:inline}
  .additional-charge-editor,.additional-remove{display:none!important}
  .additional-min-note{font-size:8px}
  .additional-square-qty{color:#111}
}

/* Contextual reset menu: screen-only, compact, and visually subordinate to the invoice. */
.reset-context-menu{position:fixed;z-index:10000;min-width:210px;padding:4px;background:#fff;border:1px solid #9fb0c5;border-radius:4px;box-shadow:0 8px 24px rgba(3,28,54,.24);font-family:Arial,sans-serif;letter-spacing:-.01em}
.reset-context-menu[hidden]{display:none}
.reset-context-menu button{display:flex;width:100%;padding:7px 9px;border:0;border-radius:2px;background:transparent;color:#102b50;text-align:left;cursor:pointer;flex-direction:column;gap:2px}
.reset-context-menu button:hover,.reset-context-menu button:focus-visible{background:#e8eef5;outline:1px solid #8da1ba;outline-offset:-1px}
.reset-menu-label{font-size:12px;font-weight:700}
.reset-menu-value{font-size:11px;font-weight:400;color:#5e6f84}
@media print{#invoiceResetMenu,.reset-context-menu{display:none!important}}
