
    :root {
      --bg: #f6f8fb;
      --surface: #ffffff;
      --line: #d9e0ea;
      --line-strong: #b8c4d3;
      --text: #10223f;
      --muted: #607089;
      --blue: #0b4a98;
      --blue-dark: #073875;
      --green: #137a36;
      --green-soft: #e8f5eb;
      --amber: #b86b00;
      --amber-soft: #fff4df;
      --red: #bc2f32;
      --red-soft: #fdeaea;
      --shadow: 0 14px 36px rgba(20, 42, 75, 0.08);
      --radius: 8px;
      font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      color: var(--text);
      background: var(--bg);
      font-size: 14px;
      letter-spacing: 0;
    }

    button, input, select, textarea {
      font: inherit;
      color: inherit;
    }

    .app {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    header {
      background: var(--surface);
      border-bottom: 1px solid var(--line);
      box-shadow: 0 1px 0 rgba(16, 34, 63, 0.03);
    }

    .topbar {
      max-width: 1480px;
      margin: 0 auto;
      padding: 16px 22px;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 16px;
      align-items: center;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .mark {
      width: 42px;
      height: 42px;
      border-radius: 7px;
      background: var(--blue);
      color: white;
      display: grid;
      place-items: center;
      font-weight: 800;
      font-size: 17px;
      flex: 0 0 auto;
    }

    .brand h1 {
      margin: 0;
      font-size: 21px;
      line-height: 1.1;
      font-weight: 760;
      color: var(--blue-dark);
      white-space: nowrap;
    }

    .brand p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 12px;
    }

    .toolbar {
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .button {
      border: 1px solid var(--line-strong);
      background: var(--surface);
      border-radius: 6px;
      padding: 9px 12px;
      cursor: pointer;
      color: var(--blue-dark);
      font-weight: 650;
      min-height: 38px;
    }

    .button.primary {
      color: white;
      border-color: var(--blue);
      background: var(--blue);
    }

    .button:hover { border-color: var(--blue); }

    main {
      width: 100%;
      max-width: 1480px;
      margin: 0 auto;
      padding: 18px 22px 28px;
    }

    .quote-meta {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 14px;
    }

    .layout {
      display: grid;
      grid-template-columns: 340px minmax(520px, 1fr) 330px;
      gap: 12px;
      align-items: start;
    }

    .panel {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .panel-header {
      padding: 13px 15px;
      border-bottom: 1px solid var(--line);
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
    }

    .panel-title {
      margin: 0;
      font-size: 14px;
      color: var(--blue-dark);
      font-weight: 800;
      text-transform: uppercase;
    }

    .panel-body { padding: 15px; }

    .field {
      display: grid;
      gap: 7px;
      margin-bottom: 13px;
    }

    label {
      color: #243959;
      font-size: 12px;
      font-weight: 700;
    }

    input, select, textarea {
      width: 100%;
      border: 1px solid var(--line-strong);
      border-radius: 6px;
      background: white;
      padding: 9px 10px;
      min-height: 38px;
      outline: none;
    }

    input:focus, select:focus, textarea:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(11, 74, 152, 0.11);
    }

    .segmented {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      border: 1px solid var(--line-strong);
      border-radius: 6px;
      overflow: hidden;
      background: white;
    }

    .segmented.four { grid-template-columns: repeat(4, 1fr); }

    .segmented button {
      min-height: 38px;
      border: 0;
      border-right: 1px solid var(--line);
      background: white;
      cursor: pointer;
      font-weight: 700;
      color: #30435f;
    }

    .segmented button:last-child { border-right: 0; }
    .segmented button.active {
      color: var(--blue);
      background: #eef5ff;
      box-shadow: inset 0 0 0 1px var(--blue);
    }

    .check-row {
      display: grid;
      grid-template-columns: 20px 1fr auto;
      gap: 9px;
      align-items: center;
      padding: 9px 0;
      border-bottom: 1px solid #edf1f6;
    }

    .check-row:last-child { border-bottom: 0; }
    .check-row input { width: 18px; min-height: 18px; }
    .check-row span { color: var(--muted); font-size: 12px; }

    .amount-input {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .amount-input input {
      text-align: right;
      padding-right: 8px;
    }

    .table-wrap { overflow-x: auto; }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 760px;
    }

    th, td {
      border-bottom: 1px solid #e5ebf2;
      padding: 10px 9px;
      text-align: left;
      vertical-align: top;
    }

    th {
      background: #f4f7fb;
      color: #30435f;
      font-size: 12px;
      font-weight: 800;
    }

    td.money, th.money { text-align: right; white-space: nowrap; }
    td.center, th.center { text-align: center; }

    .section-row td {
      background: #edf3fb;
      color: var(--blue-dark);
      font-weight: 800;
      border-bottom-color: #d8e3f1;
    }

    .section-row.optional td {
      background: #eef8f0;
      color: #155f2d;
    }

    .section-row.pass td {
      background: #fff5df;
      color: #835000;
    }

    .muted { color: var(--muted); font-size: 12px; }
    .strong { font-weight: 800; }

    .summary-total {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 12px;
      padding: 14px 15px;
      background: var(--blue-dark);
      color: white;
      font-weight: 850;
      font-size: 17px;
    }

    .risk {
      border: 1px solid;
      border-radius: 7px;
      padding: 11px 12px;
      margin-bottom: 10px;
      line-height: 1.5;
    }

    .risk.green { border-color: #9fd2ad; background: var(--green-soft); }
    .risk.amber { border-color: #f0c77b; background: var(--amber-soft); }
    .risk.red { border-color: #efaaaa; background: var(--red-soft); }
    .risk h3 { margin: 0 0 5px; font-size: 13px; }
    .risk.green h3 { color: var(--green); }
    .risk.amber h3 { color: var(--amber); }
    .risk.red h3 { color: var(--red); }

    .summary-list {
      display: grid;
      gap: 8px;
      margin: 0 0 14px;
      padding: 0;
      list-style: none;
    }

    .summary-list li {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      border-bottom: 1px dashed #dce4ee;
      padding-bottom: 7px;
    }

    .summary-list span:first-child { color: var(--muted); }

    .note {
      margin-top: 12px;
      padding: 12px 15px;
      border-top: 1px solid var(--line);
      color: #42536d;
      font-size: 12px;
      line-height: 1.6;
      background: #fbfcfe;
    }

    .footer-note {
      margin-top: 12px;
      display: grid;
      gap: 8px;
    }

    .toast {
      position: fixed;
      right: 20px;
      bottom: 20px;
      background: #10223f;
      color: white;
      padding: 12px 14px;
      border-radius: 7px;
      box-shadow: var(--shadow);
      opacity: 0;
      pointer-events: none;
      transform: translateY(8px);
      transition: 0.2s ease;
    }

    .toast.show {
      opacity: 1;
      transform: translateY(0);
    }

    .company-footer {
      background: var(--blue-dark);
      color: rgba(255, 255, 255, 0.88);
      padding: 16px 22px;
      font-size: 12px;
      line-height: 1.7;
    }

    .company-footer-inner {
      max-width: 1480px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      flex-wrap: wrap;
    }

    .company-footer-main strong {
      display: block;
      font-size: 13.5px;
      font-weight: 800;
      color: white;
      margin-bottom: 3px;
    }

    .company-footer-main span { display: block; opacity: 0.85; }

    .company-footer-contact {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 3px;
      white-space: nowrap;
    }

    .company-footer-contact a {
      color: white;
      text-decoration: none;
      font-weight: 650;
    }

    .company-footer-contact a:hover { text-decoration: underline; }

    .company-footer-copyright {
      max-width: 1480px;
      margin: 10px auto 0;
      padding-top: 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.15);
      opacity: 0.65;
      font-size: 11px;
    }

    @media (max-width: 760px) {
      .company-footer-inner { flex-direction: column; }
      .company-footer-contact { align-items: flex-start; }
    }

    input:invalid, select:invalid {
      border-color: var(--red);
      box-shadow: 0 0 0 3px rgba(188, 47, 50, 0.12);
    }

    .total-caveat {
      margin: 0 15px 15px;
      padding: 10px 12px;
      border-radius: 7px;
      font-size: 12.5px;
      line-height: 1.6;
      background: var(--amber-soft);
      border: 1px solid #f0c77b;
      color: #7a4b00;
    }

    .total-caveat div { margin-bottom: 3px; }
    .total-caveat div:last-child { margin-bottom: 0; }

    .total-caveat.danger {
      background: var(--red-soft);
      border-color: #efaaaa;
      color: var(--red);
    }

    .check-row.is-custom { background: #fff9ec; }

    .custom-badge {
      display: inline-block;
      margin-left: 6px;
      font-size: 10px;
      padding: 1px 6px;
      border-radius: 10px;
      background: #ffe6b3;
      color: #7a4b00;
      font-weight: 700;
      vertical-align: middle;
    }

    .reset-price-btn {
      border: none;
      background: none;
      color: var(--blue);
      font-size: 11px;
      cursor: pointer;
      text-decoration: underline;
      padding: 0;
      white-space: nowrap;
    }

    .field.hidden { display: none; }

    .group-title {
      font-size: 11px;
      font-weight: 800;
      color: var(--blue-dark);
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin: 0 0 10px;
      padding-top: 14px;
      border-top: 1px dashed var(--line);
    }

    .group-title:first-child {
      padding-top: 0;
      border-top: none;
    }

    .scenario-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 10px 15px;
      border-bottom: 1px solid var(--line);
      background: #f8fafd;
    }

    .chip {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 999px;
      background: #eef5ff;
      color: var(--blue-dark);
      font-size: 11.5px;
      font-weight: 700;
      border: 1px solid #d7e6fb;
      white-space: nowrap;
    }

    .app-nav {
      display: flex;
      gap: 4px;
      background: #0d2c52;
      padding: 0 22px;
    }

    .app-nav button {
      appearance: none;
      border: none;
      background: transparent;
      color: rgba(255, 255, 255, 0.65);
      font-size: 13px;
      font-weight: 700;
      font-family: inherit;
      padding: 11px 16px;
      cursor: pointer;
      border-bottom: 3px solid transparent;
    }

    .app-nav button:hover { color: rgba(255, 255, 255, 0.9); }

    .app-nav button.active {
      color: white;
      border-bottom-color: #4da3ff;
    }

    .view-carrier {
      background: white;
    }


    /* ===== 本地报价页优化：折扣/自定义费用/出单前检查/金额阶梯 ===== */
    .inline-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .ci { border: 1px solid #dfe6f0; border-radius: 8px; padding: 8px; margin-bottom: 8px; background: #fbfcfe; }
    .ci-top { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
    .ci-top input { flex: 1; min-width: 0; }
    .ci-acts { display: inline-flex; gap: 3px; flex: none; }
    .ci-acts button { appearance: none; border: 1px solid var(--line-strong); background: white; border-radius: 6px; width: 28px; height: 28px; padding: 0; cursor: pointer; font-size: 12px; }
    .ci-acts button:disabled { opacity: .35; cursor: default; }
    .ci-acts button.danger { color: var(--red); }
    .ci-row { display: grid; grid-template-columns: 1.3fr 0.7fr auto; gap: 6px; align-items: center; }
    .ci-row label { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; margin: 0; }
    .ci-row label input { width: auto; min-height: 0; }
    .ci-amt { grid-column: 1 / -1; text-align: right; font: 700 12px Consolas, monospace; color: var(--blue-dark); }
    .preflight { margin: 0 15px 12px; border-radius: 8px; padding: 9px 12px; font-size: 12px; border: 1px solid; }
    .preflight.ok { background: var(--green-soft); border-color: #b7dfc2; color: #0f6a2e; }
    .preflight.warn { background: var(--amber-soft); border-color: #f2d49b; color: #7a4a00; }
    .preflight.bad { background: var(--red-soft); border-color: #f0b4b5; color: #9b2022; }
    .preflight ul { margin: 5px 0 0; padding-left: 18px; line-height: 1.6; }
    .preflight li.err { font-weight: 700; }
    tr.subtotal-row td { background: #f8fafc; color: #30435f; font-weight: 700; border-bottom: 2px solid #dbe4ef; }
    tr.discount-row td { color: var(--red); }
    tr.vat-row td { background: #fffdf5; }
    tbody tr:not(.section-row):not(.subtotal-row):nth-child(even) td { background: #fcfdfe; }
    .summary-ladder:empty { display: none; }
    .summary-ladder { border: 1px solid #d8e3f1; border-bottom: none; background: #f6f9fd; padding: 6px 15px; }
    .summary-ladder div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; }
    .summary-ladder div + div { border-top: 1px dashed #cfd9e6; }
    .summary-ladder .neg { color: var(--red); font-weight: 700; }
    .summary-ladder strong { font-family: Consolas, monospace; }
    .share-view .preflight, .share-view #addCustomItem { display: none !important; }
    @media print {
      .preflight { display: none !important; }
      .summary-total, .section-row td, .summary-ladder, tr.subtotal-row td, th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
      tr { break-inside: avoid; }
      thead { display: table-header-group; }
    }


    /* ===== 按运输/柜型自动匹配费用 ===== */
    .match-note { margin-top: 8px; border: 1px solid #cfe3d4; background: #f1faf3; color: #14532d; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.6; }
    .match-note:empty { display: none; }
    .match-note .diff { display: block; margin-top: 3px; color: #92400e; font-weight: 700; }
    .match-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 2px 8px; }
    .match-bar .button { min-height: 28px; padding: 4px 10px; font-size: 12px; }
    .check-row.out-of-scope { display: none; }
    .check-row.replaced { opacity: .5; }
    .check-row.replaced strong::after { content: "（已被专属费用替代）"; font-weight: 600; font-size: 11px; color: var(--muted); }
    .share-view .match-note, .share-view .match-bar { display: none !important; }
    @media print { .match-note { display: none !important; } }


    /* ===== 费用明细版式 ===== */
    .table-wrap table { min-width: 560px; }
    .table-wrap th.money, .table-wrap td.money { min-width: 104px; }
    .table-wrap td.nowrap { white-space: nowrap; }
    .row-note { margin-top: 3px; font-weight: 400; line-height: 1.5; }
    @media (max-width: 820px) { .table-wrap table { min-width: 520px; } }

    @media print {
      .app-nav { display: none !important; }
    }

    @media (max-width: 1180px) {
      .layout { grid-template-columns: 320px 1fr; }
      .side { grid-column: 1 / -1; }
      .quote-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    .sticky-total {
      position: sticky;
      top: 0;
      z-index: 20;
      background: var(--blue-dark);
      color: white;
      box-shadow: 0 4px 14px rgba(7, 56, 117, 0.25);
    }

    .sticky-total-inner {
      max-width: 1480px;
      margin: 0 auto;
      padding: 9px 22px;
      display: flex;
      align-items: center;
      gap: 18px;
      flex-wrap: wrap;
    }

    .sticky-total-customer {
      font-weight: 700;
      font-size: 13px;
      opacity: 0.92;
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .sticky-total-amount {
      font-size: 13px;
      opacity: 0.92;
      white-space: nowrap;
    }

    .sticky-total-amount strong {
      font-size: 17px;
      font-weight: 850;
      margin-left: 4px;
    }

    .sticky-total-validity {
      font-size: 12px;
      opacity: 0.8;
      white-space: nowrap;
    }

    .sticky-total .button {
      min-height: 30px;
      padding: 6px 12px;
      font-size: 12.5px;
      border-color: rgba(255, 255, 255, 0.5);
      background: rgba(255, 255, 255, 0.08);
      color: white;
    }

    .sticky-total .button:hover { border-color: white; }

    .segmented.hero button {
      min-height: 50px;
      font-size: 15px;
      font-weight: 800;
    }

    .preset-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }

    .preset-chip {
      border: 1px solid var(--line-strong);
      background: white;
      border-radius: 999px;
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 700;
      color: var(--blue-dark);
      cursor: pointer;
    }

    .preset-chip:hover { border-color: var(--blue); }

    .preset-chip.add {
      border-style: dashed;
      color: var(--muted);
      font-weight: 600;
    }

    .preset-chip .remove-preset {
      margin-left: 6px;
      color: var(--muted);
      font-weight: 800;
      text-decoration: none;
    }

    .options-toggle {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border: 1px solid var(--line-strong);
      background: #f4f7fb;
      border-radius: 6px;
      padding: 10px 12px;
      cursor: pointer;
      font-weight: 700;
      color: var(--blue-dark);
      font-size: 12.5px;
      text-align: left;
    }

    .options-toggle-arrow { color: var(--muted); font-weight: 600; font-size: 11.5px; }

    .options-panel {
      margin-top: 10px;
    }

    .options-panel.collapsed { display: none; }

    .history-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: grid;
      gap: 8px;
      max-height: 360px;
      overflow-y: auto;
    }

    .history-item {
      border: 1px solid var(--line);
      border-radius: 7px;
      padding: 9px 10px;
      font-size: 12px;
    }

    .history-item-top {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      font-weight: 800;
      color: var(--blue-dark);
      margin-bottom: 3px;
    }

    .history-item-meta {
      color: var(--muted);
      margin-bottom: 6px;
    }

    .history-item-actions {
      display: flex;
      gap: 10px;
    }

    .history-item-actions button {
      border: none;
      background: none;
      color: var(--blue);
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
      padding: 0;
      text-decoration: underline;
    }

    .history-item-actions button.danger { color: var(--red); }

    .history-empty { color: var(--muted); font-size: 12px; }

    .output-wrap { position: relative; }

    .output-menu {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      background: white;
      border: 1px solid var(--line-strong);
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
      z-index: 30;
      min-width: 200px;
    }

    .output-menu button {
      display: block;
      width: 100%;
      text-align: left;
      border: none;
      background: white;
      padding: 11px 14px;
      font-size: 13px;
      font-weight: 650;
      color: var(--text);
      cursor: pointer;
      border-bottom: 1px solid var(--line);
    }

    .output-menu button:last-child { border-bottom: none; }
    .output-menu button:hover { background: #eef5ff; color: var(--blue-dark); }

    .sticky-total .output-menu { color: var(--text); }

    .share-banner {
      background: var(--green-soft);
      border-bottom: 1px solid #9fd2ad;
      color: #155f2d;
      padding: 10px 22px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      font-size: 12.5px;
      font-weight: 650;
    }

    .share-banner #shareContinueEdit {
      min-height: 30px;
      padding: 6px 12px;
      font-size: 12px;
      background: white;
    }

    .share-view .app-nav,
    .share-view .inputs,
    .share-view #historyPanel,
    .share-view #internalNoteField,
    .share-view #resetQuote { display: none !important; }

    .share-view [data-output="link"] { display: none !important; }

    .share-view .layout { grid-template-columns: minmax(520px, 1fr) 330px; }

    @media (max-width: 760px) {
      .topbar { grid-template-columns: 1fr; }
      .toolbar { justify-content: stretch; }
      .toolbar .button { flex: 1 1 auto; }
      main { padding: 12px; }
      .layout, .quote-meta, .share-view .layout { grid-template-columns: 1fr; }
      .brand h1 { white-space: normal; font-size: 18px; }
    }

    @media print {
      body { background: white; }
      header, .toolbar, .inputs, .footer-note, .toast, .sticky-total, .share-banner, .output-menu { display: none !important; }
      #historyPanel, #internalNoteField { display: none !important; }
      main { max-width: none; padding: 0; }
      .layout { display: block; }
      .panel { box-shadow: none; border-color: #bbb; margin-bottom: 12px; }
      .side { display: block; }
    }
  

    /* ===== 船东LOCAL查询工具样式（作用域限定在 #carrierApp 内） ===== */
    /* all:revert 兜底：防止主工具里同名的裸标签选择器(header/input/label/select/table/td/th)
       和同名class(.panel/.brand/.chip)残留属性渗透进#carrierApp内部，反之亦然。
       custom property(--变量)不受all影响，不会被这条规则清空。 */
    #carrierApp, #carrierApp * { all: revert; }
    /* 针对已经排查确认、且不完全依赖 all:revert 兜底的具体渗透点做二次明确覆盖：
       主工具对裸标签 header/input/select/table 分别设置了 border-bottom、min-height、min-width，
       这些属性船东工具自己的规则原本没有显式声明，这里补上，确保万无一失。 */
    #carrierApp header { border-bottom: none; }
    #carrierApp input, #carrierApp select { min-height: unset; }
    #carrierApp table { min-width: 0; }
#carrierApp{
  --bg:#f4f6fa; --panel:#ffffff; --panel2:#fafbfd; --line:#e2e8f0; --line2:#eef2f7;
  --ink:#1a2233; --ink2:#5a6b82; --ink3:#8b9ab0;
  --blue:#1d5fbf; --blue-s:#eaf1fc; --blue-b:#c7dcf7;
  --red:#c62828; --red-s:#fdeceb;
  --amber:#a86a00; --amber-s:#fff6e5;
  --green:#1b7f5a; --green-s:#e8f6f0;
  --shadow:0 1px 2px rgba(16,32,64,.05),0 6px 20px rgba(16,32,64,.06);
  --r:10px;
}#carrierApp *{box-sizing:border-box}#carrierApp{margin:0;padding:0}#carrierApp{
  background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei","PingFang SC",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:14px; line-height:1.55; -webkit-font-smoothing:antialiased;
}#carrierApp a{color:var(--blue);text-decoration:none}#carrierApp .wrap{max-width:1500px;margin:0 auto;padding:0 20px 64px}#carrierApp /* ---------- header ---------- */
header{
  background:linear-gradient(135deg,#123a6e 0%,#1d5fbf 55%,#2f7ad1 100%);
  color:#fff;padding:30px 0 26px;margin-bottom:22px;
  box-shadow:0 2px 14px rgba(18,58,110,.22);
}#carrierApp header .wrap{padding-bottom:0}#carrierApp .brand{display:flex;align-items:center;gap:12px;flex-wrap:wrap}#carrierApp .brand .logo{
  width:38px;height:38px;border-radius:9px;background:rgba(255,255,255,.16);
  display:flex;align-items:center;justify-content:center;font-size:19px;
  border:1px solid rgba(255,255,255,.25)
}#carrierApp h1{margin:0;font-size:21px;font-weight:650;letter-spacing:.2px}#carrierApp .sub{margin:12px 0 0;font-size:13px;color:rgba(255,255,255,.82);max-width:900px}#carrierApp .kpis{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}#carrierApp .kpi{
  background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.22);
  border-radius:9px;padding:9px 15px;min-width:112px
}#carrierApp .kpi b{display:block;font-size:19px;font-weight:670;line-height:1.25}#carrierApp .kpi span{font-size:11.5px;color:rgba(255,255,255,.8)}#carrierApp /* ---------- panels ---------- */
.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}#carrierApp .filters{padding:16px 18px;margin-bottom:16px}#carrierApp .frow{display:grid;grid-template-columns:repeat(auto-fit,minmax(178px,1fr));gap:13px}#carrierApp .fld label{display:block;font-size:11.5px;font-weight:650;color:var(--ink2);margin-bottom:5px;letter-spacing:.3px;text-transform:uppercase}#carrierApp .fld input, #carrierApp .fld select{
  width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:7px;
  font-size:13.5px;background:#fff;color:var(--ink);font-family:inherit;outline:none;transition:.15s
}#carrierApp .fld input:focus, #carrierApp .fld select:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-s)}#carrierApp .fld select{cursor:pointer;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%235a6b82' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;padding-right:30px}#carrierApp .chips{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px;align-items:center}#carrierApp .chip{
  border:1px solid var(--line);background:var(--panel2);border-radius:20px;
  padding:5px 13px;font-size:12.5px;cursor:pointer;color:var(--ink2);
  transition:.14s;user-select:none;white-space:nowrap
}#carrierApp .chip:hover{border-color:var(--blue-b);color:var(--blue)}#carrierApp .chip.on{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}#carrierApp .chip.on.c-dem{background:var(--red);border-color:var(--red)}#carrierApp .chip.on.c-lcc{background:var(--green);border-color:var(--green)}#carrierApp .spacer{flex:1}#carrierApp .btn{
  border:1px solid var(--line);background:#fff;border-radius:7px;padding:7px 14px;
  font-size:12.5px;cursor:pointer;color:var(--ink2);font-family:inherit;transition:.14s
}#carrierApp .btn:hover{border-color:var(--blue);color:var(--blue);background:var(--blue-s)}#carrierApp /* ---------- toolbar ---------- */
.bar{display:flex;align-items:center;gap:12px;padding:11px 18px;flex-wrap:wrap;border-bottom:1px solid var(--line2)}#carrierApp .count{font-size:13px;color:var(--ink2)}#carrierApp .count b{color:var(--blue);font-size:15px;font-weight:670}#carrierApp .tabs{display:flex;gap:4px;margin-left:auto;background:var(--panel2);padding:3px;border-radius:8px;border:1px solid var(--line2)}#carrierApp .tab{padding:5px 13px;border-radius:6px;font-size:12.5px;cursor:pointer;color:var(--ink2);transition:.14s;white-space:nowrap}#carrierApp .tab.on{background:#fff;color:var(--blue);font-weight:650;box-shadow:0 1px 3px rgba(16,32,64,.1)}#carrierApp /* ---------- table ---------- */
.tblwrap{overflow:auto;max-height:min(70vh,860px);border-radius:0 0 var(--r) var(--r)}#carrierApp table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}#carrierApp thead th{
  position:sticky;top:0;z-index:3;background:#f7f9fc;color:var(--ink2);
  font-size:11.5px;font-weight:670;text-align:left;padding:10px 12px;
  border-bottom:1px solid var(--line);letter-spacing:.3px;white-space:nowrap
}#carrierApp thead th.sortable{cursor:pointer;user-select:none}#carrierApp thead th.sortable:hover{color:var(--blue);background:var(--blue-s)}#carrierApp thead th .ar{opacity:.35;font-size:10px;margin-left:3px}#carrierApp thead th.sorted .ar{opacity:1;color:var(--blue)}#carrierApp tbody td{padding:9px 12px;border-bottom:1px solid var(--line2);vertical-align:top}#carrierApp tbody tr:hover{background:#f9fbfe}#carrierApp tbody tr:last-child td{border-bottom:none}#carrierApp .c-carrier{font-weight:620;color:var(--ink);white-space:nowrap}#carrierApp .c-carrier small{display:block;font-weight:400;font-size:11px;color:var(--ink3);margin-top:1px}#carrierApp .tag{display:inline-block;padding:2px 8px;border-radius:5px;font-size:11px;font-weight:650;white-space:nowrap}#carrierApp .t-LCC{background:var(--green-s);color:var(--green);border:1px solid #c3e7d8}#carrierApp .t-DEM{background:var(--red-s);color:var(--red);border:1px solid #f6cfcc}#carrierApp .t-dir{display:inline-block;padding:2px 8px;border-radius:5px;font-size:11px;font-weight:600;white-space:nowrap}#carrierApp .d-x{background:var(--blue-s);color:var(--blue);border:1px solid var(--blue-b)}#carrierApp .d-n{background:var(--amber-s);color:var(--amber);border:1px solid #f2dfb8}#carrierApp .c-item{font-weight:600}#carrierApp .c-item small{display:block;font-weight:400;font-size:11px;color:var(--ink3);margin-top:1px}#carrierApp .c-rate{font-variant-numeric:tabular-nums;font-weight:670;white-space:nowrap}#carrierApp .c-rate .cur{font-size:11px;font-weight:600;color:var(--ink3);margin-right:3px}#carrierApp .c-unit{color:var(--ink2);font-size:12px;white-space:nowrap}#carrierApp .c-scope{font-size:12px;white-space:nowrap}#carrierApp .c-note{color:var(--ink2);font-size:11.5px;max-width:260px;line-height:1.45}#carrierApp .cur-pill{display:inline-block;padding:1px 6px;border-radius:4px;font-size:10.5px;font-weight:650;
  background:var(--panel2);border:1px solid var(--line);color:var(--ink2)}#carrierApp .empty{padding:56px 20px;text-align:center;color:var(--ink3)}#carrierApp .empty b{display:block;font-size:15px;color:var(--ink2);margin-bottom:6px}#carrierApp /* ---------- footer ---------- */
footer{margin-top:22px;font-size:12px;color:var(--ink3);line-height:1.7}#carrierApp footer .panel{padding:15px 18px}#carrierApp footer b{color:var(--ink2)}

@media (max-width:820px){#carrierApp .wrap{padding:0 12px 48px}#carrierApp h1{font-size:17px}#carrierApp .frow{grid-template-columns:1fr 1fr}#carrierApp .tabs{margin-left:0;width:100%;overflow:auto}#carrierApp .c-note{max-width:150px}
}
@media print{#carrierApp header{background:#123a6e !important;-webkit-print-color-adjust:exact}#carrierApp .filters, #carrierApp .tabs, #carrierApp .bar .btn{display:none}#carrierApp .tblwrap{max-height:none;overflow:visible}#carrierApp{background:#fff}
}


.rate-sync{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:6px}.rate-sync .button{padding:5px 10px;min-height:30px;font-size:12px}

.app-nav { flex-wrap: wrap; align-items: center; }
.app { min-height: 0; }
.app-nav .site-home-link { margin-left: auto; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; padding: 8px 10px; }
.app-nav .site-home-link:hover { text-decoration: underline; }
.rate-sync .button:disabled { opacity: .6; cursor: not-allowed; }
