:root {
  --navy: #062a6a;
  --navy-border: #24416f;
  --sheet: #e9e9e9;
  --grid: #1f1f1f;
  --green: #00b050;
  --blue: #0070c0;
  --yellow: #fff200;
  --danger: #c00000;
  --white: #ffffff;
  --text: #111111;
  --menu-active: #808080;
  --menu-inactive: #0070c0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  background: #dcdcdc;
  font-family: Calibri, Arial, Helvetica, sans-serif;
  color: var(--text);
}

.sheet {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  background: var(--sheet);
  border: 1px solid #cfcfcf;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 14px 14px 24px;
  overflow-x: auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.header-right {
  text-align: right;
}

.user-bar {
  font-size: 13px;
  color: #444;
  margin-bottom: 6px;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.company-bar {
  font-size: 13px;
  color: #444;
  font-weight: 700;
  margin-top: 4px;
}

.user-bar a {
  color: #0070c0;
  text-decoration: none;
  font-weight: 700;
}

.title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.top-menu {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
  margin-top: 2px;
}

.top-menu a {
  text-decoration: none;
  color: #808080; /* abu-abu */
  cursor: pointer;
}

.top-menu a.active {
  color: #0070c0; /* biru */
  font-weight: 700;
  pointer-events: none;
}

.top-menu .sep {
  color: #666;
  margin: 0 8px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.top-grid-road {
  display: grid;
  grid-template-columns: 410px 70px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.top-grid-sea {
  display: grid;
  grid-template-columns: 310px 70px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.filter-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.filter-table td {
  border: 1px solid var(--grid);
  height: 24px;
  padding: 0 6px;
  font-size: 14px;
}

.filter-table .label {
  background: transparent;
  font-style: italic;
  border-left: none;
}

.filter-table .value {
  background: var(--yellow);
  font-weight: 700;
  padding: 0;
  position: relative;
  overflow: visible;
}

.filter-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  padding: 0 6px;
}

.combo-box {
  position: relative;
  width: 100%;
  height: 100%;
}

.combo-list {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  width: 430px;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #666;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.combo-list.show {
  display: block;
}

.combo-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.combo-item:hover {
  background: #dbe8ff;
}

.combo-port {
  font-weight: 700;
}

.combo-city {
  color: #555;
}

.cost-breakdown-table td.empty-col {
  background: #e6e6e6;
}

.additional-title {
  background: #000;
  color: #fff;
  text-align: left;
  font-weight: 700;
  padding-left: 6px;
}

.cost-note-wrap {
  margin-top: 8px;
}

.cost-note {
  margin: 2px 0;
  font-size: 14px;
  line-height: 1.2;
}

.btn-search {
  width: 56px;
  height: 28px;
  margin-top: 8px;
  border: 1px solid #8c8c8c;
  background: linear-gradient(#efefef, #d6d6d6);
  box-shadow: inset 0 1px 0 #fff;
  cursor: pointer;
  font-size: 14px;
}

.btn-search:disabled {
  cursor: not-allowed;
  opacity: .8;
}

.btn-check-cost,
.btn-check-road-cost {
  min-width: 64px;
  height: 28px;
  padding: 2px 10px;
  border: 1px solid #8c8c8c;
  background: linear-gradient(#efefef, #d6d6d6);
  cursor: pointer;
  font-size: 12px;
}

.include-text {
  font-style: italic;
}

.table-wrap {
  border: 1px solid var(--grid);
  background: #fff;
  overflow-x: auto;
  width: 100%;
}

/* kondisi awal: belum ada hasil */
.table-wrap.is-empty {
  overflow-y: hidden;
}

/* setelah ada hasil: baru boleh stretch + scroll */
.table-wrap.has-rows {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}.table-wrap {
  border: 1px solid var(--grid);
  background: #fff;
  overflow-x: auto;
  width: 100%;
}

/* kondisi awal: belum ada hasil */
.table-wrap.is-empty {
  overflow-y: hidden;
}

/* setelah ada hasil: baru boleh stretch + scroll */
.table-wrap.has-rows {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

table.rates {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

table.rates th.center {
  text-align: center;
}

table.rates th.num {
  text-align: right;
}

.rates thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy-border);
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  vertical-align: middle;
  background-clip: padding-box;
}

.rates tbody td {
  position: relative;
  z-index: 1;
  border: 1px solid var(--grid);
  padding: 2px 4px;
  font-size: 13px;
  height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff;
}

#sf_tableBody:empty::before {
  content: none;
}

#sf_tableBody:empty {
  display: none;
}
.center {
  text-align: center;
}

.center .multi-line-cell {
  text-align: center;
}

.num {
  text-align: right;
}

.status-active td,
.status-same-month td,
.status-expired td {
  color: inherit;
  font-weight: inherit;
}

td.rate-green {
  color: var(--green);
  font-weight: 700;
}

td.rate-blue {
  color: var(--blue);
  font-weight: 700;
}

td.rate-black {
  color: #000;
  font-weight: 400;
}


.status-error {
  color: var(--danger);
  font-weight: 700;
  padding: 12px;
  white-space: normal !important;
}

#seaPanel .status-active td {
  color: inherit;
  font-weight: normal;
}

td.vendor-link {
  color: #0070c0 !important;
  cursor: pointer;
  text-decoration: underline;

  white-space: normal !important;
  word-break: break-word;
  overflow: hidden;
  line-height: 1.2;
}

td.vendor-link:hover {
  color: #005a9e !important;
}

.muted {
  color: #666;
  font-size: 13px;
  margin-top: 10px;
}

.vendor-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vendor-modal.show {
  display: flex;
}

.vendor-modal-box {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border: 3px solid #0070c0;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  padding: 18px 20px 16px;
}

.vendor-modal-body {
  font-size: 15px;
  line-height: 1.45;
  color: #111;
  white-space: normal;
}

.vendor-table {
  width: 100%;
  border-collapse: collapse;
}

.vendor-table td {
  vertical-align: top;
  padding: 2px 0;
  font-size: 15px;
}

.vendor-label {
  width: 200px;
  font-weight: 400;
  white-space: nowrap;
  padding-right: 14px;
}

.vendor-value {
  white-space: normal;
  word-break: break-word;
}

.vendor-block-line {
  display: block;
  margin-bottom: 2px;
}

.vendor-modal-footer {
  text-align: center;
  margin-top: 18px;
}

.vendor-modal-close-btn {
  min-width: 120px;
  height: 36px;
  border: 1px solid #8c8c8c;
  background: linear-gradient(#efefef, #d6d6d6);
  cursor: pointer;
  font-size: 14px;
}

.sf-col-route { width: 250px; }
.sf-col-cargo-terms { width: 120px; }

.multi-line-cell {
  line-height: 1.35;
  white-space: normal !important;
}

.multi-line-cell .line-1,
.multi-line-cell .line-2 {
  display: block;
}

.multi-line-cell .line-1,
.multi-line-cell .line-2 {
  font-weight: 400;
}

.multi-line-cell .line-2 {
  margin-top: 2px;
}

.multi-line-cell .line-3 {
  display: block;
  margin-top: 2px;

  color: #0070c0;     /* biru */
  font-size: 11px;    /* kecil */
  font-style: italic; /* miring */
}

.cost-check-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cost-check-modal.show {
  display: flex;
}

.cost-check-box {
  width: 100%;
  max-width: 650px;
  max-height: 95vh;
  overflow: auto;
  background: #ffffff;
  border: 2px solid #24416f;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  padding: 18px;
}

.cost-check-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cost-check-title {
  font-size: 24px;
  font-weight: 700;
  color: #062a6a;
}

.cost-check-actions {
  display: flex;
  gap: 8px;
}

.cost-check-btn {
  min-width: 100px;
  height: 34px;
  border: 1px solid #8c8c8c;
  background: linear-gradient(#efefef, #d6d6d6);
  cursor: pointer;
  font-size: 14px;
}

.cost-check-content {
  background: #fff;
}

.cost-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 24px;
}

.cost-breakdown-table th,
.cost-breakdown-table td {
  border: 1px solid #1f1f1f;
  padding: 2px 6px;
  font-size: 13px;
  line-height: 1.2;
}

.cost-breakdown-table th {
  background: #000;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.cost-breakdown-table td {
  background: #fff;
}

.cost-breakdown-table td.num {
  text-align: right;
}

.cost-breakdown-table .total-row td {
  font-weight: 700;
}

.additional-table {
  margin-top: 8px;
}

.header-menu a {
  font-size: 20px;
  font-weight: 700;
}

.cost-vendor-box {
  margin-bottom: 14px;
  font-size: 15px;
}

.cost-vendor-row {
  display: grid;
  grid-template-columns: 120px 14px 1fr;
  align-items: start;
  margin-bottom: 4px;
}

.cost-vendor-label {
  font-weight: 700;
}

.cost-vendor-sep {
  text-align: center;
}

.cost-vendor-value {
  text-align: left;
}


/* hover */
.btn-check:hover {
  background-color: #005a9e;
  border-color: #004080;
}

/* klik (active) */
.btn-check:active {
  background-color: #004080;
  transform: scale(0.97);
}

/* optional: saat disable */
.btn-check:disabled {
  background-color: #9fbad6;
  border-color: #9fbad6;
  cursor: not-allowed;
}

.rf-col-mot { width: 120px; }
.rf-col-vendor { width: 200px; }
.rf-col-route { width: 250px; }
.rf-col-date { width: 130px; }
.rf-col-freight { width: 100px; }
.rf-col-mod-delivery { width: 100px;}
.rf-col-service { width: 100px; }
.rf-col-cargo { width: 100px; }
.rf-col-lead { width: 90px; }
.rf-col-remark { width: 200px; }

.sf-col-type { width: 100px; }
.sf-col-vendor { width: 150px; }
.sf-col-date { width: 130px; }
.sf-col-money { width: 100px; }
.sf-col-lead { width: 90px; }
.sf-col-remark { width: 220px; }


@media (max-width: 980px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    text-align: left;
  }

  .top-grid-road,
  .top-grid-sea {
    grid-template-columns: 1fr;
  }

  .combo-list {
    width: 100%;
  }

  /* ðŸ‘‰ TAMBAHKAN DI SINI */
  .header-left {
    width: 100%;
  }

  .company-bar {
    margin-top: 2px;
  }
}

.freight-fragment {
  background: #e9e9e9;
  border: 1px solid #cfcfcf;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}


/* ===== FIX FULL PAGE MENU ===== */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  background: #f3f3f3 !important;
}

.hero-banner {
  width: 100% !important;
  height: calc(100vh - 42px) !important;
  min-height: calc(100vh - 42px) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#contentArea {
  width: 100% !important;
  height: calc(100vh - 42px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
}

.freight-fragment {
  margin: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* ===== ROAD COST MODAL ALIGNMENT ===== */
#roadCostLayout td:nth-child(2),
#roadCostLayout td.num,
#roadGeneralInfoBody td:last-child,
#roadCostAdditionalBody td:last-child,
#roadCostTotal {
  text-align: left !important;
  padding-left: 8px;
}

.vendor-info-wrap {
  padding: 8px 4px;
}

.vendor-info-title {
  font-size: 18px;
  font-weight: 700;
  color: #173d7a;
  margin-bottom: 14px;
}

.vendor-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vendor-box {
  border: 1px solid #cfd7e3;
  background: #f8fbff;
  border-radius: 6px;
  padding: 12px 14px;
  min-height: 76px;
  box-sizing: border-box;
}

.vendor-box-label {
  font-size: 12px;
  font-weight: 700;
  color: #4d5b73;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.vendor-box-value {
  font-size: 15px;
  color: #222;
  line-height: 1.5;
  white-space: pre-line;
  word-break: break-word;
}

.vendor-box-tall {
  min-height: 112px;
}

.vendor-title {
  font-size: 20px;   /* kalau sebelumnya 18px → naik 2px */
  font-weight: 700;
  color: #0b3d91;    /* biru */
  margin-bottom: 10px;
}

.vendor-info-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}

.vendor-info-table td {
  border: 1px solid #333;
  padding: 2px 6px;
  vertical-align: top;
}

.vendor-info-label {
  width: 200px;
  white-space: nowrap;
  background: #fff;
  color: #000;
}

.vendor-info-value {
  background: #fff;
  color: #000;
  word-break: break-word;
}

.vendor-block-line {
  display: block;
  line-height: 1.4;
  margin: 0;
}

.vendor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vendor-card {
  border: 1px solid #cfd7e3;
  background: #f8fbff;
  border-radius: 6px;
  padding: 12px 14px;
  min-height: 88px;
  box-sizing: border-box;
}

.vendor-card-tall {
  min-height: 120px;
}

.vendor-card-label {
  font-size: 12px;
  font-weight: 700;
  color: #4d5b73;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.vendor-card-value {
  font-size: 15px;
  color: #222;
  line-height: 1.5;
  word-break: break-word;
}

.vendor-block-line {
  display: block;
  margin-bottom: 4px;
}
/* ===== Modern Rates UI aligned with Rates > Intersuller ===== */
.rates-modern-page {
  color: #1f2937;
  font-family: Arial, Helvetica, sans-serif;
  background: #f8fafc !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 14px;
  overflow: auto !important;
}

.rates-page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid #fed7aa;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.rates-eyebrow {
  color: #ea580c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rates-page-header h1,
.rates-card h2 {
  margin: 0;
  color: #111827;
}

.rates-page-header h1 {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.15;
}

.rates-page-header p,
.rates-card-title-row p {
  margin: 5px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.rates-page-badge,
.rates-card .section-badge {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rates-page-badge {
  padding: 8px 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #c2410c;
}

.rates-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
  padding: 16px;
}

.rates-card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.rates-card h2 {
  font-size: 17px;
}

.rates-card .section-badge {
  padding: 6px 10px;
  background: #f9fafb;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.rates-modern-page .top-grid-sea,
.rates-modern-page .top-grid-road {
  display: grid;
  grid-template-columns: minmax(280px, 520px) 120px;
  gap: 12px;
  align-items: start;
  margin: 0;
}

.rates-modern-page .filter-table {
  border-collapse: separate;
  border-spacing: 0 10px;
}

.rates-modern-page .filter-table td {
  border: 0;
  height: auto;
  padding: 0;
  font-size: 13px;
}

.rates-modern-page .filter-table .label {
  width: 150px !important;
  padding: 0 10px 0 0;
  color: #374151;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  vertical-align: middle;
}

.rates-modern-page .filter-table .value {
  background: transparent;
  font-weight: 400;
}

.rates-modern-page .filter-input {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 400;
  outline: none;
}

.rates-modern-page .filter-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .16);
}

.rates-modern-page .combo-box {
  height: auto;
}

.rates-modern-page .combo-list {
  width: min(520px, 90vw);
  max-height: 260px;
  border: 1px solid #fdba74;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  padding: 6px;
}

.rates-modern-page .combo-item {
  border-bottom: 0;
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 13px;
}

.rates-modern-page .combo-item:hover {
  background: #fff7ed;
}

.rates-modern-page .btn-search,
.rates-modern-page .btn-check-cost,
.rates-modern-page .btn-check-road-cost,
.rates-modern-page .vendor-modal-close-btn,
.rates-modern-page .cost-check-btn {
  border: 0;
  border-radius: 10px;
  background: #f97316;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
  box-shadow: none;
}

.rates-modern-page .btn-search {
  width: 120px;
  min-width: 120px;
  height: 38px;
  margin: 10px 0 0;
  padding: 9px 14px;
  font-size: 13px;
  align-self: start;
}

.rates-modern-page .btn-check-cost,
.rates-modern-page .btn-check-road-cost {
  min-width: 72px;
  height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.rates-modern-page .btn-search:hover,
.rates-modern-page .btn-check-cost:hover,
.rates-modern-page .btn-check-road-cost:hover,
.rates-modern-page .vendor-modal-close-btn:hover,
.rates-modern-page .cost-check-btn:hover {
  transform: translateY(-1px);
  opacity: .92;
}

.rates-modern-page .table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

.rates-modern-page table.rates {
  border-collapse: collapse;
  background: #fff;
}

.rates-modern-page .rates thead th {
  background: #ffd8a8;
  color: #4a2c00;
  border: 0;
  border-bottom: 1px solid #ffb366;
  padding: 9px 10px;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
}

.rates-modern-page .rates tbody td {
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  padding: 9px 10px;
  height: auto;
  min-height: 34px;
  color: #111827;
  font-size: 12px;
  vertical-align: top;
}


.rates-modern-page .rates tbody td.rate-green {
  color: var(--green) !important;
  font-weight: 700;
}

.rates-modern-page .rates tbody td.rate-blue {
  color: var(--blue) !important;
  font-weight: 700;
}

.rates-modern-page .rates tbody td.rate-black {
  color: #000 !important;
  font-weight: 400;
}

.rates-modern-page .rates tbody tr:hover td {
  background: #fff7ed;
}

.rates-modern-page td.vendor-link {
  color: #ea580c !important;
  font-weight: 700;
}

.rates-modern-page .multi-line-cell .line-3 {
  color: #6b7280;
  font-size: 11px;
}

.rates-modern-page .vendor-modal-box,
.rates-modern-page .cost-check-box {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.rates-modern-page .cost-check-title,
.rates-modern-page .vendor-title,
.rates-modern-page .vendor-info-title {
  color: #111827;
}

@media (max-width: 980px) {
  .rates-page-header,
  .rates-card-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .rates-modern-page .top-grid-sea,
  .rates-modern-page .top-grid-road {
    grid-template-columns: 1fr;
  }

  .rates-modern-page .filter-table .label,
  .rates-modern-page .filter-table .value {
    display: block;
    width: 100% !important;
  }

  .rates-modern-page .filter-table .label {
    margin: 0 0 6px;
  }
}

/* ===== COST MODAL UI CLEANUP v4 ===== */
.rates-modern-page .cost-check-modal {
  background: rgba(17, 24, 39, .42);
  padding: 18px;
}

.rates-modern-page .cost-check-box {
  max-width: 760px;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  padding: 18px 20px 20px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: #fffaf5;
  box-shadow: 0 24px 60px rgba(17, 24, 39, .30);
}

.rates-modern-page .cost-check-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #fed7aa;
}

.rates-modern-page .cost-check-title {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .01em;
  color: #7c2d12;
}

.rates-modern-page .cost-check-actions {
  gap: 10px;
  flex-shrink: 0;
}

.rates-modern-page .cost-check-btn {
  min-width: 104px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #fdba74;
  border-radius: 10px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.rates-modern-page .cost-check-btn:hover {
  background: #ffedd5;
  border-color: #fb923c;
}

.rates-modern-page .cost-check-content {
  background: #ffffff;
  border: 1px solid #ffedd5;
  border-radius: 12px;
  padding: 14px;
}

.rates-modern-page .cost-breakdown-table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid #f3d6b8;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.rates-modern-page .cost-breakdown-table th,
.rates-modern-page .cost-breakdown-table td {
  border: 0;
  border-right: 1px solid #f3d6b8;
  border-bottom: 1px solid #f3d6b8;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
}

.rates-modern-page .cost-breakdown-table th:last-child,
.rates-modern-page .cost-breakdown-table td:last-child {
  border-right: 0;
}

.rates-modern-page .cost-breakdown-table tr:last-child td {
  border-bottom: 0;
}

.rates-modern-page .cost-breakdown-table thead th {
  background: #ffd8a8;
  color: #4a2c00;
  border-color: #f6bc7b;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: none;
  letter-spacing: .01em;
}

.rates-modern-page .cost-breakdown-table tbody td {
  background: #ffffff;
}

.rates-modern-page .cost-breakdown-table tbody tr:nth-child(even) td {
  background: #fffaf5;
}

.rates-modern-page .cost-breakdown-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: #374151;
}

.rates-modern-page .cost-breakdown-table td.num,
.rates-modern-page #costTotalOrigin,
.rates-modern-page #costTotalVendor,
.rates-modern-page #costTotalDestination {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rates-modern-page .cost-breakdown-table td.empty-col {
  background: #f3f4f6 !important;
  color: #6b7280;
  font-style: italic;
  text-align: right;
}

.rates-modern-page .cost-breakdown-table .total-row td {
  background: #fff1df !important;
  color: #111827;
  font-weight: 800;
  border-top: 2px solid #fb923c;
}

.rates-modern-page .additional-table {
  margin-top: 10px;
}

.rates-modern-page .cost-breakdown-table .additional-title {
  background: #ffc078;
  color: #4a2c00;
  padding: 8px 10px;
  text-align: center;
  font-size: 12px;
}

.rates-modern-page .cost-note-wrap {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.rates-modern-page .cost-note {
  margin: 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: #4b5563;
}

/* Sea cost modal column alignment */
.rates-modern-page #seaCostLayout .cost-breakdown-table th:nth-child(1),
.rates-modern-page #seaCostLayout .cost-breakdown-table td:nth-child(1) {
  text-align: left;
}

.rates-modern-page #seaCostLayout .cost-breakdown-table th:nth-child(2),
.rates-modern-page #seaCostLayout .cost-breakdown-table th:nth-child(3),
.rates-modern-page #seaCostLayout .cost-breakdown-table th:nth-child(4) {
  text-align: center;
}

.rates-modern-page #seaCostLayout .cost-breakdown-table td:nth-child(2),
.rates-modern-page #seaCostLayout .cost-breakdown-table td:nth-child(3),
.rates-modern-page #seaCostLayout .cost-breakdown-table td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Road cost modal alignment */
.rates-modern-page #roadCostLayout .cost-breakdown-table th {
  text-align: center;
}

.rates-modern-page #roadCostLayout .cost-breakdown-table td:first-child {
  width: 42%;
  text-align: left;
}

.rates-modern-page #roadCostLayout .cost-breakdown-table td:last-child,
.rates-modern-page #roadCostLayout td.num,
.rates-modern-page #roadGeneralInfoBody td:last-child,
.rates-modern-page #roadCostAdditionalBody td:last-child,
.rates-modern-page #roadCostTotal {
  text-align: right !important;
  padding-left: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .rates-modern-page .cost-check-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .rates-modern-page .cost-check-actions {
    width: 100%;
  }

  .rates-modern-page .cost-check-btn {
    flex: 1;
  }
}

/* ===== Road Freight header layout fix ===== */
.rates-modern-page .road-filter-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr 140px !important; /* kiri = kanan */
  gap: 16px !important;
  align-items: end !important;
}

.rates-modern-page .road-search-wrap {
  display: flex;
  align-items: flex-end;   /* sejajar input bawah */
  justify-content: flex-start;
  height: 100%;
}

.rates-modern-page .road-search-wrap .btn-search {
  margin: 0 !important;
  width: 120px !important;
  min-width: 120px !important;
}

.rates-modern-page .road-filter-left,
.rates-modern-page .road-filter-right {
  width: 100%;
}

@media (max-width: 980px) {

  .rates-modern-page .road-search-wrap {
    justify-content: flex-start;
    padding-top: 0;
  }
}

/* ===== Road Freight right filter nudge v8 ===== */
.rates-modern-page .road-filter-right {
  transform: translateX(30px);
}

@media (max-width: 980px) {
  .rates-modern-page .road-filter-right {
    transform: none;
  }
}

/* ===== Cost modal UI fix v9: Initial Cost + RoadFreight Additional Cost ===== */
.rates-modern-page #costCheckModal .cost-check-box,
#costCheckModal .cost-check-box {
  width: 100% !important;
  max-width: 680px !important;
  max-height: 95vh !important;
  overflow: auto !important;
  padding: 0 !important;
  background: #ffffff !important;
  border: 1px solid #f6bc7b !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .22) !important;
}

.rates-modern-page #costCheckModal .cost-check-header,
#costCheckModal .cost-check-header {
  margin: 0 !important;
  padding: 10px 14px !important;
  background: #ffd8a8 !important;
  border-bottom: 1px solid #f6bc7b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.rates-modern-page #costCheckModal .cost-check-title,
#costCheckModal .cost-check-title {
  margin: 0 !important;
  color: #4a2c00 !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

.rates-modern-page #costCheckModal .cost-check-actions,
#costCheckModal .cost-check-actions {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

.rates-modern-page #costCheckModal .cost-check-btn,
#costCheckModal .cost-check-btn {
  min-width: 92px !important;
  height: 32px !important;
  padding: 0 14px !important;
  border: 1px solid #fdba74 !important;
  border-radius: 9px !important;
  background: #fff7ed !important;
  color: #7c2d12 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.rates-modern-page #costCheckModal .cost-check-btn:hover,
#costCheckModal .cost-check-btn:hover {
  background: #ffedd5 !important;
  border-color: #fb923c !important;
}

.rates-modern-page #costCheckModal .cost-check-content,
#costCheckModal .cost-check-content {
  padding: 14px !important;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table,
#costCheckModal .cost-breakdown-table {
  width: 100% !important;
  margin: 0 0 14px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  border: 1px solid #f3d6b8 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table th,
.rates-modern-page #costCheckModal .cost-breakdown-table td,
#costCheckModal .cost-breakdown-table th,
#costCheckModal .cost-breakdown-table td {
  border: 0 !important;
  border-right: 1px solid #f3d6b8 !important;
  border-bottom: 1px solid #f3d6b8 !important;
  padding: 6px 9px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table th:last-child,
.rates-modern-page #costCheckModal .cost-breakdown-table td:last-child,
#costCheckModal .cost-breakdown-table th:last-child,
#costCheckModal .cost-breakdown-table td:last-child {
  border-right: 0 !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table tr:last-child td,
#costCheckModal .cost-breakdown-table tr:last-child td {
  border-bottom: 0 !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table thead th,
#costCheckModal .cost-breakdown-table thead th {
  background: #ffd8a8 !important;
  color: #4a2c00 !important;
  border-color: #f6bc7b !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table .additional-title,
#costCheckModal .cost-breakdown-table .additional-title {
  background: #ffd8a8 !important;
  color: #4a2c00 !important;
  text-align: center !important;
  font-weight: 800 !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table tbody td,
#costCheckModal .cost-breakdown-table tbody td {
  background: #ffffff !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table tbody tr:nth-child(even) td,
#costCheckModal .cost-breakdown-table tbody tr:nth-child(even) td {
  background: #fffaf5 !important;
}

.rates-modern-page #costCheckModal .cost-breakdown-table .total-row td,
#costCheckModal .cost-breakdown-table .total-row td {
  background: #fff1df !important;
  color: #111827 !important;
  font-weight: 800 !important;
  border-top: 2px solid #fb923c !important;
}

@media (max-width: 760px) {
  .rates-modern-page #costCheckModal .cost-check-header,
  #costCheckModal .cost-check-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
  .rates-modern-page #costCheckModal .cost-check-actions,
  #costCheckModal .cost-check-actions {
    width: 100% !important;
  }
  .rates-modern-page #costCheckModal .cost-check-btn,
  #costCheckModal .cost-check-btn {
    flex: 1 !important;
  }
}

/* FIX: shift Origin & Destination label (Road Freight only) */
.rates-modern-page .filter-table .label {
  padding-left: 1px !important;
}
