/* KBRIDGE logistics tools — final compact and readable UI
   Loaded after tools-native.css. This is the single source of truth for
   controls, selection tabs and input tables on logistics-tool pages. */
:root{
  --kb-tool-control:34px;
  --kb-tool-tab:30px;
  --kb-tool-radius:8px;
  --kb-tool-line:#d6e0ec;
  --kb-tool-text:#172945;
  --kb-tool-muted:#5e6f86;
  --kb-tool-blue:#2b5cdb;
  --kb-tool-soft:#f5f8fc;
}

/* Page and card rhythm */
.tool-shell .shell-body{padding:20px;background:#f5f7fb}
.tool-shell .nt-wrap{gap:14px}
.tool-shell .nt-card{padding:20px;border:1px solid #dce4ee;border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(18,38,76,.035)}
.tool-shell .nt-tool-head{align-items:flex-start;gap:18px;margin-bottom:14px}
.tool-shell .nt-card h2{color:#122746;font-size:19px;line-height:1.35;letter-spacing:-.025em}
.tool-shell .nt-card h3{color:#203653;font-size:14.5px;line-height:1.4}
.tool-shell .nt-card>p,.tool-shell .nt-tool-head p,.tool-shell .nt-muted{color:var(--kb-tool-muted);font-size:12.5px;line-height:1.65}

/* Labels, help text and form spacing */
.tool-shell .nt-form{gap:11px 12px;margin-top:15px}
.tool-shell .nt-field{gap:5px}
.tool-shell .nt-field label{color:#2b3e5a;font-size:12px;line-height:1.3;font-weight:800}
.tool-shell .nt-help{color:#6d7d92;font-size:10.5px;line-height:1.48}

/* All text inputs and selects use one compact height. */
.tool-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]),
.tool-shell select:not([multiple]):not([size]){
  box-sizing:border-box!important;
  width:100%;
  height:var(--kb-tool-control)!important;
  min-height:var(--kb-tool-control)!important;
  max-height:var(--kb-tool-control)!important;
  padding:0 10px!important;
  border:1px solid var(--kb-tool-line)!important;
  border-radius:var(--kb-tool-radius)!important;
  background:#fff!important;
  color:var(--kb-tool-text)!important;
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:500!important;
  line-height:1.2!important;
  outline:none!important;
}
.tool-shell select:not([multiple]):not([size]){padding-right:30px!important}
.tool-shell input::placeholder,.tool-shell textarea::placeholder{color:#8794a7;opacity:1}
.tool-shell input:focus,.tool-shell select:focus,.tool-shell textarea:focus{border-color:#6f93df!important;box-shadow:0 0 0 3px rgba(43,92,219,.09)!important}
.tool-shell textarea{min-height:76px!important;padding:9px 10px!important;border-radius:var(--kb-tool-radius)!important;font-size:13px!important;line-height:1.55!important}

/* Selection tabs and chips — compact but legible. */
.tool-shell .nt-seg{gap:6px;align-items:center;flex-wrap:wrap}
.tool-shell .nt-seg button,
.tool-shell .nt-chip,
.tool-shell .nt-subtabs button{
  box-sizing:border-box!important;
  height:var(--kb-tool-tab)!important;
  min-height:var(--kb-tool-tab)!important;
  max-height:var(--kb-tool-tab)!important;
  padding:0 11px!important;
  border:1px solid #d4deeb!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#53647a!important;
  font-family:inherit!important;
  font-size:11.5px!important;
  font-weight:800!important;
  line-height:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
}
.tool-shell .nt-seg button.active,.tool-shell .nt-chip.active,.tool-shell .nt-subtabs button.active{border-color:#8eace8!important;background:#eaf0ff!important;color:#214fb9!important}
.tool-shell .nt-subtabs{gap:6px;margin-top:11px}

/* Buttons align with the fields. */
.tool-shell .nt-btn{
  box-sizing:border-box!important;
  height:var(--kb-tool-control)!important;
  min-height:var(--kb-tool-control)!important;
  max-height:var(--kb-tool-control)!important;
  padding:0 14px!important;
  border-radius:8px!important;
  font-size:12px!important;
  line-height:1!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
}
.tool-shell .nt-actions{gap:7px;margin-top:14px}
.tool-shell .nt-inline-search{gap:7px}

/* Tables — readable headings, compact rows, no broken words. */
.tool-shell .nt-table-wrap{border-color:#dce4ee;border-radius:12px}
.tool-shell .nt-table{font-variant-numeric:tabular-nums}
.tool-shell .nt-table th{
  padding:9px 10px!important;
  background:#eef3fa!important;
  color:#314662!important;
  font-size:11.5px!important;
  line-height:1.25!important;
  font-weight:800!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
}
.tool-shell .nt-table td{
  padding:8px 10px!important;
  color:#263a57!important;
  font-size:12px!important;
  line-height:1.4!important;
  vertical-align:middle!important;
}
.tool-shell .nt-table .nt-cell-output{font-size:12px!important;font-weight:800!important;white-space:nowrap!important}
.tool-shell .nt-link-btn{
  box-sizing:border-box!important;
  width:auto!important;
  min-width:46px!important;
  height:28px!important;
  min-height:28px!important;
  padding:0 9px!important;
  border-radius:7px!important;
  font-size:10.5px!important;
  line-height:1!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
}

/* CBM and LCL input tables need deliberate column widths. */
#cbmTable{table-layout:fixed!important;min-width:1110px!important}
#cbmTable th:nth-child(1),#cbmTable td:nth-child(1){width:140px}
#cbmTable th:nth-child(2),#cbmTable td:nth-child(2),
#cbmTable th:nth-child(3),#cbmTable td:nth-child(3),
#cbmTable th:nth-child(4),#cbmTable td:nth-child(4){width:106px}
#cbmTable th:nth-child(5),#cbmTable td:nth-child(5){width:82px}
#cbmTable th:nth-child(6),#cbmTable td:nth-child(6){width:112px}
#cbmTable th:nth-child(7),#cbmTable td:nth-child(7){width:96px}
#cbmTable th:nth-child(8),#cbmTable td:nth-child(8),
#cbmTable th:nth-child(9),#cbmTable td:nth-child(9){width:86px;text-align:center}
#cbmTable th:nth-child(10),#cbmTable td:nth-child(10){width:58px;text-align:center}
#cbmTable.nt-input-table input,#cbmTable.nt-input-table select,
#lclTool .nt-input-table input,#lclTool .nt-input-table select{
  height:32px!important;
  min-height:32px!important;
  max-height:32px!important;
  padding:0 8px!important;
  font-size:12.5px!important;
  border-radius:7px!important;
}
#cbmTable td,#lclTool .nt-input-table td{padding:6px 7px!important}
#cbmTable th,#lclTool .nt-input-table th{padding:8px 7px!important}

/* Result blocks and notices. */
.tool-shell .nt-results{gap:9px;margin-top:13px}
.tool-shell .nt-result{padding:13px;border-radius:10px;background:#f7f9fd}
.tool-shell .nt-result span{color:#65758b;font-size:10.5px}
.tool-shell .nt-result strong{margin-top:3px;color:#132946;font-size:17px;line-height:1.25}
.tool-shell .nt-result em{margin-top:3px;color:#64758b;font-size:10px;line-height:1.4}
.tool-shell .nt-notice{padding:11px 13px;border-radius:10px;color:#56677e;font-size:11.5px;line-height:1.58}
.tool-shell .nt-count{font-size:11.5px}

/* Search results and selectable card groups. */
.tool-shell .nt-list{gap:8px}
.tool-shell .nt-list-item{padding:12px 13px;border-radius:10px}
.tool-shell .nt-list-item strong{font-size:13px;line-height:1.4}
.tool-shell .nt-list-item p{margin-top:4px;color:#607087;font-size:11.5px;line-height:1.55}
.tool-shell .nt-country-grid{gap:7px;margin-top:10px}
.tool-shell .nt-country-btn{min-height:42px;padding:6px 9px;border-radius:8px}
.tool-shell .nt-country-btn b{font-size:11.5px;line-height:1.25}
.tool-shell .nt-country-btn span{margin-top:1px;font-size:9.5px;line-height:1.25}
.tool-shell .nt-class-grid{gap:6px}
.tool-shell .nt-class{padding:7px 5px;border-radius:8px;font-size:9.5px}
.tool-shell .nt-class b{font-size:14px;line-height:1.1}

/* Duty calculator keeps currency and exchange-rate fields aligned. */
#dutyTool .nt-form{align-items:start}
#dutyTool .duty-origin{grid-column:1/-1}
#dutyTool .duty-currency{grid-column:1}
#dutyTool .duty-rate{grid-column:2}
#dutyTool.business-mode .duty-origin{grid-column:1}
#dutyTool.business-mode .duty-incoterm{grid-column:2}
#dutyTool.business-mode .duty-currency{grid-column:1}
#dutyTool.business-mode .duty-rate{grid-column:2}
#dutyTool .duty-rate-control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center}

/* Bottom tool navigation. */
.tool-shell .tool-nav{gap:7px;margin-top:13px}
.tool-shell .tool-nav a{min-height:32px;padding:6px 8px;display:flex;align-items:center;justify-content:center;border-radius:8px;font-size:10.8px;line-height:1.3;word-break:keep-all}

@media(max-width:980px){
  .tool-shell .nt-tool-head{display:block}
  .tool-shell .nt-tool-head>.nt-field,.tool-shell .nt-tool-head>.nt-seg{margin-top:12px}
}
@media(max-width:720px){
  :root{--kb-tool-control:36px;--kb-tool-tab:32px}
  .tool-shell .shell-body{padding:13px}
  .tool-shell .nt-card{padding:15px}
  .tool-shell .nt-card h2{font-size:18px}
  .tool-shell .nt-form{grid-template-columns:1fr}
  .tool-shell .nt-field.full{grid-column:auto}
  #dutyTool .duty-origin,#dutyTool .duty-currency,#dutyTool .duty-rate,
  #dutyTool.business-mode .duty-origin,#dutyTool.business-mode .duty-incoterm,
  #dutyTool.business-mode .duty-currency,#dutyTool.business-mode .duty-rate{grid-column:1/-1}
  .tool-shell .nt-results{grid-template-columns:1fr 1fr}
  #cbmTable{min-width:1000px!important}
}
@media(max-width:480px){
  .tool-shell .nt-results{grid-template-columns:1fr}
  .tool-shell .nt-seg button,.tool-shell .nt-chip,.tool-shell .nt-subtabs button{font-size:11px!important;padding:0 9px!important}
}
