/* Customer portal only. Keep every route, control, business state and handler intact. */
body.dx-portal {
  --dx-blue: #2960ad;
  --dx-green: #23ac39;
  --p-bg: #0c1525;
  --p-bg2: #111e32;
  --p-surface: #142238;
  --p-surface-strong: #192a43;
  --p-field: #101d30;
  --p-border: #30425c;
  --p-border-strong: #49617e;
  --p-text: #edf3fc;
  --p-muted: #afbed2;
  --p-primary: #2960ad;
  --p-primary-dark: #94bcff;
  --p-focus: rgba(80,145,237,.24);
  --p-shadow: 0 4px 18px rgba(0,0,0,.12);
  --p-card-hover: #1c304b;
  --p-table-bg: var(--p-surface);
  --p-table-head: #1b2d46;
  --p-table-border: var(--p-border);
  --p-body-bg: var(--p-bg);
  --p-bg-overlay: transparent;
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  background: var(--p-bg) !important;
  -webkit-font-smoothing: antialiased;
}
body.dx-portal.light-theme, html.portal-light-boot body.dx-portal {
  --p-bg: #f3f6fa;
  --p-bg2: #edf2f8;
  --p-surface: #fff;
  --p-surface-strong: #f8fafd;
  --p-field: #fff;
  --p-border: #dce4ee;
  --p-border-strong: #b7c7db;
  --p-text: #192b44;
  --p-muted: #5c6e86;
  --p-primary: #2960ad;
  --p-primary-dark: #245798;
  --p-focus: rgba(41,96,173,.16);
  --p-shadow: 0 4px 18px rgba(29,54,88,.045);
  --p-card-hover: #f0f5fc;
  --p-table-bg: #fff;
  --p-table-head: #f5f8fc;
  --p-table-border: #e3eaf3;
  --p-body-bg: var(--p-bg);
  color-scheme: light;
}
body.dx-portal *, body.dx-portal *::before, body.dx-portal *::after { box-sizing: border-box; }
body.dx-portal .bg, body.dx-portal .bg2 { background: none; }
body.dx-portal.portal-with-sidebar { height: auto !important; overflow: visible !important; }
body.dx-portal .shell { min-height: 100vh; height: auto; display: block; padding-bottom: 56px; }
body.dx-portal .portal-topbar {
  width: auto !important; max-width: none; margin: 0 !important; padding: 20px 32px;
  min-height: 100px; border: 0; border-bottom: 1px solid var(--p-border); border-radius: 0;
  box-shadow: none; background: var(--p-surface); backdrop-filter: none;
}
body.dx-portal .brand { min-width: 0; gap: 22px; }
body.dx-portal .brand .logo-wrap {
  width: 132px; height: 52px; min-width: 132px; padding: 7px;
  background: #fff; border: 1px solid #e3eaf3; border-radius: 10px; box-shadow: none;
}
body.dx-portal .brand .logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
body.dx-portal .brand .eyebrow { color: var(--p-muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; }
body.dx-portal .brand .t1 { color: var(--p-text); font-size: 23px; font-weight: 750; line-height: 1.35; letter-spacing: -.025em; }
body.dx-portal .brand .t2 { color: var(--p-muted); font-size: 12px; line-height: 1.5; margin-top: 4px; }
body.dx-portal .topbar-actions { flex-shrink: 0; gap: 8px; }
body.dx-portal :is(.lang-switch,.theme-toggle-btn) {
  min-height: 40px; padding: 8px 12px; border: 1px solid var(--p-border); border-radius: 9px;
  color: var(--p-text); background: var(--p-surface); font-weight: 600;
}
body.dx-portal :is(.lang-switch,.theme-toggle-btn):hover { background: var(--p-card-hover); color: var(--p-primary-dark); }
body.dx-portal .portal-stage.has-sidebar,
body.dx-portal .portal-stage.has-sidebar:has(.portal-sidebar:hover),
body.dx-portal .portal-stage.has-sidebar:has(.portal-sidebar:focus-within) {
  width: auto; max-width: 1740px; margin: 24px auto 40px; padding: 0 24px;
  display: grid; grid-template-columns: 212px minmax(0,1fr); gap: 28px;
  align-items: start; height: auto; min-height: 0; overflow: visible; transition: none;
}
body.dx-portal .portal-stage.has-sidebar .content-shell {
  width: 100%; min-width: 0; height: auto !important; max-height: none !important;
  overflow: visible !important; padding: 0;
}
body.dx-portal .portal-sidebar,
body.dx-portal .portal-sidebar:hover,
body.dx-portal .portal-sidebar:focus-within {
  position: sticky; top: 24px; inset-inline: auto; width: 212px; height: auto;
  max-height: calc(100dvh - 48px); overflow-y: auto; overflow-x: visible;
  padding: 16px 10px 12px; gap: 28px; background: var(--p-surface);
  border: 1px solid var(--p-border); border-radius: 14px; box-shadow: var(--p-shadow);
  backdrop-filter: none; transition: none;
}
body.dx-portal .portal-side-work { flex: initial; overflow: visible; }
body.dx-portal :is(.portal-side-title,.portal-side-link > span:not(.side-icon),.user-meta,.user-exit,.refer-card) {
  opacity: 1; transform: none; pointer-events: auto;
}
body.dx-portal .portal-side-title { padding: 0 12px 12px; font-size: 10px; letter-spacing: .12em; font-weight: 650; }
body.dx-portal .portal-side-nav { gap: 5px; }
body.dx-portal .portal-side-link {
  margin: 0; padding: 11px 12px; min-height: 46px; gap: 12px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--p-muted); box-shadow: none;
}
body.dx-portal .portal-side-link:hover { background: var(--p-card-hover); color: var(--p-text); }
body.dx-portal.light-theme .portal-side-link { color: var(--p-muted) !important; }
body.dx-portal.light-theme .portal-side-link:is(.active,:hover) { color: var(--p-primary-dark) !important; }
body.dx-portal .portal-side-link.active {
  background: var(--p-card-hover); color: var(--p-primary-dark);
  box-shadow: inset 3px 0 var(--dx-green); font-weight: 750;
}
body.dx-portal .portal-side-link .side-icon { width: 21px; height: 21px; min-width: 21px; color: inherit; }
body.dx-portal .refer-card { border: 1px solid var(--p-border); border-radius: 9px; margin: 0 0 14px; }
body.dx-portal .refer-art { height: 48px; }
body.dx-portal .refer-copy { color: var(--p-primary-dark); padding: 10px; font-size: 12px; }
body.dx-portal .portal-side-user { padding: 14px 6px 2px; gap: 10px; min-height: 58px; }
body.dx-portal .user-avatar { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--p-card-hover); }
body.dx-portal .user-meta b { line-height: 1.5; font-size: 12px; }
body.dx-portal .portal-user-menu { background: var(--p-surface); }
body.dx-portal .portal-user-mi:hover { background: var(--p-card-hover); }
body.dx-portal .portal-history-drawer { visibility: hidden; }
body.dx-portal.history-open .portal-history-drawer { visibility: visible; }
body.dx-portal .dxp-drawer { max-height: calc(100dvh - 24px); overflow-y: auto; }
body.dx-portal .dxp-roledd { min-width: 0; max-height: 300px; overflow-y: auto; }
body.dx-portal .portal-stage:not(.has-sidebar) { width: min(1120px,calc(100% - 40px)); margin: 36px auto; }
body.dx-portal :is(.portal-ship-shell,.dxcl,.dxp,.dxset,.rpt-wrap) { max-width: 1280px; }
body.dx-portal :is(.card,.panel,.portal-ship-card,.portal-quote-rail,.dxcl-card,.dxcl-info,.portal-review-section) {
  border-color: var(--p-border); background: var(--p-surface); border-radius: 14px;
  box-shadow: var(--p-shadow); backdrop-filter: none;
}
body.dx-portal :is(.portal-ship-card,.card.panel) { padding: 24px; margin-bottom: 20px; }
body.dx-portal :is(.portal-ship-title,.dxcl-head h1,.dxp-head h1) { font-size: 25px; font-weight: 750; letter-spacing: -.025em; }
body.dx-portal :is(.portal-ship-subtitle,.dxcl-sec) { font-size: 18px; font-weight: 700; }
body.dx-portal .portal-ship-topbar { flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
body.dx-portal .portal-ship-steps {
  flex-wrap: wrap; gap: 12px; margin: 0 0 20px; padding: 14px 18px;
  background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 12px; font-weight: 650;
}
body.dx-portal .portal-ship-steps .is-on { color: var(--p-primary-dark); }
body.dx-portal :is(input,select,textarea) { accent-color: var(--dx-blue); font-family: inherit; }
body.dx-portal button { box-shadow: none; border-radius: 9px; }
body.dx-portal button:not([class]), body.dx-portal .btn-primary {
  background: var(--dx-blue); border-color: var(--dx-blue); font-weight: 650;
}
body.dx-portal .topbar-actions :is(button.theme-toggle-btn,button.lang-switch) {
  border: 1px solid var(--p-border) !important; background: var(--p-surface) !important;
  color: var(--p-text) !important; border-radius: 9px !important;
}
body.dx-portal :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select,textarea) {
  min-width: 0; border-radius: 9px; border-color: var(--p-border-strong); background-color: var(--p-field); color: var(--p-text); font-size: 14px;
}
body.dx-portal .portal-ship-field :is(input,select) { height: 46px; line-height: normal; }
body.dx-portal .portal-ship-field label { margin-bottom: 8px; font-size: 13px; font-weight: 650; }
body.dx-portal .portal-ship-field:has(> :is(input[name$="contact_first"],input[name$="contact_email"],input[name$="contact_phone"],select[name$="open_time"],select[name$="close_time"])) > label::after { content: " *"; color: #dc2626; }
body.dx-portal :is(input,select,textarea):focus { border-color: var(--dx-blue); box-shadow: 0 0 0 3px var(--p-focus); }
body.dx-portal :is(a,button,input,select,textarea,[tabindex]):focus-visible { outline: 3px solid var(--p-primary-dark); outline-offset: 3px; }
body.dx-portal :is(.primary-btn,.dxcl-btn:not(.ghost),.dxp-add,.portal-history-use) { background: var(--dx-blue); color: #fff; }
body.dx-portal.light-theme :is(a.dxcl-btn:not(.ghost),a.portal-history-use,a.btn.primary) { color: #fff !important; }
body.dx-portal :is(button,input,select,textarea):disabled { opacity: .58; cursor: not-allowed; }
body.dx-portal :is(.dxset-card,.dxset-empty,.dxset-role) { background: var(--p-surface); }
body.dx-portal .dxset-btn.green { background: var(--dx-blue); }
body.dx-portal .dxset-tab.active { background: transparent !important; color: var(--p-text) !important; border-bottom-color: var(--dx-green) !important; }
body.dx-portal .dxset-tab { flex: 0 0 auto; }
body.dx-portal .dxset-tab:hover { background: var(--p-card-hover) !important; color: var(--p-text) !important; }
body.dx-portal .dxset-switch input:checked + .sl { background: var(--dx-green); }
body.dx-portal :is(.primary-btn,.secondary-btn,.dxcl-btn,.dxp-add,.portal-history-trigger,.portal-ai-autofill) { min-height: 42px; border-radius: 9px !important; font-weight: 650; }
body.dx-portal .portal-ai-autofill { background: var(--p-card-hover) !important; border-color: var(--p-border-strong) !important; color: var(--p-primary-dark) !important; box-shadow: none !important; }
body.dx-portal .portal-ai-mark { background: var(--p-surface); box-shadow: none; border-color: var(--p-border); }
body.dx-portal .portal-ai-mark svg { stroke: var(--p-primary-dark); }
body.dx-portal .portal-cargo-item { border-radius: 12px; padding-top: 20px; padding-bottom: 20px; }
body.dx-portal .portal-ship-mini-card { border-radius: 14px; padding: 20px; }
body.dx-portal .portal-ship-mini-card .portal-ship-field { margin-bottom: 12px; }
body.dx-portal .portal-cargo-idx { background: var(--p-card-hover); color: var(--p-primary-dark); }
body.dx-portal .portal-quote-rail { padding: 20px; }
body.dx-portal .portal-quote-fallback .pqf-opt { padding: 14px; border-radius: 10px; gap: 12px; }
body.dx-portal .portal-quote-fallback .pqf-opt.is-selected { border-color: var(--dx-green); box-shadow: 0 0 0 1px var(--dx-green); background: var(--p-card-hover); }
body.dx-portal .portal-quote-fallback :is(.pqf-name,.pqf-price) { font-size: 14px; }
body.dx-portal .portal-quote-fallback .pqf-meta { font-size: 12px; }
body.dx-portal :is(.dxbl-tbl,.dxcl-table,.dxp-table) { border-radius: 12px; border-color: var(--p-border); }
body.dx-portal .dxbl-tbl { width: 100%; }
body.dx-portal .dxbl-tbl th { background: var(--p-table-head); white-space: nowrap; font-weight: 650; padding: 14px; }
body.dx-portal .dxbl-tbl td { padding: 16px 14px; font-size: 14px; }
body.dx-portal :is(.dxbl-tabs,.dxbl-chips) { flex-wrap: wrap; }
body.dx-portal .dxcl-search input { box-shadow: none; }
body.dx-portal .dxcs-tab, body.dx-portal .dxcs-tab:is(:hover,:focus,:active) {
  top: auto; bottom: 22px; right: 24px; transform: none !important;
  writing-mode: horizontal-tb; text-orientation: mixed; letter-spacing: 0;
  padding: 12px 18px; min-height: 46px; border-radius: 999px;
  background: var(--dx-blue); border: 2px solid var(--p-surface); box-shadow: 0 6px 22px rgba(41,96,173,.25);
}
body.dx-portal .dxcs-drawer { background: var(--p-surface); color: var(--p-text); visibility: hidden; }
body.dx-portal .dxcs-drawer.dxcs-open { visibility: visible; }
body.dx-portal .dxcs-head { background: var(--dx-blue); border-bottom: 3px solid var(--dx-green); }
body.dx-portal :is(.dxcs-input,.dxcs-bubble,.dxcs-file) { background: var(--p-surface-strong); border-color: var(--p-border); color: var(--p-text); }
body.dx-portal .dxcs-msg.dxcs-right .dxcs-bubble { background: var(--p-card-hover); }
body.dx-portal .dxcs-send { background: var(--dx-blue); }
body.dx-portal .portal-track-drawers { align-items: start; }
body.dx-portal .portal-track-drawer { border-radius: 14px; box-shadow: var(--p-shadow); border-color: var(--p-border); }
body.dx-portal .portal-track-drawer-body { padding: 20px; }
body.dx-portal .dx-skip-link { position: absolute; top: -100px; left: 16px; z-index: 2147483001; padding: 12px 18px; background: var(--p-surface); border: 2px solid var(--dx-blue); border-radius: 8px; color: var(--p-text); }
body.dx-portal .dx-skip-link:focus { top: 12px; }
@media (max-width: 1200px) {
  body.dx-portal .portal-stage.has-sidebar { gap: 20px; padding: 0 20px; grid-template-columns: 190px minmax(0,1fr); }
  body.dx-portal .portal-sidebar, body.dx-portal .portal-sidebar:hover, body.dx-portal .portal-sidebar:focus-within { width: 190px; }
  body.dx-portal .portal-stage.has-sidebar:has(.portal-sidebar:hover), body.dx-portal .portal-stage.has-sidebar:has(.portal-sidebar:focus-within) { grid-template-columns: 190px minmax(0,1fr); }
  body.dx-portal .portal-ship-detail-layout { grid-template-columns: minmax(0,1fr) !important; }
  body.dx-portal .portal-quote-rail { position: static; }
}
@media (max-width: 960px) {
  body.dx-portal .portal-topbar { padding: 16px 20px; gap: 16px; }
  body.dx-portal .brand .t2 { max-width: 420px; }
  body.dx-portal .portal-stage.has-sidebar,
  body.dx-portal .portal-stage.has-sidebar:has(.portal-sidebar:hover),
  body.dx-portal .portal-stage.has-sidebar:has(.portal-sidebar:focus-within) { display: flex; padding: 0 16px; margin: 16px 0 32px; gap: 20px; }
  body.dx-portal .portal-sidebar, body.dx-portal .portal-sidebar:hover, body.dx-portal .portal-sidebar:focus-within {
    position: static; width: 100%; max-height: none; padding: 10px; gap: 12px; border: 1px solid var(--p-border); border-radius: 12px;
  }
  body.dx-portal .portal-side-title { padding: 2px 6px 8px; }
  body.dx-portal .portal-side-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  body.dx-portal .portal-side-link { min-height: 46px; padding: 10px 8px; gap: 8px; justify-content: center; font-size: 13px; }
  body.dx-portal .portal-side-bottom { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--p-border); }
  body.dx-portal .refer-card { margin: 0; flex: 1; }
  body.dx-portal .refer-art { display: none; } /* Decorative illustration; reward action remains visible. */
  body.dx-portal .portal-side-user { flex: 1; padding: 2px 4px; border: 0; min-width: 0; min-height: 44px; }
  body.dx-portal .portal-track-drawers { display: grid !important; grid-template-columns: minmax(0,1fr); }
  body.dx-portal .dxcl-table, body.dx-portal .dxp-table { overflow-x: auto; }
  body.dx-portal .dxcl-row { min-width: 700px; }
  body.dx-portal .dxp-row { min-width: 620px; }
  body.dx-portal .portal-ship-detail-grid { grid-template-columns: minmax(0,1fr); }
  body.dx-portal .portal-ship-grid-2 { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 600px) {
  body.dx-portal .portal-topbar { padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  body.dx-portal .brand { gap: 12px; width: 100%; }
  body.dx-portal .brand .logo-wrap { width: 104px; min-width: 104px; height: 44px; }
  body.dx-portal .brand .t1 { font-size: 20px; }
  body.dx-portal .brand .eyebrow { font-size: 10px; letter-spacing: 0; }
  body.dx-portal .brand .t2 { font-size: 12px; }
  body.dx-portal .topbar-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  body.dx-portal .portal-stage.has-sidebar { padding: 0 12px; gap: 16px; }
  body.dx-portal .portal-side-link { flex-direction: column; gap: 5px; padding: 8px 2px; font-size: 11px; min-height: 62px; }
  body.dx-portal .portal-side-link.active { box-shadow: inset 0 -3px var(--dx-green); }
  body.dx-portal .portal-side-nav { grid-template-columns: repeat(4,minmax(0,1fr)); }
  body.dx-portal :is(.portal-ship-card,.card.panel,.portal-quote-rail) { padding: 18px 16px; }
  body.dx-portal .portal-ship-title { font-size: 23px; }
  body.dx-portal .portal-ship-steps { padding: 12px; gap: 8px; font-size: 11px; }
  body.dx-portal .portal-ship-topbar > div:last-child { flex-wrap: wrap; }
  body.dx-portal :is(.portal-ship-row,.portal-ship-cargo-row,.portal-review-grid,.portal-pay-mock-form) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.dx-portal .portal-cargo-body > .portal-ship-row:first-child > .portal-ship-field:last-child { grid-column: 1 / -1; }
  body.dx-portal .portal-cargo-item { padding-left: 16px; padding-top: 48px; }
  body.dx-portal .portal-cargo-remove { min-width: 36px; height: 36px; }
  body.dx-portal .portal-ship-ready-row { flex-wrap: wrap; }
  body.dx-portal .portal-ship-ready-row > .portal-ship-field { flex-basis: 44%; }
  body.dx-portal .portal-ship-actions { flex-wrap: wrap; }
  body.dx-portal :is(.portal-history-trigger,.portal-ai-autofill) { font-size: 12px !important; padding: 9px 12px !important; }
  body.dx-portal :is(.portal-ship-field input,.portal-ship-field select,.portal-ship-field textarea) { font-size: 16px; }
  body.dx-portal .dxbl-tools .dxcl-search { min-width: 0; width: 100%; }
  body.dx-portal .dxbl-tbl { overflow-x: auto; }
  body.dx-portal .dxbl-tbl :is(td,th) { white-space: nowrap; }
  body.dx-portal .dxcs-tab { right: 16px; bottom: 16px; }
  body.dx-portal .portal-stage:not(.has-sidebar) { width: calc(100% - 24px); margin: 24px auto; }
}
@media (prefers-reduced-motion: reduce) {
  body.dx-portal *, body.dx-portal *::before, body.dx-portal *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
