:root {
  --navy: #12324f;
  --navy-2: #0d253c;
  --blue: #1f5f8f;
  --orange: #f0832d;
  --orange-2: #d96d1e;
  --ink: #1f2933;
  --muted: #64748b;
  --line: #dbe3ec;
  --soft: #f5f8fb;
  --white: #fff;
  --green: #15803d;
  --red: #b42318;
  --shadow: 0 16px 45px rgba(18, 50, 79, .10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #f7fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  margin-bottom: 18px;
}

h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475569;
  background: #f8fafc;
  font-weight: 800;
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  color: #fff;
  background: rgba(13, 37, 60, .96);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: var(--orange);
  font-weight: 900;
}

.brand-logo {
  width: 54px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center;
  background: #fff;
}

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

.brand small {
  color: #cbd5e1;
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 14px;
}

.nav a:hover {
  background: rgba(255, 255, 255, .1);
}

.flash-wrap {
  position: fixed;
  top: 82px;
  right: 16px;
  z-index: 40;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
}

.flash {
  padding: 12px 14px;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.flash.error {
  background: var(--red);
}

.flash.success {
  background: var(--green);
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--navy-2);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
}

.brand-hero img {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 37, 60, .94) 0%, rgba(13, 37, 60, .72) 38%, rgba(13, 37, 60, .18) 100%);
}

.brand-hero::after {
  background:
    linear-gradient(90deg, rgba(13, 37, 60, .08) 0%, rgba(13, 37, 60, .18) 46%, rgba(13, 37, 60, .58) 100%),
    linear-gradient(0deg, rgba(13, 37, 60, .18), rgba(13, 37, 60, 0) 42%);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  margin-left: clamp(16px, 6vw, 78px);
  padding: 64px 0 96px;
}

.brand-hero .hero-overlay {
  width: min(500px, calc(100% - 32px));
  margin-left: auto;
  margin-right: clamp(16px, 5vw, 72px);
  padding-top: 120px;
  text-shadow: 0 2px 14px rgba(13, 37, 60, .48);
}

.brand-hero h1 {
  font-size: clamp(30px, 4vw, 52px);
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 28px;
  color: #dbeafe;
  font-size: 19px;
}

.hero-actions,
.button-row,
.data-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  transition: transform .15s ease, background .15s ease, border .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  color: #fff;
  background: var(--orange);
}

.btn.primary:hover {
  background: var(--orange-2);
}

.btn.secondary {
  color: var(--navy);
  border-color: var(--line);
  background: #fff;
}

.btn.light {
  color: var(--navy);
  background: #fff;
}

.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .1);
}

.btn.done {
  width: 100%;
  color: var(--green);
  border-color: #bbf7d0;
  background: #f0fdf4;
  cursor: default;
}

.btn.full,
.full {
  width: 100%;
}

.band,
.section,
.workspace {
  padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px);
}

.band {
  background: #fff;
}

.band.compact {
  padding-top: 22px;
  padding-bottom: 22px;
}

.section,
.workspace {
  width: min(1220px, 100%);
  margin: 0 auto;
}

.section.narrow {
  width: min(880px, 100%);
}

.metric-strip,
.advantage-grid,
.stats-grid,
.goods-grid,
.worklist-grid {
  display: grid;
  gap: 14px;
}

.metric-strip {
  width: min(1220px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-strip div,
.advantage-grid div,
.stats-grid div,
.panel,
.goods-card,
.notice-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.metric-strip div,
.advantage-grid div,
.stats-grid div {
  padding: 18px;
}

.metric-strip strong,
.stats-grid strong {
  display: block;
  color: var(--navy);
  font-size: 24px;
}

.metric-strip span,
.advantage-grid span,
.stats-grid span,
.muted {
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 22px;
  align-items: start;
}

.panel {
  padding: 22px;
}

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

.compact-form {
  padding: 12px 0;
}

.span-2 {
  grid-column: span 2;
}

.choice-field {
  min-width: 0;
  padding: 0;
  border: 0;
}

.choice-field legend,
.filter-line span {
  margin-bottom: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.choice-row,
.filter-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.choice-row label,
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-line input {
  width: auto;
  min-height: 0;
}

.choice-row input {
  margin: 0;
}

.choice-row label:has(input:checked),
.filter-pill.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.filter-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.filter-pill {
  text-decoration: none;
}

.track-mini,
.track-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.process {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.process div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-left: 4px solid var(--orange);
  background: #fff;
}

.process strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
}

.section-head,
.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 22px;
}

.section-head.tight {
  align-items: center;
  margin-bottom: 16px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0;
}

.goods-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.goods-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.goods-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
  background: #e2e8f0;
}

.card-top,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-top span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: #e8f2fb;
  font-size: 12px;
  font-weight: 800;
}

.card-top strong {
  color: var(--orange);
  font-size: 20px;
}

.tags,
.stock-line {
  color: var(--muted);
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list span {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

.promo-tags span {
  color: #8a4b05;
  background: #fff3d6;
}

.stock-line {
  font-weight: 800;
}

.card-foot,
.mini-detail {
  color: var(--muted);
  font-size: 13px;
}

.mini-detail {
  display: grid;
  gap: 5px;
  margin: 0;
}

.mini-detail div,
.detail-grid div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
}

.mini-detail dt,
.detail-grid dt {
  color: #475569;
  font-weight: 800;
}

.mini-detail dd,
.detail-grid dd {
  margin: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.dashboard-grid > div {
  min-width: 0;
}

.compact-dashboard {
  margin-top: 18px;
}

.compact-table table {
  font-size: 13px;
}

.thumb-image {
  width: 86px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #e2e8f0;
}

.image-manage-box {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.image-review-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-review-item {
  display: grid;
  grid-template-columns: 86px minmax(120px, 1fr);
  gap: 10px;
  max-width: 320px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.image-review-item div {
  display: grid;
  gap: 3px;
}

.image-review-item span,
.image-review-item small,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.image-review-form {
  margin-bottom: 8px;
}

.log-detail {
  display: grid;
  gap: 6px;
  min-width: 320px;
}

.log-detail pre {
  max-width: 620px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.contact-box {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--navy);
  font-weight: 900;
}

.advantage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 142px);
  padding: 40px 16px;
  background:
    linear-gradient(135deg, rgba(18, 50, 79, .94), rgba(31, 95, 143, .88)),
    url("haitao-banner.jpg") center/cover;
}

.login-box {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-box h1 {
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 30px;
}

.workspace {
  display: grid;
  gap: 20px;
}

.workspace-head h1 {
  font-size: 34px;
}

.customer-panel {
  display: grid;
  grid-template-columns: minmax(260px, .42fr) minmax(0, .58fr);
  gap: 16px;
  align-items: stretch;
}

.customer-id-card {
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: var(--shadow);
}

.customer-id-card .eyebrow {
  color: #ffd8a8;
}

.customer-id-card h2 {
  margin-bottom: 14px;
  color: #fff;
  font-size: 30px;
}

.customer-meta {
  display: grid;
  gap: 6px;
  color: #dbeafe;
  font-size: 14px;
}

.customer-cargo {
  display: grid;
  gap: 12px;
}

.cargo-list {
  display: grid;
  gap: 10px;
}

.cargo-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .9fr) minmax(150px, .7fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.cargo-row div {
  display: grid;
  gap: 3px;
}

.cargo-row span,
.cargo-row small {
  color: var(--muted);
  font-size: 13px;
}

.cargo-row strong {
  color: var(--navy);
}

.cargo-status {
  justify-self: start;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
}

.cargo-status.pending {
  color: #92400e;
  background: #fef3c7;
}

.cargo-status.active {
  color: #1d4ed8;
  background: #dbeafe;
}

.cargo-status.done {
  color: var(--green);
  background: #dcfce7;
}

.cargo-status.danger {
  color: var(--red);
  background: #fee2e2;
}

.layout-main {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stats-grid div {
  min-height: 92px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tabs button {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.tabs button.active {
  color: #fff;
  background: var(--navy);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 16px;
}

.inline {
  display: inline;
}

.inline-form,
.utility-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form input,
.inline-form select {
  width: auto;
  min-width: 180px;
}

.link-btn {
  display: inline-flex;
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.link-btn.danger {
  color: var(--red);
}

.edit-row {
  background: #fbfdff;
}

.hidden,
.visually-hidden,
.lead-hp {
  display: none !important;
}

.import-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.result-list,
.notice-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.shipment-result {
  display: grid;
  gap: 14px;
}

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

.public-note {
  margin: 0;
  padding: 12px;
  border-left: 4px solid var(--orange);
  background: #fff7ed;
}

.audit-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--red);
  border-radius: 6px;
  color: #7f1d1d;
  background: #fef2f2;
  font-size: 14px;
  font-weight: 700;
}

.notice-item {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.notice-item textarea {
  min-height: 88px;
  background: #f8fafc;
}

.notify-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.data-actions {
  margin-bottom: 22px;
}

.interest-list {
  margin-top: 20px;
}

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

.print-page {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 30px 16px;
}

.print-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

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

.ship-label {
  min-height: 178px;
  padding: 18px;
  border: 2px solid #111827;
  background: #fff;
}

.ship-label h2 {
  font-size: 28px;
}

.load-section {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 16px;
  color: #cbd5e1;
  background: var(--navy-2);
}

@media (max-width: 980px) {
  .metric-strip,
  .advantage-grid,
  .stats-grid,
  .goods-grid,
  .two-col,
  .layout-main,
  .worklist-grid,
  .dashboard-grid,
  .customer-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 560px;
  }
}

@media (max-width: 720px) {
  .site-header,
  .section-head,
  .workspace-head,
  .print-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero-overlay {
    margin: 0;
    width: 100%;
    padding: 54px 16px 76px;
  }

  .hero::after {
    background: rgba(13, 37, 60, .78);
  }

  .metric-strip,
  .advantage-grid,
  .stats-grid,
  .goods-grid,
  .two-col,
  .layout-main,
  .worklist-grid,
  .dashboard-grid,
  .customer-panel,
  .cargo-row,
  .detail-grid,
  .form-grid,
  .label-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .track-mini,
  .track-form,
  .inline-form,
  .utility-row {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-form input,
  .inline-form select {
    width: 100%;
  }

  .mini-detail div,
  .detail-grid div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .panel {
    padding: 16px;
  }
}

@media print {
  .site-header,
  .footer,
  .print-toolbar,
  .flash-wrap {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .print-page {
    padding: 0;
  }

  .ship-label,
  .load-section {
    break-inside: avoid;
    box-shadow: none;
  }
}
