:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #202e3b;
  background: #f4f6f8;
  font-synthesis: none;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #176b65;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5dc;
  border-radius: 6px;
  background: #fff;
  color: #293c49;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
button:hover,
.button:hover {
  background: #edf2f3;
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: #126b60;
  color: white;
  border-color: #126b60;
}
.primary:hover {
  background: #0d5149;
}
.warning {
  border-color: #a65137;
  color: #883a25;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: #172c34;
  color: #d3dfe2;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: white;
  font-size: 13px;
  letter-spacing: 1px;
  font-weight: 700;
}
.brand small {
  display: block;
  color: #93abb3;
  font-size: 10px;
  letter-spacing: 0.4px;
  margin-top: 7px;
}
.brand-icon {
  background: #65b6a4;
  color: #172c34;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 24px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #839ea7;
  margin: 43px 12px 13px;
}
nav a {
  display: block;
  color: #cad9de;
  border-radius: 6px;
  padding: 13px 12px;
  margin: 4px 0;
}
nav a:hover,
nav a[aria-current] {
  background: #29434a;
  color: #fff;
  text-decoration: none;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  color: #91a9b1;
  display: grid;
  gap: 10px;
}
.version-link {
  color: #9bb9be;
  font-size: 12px;
}
.version-link:hover {
  color: #fff;
}
.sidebar-bottom form {
  margin: 0;
}
.logout {
  width: 100%;
  justify-content: space-between;
  background: #203b44;
  border-color: #38555e;
  color: #e8f1f3;
  padding: 10px 12px;
  text-align: left;
}
.logout:hover {
  background: #294952;
}
.logout small {
  color: #a9c0c5;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
}
dialog.confirm-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: #20313d;
  box-shadow: 0 24px 70px #15233766;
}
.confirm-dialog article {
  padding: 24px;
}
.confirm-dialog h2 {
  margin: 0 0 10px;
  font-size: 20px;
}
.confirm-dialog p {
  margin: 0;
  color: #586a76;
  line-height: 1.5;
}
.confirm-dialog .actions {
  margin-top: 24px;
  justify-content: flex-end;
}
.workspace {
  margin-left: 238px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.signed-out {
  margin-left: 0;
}
.topbar {
  height: 66px;
  border-bottom: 1px solid #e0e6e9;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  font-size: 12px;
}
.environment {
  font-size: 10px;
  letter-spacing: 1px;
  border: 1px solid #d5e0e0;
  border-radius: 20px;
  padding: 6px 10px;
  color: #486a68;
}
main {
  padding: 28px 34px;
  flex: 1;
  min-width: 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 26px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 6px 0 10px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  margin: 0 0 18px;
}
h3 {
  font-size: 15px;
  margin-top: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #58736f;
}
.muted {
  color: #73818b;
  line-height: 1.6;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.actions form {
  margin: 0;
}
.shipment-actions {
  margin-bottom: 24px;
}
.column-picker {
  margin: 18px 0;
  padding: 14px 18px;
  background: white;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
}
.column-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin: 18px 0;
}
.schedule-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid #edf0f2;
}
.schedule-row > label:first-child {
  min-width: 240px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}
.metric {
  padding: 20px;
  background: white;
  border: 1px solid #e0e6e9;
  border-radius: 8px;
  min-height: 130px;
}
.metric > span {
  font-size: 12px;
  color: #61737d;
}
.metric strong {
  display: block;
  font-size: 30px;
  letter-spacing: -0.8px;
  margin-top: 14px;
  font-weight: 650;
}
.metric small {
  font-size: 10px;
  color: #75838a;
  margin-top: 9px;
}
.metric.recovered {
  background: #e6f1ed;
  border-color: #c9dfd6;
}
.metric.recovered strong {
  color: #17684f;
}
.panel {
  background: #fff;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 22px;
}
.flush {
  padding: 0;
  overflow: hidden;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading h2 {
  margin: 0;
}
.section-heading + p {
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
}
.table-scroll {
  overflow-x: auto;
}
#prepared-claim {
  width: 100%;
  margin-bottom: 14px;
}
.preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  padding: 14px 16px;
  background: #f8fafb;
  border-bottom: 1px solid #dfe6e9;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #73818a;
  white-space: nowrap;
}
td {
  padding: 18px 16px;
  border-bottom: 1px solid #edf0f2;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafcfc;
}
small {
  display: block;
}
.order {
  font-weight: 700;
}
.tracking {
  font-family: Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
  margin-top: 7px;
  color: #687c86;
}
.date {
  white-space: nowrap;
  font-size: 11px;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 600;
  background: #edf1f4;
  color: #526774;
  white-space: nowrap;
}
.potential_refund {
  background: #e2eee9;
  color: #27694f;
}
.late_awaiting_delivery,
.manual_review,
.insufficient_data {
  background: #fcf0d6;
  color: #8b6422;
}
.refund_received {
  background: #dcefe5;
  color: #1a6b46;
}
.claim_submitted {
  background: #e4edf9;
  color: #3d6399;
}
.outside_claim_window,
.claim_denied {
  background: #f7e8e5;
  color: #a55649;
}
.urgent {
  color: #a45d21;
  font-weight: 700;
}
.notice {
  padding: 14px 18px;
  border: 1px solid #d8e3e6;
  background: #eff5f6;
  border-radius: 6px;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 12px;
}
.demo {
  background: #f7f1df;
  border-color: #e7ddbf;
  color: #796a41;
}
.danger {
  background: #faeae7;
  color: #a13d35;
  border-color: #efd0ca;
}
.success {
  background: #e5f2e9;
  color: #276844;
}
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #edf1f3;
  margin-bottom: 15px;
  font-size: 12px;
}
.info-row strong {
  font-weight: 600;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #536772;
  font-weight: 600;
}
input,
select,
textarea {
  border: 1px solid #cad5dc;
  border-radius: 5px;
  padding: 10px 12px;
  background: white;
  color: #263c48;
  min-width: 0;
}
textarea {
  min-height: 85px;
  resize: vertical;
}
.filters {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.filters input {
  min-width: 190px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.full {
  grid-column: 1/-1;
}
.check {
  flex-direction: row;
  align-items: center;
  font-weight: 400;
}
.check input {
  width: 17px;
  height: 17px;
}
.filters input[type="checkbox"],
table input[type="checkbox"] {
  min-width: 17px;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
table input[type="checkbox"] {
  margin-right: 10px;
}
#bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
}
#bulk-actions label {
  flex: 1;
  min-width: 220px;
}
#bulk-actions small {
  flex-basis: 100%;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.detail-grid span {
  font-size: 11px;
  color: #7a8991;
}
.detail-grid strong {
  display: block;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 600;
}
.detail-grid small {
  font-size: 10px;
  color: #7a8991;
  line-height: 1.6;
}
details {
  padding: 12px 0;
  border-bottom: 1px solid #e8edef;
}
summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: #607480;
  max-width: 100%;
}
.history-item,
.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 18px 0;
  padding: 5px 0 5px 16px;
  border-left: 3px solid #cbded7;
  font-size: 12px;
}
.history-item span,
.timeline-item span,
.timeline-item small {
  color: #788892;
  font-size: 11px;
}
.empty {
  text-align: center;
  padding: 55px;
  color: #72848e;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #77858c;
  margin: 20px 0;
}
.pagination a {
  margin-left: 8px;
}
footer {
  padding: 20px 34px;
  color: #819198;
  border-top: 1px solid #e1e6e9;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.login {
  max-width: 420px;
  margin: 7vh auto;
  padding: 35px;
}
.login label {
  margin: 20px 0;
}
.wide {
  width: 100%;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: white;
  padding: 15px;
  z-index: 20;
}
:focus-visible {
  outline: 3px solid #61afaa;
  outline-offset: 3px;
}
@media (min-width: 1700px) {
  .metrics {
    grid-template-columns: repeat(7, 1fr);
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
  }
  .workspace {
    margin-left: 200px;
  }
  .signed-out {
    margin-left: 0;
  }
  main {
    padding: 22px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .detail-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: relative;
    width: auto;
    padding: 18px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    margin-top: 15px;
  }
  .sidebar nav a {
    white-space: nowrap;
    padding: 10px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    padding: 0 18px;
  }
  .topbar .muted {
    display: none;
  }
  main {
    padding: 16px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 25px;
  }
  .two-column {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-grid,
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .full {
    grid-column: 1/-1;
  }
  h1 {
    font-size: 26px;
  }
  .panel {
    padding: 18px;
  }
  .flush {
    padding: 0;
  }
  footer {
    flex-direction: column;
  }
  .environment {
    font-size: 8px;
  }
}

.connection-form {
  display: grid;
  gap: 16px;
  margin: 22px 0;
}
.connection-form .actions {
  align-items: stretch;
}
.connection-form .muted {
  margin: 0;
  font-size: 12px;
}

[hidden] {
  display: none !important;
}
/* Keep live synchronization feedback readable on narrow screens. */
.sync-live progress {
  display: block;
  width: 100%;
  margin: 1rem 0;
}
.sync-live button {
  margin-top: 0.75rem;
}

/* Operations controls */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  padding: 22px;
  background: #fff;
  border: 1px solid #dce3eb;
  border-radius: 14px;
  align-items: start;
  box-shadow: 0 3px 14px #172a4205;
}
.filters input {
  min-width: 0;
}
.filters label {
  min-width: 0;
}
.filters small {
  font-size: 11px;
  line-height: 1.5;
  color: #65748b;
}
.visibility-filters {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  border: 0;
  border-top: 1px solid #e3e9f0;
  padding: 16px 0 0;
  margin-top: 8px;
}
.visibility-filters legend {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  padding-right: 12px;
}
.bulk-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
dialog.column-picker {
  margin: auto;
  border: 1px solid #dce3eb;
  border-radius: 16px;
  padding: 28px;
  width: min(560px, 90vw);
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 24px 80px #14243a44;
}
dialog::backdrop {
  background: #15233780;
}
.column-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.column-picker button {
  margin: 8px 10px 0 0;
}
.settings-page {
  max-width: 1240px;
}
.settings-section > summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 650;
  padding: 4px 0;
}
.settings-section[open] > summary {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e3e9f0;
}
.settings-page .panel {
  border-radius: 14px;
  box-shadow: 0 3px 16px #172a4205;
}
.settings-page .connection-form {
  max-width: 820px;
}
.pickup-card {
  max-width: 680px;
  border-color: #cfe2df;
  box-shadow: 0 8px 24px #183b3810;
  background: linear-gradient(145deg, #ffffff, #f8fcfb);
}
.pickup-card h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
.pickup-card select {
  min-height: 44px;
  border-radius: 10px;
}
.pickup-card .primary {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
}
.pickup-card .notice {
  margin: 16px 0;
}
.inline-form {
  display: inline;
}
.claim-copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.claim-copy-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dce3eb;
  border-radius: 12px;
  background: #f8fafc;
}
.claim-copy-card span {
  grid-column: 1/-1;
  color: #65748b;
  font-size: 12px;
  font-weight: 700;
}
.claim-copy-card input {
  min-width: 0;
  background: #fff;
}
.detail-grid small {
  display: block;
  margin-top: 5px;
  color: #65748b;
  font-size: 11px;
  line-height: 1.4;
}
@media (max-width: 600px) {
  .filters {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .column-choices {
    grid-template-columns: 1fr;
  }
  .claim-copy-grid {
    grid-template-columns: 1fr;
  }
}
