
/* Dopetzcom Admin — ShipByDopetz live styles + control aliases */
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
.material-icons{font-family:"Material Icons";font-weight:normal;font-style:normal;font-size:20px;display:inline-block;line-height:1;letter-spacing:normal;text-transform:none;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}
#shipping-section-shipbydopetz.shipby-page{display:block}
.shipby-page .btn,.shipby-modal .btn{border:1px solid #dddde6;background:#fff;color:#303044;border-radius:8px;padding:8px 12px;font-size:12px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.shipby-page .btn-primary,.shipby-modal .btn-primary{background:#7135e7;color:#fff;border-color:#7135e7}
.shipby-page .btn-secondary,.shipby-modal .btn-secondary{background:#fff}
.shipby-page .btn-sm,.shipby-modal .btn-sm{padding:6px 9px;font-size:11px}
.shipby-page .btn-icon,.shipby-modal .btn-icon{border:0;background:transparent;cursor:pointer;width:36px;height:36px;border-radius:8px}
.shipby-page .form-input,.shipby-page .form-select,.shipby-page .form-textarea,.shipby-page .filter-select,.shipby-page .search-input,
.shipby-modal .form-input,.shipby-modal .form-select,.shipby-modal .form-textarea,.shipby-modal .filter-select,.shipby-modal .search-input{
  height:38px;border:1px solid #dedee7;border-radius:8px;padding:0 10px;font-size:13px;background:#fff;color:#25253a;width:100%;box-sizing:border-box}
.shipby-page .form-textarea,.shipby-modal .form-textarea{height:auto;padding:8px 10px}
.shipby-page .form-label,.shipby-modal .form-label{display:block;font-size:11px;font-weight:700;margin-bottom:5px;color:#666}
.shipby-page .form-group,.shipby-modal .form-group{margin-bottom:12px}
.shipby-page .form-row,.shipby-modal .form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pwyw-shop-region-bar{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #ececf2;border-radius:10px;padding:12px;margin:12px 0;background:#fbfbfd}
.pwyw-shop-region-info{display:flex;gap:10px;align-items:center}
.pwyw-muted{color:#888;font-size:12px}
.pwyw-field span{display:block;font-size:11px;font-weight:700;margin-bottom:4px}
.shipby-page{color:#25253a;font-family:Inter,Arial,sans-serif}
.shipby-title{display:flex;align-items:center;gap:8px;margin:0 0 6px;font-size:18px}
.shipby-subtitle{margin:0;color:#8a8a99;font-size:12px}
.shipby-page-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}
body.dark .shipby-page,body.dark .shipby-modal-sheet{color:#eee}
body.dark .shipby-page .form-input,body.dark .shipby-page .form-select,body.dark .shipby-modal .form-input,body.dark .shipby-modal .form-select,body.dark .shipby-page .search-input,body.dark .shipby-page .filter-select{background:#20202c;color:#eee;border-color:#3a3a47}
body.dark .pwyw-shop-region-bar{background:#181821;border-color:#2b2b38}
body.dark .shipby-page .btn,body.dark .shipby-modal .btn{background:#18181f;color:#fff;border-color:#3a3a48}
body.dark .shipby-page .btn-primary,body.dark .shipby-modal .btn-primary{background:#7440e8;border-color:#7440e8}

/* ShipByDopetz manual international shipping */
.shipby-page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.shipby-title {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  color: var(--text-primary);
}
.shipby-title .material-icons { color: #6366f1; }
.shipby-subtitle { margin: 0; color: var(--text-secondary); font-size: 14px; max-width: 720px; line-height: 1.5; }
.shipby-setup-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}
.shipby-setup-bar label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.shipby-check { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.shipby-section-block { margin-bottom: 28px; }
.shipby-section-block h4 { margin: 0 0 12px; font-size: 16px; color: var(--text-primary); }
.shipby-muted { color: var(--text-secondary); font-size: 13px; margin: 0 0 10px; }
.shipby-loading { padding: 20px; text-align: center; color: var(--text-secondary); }
.shipby-empty {
  text-align: center;
  padding: 32px 20px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
}
.shipby-empty .material-icons { font-size: 40px; opacity: 0.5; }
.shipby-empty--error { border-color: #fecaca; color: #b91c1c; }
.shipby-flex-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.shipby-flex-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ececf2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.shipby-flex-row:hover { border-color: #7135e7; background: #faf8ff; }
.shipby-flex-row--selected { border-color: #7135e7; box-shadow: 0 0 0 2px rgba(113, 53, 231, 0.15); }
.shipby-flex-check { display: flex; align-items: center; flex: 0 0 auto; }
.shipby-flex-check input { width: 16px; height: 16px; }
.shipby-flex-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shipby-flex-cell b { font-size: 13px; color: #25253a; }
.shipby-flex-cell span { font-size: 11px; color: #88889a; }
.shipby-flex-order { flex: 1 1 140px; }
.shipby-flex-customer { flex: 2 1 180px; }
.shipby-flex-region { flex: 1 1 150px; }
.shipby-flex-loc { flex: 1 1 120px; }
.shipby-flex-row .shipby-status { margin-left: auto; flex: 0 0 auto; }
body.dark .shipby-flex-row { background: #181821; border-color: #2b2b38; }
body.dark .shipby-flex-row:hover { background: #20182c; border-color: #7440e8; }
body.dark .shipby-flex-cell b { color: #eee; }
body.dark .shipby-flex-cell span { color: #a5a5b5; }
@media (max-width: 700px) {
  .shipby-flex-row { align-items: flex-start; }
  .shipby-flex-row .shipby-status { margin-left: 0; }
}
.shipby-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--card-bg, var(--bg-primary));
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.shipby-card:hover { border-color: #6366f1; box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12); }
.shipby-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.shipby-card-name { margin: 0 0 4px; font-weight: 600; color: var(--text-primary); }
.shipby-card-sub, .shipby-card-loc { margin: 0; font-size: 12px; color: var(--text-secondary); }
.shipby-card-loc { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.shipby-card-loc .material-icons { font-size: 16px; }
.shipby-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.shipby-status--blue { background: #dbeafe; color: #1d4ed8; }
.shipby-status--green { background: #d1fae5; color: #047857; }
.shipby-status--purple { background: #ede9fe; color: #6d28d9; }
.shipby-status--gray { background: #f3f4f6; color: #4b5563; }
.shipby-status--red { background: #fee2e2; color: #b91c1c; }
.shipby-detail-panel {
  margin: 20px 0 28px;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), transparent);
}
.shipby-detail-inner { padding: 16px; }
.shipby-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.shipby-detail-head h3 { margin: 8px 0 4px; color: var(--text-primary); }
.shipby-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.shipby-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.shipby-action-btn .material-icons { font-size: 20px; }
.shipby-action-btn--arrive { border-color: #86efac; background: #f0fdf4; color: #166534; }
.shipby-action-btn--depart { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.shipby-action-btn--usps { border-color: #c7d2fe; background: #eef2ff; color: #4338ca; }
.shipby-action-btn--dhl { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.shipby-action-btn--fedex { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.shipby-timeline { border-left: 2px solid var(--border-color); margin-left: 8px; padding-left: 16px; }
.shipby-timeline-item { position: relative; margin-bottom: 16px; }
.shipby-timeline-dot {
  position: absolute;
  left: -23px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6366f1;
}
.shipby-timeline-item p { margin: 4px 0; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
.shipby-timeline-item strong { color: var(--text-primary); }
.shipby-section-label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.shipby-payment-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  font-size: 14px;
}
.shipby-payment-badge .material-icons { font-size: 20px; color: var(--primary-color, #6366f1); }
.shipby-mark-paid-btn { margin-left: auto; }
.shipby-audit-trail {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
}
.shipby-audit-item {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.shipby-audit-icon {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary-color, #6366f1) 12%, var(--surface));
  color: var(--primary-color, #6366f1);
}
.shipby-audit-icon .material-icons { font-size: 18px; }
.shipby-audit-body { flex: 1; min-width: 0; }
.shipby-audit-body p { margin: 4px 0; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
.shipby-audit-body strong { color: var(--text-primary); font-size: 14px; }
.shipby-hub-scan-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary-color, #6366f1) 10%, var(--surface)),
    color-mix(in srgb, #0ea5e9 8%, var(--surface))
  );
  border: 1px solid color-mix(in srgb, var(--primary-color, #6366f1) 22%, var(--border-color));
}
.shipby-hub-scan-bar > .material-icons {
  color: var(--primary-color, #6366f1);
  font-size: 24px;
}
.shipby-hub-scan-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
}
.shipby-hub-scan-copy strong { font-size: 14px; color: var(--text-primary); }
.shipby-hub-scan-copy code {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--bg-primary);
}
.shipby-hub-scan-bar .form-input {
  flex: 1 1 200px;
  min-width: 0;
}
.shipby-hub-scan-result { margin-bottom: 14px; }
.shipby-hub-scan-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--surface);
}
.shipby-hub-scan-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.shipby-hub-scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.shipby-hub-scan-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--text-secondary);
}
.shipby-hub-scan-error { color: #b91c1c; }
.shipby-hub-camera-body #shipby-hub-camera-reader {
  width: 100%;
  min-height: 220px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
}
.shipby-usps-track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: var(--primary-color-light);
  color: var(--text-primary);
  font-size: 14px;
}
.shipby-modal {
  position: fixed;
  top: var(--topbar-height, 72px);
  left: var(--sidebar-width, 236px);
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 24px 24px;
  box-sizing: border-box;
}
.shipby-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
}
.shipby-modal-sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 130px);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(32, 18, 74, 0.22);
  border: 1px solid #ececf2;
}
.shipby-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
}
.shipby-modal-head h3 { margin: 0; font-size: 18px; color: var(--text-primary); }
.shipby-modal-body { padding: 16px 18px; }
.shipby-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
}
body.shipby-modal-open { overflow: hidden; }
.shipby-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.shipby-search-row { margin-bottom: 12px; max-width: 420px; }
.shipby-search-results {
  margin-top: 8px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-primary);
}
.shipby-search-result {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}
.shipby-search-result:hover { background: var(--bg-secondary); }
.shipby-search-result:last-child { border-bottom: none; }
.shipby-selected-customer {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef2ff;
  font-size: 13px;
}
.shipby-modal--wide .shipby-modal-sheet--wide { width: min(720px, 100%); }
.shipby-modal-sheet--wide {
  display: flex;
  flex-direction: column;
}
.shipby-modal-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  border-bottom: 1px solid #ececf2;
  background: #faf9ff;
}
.shipby-tab-btn {
  flex: 1;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: transparent;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  color: #8a8a99;
}
.shipby-tab-btn--active {
  color: #5b28d4;
  background: #fff;
  border-color: #ececf2;
  box-shadow: 0 -2px 0 #7135e7 inset;
}
.shipby-items-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.shipby-product-search-wrap {
  margin-bottom: 12px;
}
.shipby-product-search-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.shipby-product-results {
  margin-top: 6px;
}
.shipby-product-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
  cursor: pointer;
}
.shipby-product-result:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}
.shipby-product-result-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.shipby-product-result-body strong {
  font-size: 13px;
  color: var(--text-primary);
}
.shipby-product-result-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.shipby-product-result-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.shipby-item-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 72px 88px 36px;
  gap: 8px;
  align-items: start;
}
.shipby-item-thumb-col {
  padding-top: 4px;
}
.shipby-item-thumb-wrap,
.shipby-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--border-color);
}
.shipby-item-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.shipby-item-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.shipby-item-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.shipby-modal-sheet--wide { position: relative; }
.shipby-storage-picker {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}
.shipby-storage-picker[hidden] { display: none !important; }
.shipby-storage-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid #ececf2;
}
.shipby-storage-picker-head h4 { margin: 0; font-size: 16px; }
.shipby-storage-picker-head p { margin: 4px 0 0; color: #8a8a99; font-size: 12px; }
.shipby-storage-picker-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
}
.shipby-storage-picker-tools label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 180px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #8a8a99;
}
.shipby-storage-search { flex: 2 1 220px; }
.shipby-storage-status { padding: 0 18px 8px; }
.shipby-storage-grid {
  flex: 1;
  overflow: auto;
  padding: 8px 18px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}
.shipby-storage-card {
  border: 1px solid #ececf2;
  border-radius: 10px;
  overflow: hidden;
  background: #faf9ff;
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.shipby-storage-card:hover { border-color: #7135e7; box-shadow: 0 0 0 3px rgba(113,53,231,.12); }
.shipby-storage-card img,
.shipby-storage-card-empty {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
  background: #ececf2;
}
.shipby-storage-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8a99;
}
.shipby-storage-card figcaption {
  padding: 7px 8px;
  font-size: 10px;
  line-height: 1.3;
  color: #444;
}
.shipby-storage-card strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shipby-storage-card small { color: #8a8a99; }
body.dark .shipby-storage-picker { background: #181821; }
body.dark .shipby-storage-card { background: #20202c; border-color: #3a3a47; }
.shipby-item-row input { width: 100%; }
.shipby-items-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shipby-items-preview-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
}
.shipby-items-preview-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.shipby-items-preview-body strong {
  font-size: 13px;
}
.shipby-items-preview-price {
  font-size: 12px;
  color: var(--text-secondary);
}
.shipby-order-items-section {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
}
.shipby-link-order-preview {
  margin-top: 12px;
}
.shipby-link-preview-card {
  padding: 12px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #f8faff;
}
.shipby-link-preview-head {
  margin-bottom: 10px;
  font-size: 14px;
}
.shipby-link-preview-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--text-secondary);
}
.shipby-track-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--primary-color-light);
  color: var(--text-primary);
  font-size: 13px;
  margin-bottom: 12px;
}
.shipby-action-btn--hub { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.shipby-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.shipby-stat-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-align: center;
}
.shipby-stat-card--green { border-color: #86efac; background: #f0fdf4; }
.shipby-stat-card--purple { border-color: #c4b5fd; background: #f5f3ff; }
.shipby-stat-card--gray { border-color: #d1d5db; background: #f9fafb; }
.shipby-stat-num { display: block; font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--text-primary); }
.shipby-stat-label { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.shipby-filter-caption {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8a8a99;
}
body.dark .shipby-filter-caption,
.dark .shipby-filter-caption { color: #a5a5b5; }
.shipby-header-check {
  margin-right: 6px;
  color: #55556a;
  font-size: 12px;
  white-space: nowrap;
}
body.dark .shipby-header-check,
.dark .shipby-header-check { color: #dddde7; }
.shipby-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #ececf2;
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfbff 0%, #fff 100%);
}
.shipby-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 150px;
  min-width: 140px;
}
.shipby-filter-search { flex: 2 1 220px; }
.shipby-filter-field span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8a8a99;
}
.shipby-filter-field .search-input,
.shipby-filter-field .filter-select {
  height: 40px;
  border: 1px solid #dedee7;
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  color: #25253a;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.shipby-filter-field .search-input:focus,
.shipby-filter-field .filter-select:focus {
  outline: none;
  border-color: #7135e7;
  box-shadow: 0 0 0 3px rgba(113, 53, 231, .12);
}
body.dark .shipby-filter-bar { background: #181821; border-color: #2b2b38; }
body.dark .shipby-filter-field span { color: #a5a5b5; }
body.dark .shipby-filter-field .search-input,
body.dark .shipby-filter-field .filter-select { background: #20202c; color: #eee; border-color: #3a3a47; }

body.dark .shipby-stat-card,
.dark .shipby-stat-card {
  background: #1b1b27;
  border-color: #302f3c;
}
body.dark .shipby-stat-card--green,
.dark .shipby-stat-card--green {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.38);
}
body.dark .shipby-stat-card--purple,
.dark .shipby-stat-card--purple {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.4);
}
body.dark .shipby-stat-card--gray,
.dark .shipby-stat-card--gray {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.32);
}
body.dark .shipby-stat-num,
.dark .shipby-stat-num {
  color: #fff;
}
body.dark .shipby-stat-card--green .shipby-stat-num,
.dark .shipby-stat-card--green .shipby-stat-num {
  color: #6ee7b7;
}
body.dark .shipby-stat-card--purple .shipby-stat-num,
.dark .shipby-stat-card--purple .shipby-stat-num {
  color: #c4b5fd;
}
body.dark .shipby-stat-card--gray .shipby-stat-num,
.dark .shipby-stat-card--gray .shipby-stat-num {
  color: #cbd5e1;
}
body.dark .shipby-stat-label,
.dark .shipby-stat-label {
  color: #a5a5b5;
}
body.dark .shipby-stat-card--green .shipby-stat-label,
.dark .shipby-stat-card--green .shipby-stat-label {
  color: #86efac;
}
body.dark .shipby-stat-card--purple .shipby-stat-label,
.dark .shipby-stat-card--purple .shipby-stat-label {
  color: #c4b5fd;
}
body.dark .shipby-stat-card--gray .shipby-stat-label,
.dark .shipby-stat-card--gray .shipby-stat-label {
  color: #94a3b8;
}
.shipby-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.shipby-view-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.shipby-view-tab--active {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}
.shipby-batch-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
}
.shipby-batch-inner h4 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text-primary);
}
.shipby-batch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.shipby-card { position: relative; }
.shipby-card--selected { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }
.shipby-card-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  cursor: pointer;
}
.shipby-card-select input { width: 16px; height: 16px; cursor: pointer; }
.shipby-card:has(.shipby-card-select) { padding-top: 28px; }
.shipby-internal-notes {
  margin: 16px 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}
.shipby-internal-notes textarea { margin-bottom: 8px; }
.shipby-action-btn--complete { border-color: #86efac; background: #f0fdf4; color: #166534; }
.shipby-action-btn--cancel { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.shipby-payment-hint { margin: 0 0 12px; font-size: 12px; }
.shipby-gps-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.shipby-gps-status {
  flex: 1 1 180px;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #166534;
}
.shipby-gps-status--loading { color: #1d4ed8; }
.shipby-gps-status--ok { color: #166534; }
.shipby-gps-status--error { color: #b91c1c; }
#shipbydopetz-event-gps-btn {
  flex-shrink: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#shipbydopetz-event-gps-btn .material-icons { font-size: 18px; }

/* ShipByDopetz — page shell (all viewports) */
#shipping-section-shipbydopetz.shipby-page {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
#shipping-section-shipbydopetz .filter-select,
#shipping-section-shipbydopetz .search-input,
#shipping-section-shipbydopetz .form-input,
#shipping-section-shipbydopetz .form-select {
  max-width: 100%;
  box-sizing: border-box;
}
#shipping-section-shipbydopetz .shipby-setup-bar .filter-select,
#shipping-section-shipbydopetz .shipby-setup-bar .search-input {
  width: 100%;
  min-width: 0;
}
#shipping-section-shipbydopetz .pwyw-shop-region-bar {
  margin-bottom: 16px;
}
#shipping-section-shipbydopetz .shipby-eligible-wrap .shipby-eligible-table {
  min-width: 0;
}
#shipping-section-shipbydopetz .shipby-table-scroll-hint {
  display: none;
  margin: 0 0 8px;
  font-size: 12px;
}
#shipping-section-shipbydopetz .shipby-card-head {
  flex-wrap: wrap;
  gap: 6px;
}
#shipping-section-shipbydopetz .shipby-card-head strong {
  font-size: 13px;
  word-break: break-all;
  color: var(--text-primary);
}
#shipping-section-shipbydopetz .shipby-card-sub {
  word-break: break-word;
}

@media (max-width: 768px) {
  .shipby-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .shipby-header-actions {
    width: 100%;
  }
  .shipby-header-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }
  .shipby-setup-bar label {
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
  }
  .shipby-setup-bar label.shipby-check {
    flex: 1 1 100%;
  }
  #shipping-section-shipbydopetz .pwyw-shop-region-bar {
    flex-direction: column;
    align-items: stretch;
  }
  #shipping-section-shipbydopetz .pwyw-shop-region-info {
    min-width: 0;
  }
  #shipping-section-shipbydopetz .pwyw-shop-region-field {
    width: 100%;
  }
  #shipping-section-shipbydopetz .pwyw-shop-region-field select {
    width: 100%;
  }
  .shipby-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shipby-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .shipby-filter-bar .search-input,
  .shipby-filter-bar .filter-select {
    width: 100%;
    min-width: 0;
    flex: none;
  }
  .shipby-view-tabs {
    width: 100%;
  }
  .shipby-view-tab {
    flex: 1;
    text-align: center;
    min-height: 44px;
  }
  .shipby-card-grid {
    grid-template-columns: 1fr;
  }
  .shipby-search-row {
    max-width: none;
    width: 100%;
  }
  .shipby-search-row .search-input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .shipby-modal {
    top: 0;
    left: 0;
    align-items: flex-end;
    padding: 0;
  }
  .shipby-modal-sheet {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top)));
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .shipby-modal-body {
    padding: 14px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .shipby-modal-foot {
    flex-wrap: wrap;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
  }
  .shipby-modal-foot .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
  .shipby-modal-head {
    padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top, 0));
  }
  .shipby-item-row {
    grid-template-columns: 52px 1fr 72px;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
  }
  .shipby-item-fields {
    grid-column: 2 / -1;
  }
  .shipby-item-row input[data-shipby-field="qty"],
  .shipby-item-row input[data-shipby-field="price"] {
    grid-column: span 1;
  }
  .shipby-item-row .btn-icon {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    min-width: 44px;
    min-height: 44px;
  }
  #shipbydopetz-create-modal .form-row,
  #shipbydopetz-event-modal .form-group,
  #shipbydopetz-usps-modal .form-group {
    margin-bottom: 12px;
  }
  #shipbydopetz-create-modal .form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .shipby-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .shipby-action-btn {
    justify-content: center;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 12px;
    text-align: center;
  }
  .shipby-action-btn .material-icons {
    font-size: 18px;
  }
  .shipby-detail-panel {
    margin-left: -4px;
    margin-right: -4px;
    border-radius: 12px;
  }
  .shipby-detail-inner {
    padding: 14px 12px;
    padding-top: calc(14px + env(safe-area-inset-top, 0));
  }
  .shipby-detail-head {
    position: relative;
    padding-right: 0;
    padding-top: 8px;
  }
  .shipby-detail-head h3 {
    font-size: 17px;
    word-break: break-word;
    padding-right: 44px;
  }
  .shipby-detail-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  .shipby-track-badge {
    flex-wrap: wrap;
    word-break: break-all;
    font-size: 12px;
  }
  .shipby-batch-actions .btn {
    flex: 1 1 100%;
    min-height: 44px;
    justify-content: center;
  }
  .shipby-section-block h4 {
    font-size: 15px;
    line-height: 1.4;
  }
  .shipby-section-block h4 .shipby-muted {
    display: block;
    margin-top: 4px;
    font-size: 11px;
  }
  /* Eligible orders — card rows on phone */
  #shipping-section-shipbydopetz .shipby-table-scroll-hint {
    display: none;
  }
  #shipping-section-shipbydopetz .shipby-eligible-wrap {
    overflow: visible;
    border: none;
    background: transparent;
    box-shadow: none;
  }
  #shipping-section-shipbydopetz .shipby-eligible-wrap::before,
  #shipping-section-shipbydopetz .shipby-eligible-wrap::after {
    display: none;
  }
  #shipping-section-shipbydopetz .shipby-eligible-table {
    min-width: 0;
    display: block;
  }
  #shipping-section-shipbydopetz .shipby-eligible-table thead {
    display: none;
  }
  #shipping-section-shipbydopetz .shipby-eligible-table tbody {
    display: block;
  }
  #shipping-section-shipbydopetz .shipby-eligible-table tr {
    display: block;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg, var(--bg-primary));
  }
  #shipping-section-shipbydopetz .shipby-eligible-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border: none;
    font-size: 13px;
    text-align: right;
  }
  #shipping-section-shipbydopetz .shipby-eligible-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    text-align: left;
  }
  #shipping-section-shipbydopetz .shipby-eligible-table td[data-label="Action"] {
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px dashed var(--border-color);
  }
  #shipping-section-shipbydopetz .shipby-eligible-table td[data-label="Action"]::before {
    margin-bottom: 4px;
  }
  #shipping-section-shipbydopetz .shipby-link-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

/* iPhone 12 mini (375px), SE (320px), and similar */
@media (max-width: 390px) {
  .shipby-title {
    font-size: 17px;
    gap: 8px;
  }
  .shipby-subtitle {
    font-size: 13px;
  }
  .shipby-setup-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 12px;
  }
  .shipby-setup-bar label {
    flex: 1 1 100%;
    min-width: 0;
  }
  .shipby-hub-scan-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }
  .shipby-hub-scan-bar .form-input,
  .shipby-hub-scan-bar .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  .shipby-hub-scan-actions .btn {
    flex: 1 1 100%;
    min-height: 44px;
  }
  .shipby-mark-paid-btn {
    margin-left: 0;
    width: 100%;
  }
  .shipby-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .shipby-stat-card {
    padding: 10px 8px;
  }
  .shipby-stat-num {
    font-size: 20px;
  }
  .shipby-stat-label {
    font-size: 10px;
  }
  .shipby-quick-actions {
    grid-template-columns: 1fr;
  }
  .shipby-action-btn {
    width: 100%;
    font-size: 13px;
  }
  .shipby-card {
    padding: 12px 12px 12px 36px;
  }
  .shipby-card-select {
    top: 8px;
    left: 8px;
  }
  .shipby-card-select input {
    width: 20px;
    height: 20px;
  }
  .shipby-status {
    font-size: 10px;
    padding: 2px 6px;
  }
  .shipby-header-actions {
    flex-direction: column;
  }
  .shipby-header-actions .btn {
    width: 100%;
  }
  .shipby-tab-btn {
    font-size: 12px;
    padding: 10px 6px;
  }
  .shipby-timeline {
    margin-left: 4px;
    padding-left: 12px;
  }
  .shipby-timeline-dot {
    left: -17px;
  }
}

@media (max-width: 320px) {
  .shipby-title {
    font-size: 16px;
  }
  .shipby-subtitle {
    font-size: 12px;
  }
  .shipby-view-tab {
    font-size: 12px;
    padding: 8px 10px;
  }
}

/* ShipByDopetz — dark mode */
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-stat-card {
  background: var(--surface);
  border-color: var(--border-color);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-stat-card--green {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-stat-card--purple {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(167, 139, 250, 0.35);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-stat-card--gray {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.28);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-stat-num,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-stat-label,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-card-name,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-card-head strong,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-title,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-detail-head h3,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-modal-head h3,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-track-badge,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-usps-track,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-batch-inner h4 {
  color: var(--text-primary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-stat-label,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-subtitle,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-muted,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-card-sub,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-card-loc,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-timeline-item p {
  color: var(--text-secondary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-card {
  background: var(--surface);
  border-color: var(--border-color);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(129, 140, 248, 0.2);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-detail-panel {
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.12), transparent);
  border-color: rgba(129, 140, 248, 0.35);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-status--blue {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-status--green {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-status--purple {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-status--gray {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-status--red {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn {
  background: var(--surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn--hub {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(147, 197, 253, 0.35);
  color: #93c5fd;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn--arrive,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn--complete {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(134, 239, 172, 0.35);
  color: #6ee7b7;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn--depart {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(253, 230, 138, 0.35);
  color: #fcd34d;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn--usps {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(199, 210, 254, 0.35);
  color: #a5b4fc;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn--dhl {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(253, 230, 138, 0.35);
  color: #fcd34d;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn--fedex {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(254, 202, 202, 0.35);
  color: #fca5a5;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-action-btn--cancel {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(254, 202, 202, 0.35);
  color: #fca5a5;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-batch-panel {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(129, 140, 248, 0.35);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-setup-bar {
  background: var(--surface);
  border-color: var(--border-color);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-empty {
  border-color: var(--border-color);
  color: var(--text-secondary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-empty--error {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-view-tab {
  background: var(--surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-view-tab--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-tab-btn {
  color: var(--text-secondary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-tab-btn--active {
  background: var(--primary-color-light);
  color: var(--text-primary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-gps-row {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-gps-status--ok {
  color: #6ee7b7;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-gps-status--loading {
  color: #93c5fd;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-gps-status--error {
  color: #fca5a5;
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-selected-customer {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-primary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-search-results {
  background: var(--surface);
  border-color: var(--border-color);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-search-result {
  color: var(--text-primary);
  border-bottom-color: var(--border-color);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-search-result:hover {
  background: var(--hover-bg);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-eligible-table tr {
  background: var(--surface);
  border-color: var(--border-color);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-eligible-table td {
  color: var(--text-primary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-eligible-table td::before {
  color: var(--text-secondary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .pwyw-shop-region-bar {
  background: var(--surface);
  border-color: var(--border-color);
}
[data-theme="dark"] #shipping-section-shipbydopetz .pwyw-shop-region-info strong,
[data-theme="dark"] #shipping-section-shipbydopetz .pwyw-muted {
  color: var(--text-primary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-item-row {
  background: var(--bg);
  border-color: var(--border-color);
}
[data-theme="dark"] .shipby-modal-sheet {
  background: var(--surface);
  color: var(--text-primary);
}
[data-theme="dark"] .shipby-modal-body,
[data-theme="dark"] .shipby-modal-foot {
  color: var(--text-primary);
}
[data-theme="dark"] .shipby-modal-head h3 {
  color: var(--text-primary);
}
[data-theme="dark"] .shipby-tab-btn {
  color: var(--text-secondary);
}
[data-theme="dark"] .shipby-tab-btn--active {
  color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}
[data-theme="dark"] .shipby-gps-row {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}
[data-theme="dark"] .shipby-gps-status {
  color: var(--text-secondary);
}
[data-theme="dark"] .shipby-gps-status--ok { color: #6ee7b7; }
[data-theme="dark"] .shipby-gps-status--loading { color: #93c5fd; }
[data-theme="dark"] .shipby-gps-status--error { color: #fca5a5; }
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-hub-scan-bar {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 14%, var(--surface)),
    color-mix(in srgb, #0ea5e9 10%, var(--surface))
  );
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-hub-scan-card,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-payment-badge,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-audit-icon {
  background: var(--surface);
  border-color: var(--border-color);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-audit-body p,
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-section-label {
  color: var(--text-secondary);
}
[data-theme="dark"] #shipping-section-shipbydopetz .shipby-hub-scan-error {
  color: #fca5a5;
}

/* Create / event / USPS modals sit on body, not inside the shipping section.
   Admin dark mode uses body.dark — cover the full order form. */
body.dark .shipby-modal,
.dark .shipby-modal {
  color-scheme: dark;
}
body.dark .shipby-modal-sheet,
.dark .shipby-modal-sheet {
  background: #171720;
  color: #eee;
  border-color: #302f3c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
body.dark .shipby-modal-head,
body.dark .shipby-modal-foot,
body.dark .shipby-modal-tabs,
.dark .shipby-modal-head,
.dark .shipby-modal-foot,
.dark .shipby-modal-tabs {
  background: #171720;
  border-color: #302f3c;
}
body.dark .shipby-modal-head h3,
.dark .shipby-modal-head h3 {
  color: #fff;
}
body.dark .shipby-modal .btn-icon,
.dark .shipby-modal .btn-icon {
  color: #c9c9d6;
}
body.dark .shipby-modal .btn-icon:hover,
.dark .shipby-modal .btn-icon:hover {
  background: #24232e;
  color: #fff;
}
body.dark .shipby-modal-tabs,
.dark .shipby-modal-tabs {
  background: #12121a;
}
body.dark .shipby-tab-btn,
.dark .shipby-tab-btn {
  color: #9a9aab;
  background: transparent;
  border-color: transparent;
}
body.dark .shipby-tab-btn--active,
.dark .shipby-tab-btn--active {
  color: #c7aaff;
  background: #171720;
  border-color: #302f3c;
  box-shadow: 0 -2px 0 #7440e8 inset;
}
body.dark .shipby-modal .form-label,
body.dark .shipby-modal .shipby-product-search-label,
body.dark .shipby-modal .pwyw-field span,
body.dark .shipby-storage-picker-tools label,
.dark .shipby-modal .form-label,
.dark .shipby-modal .shipby-product-search-label,
.dark .shipby-modal .pwyw-field span,
.dark .shipby-storage-picker-tools label {
  color: #a5a5b5;
}
body.dark .shipby-modal .form-input,
body.dark .shipby-modal .form-select,
body.dark .shipby-modal .form-textarea,
body.dark .shipby-modal .search-input,
body.dark .shipby-modal .filter-select,
.dark .shipby-modal .form-input,
.dark .shipby-modal .form-select,
.dark .shipby-modal .form-textarea,
.dark .shipby-modal .search-input,
.dark .shipby-modal .filter-select {
  background: #20202c;
  color: #eee;
  border-color: #3a3a47;
}
body.dark .shipby-modal .form-input::placeholder,
body.dark .shipby-modal .form-textarea::placeholder,
body.dark .shipby-modal .search-input::placeholder,
.dark .shipby-modal .form-input::placeholder,
.dark .shipby-modal .form-textarea::placeholder,
.dark .shipby-modal .search-input::placeholder {
  color: #7a7a8c;
}
body.dark .shipby-modal .form-input:focus,
body.dark .shipby-modal .form-select:focus,
.dark .shipby-modal .form-input:focus,
.dark .shipby-modal .form-select:focus {
  border-color: #7440e8;
  box-shadow: 0 0 0 3px rgba(116, 64, 232, 0.22);
}
body.dark .shipby-muted,
body.dark .shipby-payment-hint,
body.dark .shipby-storage-picker-head p,
body.dark .shipby-storage-status,
.dark .shipby-muted,
.dark .shipby-payment-hint,
.dark .shipby-storage-picker-head p,
.dark .shipby-storage-status {
  color: #9a9aab;
}
body.dark .shipby-check,
.dark .shipby-check {
  color: #dddde7;
}
body.dark .pwyw-shop-region-bar,
.dark .pwyw-shop-region-bar {
  background: #1b1b27;
  border-color: #302f3c;
}
body.dark .pwyw-shop-region-info strong,
.dark .pwyw-shop-region-info strong {
  color: #eee;
}
body.dark .shipby-selected-customer,
.dark .shipby-selected-customer {
  background: #241b35;
  color: #ddd;
}
body.dark .shipby-search-results,
.dark .shipby-search-results {
  background: #1b1b27;
  border-color: #302f3c;
}
body.dark .shipby-search-result,
.dark .shipby-search-result {
  color: #eee;
  border-bottom-color: #302f3c;
  background: transparent;
}
body.dark .shipby-search-result:hover,
.dark .shipby-search-result:hover {
  background: #29213a;
}
body.dark .shipby-product-result,
.dark .shipby-product-result {
  background: #1b1b27;
  border-color: #302f3c;
  color: #eee;
}
body.dark .shipby-product-result:hover,
.dark .shipby-product-result:hover {
  background: #29213a;
  border-color: #7440e8;
}
body.dark .shipby-product-result-body strong,
.dark .shipby-product-result-body strong {
  color: #fff;
}
body.dark .shipby-product-result-thumb--empty,
body.dark .shipby-item-thumb,
body.dark .shipby-item-thumb--empty,
.dark .shipby-product-result-thumb--empty,
.dark .shipby-item-thumb,
.dark .shipby-item-thumb--empty {
  background: #20202c;
  border-color: #3a3a47;
  color: #9a9aab;
}
body.dark .shipby-item-row,
.dark .shipby-item-row {
  background: transparent;
}
body.dark .shipby-link-preview-card,
.dark .shipby-link-preview-card {
  background: #1b1b27;
  border-color: #3b2d57;
  color: #eee;
}
body.dark .shipby-items-preview-item,
.dark .shipby-items-preview-item {
  background: #20202c;
  border-color: #3a3a47;
}
body.dark .shipby-storage-picker,
.dark .shipby-storage-picker {
  background: #171720;
  color: #eee;
}
body.dark .shipby-storage-picker-head,
.dark .shipby-storage-picker-head {
  border-color: #302f3c;
}
body.dark .shipby-storage-picker-head h4,
.dark .shipby-storage-picker-head h4 {
  color: #fff;
}
body.dark .shipby-storage-card,
.dark .shipby-storage-card {
  background: #1b1b27;
  border-color: #302f3c;
  color: #eee;
}
body.dark .shipby-storage-card figcaption,
.dark .shipby-storage-card figcaption {
  color: #ddd;
}
body.dark .shipby-storage-card small,
.dark .shipby-storage-card small {
  color: #9a9aab;
}
body.dark .shipby-storage-card-empty,
.dark .shipby-storage-card-empty {
  background: #20202c;
  color: #9a9aab;
}
body.dark .shipby-modal .btn-secondary,
.dark .shipby-modal .btn-secondary {
  background: #20202c;
  color: #eee;
  border-color: #3a3a48;
}
body.dark .shipby-modal-backdrop,
.dark .shipby-modal-backdrop {
  background: rgba(8, 8, 14, 0.72);
}

body.dark #shipping-section-shipbydopetz,
body.dark .shipby-page,
body.dark .shipby-modal,
.dark #shipping-section-shipbydopetz,
.dark .shipby-page,
.dark .shipby-modal {
  color-scheme: dark;
}

body.dark .shipby-flex-row--selected,
.dark .shipby-flex-row--selected {
  background: #241b35;
  border-color: #7440e8;
  box-shadow: 0 0 0 2px rgba(116, 64, 232, 0.28);
}

body.dark .shipby-batch-panel,
.dark .shipby-batch-panel {
  background: #241b35;
  border-color: #4c3d72;
}
body.dark .shipby-batch-inner h4,
.dark .shipby-batch-inner h4 {
  color: #eee;
}
body.dark .shipby-batch-inner h4 .material-icons,
.dark .shipby-batch-inner h4 .material-icons {
  color: #c7aaff;
}
body.dark .shipby-batch-inner .shipby-muted,
.dark .shipby-batch-inner .shipby-muted {
  color: #b8b0cc;
}

body.dark .shipby-detail-panel,
.dark .shipby-detail-panel {
  background: linear-gradient(180deg, rgba(116, 64, 232, 0.16), #151520);
  border-color: #4c3d72;
}
body.dark .shipby-detail-head h3,
body.dark .shipby-section-block h4,
body.dark .shipby-title,
.dark .shipby-detail-head h3,
.dark .shipby-section-block h4,
.dark .shipby-title {
  color: #fff;
}
body.dark .shipby-subtitle,
body.dark .shipby-muted,
body.dark .shipby-section-label,
body.dark .shipby-timeline-item p,
body.dark .shipby-setup-bar label,
.dark .shipby-subtitle,
.dark .shipby-muted,
.dark .shipby-section-label,
.dark .shipby-timeline-item p,
.dark .shipby-setup-bar label {
  color: #a5a5b5;
}
body.dark .shipby-timeline-item strong,
.dark .shipby-timeline-item strong {
  color: #eee;
}

body.dark .shipby-setup-bar,
.dark .shipby-setup-bar {
  background: #1b1b27;
  border-color: #302f3c;
}

body.dark .shipby-page select,
body.dark .shipby-page .form-select,
body.dark .shipby-page .filter-select,
body.dark .shipby-modal select,
.dark .shipby-page select,
.dark .shipby-page .form-select,
.dark .shipby-page .filter-select,
.dark .shipby-modal select {
  background: #20202c;
  color: #eee;
  border-color: #3a3a47;
  color-scheme: dark;
}
body.dark .shipby-page select option,
body.dark .shipby-modal select option,
.dark .shipby-page select option,
.dark .shipby-modal select option {
  background: #1b1b27;
  color: #eee;
}

body.dark .shipby-view-tab,
.dark .shipby-view-tab {
  background: #1b1b27;
  border-color: #302f3c;
  color: #ddd;
}
body.dark .shipby-view-tab--active,
.dark .shipby-view-tab--active {
  background: #7440e8;
  border-color: #7440e8;
  color: #fff;
}

body.dark .shipby-status--blue,
.dark .shipby-status--blue { background: rgba(59, 130, 246, 0.22); color: #93c5fd; }
body.dark .shipby-status--green,
.dark .shipby-status--green { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; }
body.dark .shipby-status--purple,
.dark .shipby-status--purple { background: rgba(139, 92, 246, 0.22); color: #c4b5fd; }
body.dark .shipby-status--gray,
.dark .shipby-status--gray { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
body.dark .shipby-status--red,
.dark .shipby-status--red { background: rgba(239, 68, 68, 0.22); color: #fca5a5; }

body.dark .shipby-action-btn,
.dark .shipby-action-btn {
  background: #1b1b27;
  border-color: #3a3a47;
  color: #eee;
}
body.dark .shipby-action-btn--depart,
.dark .shipby-action-btn--depart {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(253, 230, 138, 0.35);
  color: #fcd34d;
}
body.dark .shipby-action-btn--arrive,
body.dark .shipby-action-btn--complete,
.dark .shipby-action-btn--arrive,
.dark .shipby-action-btn--complete {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(134, 239, 172, 0.35);
  color: #6ee7b7;
}
body.dark .shipby-action-btn--usps,
.dark .shipby-action-btn--usps {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(199, 210, 254, 0.35);
  color: #a5b4fc;
}
body.dark .shipby-action-btn--dhl,
.dark .shipby-action-btn--dhl {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(253, 230, 138, 0.35);
  color: #fcd34d;
}
body.dark .shipby-action-btn--fedex,
.dark .shipby-action-btn--fedex {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(254, 202, 202, 0.35);
  color: #fca5a5;
}
body.dark .shipby-action-btn--hub,
.dark .shipby-action-btn--hub {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(147, 197, 253, 0.35);
  color: #93c5fd;
}
body.dark .shipby-action-btn--cancel,
.dark .shipby-action-btn--cancel {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(254, 202, 202, 0.35);
  color: #fca5a5;
}

body.dark .shipby-gps-row,
.dark .shipby-gps-row {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}
body.dark .shipby-gps-status--ok,
.dark .shipby-gps-status--ok { color: #6ee7b7; }
body.dark .shipby-gps-status--loading,
.dark .shipby-gps-status--loading { color: #93c5fd; }
body.dark .shipby-gps-status--error,
.dark .shipby-gps-status--error { color: #fca5a5; }

body.dark .shipby-empty,
.dark .shipby-empty {
  border-color: #3a3a47;
  color: #a5a5b5;
  background: #151520;
}
body.dark .shipby-track-badge,
body.dark .shipby-payment-badge,
.dark .shipby-track-badge,
.dark .shipby-payment-badge {
  background: #241b35;
  border-color: #4c3d72;
  color: #eee;
}
body.dark .shipby-page .btn-secondary,
body.dark .shipby-page .btn-ghost,
body.dark .shipby-batch-panel .btn-secondary,
body.dark .shipby-batch-panel .btn-ghost,
.dark .shipby-page .btn-secondary,
.dark .shipby-page .btn-ghost {
  background: #20202c;
  color: #eee;
  border-color: #3a3a48;
}
body.dark .shipby-page .btn-primary,
.dark .shipby-page .btn-primary {
  background: #7440e8;
  border-color: #7440e8;
  color: #fff;
}