/* Approved invoice prototype styles. Shared by web, iOS and PDF. */

    #routepilot-invoice-redesign {
      width: 100%;
      color-scheme: light dark;
      color: light-dark(#14213d, #edf4ff);
      font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    #routepilot-invoice-redesign[data-theme="light"] { color-scheme: light; }
    #routepilot-invoice-redesign[data-theme="dark"] { color-scheme: dark; }
    #routepilot-invoice-redesign[data-theme="system"] { color-scheme: light dark; }
    #routepilot-invoice-redesign * { box-sizing: border-box; }
    #routepilot-invoice-redesign button { font: inherit; }
    #routepilot-invoice-redesign .rp-shell {
      min-height: 720px;
      overflow: hidden;
      border: 1px solid light-dark(#d8e1ee, #2a3950);
      border-radius: 20px;
      background: light-dark(#f3f6fa, #0c1422);
      box-shadow: 0 18px 50px rgba(20, 33, 61, .12);
    }
    #routepilot-invoice-redesign .rp-topbar {
      position: sticky;
      top: 0;
      z-index: 5;
      display: grid;
      grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
      align-items: center;
      gap: 14px;
      min-height: 64px;
      padding: 10px 18px;
      border-bottom: 1px solid light-dark(#dfe6ef, #26354a);
      background: light-dark(rgba(255,255,255,.96), rgba(14,24,39,.96));
      backdrop-filter: blur(18px);
    }
    #routepilot-invoice-redesign .rp-back {
      display: flex;
      align-items: center;
      gap: 9px;
      min-width: 0;
    }
    #routepilot-invoice-redesign .rp-back-mark {
      display: grid;
      place-items: center;
      width: 34px;
      height: 34px;
      border: 1px solid light-dark(#d7e0eb, #32425a);
      border-radius: 10px;
      background: light-dark(#fff, #182338);
      color: #2458d6;
      font-size: 20px;
      font-weight: 800;
    }
    #routepilot-invoice-redesign .rp-back-copy { min-width: 0; }
    #routepilot-invoice-redesign .rp-back-copy span {
      display: block;
      color: light-dark(#738199, #91a2bc);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    #routepilot-invoice-redesign .rp-back-copy strong {
      display: block;
      overflow: hidden;
      color: light-dark(#101c35, #f4f7fd);
      font-size: 16px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-view-switch {
      display: flex;
      gap: 3px;
      padding: 4px;
      border: 1px solid light-dark(#d8e1ed, #304057);
      border-radius: 12px;
      background: light-dark(#edf2f8, #101b2d);
    }
    #routepilot-invoice-redesign .rp-view-switch button {
      min-width: 96px;
      border: 0;
      border-radius: 8px;
      padding: 8px 12px;
      background: transparent;
      color: light-dark(#62718a, #9badc6);
      cursor: pointer;
      font-size: 12px;
      font-weight: 800;
    }
    #routepilot-invoice-redesign .rp-view-switch button[aria-pressed="true"] {
      background: light-dark(#fff, #243148);
      color: light-dark(#17386e, #f2f6ff);
      box-shadow: 0 1px 5px rgba(20, 33, 61, .12);
    }
    #routepilot-invoice-redesign .rp-actions {
      display: flex;
      justify-content: flex-end;
      gap: 7px;
    }
    #routepilot-invoice-redesign .rp-action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      border: 1px solid light-dark(#cfdae8, #32445e);
      border-radius: 10px;
      padding: 7px 11px;
      background: light-dark(#fff, #17243a);
      color: light-dark(#233550, #dbe7f9);
      font-size: 12px;
      font-weight: 800;
    }
    #routepilot-invoice-redesign .rp-action.rp-primary {
      border-color: #2559d8;
      background: #2559d8;
      color: #fff;
    }
    #routepilot-invoice-redesign .rp-action.rp-delete,
    #routepilot-invoice-redesign .rp-side-delete {
      color: light-dark(#b4232f, #ff9ca5);
    }
    #routepilot-invoice-redesign .rp-action.rp-delete {
      border-color: light-dark(#edc7cb, #71333d);
      background: light-dark(#fff7f7, #351923);
    }
    #routepilot-invoice-redesign .rp-app-view {
      display: grid;
      grid-template-columns: 218px minmax(0, 1fr);
      min-height: 656px;
    }
    #routepilot-invoice-redesign .rp-side {
      padding: 20px 16px;
      border-right: 1px solid light-dark(#dfe6ef, #26354a);
      background: light-dark(#f8fafc, #101a2a);
    }
    #routepilot-invoice-redesign .rp-side h3 {
      margin: 0 0 13px;
      color: light-dark(#17233b, #f1f5fc);
      font-size: 13px;
    }
    #routepilot-invoice-redesign .rp-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 18px;
      border-radius: 999px;
      padding: 6px 9px;
      background: light-dark(#e8f8ee, #123b2a);
      color: light-dark(#157341, #80e2aa);
      font-size: 11px;
      font-weight: 900;
    }
    #routepilot-invoice-redesign .rp-status::before {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #22a663;
      content: "";
    }
    #routepilot-invoice-redesign .rp-side-list {
      display: grid;
      gap: 5px;
    }
    #routepilot-invoice-redesign .rp-side-row {
      display: grid;
      gap: 2px;
      padding: 9px 10px;
      border-radius: 9px;
      color: light-dark(#526079, #98aac3);
    }
    #routepilot-invoice-redesign .rp-side-row.rp-side-active {
      background: light-dark(#e9f0ff, #172d50);
      color: light-dark(#224b9b, #a9c8ff);
    }
    #routepilot-invoice-redesign .rp-side-row span {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .06em;
      text-transform: uppercase;
    }
    #routepilot-invoice-redesign .rp-side-row strong {
      color: inherit;
      font-size: 12px;
    }
    #routepilot-invoice-redesign .rp-side-divider {
      height: 1px;
      margin: 14px 0;
      background: light-dark(#e1e7ef, #26354a);
    }
    #routepilot-invoice-redesign .rp-side-action {
      display: flex;
      align-items: center;
      width: 100%;
      margin: 4px 0;
      border: 0;
      border-radius: 8px;
      padding: 9px 10px;
      background: transparent;
      color: light-dark(#34445e, #b8c6da);
      font-size: 12px;
      font-weight: 750;
      text-align: left;
    }
    #routepilot-invoice-redesign .rp-main {
      min-width: 0;
      padding: 22px;
    }
    #routepilot-invoice-redesign .rp-invoice-sheet {
      max-width: 990px;
      margin: 0 auto;
      overflow: hidden;
      border: 1px solid light-dark(#dce3ed, #2b3b52);
      border-radius: 16px;
      background: light-dark(#fff, #121d2e);
      box-shadow: 0 10px 34px rgba(20, 33, 61, .08);
    }
    #routepilot-invoice-redesign .rp-sheet-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 20px;
      padding: 22px 24px 18px;
      border-bottom: 1px solid light-dark(#e5eaf1, #2a394e);
    }
    #routepilot-invoice-redesign .rp-brand {
      display: flex;
      align-items: center;
      gap: 11px;
    }
    #routepilot-invoice-redesign .rp-brand-symbol {
      display: grid;
      place-items: center;
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: linear-gradient(145deg, #2559d8, #163991);
      color: #fff;
      font-size: 18px;
      font-weight: 950;
      letter-spacing: -.06em;
    }
    #routepilot-invoice-redesign .rp-brand strong {
      display: block;
      color: light-dark(#11203d, #f3f7ff);
      font-size: 17px;
    }
    #routepilot-invoice-redesign .rp-brand small {
      display: block;
      margin-top: 2px;
      color: light-dark(#738098, #92a4bc);
      font-size: 11px;
      font-weight: 650;
    }
    #routepilot-invoice-redesign .rp-invoice-title { text-align: right; }
    #routepilot-invoice-redesign .rp-invoice-title span {
      display: block;
      color: #2559d8;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .12em;
      text-transform: uppercase;
    }
    #routepilot-invoice-redesign .rp-invoice-title strong {
      display: block;
      margin-top: 2px;
      color: light-dark(#0f1d36, #f4f7fc);
      font-size: 25px;
      letter-spacing: -.03em;
    }
    #routepilot-invoice-redesign .rp-parties {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr);
      gap: 24px;
      padding: 18px 24px;
    }
    #routepilot-invoice-redesign .rp-billto-label,
    #routepilot-invoice-redesign .rp-fact span,
    #routepilot-invoice-redesign .rp-money-label,
    #routepilot-invoice-redesign .rp-section-title small,
    #routepilot-invoice-redesign .rp-lower-block > span {
      color: light-dark(#76849a, #8da0b8);
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    #routepilot-invoice-redesign .rp-location-name {
      display: block;
      margin: 5px 0 3px;
      color: light-dark(#14213d, #f2f6fd);
      font-size: 17px;
    }
    #routepilot-invoice-redesign .rp-location-address {
      margin: 0;
      color: light-dark(#55647b, #9fb0c6);
      font-size: 12px;
      line-height: 1.5;
    }
    #routepilot-invoice-redesign .rp-facts {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px 18px;
    }
    #routepilot-invoice-redesign .rp-fact strong {
      display: block;
      margin-top: 3px;
      color: light-dark(#1f2d46, #e7eef9);
      font-size: 12px;
    }
    #routepilot-invoice-redesign .rp-total-band {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 20px;
      margin: 0 24px 18px;
      border-radius: 13px;
      padding: 15px 18px;
      background: light-dark(#eef4ff, #182b4a);
    }
    #routepilot-invoice-redesign .rp-total-band p {
      margin: 4px 0 0;
      color: light-dark(#53627a, #9fb1c9);
      font-size: 11px;
      line-height: 1.4;
    }
    #routepilot-invoice-redesign .rp-total-band strong {
      display: block;
      color: light-dark(#183e8a, #dce9ff);
      font-size: 28px;
      letter-spacing: -.04em;
      text-align: right;
    }
    #routepilot-invoice-redesign .rp-total-band small {
      display: block;
      margin-top: 2px;
      color: light-dark(#387653, #7bd5a0);
      font-size: 10px;
      font-weight: 850;
      text-align: right;
    }
    #routepilot-invoice-redesign .rp-flow {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 1px;
      margin: 0 24px 20px;
      overflow: hidden;
      border: 1px solid light-dark(#e0e6ee, #2b3b51);
      border-radius: 12px;
      background: light-dark(#e0e6ee, #2b3b51);
    }
    #routepilot-invoice-redesign .rp-money-cell {
      min-width: 0;
      padding: 11px 10px;
      background: light-dark(#fbfcfe, #121f32);
    }
    #routepilot-invoice-redesign .rp-money-cell.rp-final {
      background: light-dark(#eaf8ef, #123426);
    }
    #routepilot-invoice-redesign .rp-money-cell strong {
      display: block;
      overflow: hidden;
      margin-top: 4px;
      color: light-dark(#192842, #e9f0fb);
      font-size: 13px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-money-cell.rp-final strong {
      color: light-dark(#12673a, #88e2ad);
    }
    #routepilot-invoice-redesign .rp-section {
      padding: 0 24px 20px;
    }
    #routepilot-invoice-redesign .rp-section-title {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }
    #routepilot-invoice-redesign .rp-section-title h3 {
      margin: 0;
      color: light-dark(#14213d, #f0f5fc);
      font-size: 15px;
    }
    #routepilot-invoice-redesign .rp-verified {
      color: light-dark(#147647, #83dfa8);
      font-size: 10px;
      font-weight: 850;
    }
    #routepilot-invoice-redesign .rp-reading-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }
    #routepilot-invoice-redesign .rp-expand-all {
      min-height: 30px;
      border: 1px solid light-dark(#ccd9e8, #3a4d67);
      border-radius: 8px;
      padding: 6px 10px;
      background: light-dark(#f4f8fd, #1b2b42);
      color: light-dark(#245aa7, #a8c8ff);
      cursor: pointer;
      font-size: 10px;
      font-weight: 850;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-expand-all:hover {
      border-color: light-dark(#9eb7d8, #58759a);
      background: light-dark(#eaf2fc, #223653);
    }
    #routepilot-invoice-redesign .rp-reading-wrap {
      overflow-x: auto;
      border: 1px solid light-dark(#e0e6ee, #2a3a50);
      border-radius: 11px;
    }
    #routepilot-invoice-redesign .rp-readings {
      width: 100%;
      min-width: 820px;
      border-collapse: collapse;
    }
    #routepilot-invoice-redesign .rp-readings th {
      padding: 8px 10px;
      border-bottom: 1px solid light-dark(#dce4ed, #304056);
      background: light-dark(#f4f7fb, #19263a);
      color: light-dark(#637188, #93a5bd);
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .06em;
      text-align: right;
      text-transform: uppercase;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-readings th:first-child,
    #routepilot-invoice-redesign .rp-readings th:last-child,
    #routepilot-invoice-redesign .rp-readings td:first-child,
    #routepilot-invoice-redesign .rp-readings td:last-child { text-align: left; }
    #routepilot-invoice-redesign .rp-readings td {
      padding: 9px 10px;
      border-bottom: 1px solid light-dark(#edf0f4, #25344a);
      color: light-dark(#334258, #c8d4e5);
      font-size: 10.5px;
      font-variant-numeric: tabular-nums;
      text-align: right;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-readings tbody tr:last-child td { border-bottom: 0; }
    #routepilot-invoice-redesign .rp-readings td:first-child {
      color: light-dark(#172741, #edf3fc);
      font-weight: 850;
    }
    #routepilot-invoice-redesign .rp-readings td.rp-net { color: light-dark(#126c3e, #80dda5); font-weight: 900; }
    #routepilot-invoice-redesign .rp-scan-source {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      color: light-dark(#2869b2, #87baf4);
      font-size: 9.5px;
      font-weight: 800;
    }
    #routepilot-invoice-redesign .rp-more-readings {
      width: 100%;
      border: 0;
      border-top: 1px solid light-dark(#e1e7ef, #2b3b51);
      padding: 9px;
      background: light-dark(#f8fafc, #172336);
      color: light-dark(#2858a5, #9bc1ff);
      cursor: pointer;
      font-size: 11px;
      font-weight: 850;
    }
    #routepilot-invoice-redesign .rp-reading-total {
      display: grid;
      grid-template-columns: minmax(138px, .7fr) minmax(0, 1.3fr);
      align-items: center;
      gap: 12px;
      min-height: 52px;
      border: 1px solid light-dark(#b8c9e0, #405675);
      border-radius: 10px;
      padding: 8px 11px;
      background: light-dark(#edf3ff, #172b48);
    }
    #routepilot-invoice-redesign .rp-reading-total > strong {
      color: light-dark(#173d78, #d9e8ff);
      font-size: 12px;
      font-weight: 900;
    }
    #routepilot-invoice-redesign .rp-reading-total-values {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      min-width: 0;
    }
    #routepilot-invoice-redesign .rp-reading-total-values span {
      display: grid;
      gap: 2px;
      min-width: 0;
      border-left: 1px solid light-dark(#c6d5e9, #415a7d);
      padding-left: 10px;
    }
    #routepilot-invoice-redesign .rp-reading-total-values small {
      color: light-dark(#65758d, #9eb2cc);
      font-size: 9px;
      font-weight: 850;
      text-transform: uppercase;
    }
    #routepilot-invoice-redesign .rp-reading-total-values b {
      overflow: hidden;
      color: light-dark(#173d78, #d9e8ff);
      font-size: 13px;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-reading-total-values span:last-child b { color: light-dark(#126a3e, #83dfa8); }
    #routepilot-invoice-redesign .rp-reading-extra[hidden] { display: none; }
    #routepilot-invoice-redesign .rp-lower-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      padding: 0 24px 24px;
    }
    #routepilot-invoice-redesign .rp-lower-block {
      min-height: 112px;
      border: 1px solid light-dark(#e0e6ee, #2b3b51);
      border-radius: 11px;
      padding: 12px;
      background: light-dark(#fbfcfe, #152235);
    }
    #routepilot-invoice-redesign .rp-lower-block strong {
      display: block;
      margin: 6px 0 3px;
      color: light-dark(#192842, #edf3fc);
      font-size: 13px;
    }
    #routepilot-invoice-redesign .rp-lower-block p {
      margin: 0;
      color: light-dark(#66758d, #98aac1);
      font-size: 10.5px;
      line-height: 1.45;
    }
    #routepilot-invoice-redesign .rp-lower-block .rp-subline {
      margin-top: 8px;
      color: light-dark(#2c5ca7, #9bc1ff);
      font-weight: 800;
    }
    #routepilot-invoice-redesign .rp-accounting {
      display: grid;
      grid-template-columns: minmax(180px, .72fr) minmax(340px, 1.28fr);
      gap: 24px;
      margin: 0 24px 22px;
      border-top: 1px solid light-dark(#e1e7ef, #2a394f);
      border-bottom: 1px solid light-dark(#e1e7ef, #2a394f);
      padding: 18px 0;
    }
    #routepilot-invoice-redesign .rp-accounting-context strong {
      display: block;
      margin: 7px 0 5px;
      color: light-dark(#172641, #edf3fc);
      font-size: 14px;
    }
    #routepilot-invoice-redesign .rp-accounting-context p {
      margin: 0;
      color: light-dark(#66758d, #9aacc2);
      font-size: 11px;
      line-height: 1.5;
    }
    #routepilot-invoice-redesign .rp-ledger {
      display: grid;
      align-content: start;
    }
    #routepilot-invoice-redesign .rp-ledger > div {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 152px;
      align-items: baseline;
      gap: 18px;
      min-height: 31px;
      border-bottom: 1px solid light-dark(#e9edf2, #26364b);
      padding: 6px 2px;
      color: light-dark(#495971, #b2c0d3);
      font-size: 11.5px;
    }
    #routepilot-invoice-redesign .rp-ledger b {
      color: light-dark(#172641, #edf3fc);
      font-size: 12px;
      font-variant-numeric: tabular-nums;
      text-align: right;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-ledger .rp-ledger-subtotal {
      border-bottom: 2px solid light-dark(#aebacb, #506079);
      color: light-dark(#1b3157, #d9e6f9);
      font-weight: 800;
    }
    #routepilot-invoice-redesign .rp-ledger .rp-ledger-total {
      margin-top: 3px;
      border: 0;
      border-radius: 8px;
      padding: 10px 11px;
      background: light-dark(#eaf8ef, #123426);
      color: light-dark(#12673a, #8ce3b0);
      font-size: 13px;
      font-weight: 900;
    }
    #routepilot-invoice-redesign .rp-ledger .rp-ledger-total b {
      color: inherit;
      font-size: 15px;
    }
    #routepilot-invoice-redesign .rp-machine-list {
      display: grid;
      gap: 8px;
    }
    #routepilot-invoice-redesign .rp-machine-summary {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      align-items: center;
      gap: 8px;
      width: 100%;
      min-width: 0;
      color: light-dark(#172741, #edf3fc);
      text-align: left;
    }
    #routepilot-invoice-redesign .rp-machine-summary > span {
      display: grid;
      gap: 2px;
      min-width: 0;
      border-left: 1px solid light-dark(#dce4ed, #33445b);
      padding-left: 10px;
    }
    #routepilot-invoice-redesign .rp-machine-summary small {
      color: light-dark(#718096, #96a8bf);
      font-size: 9px;
      font-weight: 800;
      text-transform: uppercase;
    }
    #routepilot-invoice-redesign .rp-machine-summary b {
      min-width: 0;
      color: light-dark(#1b3157, #dce8f8);
      font-size: clamp(11px, 1.25vw, 13px);
      font-weight: 900;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-machine-summary > span:nth-child(3) b {
      color: light-dark(#126a3e, #83dfa8);
    }
    #routepilot-invoice-redesign .rp-equation-grid[hidden],
    #routepilot-invoice-redesign .rp-phone-equation[hidden] { display: none; }
    #routepilot-invoice-redesign .rp-machine-item {
      overflow: hidden;
      border: 1px solid light-dark(#dfe6ef, #2a3a50);
      border-radius: 11px;
      background: light-dark(#fbfcfe, #142134);
    }
    #routepilot-invoice-redesign .rp-machine-item > header {
      display: grid;
      grid-template-columns: minmax(138px, .7fr) minmax(0, 1.3fr);
      align-items: center;
      gap: 12px;
      min-height: 54px;
      padding: 8px 11px;
      border-bottom: 1px solid light-dark(#e4e9f0, #2b3b51);
      background: light-dark(#f4f7fb, #19273b);
    }
    #routepilot-invoice-redesign .rp-terminal-key {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }
    #routepilot-invoice-redesign .rp-machine-item > header strong {
      overflow: hidden;
      color: light-dark(#172741, #edf3fc);
      font-size: 12px;
      letter-spacing: .02em;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-source-verified {
      display: inline-grid;
      flex: 0 0 auto;
      place-items: center;
      width: 17px;
      height: 17px;
      border-radius: 50%;
      background: light-dark(#daf4e4, #17442f);
      color: light-dark(#147647, #83dfa8);
      font-size: 10px;
      font-weight: 800;
      line-height: 1;
    }
    #routepilot-invoice-redesign .rp-equation-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1px;
      background: light-dark(#e5eaf1, #29394f);
    }
    #routepilot-invoice-redesign .rp-equation {
      min-width: 0;
      padding: 10px 11px;
      background: light-dark(#fff, #142134);
    }
    #routepilot-invoice-redesign .rp-equation > span {
      display: block;
      color: light-dark(#65748b, #99abc1);
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    #routepilot-invoice-redesign .rp-equation p {
      display: grid;
      grid-template-columns: 1fr;
      gap: 3px;
      margin: 6px 0 3px;
      font-variant-numeric: tabular-nums;
    }
    #routepilot-invoice-redesign .rp-equation p b,
    #routepilot-invoice-redesign .rp-equation p strong {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      color: light-dark(#2d3d56, #cbd7e8);
      font-size: 12px;
      text-align: right;
      white-space: nowrap;
    }
    #routepilot-invoice-redesign .rp-equation p b:first-of-type::before { content: "Current"; }
    #routepilot-invoice-redesign .rp-equation p b:nth-of-type(2)::before { content: "Previous"; }
    #routepilot-invoice-redesign .rp-equation p strong::before { content: "Final"; }
    #routepilot-invoice-redesign .rp-equation p b::before,
    #routepilot-invoice-redesign .rp-equation p strong::before {
      color: light-dark(#7a8799, #8da0b8);
      font-size: 10px;
      font-weight: 700;
      text-align: left;
    }
    #routepilot-invoice-redesign .rp-equation p strong {
      color: light-dark(#173e86, #a9c7ff);
      border-top: 1px solid light-dark(#e8edf3, #29394f);
      padding-top: 3px;
      font-size: 13px;
      font-weight: 900;
    }
    #routepilot-invoice-redesign .rp-equation-net p strong::before { content: "Final"; }
    #routepilot-invoice-redesign .rp-equation-net p strong { color: light-dark(#126a3e, #83dfa8); }
    #routepilot-invoice-redesign .rp-equation p i { display: none; }
    #routepilot-invoice-redesign .rp-equation small {
      display: block;
      color: light-dark(#8994a5, #7f91a9);
      font-size: 8.5px;
      text-align: right;
    }
    #routepilot-invoice-redesign .rp-machine-list > .rp-reading-extra {
      display: grid;
      gap: 8px;
    }
    #routepilot-invoice-redesign .rp-machine-list > .rp-reading-extra[hidden] { display: none; }
    #routepilot-invoice-redesign .rp-mobile-view {
      display: none;
      justify-content: center;
      min-height: 760px;
      padding: 24px 12px 36px;
      background: light-dark(#e9eef5, #09111d);
    }
    #routepilot-invoice-redesign[data-mode="mobile"] .rp-app-view,
    #routepilot-invoice-redesign[data-mode="mobile"] .rp-document-view { display: none; }
    #routepilot-invoice-redesign[data-mode="mobile"] .rp-mobile-view { display: flex; }
    #routepilot-invoice-redesign .rp-phone {
      width: min(390px, 100%);
      align-self: start;
      overflow: hidden;
      border: 7px solid light-dark(#152138, #344359);
      border-radius: 38px;
      background: light-dark(#f4f7fb, #0f1928);
      box-shadow: 0 18px 48px rgba(0,0,0,.22);
    }
    #routepilot-invoice-redesign .rp-phone-status {
      display: flex;
      justify-content: space-between;
      padding: 9px 19px 4px;
      color: light-dark(#17233a, #ecf2fb);
      font-size: 10px;
      font-weight: 800;
    }
    #routepilot-invoice-redesign .rp-phone-nav {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 10px 13px 12px;
      border-bottom: 1px solid light-dark(#dfe6ef, #29394f);
      background: light-dark(#fff, #142134);
    }
    #routepilot-invoice-redesign .rp-phone-nav button {
      min-width: 36px;
      min-height: 36px;
      border: 0;
      border-radius: 10px;
      background: light-dark(#eef3f9, #213149);
      color: light-dark(#254f9e, #a9c7ff);
      font-size: 11px;
      font-weight: 900;
    }
    #routepilot-invoice-redesign .rp-phone-nav div { min-width: 0; text-align: center; }
    #routepilot-invoice-redesign .rp-phone-nav strong,
    #routepilot-invoice-redesign .rp-phone-nav small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #routepilot-invoice-redesign .rp-phone-nav strong { color: light-dark(#17233a, #eff4fc); font-size: 13px; }
    #routepilot-invoice-redesign .rp-phone-nav small { margin-top: 2px; color: light-dark(#718097, #91a4bc); font-size: 9px; }
    #routepilot-invoice-redesign .rp-phone-scroll { display: grid; gap: 9px; padding: 10px; }
    #routepilot-invoice-redesign .rp-phone-summary,
    #routepilot-invoice-redesign .rp-phone-ledger,
    #routepilot-invoice-redesign .rp-phone-machine {
      border: 1px solid light-dark(#dfe6ef, #2a3a50);
      border-radius: 12px;
      background: light-dark(#fff, #142134);
    }
    #routepilot-invoice-redesign .rp-phone-summary { padding: 12px; }
    #routepilot-invoice-redesign .rp-phone-summary header { display: flex; justify-content: space-between; gap: 10px; }
    #routepilot-invoice-redesign .rp-phone-summary span { color: light-dark(#708097, #92a5bd); font-size: 9px; font-weight: 900; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-phone-summary strong { display: block; margin-top: 3px; color: light-dark(#15233d, #f0f5fc); font-size: 14px; }
    #routepilot-invoice-redesign .rp-phone-due { text-align: right; }
    #routepilot-invoice-redesign .rp-phone-due strong { color: light-dark(#12673a, #83dfa8); font-size: 20px; }
    #routepilot-invoice-redesign .rp-phone-summary p { margin: 9px 0 0; color: light-dark(#66758d, #9aacc2); font-size: 10px; line-height: 1.4; }
    #routepilot-invoice-redesign .rp-phone-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    #routepilot-invoice-redesign .rp-phone-actions button { min-height: 38px; border: 1px solid light-dark(#d7e0eb, #314159); border-radius: 9px; background: light-dark(#fff, #17253a); color: light-dark(#2b405f, #ccd9ea); font-size: 10px; font-weight: 850; }
    #routepilot-invoice-redesign .rp-phone-actions button:last-child { border-color: light-dark(#edc7cb, #71333d); background: light-dark(#fff7f7, #351923); color: light-dark(#b4232f, #ff9ca5); }
    #routepilot-invoice-redesign .rp-phone-ledger { padding: 8px 10px; }
    #routepilot-invoice-redesign .rp-phone-ledger > div { display: grid; grid-template-columns: 1fr 118px; gap: 10px; padding: 6px 0; border-bottom: 1px solid light-dark(#ebeff4, #26364b); color: light-dark(#526178, #a9b8cc); font-size: 10px; }
    #routepilot-invoice-redesign .rp-phone-ledger b { color: light-dark(#172641, #edf3fc); font-variant-numeric: tabular-nums; text-align: right; }
    #routepilot-invoice-redesign .rp-phone-ledger .rp-phone-operator { border-bottom: 2px solid light-dark(#b4c0cf, #52627b); color: light-dark(#213b69, #d7e5f8); font-weight: 850; }
    #routepilot-invoice-redesign .rp-phone-ledger .rp-phone-total { margin-top: 4px; border: 0; border-radius: 7px; padding: 8px; background: light-dark(#eaf8ef, #123426); color: light-dark(#12673a, #83dfa8); font-size: 12px; font-weight: 900; }
    #routepilot-invoice-redesign .rp-phone-ledger .rp-phone-total b { color: inherit; }
    #routepilot-invoice-redesign .rp-phone-section-title { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 0; }
    #routepilot-invoice-redesign .rp-phone-section-title strong { color: light-dark(#17233a, #f0f5fc); font-size: 13px; }
    #routepilot-invoice-redesign .rp-phone-section-title span { color: light-dark(#2c5ca7, #9bc1ff); font-size: 9px; font-weight: 850; }
    #routepilot-invoice-redesign .rp-phone-section-title > div { display: flex; align-items: center; gap: 6px; }
    #routepilot-invoice-redesign .rp-phone-section-title .rp-expand-all { min-height: 27px; border-radius: 7px; padding: 5px 8px; font-size: 9px; }
    #routepilot-invoice-redesign .rp-phone-machine { overflow: hidden; }
    #routepilot-invoice-redesign .rp-phone-machine header { display: grid; grid-template-columns: minmax(94px, .8fr) minmax(0, 1.7fr); align-items: center; gap: 5px; min-height: 52px; padding: 7px 8px; border-bottom: 1px solid light-dark(#e6ebf1, #2a3a50); background: light-dark(#f6f8fb, #19273b); }
    #routepilot-invoice-redesign .rp-phone-machine header strong { color: light-dark(#172741, #edf3fc); font-size: 11px; }
    #routepilot-invoice-redesign .rp-phone-machine .rp-source-verified { width: 15px; height: 15px; font-size: 9px; }
    #routepilot-invoice-redesign .rp-phone-machine .rp-machine-summary {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 3px;
    }
    #routepilot-invoice-redesign .rp-phone-machine .rp-machine-summary > span {
      display: grid;
      gap: 2px;
      padding-left: 5px;
    }
    #routepilot-invoice-redesign .rp-phone-machine .rp-machine-summary small { font-size: 9px; }
    #routepilot-invoice-redesign .rp-phone-machine .rp-machine-summary b { overflow: hidden; font-size: 10px; letter-spacing: -.02em; text-overflow: ellipsis; }
    #routepilot-invoice-redesign .rp-phone-equation { display: grid; grid-template-columns: 1fr; gap: 5px; padding: 9px 10px; border-bottom: 1px solid light-dark(#edf0f4, #26364b); }
    #routepilot-invoice-redesign .rp-phone-equation:last-child { border-bottom: 0; }
    #routepilot-invoice-redesign .rp-phone-equation > span { color: light-dark(#65748b, #99abc1); font-size: 9px; font-weight: 900; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-phone-equation p { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; font-variant-numeric: tabular-nums; }
    #routepilot-invoice-redesign .rp-phone-equation b,
    #routepilot-invoice-redesign .rp-phone-equation strong { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: light-dark(#2d3d56, #cbd7e8); font-size: 11px; text-align: right; white-space: nowrap; }
    #routepilot-invoice-redesign .rp-phone-equation b:first-of-type::before { content: "Current"; }
    #routepilot-invoice-redesign .rp-phone-equation b:nth-of-type(2)::before { content: "Previous"; }
    #routepilot-invoice-redesign .rp-phone-equation strong::before { content: "Final"; }
    #routepilot-invoice-redesign .rp-phone-equation.rp-phone-net strong::before { content: "Final"; }
    #routepilot-invoice-redesign .rp-phone-equation b::before,
    #routepilot-invoice-redesign .rp-phone-equation strong::before { color: light-dark(#7a8799, #8da0b8); font-size: 10px; font-weight: 700; text-align: left; }
    #routepilot-invoice-redesign .rp-phone-equation strong { margin-top: 2px; border-top: 1px solid light-dark(#e8edf3, #29394f); padding-top: 3px; color: light-dark(#173e86, #a9c7ff); font-size: 12px; font-weight: 900; }
    #routepilot-invoice-redesign .rp-phone-equation.rp-phone-net strong { color: light-dark(#126a3e, #83dfa8); }
    #routepilot-invoice-redesign .rp-phone-equation i { display: none; }
    #routepilot-invoice-redesign .rp-phone-more { min-height: 40px; border: 1px solid light-dark(#d7e0eb, #314159); border-radius: 9px; background: light-dark(#fff, #17253a); color: light-dark(#2858a5, #9bc1ff); font-size: 10px; font-weight: 850; }
    #routepilot-invoice-redesign .rp-phone-scroll > .rp-reading-total { grid-template-columns: minmax(78px, .65fr) minmax(0, 1.7fr); gap: 5px; min-height: 50px; padding: 7px 8px; }
    #routepilot-invoice-redesign .rp-phone-scroll > .rp-reading-total .rp-reading-total-values { gap: 3px; }
    #routepilot-invoice-redesign .rp-phone-scroll > .rp-reading-total .rp-reading-total-values span { padding-left: 5px; }
    #routepilot-invoice-redesign .rp-phone-scroll > .rp-reading-total .rp-reading-total-values b { font-size: 10px; letter-spacing: -.02em; }
    #routepilot-invoice-redesign .rp-document-view {
      display: none;
      min-height: 656px;
      padding: 28px;
      background: light-dark(#e7ebf1, #09111d);
    }
    #routepilot-invoice-redesign[data-mode="document"] .rp-app-view { display: none; }
    #routepilot-invoice-redesign[data-mode="document"] .rp-document-view { display: block; }
    #routepilot-invoice-redesign .rp-paper {
      width: min(940px, 100%);
      margin: 0 auto;
      padding: 34px 38px 30px;
      background: #fff;
      color: #172033;
      box-shadow: 0 12px 38px rgba(0,0,0,.19);
    }
    #routepilot-invoice-redesign .rp-paper-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      justify-content: space-between;
      gap: 28px;
      padding: 3px 0 19px;
      border-top: 5px solid #173d8f;
      border-bottom: 1px solid #dce2ea;
    }
    #routepilot-invoice-redesign .rp-paper-brand { padding-top: 13px; }
    #routepilot-invoice-redesign .rp-paper-brand > span { display: block; margin-bottom: 5px; color: #2458a6; font-size: 8px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-paper-brand strong { display: block; font-size: 18px; }
    #routepilot-invoice-redesign .rp-paper-brand p { margin: 5px 0 0; color: #5c687b; font-size: 9px; line-height: 1.45; }
    #routepilot-invoice-redesign .rp-paper-title { text-align: right; }
    #routepilot-invoice-redesign .rp-paper-title h2 { margin: 8px 0 0; color: #173d8f; font-size: 27px; letter-spacing: .08em; }
    #routepilot-invoice-redesign .rp-paper-title > strong { display: block; margin-top: 3px; font-size: 13px; }
    #routepilot-invoice-redesign .rp-paper-status { display: inline-block; margin-top: 7px; border-radius: 999px; padding: 4px 8px; background: #eaf7ef; color: #176b40; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-paper-meta {
      display: grid;
      grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr);
      gap: 34px;
      padding: 17px 0 16px;
    }
    #routepilot-invoice-redesign .rp-paper-kicker { color: #6c7788; font-size: 8px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-paper-meta strong { display: block; margin: 4px 0; font-size: 13px; }
    #routepilot-invoice-redesign .rp-paper-meta p { margin: 0; color: #536075; font-size: 9.5px; line-height: 1.45; }
    #routepilot-invoice-redesign .rp-paper-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; }
    #routepilot-invoice-redesign .rp-paper-facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e8ebef; padding-bottom: 4px; font-size: 9px; }
    #routepilot-invoice-redesign .rp-paper-facts span { color: #6a7586; }
    #routepilot-invoice-redesign .rp-paper-meter-totals {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      margin-bottom: 18px;
      border: 1px solid #dce3ec;
      background: #f7f9fc;
    }
    #routepilot-invoice-redesign .rp-paper-meter-totals div { min-width: 0; padding: 10px 12px; border-right: 1px solid #dce3ec; }
    #routepilot-invoice-redesign .rp-paper-meter-totals div:last-child { border-right: 0; background: #edf3ff; }
    #routepilot-invoice-redesign .rp-paper-meter-totals span { display: block; color: #697588; font-size: 7.5px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-paper-meter-totals strong { display: block; overflow: hidden; margin-top: 4px; color: #1e2e48; font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
    #routepilot-invoice-redesign .rp-paper-meter-totals div:nth-child(3) strong { color: #176b40; }
    #routepilot-invoice-redesign .rp-paper-meter-totals div:last-child strong { color: #173d8f; }
    #routepilot-invoice-redesign .rp-paper-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 7px; }
    #routepilot-invoice-redesign .rp-paper-section-head h3 { margin: 2px 0 0; color: #172033; font-size: 13px; }
    #routepilot-invoice-redesign .rp-paper-section-head > span { color: #657286; font-size: 8.5px; font-weight: 800; }
    #routepilot-invoice-redesign .rp-paper-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
    #routepilot-invoice-redesign .rp-paper-terminal-col { width: 18%; }
    #routepilot-invoice-redesign .rp-paper-reading-col { width: 27.333%; }
    #routepilot-invoice-redesign .rp-paper-table th { padding: 9px 12px; background: #173d8f; color: #fff; font-size: 9px; letter-spacing: .06em; text-align: right; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-paper-table th + th { border-left: 1px solid #4263a0; }
    #routepilot-invoice-redesign .rp-paper-table th small { display: block; margin-top: 2px; color: #d2def5; font-size: 7px; font-weight: 700; letter-spacing: 0; text-transform: none; }
    #routepilot-invoice-redesign .rp-paper-table th:first-child,
    #routepilot-invoice-redesign .rp-paper-table td:first-child { text-align: left; }
    #routepilot-invoice-redesign .rp-paper-table td { padding: 9px 12px; border-bottom: 1px solid #e2e6eb; font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; vertical-align: middle; }
    #routepilot-invoice-redesign .rp-paper-table td + td { border-left: 1px solid #e2e7ee; }
    #routepilot-invoice-redesign .rp-paper-table tbody tr:nth-child(even) { background: #f8fafc; }
    #routepilot-invoice-redesign .rp-paper-table td:nth-child(4) { background: rgba(232, 247, 238, .55); }
    #routepilot-invoice-redesign .rp-paper-table td:first-child { color: #172d52; font-size: 10px; font-weight: 900; letter-spacing: .015em; white-space: nowrap; }
    #routepilot-invoice-redesign .rp-paper-check { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-left: 4px; border-radius: 50%; background: #dff5e7; color: #176b40; font-size: 7px; font-weight: 900; vertical-align: middle; }
    #routepilot-invoice-redesign .rp-paper-meter-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 6px; }
    #routepilot-invoice-redesign .rp-paper-meter-pair > span { display: grid; gap: 2px; min-width: 0; }
    #routepilot-invoice-redesign .rp-paper-meter-pair small { color: #7b8798; font-size: 7px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-paper-meter-pair b { overflow: hidden; color: #35445a; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
    #routepilot-invoice-redesign .rp-paper-meter-result { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; border-top: 1px solid #dce3ec; padding-top: 5px; }
    #routepilot-invoice-redesign .rp-paper-meter-result span { color: #6a7688; font-size: 7px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-paper-meter-result b { color: #173d8f; font-size: 13px; font-weight: 900; white-space: nowrap; }
    #routepilot-invoice-redesign .rp-paper-reading.rp-paper-net .rp-paper-meter-result b { color: #176b40; }
    #routepilot-invoice-redesign .rp-paper-table tfoot td { border-top: 2px solid #173d8f; border-bottom: 0; padding-top: 7px; font-weight: 900; }
    #routepilot-invoice-redesign .rp-paper-table tfoot td:not(:first-child) { font-size: 11px; }
    #routepilot-invoice-redesign .rp-paper-reading-total {
      display: grid;
      grid-template-columns: 18fr repeat(3, 27.333fr);
      align-items: center;
      border-top: 2px solid #173d8f;
      background: #edf3ff;
      color: #173d8f;
      font-variant-numeric: tabular-nums;
    }
    #routepilot-invoice-redesign .rp-paper-reading-total > * { min-width: 0; padding: 9px 12px; }
    #routepilot-invoice-redesign .rp-paper-reading-total > * + * { border-left: 1px solid #cbd8ed; text-align: right; }
    #routepilot-invoice-redesign .rp-paper-reading-total strong { font-size: 10px; font-weight: 900; text-transform: uppercase; }
    #routepilot-invoice-redesign .rp-paper-reading-total b { overflow: hidden; font-size: 15px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
    #routepilot-invoice-redesign .rp-paper-reading-total b:last-child { color: #176b40; }
    #routepilot-invoice-redesign .rp-paper-summary {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 300px;
      gap: 32px;
      margin-top: 16px;
    }
    #routepilot-invoice-redesign .rp-paper-note { color: #59667a; font-size: 8.5px; line-height: 1.55; }
    #routepilot-invoice-redesign .rp-paper-note strong { display: block; margin-bottom: 5px; color: #172033; font-size: 10px; }
    #routepilot-invoice-redesign .rp-paper-note p { margin: 0 0 8px; }
    #routepilot-invoice-redesign .rp-paper-audit { display: flex; gap: 12px; color: #6d7889; font-size: 7.5px; }
    #routepilot-invoice-redesign .rp-paper-total-title { margin-bottom: 3px; color: #172033; font-size: 10px; font-weight: 900; }
    #routepilot-invoice-redesign .rp-paper-total-row { display: grid; grid-template-columns: minmax(0, 1fr) 108px; align-items: baseline; gap: 18px; padding: 4px 0; border-bottom: 1px solid #e6e9ed; color: #4e5c70; font-size: 9px; }
    #routepilot-invoice-redesign .rp-paper-total-row b { color: #1b2940; text-align: right; white-space: nowrap; }
    #routepilot-invoice-redesign .rp-paper-total-row.rp-paper-subtotal { border-bottom: 2px solid #9ba7b8; color: #253c64; font-weight: 900; }
    #routepilot-invoice-redesign .rp-paper-total-row.rp-paper-due { margin-top: 5px; border: 0; border-radius: 5px; padding: 8px 9px; background: #eaf0ff; color: #173d8f; font-size: 12px; font-weight: 900; }
    #routepilot-invoice-redesign .rp-paper-total-row.rp-paper-due b { color: inherit; }
    #routepilot-invoice-redesign .rp-paper-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 9px; border-top: 1px solid #dfe4e9; color: #687486; font-size: 7.5px; }
    #routepilot-invoice-redesign[data-density="compact"] .rp-main { padding: 13px; }
    #routepilot-invoice-redesign[data-density="compact"] .rp-sheet-head { padding: 15px 18px 13px; }
    #routepilot-invoice-redesign[data-density="compact"] .rp-parties { padding: 13px 18px; }
    #routepilot-invoice-redesign[data-density="compact"] .rp-total-band { margin: 0 18px 12px; padding: 11px 14px; }
    #routepilot-invoice-redesign[data-density="compact"] .rp-flow { margin: 0 18px 14px; }
    #routepilot-invoice-redesign[data-density="compact"] .rp-accounting { margin: 0 18px 14px; padding: 13px 0; }
    #routepilot-invoice-redesign[data-density="compact"] .rp-section { padding: 0 18px 14px; }
    #routepilot-invoice-redesign[data-density="compact"] .rp-lower-grid { padding: 0 18px 18px; }
    @media screen and (max-width: 760px) {
      #routepilot-invoice-redesign .rp-shell { min-height: 760px; border-radius: 16px; }
      #routepilot-invoice-redesign .rp-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 58px;
        padding: 9px 11px;
      }
      #routepilot-invoice-redesign .rp-back-mark { width: 31px; height: 31px; }
      #routepilot-invoice-redesign .rp-view-switch { grid-column: 1 / -1; grid-row: 2; width: 100%; }
      #routepilot-invoice-redesign .rp-view-switch button { flex: 1; min-width: 0; }
      #routepilot-invoice-redesign .rp-actions .rp-action:not(.rp-primary) { display: none; }
      #routepilot-invoice-redesign .rp-action.rp-primary { min-height: 32px; padding: 6px 9px; font-size: 10px; }
      #routepilot-invoice-redesign .rp-app-view { display: block; }
      #routepilot-invoice-redesign .rp-side { display: none; }
      #routepilot-invoice-redesign .rp-main { padding: 9px; }
      #routepilot-invoice-redesign .rp-invoice-sheet { border-radius: 12px; }
      #routepilot-invoice-redesign .rp-sheet-head { grid-template-columns: 1fr; gap: 12px; padding: 16px 14px 13px; }
      #routepilot-invoice-redesign .rp-invoice-title { display: flex; align-items: baseline; justify-content: space-between; text-align: left; }
      #routepilot-invoice-redesign .rp-invoice-title strong { font-size: 20px; }
      #routepilot-invoice-redesign .rp-parties { grid-template-columns: 1fr; gap: 13px; padding: 14px; }
      #routepilot-invoice-redesign .rp-facts { gap: 8px 12px; }
      #routepilot-invoice-redesign .rp-total-band { margin: 0 14px 14px; padding: 13px; }
      #routepilot-invoice-redesign .rp-total-band strong { font-size: 23px; }
      #routepilot-invoice-redesign .rp-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 14px 15px; }
      #routepilot-invoice-redesign .rp-accounting { grid-template-columns: 1fr; gap: 12px; margin: 0 14px 16px; padding: 14px 0; }
      #routepilot-invoice-redesign .rp-ledger > div { grid-template-columns: minmax(0, 1fr) 132px; }
      #routepilot-invoice-redesign .rp-section { padding: 0 14px 16px; }
      #routepilot-invoice-redesign .rp-equation-grid { grid-template-columns: 1fr; }
      #routepilot-invoice-redesign .rp-reading-wrap { overflow: visible; border: 0; }
      #routepilot-invoice-redesign .rp-readings { min-width: 0; }
      #routepilot-invoice-redesign .rp-readings thead { display: none; }
      #routepilot-invoice-redesign .rp-readings tbody { display: grid; gap: 7px; }
      #routepilot-invoice-redesign .rp-readings tr { display: grid; grid-template-columns: 1fr repeat(3, auto); align-items: center; gap: 3px 11px; border: 1px solid light-dark(#e1e7ef, #2a3a50); border-radius: 10px; padding: 10px; background: light-dark(#fbfcfe, #152235); }
      #routepilot-invoice-redesign .rp-readings td { display: none; padding: 0; border: 0; }
      #routepilot-invoice-redesign .rp-readings td:nth-child(1),
      #routepilot-invoice-redesign .rp-readings td:nth-child(4),
      #routepilot-invoice-redesign .rp-readings td:nth-child(7),
      #routepilot-invoice-redesign .rp-readings td:nth-child(8),
      #routepilot-invoice-redesign .rp-readings td:nth-child(9) { display: block; }
      #routepilot-invoice-redesign .rp-readings td:nth-child(1) { grid-column: 1 / 4; margin-bottom: 5px; }
      #routepilot-invoice-redesign .rp-readings td:nth-child(4)::before { content: "In "; color: light-dark(#7a879a, #8ea0b8); }
      #routepilot-invoice-redesign .rp-readings td:nth-child(7)::before { content: "Out "; color: light-dark(#7a879a, #8ea0b8); }
      #routepilot-invoice-redesign .rp-readings td:nth-child(8)::before { content: "Net "; color: light-dark(#7a879a, #8ea0b8); }
      #routepilot-invoice-redesign .rp-readings td:nth-child(9) { grid-column: 4; grid-row: 1; justify-self: end; }
      #routepilot-invoice-redesign .rp-more-readings { margin-top: 7px; border: 1px solid light-dark(#dce4ed, #2a3a50); border-radius: 9px; }
      #routepilot-invoice-redesign .rp-machine-list > .rp-reading-total { grid-template-columns: minmax(94px, .8fr) minmax(0, 1.7fr); gap: 5px; padding: 7px 8px; }
      #routepilot-invoice-redesign .rp-machine-list > .rp-reading-total .rp-reading-total-values { gap: 3px; }
      #routepilot-invoice-redesign .rp-machine-list > .rp-reading-total .rp-reading-total-values span { padding-left: 5px; }
      #routepilot-invoice-redesign .rp-machine-list > .rp-reading-total .rp-reading-total-values b { font-size: 10px; letter-spacing: -.02em; }
      #routepilot-invoice-redesign .rp-lower-grid { grid-template-columns: 1fr; padding: 0 14px 15px; }
      #routepilot-invoice-redesign .rp-lower-block { min-height: 0; }
      #routepilot-invoice-redesign .rp-document-view { padding: 12px 7px; }
      #routepilot-invoice-redesign .rp-paper { padding: 19px 16px; }
      #routepilot-invoice-redesign .rp-paper-head { gap: 12px; }
      #routepilot-invoice-redesign .rp-paper-title h2 { font-size: 21px; }
      #routepilot-invoice-redesign .rp-paper-meta { grid-template-columns: 1fr; gap: 14px; }
      #routepilot-invoice-redesign .rp-paper-meter-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      #routepilot-invoice-redesign .rp-paper-meter-totals div:nth-child(2) { border-right: 0; }
      #routepilot-invoice-redesign .rp-paper-meter-totals div:nth-child(-n+2) { border-bottom: 1px solid #dce3ec; }
      #routepilot-invoice-redesign .rp-paper-summary { grid-template-columns: 1fr; gap: 14px; }
      #routepilot-invoice-redesign .rp-paper-table th,
      #routepilot-invoice-redesign .rp-paper-table td { padding-right: 4px; padding-left: 4px; }
      #routepilot-invoice-redesign .rp-paper-terminal-col { width: 34%; }
      #routepilot-invoice-redesign .rp-paper-reading-col { width: 22%; }
      #routepilot-invoice-redesign .rp-paper-reading-total { grid-template-columns: 34fr repeat(3, 22fr); }
      #routepilot-invoice-redesign .rp-paper-reading-total > * { padding-right: 4px; padding-left: 4px; }
      #routepilot-invoice-redesign .rp-paper-reading-total b { font-size: 12px; }
      #routepilot-invoice-redesign .rp-paper-meter-pair,
      #routepilot-invoice-redesign .rp-paper-meter-result span { display: none; }
      #routepilot-invoice-redesign .rp-paper-meter-result { border-top: 0; padding-top: 0; }
      #routepilot-invoice-redesign .rp-paper-meter-result b { font-size: 9px; }
      #routepilot-invoice-redesign .rp-paper-footer { flex-direction: column; gap: 4px; }
    }
  
/* A receipt reduces the location ledger, not the saved invoice calculation. */
.rp-collection-balances{display:grid;gap:12px;margin:16px 0}
.rp-collection-balances>div{display:flex;justify-content:space-between;align-items:center;gap:16px}
.rp-collection-balances strong,.rp-receipt-list b{font-variant-numeric:tabular-nums;white-space:nowrap}
.rp-collection-balances small,.rp-receipt-list small{display:block;font-size:12px;opacity:.75;line-height:1.5}
.rp-collection-remaining{border-top:1px solid var(--rp-line,#cbd5e1);padding-top:12px;font-size:18px}
.rp-receipt-list{list-style:none;padding:0;margin:0}
.rp-receipt-list li{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--rp-line,#cbd5e1)}
.rp-receipt-list li>div{min-width:0;overflow-wrap:anywhere}
.rp-collection-summary h4{margin:20px 0 10px}
.rp-receipt-actions{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}
.rp-receipt-actions .rp-action{min-height:36px;padding:6px 12px;font-size:13px}
.rp-receipt-deleted>b{text-decoration:line-through;opacity:.6}
.rp-payment-correction{scroll-margin-top:24px}
.rp-payment-correction label{display:grid;gap:6px;margin:10px 0}
.rp-payment-correction input,.rp-payment-correction select,.rp-payment-correction textarea{width:100%;box-sizing:border-box;font-size:16px;padding:10px;border:1px solid var(--rp-line);border-radius:8px;color:inherit;background:transparent}
.rp-payment-correction .rp-payment-warning{padding:10px;border:1px solid #c58a30;border-radius:8px}
.rp-payment-correction [role=alert]{color:#c43838}

.rp-deleted-status { color: #dc2626 !important; font-weight: 800; }
