:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --ink: #16324a;
  --muted: #6a7a89;
  --line: #d9e0e7;
  --primary: #005a8d;
  --primary-dark: #0f3554;
  --accent: #d7ecf8;
  --danger-bg: #fff4f1;
  --danger-line: #f3c0b5;
  --shadow: 0 18px 48px rgba(15, 53, 84, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 90, 141, 0.07), transparent 28%),
    linear-gradient(180deg, #fbfcfd 0%, var(--bg) 100%);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.site-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 32px auto 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.05;
}

.hero-copy {
  max-width: 72ch;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-card,
.search-panel,
.feedback,
.table-shell {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 224, 231, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-card {
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(160deg, var(--primary-dark), var(--primary));
  color: #f7fbff;
}

.hero-card-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.hero-card-value {
  margin-top: 10px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.search-panel {
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 20px;
}

.search-form {
  display: grid;
  gap: 18px;
}

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

.field-grid label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.field-grid input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
}

.field-grid input:focus {
  outline: 2px solid rgba(0, 90, 141, 0.16);
  border-color: var(--primary);
}

.search-actions {
  display: flex;
  gap: 12px;
}

.btn-primary,
.btn-secondary,
.pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: 180ms ease;
}

.btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  cursor: pointer;
}

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

.btn-primary:hover,
.btn-secondary:hover,
.pager-link:hover {
  transform: translateY(-1px);
}

.feedback {
  border-radius: 22px;
  padding: 18px 20px;
  color: var(--muted);
  margin-bottom: 20px;
}

.order-filter-panel {
  margin-bottom: 20px;
  padding: 24px 26px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 53, 84, 0.98), rgba(0, 90, 141, 0.92)),
    linear-gradient(180deg, #fafdff, #edf4f9);
  box-shadow: var(--shadow);
  color: #f4fbff;
  position: relative;
  overflow: hidden;
}

.order-filter-panel::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.order-filter-form {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.order-filter-copy {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.order-filter-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 251, 255, 0.72);
}

.order-filter-label {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.order-filter-copy p {
  margin: 0;
  color: rgba(244, 251, 255, 0.8);
  line-height: 1.5;
}

.order-filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(100%, 520px);
}

.order-filter-input {
  flex: 1 1 auto;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 16px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.order-filter-input::placeholder {
  color: #8092a3;
}

.order-filter-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 4px rgba(215, 236, 248, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.order-filter-button {
  height: 54px;
  border: none;
  border-radius: 16px;
  padding: 0 22px;
  background: linear-gradient(135deg, #f9fbfd, #d7ecf8);
  color: var(--primary-dark);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(4, 22, 39, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.order-filter-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(4, 22, 39, 0.24);
  background: linear-gradient(135deg, #ffffff, #e7f3fa);
}

.order-filter-button:active {
  transform: translateY(0);
}

.feedback-error {
  background: var(--danger-bg);
  border-color: var(--danger-line);
  color: #8b3f2b;
}

.results-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.table-shell {
  overflow: hidden;
  border-radius: 28px;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
}

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

.orders-table thead th {
  font-size: 0.86rem;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fcfdff, #f4f7fa);
}

.order-row {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.96);
}

.order-row:hover {
  background: #f7fafc;
}

.expand-col {
  width: 56px;
  text-align: center;
}

.expand-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 1.1rem;
}

.detail-row {
  display: none;
}

.detail-row.is-open {
  display: table-row;
}

.detail-row td {
  background: linear-gradient(180deg, #fafcfe, #f4f8fb);
}

.detail-wrap {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}

.address-card {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.address-card a {
  color: var(--primary);
}

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

.shipment-card {
  width: min(260px, 100%);
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  display: grid;
  gap: 10px;
}

.shipment-card div {
  display: grid;
  gap: 4px;
}

.shipment-card span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.shipment-card strong {
  overflow-wrap: anywhere;
}

.shipment-empty {
  display: flex;
  align-items: center;
  color: var(--muted);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pager-link {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.pager-link.active {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
}

.pager-link.disabled {
  pointer-events: none;
  opacity: 0.45;
}

@media (max-width: 1080px) {
  .hero,
  .detail-wrap,
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .order-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .order-filter-controls {
    min-width: 0;
    width: 100%;
  }

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

  .detail-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 20px, 1380px);
    margin-top: 20px;
  }

  .hero,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .order-filter-panel {
    padding: 20px;
  }

  .order-filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .order-filter-button,
  .order-filter-input {
    width: 100%;
  }

  .hero-card {
    grid-column: auto;
  }

  .results-summary {
    flex-direction: column;
  }

  .orders-table {
    min-width: 860px;
  }

  .table-shell {
    overflow-x: auto;
  }
}
