.inbox {
  position: relative;
  flex-shrink: 0;
}
.inbox-toggle {
  position: relative;
}
.inbox-count {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  box-sizing: border-box;
  border-radius: 20px;
  background: #ce2546;
  color: #fff;
  border: 2px solid #fff;
  font:
    600 10px/14px Arial,
    sans-serif;
}
.inbox-count[hidden] {
  display: none;
}
.inbox-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  width: 380px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid #e1e7f0;
  border-radius: 16px;
  box-shadow: 0 18px 60px #112b5326;
  z-index: 240;
  text-align: left;
  color: #172c4e;
  overflow: hidden;
}
.inbox-panel[hidden] {
  display: none;
}
.inbox-panel > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid #edf0f5;
}
.inbox-panel h2 {
  font-size: 16px;
  margin: 0;
  flex: 1;
}
.inbox-mark {
  font: 600 11px/1.4 inherit;
  background: none;
  color: #2e548f;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
}
.inbox-mark:disabled {
  color: #8490a3;
  cursor: default;
}
.inbox-panel > header .icon-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  background: #f4f6fa !important;
  border-radius: 8px !important;
}
.inbox-list {
  max-height: min(480px, 65dvh);
  overflow: auto;
  overscroll-behavior: contain;
}
.inbox-item {
  position: relative;
  display: block;
  padding: 15px 18px 15px 24px;
  border-bottom: 1px solid #edf0f5;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s;
}
.inbox-item:last-child {
  border: 0;
}
.inbox-item:hover,
.inbox-item:focus-visible {
  background: #f4f7fc;
  outline-offset: -3px;
}
.inbox-item.unread {
  background: #f7f9fd;
}
.inbox-item.unread:before {
  content: "";
  position: absolute;
  left: 10px;
  top: 21px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d12849;
}
.inbox-item b,
.inbox-item span,
.inbox-item small {
  display: block;
}
.inbox-item b {
  font-size: 13px;
  line-height: 1.5;
}
.inbox-item span {
  font-size: 12px;
  line-height: 1.6;
  color: #67768b;
  margin: 4px 0 7px;
}
.inbox-item small {
  font-size: 10px;
  color: #7b8799;
}
.inbox-item time {
  font-size: 10px;
  color: #7b8799;
  display: block;
  margin-top: 3px;
}
.inbox-state {
  padding: 24px 18px;
  color: #7b8799;
  font-size: 13px;
  margin: 0;
}
.fulfillment-panel {
  margin-bottom: 20px;
}
.fulfillment-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.fulfillment-heading h2 {
  margin: 0 0 6px;
}
.fulfillment-heading p {
  font-size: 13px;
  color: #738098;
  margin: 0;
}
.fulfillment-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 22px 0;
  padding: 0;
  gap: 12px;
}
.fulfillment-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #929cac;
  min-width: 0;
}
.fulfillment-steps li > span {
  display: grid;
  place-items: center;
  border: 1px solid #e2e7ef;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
}
.fulfillment-steps li.done {
  color: #25497e;
}
.fulfillment-steps li.done > span {
  background: #eef3fc;
  color: #2854a2;
  border-color: #e0e8f7;
}
.fulfillment-steps svg {
  width: 16px;
  height: 16px;
}
.order-invoice-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #e1e7f0;
  background: white;
  border-radius: 12px;
  font-size: 13px;
}
.order-invoice-link > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.invoice-pending {
  font-size: 12px;
  color: #718099;
  margin: 0;
  padding: 0 4px 4px;
}
@media (max-width: 767px) {
  .inbox-panel {
    position: fixed;
    top: 74px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
  .inbox-list {
    max-height: min(480px, calc(100dvh - 200px));
  }
  .fulfillment-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .fulfillment-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .order-invoice-link {
    padding: 12px;
    font-size: 12px;
  }
  .storefront .header-row > .brand {
    min-width: 90px;
  }
  .storefront .header-actions {
    gap: 6px;
  }
  .storefront .header-actions .inbox-toggle {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .inbox-item {
    transition: none;
  }
}

.admin-topbar .top-actions > .btn {
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 0;
}
.admin-topbar .top-actions {
  flex-shrink: 0;
}
