
:root {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

body, input, select, button, table, textarea {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

:root {
  color: #182230;
  background: #eef3f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef3f7;
}

.shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 14px 12px 24px;
}

.results-shell {
  width: min(100%, 1180px);
}

.panel {
  padding: 18px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.search-card {
  margin-top: 8px;
}

.page-heading {
  margin-bottom: 18px;
}

.page-heading p {
  margin: 0 0 4px;
  color: #0f6b58;
  font-size: 13px;
  font-weight: 900;
}

h1 {
  margin: 0 0 18px;
  color: #101828;
  font-size: 24px;
  line-height: 1.25;
}

.error-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f5c2c7;
  border-radius: 6px;
  background: #fff1f1;
  color: #9f1239;
  font-weight: 800;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.options-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

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

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #c8d0da;
  border-radius: 6px;
  background: #ffffff;
  color: #101828;
  font: inherit;
}

select {
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.custom-item-input {
  margin-top: 2px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid #0f6b58;
  border-radius: 6px;
  background: #0f6b58;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button {
  grid-column: 1 / -1;
}

button:disabled {
  border-color: #98a2b3;
  background: #98a2b3;
  cursor: wait;
}

.primary-action {
  width: 100%;
  min-height: 56px;
  margin-top: 2px;
  font-size: 17px;
}

.secondary {
  border-color: #c8d0da;
  background: #ffffff;
  color: #1d2939;
}

.summary {
  margin: 0 0 18px;
  color: #475467;
  font-size: 14px;
  line-height: 1.5;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid #bfe2d9;
  border-radius: 999px;
  background: #ecfdf7;
  color: #0f6b58;
  font-size: 13px;
  font-weight: 900;
}

.cache-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f9fafb;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.empty-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.result-header {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.result-header h1 {
  margin-bottom: 8px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.summary-card {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}

.summary-card span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.summary-card strong {
  color: #101828;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
}

.result-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 13px;
}

.result-table th,
.result-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e4e7ec;
  text-align: left;
  white-space: nowrap;
}

.result-table th {
  position: sticky;
  top: 0;
  background: #eef2f6;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

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

.result-table .unmatched td {
  background: #fff1f1;
}

.shipper-cell {
  color: #101828;
  font-weight: 800;
}

.primary-cell {
  color: #101828;
  font-size: 15px;
  font-weight: 900;
}

.amount-cell {
  color: #b42318;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

.empty-cell {
  color: #667085;
  text-align: center;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 16px;
  color: #667085;
  font-size: 13px;
}

.support-links a {
  color: #0f6b58;
  font-weight: 800;
  text-decoration: none;
}

.bottom-search-button {
  width: 100%;
  margin-top: 16px;
}

.history-notice {
  margin: 8px 0 0;
  color: #667085;
  font-size: 12px;
}

.history-table {
  min-width: 1080px;
}

.files {
  display: grid;
  gap: 10px;
  margin: 0;
}

.files div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #e4e7ec;
}

dt {
  color: #667085;
  font-weight: 800;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 721px) {
  .shell {
    width: min(920px, calc(100% - 32px));
    margin: 36px auto;
    padding: 0;
  }

  .results-shell {
    width: min(1180px, calc(100% - 24px));
  }

  .panel {
    padding: 28px;
  }

  h1 {
    font-size: 26px;
  }

  .result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  .result-header .button {
    width: auto;
  }

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

  .summary-card strong {
    font-size: 17px;
  }

  .result-table {
    min-width: 960px;
    font-size: 14px;
  }

  .primary-cell {
    font-size: 16px;
  }

  .amount-cell {
    font-size: 17px;
  }

  .result-table th,
  .result-table td {
    padding: 11px 10px;
  }

  .bottom-search-button {
    display: none;
  }
}

@media (max-width: 380px) {
  .shell {
    padding-right: 8px;
    padding-left: 8px;
  }

  .panel {
    padding: 14px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}
