@charset "UTF-8";

:root {
  --ink: #18212b;
  --muted: #697586;
  --line: #d9e0e7;
  --soft-line: #edf1f5;
  --panel: #ffffff;
  --canvas: #f4f6f8;
  --nav: #132531;
  --brand: #0f766e;
  --brand-dark: #0a5752;
  --blue: #2563eb;
  --orange: #c2410c;
  --green-bg: #e8f5ef;
  --green-text: #087443;
  --orange-bg: #fff3e8;
  --orange-text: #9a3412;
  --shadow: 0 16px 38px rgba(24, 33, 43, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow-x: hidden;
}

.app-shell.login-mode {
  grid-template-columns: 1fr;
}

.app-shell.login-mode .sidebar,
.app-shell.login-mode .topbar,
.app-shell.login-mode .page-backbar,
.app-shell.login-mode .module-home,
.app-shell.login-mode .control-panel,
.app-shell.login-mode .workspace,
.app-shell.login-mode .admin-panel,
.app-shell.login-mode .quick-card,
.app-shell.login-mode .nav-list {
  display: none !important;
}

.sidebar {
  min-height: 100vh;
  background: var(--nav);
  color: #f8fbfc;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 10px;
}

.brand-logo {
  width: 116px;
  height: 84px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 10px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 4px;
  font-size: 12px;
  color: #bdd0dc;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dbe8ee;
  text-align: left;
  padding: 12px 14px;
  min-height: 42px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

.quick-card {
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.09);
  display: grid;
  gap: 8px;
}

.quick-card span,
.quick-card small {
  color: #bdd0dc;
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.login-screen {
  min-height: 100vh;
  margin: -24px;
  padding: 0;
  position: relative;
  order: 0;
  display: grid;
  grid-template-rows: 104px 1fr;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(4, 31, 55, 0.86), rgba(8, 42, 68, 0.62)),
    url("assets/ocean-lcl-hero.png") center / cover no-repeat;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 104px 0 0;
  background: linear-gradient(90deg, rgba(4, 31, 55, 0.28), rgba(4, 31, 55, 0.08));
  backdrop-filter: blur(1px);
  pointer-events: none;
}

.login-brandbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  background: rgba(6, 30, 53, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.login-brandbar img {
  width: 158px;
  height: 58px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
}

.login-brandbar strong {
  display: block;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

.login-brandbar span {
  display: block;
  margin-top: 8px;
  color: #c5d7e7;
  font-size: 16px;
  font-weight: 800;
}

.login-stage {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 48px));
  align-self: center;
  justify-self: start;
  margin-left: clamp(40px, 16vw, 260px);
  display: grid;
  gap: 16px;
}

.login-title-card {
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(190, 211, 230, 0.9);
  border-radius: 8px;
  padding: 22px 26px;
  box-shadow: 0 18px 45px rgba(0, 18, 36, 0.22);
}

.login-title-card h1 {
  margin: 0;
  color: #0e1a2a;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}

.login-title-card p {
  margin: 8px 0 0;
  color: #52667d;
  font-size: 16px;
  font-weight: 800;
}

.login-card {
  width: 100%;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(190, 211, 230, 0.9);
  border-radius: 8px;
  box-shadow: 0 24px 55px rgba(0, 18, 36, 0.28);
  padding: 28px 30px;
  display: grid;
  gap: 16px;
}

.login-logo {
  width: 170px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
  display: block;
  margin-bottom: 10px;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: #314258;
  font-size: 18px;
  font-weight: 700;
}

.login-card input,
.login-card select {
  width: 100%;
  min-height: 52px;
  border: 1px solid #b9cce2;
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
  font-size: 17px;
  background: #fff;
}

.login-card .primary-btn {
  min-height: 54px;
  margin-top: 4px;
  font-size: 20px;
  background: #157f72;
}

.login-card .primary-btn:hover {
  background: #0e6f64;
}

.login-link-btn {
  border: 0;
  background: transparent;
  color: #0d5797;
  font-size: 16px;
  font-weight: 900;
  min-height: 28px;
  cursor: pointer;
}

.login-connection-status {
  color: #516277;
  background: #f6f8fb;
  border: 1px solid #dce6f1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.login-connection-status.checking {
  color: #7a5400;
  background: #fff7df;
  border-color: #f1d38a;
}

.login-connection-status.ok {
  color: #075c50;
  background: #e8fbf6;
  border-color: #9ad8cf;
}

.login-connection-status.warning,
.login-connection-status.error {
  color: #a1321f;
  background: #fff1ed;
  border-color: #ffb5a8;
}

.login-card small {
  justify-self: center;
  color: #62758a;
  line-height: 1.4;
  font-size: 14px;
  background: #fff;
  border: 1px solid #dce6f1;
  border-radius: 999px;
  padding: 9px 16px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  order: 1;
}

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

.session-box > span {
  background: #e9f4f3;
  color: var(--brand);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 900;
}

.session-box .sync-status {
  max-width: 520px;
  border: 1px solid #d7e5ee;
  background: #f8fbfd;
  color: #415467;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
  line-height: 1.35;
}

.session-box .sync-status.sync-error {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b42318;
}

.session-box .sync-status.sync-ok {
  border-color: #b7e4db;
  background: #effaf7;
  color: var(--brand);
}

.page-backbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  order: 2;
}

.page-sync-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.back-home-btn {
  min-height: 48px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 8px;
  background: #e9f4f3;
  color: var(--brand);
  padding: 0 18px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.12);
}

.back-home-btn:hover {
  background: #d8eeeb;
  border-color: var(--brand);
}

.module-home {
  order: 2;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.module-home-head {
  margin-bottom: 14px;
}

.module-home-head span,
.module-home-head strong {
  display: block;
}

.module-home-head span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 5px;
}

.module-home-head strong {
  font-size: 22px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 15px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 8px;
}

.module-card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.module-card span {
  width: 34px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e9f4f3;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.module-card strong {
  font-size: 18px;
}

.module-card small {
  color: var(--muted);
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  border-radius: 8px;
  min-height: 40px;
  border: 0;
}

.primary-btn {
  background: var(--brand);
  color: #fff;
  padding: 0 16px;
  font-weight: 800;
}

.primary-btn:hover {
  background: var(--brand-dark);
}

.ghost-btn {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 14px;
}

.icon-btn {
  width: 34px;
  min-height: 34px;
  background: #f2f5f7;
  color: var(--ink);
  font-size: 20px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  order: 2;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
}

.kpi-card span,
.kpi-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.kpi-card strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
}

.kpi-card.attention {
  border-color: rgba(15, 118, 110, 0.35);
}

.kpi-card.warning {
  border-color: rgba(194, 65, 12, 0.35);
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) repeat(auto-fit, minmax(150px, 0.8fr));
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  order: 3;
  position: relative;
  padding-top: 34px;
  box-shadow: 0 12px 28px rgba(24, 33, 43, 0.11);
}

.control-panel::before {
  content: "查询筛选";
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.field {
  display: grid;
  gap: 5px;
}

.lcl-all-btn {
  align-self: end;
}

.query-btn {
  align-self: end;
  min-height: 38px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 900;
}

.field label {
  color: var(--muted);
  font-size: 12px;
}

.field input,
.field select,
.table-toolbar select,
.dialog-form input,
.dialog-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.field input:focus,
.field select:focus,
.table-toolbar select:focus,
.dialog-form input:focus,
.dialog-form select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  order: 4;
  min-width: 0;
}

.data-panel,
.detail-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.data-panel {
  overflow: hidden;
}

.workspace.detail-empty {
  grid-template-columns: minmax(0, 1fr);
}

.workspace.detail-empty .detail-panel {
  display: none;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 10px 0;
  border-bottom: 1px solid var(--soft-line);
}

.tabs.hidden + .table-toolbar {
  border-bottom: 1px solid var(--soft-line);
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px 8px 0 0;
  font-weight: 800;
}

.tab.active {
  background: #e9f4f3;
  color: var(--brand);
}

.table-toolbar {
  min-height: 58px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-toolbar strong,
.table-toolbar span {
  display: block;
}

.table-toolbar span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.cargo-summary {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px !important;
}

.cargo-summary em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft-line);
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.stats-filter {
  display: flex !important;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-top: 8px !important;
}

.stats-filter label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-filter select,
.stats-filter input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 700;
}

.stats-filter input {
  min-width: 260px;
}

.stats-filter input[type="date"] {
  min-width: 150px;
}

.stats-query-btn {
  min-height: 34px;
  padding: 0 18px;
}

.stats-filter em {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: var(--soft-line);
  padding: 0 10px;
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.stats-section-row td {
  background: #f7f9fb;
  color: var(--ink);
  font-weight: 900;
}

.stats-debt-summary-row td {
  background: #fbfdff;
}

.stats-container-summary-row td {
  background: #eefcf8;
  border-top: 1px solid #c7f0e4;
  border-bottom: 1px solid #c7f0e4;
  font-weight: 900;
}

.empty-result-row td {
  padding: 28px 16px !important;
  text-align: center;
  background: #fbfdff;
}

.empty-result-row strong,
.empty-result-row span {
  display: block;
}

.empty-result-row strong {
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 6px;
}

.empty-result-row span {
  color: var(--muted);
  margin-bottom: 14px;
}

.table-toolbar select {
  width: 160px;
}

.table-toolbar .container-jump {
  width: 280px;
  min-height: 44px;
  border-color: rgba(15, 118, 110, 0.35);
  font-weight: 800;
}

.table-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.table-buttons {
  display: flex;
  gap: 10px;
}

.table-buttons .small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 900;
}

.table-buttons .primary-btn {
  min-width: 108px;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border-top: 1px solid var(--soft-line);
  max-height: calc(100vh - 300px);
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.fit-table {
  width: 100%;
  min-width: 2380px;
  table-layout: fixed;
}

table.fit-table th,
table.fit-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.fit-table td.wide {
  min-width: 0;
  max-width: none;
  white-space: nowrap;
}

table.fit-table th:nth-child(1),
table.fit-table td:nth-child(1) {
  width: 76px;
}

table.fit-table th:nth-child(2),
table.fit-table td:nth-child(2) {
  width: 118px;
}

table.fit-table th.date-col,
table.fit-table td.date-cell {
  width: 118px;
  min-width: 118px;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

table.fit-table th.photo-col,
table.fit-table td.photo-cell {
  width: 124px;
  min-width: 124px;
  overflow: visible;
}

table.fit-table th.goods-col,
table.fit-table td.wide {
  width: 170px;
}

table.fit-table th.container-col,
table.fit-table td.container-cell {
  width: 130px;
}

table.fit-table th:last-child,
table.fit-table td:last-child {
  width: 128px;
}

table.fcl-one-page {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

table.fcl-one-page th,
table.fcl-one-page td {
  padding: 8px 6px;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

table.fcl-one-page th:nth-child(1),
table.fcl-one-page td:nth-child(1) {
  width: 10%;
}

table.fcl-one-page th:nth-child(2),
table.fcl-one-page td:nth-child(2) {
  width: 12%;
}

table.fcl-one-page th:nth-child(3),
table.fcl-one-page td:nth-child(3) {
  width: 8%;
}

table.fcl-one-page th:nth-child(4),
table.fcl-one-page td:nth-child(4) {
  width: 7%;
}

table.fcl-one-page th:nth-child(5),
table.fcl-one-page td:nth-child(5) {
  width: 6%;
}

table.fcl-one-page th:nth-child(6),
table.fcl-one-page td:nth-child(6) {
  width: 7%;
}

table.fcl-one-page th:nth-child(7),
table.fcl-one-page td:nth-child(7) {
  width: 14%;
}

table.fcl-one-page th:nth-child(8),
table.fcl-one-page td:nth-child(8) {
  width: 7%;
}

table.fcl-one-page td.wide {
  min-width: 0;
  max-width: none;
  line-height: 1.35;
}

table.fcl-one-page .track-link {
  font-size: 12px;
  line-height: 1.35;
}

table.fit-table th.lcl-id-col,
table.fit-table td.lcl-id-cell {
  width: 270px;
  min-width: 270px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

table.fit-table td.lcl-id-cell strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-size: 13px;
}

table.fit-table td.status-cell small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

table.fit-table th.photo-col,
table.fit-table td.photo-cell {
  width: 86px;
  min-width: 86px;
}

table.fit-table th.party-col,
table.fit-table td.party-cell {
  width: 116px;
  min-width: 116px;
}

table.fit-table th.goods-col,
table.fit-table td.wide {
  width: 150px;
}

table.fit-table th.qty-col,
table.fit-table td.qty-cell {
  width: 78px;
  min-width: 78px;
}

table.fit-table th.number-col,
table.fit-table td.number-cell {
  width: 86px;
  min-width: 86px;
  text-align: right;
}

table.fit-table th.money-col,
table.fit-table td.money-cell {
  width: 118px;
  min-width: 118px;
}

table.fit-table th.container-col,
table.fit-table td.container-cell {
  width: 126px;
  min-width: 126px;
}

table.fit-table th.alert-col,
table.fit-table td.alert-cell {
  width: 108px;
  min-width: 108px;
}

table.fit-table th.arrival-col,
table.fit-table td.arrival-cell {
  width: 150px;
  min-width: 150px;
}

table.fit-table th.status-col,
table.fit-table td.status-cell {
  width: 94px;
  min-width: 94px;
}

table.fit-table th.action-col,
table.fit-table td.action-cell {
  width: 126px;
  min-width: 126px;
  overflow: visible;
}

table.fit-table.lcl-search-compact {
  min-width: 100%;
  font-size: 11px;
}

table.fit-table.lcl-search-compact th,
table.fit-table.lcl-search-compact td {
  padding: 7px 5px;
}

table.fit-table.lcl-search-compact th.lcl-id-col,
table.fit-table.lcl-search-compact td.lcl-id-cell {
  width: 150px;
  min-width: 150px;
}

table.fit-table.lcl-search-compact th.date-col,
table.fit-table.lcl-search-compact td.date-cell {
  width: 84px;
  min-width: 84px;
}

table.fit-table.lcl-search-compact th.photo-col,
table.fit-table.lcl-search-compact td.photo-cell {
  width: 58px;
  min-width: 58px;
}

table.fit-table.lcl-search-compact .photo-strip {
  max-width: 46px;
  min-height: 28px;
  padding: 2px 4px;
}

table.fit-table.lcl-search-compact .photo-strip img {
  width: 24px;
  height: 24px;
}

table.fit-table.lcl-search-compact th.party-col,
table.fit-table.lcl-search-compact td.party-cell {
  width: 92px;
  min-width: 92px;
}

table.fit-table.lcl-search-compact th.goods-col,
table.fit-table.lcl-search-compact td.wide {
  width: 112px;
  min-width: 112px;
}

table.fit-table.lcl-search-compact th.qty-col,
table.fit-table.lcl-search-compact td.qty-cell {
  width: 58px;
  min-width: 58px;
}

table.fit-table.lcl-search-compact th.number-col,
table.fit-table.lcl-search-compact td.number-cell {
  width: 72px;
  min-width: 72px;
}

table.fit-table.lcl-search-compact th.container-col,
table.fit-table.lcl-search-compact td.container-cell {
  width: 78px;
  min-width: 78px;
}

table.fit-table.lcl-search-compact th.alert-col,
table.fit-table.lcl-search-compact td.alert-cell {
  width: 78px;
  min-width: 78px;
}

table.fit-table.lcl-search-compact th.arrival-col,
table.fit-table.lcl-search-compact td.arrival-cell {
  width: 116px;
  min-width: 116px;
}

table.fit-table.lcl-search-compact th.status-col,
table.fit-table.lcl-search-compact td.status-cell {
  width: 70px;
  min-width: 70px;
}

table.fit-table.lcl-search-compact .tag {
  padding: 3px 7px;
  font-size: 11px;
}

table.fit-table.lcl-search-compact td.status-cell small {
  font-size: 10px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fb;
  color: #415061;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th.resizable-th {
  position: sticky;
  padding-right: 18px;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
}

.col-resizer::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 4px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

th.resizable-th:hover .col-resizer::after,
body.resizing-columns .col-resizer::after {
  background: rgba(15, 118, 110, 0.45);
}

body.resizing-columns {
  cursor: col-resize;
  user-select: none;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--soft-line);
  vertical-align: top;
  color: #26313d;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: #f0f8f7;
}

tbody tr.selected {
  box-shadow: inset 5px 0 0 var(--brand);
}

td strong,
td span {
  display: block;
}

td span {
  color: var(--muted);
  margin-top: 3px;
  font-size: 12px;
}

.batch-load-summary {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-line);
  color: var(--ink);
  font-weight: 800;
}

.batch-shipment-rows {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.batch-shipment-rows > strong {
  font-size: 13px;
  color: var(--ink);
}

.batch-shipment-table input {
  width: 76px;
  min-width: 0;
}

.lcl-shipment-list {
  display: grid;
  gap: 6px;
}

.lcl-shipment-list > div {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft-line);
}

.lcl-shipment-list span,
.lcl-shipment-list small,
.container-cell span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.lcl-shipment-editor {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.lcl-shipment-editor-head,
.lcl-shipment-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.lcl-shipment-editor-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.lcl-shipment-edit-table {
  min-width: 1500px;
}

.lcl-shipment-edit-table input,
.lcl-shipment-edit-table select {
  width: 100%;
  min-width: 82px;
}

.shipment-file-count {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.batch-edit-scope {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: #eefbf8;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.shipment-focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.shipment-focus-grid span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-line);
  color: var(--ink);
  font-size: 13px;
}

.lcl-recommendation {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #eefbf8;
  color: var(--ink);
}

.lcl-recommendation.muted {
  background: var(--soft-line);
  border-color: var(--line);
}

.recommendation-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recommendation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.recommendation-main strong,
.recommendation-main span,
.recommendation-metrics span {
  display: block;
}

.recommendation-main strong {
  color: var(--brand-dark);
}

.recommendation-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.recommendation-metrics span {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.16);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.recommendation-dialog-summary {
  display: grid;
  gap: 4px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #eefbf8;
}

.recommendation-dialog-summary strong {
  color: var(--brand-dark);
  font-size: 16px;
}

.recommendation-dialog-summary span {
  color: var(--muted);
  font-weight: 700;
}

.recommendation-section {
  margin-top: 14px;
}

.recommendation-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--ink);
}

.recommendation-table-wrap {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.recommendation-table {
  margin-top: 0;
  min-width: 1100px;
}

.recommendation-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

th input[type="checkbox"],
td input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

td.wide {
  min-width: 190px;
  max-width: 280px;
  white-space: normal;
  line-height: 1.45;
}

.track-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.track-link:hover {
  text-decoration: underline;
}

.cargo-preview {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.cargo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
  display: grid;
  gap: 12px;
  cursor: pointer;
}

.cargo-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--soft-line);
  background: #f7f9fb;
}

.cargo-thumb-button {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.cargo-thumb-button span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(7, 20, 34, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.photo-strip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 76px;
  min-height: 34px;
  padding: 3px 6px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #f0fdfa;
  color: var(--brand);
  font-weight: 900;
  cursor: pointer;
}

.photo-strip img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #d6e3ea;
}

.photo-strip span,
.photo-none {
  display: inline;
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}

.photo-none {
  color: var(--muted);
}

.empty-photo {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.cargo-card:hover,
.cargo-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.cargo-card-head,
.cargo-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cargo-card-head span,
.cargo-route span,
.cargo-meta dt,
.cargo-card-foot small {
  color: var(--muted);
  font-size: 12px;
}

.cargo-card-head strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.cargo-goods {
  min-height: 44px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

.cargo-route {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px;
  background: #f7f9fb;
  border-radius: 8px;
}

.cargo-route strong {
  display: block;
  margin-top: 4px;
  word-break: break-word;
}

.cargo-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.cargo-meta div {
  min-width: 0;
}

.cargo-meta dd {
  margin: 3px 0 0;
  font-weight: 800;
  word-break: break-word;
}

.cargo-card-foot {
  align-items: center;
  border-top: 1px solid var(--soft-line);
  padding-top: 10px;
}

.cargo-card-foot small {
  text-align: right;
  line-height: 1.35;
}

.tag,
.status-pill {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f6;
  color: #475569;
  white-space: nowrap;
}

.tag.success,
.status-pill.success {
  background: var(--green-bg);
  color: var(--green-text);
}

.tag.warning,
.status-pill.warning {
  background: var(--orange-bg);
  color: var(--orange-text);
}

.detail-panel {
  padding: 16px;
}

.detail-panel {
  position: static;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.detail-head span {
  color: var(--muted);
  font-size: 12px;
}

.detail-head strong {
  display: block;
  margin-top: 5px;
  word-break: break-word;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 30px 4px;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state strong {
  color: var(--ink);
}

.hidden {
  display: none !important;
}

#detailList {
  margin: 14px 0 0;
  display: grid;
  gap: 9px;
}

#detailList > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--soft-line);
}

#detailList {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

#detailList .detail-photo-row,
#detailList .lcl-step-row,
#detailList .arrival-edit-row,
#detailList .cargo-edit-row,
#detailList .customs-type-edit-row,
#detailList .fee-status-row,
#detailList .lcl-settlement-row,
#detailList .lcl-packing-list-row,
#detailList .finance-detail-row,
#detailList .customs-doc-row,
#detailList .container-basic-edit-section {
  grid-column: 1 / -1;
}

#detailList dt {
  color: var(--muted);
  font-size: 12px;
}

#detailList dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
}

.detail-photo-row {
  align-items: start;
}

.lcl-step-row {
  align-items: start;
}

.arrival-edit-row {
  align-items: start;
}

.cargo-edit-row {
  align-items: start;
}

.container-basic-edit-section {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.container-basic-edit-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--soft-line);
}

.container-basic-edit-head strong {
  font-size: 15px;
  color: var(--ink);
}

.container-basic-edit-head span {
  color: var(--muted);
  font-size: 12px;
}

.container-basic-edit .cargo-edit-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.container-basic-edit .cargo-edit-grid input {
  min-height: 42px;
  font-size: 14px;
}

.container-basic-edit .primary-btn {
  margin-top: 14px;
  min-width: 180px;
}

.regular-customs-fees {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.wide-dialog {
  width: min(1500px, calc(100vw - 32px));
}

.wide-dialog .dialog-form {
  max-height: min(92vh, 980px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dialog-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#regularCustomsFeeDialog.expanded-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

#regularCustomsFeeDialog.expanded-dialog .dialog-form {
  width: 100%;
  height: 100vh;
  max-height: none;
  padding: 14px 18px;
}

.wide-dialog .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 0 -4px -4px;
  padding: 10px 4px 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), #fff 35%);
}

#regularCustomsFeeDialogBody {
  overflow: auto;
  padding-right: 4px;
}

#regularCustomsFeeDialog.expanded-dialog #regularCustomsFeeDialogBody {
  flex: 1;
  min-height: 0;
}

.regular-customs-fees.compact {
  padding: 12px;
  background: #fff;
}

.regular-customs-fees.compact .regular-customs-head {
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: 0;
}

.regular-customs-fees.in-dialog {
  margin-top: 0;
  border: 0;
  padding: 0;
  background: transparent;
  min-height: 0;
}

.regular-customs-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.regular-customs-head strong {
  font-size: 15px;
}

.regular-customs-head label {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: var(--muted);
  font-size: 12px;
}

.regular-customs-table-wrap {
  overflow: auto;
  overflow-y: auto;
  overflow-x: auto;
  max-height: calc(88vh - 170px);
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-gutter: stable both-edges;
}

#regularCustomsFeeDialog.expanded-dialog .regular-customs-table-wrap {
  max-height: calc(100vh - 190px);
}

.regular-customs-table {
  width: max-content;
  min-width: 1500px;
  table-layout: fixed;
  margin-top: 0;
}

.regular-customs-table th {
  position: static;
  top: auto;
  z-index: auto;
  height: 38px;
  vertical-align: middle;
  white-space: nowrap;
}

.regular-customs-table td {
  height: 56px;
  vertical-align: middle;
}

.regular-customs-table input,
.regular-customs-table select {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
}

.regular-customs-table td:first-child,
.regular-customs-table th:first-child {
  width: 44px;
  text-align: center;
}

.regular-customs-table td:nth-child(2),
.regular-customs-table th:nth-child(2) { width: 270px; min-width: 270px; }
.regular-customs-table td:nth-child(3),
.regular-customs-table th:nth-child(3) { width: 130px; }
.regular-customs-table td:nth-child(4),
.regular-customs-table th:nth-child(4) { width: 180px; }
.regular-customs-table td:nth-child(5),
.regular-customs-table th:nth-child(5) { width: 190px; }
.regular-customs-table td:nth-child(6),
.regular-customs-table th:nth-child(6) { width: 160px; text-align: right; }
.regular-customs-table td:nth-child(6) input { text-align: right; }
.regular-customs-table td:nth-child(7),
.regular-customs-table th:nth-child(7) { width: 100px; text-align: center; }
.regular-customs-table td:nth-child(8),
.regular-customs-table th:nth-child(8) { width: 240px; min-width: 240px; }
.regular-customs-table td:nth-child(9),
.regular-customs-table th:nth-child(9) { width: 86px; text-align: center; }

.regular-fee-filtered-out {
  display: none;
}

.regular-fee-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4fbf9;
}

.regular-customs-delete,
.regular-customs-paid {
  min-height: 32px;
  padding: 0 10px;
}

.regular-customs-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.regular-customs-total td {
  font-weight: 800;
  background: #eef8f6;
}

.regular-customs-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.regular-customs-fees small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.focus-flash {
  animation: focusFlash 1.1s ease;
  border-radius: 8px;
}

@keyframes focusFlash {
  0% {
    background: rgba(20, 132, 118, 0.12);
    box-shadow: 0 0 0 0 rgba(20, 132, 118, 0.42);
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 12px rgba(20, 132, 118, 0);
  }
}

.customs-type-edit-row {
  align-items: start;
}

.fee-status-row {
  align-items: start;
}

.lcl-settlement-row {
  align-items: start;
}

.finance-detail-row {
  align-items: start;
}

.customs-doc-row {
  align-items: start;
}

.customs-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.customs-doc-head span {
  color: var(--muted);
  font-size: 12px;
}

.customs-doc-head .doc-warning {
  color: #b54708;
  font-weight: 800;
}

.customs-doc-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.customs-doc-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customs-doc-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.customs-doc-title strong {
  color: var(--ink);
  font-size: 13px;
}

.customs-doc-title span,
.customs-doc-title em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.customs-doc-title em {
  background: #e6fcf5;
  color: #087f5b;
}

.customs-doc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.customs-doc-card small {
  color: var(--muted);
  font-size: 11px;
}

.doc-example-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-example-links a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef9f7;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.customs-doc-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.customs-doc-actions select,
.doc-note-input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 0 9px;
}

.customs-doc-actions label {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--brand);
  cursor: pointer;
}

.doc-file-save {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.customs-doc-actions input {
  display: none;
}

.doc-file-name {
  color: var(--muted);
  font-size: 11px;
}

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

.doc-file-view,
.doc-file-delete {
  min-height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

.doc-inline-progress {
  display: none;
  gap: 5px;
}

.doc-inline-progress.active {
  display: grid;
}

.doc-inline-progress span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.doc-inline-progress progress {
  width: 100%;
  height: 10px;
  accent-color: var(--brand);
}

.customs-doc-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.customs-doc-save,
.customs-doc-export {
  width: 100%;
}

.customs-upload-progress {
  display: none;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid #cde7e3;
  border-radius: 8px;
  background: #f0fbf8;
  padding: 10px 12px;
}

.customs-upload-progress.active {
  display: grid;
}

.customs-upload-progress div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.customs-upload-progress span {
  color: var(--muted);
  font-weight: 700;
}

.customs-upload-progress progress {
  width: 100%;
  height: 12px;
  accent-color: var(--brand);
}

.fee-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.fee-status-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.fee-control {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.fee-status-grid select,
.fee-status-grid input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.profit-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.profit-summary span,
.profit-summary strong {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
}

.profit-summary .fee-save-btn {
  min-height: 34px;
  padding: 0 16px;
  font-weight: 800;
}

.profit-summary .fee-save-btn.saved {
  color: var(--muted);
  background: #eef2f6;
  border-color: #d7dee8;
  box-shadow: none;
}

.fee-status-grid input[readonly] {
  background: #f4f7fa;
  color: var(--brand);
  font-weight: 900;
}

.regular-fee-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.regular-fee-summary-card {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.regular-fee-summary-card strong {
  color: var(--ink);
  font-size: 13px;
}

.regular-fee-summary-card span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.regular-fee-summary-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.regular-fee-summary-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12);
}

.regular-fee-summary-card.income {
  background: #f7fbff;
}

.regular-customs-table input,
.regular-customs-table select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.regular-fee-files {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.regular-fee-files label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.regular-fee-files input {
  display: none;
}

.regular-fee-files button {
  min-height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

.regular-fee-files span {
  overflow-wrap: anywhere;
}

.profit-plus {
  color: #087f5b !important;
  background: #e6fcf5 !important;
}

.profit-minus {
  color: #c92a2a !important;
  background: #fff5f5 !important;
}

.container-no-lines,
.tracking-link-lines {
  display: grid;
  gap: 6px;
  line-height: 1.35;
}

.container-no-lines.compact {
  gap: 3px;
}

.container-no-lines span,
.tracking-link-lines span {
  display: block;
  overflow-wrap: anywhere;
}

.container-no-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fee-save-btn {
  margin-top: 10px;
  width: 100%;
}

.lcl-settlement-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.lcl-settlement-inputs label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.lcl-settlement-inputs input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.lcl-base-input {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.lcl-base-input textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 9px 10px;
  resize: vertical;
}

.lcl-settlement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.lcl-settlement-summary span {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.lcl-settlement-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.lcl-warning {
  margin: 10px 0 0;
  color: #b54708;
  font-weight: 800;
}

.lcl-receivable-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.lcl-receivable-head small {
  color: var(--muted);
}

.mini-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 12px;
}

.mini-table th,
.mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  white-space: nowrap;
}

.mini-table th {
  background: var(--soft);
  color: var(--muted);
}

.lcl-export-btn {
  width: 100%;
  margin-top: 12px;
}

.lcl-packing-list-row dd {
  overflow-x: auto;
}

.lcl-packing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.lcl-packing-head div {
  display: grid;
  gap: 3px;
}

.lcl-packing-head span,
.lcl-packing-more {
  color: var(--muted);
  font-size: 12px;
}

.lcl-packing-preview th,
.lcl-packing-preview td {
  white-space: nowrap;
}

.arrival-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cargo-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cargo-edit-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.cargo-edit-grid input,
.cargo-edit-grid select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
}

.billing-recalc-btn {
  align-self: end;
  min-height: 36px;
}

.cargo-edit-wide {
  grid-column: 1 / -1;
}

.lcl-extra-charge-editor {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfb;
}

.lcl-extra-charge-head,
.lcl-extra-charge-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lcl-extra-charge-head {
  justify-content: space-between;
}

.lcl-extra-charge-head span {
  color: var(--muted);
  font-size: 12px;
}

.lcl-extra-charge-table-wrap {
  overflow-x: auto;
}

.lcl-extra-charge-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.lcl-extra-charge-table th,
.lcl-extra-charge-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px;
  text-align: left;
  white-space: nowrap;
}

.lcl-extra-charge-table th:first-child,
.lcl-extra-charge-table td:first-child {
  width: 42px;
  text-align: center;
}

.lcl-extra-charge-table input,
.lcl-extra-charge-table select {
  min-height: 34px;
}

.cargo-save-btn {
  width: 100%;
}

.cargo-edit-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 0 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), #fff 35%);
  z-index: 2;
}

.cargo-edit-actions .cargo-save-btn {
  margin-top: 0;
  min-height: 42px;
  font-weight: 800;
}

.cargo-edit-actions .cargo-save-btn.saved {
  color: var(--muted);
  background: #eef2f6;
  border-color: #d7dee8;
  box-shadow: none;
}

.cargo-delete-btn {
  min-width: 128px;
}

.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.row-actions .small {
  min-height: 32px;
  padding: 0 10px;
}

.customs-type-edit {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto 1fr;
  gap: 8px;
  align-items: center;
}

.arrival-edit label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.arrival-edit input,
.customs-type-edit select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
}

.arrival-edit button,
.arrival-edit small {
  grid-column: 1 / -1;
}

.arrival-edit small {
  color: var(--muted);
}

.customs-type-edit small {
  color: var(--muted);
}

.step-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

.step-track span {
  position: relative;
  flex: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  padding-top: 23px;
  text-align: center;
  min-width: 0;
  white-space: nowrap;
}

.step-track span::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 9px;
  height: 2px;
  background: #dbe3ea;
}

.step-track span:first-child::before {
  left: 50%;
}

.step-track span:last-child::before {
  right: 50%;
}

.step-track b {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dbe3ea;
  color: #475569;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #dbe3ea;
}

.step-track span.done {
  color: var(--brand);
}

.step-track span.done b {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 1px var(--brand);
}

.step-track span.done::before {
  background: var(--brand);
}

.step-track span.current {
  color: var(--orange-text);
  font-size: 11px;
}

.step-track span.current b {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.14);
}

.step-track span.current::before {
  background: linear-gradient(90deg, var(--brand), #dbe3ea);
}

.detail-photo {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--soft-line);
  background: #f7f9fb;
}

.detail-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.detail-photo-gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.detail-photo-gallery button[data-photo-view] {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.detail-photo-gallery figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.photo-viewer-dialog {
  width: min(1100px, calc(100vw - 40px));
}

.photo-viewer-grid {
  display: grid;
  gap: 14px;
  max-height: 76vh;
  overflow: auto;
}

.photo-viewer-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.photo-viewer-grid figure.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.photo-viewer-grid img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #f7f9fb;
  border-radius: 8px;
}

.photo-viewer-grid figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.upload-inline,
.file-field {
  display: grid;
  gap: 6px;
}

.upload-inline {
  margin-top: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.upload-inline input,
.file-field input {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfd;
  color: var(--muted);
}

.upload-progress-panel,
.upload-recognition-note {
  grid-column: 1 / -1;
}

.upload-progress-panel {
  display: none;
  gap: 8px;
  border: 1px solid #cde7e3;
  border-radius: 8px;
  background: #f0fbf8;
  padding: 10px 12px;
}

.upload-progress-panel.active {
  display: grid;
}

.upload-progress-panel div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.upload-progress-panel span {
  color: var(--muted);
  font-weight: 700;
}

.upload-progress-panel progress {
  width: 100%;
  height: 12px;
  accent-color: var(--brand);
}

.upload-recognition-note {
  min-height: 34px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.full {
  width: 100%;
}

.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

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

.admin-head {
  min-height: 68px;
  padding: 16px;
  border-bottom: 1px solid var(--soft-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.admin-head strong {
  font-size: 20px;
}

.admin-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.admin-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.section-head {
  min-height: 50px;
  padding: 10px 12px;
  background: #f7f9fb;
  border-bottom: 1px solid var(--soft-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-list {
  display: grid;
}

.admin-row {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-bottom: 1px solid var(--soft-line);
}

.admin-row:last-child {
  border-bottom: 0;
}

.permission-row {
  grid-template-columns: 180px 1.4fr 1.4fr auto;
  align-items: center;
}

.profile-admin-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px;
  padding: 12px;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  background: #fbfdff;
}

.profile-admin-row + .profile-admin-row {
  margin-top: 0;
}

.profile-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.profile-identity input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.profile-identity small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.profile-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  justify-items: end;
  gap: 8px;
}

.profile-actions span {
  grid-column: 1 / -1;
  justify-self: end;
  color: #0f766e;
  background: #eefcf8;
  border: 1px solid #c7f0e4;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.admin-empty-users {
  margin: 12px;
  padding: 18px;
  border: 1px dashed #b8c7d9;
  border-radius: 8px;
  background: #f8fbff;
  display: grid;
  gap: 6px;
}

.admin-empty-users strong {
  color: var(--ink);
}

.admin-empty-users span {
  color: var(--muted);
  font-size: 13px;
}

.danger-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #ffb4b4;
  border-radius: 8px;
  background: #fff5f5;
  color: #c62828;
  font-weight: 800;
}

.profile-admin-controls {
  display: grid;
  grid-template-columns: minmax(170px, 260px) minmax(170px, 260px) auto;
  align-items: end;
  gap: 10px;
}

.profile-admin-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-admin-row input,
.profile-admin-row select {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.profile-active-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 18px;
  color: var(--ink) !important;
  font-size: 14px !important;
}

.profile-active-check input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.profile-module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
}

.profile-module-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.profile-module-grid label.selected {
  border-color: #8cc3ff;
  background: #eef6ff;
}

.profile-module-grid input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

.profile-role-note {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #cfe3ff;
  border-radius: 8px;
  background: #f8fbff;
  color: #46617f;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.profile-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.profile-module-head span {
  color: var(--muted);
  font-weight: 600;
}

.supplier-section {
  grid-column: 1 / -1;
}

.supplier-row {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, auto) minmax(260px, auto) auto;
  align-items: center;
}

.supplier-money {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.supplier-money span {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f7fa;
  color: #536273;
  font-size: 12px;
  white-space: nowrap;
}

.supplier-money strong {
  color: var(--ink);
  font-size: 12px;
}

.supplier-money .supplier-debt {
  background: #fff2e8;
  color: #a33a12;
}

.admin-row strong,
.admin-row span,
.admin-row em {
  display: block;
}

.admin-row span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.admin-row em {
  justify-self: end;
  color: var(--brand);
  background: #e9f4f3;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  margin-top: 6px;
}

.permission-block {
  display: grid;
  gap: 6px;
}

.permission-block > span {
  margin-top: 0;
}

.permission-block div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.permission-block em {
  justify-self: auto;
  margin-top: 0;
  background: #eef2f6;
  color: #3f4d5d;
}

.permission-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.permission-summary span {
  margin-top: 0;
}

.permission-summary strong {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.user-state {
  color: var(--green-text);
  background: var(--green-bg);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.dictionary-grid {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.dictionary-card {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px;
}

.dictionary-card strong {
  display: block;
  margin-bottom: 8px;
}

.dictionary-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dictionary-card span {
  background: #eef2f6;
  color: #475569;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.maintenance-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.maintenance-grid div {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.maintenance-grid span,
.maintenance-grid strong {
  display: block;
}

.maintenance-grid span {
  color: var(--muted);
  font-size: 12px;
}

.maintenance-grid strong {
  margin-top: 6px;
  font-size: 24px;
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  width: min(720px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(19, 37, 49, 0.38);
}

.dialog-form {
  padding: 18px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head {
  margin-bottom: 14px;
}

.dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dialog-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.dialog-actions {
  justify-content: flex-end;
  margin: 16px 0 0;
  padding: 0;
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .profile-module-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .app-shell.login-mode .sidebar {
    display: none;
  }

  .nav-list {
    grid-auto-flow: column;
  }

  .quick-card {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

  .table-wrap {
    max-height: none;
  }

  .permission-row {
    grid-template-columns: 1fr 1fr;
  }

  .customs-doc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cargo-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .main {
    padding: 16px;
  }

  .topbar,
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .table-actions {
    justify-items: stretch;
  }

  .table-buttons {
    width: 100%;
  }

  .table-buttons button,
  .table-toolbar select {
    flex: 1;
    width: 100%;
  }

  .control-panel,
  .kpi-grid,
  .module-grid,
  .admin-grid,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .profile-card-top,
  .profile-admin-controls {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    justify-items: stretch;
  }

  .profile-module-grid {
    grid-template-columns: 1fr;
  }

  .login-screen {
    grid-template-rows: auto 1fr;
    margin: -12px;
    min-height: 100vh;
  }

  .login-brandbar {
    padding: 14px 16px;
    gap: 12px;
  }

  .login-brandbar img {
    width: 120px;
    height: 50px;
    padding: 6px 10px;
  }

  .login-brandbar strong {
    font-size: 24px;
  }

  .login-brandbar span {
    font-size: 13px;
    margin-top: 6px;
  }

  .login-stage {
    width: calc(100vw - 32px);
    margin: 24px 16px;
    justify-self: center;
    align-self: start;
    gap: 14px;
  }

  .login-title-card,
  .login-card {
    padding: 20px;
  }

  .login-title-card h1 {
    font-size: 28px;
  }

  .login-title-card p,
  .login-card label,
  .login-card input {
    font-size: 18px;
  }

  .nav-list {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: row;
  }

  .permission-row {
    grid-template-columns: 1fr;
  }

  .cargo-edit-grid {
    grid-template-columns: 1fr;
  }

  .cargo-edit-wide {
    grid-column: auto;
  }

  #detailList {
    grid-template-columns: 1fr;
  }

  #detailList > div {
    grid-template-columns: 96px 1fr;
  }

  .step-track {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .step-track span {
    min-width: 74px;
  }

  .customs-doc-list,
  .fee-status-grid {
    grid-template-columns: 1fr;
  }
}

button[id^="save"]:not(.saved),
button[id^="export"],
.profile-save:not(.saved),
.doc-file-save:not(.saved),
.customs-doc-save:not(.saved),
.customs-doc-export,
.lcl-export-btn,
.fee-save-btn:not(.saved),
.cargo-save-btn:not(.saved),
[data-doc-save]:not(.saved),
[data-container-packing-list]:not(.saved) {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

button[id^="save"]:not(.saved):hover,
button[id^="export"]:hover,
.profile-save:not(.saved):hover,
.doc-file-save:not(.saved):hover,
.customs-doc-save:not(.saved):hover,
.customs-doc-export:hover,
.lcl-export-btn:hover,
.fee-save-btn:not(.saved):hover,
.cargo-save-btn:not(.saved):hover,
[data-doc-save]:not(.saved):hover,
[data-container-packing-list]:not(.saved):hover {
  background: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
}

#saveArrivalDates,
#saveCustomsDocs,
#savePortWarehouseEdit,
#savePickupEdit,
#saveContainerCustomsStatus,
#saveContainerBasicEdit,
#saveFeeStatus,
#saveCargoEdit,
.customs-doc-buttons button[id^="save"],
.arrival-edit-row button[id^="save"],
.cargo-edit-actions button[id^="save"] {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18) !important;
}

#saveArrivalDates:hover,
#saveCustomsDocs:hover,
#savePortWarehouseEdit:hover,
#savePickupEdit:hover,
#saveContainerCustomsStatus:hover,
#saveContainerBasicEdit:hover,
#saveFeeStatus:hover,
#saveCargoEdit:hover,
.customs-doc-buttons button[id^="save"]:hover,
.arrival-edit-row button[id^="save"]:hover,
.cargo-edit-actions button[id^="save"]:hover {
  background: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  color: #fff !important;
}

button.saved,
.saved {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
  box-shadow: none !important;
}

.lcl-container-cargo-dialog {
  width: min(1880px, calc(100vw - 20px));
}

.lcl-container-cargo-summary {
  display: grid;
  gap: 3px;
  margin: 4px 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #eefbf8;
}

.lcl-container-cargo-summary strong {
  color: var(--brand-dark);
  font-size: 15px;
}

.lcl-container-cargo-summary span {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.lcl-container-cargo-table-wrap {
  max-height: 74vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lcl-container-cargo-table {
  min-width: 1720px;
  margin-top: 0;
  font-size: 11px;
}

.lcl-container-cargo-table th,
.lcl-container-cargo-table td {
  padding: 5px 6px;
  vertical-align: top;
}

.lcl-container-cargo-table .dialog-id-col {
  width: 190px;
}

.lcl-container-cargo-table td:nth-child(2) {
  width: 140px;
}

.lcl-container-cargo-table td:nth-child(3) {
  width: 150px;
}

.lcl-container-cargo-table input,
.lcl-container-cargo-table select {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  font: inherit;
}

.lcl-container-cargo-table input[type="file"] {
  padding: 4px;
  background: #fff;
  max-width: 120px;
}

.lcl-container-cargo-dialog .dialog-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  z-index: 3;
}

.port-photo-count {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
