.shipcode-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  color: #1e293b;
}

.shipcode-hero {
  overflow: hidden;
  position: relative;
  border: 0;
  border-radius: 1rem;
  background: linear-gradient(135deg, #173f70 0%, #2878c8 100%);
  color: #fff;
  box-shadow: 0 0.75rem 2rem rgba(31, 79, 143, 0.18);
}

.shipcode-hero::after {
  position: absolute;
  top: -70px;
  right: -45px;
  width: 240px;
  height: 240px;
  border: 38px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.shipcode-hero .card-body {
  position: relative;
  z-index: 1;
}

.shipcode-eyebrow {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.shipcode-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.35rem;
}

.shipcode-hero-stat {
  min-width: 120px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.shipcode-hero-stat strong,
.shipcode-hero-stat span {
  display: block;
}

.shipcode-hero-stat strong {
  font-size: 1.25rem;
}

.shipcode-hero-stat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
}

.shipcode-panel {
  border: 1px solid #e3e9ef;
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 0.35rem 1rem rgba(31, 45, 61, 0.06);
}

.shipcode-panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e8edf2;
}

.shipcode-panel-title {
  margin: 0;
  color: #24364b;
  font-size: 1.05rem;
  font-weight: 700;
}

.shipcode-panel-description {
  margin: 0.3rem 0 0;
  color: #748396;
  font-size: 0.84rem;
}

.shipcode-file-box {
  display: flex;
  align-items: center;
  min-height: 116px;
  padding: 1.15rem;
  border: 1px dashed #b9c8d8;
  border-radius: 0.8rem;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.shipcode-file-box:hover,
.shipcode-file-box:focus-within {
  border-color: #2878c8;
  background: #f1f7fd;
  transform: translateY(-1px);
}

.shipcode-file-icon {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: 0.9rem;
  border-radius: 0.75rem;
  background: #e8f2fc;
  color: #2878c8;
  font-size: 1.15rem;
}

.shipcode-file-box .form-control {
  border-color: #d9e2ec;
  font-size: 0.82rem;
}

.shipcode-file-box .form-control::file-selector-button {
  background: #eef3f8;
  color: #334155;
}

.shipcode-drop-zone {
  padding: 2.25rem 1.25rem;
  border: 2px dashed #b9c8d8;
  border-radius: 0.9rem;
  background: #f8fafc;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.shipcode-drop-zone:hover,
.shipcode-drop-zone:focus-within,
.shipcode-drop-zone.dragging {
  border-color: #2878c8;
  background: #f1f7fd;
  transform: translateY(-1px);
}

.shipcode-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 0.9rem;
  border-radius: 1rem;
  background: #e8f2fc;
  color: #2878c8;
  font-size: 1.35rem;
}

.shipcode-upload-control {
  width: min(620px, 100%);
  margin: 1rem auto 0;
}

.shipcode-upload-control .form-control {
  border-color: #ced8e2;
  background: #fff;
  font-size: 0.84rem;
}

.shipcode-upload-control .form-control::file-selector-button {
  background: #eef3f8;
  color: #334155;
}

.shipcode-required {
  margin-left: 0.2rem;
  color: #dc3545;
  font-size: 0.66rem;
  font-weight: 700;
}

.shipcode-primary-button {
  min-width: 180px;
  border-color: #2878c8;
  background: #2878c8;
  box-shadow: 0 0.35rem 0.8rem rgba(40, 120, 200, 0.2);
}

.shipcode-primary-button:hover,
.shipcode-primary-button:focus {
  border-color: #1f68af;
  background: #1f68af;
}

.shipcode-alert {
  border: 1px solid transparent;
  border-radius: 0.8rem;
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
}

.shipcode-alert-success {
  border-color: #bfe5d0;
  background: #edf9f2;
  color: #22734a;
}

.shipcode-alert-danger {
  border-color: #f3c5c8;
  background: #fff1f2;
  color: #a23a43;
}

.shipcode-alert-warning {
  border-color: #f1d79e;
  background: #fff9e9;
  color: #72521b;
}

.shipcode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.shipcode-badge-warning {
  background: #fff0c7;
  color: #8a5d00;
}

.shipcode-badge-success {
  background: #dcf4e7;
  color: #167145;
}

.shipcode-badge-neutral {
  background: #eef2f6;
  color: #556475;
}

.shipcode-table-wrap {
  max-height: min(65vh, 720px);
  overflow: auto;
}

.shipcode-table {
  margin: 0;
  font-size: 0.82rem;
}

.shipcode-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid #dbe4ec;
  background: #f1f5f9;
  color: #465566;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.shipcode-table tbody td {
  padding: 0.75rem;
  border-color: #edf1f5;
  vertical-align: middle;
}

.shipcode-table tbody tr:hover > td {
  background: #f8fbfe;
}

.shipcode-table .shipcode-product-cell {
  min-width: 310px;
  line-height: 1.45;
}

.shipcode-wide-table {
  min-width: 2850px;
}

.shipcode-wide-table thead th {
  min-width: 130px;
}

.shipcode-wide-table thead th:first-child {
  min-width: 60px;
}

.shipcode-wide-table .shipcode-wide-product {
  min-width: 260px;
  max-width: 360px;
  line-height: 1.4;
}

.shipcode-wide-table .shipcode-wide-address {
  min-width: 280px;
  max-width: 380px;
  line-height: 1.4;
}

.shipcode-table .shipcode-mono {
  color: #465566;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
  white-space: nowrap;
}

.shipcode-unmapped-table tbody td {
  background: #fffdf7;
}

.shipcode-empty {
  padding: 3.5rem 1rem;
  text-align: center;
}

.shipcode-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: #eef3f8;
  color: #8ba0b5;
  font-size: 1.4rem;
}

.shipcode-mapping-table {
  min-width: 1360px;
}

.shipcode-mapping-table .mapping-source {
  min-width: 270px;
  max-width: 360px;
  font-weight: 600;
  line-height: 1.45;
}

.shipcode-mapping-table .mapping-barcode {
  min-width: 250px;
}

.shipcode-barcode-input {
  border-color: #ced8e2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
}

.shipcode-barcode-input:focus,
.shipcode-barcode-input.is-recommended {
  border-color: #2878c8;
  background: #f4f9fe;
  box-shadow: 0 0 0 0.2rem rgba(40, 120, 200, 0.14);
}

.shipcode-recommendation-list {
  display: grid;
  gap: 0.5rem;
  min-width: 480px;
}

.shipcode-recommendation {
  display: block;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #dce4ec;
  border-radius: 0.65rem;
  background: #fff;
  color: #334155;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.shipcode-recommendation:hover,
.shipcode-recommendation:focus-visible {
  border-color: #2878c8;
  background: #f2f8fe;
  transform: translateY(-1px);
  outline: none;
}

.shipcode-recommendation-name {
  display: block;
  line-height: 1.4;
}

.shipcode-recommendation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.35rem;
  color: #718096;
  font-size: 0.72rem;
}

.shipcode-score {
  color: #2878c8;
  font-weight: 700;
}

.shipcode-mapping-unregistered > td {
  background: #fffcf4;
}

.shipcode-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

@media (max-width: 767.98px) {
  .shipcode-page {
    padding: 1rem 0.75rem 2rem;
  }

  .shipcode-hero .card-body {
    padding: 1.5rem !important;
  }

  .shipcode-panel-header {
    padding: 1rem;
  }

  .shipcode-file-box {
    min-height: 100px;
  }

  .shipcode-panel-actions {
    width: 100%;
  }

  .shipcode-panel-actions .btn,
  .shipcode-panel-actions form {
    flex: 1 1 auto;
  }

  .shipcode-panel-actions form .btn {
    width: 100%;
  }
}
