:root {
  --ink: #17202a;
  --muted: #65707d;
  --line: #dce4ea;
  --paper: #ffffff;
  --soft: #f6f7f9;
  --teal: #d71920;
  --teal-dark: #ae1118;
  --amber: #f0a21a;
  --coral: #d85f49;
  --green: #2f8c55;
  --shadow: 0 16px 40px rgba(23, 32, 42, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button {
  cursor: pointer;
}

.page-pad {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: min(780px, 88vh);
  overflow: hidden;
  color: #fff;
  background: #162125;
}

.hero-carousel,
.hero-slide,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity 700ms ease, transform 700ms ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 14, 18, 0.72) 0%, rgba(8, 14, 18, 0.52) 46%, rgba(8, 14, 18, 0.16) 82%),
    linear-gradient(180deg, rgba(5, 10, 12, 0.2) 0%, rgba(5, 10, 12, 0.1) 42%, rgba(5, 10, 12, 0.72) 100%);
  pointer-events: none;
}

.front-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 13px 16px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(10, 20, 28, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand > span:last-child {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark.has-logo {
  background: transparent;
  color: inherit;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.brand strong {
  font-size: 20px;
  line-height: 1.15;
}

.brand small {
  max-width: 210px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: #27323d;
  font-size: 15px;
  font-weight: 800;
}

.front-nav a:hover {
  color: var(--teal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #27323d;
  font-weight: 800;
  white-space: nowrap;
}

.language-select {
  width: auto;
  min-width: 118px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 52px;
  align-items: center;
  min-height: calc(min(780px, 88vh) - 100px);
  padding: 48px 0 88px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 650px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.banner-caption {
  display: grid;
  gap: 4px;
  max-width: 520px;
  margin-top: 28px;
  padding-left: 16px;
  border-left: 4px solid var(--amber);
}

.banner-caption strong {
  font-size: 18px;
}

.banner-caption span {
  color: rgba(255, 255, 255, 0.8);
}

html:not([lang^="zh"]) .hero-copy {
  max-width: 760px;
}

html:not([lang^="zh"]) .hero-copy h1 {
  max-width: 720px;
  font-size: 58px;
  line-height: 1.08;
  text-wrap: balance;
}

html.hero-copy-long:not([lang^="zh"]) .hero-copy h1 {
  max-width: 760px;
  font-size: 50px;
}

html.hero-copy-very-long:not([lang^="zh"]) .hero-copy h1 {
  max-width: 780px;
  font-size: 42px;
  line-height: 1.12;
}

html:not([lang^="zh"]) .hero-subtitle {
  max-width: 700px;
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.55;
}

html:not([lang^="zh"]) .hero-copy .eyebrow {
  max-width: 740px;
  line-height: 1.45;
}

html:not([lang^="zh"]) .banner-caption {
  max-width: 640px;
  margin-top: 24px;
}

.track-panel {
  align-self: center;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.panel-kicker {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 22px;
}

.panel-heading svg {
  color: var(--teal);
}

.track-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(2, 124, 118, 0.13);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

button:hover {
  background: var(--teal-dark);
}

.muted {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.track-result {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.shipment-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.shipment-summary h3,
.shipment-summary p {
  margin: 4px 0 0;
}

.shipment-summary time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.shipment-parties {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.shipment-party {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 247, 249, 0.9);
}

.shipment-party.receiver {
  background: #fff;
}

.party-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 14px;
  font-weight: 900;
}

.shipment-party.receiver .party-badge {
  background: var(--green);
}

.party-copy {
  min-width: 0;
}

.party-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}

.party-title span,
.party-copy p span {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.party-title strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.party-copy p {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  margin: 5px 0 0;
  font-size: 12px;
}

.party-copy p b {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding-bottom: 14px;
}

.timeline article > span {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--line);
}

.timeline article.current > span {
  background: var(--amber);
}

.timeline strong,
.timeline p,
.timeline small {
  display: block;
  margin: 0;
}

.timeline p {
  color: var(--ink);
}

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

.error-text {
  color: var(--coral);
  font-weight: 800;
}

.carousel-button {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.carousel-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.carousel-prev {
  left: 24px;
}

.carousel-next {
  right: 24px;
}

.carousel-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.carousel-dots button {
  width: 28px;
  min-height: 4px;
  height: 4px;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
}

.carousel-dots button.active {
  background: var(--amber);
}

.quick-actions {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: -42px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.quick-card {
  display: grid;
  min-height: 136px;
  align-content: center;
  gap: 6px;
  padding: 22px 24px;
  border-right: 1px solid var(--line);
}

.quick-card:last-child {
  border-right: 0;
}

.quick-card svg {
  color: var(--teal);
}

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

.quick-card small {
  color: var(--muted);
}

.quick-card:hover {
  background: #fff6f6;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
  position: relative;
  z-index: 4;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.stat-item {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.stat-item:last-child {
  border-right: 0;
}

.stat-item strong {
  display: block;
  color: var(--teal);
  font-size: 30px;
  line-height: 1;
}

.stat-item span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section-grid,
.content-section,
.contact-band {
  padding: 84px 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 70px;
  align-items: start;
}

.section-grid h2,
.section-title h2,
.contact-band h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.section-text {
  margin: 0;
  color: #3a4651;
  font-size: 18px;
}

.alt-section {
  width: 100%;
  max-width: none;
  background: var(--soft);
}

.alt-section > * {
  width: min(1180px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  margin-bottom: 26px;
}

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

.info-card {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.icon-chip {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: var(--teal);
  background: rgba(2, 124, 118, 0.1);
}

.info-card h3,
.feature-item h3,
.process-item h3 {
  margin: 18px 0 8px;
  font-size: 20px;
}

.info-card p,
.feature-item p,
.process-item p,
.contact-band p {
  margin: 0;
  color: var(--muted);
}

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

.feature-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-item > svg {
  margin-top: 4px;
  color: var(--green);
}

.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.process-item {
  padding: 22px;
  border-top: 3px solid var(--amber);
  background: var(--soft);
}

.process-item span {
  color: var(--teal);
  font-size: 28px;
  font-weight: 900;
}

.contact-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list p {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.contact-list svg {
  color: var(--teal);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

[dir="rtl"] .front-header,
[dir="rtl"] .hero-content,
[dir="rtl"] .section-grid,
[dir="rtl"] .contact-band,
[dir="rtl"] .site-footer {
  direction: rtl;
}

[dir="rtl"] .track-result,
[dir="rtl"] .timeline,
[dir="rtl"] .contact-list {
  text-align: right;
}

[dir="rtl"] .banner-caption {
  padding-right: 16px;
  padding-left: 0;
  border-right: 4px solid var(--amber);
  border-left: 0;
}

.admin-body {
  background: #eef4f3;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.login-box label,
.editor-form label,
.content-editor label {
  display: grid;
  gap: 7px;
  color: #33414d;
  font-weight: 800;
}

.login-box button,
.editor-form button {
  width: 100%;
  margin-top: 16px;
}

.admin-brand {
  margin-bottom: 24px;
}

.admin-sidebar .admin-brand {
  flex: 0 0 auto;
  margin: 0;
}

.admin-brand small {
  color: var(--muted);
}

.admin-shell {
  display: block;
  min-height: 100vh;
  padding-top: 90px;
}

.admin-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 78px;
  padding: 12px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 26px rgba(23, 32, 42, 0.08);
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: visible;
}

.admin-sidebar > .admin-actions {
  margin-left: auto;
}

.admin-tabs button,
.ghost-button,
.danger-button {
  justify-content: flex-start;
  color: var(--ink);
  background: transparent;
}

.admin-tabs button {
  flex: 0 0 auto;
  width: auto;
}

.nav-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.nav-dropdown::after {
  position: absolute;
  right: 0;
  bottom: -12px;
  left: 0;
  height: 12px;
  content: "";
}

.nav-dropdown > button {
  width: auto;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 40;
  display: grid;
  min-width: 182px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(23, 32, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu,
.nav-dropdown.open .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-tabs .nav-dropdown.open > .nav-submenu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.nav-submenu button {
  min-height: 48px;
  justify-content: flex-start;
  border-radius: 0;
  padding: 0 26px;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 500;
}

.nav-submenu button:hover,
.nav-submenu button.submenu-active {
  color: var(--teal);
  background: #f5f8ff;
}

.admin-tabs .nav-submenu button.active {
  color: var(--ink);
  background: transparent;
}

.admin-tabs button.active,
.admin-tabs button:hover,
.ghost-button:hover {
  background: rgba(2, 124, 118, 0.1);
  color: var(--teal);
}

.admin-main {
  min-width: 0;
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 20px 30px 30px;
}

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

.save-status {
  max-width: 260px;
  overflow: hidden;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-actions .ghost-button {
  min-height: 36px;
  width: auto;
  margin: 0;
  padding: 0 10px;
  font-size: 14px;
}

.save-status.ok {
  color: var(--green);
}

.save-status.bad {
  color: var(--coral);
}

.admin-panel {
  display: none;
}

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

.content-editor {
  display: grid;
  gap: 18px;
}

.content-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.content-main,
.content-side {
  display: grid;
  gap: 18px;
}

.settings-layout {
  width: min(720px, 100%);
}

.settings-layout.backup-panel {
  width: min(1060px, 100%);
}

.auth-setup {
  display: grid;
  gap: 14px;
}

.totp-code-input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.totp-secret,
.auth-setup textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  letter-spacing: 0;
}

.reset-auth-button {
  width: auto;
  justify-self: start;
}

#tab-settings [data-settings-group] {
  display: none;
}

#tab-settings[data-active-settings-group="account"] [data-settings-group="account"],
#tab-settings[data-active-settings-group="title"] [data-settings-group="title"],
#tab-settings[data-active-settings-group="backup"] [data-settings-group="backup"] {
  display: grid;
}

.logo-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.logo-preview {
  display: grid;
  place-items: center;
  min-width: 82px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.logo-preview img {
  max-width: 42px;
  max-height: 42px;
  object-fit: contain;
}

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

.backup-fold {
  display: block;
}

.backup-fold summary {
  cursor: pointer;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
}

.backup-fold[open] summary {
  margin-bottom: 12px;
}

.backup-fold[open] .backup-list {
  max-height: min(520px, 56vh);
  overflow: auto;
  padding-right: 6px;
}

.backup-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.backup-main,
.backup-meta,
.backup-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.backup-main {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.backup-main strong {
  font-size: 18px;
}

.backup-main span {
  color: var(--teal);
  font-weight: 900;
}

.backup-main small,
.backup-meta {
  color: var(--muted);
  font-weight: 800;
}

.backup-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft);
  white-space: nowrap;
}

.backup-actions {
  justify-content: flex-end;
}

.content-side {
  position: sticky;
  top: 24px;
}

.content-editor [data-content-group] {
  display: none;
}

.content-editor[data-active-group="brand"] [data-content-group="brand"],
.content-editor[data-active-group="home"] [data-content-group="home"],
.content-editor[data-active-group="sections"] [data-content-group="sections"],
.content-editor[data-active-group="blocks"] [data-content-group="blocks"],
.content-editor[data-active-group="contact"] [data-content-group="contact"],
.content-editor[data-active-group="language"] [data-content-group="language"] {
  display: grid;
}

.content-editor[data-active-group] .content-editor-grid {
  grid-template-columns: minmax(0, 1fr);
}

.content-editor[data-active-group] .content-main,
.content-editor[data-active-group] .content-side {
  display: contents;
}

.content-editor[data-active-group] .content-side {
  position: static;
}

.content-editor[data-active-group="language"] .content-editor-grid {
  display: none;
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.form-section-alert {
  border-color: rgba(215, 25, 32, 0.18);
  background: #fff8f8;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.section-head .section-kicker {
  margin-bottom: 6px;
}

.section-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--teal);
  background: rgba(215, 25, 32, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.section-note {
  margin: -6px 0 0;
  color: var(--muted);
}

.advanced-settings {
  border-top: 1px solid rgba(215, 25, 32, 0.14);
  padding-top: 12px;
}

.advanced-settings summary {
  width: max-content;
  color: var(--teal);
  cursor: pointer;
  font-weight: 900;
}

.advanced-settings label {
  margin-top: 12px;
}

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

.form-savebar {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 30px rgba(23, 32, 42, 0.08);
}

.form-savebar span {
  color: var(--muted);
  font-weight: 800;
}

.editor-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.editor-form.compact {
  align-self: start;
}

.editor-form h2,
.content-editor h2 {
  margin: 0;
}

.editor-form small,
.content-editor small {
  color: var(--muted);
  font-weight: 400;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

.check-row {
  align-content: center;
  grid-template-columns: auto 1fr;
}

.check-row input {
  width: auto;
}

.split-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

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

.shipment-workspace .manager-form {
  position: static;
  width: 100%;
}

#tab-shipments [data-shipment-group] {
  display: none;
}

#tab-shipments[data-active-shipment-group="create"] [data-shipment-group="create"],
#tab-shipments[data-active-shipment-group="search"] [data-shipment-group="search"] {
  display: grid;
}

.banner-manager,
.shipment-list {
  display: grid;
  gap: 14px;
}

.manager-form {
  position: sticky;
  top: 24px;
}

.banner-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.banner-card img {
  width: 180px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row button {
  width: auto;
  margin-top: 0;
}

.route-editor {
  display: grid;
  gap: 12px;
}

.route-editor-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.route-editor-head button {
  width: auto;
  min-width: 116px;
  margin-top: 0;
}

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

.route-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(170px, 0.65fr) minmax(180px, 1fr) minmax(240px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.route-row .icon-button {
  background: #fff;
}

.danger-button {
  color: var(--coral);
}

.danger-button:hover {
  color: #fff;
  background: var(--coral);
}

.shipment-search {
  display: grid;
  grid-template-columns: minmax(200px, 360px) minmax(180px, 300px) minmax(180px, 260px) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shipment-search label {
  display: grid;
  gap: 7px;
  color: #33414d;
  font-weight: 800;
}

.shipment-search-spacer {
  min-width: 0;
}

.shipment-search button {
  min-width: 96px;
}

.shipment-search .search-button {
  min-width: 104px;
}

.empty-note {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.shipment-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shipment-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.shipment-table th,
.shipment-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.shipment-table th {
  color: #33414d;
  background: var(--soft);
  font-size: 13px;
  font-weight: 900;
}

.shipment-table tbody tr {
  cursor: pointer;
}

.shipment-table tbody tr:last-child td {
  border-bottom: 0;
}

.shipment-row:hover,
.shipment-row.active,
.shipment-row:focus {
  background: rgba(2, 124, 118, 0.1);
  outline: none;
}

.shipment-row span {
  color: var(--teal);
  font-weight: 900;
}

.shipment-row time {
  color: var(--muted);
  font-weight: 700;
}

.shipment-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
}

.pager-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager-buttons .ghost-button {
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
}

.pager-buttons .ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pager-buttons strong {
  min-width: 58px;
  text-align: center;
  color: var(--ink);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 32, 0.42);
}

.modal-panel {
  width: min(1180px, calc(100vw - 64px));
  max-height: min(88vh, 920px);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 32, 0.28);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.modal-head h2 {
  margin: 0;
}

.icon-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  color: var(--ink);
  background: var(--soft);
}

.icon-button:hover {
  color: var(--teal);
  background: rgba(215, 25, 32, 0.08);
}

.modal-form {
  border: 0;
  border-radius: 0;
  padding: 22px;
  box-shadow: none;
}

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

.modal-form .route-row {
  grid-template-columns: minmax(180px, 0.8fr) minmax(170px, 0.7fr) minmax(180px, 1fr) minmax(220px, 1.15fr) auto;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-actions button {
  width: auto;
}

@media (max-width: 980px) {
  .front-header {
    align-items: flex-start;
  }

  .front-nav {
    display: none;
  }

  .header-actions {
    gap: 10px;
  }

  .hero-content,
  .section-grid,
  .contact-band,
  .admin-shell,
  .content-editor-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 26px;
    padding-top: 10px;
  }

  .track-panel {
    max-width: 560px;
  }

  .stats-band,
  .quick-actions,
  .card-grid,
  .feature-list,
  .process-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-sidebar {
    position: fixed;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
  }

  .admin-shell {
    padding-top: 128px;
  }

  .admin-tabs {
    display: flex;
    flex: 1 1 360px;
    flex-wrap: wrap;
    overflow: visible;
  }

  .admin-brand {
    margin-bottom: 0;
    margin-top: 0;
  }

  .content-side,
  .manager-form {
    position: static;
  }

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

  .modal-panel {
    width: min(960px, calc(100vw - 32px));
  }

  .modal-form .route-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .banner-card {
    grid-template-columns: 160px 1fr;
  }

  html:not([lang^="zh"]) .hero-copy h1 {
    max-width: 680px;
    font-size: 46px;
  }

  html.hero-copy-long:not([lang^="zh"]) .hero-copy h1,
  html.hero-copy-very-long:not([lang^="zh"]) .hero-copy h1 {
    font-size: 40px;
  }

  html:not([lang^="zh"]) .hero-subtitle {
    max-width: 640px;
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  .page-pad,
  .front-header {
    width: min(100% - 28px, 1180px);
  }

  .front-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 12px;
  }

  .front-header .brand {
    gap: 10px;
    width: 100%;
  }

  .front-header .brand-mark {
    width: 38px;
    height: 38px;
  }

  .front-header .brand strong {
    font-size: 18px;
  }

  .front-header .brand small {
    max-width: 100%;
    font-size: 12px;
  }

  .front-header .header-actions {
    min-width: 0;
  }

  .front-header .language-select {
    width: 82px;
    min-width: 82px;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 14px;
  }

  .hero {
    min-height: 820px;
  }

  .hero-content {
    min-height: auto;
    padding: 34px 0 84px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  html:not([lang^="zh"]) .hero-copy h1 {
    font-size: 34px;
  }

  html.hero-copy-long:not([lang^="zh"]) .hero-copy h1,
  html.hero-copy-very-long:not([lang^="zh"]) .hero-copy h1 {
    font-size: 30px;
  }

  .track-row,
  .stats-band,
  .quick-actions,
  .card-grid,
  .feature-list,
  .process-list,
  .form-grid.two,
  .banner-card,
  .route-row,
  .shipment-parties,
  .shipment-search,
  .backup-card {
    grid-template-columns: 1fr;
  }

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

  .backup-meta,
  .backup-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .shipment-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-tabs {
    display: flex;
  }

  .admin-tabs button,
  .nav-dropdown,
  .nav-dropdown > button {
    width: auto;
    min-width: 118px;
  }

  .nav-submenu {
    min-width: 180px;
  }

  .shipment-search-spacer {
    display: none;
  }

  .track-row button {
    width: 100%;
  }

  .carousel-button {
    display: none;
  }

  .stats-band {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .quick-actions {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .stat-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-grid,
  .content-section,
  .contact-band {
    padding: 56px 0;
  }

  .site-footer,
  .form-savebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions {
    align-items: center;
    flex-direction: row;
  }

  .admin-actions .ghost-button {
    width: auto;
  }

  .admin-main {
    padding: 16px;
  }

  .form-section,
  .editor-form {
    padding: 16px;
  }

  .route-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .route-editor-head button,
  .route-row .icon-button {
    width: 100%;
  }

  .modal-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .modal-form .form-grid.two,
  .modal-form .route-row {
    grid-template-columns: 1fr;
  }

  .form-savebar button {
    width: 100%;
  }

  .form-savebar {
    position: static;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions button {
    width: 100%;
  }

  .banner-card img {
    width: 100%;
  }
}
