.admin-shell {
  --brand: #e2231a;
  --brand-soft: #fff1f0;
  --line: #e5e5e5;
  --muted: #777;
  --admin-sidebar-width: 224px;
  --admin-topbar-height: 72px;
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: #f5f5f5;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

.admin-shell .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--admin-sidebar-width);
  padding: 28px 16px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: #fafafa;
}

.admin-shell .sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 12px;
  color: var(--brand);
  font-size: 25px;
  line-height: 1.2;
  font-weight: 750;
}

.admin-shell .sidebar .brand-mark {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
  background: #fff url("/assets/customer-logo-avatar.png?v=2.5.38-header-r2") center / cover no-repeat;
  color: transparent;
  font-size: 0;
  object-fit: cover;
  overflow: hidden;
}

.admin-shell .sidebar .brand > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-shell .sidebar .brand small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  white-space: normal;
}

.admin-shell .workspace-label {
  margin: 34px 12px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-shell .side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}

.admin-shell .side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: #666;
  font-size: 14px;
  font-weight: 500;
  transition:
    background-color 160ms,
    color 160ms;
}

.admin-shell .side-nav a svg {
  width: 19px;
  height: 19px;
}

.admin-shell .side-nav a:hover {
  background: #f0f0f0;
  color: var(--brand);
}

.admin-shell .side-nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 650;
}

.admin-shell .side-nav a.active::before {
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
  content: "";
}

.admin-shell .side-bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding: 20px 4px 0;
  border-top: 1px solid var(--line);
}

.admin-shell .side-bottom a,
.admin-shell .side-bottom .text-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  color: #666;
  font-size: 13px;
}

.admin-shell .side-bottom a:hover,
.admin-shell .side-bottom .text-button:hover {
  color: var(--brand);
}

.admin-shell .admin-main {
  grid-column: 2;
  min-width: 0;
  background: #fff;
}

.admin-shell .admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--admin-topbar-height);
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #777;
  font-size: 13px;
}

.admin-shell .admin-topbar > .row-gap {
  min-width: 0;
}

.admin-shell .admin-topbar > .row-gap > span {
  overflow-wrap: anywhere;
}

.admin-shell .admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #444;
  font-size: 13px;
}

.admin-shell .admin-user > span:last-child {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-shell .mini-avatar {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #f2d4d1;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 650;
}

.admin-shell .admin-topbar .admin-mobile-toggle {
  display: none;
}

.admin-shell .admin-content {
  width: 100%;
  max-width: 1600px;
  min-height: calc(100dvh - var(--admin-topbar-height));
  margin: 0 auto;
  padding: 30px 32px 80px;
  background: #fff;
}

.admin-shell .admin-content h1 {
  color: #222;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-shell .admin-content h2 {
  font-size: 21px;
  line-height: 1.4;
}

.admin-shell .admin-content h3 {
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 650;
}

.admin-shell .admin-content .page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 26px;
  padding: 0;
}

.admin-shell .page-heading > div:first-child {
  min-width: 0;
}

.admin-shell .page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.admin-shell .row-gap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-shell .page-heading > .row-gap {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-shell .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
  color: #555;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 550;
  white-space: nowrap;
}

.admin-shell .button:hover:not(:disabled) {
  border-color: #e8b3ae;
  background: #fff8f7;
  color: var(--brand);
}

.admin-shell .button.primary,
.admin-shell .button.dark {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.admin-shell .button.primary:hover:not(:disabled),
.admin-shell .button.dark:hover:not(:disabled) {
  border-color: #c81623;
  background: #c81623;
  color: #fff;
}

.admin-shell .button.small {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}

.admin-shell .button svg,
.admin-shell .text-button svg {
  width: 17px;
  height: 17px;
}

.admin-shell .icon-button {
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #666;
}

.admin-shell .icon-button:hover:not(:disabled) {
  border-color: #f0d6d3;
  background: var(--brand-soft);
  color: var(--brand);
}

.admin-shell .text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  color: var(--brand);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 500;
}

.admin-shell .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.admin-shell .section-head h3 small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.admin-shell .divider {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: var(--line);
}

.admin-shell .metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 30px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.admin-shell .metric {
  min-width: 0;
  padding: 0 24px;
  border-right: 1px solid var(--line);
}

.admin-shell .metric:first-child {
  padding-left: 0;
}

.admin-shell .metric:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-shell .metric small {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin-bottom: 9px;
  color: #777;
  font-size: 13px;
}

.admin-shell .metric small svg {
  width: 17px;
  height: 17px;
  color: #999;
}

.admin-shell .metric strong {
  display: block;
  color: #222;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.admin-shell .metric .trend {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-shell .platforms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-shell .platform-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: default;
  text-align: left;
  transition:
    border-color 160ms,
    background-color 160ms;
}

.admin-shell .platform-tile.selectable {
  cursor: pointer;
}

.admin-shell .platform-tile.selectable:hover {
  border-color: #ccc;
  background: #fafafa;
}

.admin-shell .platform-tile:focus-visible {
  outline: 3px solid rgba(225, 37, 27, 0.2);
  outline-offset: 2px;
}

.admin-shell .platform-tile.selected,
.admin-shell .platform-tile.selected:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.admin-shell .platform-tile:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.admin-shell .platform-copy {
  min-width: 0;
}

.admin-shell .platform-tile strong {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-shell .platform-tile small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-shell .platform-select-mark {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 160ms,
    transform 160ms;
}

.admin-shell .platform-select-mark svg {
  width: 14px;
  height: 14px;
}

.admin-shell .platform-tile.selected .platform-select-mark {
  opacity: 1;
  transform: scale(1);
}

.admin-shell .platform-symbol {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fff0e9;
  color: #c76032;
  font-size: 18px;
  font-weight: 700;
}

.admin-shell .platform-symbol.pdd {
  background: #fff0ed;
  color: #e1251b;
}

.admin-shell .platform-symbol.taobao,
.admin-shell .platform-symbol.haodanku {
  background: #fff3e8;
  color: #e85d04;
}

.admin-shell .platform-symbol.jd {
  background: #fff0f0;
  color: #c81623;
}

.admin-shell .platform-symbol.douyin {
  background: #f0f1f3;
  color: #17191c;
}

.admin-shell .platform-symbol.vip {
  background: #fff0f6;
  color: #d4237a;
}

.admin-shell .platform-symbol.kuaishou {
  background: #fff5ed;
  color: #e84a1b;
}

.admin-shell .platform-symbol.xianyu {
  background: #eef8ff;
  color: #087ea4;
}

.admin-shell .connection-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 3px solid #c79b49;
  background: #fff9ee;
  color: #82652d;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.admin-shell .toolbar,
.admin-shell .toolbar-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.admin-shell .toolbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-shell .toolbar-group {
  flex: 1 1 auto;
}

.admin-shell .toolbar input,
.admin-shell .toolbar select {
  min-width: 0;
  height: 42px;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
  color: #444;
  font-size: 13px;
}

.admin-shell .toolbar input {
  width: 280px;
  max-width: 100%;
}

.admin-shell .toolbar select {
  min-width: 130px;
}

.admin-shell .toolbar .button {
  min-height: 42px;
}

.admin-shell .product-tools {
  gap: 14px;
}

.admin-shell .product-tools .product-search {
  flex: 1 1 330px;
}

.admin-shell .product-tools .cleanup-days {
  flex: 0 1 auto;
  justify-content: flex-end;
}

.admin-shell .product-tools .cleanup-days input {
  width: 88px;
}

.admin-shell .product-tools .price-adjust {
  flex-wrap: nowrap;
}

.admin-shell .product-tools .price-adjust-label {
  color: #555;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-shell .product-tools .price-adjust select {
  width: 78px;
}

.admin-shell .product-tools .price-adjust input {
  width: 88px;
}

.admin-shell .product-tools .price-adjust > span:not(.price-adjust-label) {
  margin-left: -7px;
  color: #777;
  font-size: 12px;
}

.admin-shell .product-tools .cleanup-days label,
.admin-shell .product-tools .cleanup-days span {
  color: var(--muted);
  font-size: 13px;
}

.admin-shell .product-tools .product-count {
  flex: 0 0 auto;
}

.admin-shell .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  scrollbar-color: #ccc #f5f5f5;
  scrollbar-width: thin;
}

.admin-shell .data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-shell .data-table th {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f7f7;
  color: #777;
  font-size: 12px;
  font-weight: 550;
}

.admin-shell .data-table td {
  padding: 16px;
  border-bottom: 1px solid #eee;
  color: #555;
  vertical-align: middle;
}

.admin-shell .data-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-shell .data-table tbody tr:hover {
  background: #fafafa;
}

.admin-shell .data-table tbody tr:has(input[type="checkbox"]:checked) {
  background: #fff7f6;
}

.admin-shell .data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--brand);
}

.admin-shell .data-table td > strong {
  color: #333;
  font-size: 14px;
  font-weight: 650;
}

.admin-shell .data-table small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-shell .cell-product {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  max-width: 350px;
  white-space: normal;
}

.admin-shell .cell-product img {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #f5f5f5;
  object-fit: cover;
}

.admin-shell .cell-product > div {
  min-width: 0;
}

.admin-shell .cell-product strong {
  display: -webkit-box;
  overflow: hidden;
  color: #333;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 600;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-shell .cell-product small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.admin-shell .data-table .text-button {
  white-space: nowrap;
}

.admin-shell .data-table .row-gap {
  gap: 3px;
}

.admin-shell .pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #e7e7e7;
  border-radius: 5px;
  background: #fafafa;
  color: #777;
  font-size: 12px;
  line-height: 1.5;
}

.admin-shell .score {
  color: var(--brand);
  font-size: 21px;
  line-height: 1.5;
  font-weight: 650;
}

.admin-shell .score small {
  font-size: 12px;
  font-weight: 400;
}

.admin-shell .status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f0f0f0;
  color: #777;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.admin-shell .status.green {
  background: #edf6ef;
  color: #26704e;
}

.admin-shell .status.orange {
  background: #fff5e5;
  color: #936c28;
}

.admin-shell .status.blue {
  background: #edf3fa;
  color: #456f9b;
}

.admin-shell .status.red {
  background: #fceded;
  color: #b8484c;
}

.admin-shell .table-empty {
  height: 170px;
  text-align: center;
  color: var(--muted);
  white-space: normal;
}

.admin-shell .audit-detail {
  min-width: 280px;
  max-width: 480px;
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-shell .table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 16px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-shell .selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  margin-top: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -8px 18px #00000006;
  color: #666;
  font-size: 13px;
}

.admin-shell .selection-bar strong {
  padding: 0 3px;
  color: var(--brand);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.admin-shell .candidate-status-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.admin-shell .candidate-status-tabs button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #dddddd;
  border-radius: 6px;
  background: #fff;
  color: #555;
}

.admin-shell .candidate-status-tabs button:hover {
  border-color: #f0a09a;
  color: var(--brand);
}

.admin-shell .candidate-status-tabs button.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.admin-shell .candidate-status-tabs .candidate-delete-pending {
  margin-left: auto;
  color: #bd333b;
  border-color: #f1c6c9;
  background: #fff6f6;
}

.admin-shell .candidate-status-tabs .candidate-delete-pending:hover {
  color: #a5222a;
  border-color: #e6a5aa;
  background: #ffeded;
}

.admin-shell .candidate-status-tabs strong {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.admin-shell .settings-form {
  max-width: 900px;
}

.admin-shell .connections-list {
  max-width: 1100px;
}

.admin-shell .aggregate-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1100px;
  margin-bottom: 24px;
  padding: 18px 20px;
  border-left: 4px solid var(--brand);
  background: #f7f8fa;
}

.admin-shell .aggregate-lead,
.admin-shell .aggregate-stats,
.admin-shell .connection-switch-row,
.admin-shell .aggregate-search {
  display: flex;
  align-items: center;
}

.admin-shell .aggregate-lead {
  gap: 12px;
  min-width: 0;
}

.admin-shell .aggregate-mark {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #222;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-shell .aggregate-lead strong,
.admin-shell .aggregate-lead span {
  display: block;
}

.admin-shell .aggregate-lead strong {
  margin-bottom: 3px;
  color: #222;
  font-size: 15px;
}

.admin-shell .aggregate-lead div > span {
  color: var(--muted);
  font-size: 12px;
}

.admin-shell .aggregate-stats {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 24px;
  color: var(--muted);
  font-size: 12px;
}

.admin-shell .aggregate-stats strong {
  margin-right: 4px;
  color: #222;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.admin-shell .aggregate-connections {
  display: grid;
  grid-template-columns: minmax(0, 780px);
  gap: 18px;
}

.admin-shell .connection-form {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
}

.admin-shell .aggregate-connections .connection-form {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-shell .connection-form:first-child {
  padding-top: 0;
}

.admin-shell .connection-heading,
.admin-shell .connection-identity,
.admin-shell .connection-actions,
.admin-shell .connection-account {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.admin-shell .connection-heading {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-shell .connection-identity {
  flex-wrap: wrap;
  gap: 12px;
}

.admin-shell .connection-identity h2 {
  margin: 0;
  font-size: 17px;
}

.admin-shell .connection-identity p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-shell .connection-controls {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.admin-shell .connection-controls:disabled {
  opacity: 0.65;
}

.admin-shell .connection-account {
  align-items: flex-end;
  margin-bottom: 18px;
}

.admin-shell .connection-switch-row {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: #555;
  font-size: 13px;
}

.admin-shell .connection-account > .field {
  flex: 1 1 320px;
  max-width: 480px;
}

.admin-shell .connection-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.admin-shell .aggregate-connections .connection-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shell .connection-field,
.admin-shell .connection-form .field {
  min-width: 0;
}

.admin-shell .connection-form .field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  color: #555;
  font-size: 13px;
}

.admin-shell .connection-form .field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
}

.admin-shell .connection-form .checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #666;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-shell .connection-form .checkbox input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.admin-shell .connection-form .connection-clear {
  margin-top: 8px;
  min-height: 24px;
}

.admin-shell .connection-form .connection-enabled {
  min-height: 44px;
  flex-shrink: 0;
}

.admin-shell .connection-last-test {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 18px;
  color: #777;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-shell .connection-actions {
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 20px;
}

.admin-shell .connection-keyword {
  flex: 1 1 220px;
  max-width: 320px;
}

.admin-shell .connection-actions > .row-gap {
  flex-shrink: 0;
}

.admin-shell .connection-form .form-error {
  margin-top: 12px;
  overflow-wrap: anywhere;
}

.admin-shell .connection-form .required-mark {
  color: var(--brand);
}

.admin-shell .aggregate-collect-panel {
  max-width: 1100px;
  margin-top: 24px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-shell .collection-automation {
  max-width: 1100px;
  margin-top: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-shell .automation-summary,
.admin-shell .automation-controls,
.admin-shell .automation-meta,
.admin-shell .automation-progress {
  display: flex;
  align-items: center;
}

.admin-shell .automation-summary {
  justify-content: space-between;
  gap: 24px;
}

.admin-shell .automation-summary h3 {
  margin: 0;
}

.admin-shell .automation-summary p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-shell .automation-controls {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.admin-shell .automation-controls .field {
  display: flex;
  flex: 0 1 220px;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  color: #555;
  font-size: 13px;
}

.admin-shell .automation-controls select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
}

.admin-shell .automation-toggle {
  min-height: 42px;
  padding-right: 14px;
}

.admin-shell .automation-meta {
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.admin-shell .automation-progress {
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 10px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  color: #555;
}

.admin-shell .danger-text {
  color: var(--brand);
}

.admin-shell .aggregate-search {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.admin-shell .aggregate-search .field {
  display: flex;
  flex: 1 1 190px;
  flex-direction: column;
  gap: 7px;
  max-width: 640px;
  margin: 0;
  color: #555;
  font-size: 13px;
}

.admin-shell .aggregate-search input,
.admin-shell .aggregate-search select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
}

@media (max-width: 1000px) {
  .admin-shell .aggregate-connections {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-shell .connection-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .admin-shell .aggregate-overview,
  .admin-shell .aggregate-search,
  .admin-shell .automation-summary,
  .admin-shell .automation-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-shell .aggregate-stats {
    justify-content: flex-start;
  }

  .admin-shell .connection-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-shell .connection-account,
  .admin-shell .connection-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .admin-shell .connection-account > .field,
  .admin-shell .connection-keyword {
    flex-basis: auto;
    max-width: none;
  }

  .admin-shell .connection-actions > .row-gap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell .connection-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    white-space: normal;
  }

  .admin-shell .aggregate-search .field {
    flex-basis: auto;
    max-width: none;
  }

  .admin-shell .aggregate-search .button {
    width: 100%;
  }

  .admin-shell .automation-summary .button,
  .admin-shell .automation-controls .button,
  .admin-shell .automation-controls .field {
    width: 100%;
    flex-basis: auto;
  }
}

.admin-shell .settings-form h3 {
  margin: 32px 0 20px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.admin-shell .settings-form h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.admin-shell .settings-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.admin-shell .settings-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: #666;
  font-size: 13px;
}

.admin-shell .settings-form .field.full {
  grid-column: 1 / -1;
}

.admin-shell .settings-form input,
.admin-shell .settings-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

.admin-shell .settings-form textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-shell .settings-save {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.admin-shell .app-release-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.admin-shell .app-release-current h3 {
  margin: 12px 0 6px;
  font-size: 18px;
}

.admin-shell .app-release-current p,
.admin-shell .app-release-note span {
  margin: 0;
  color: #777;
  line-height: 1.7;
}

.admin-shell .ios-webclip-current code {
  display: inline-block;
  margin-top: 10px;
  color: #555;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.admin-shell .app-release-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.admin-shell .app-release-form {
  max-width: 900px;
}

.admin-shell .app-package-picker input[type="file"] {
  padding: 9px;
}

.admin-shell .app-release-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 900px;
  margin-top: 24px;
}

.admin-shell .filter-tabs {
  display: flex;
  gap: 20px;
  margin: 0 0 22px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.admin-shell .filter-tabs button {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #777;
  font-size: 13px;
  white-space: nowrap;
}

.admin-shell .filter-tabs button.active {
  border-bottom-color: var(--brand);
  background: transparent;
  color: var(--brand);
  font-weight: 650;
}

.admin-shell .order-card {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.admin-shell .order-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid #eee;
  background: #f8f8f8;
  color: #888;
  font-size: 12px;
}

.admin-shell .order-card header > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-shell .order-body {
  padding: 4px 18px;
}

.admin-shell .mini-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid #eee;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
}

.admin-shell .mini-item:last-child {
  border-bottom: 0;
}

.admin-shell .mini-item img {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
}

.admin-shell .mini-item > div {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.admin-shell .mini-item > strong {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.admin-shell .mini-item small {
  font-size: 12px;
}

.admin-shell .order-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #eee;
  font-size: 13px;
}

.admin-shell .order-actions > span:first-child {
  margin-right: auto;
}

.admin-shell .order-actions .price {
  margin-left: 4px;
  color: #e2231a;
  font-size: 17px;
  font-weight: 650;
}

.admin-shell .login-shell {
  width: min(100%, 430px);
  margin: 48px auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-shell .empty {
  max-width: 660px;
  margin: 36px auto;
  padding: 40px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.admin-shell .empty h2 {
  font-size: 20px;
}

.admin-shell .empty p {
  font-size: 13px;
  line-height: 1.8;
}

.admin-shell :is(button, a):focus-visible {
  outline: 3px solid #f4b3af;
  outline-offset: 3px;
}

.admin-shell :is(input, select, textarea):focus-visible {
  outline: 2px solid #ec8e88;
  outline-offset: 1px;
}

@media (max-width: 1100px) {
  .admin-shell {
    --admin-sidebar-width: 204px;
  }

  .admin-shell .admin-content {
    padding: 26px 24px 80px;
  }

  .admin-shell .admin-topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .admin-shell .metric {
    padding: 0 16px;
  }

  .admin-shell .metric strong {
    font-size: 24px;
  }

  .admin-shell .platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell .admin-content .page-heading {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .admin-shell {
    --admin-topbar-height: 64px;
    --admin-sidebar-width: 236px;
    display: block;
  }

  .admin-shell .sidebar {
    top: var(--admin-topbar-height);
    width: min(var(--admin-sidebar-width), calc(100% - 48px));
    padding-top: 22px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    visibility: hidden;
    transform: translateX(-100%);
    transition:
      transform 180ms ease,
      visibility 180ms;
  }

  .admin-shell .sidebar.open {
    visibility: visible;
    transform: translateX(0);
    box-shadow: 8px 0 22px #00000014;
  }

  .admin-shell .workspace-label {
    margin-top: 26px;
  }

  .admin-shell .admin-main {
    width: 100%;
    margin: 0;
  }

  .admin-shell .admin-topbar {
    z-index: 50;
    height: var(--admin-topbar-height);
    gap: 10px;
    padding: 10px 14px;
    font-size: 12px;
  }

  .admin-shell .admin-topbar > .row-gap {
    flex: 1 1 auto;
    gap: 8px;
  }

  .admin-shell .admin-topbar .admin-mobile-toggle {
    display: inline-flex;
    flex-basis: 38px;
    border-color: var(--line);
    background: #fff;
  }

  .admin-shell .admin-user {
    flex: 0 0 auto;
    gap: 6px;
  }

  .admin-shell .admin-user > span:last-child {
    max-width: 62px;
    font-size: 12px;
  }

  .admin-shell .admin-user .status {
    display: none;
  }

  .admin-shell .admin-content {
    padding: 24px 16px calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .admin-shell .admin-content h1 {
    font-size: 22px;
  }

  .admin-shell .admin-content .page-heading {
    gap: 16px;
    margin-bottom: 24px;
  }

  .admin-shell .page-heading > .row-gap {
    justify-content: flex-start;
    gap: 8px;
  }

  .admin-shell .page-heading p {
    font-size: 13px;
  }

  .admin-shell .section-head {
    align-items: flex-start;
    gap: 12px;
  }

  .admin-shell .section-head .text-button {
    flex: 0 0 auto;
    font-size: 12px;
  }

  .admin-shell .section-head h3 small {
    display: block;
    margin: 3px 0 0;
  }

  .admin-shell .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 0;
    margin-bottom: 26px;
    padding: 20px 0;
  }

  .admin-shell .metric {
    padding: 0 16px;
  }

  .admin-shell .metric:nth-child(odd) {
    padding-left: 0;
  }

  .admin-shell .metric:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-shell .metric strong {
    font-size: 24px;
  }

  .admin-shell .metric small {
    font-size: 12px;
  }

  .admin-shell .platforms {
    gap: 10px;
  }

  .admin-shell .platform-tile {
    gap: 9px;
    min-height: 84px;
    padding: 12px;
  }

  .admin-shell .platform-tile strong {
    font-size: 13px;
  }

  .admin-shell .platform-symbol {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .admin-shell .connection-note {
    padding: 11px 12px;
    font-size: 12px;
  }

  .admin-shell .toolbar {
    gap: 10px;
  }

  .admin-shell .toolbar-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex-basis: 100%;
    gap: 8px;
    width: 100%;
  }

  .admin-shell .product-tools .cleanup-days {
    grid-template-columns: auto minmax(72px, 1fr) auto;
    flex-basis: 100%;
    justify-content: stretch;
  }

  .admin-shell .product-tools .price-adjust {
    grid-template-columns: auto auto minmax(72px, 1fr) auto;
    flex-basis: 100%;
    justify-content: stretch;
  }

  .admin-shell .product-tools .price-adjust .button {
    grid-column: 1 / -1;
  }

  .admin-shell .product-tools .cleanup-days .button {
    grid-column: 1 / -1;
  }

  .admin-shell .product-tools .product-count {
    width: 100%;
  }

  .admin-shell .toolbar input,
  .admin-shell .toolbar select {
    width: 100%;
    min-width: 0;
    font-size: 14px;
  }

  .admin-shell #candidate-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: end;
  }

  .admin-shell #candidate-filter .toolbar-group input {
    grid-column: 1 / -1;
  }

  .admin-shell #candidate-filter > .icon-button {
    margin-bottom: 2px;
  }

  .admin-shell .data-table th,
  .admin-shell .data-table td {
    padding: 13px 12px;
  }

  .admin-shell .cell-product {
    min-width: 215px;
    max-width: 285px;
    gap: 10px;
  }

  .admin-shell .cell-product img {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .admin-shell .table-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 14px 0;
  }

  .admin-shell .selection-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    min-height: 104px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .admin-shell .candidate-status-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .admin-shell .candidate-status-tabs button {
    flex: 0 0 auto;
  }

  .admin-shell .selection-bar .row-gap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 8px;
  }

  .admin-shell .selection-bar .button {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
  }

  .admin-shell .settings-form .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .admin-shell .settings-form input,
  .admin-shell .settings-form textarea {
    font-size: 16px;
  }

  .admin-shell .app-release-current {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .admin-shell .app-release-current .button {
    width: 100%;
  }

  .admin-shell .app-release-actions {
    flex-direction: column;
    width: 100%;
  }

  .admin-shell .settings-save .button {
    width: 100%;
    min-height: 44px;
  }

  .admin-shell .filter-tabs {
    gap: 18px;
  }

  .admin-shell .order-card header {
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .admin-shell .order-body {
    padding: 2px 12px;
  }

  .admin-shell .mini-item {
    align-items: flex-start;
    gap: 10px;
  }

  .admin-shell .mini-item > strong {
    max-width: 95px;
    overflow-wrap: anywhere;
  }

  .admin-shell .order-actions {
    gap: 8px;
    padding: 12px;
  }

  .admin-shell .order-actions > span:first-child {
    flex-basis: 100%;
    margin: 0 0 4px;
    text-align: right;
  }

  .admin-shell .login-shell {
    margin: 28px auto;
  }

  .admin-shell .empty {
    margin: 20px auto;
    padding: 24px 0;
  }
}

@media (max-width: 360px) {
  .admin-shell .admin-user > span:last-child {
    display: none;
  }

  .admin-shell .platform-tile {
    gap: 7px;
    padding: 10px;
  }

  .admin-shell .metric strong {
    font-size: 22px;
  }
}

.publish-item {
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}
.publish-item .mini-item > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.publish-item .mini-item > .publish-remove {
  flex: 0 0 auto;
  color: #b42318;
  white-space: nowrap;
}
.publish-item small {
  display: block;
  margin-top: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .admin-shell .sidebar,
  .admin-shell .side-nav a,
  .admin-shell .platform-tile,
  .admin-shell .platform-select-mark {
    transition: none;
  }
}
.review-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
.review-gallery > * { min-width: 0; font-size: 12px; }
.review-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #f7f8fa; margin-bottom: 6px; }
.review-gallery label { display: block; }
/* Keep batch filters usable at narrow desktop and mobile widths. */
#candidate-filter .toolbar-group { flex-wrap: wrap; min-width: 0; align-items: end; }
#candidate-filter .field { flex: 1 1 140px; min-width: 0; }
#candidate-filter input, #candidate-filter select { max-width: 100%; min-width: 120px; flex: 1 1 140px; }
#candidate-filter .field input { width: 100%; flex: none; min-width: 0; height: 42px; }
@media (max-width: 680px) {
  .admin-shell #candidate-filter .toolbar-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #candidate-filter input, #candidate-filter select { min-width: 0; }
}
.batch-pricing { border: 0; border-bottom: 1px solid #e5e7eb; margin: 0 0 20px; padding: 0 0 16px; min-width: 0; }
.batch-pricing legend { font-weight: 600; padding: 0 0 12px; }
.batch-specifications { grid-column: 1 / -1; min-width: 0; padding: 16px 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.batch-specification-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.batch-specification-heading span { color: #777777; font-size: 12px; }
.batch-specification-action .button { width: 100%; }
.batch-specification-result { display: block; margin-top: 10px; padding: 10px 12px; border: 1px solid #b9dfc9; border-radius: 5px; color: #126f3f; background: #effaf3; font-size: 13px; font-weight: 600; line-height: 1.5; }
.batch-specification-result.error { border-color: #efb9b4; color: #b8241c; background: #fff3f2; }
.merchant-sku-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.merchant-sku-heading > span { font-weight: 600; }
.merchant-sku-heading .button { min-height: 38px; padding: 7px 12px; }
.merchant-sku-labels,
.merchant-sku-row { display: grid; grid-template-columns: minmax(140px, 1.7fr) minmax(110px, 1fr) 38px; gap: 8px; align-items: center; }
.merchant-sku-labels { padding: 0 2px; color: #777777; font-size: 12px; }
.merchant-sku-row { margin-top: 8px; }
.merchant-sku-row input { width: 100%; min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid #dddddd; border-radius: 5px; font: inherit; }
.merchant-sku-row input:focus { border-color: var(--red); outline: 2px solid #ffd7d3; outline-offset: 1px; }
.merchant-sku-row .icon-button { width: 38px; height: 38px; color: #888888; }
@media (max-width: 560px) {
  .merchant-sku-labels,
  .merchant-sku-row { grid-template-columns: minmax(110px, 1.45fr) minmax(92px, 1fr) 38px; }
  .merchant-sku-heading { align-items: flex-start; }
}
