:root {
  --client-sidebar: #172233;
  --client-sidebar-deep: #111a28;
  --client-cobalt: #0057b8;
  --client-cobalt-active: #0867d8;
  --client-page: #f3f6fa;
  --client-panel: #ffffff;
  --client-border: #dde3ea;
  --client-text: #111827;
  --client-muted: #667085;
  --client-success: #16803c;
  --client-warning: #b86b00;
  --client-danger: #c52b2b;
  --client-shadow: 0 10px 30px rgba(17, 24, 39, .07);
}

* { box-sizing: border-box; }

html { overflow-x: clip; background: var(--client-page); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--client-text);
  background: var(--client-page);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(0, 87, 184, .22);
  outline-offset: 2px;
}

.client-loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: rgba(255,255,255,.78);
  background: linear-gradient(160deg, var(--client-sidebar), var(--client-sidebar-deep));
  font-size: 14px;
}

.client-loading[hidden],
.client-auth[hidden],
.client-shell[hidden],
.client-view[hidden] { display: none !important; }

.client-loading img { width: 178px; height: auto; }

.client-auth {
  min-height: 100vh;
  padding: 48px clamp(24px, 6vw, 88px);
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 470px);
  align-items: center;
  gap: clamp(42px, 8vw, 120px);
  color: #fff;
  background:
    radial-gradient(circle at 58% 18%, rgba(0, 87, 184, .22), transparent 32%),
    linear-gradient(145deg, var(--client-sidebar), var(--client-sidebar-deep));
}

.client-auth-brand { max-width: 620px; display: grid; gap: clamp(42px, 9vh, 92px); }
.client-auth-brand img { width: min(240px, 64vw); height: auto; }
.client-auth-brand > div { display: grid; gap: 13px; }
.client-auth-brand p,
.client-auth-copy p { margin: 0; color: #75b9ff; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.client-auth-brand h1 { max-width: 590px; margin: 0; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.04; font-weight: 630; }
.client-auth-brand span { max-width: 570px; color: rgba(255,255,255,.62); font-size: 15px; line-height: 1.65; }

.client-auth-card {
  width: 100%;
  border: 1px solid rgba(221,227,234,.9);
  border-radius: 16px;
  padding: 26px;
  color: var(--client-text);
  background: rgba(255,255,255,.98);
  box-shadow: 0 28px 80px rgba(5,12,24,.3);
}
.client-auth-tabs { margin-bottom: 25px; padding: 4px; border-radius: 10px; display: grid; grid-template-columns: 1fr 1fr; background: #eef2f6; }
.client-auth-tabs button { min-height: 44px; border: 0; border-radius: 7px; color: var(--client-muted); background: transparent; font-size: 12px; font-weight: 650; }
.client-auth-tabs button.active { color: #064e94; background: #fff; box-shadow: 0 2px 8px rgba(17,24,39,.08); }
.client-auth-form { display: grid; gap: 17px; }
.client-auth-form[hidden],
.client-auth-pending[hidden] { display: none !important; }
.client-auth-copy { margin-bottom: 4px; display: grid; gap: 8px; }
.client-auth-copy h2,
.client-auth-pending h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 650; }
.client-auth-copy > span,
.client-auth-pending p { margin: 0; color: var(--client-muted); font-size: 12px; line-height: 1.55; }
.client-auth-form label { display: grid; gap: 7px; color: #344054; font-size: 11px; font-weight: 650; }
.client-auth-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd7e2;
  border-radius: 9px;
  padding: 0 13px;
  color: var(--client-text);
  background: #fff;
  font-size: 14px;
}
.client-auth-form input:focus { border-color: var(--client-cobalt); }
.client-auth-submit {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--client-cobalt);
  font-size: 13px;
  font-weight: 680;
  transition: background-color .18s ease, transform .18s ease;
}
.client-auth-submit:hover { background: var(--client-cobalt-active); }
.client-auth-submit:active { transform: translateY(1px); }
.client-auth-submit:disabled { cursor: wait; opacity: .68; }
.client-auth-message { min-height: 20px; margin-top: 14px; color: var(--client-danger); font-size: 11px; line-height: 1.45; }
.client-auth-message.success { color: var(--client-success); }
.client-auth-pending { min-height: 280px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; }
.client-auth-pending > span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--client-success); font-size: 21px; }
.client-auth-pending button { min-height: 44px; margin-top: 10px; border: 1px solid var(--client-border); border-radius: 9px; padding: 0 14px; color: #344054; background: #fff; font-size: 12px; font-weight: 620; }

.client-shell { min-height: 100vh; }

.client-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 256px;
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(180deg, var(--client-sidebar), var(--client-sidebar-deep));
}

.client-brand { padding: 0 10px 28px; display: grid; gap: 10px; }
.client-brand img { width: 168px; height: auto; }
.client-brand span { color: rgba(255,255,255,.58); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

.client-nav { display: grid; gap: 7px; }
.client-nav button {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.68);
  background: transparent;
  text-align: left;
  transition: color .18s ease, background .18s ease;
}
.client-nav button:hover { color: #fff; background: rgba(255,255,255,.06); }
.client-nav button.active { color: #fff; background: var(--client-cobalt); }
.client-nav img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: .82; }

.client-sidebar-foot { margin-top: auto; padding: 20px 10px 0; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 14px; }
.client-sidebar-foot span { color: rgba(255,255,255,.48); font-size: 11px; line-height: 1.45; }
.client-sidebar-foot button { min-height: 40px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #fff; background: transparent; }
.client-sidebar-foot button:hover { background: rgba(255,255,255,.07); }

.client-workspace {
  min-height: 100vh;
  margin-left: 256px;
  padding: 0 38px 54px;
  background: var(--client-page);
}

.client-topbar {
  position: relative;
  min-height: 108px;
  padding-top: 29px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  isolation: isolate;
}
.client-topbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 190px;
  width: min(900px, calc(100vw - 520px));
  height: 104px;
  background: url("/assets/pantera-header-wave.svg") no-repeat 0 0 / 900px 104px;
  pointer-events: none;
}
.client-topbar > div:first-child { display: grid; gap: 5px; }
.client-topbar > div:first-child > span { color: var(--client-muted); font-size: 11px; font-weight: 620; letter-spacing: .07em; text-transform: uppercase; }
.client-topbar h1 { margin: 0; font-size: 28px; line-height: 1.08; font-weight: 620; }

.client-account { min-width: 260px; padding: 7px 9px 7px 14px; border: 1px solid rgba(221,227,234,.9); border-radius: 11px; display: flex; align-items: center; justify-content: flex-end; gap: 11px; background: rgba(255,255,255,.82); box-shadow: 0 7px 22px rgba(17,24,39,.05); backdrop-filter: blur(10px); }
.client-account > div { min-width: 0; display: grid; gap: 2px; text-align: right; }
.client-account strong, .client-account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-account strong { font-size: 13px; font-weight: 620; }
.client-account > div span { color: var(--client-muted); font-size: 11px; }
.client-avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--client-cobalt); font-size: 11px; font-weight: 700; }

.client-view { width: min(1180px, 100%); margin: 0 auto; }
#shipmentView { width: min(1480px, 100%); }
#detailView { width: min(1600px, 100%); }
#detailView .client-toolbar { width: min(1180px, 100%); margin-inline: auto; }
#detailView .shipment-card-hero,
#detailView .shipment-card-workspace { margin-inline: auto; }
.client-intro { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.client-intro p { max-width: 720px; margin: 0; color: var(--client-muted); font-size: 13px; line-height: 1.55; }
.client-statline { display: flex; gap: 8px; flex-wrap: wrap; }
.client-statline span { min-height: 31px; padding: 0 11px; border: 1px solid var(--client-border); border-radius: 999px; display: inline-flex; align-items: center; color: #475467; background: rgba(255,255,255,.76); font-size: 11px; }

.supplier-register { overflow: hidden; border: 1px solid var(--client-border); border-radius: 12px; background: var(--client-panel); box-shadow: var(--client-shadow); }
.supplier-register-head,
.supplier-register-row { display: grid; grid-template-columns: minmax(320px, 1.8fr) minmax(92px, .48fr) minmax(92px, .48fr) minmax(74px, .38fr) minmax(170px, .78fr) 22px; align-items: center; gap: 14px; }
.supplier-register-head { min-height: 42px; padding: 0 18px; border-bottom: 1px solid var(--client-border); color: var(--client-muted); background: #f7f9fc; font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.supplier-register-body { display: grid; }
.supplier-register-row { width: 100%; min-height: 76px; border: 0; border-bottom: 1px solid #edf0f4; padding: 11px 18px; color: inherit; background: #fff; text-align: left; transition: background-color .18s ease, box-shadow .18s ease; }
.supplier-register-row:last-child { border-bottom: 0; }
.supplier-register-row:hover { position: relative; background: #f7fbff; box-shadow: inset 3px 0 0 var(--client-cobalt); }
.supplier-register-row:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.supplier-register-name { min-width: 0; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 12px; }
.supplier-register-name > span:last-child { min-width: 0; display: grid; gap: 4px; }
.supplier-register-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.35; font-weight: 650; }
.supplier-register-name small,
.supplier-register-metric small,
.supplier-register-updated small { color: var(--client-muted); font-size: 9px; font-weight: 520; }
.supplier-mark { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #edf5ff; }
.supplier-mark img { width: 21px; height: 21px; filter: invert(24%) sepia(92%) saturate(1873%) hue-rotate(191deg) brightness(85%); }
.supplier-register-metric { display: grid; gap: 3px; }
.supplier-register-metric small,
.supplier-register-updated small { display: none; }
.supplier-register-metric strong { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.supplier-register-updated { display: grid; gap: 3px; }
.supplier-register-updated strong { font-size: 11px; line-height: 1.35; font-weight: 600; }
.supplier-arrow { color: var(--client-cobalt); font-size: 23px; line-height: 1; }

.client-toolbar { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.client-back { min-height: 42px; border: 1px solid var(--client-border); border-radius: 9px; padding: 0 13px; color: #344054; background: #fff; }
.client-search { flex: 1; min-height: 42px; border: 1px solid var(--client-border); border-radius: 9px; padding: 0 14px; color: var(--client-text); background: #fff; }
.client-search::placeholder { color: #98a2b3; }
.shipment-registry-toolbar { flex-wrap: wrap; }
.shipment-registry-toolbar .client-search { min-width: 260px; }
.shipment-status-filter { min-height: 42px; padding: 3px; border: 1px solid var(--client-border); border-radius: 10px; display: inline-grid; grid-template-columns: repeat(3, auto); gap: 2px; background: #fff; }
.shipment-status-filter button { min-height: 34px; border: 0; border-radius: 7px; padding: 0 12px; color: var(--client-muted); background: transparent; font-size: 11px; font-weight: 620; transition: color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.shipment-status-filter button:hover { color: var(--client-text); background: #f3f6fa; }
.shipment-status-filter button.active { color: #064e94; background: #eaf4ff; box-shadow: inset 0 0 0 1px rgba(0,87,184,.08); }
.shipment-sort { position: relative; min-width: 178px; min-height: 42px; display: grid; align-items: center; }
.shipment-sort > span { position: absolute; z-index: 1; top: 5px; left: 12px; color: var(--client-muted); font-size: 8px; font-weight: 620; letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }
.shipment-sort select { width: 100%; min-height: 42px; border: 1px solid var(--client-border); border-radius: 9px; padding: 14px 30px 2px 11px; color: var(--client-text); background: #fff; font-size: 10px; font-weight: 620; }

.shipment-list { display: grid; gap: 11px; }
.client-shipment-card { width: 100%; min-height: 136px; border: 1px solid var(--client-border); border-radius: 12px; padding: 16px 18px; display: grid; grid-template-columns: minmax(130px,.55fr) minmax(230px,1.05fr) minmax(260px,1.22fr) minmax(190px,.82fr) 22px; align-items: center; gap: 18px; color: inherit; background: #fff; box-shadow: 0 7px 22px rgba(17,24,39,.05); text-align: left; transition: border-color .18s ease, box-shadow .18s ease; }
.client-shipment-card:hover { border-color: rgba(0,87,184,.3); box-shadow: var(--client-shadow); }
.shipment-identity { display: grid; gap: 7px; }
.shipment-identity > span { color: var(--client-muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.shipment-identity strong { font-size: 24px; line-height: 1; font-weight: 670; }
.shipment-state { width: fit-content; min-height: 25px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; color: #075aa9; background: #eaf4ff; font-size: 10px; font-weight: 650; }
.shipment-state.success { color: #15703a; background: #eaf8ef; }
.shipment-state.danger { color: var(--client-danger); background: #fff0f0; }
.shipment-ktk { min-width: 0; display: grid; gap: 9px; }
.shipment-ktk > span { color: var(--client-muted); font-size: 10px; }
.ktk-list { display: flex; flex-wrap: wrap; gap: 7px; }
.ktk-chip { min-width: 0; padding: 7px 9px; border: 1px solid #e3e8ef; border-radius: 8px; display: grid; gap: 2px; background: #f9fafb; }
.ktk-chip strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 650; }
.ktk-chip span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--client-muted); font-size: 9px; }
.shipment-journeys { min-width: 0; display: grid; gap: 12px; }
.shipment-journey { min-width: 0; display: grid; gap: 7px; }
.shipment-journey-head { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.shipment-journey-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 670; }
.shipment-journey-head small { flex: 0 0 auto; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #526174; font-size: 9px; font-weight: 600; }
.shipment-journey-track { position: relative; height: 12px; display: flex; align-items: center; justify-content: space-between; }
.shipment-journey-track::before { content: ""; position: absolute; z-index: 0; left: 5px; right: 5px; top: 50%; height: 2px; border-radius: 999px; background: linear-gradient(90deg, var(--client-cobalt) 0 var(--journey-progress), #dce3ec var(--journey-progress) 100%); transform: translateY(-50%); }
.shipment-journey-track i { position: relative; z-index: 1; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #cbd4df; box-shadow: 0 0 0 1px #cbd4df; }
.shipment-journey-track i.done { background: var(--client-cobalt); box-shadow: 0 0 0 1px var(--client-cobalt); }
.shipment-journey-track i.current { width: 10px; height: 10px; background: #fff; box-shadow: 0 0 0 3px rgba(0,87,184,.16), 0 0 0 1px var(--client-cobalt); }
.shipment-journey-empty { color: var(--client-muted); font-size: 10px; line-height: 1.45; }
.shipment-payment { min-width: 0; padding-left: 16px; border-left: 1px solid #e8edf3; display: grid; gap: 12px; }
.shipment-payment-item { min-width: 0; display: grid; gap: 3px; }
.shipment-payment-item small { color: var(--client-muted); font-size: 9px; line-height: 1.35; }
.shipment-payment-item strong { overflow-wrap: anywhere; color: var(--client-text); font-size: 12px; line-height: 1.35; font-weight: 670; font-variant-numeric: tabular-nums; }
.shipment-payment-item.paid strong { color: var(--client-success); }
.shipment-payment-item.due strong { color: var(--client-warning); }
.shipment-open { color: var(--client-cobalt); font-size: 24px; }

.client-empty { min-height: 250px; border: 1px dashed #cfd7e2; border-radius: 13px; padding: 30px; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--client-muted); background: rgba(255,255,255,.55); text-align: center; }
.client-empty strong { color: var(--client-text); font-size: 15px; }

.shipment-detail-head { margin-bottom: 14px; border: 1px solid var(--client-border); border-radius: 13px; padding: 19px 20px; display: grid; grid-template-columns: minmax(180px,.75fr) minmax(260px,1.5fr) minmax(180px,.75fr); gap: 18px; background: #fff; box-shadow: var(--client-shadow); }
.detail-number { display: grid; align-content: start; gap: 7px; }
.detail-number span, .detail-fact span { color: var(--client-muted); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.detail-number strong { font-size: 32px; line-height: 1; font-weight: 680; }
.detail-cargo { min-width: 0; padding: 0 20px; border-inline: 1px solid #edf0f4; display: grid; align-content: start; gap: 7px; }
.detail-cargo span { color: var(--client-muted); font-size: 10px; text-transform: uppercase; }
.detail-cargo strong { font-size: 15px; line-height: 1.45; font-weight: 620; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-fact { display: grid; align-content: start; gap: 4px; }
.detail-fact strong { font-size: 12px; line-height: 1.35; font-weight: 620; }

.container-switcher { margin-bottom: 12px; display: flex; gap: 8px; overflow-x: auto; padding: 1px 1px 5px; scrollbar-width: thin; }
.container-switcher button { flex: 0 0 auto; min-height: 44px; border: 1px solid var(--client-border); border-radius: 9px; padding: 7px 12px; display: grid; gap: 2px; color: var(--client-text); background: #fff; text-align: left; }
.container-switcher button.active { border-color: var(--client-cobalt); color: #fff; background: var(--client-cobalt); }
.container-switcher strong { font-size: 11px; }
.container-switcher span { color: var(--client-muted); font-size: 9px; }
.container-switcher button.active span { color: rgba(255,255,255,.72); }

.detail-tabs { margin-bottom: 12px; border-bottom: 1px solid var(--client-border); display: flex; gap: 20px; }
.detail-tabs button { min-height: 44px; border: 0; border-bottom: 2px solid transparent; padding: 0 2px; color: var(--client-muted); background: transparent; font-size: 12px; font-weight: 620; }
.detail-tabs button.active { border-bottom-color: var(--client-cobalt); color: var(--client-cobalt); }

.detail-panel-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.client-panel { border: 1px solid var(--client-border); border-radius: 12px; padding: 18px; background: #fff; box-shadow: 0 7px 22px rgba(17,24,39,.045); }
.client-panel h2 { margin: 0 0 16px; font-size: 15px; font-weight: 650; }
.fact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; }
.fact-grid div { min-width: 0; min-height: 63px; padding: 10px 12px; border-bottom: 1px solid #edf0f4; display: grid; align-content: center; gap: 4px; }
.fact-grid span { color: var(--client-muted); font-size: 10px; }
.fact-grid strong { overflow-wrap: anywhere; font-size: 12px; font-weight: 620; }
.route-summary { display: grid; gap: 14px; }
.route-point { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.route-point i { width: 24px; height: 24px; border: 6px solid #dcecff; border-radius: 50%; background: var(--client-cobalt); }
.route-point div { display: grid; gap: 3px; }
.route-point span { color: var(--client-muted); font-size: 10px; }
.route-point strong { font-size: 12px; font-weight: 620; }

.stage-list { display: grid; }
.stage-row { position: relative; min-height: 72px; padding: 9px 10px 9px 50px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; }
.stage-row::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: #dde3ea; }
.stage-row:first-child::before { top: 50%; }
.stage-row:last-child::before { bottom: 50%; }
.stage-dot { position: absolute; z-index: 1; left: 13px; top: 50%; width: 18px; height: 18px; border: 4px solid #fff; border-radius: 50%; background: #c7d0dc; box-shadow: 0 0 0 1px #d5dce5; transform: translateY(-50%); }
.stage-row.done::before, .stage-row.current::before { background: var(--client-cobalt); }
.stage-row.done .stage-dot, .stage-row.current .stage-dot { background: var(--client-cobalt); box-shadow: 0 0 0 1px var(--client-cobalt); }
.stage-row.current { border-radius: 9px; background: #f4f9ff; }
.stage-copy { display: grid; gap: 4px; }
.stage-copy strong { font-size: 13px; font-weight: 630; }
.stage-copy span, .stage-dates span { color: var(--client-muted); font-size: 10px; }
.stage-dates { display: grid; gap: 3px; text-align: right; }

.invoice-list { display: grid; gap: 10px; }
.invoice-row { border: 1px solid var(--client-border); border-radius: 10px; padding: 14px; display: grid; grid-template-columns: minmax(180px,1.25fr) minmax(150px,.75fr) minmax(140px,.65fr) auto; align-items: center; gap: 14px; background: #fff; }
.invoice-row.paid { border-color: rgba(22,128,60,.27); background: #fbfefc; }
.invoice-row.partial { border-color: rgba(184,107,0,.25); background: #fffdf8; }
.invoice-row.overdue { border-color: rgba(197,43,43,.22); background: #fffafa; }
.invoice-copy { min-width: 0; display: grid; gap: 4px; }
.invoice-copy strong { font-size: 13px; font-weight: 640; }
.invoice-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--client-muted); font-size: 10px; }
.invoice-money { display: grid; gap: 3px; }
.invoice-money strong { font-size: 13px; font-weight: 650; }
.invoice-money span { color: var(--client-muted); font-size: 10px; }
.payment-badge { width: fit-content; min-height: 28px; border-radius: 999px; padding: 0 10px; display: inline-flex; align-items: center; color: #475467; background: #eef2f6; font-size: 10px; font-weight: 650; }
.invoice-row.paid .payment-badge { color: var(--client-success); background: #eaf7ef; }
.invoice-row.partial .payment-badge { color: var(--client-warning); background: #fff3dc; }
.invoice-row.overdue .payment-badge { color: var(--client-danger); background: #feecec; }
.invoice-file { min-height: 38px; border: 1px solid var(--client-border); border-radius: 8px; padding: 0 12px; display: inline-flex; align-items: center; color: var(--client-cobalt); background: #fff; text-decoration: none; font-size: 11px; font-weight: 620; }
.invoice-file.disabled { color: #98a2b3; background: #f8fafc; pointer-events: none; }

.client-visible-ledger { overflow: hidden; }
.client-visible-ledger > .shipment-section-head { padding: 24px 26px; border-bottom: 1px solid var(--client-border); }
.client-visible-ledger .invoice-list { padding: 18px 22px 24px; }

.client-finance-summary {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  background: #f7f9fc;
}
.client-finance-summary article {
  min-height: 100px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 7px;
  background: #fff;
}
.client-finance-summary span { color: var(--client-muted); font-size: 11px; font-weight: 600; }
.client-finance-summary strong { color: var(--client-text); font-size: 20px; line-height: 1.25; font-weight: 680; }

.client-finance-register { margin: 0 22px 24px; overflow-x: auto; border: 1px solid var(--client-border); border-radius: 11px; background: #fff; }
.client-finance-register > header,
.client-finance-register > div {
  min-width: 780px;
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) 80px repeat(3, minmax(145px, .8fr));
  align-items: center;
  gap: 14px;
}
.client-finance-register > header { min-height: 42px; padding: 0 16px; color: var(--client-muted); background: #f7f9fc; font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.client-finance-register > div { min-height: 64px; padding: 10px 16px; border-top: 1px solid #edf0f4; font-size: 12px; font-variant-numeric: tabular-nums; }
.client-finance-register strong { font-weight: 650; }
.client-finance-register .paid { color: var(--client-success); font-weight: 630; }
.client-finance-register .due { color: var(--client-warning); font-weight: 630; }

.client-mobile-nav { display: none; }

@media (max-width: 1120px) {
  .supplier-register-head,
  .supplier-register-row { grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(64px, .4fr)) minmax(140px, .72fr) 20px; gap: 10px; }
  .client-shipment-card { grid-template-columns: minmax(130px,.55fr) minmax(210px,1fr) minmax(230px,1.1fr) minmax(170px,.78fr) 20px; gap: 12px; }
  .shipment-detail-head { grid-template-columns: minmax(160px,.65fr) minmax(220px,1.2fr); }
  .detail-facts { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid #edf0f4; grid-template-columns: repeat(4,1fr); }
  .detail-cargo { border-right: 0; }
}

@media (max-width: 900px) {
  .client-auth { padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); grid-template-columns: 1fr; align-content: center; gap: 34px; }
  .client-auth-brand { max-width: 560px; gap: 28px; }
  .client-auth-brand img { width: 184px; }
  .client-auth-brand h1 { font-size: clamp(28px, 7vw, 40px); }
  .client-auth-brand span { font-size: 13px; }
  .client-auth-card { max-width: 520px; justify-self: center; }
  .client-sidebar { display: none; }
  .client-workspace { margin-left: 0; padding: 0 16px calc(92px + env(safe-area-inset-bottom)); }
  .client-topbar { min-height: 112px; padding-top: max(20px, env(safe-area-inset-top)); align-items: flex-start; }
  .client-topbar::before { left: 80px; width: calc(100% - 80px); opacity: .68; background-position: 0 0; background-size: 690px 80px; }
  .client-topbar h1 { font-size: 23px; }
  .client-account { min-width: 0; padding: 5px; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; }
  .client-account > div { display: none; }
  .client-intro { align-items: flex-start; flex-direction: column; }
  .client-shipment-card { grid-template-columns: 1fr 22px; padding: 15px; }
  .shipment-ktk, .shipment-journeys, .shipment-payment { grid-column: 1 / -1; }
  .shipment-ktk { padding-top: 12px; border-top: 1px solid #edf0f4; }
  .shipment-payment { padding: 12px 0 0; border-left: 0; border-top: 1px solid #edf0f4; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .shipment-open { grid-column: 2; grid-row: 1; }
  .shipment-detail-head { grid-template-columns: 1fr; padding: 16px; }
  .detail-cargo { padding: 14px 0 0; border: 0; border-top: 1px solid #edf0f4; }
  .detail-facts { grid-template-columns: repeat(2,1fr); }
  .detail-panel-grid { grid-template-columns: 1fr; }
  .invoice-row { grid-template-columns: 1fr 1fr; }
  .invoice-copy { grid-column: 1 / -1; }
  .invoice-file { justify-content: center; }
  .client-finance-summary { grid-template-columns: 1fr; }
  .client-mobile-nav { position: fixed; z-index: 12; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); min-height: 62px; border: 1px solid rgba(221,227,234,.92); border-radius: 16px; padding: 6px; display: grid; grid-template-columns: repeat(3,1fr); background: rgba(255,255,255,.94); box-shadow: 0 16px 42px rgba(17,24,39,.18); backdrop-filter: blur(14px); }
  .client-mobile-nav button { min-height: 50px; border: 0; border-radius: 11px; display: grid; place-content: center; justify-items: center; gap: 3px; color: var(--client-muted); background: transparent; font-size: 9px; }
  .client-mobile-nav button.active { color: var(--client-cobalt); background: #edf5ff; }
  .client-mobile-nav img { width: 19px; height: 19px; opacity: .75; }
}

@media (max-width: 700px) {
  .shipment-registry-toolbar .client-search { order: 2; flex-basis: 100%; }
  .shipment-status-filter { order: 3; flex: 1; }
  .shipment-status-filter button { padding-inline: 8px; }
  .shipment-sort { order: 4; flex: 1; }
  .shipment-registry-toolbar .client-back { order: 1; }
  .supplier-register-head { display: none; }
  .supplier-register-row { min-height: 118px; padding: 14px; grid-template-columns: repeat(3, minmax(0,1fr)) 20px; gap: 12px 8px; }
  .supplier-register-name { grid-column: 1 / 4; }
  .supplier-register-name strong { white-space: normal; overflow-wrap: anywhere; }
  .supplier-register-metric { padding-top: 10px; border-top: 1px solid #edf0f4; }
  .supplier-register-metric small,
  .supplier-register-updated small { display: block; }
  .supplier-register-updated { grid-column: 1 / 4; }
  .supplier-register-updated strong { color: var(--client-muted); font-size: 10px; }
  .supplier-arrow { grid-column: 4; grid-row: 1; align-self: center; }
}

@media (max-width: 480px) {
  .client-auth { padding-inline: 14px; }
  .client-auth-brand { gap: 20px; }
  .client-auth-brand > div { gap: 9px; }
  .client-auth-brand h1 { font-size: 29px; }
  .client-auth-brand span { display: none; }
  .client-auth-card { border-radius: 13px; padding: 18px; }
  .client-auth-tabs { margin-bottom: 20px; }
  .client-auth-copy h2 { font-size: 20px; }
  .client-auth-form input { font-size: 16px; }
  .client-workspace { padding-inline: 12px; }
  .client-toolbar { align-items: stretch; flex-direction: column; }
  .client-back, .client-search { width: 100%; min-height: 44px; }
  .shipment-status-filter, .shipment-sort { width: 100%; min-height: 44px; }
  .shipment-status-filter button, .shipment-sort select { min-height: 38px; }
  .shipment-payment { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr; }
  .stage-row { padding-left: 44px; grid-template-columns: 1fr; gap: 4px; }
  .stage-dates { text-align: left; }
  .invoice-row { grid-template-columns: 1fr; }
  .invoice-copy, .invoice-file { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
