/* BigBen — black/white mono ledger (HoC IA, unique skin; no Bootstrap blue) */

/* Auth — full-bleed Big Ben photo background */
.bb-auth {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: #7FA0C4;
  overflow: hidden;
}

.bb-auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bb-auth-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 18% 42%;
}

.bb-auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 14, 22, 0.28) 0%, rgba(8, 14, 22, 0.12) 42%, rgba(8, 14, 22, 0.22) 100%),
    linear-gradient(180deg, rgba(8, 14, 22, 0.18) 0%, rgba(8, 14, 22, 0.08) 38%, rgba(8, 14, 22, 0.34) 100%);
}

.bb-auth-stage {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
}

.bb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.bb-brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.bb-brand-mark img {
  width: 22px;
  height: 22px;
  filter: grayscale(1) contrast(1.2);
}

.bb-brand-name {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.bb-brand-name i {
  display: none;
}

.bb-auth-lead {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.98rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.bb-auth .auth-card-v4 {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  padding: 22px 22px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
}

.bb-auth .lens-kicker-v3 {
  color: #6B6B6B;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.bb-auth .auth-card-head-v4 h2 {
  margin: 6px 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-auth .auth-card-head-v4 p,
.bb-auth .auth-meta-v4 {
  color: #6B6B6B;
}

.bb-auth .input,
.bb-auth .field-inline {
  background: #fff;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  color: #0A0A0A;
}

.bb-auth .field-inline:focus-within,
.bb-auth .input:focus {
  border-color: #0A0A0A;
  box-shadow: none;
  outline: 1px solid #0A0A0A;
}

.bb-auth .auth-submit-v4,
.bb-auth button.auth-submit-v4,
.bb-auth .btn-primary {
  background: #0A0A0A !important;
  color: #fff !important;
  border: 1px solid #0A0A0A !important;
  border-radius: 4px !important;
  font-weight: 600;
  box-shadow: none !important;
}

.bb-auth .auth-submit-v4:hover {
  background: #1F1F1F !important;
}

.bb-auth .text-link {
  color: #0A0A0A;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bb-auth .captcha-panel {
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-auth .badge.is-green {
  background: #F0F0F0;
  color: #0A0A0A;
  border: 1px solid #C8C8C8;
}

/* ── Client shell: mast + left rail (Mono Ledger) ── */
body.client-shell .app-main {
  display: grid !important;
  grid-template-columns: 248px minmax(0, 1fr);
  grid-template-rows: 52px auto minmax(0, 1fr);
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  box-sizing: border-box;
}

body.client-shell .bb-shell-mast {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #E4E4E4;
  position: sticky;
  top: 0;
  z-index: 40;
}

body.client-shell .bb-shell-mast-start {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

body.client-shell .bb-shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0A0A0A;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

body.client-shell .bb-shell-brand img {
  display: block;
}

body.client-shell .bb-shell-mast-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
  margin-left: auto;
}

body.client-shell .bb-shell-role {
  color: #6B6B6B;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

body.client-shell .bb-shell-balance {
  font-variant-numeric: tabular-nums;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  color: #0A0A0A;
}

body.client-shell .bb-shell-mast-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

body.client-shell .bb-shell-mast-nav-left {
  overflow-x: auto;
  scrollbar-width: none;
}

body.client-shell .bb-shell-mast-nav-left::-webkit-scrollbar {
  display: none;
}

body.client-shell .bb-shell-mast-link,
body.client-shell .bb-shell-admin,
body.client-shell .bb-shell-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  background: #fff;
  color: #0A0A0A;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

body.client-shell .bb-shell-mast-link i {
  color: #6B6B6B;
}

body.client-shell .bb-shell-mast-link:hover,
body.client-shell .bb-shell-admin:hover,
body.client-shell .bb-shell-logout:hover {
  border-color: #0A0A0A;
}

body.client-shell .bb-shell-mast-link.is-active {
  background: #0A0A0A;
  border-color: #0A0A0A;
  color: #fff;
}

body.client-shell .bb-shell-mast-link.is-active i {
  color: #fff;
}

body.client-shell .bb-shell-mast-link {
  position: relative;
}

body.client-shell .bb-shell-support-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #E5484D;
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

body.client-shell .bb-shell-support-badge[hidden] {
  display: none !important;
}

body.client-shell .bb-shell-support-badge.is-alert:not([hidden]) {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(229, 72, 77, 0.28);
  animation: bb-admin-badge-pulse 1.6s ease-in-out infinite;
}

body.client-shell .bb-shell-mast-link.is-active .bb-shell-support-badge {
  box-shadow: 0 0 0 2px #0A0A0A;
}

body.client-shell .bb-shell-rail {
  grid-column: 1;
  grid-row: 2 / -1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px 24px;
  background: #fff;
  border-right: 1px solid #E4E4E4;
  min-height: 0;
  overflow: auto;
}

body.client-shell .bb-shell-nav,
body.client-shell .bb-shell-tools {
  display: grid;
  gap: 4px;
}

body.client-shell .bb-shell-tools {
  padding-top: 12px;
  border-top: 1px solid #E4E4E4;
}

body.client-shell .bb-shell-brand-art {
  margin-top: auto;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 20px 4px 8px;
  pointer-events: none;
  user-select: none;
}

body.client-shell .bb-shell-brand-art img {
  width: min(168px, 100%);
  height: auto;
  opacity: 0.96;
}

body.client-shell .bb-shell-brand-art span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6B6B6B;
  font-weight: 500;
}

body.client-shell .bb-shell-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 4px;
  color: #0A0A0A;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

body.client-shell .bb-shell-link i {
  width: 1.1em;
  text-align: center;
  color: #6B6B6B;
}

body.client-shell .bb-shell-link:hover {
  background: #F5F5F5;
}

body.client-shell .bb-shell-link.is-active {
  background: #0A0A0A !important;
  color: #fff !important;
}

body.client-shell .bb-shell-link.is-active i {
  color: #fff !important;
}

body.client-shell .bb-shell-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: #0A0A0A;
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

body.client-shell .bb-shell-link.is-active .bb-shell-badge {
  background: #fff;
  color: #0A0A0A;
}

body.client-shell .bb-shell-map {
  grid-column: 2;
  grid-row: 2;
  margin: 14px 18px 0;
}

body.client-shell .content-stage {
  grid-column: 2;
  grid-row: 3;
  padding: 18px 18px 48px !important;
  min-width: 0;
  overflow: auto;
}

body.client-shell:not(:has(.bb-shell-map)) .content-stage {
  grid-row: 2 / -1;
}

/* When bb-* pages own the title, hide chrome copy (keep stats/actions) */
body.client-shell:has(.bb-shop, .bb-wallet, .bb-cart, .bb-orders, .bb-seller, .bb-news, .bb-support, .bb-faq) .page-map-copy-v5 h1,
body.client-shell:has(.bb-shop, .bb-wallet, .bb-cart, .bb-orders, .bb-seller, .bb-news, .bb-support, .bb-faq) .page-map-copy-v5 p {
  display: none !important;
}

body.client-shell:has(.bb-shop, .bb-wallet, .bb-cart, .bb-orders, .bb-seller, .bb-news, .bb-support, .bb-faq) .client-page-map-v5 {
  background: #fff !important;
  background-image: none !important;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  backdrop-filter: none !important;
  box-shadow: none !important;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 14px;
}

body.client-shell:has(.bb-shop, .bb-wallet, .bb-cart, .bb-orders, .bb-seller, .bb-news, .bb-support, .bb-faq) .page-map-copy-v5:not(:has(.lens-kicker-v3:not([hidden]))) {
  display: none;
}

body.client-shell:has(.bb-shop, .bb-wallet, .bb-cart, .bb-orders, .bb-seller, .bb-news, .bb-support, .bb-faq) .page-map-stats-v5 {
  margin-left: 0;
  flex: 1 1 auto;
  justify-content: flex-start;
}

body.client-shell .page-map-stats-v5 article,
body.client-shell .page-map-stats-v5 i {
  color: #6B6B6B;
  background-image: none !important;
}

body.client-shell .page-map-stats-v5 strong {
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

/* Cart: content owns Clear / Confirm — hide dead chrome stubs */
body.client-shell.page-cart .page-map-actions-v5 {
  display: none !important;
}

/* Seller: metrics live in bb-seller — hide chrome duplicate strip */
body.client-shell.page-seller-dashboard .page-map-stats-v5 {
  display: none !important;
}

/* Wallet: content owns deposit stats */
body.client-shell.page-wallet .page-map-stats-v5 {
  display: none !important;
}

body.client-shell button:disabled,
body.client-shell .bb-btn:disabled,
body.client-shell [data-buy-cart]:disabled,
body.client-shell [data-clear-cart]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #F0F0F0 !important;
  color: #6B6B6B !important;
  border-color: #C8C8C8 !important;
}

body.client-shell,
body.admin-shell,
body.auth-page {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  background: #F5F5F5 !important;
}

body.client-shell .client-context-v4 strong {
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

body.client-shell .lens-kicker-v3,
body.client-shell .page-map-copy-v5 .lens-kicker-v3 {
  color: #6B6B6B;
}

body.client-shell .btn-primary,
body.admin-shell .btn-primary,
body.client-shell .lens-submit-v3 {
  background: #0A0A0A !important;
  color: #fff !important;
  border: 1px solid #0A0A0A !important;
  border-radius: 4px;
  font-weight: 600;
}

body.client-shell .badge.is-green {
  background: #fff;
  color: #0A0A0A;
  border: 1px solid #0A0A0A;
}

/* Shop — dense console + ledger */
.bb-shop {
  display: grid;
  gap: 14px;
}

.bb-shop-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bb-shop-head h1 {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0A0A0A;
}

.bb-shop-head p {
  margin: 4px 0 0;
  color: #6B6B6B;
  font-size: 0.9rem;
}

.bb-shop-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #0A0A0A;
  background: #fff;
  color: #0A0A0A;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.bb-btn-primary {
  background: #0A0A0A;
  color: #fff;
}

.bb-btn-primary:hover {
  background: #1F1F1F;
  color: #fff;
}

.bb-btn-ghost {
  background: #fff;
  border-color: #C8C8C8;
}

.bb-btn-ghost:hover {
  border-color: #0A0A0A;
}

.bb-shop-console {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  padding: 14px;
}

.bb-shop-console-grid {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(140px, 180px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.bb-shop-console-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}

.bb-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bb-field > span {
  color: #6B6B6B;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bb-field > span em {
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #9A9A9A;
  margin-left: 4px;
}

.bb-field input,
.bb-field select,
.bb-field textarea {
  width: 100%;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  background: #fff;
  color: #0A0A0A;
  font: inherit;
  font-size: 0.9rem;
  padding: 8px 10px;
  resize: vertical;
}

.bb-field textarea {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  min-height: 132px;
  line-height: 1.35;
}

.bb-field input:focus,
.bb-field select:focus,
.bb-field textarea:focus {
  outline: 1px solid #0A0A0A;
  border-color: #0A0A0A;
}

.bb-field-wide {
  grid-column: 1 / -1;
}

.bb-flags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 4px 0 2px;
}

.bb-flags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0A0A0A;
  font-size: 0.88rem;
  cursor: pointer;
}

.bb-shop-console-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.bb-shop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E4E4E4;
}

.bb-shop-chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  color: #0A0A0A;
  text-decoration: none;
  font-size: 0.8rem;
  background: #FAFAFA;
}

.bb-shop-chips a:hover {
  border-color: #0A0A0A;
}

.bb-shop-ledger {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  overflow: hidden;
}

.bb-table-wrap {
  overflow-x: auto;
}

.bb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.bb-table thead th {
  background: #FAFAFA;
  color: #6B6B6B;
  border-bottom: 1px solid #E4E4E4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 600;
  text-align: left;
  padding: 10px 8px;
  white-space: nowrap;
}

.bb-table tbody td {
  border-bottom: 1px solid #F0F0F0;
  padding: 9px 8px;
  font-size: 0.86rem;
  color: #0A0A0A;
  vertical-align: middle;
}

.bb-table tbody tr:hover {
  background: #F7F7F7;
}

.bb-mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
}

.bb-yes {
  font-weight: 600;
}

.bb-extra {
  color: #6B6B6B;
  font-size: 0.8rem;
}

.bb-base {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-ref {
  white-space: nowrap;
}

.bb-ref-on,
.bb-ref-off {
  display: inline-block;
  min-width: 2.4em;
  padding: 2px 6px;
  border: 1px solid #C8C8C8;
  border-radius: 3px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bb-ref-on {
  background: #0A0A0A;
  border-color: #0A0A0A;
  color: #fff;
}

.bb-ref-off {
  background: #fff;
  color: #8A8A8A;
}

.bb-price {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bb-price strong {
  font-variant-numeric: tabular-nums;
  min-width: 3.2rem;
}

.bb-cart-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  background: #fff;
  color: #0A0A0A;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.bb-cart-btn:hover {
  border-color: #0A0A0A;
  background: #0A0A0A;
  color: #fff;
}

.bb-empty {
  padding: 40px 20px;
  text-align: center;
}

.bb-empty h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.bb-empty p {
  margin: 0;
  color: #6B6B6B;
}

.bb-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #E4E4E4;
  color: #6B6B6B;
  font-size: 0.86rem;
}

.bb-pager nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bb-pager a {
  color: #0A0A0A;
  text-decoration: none;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  padding: 4px 8px;
}

.bb-pager a.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.bb-limit {
  display: inline-flex;
  gap: 4px;
}

.bb-limit a {
  min-width: 32px;
  text-align: center;
}

.bb-limit a.is-on {
  background: #0A0A0A;
  color: #fff;
  border-color: #0A0A0A;
}

@media (max-width: 1100px) {
  .bb-shop-console-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bb-shop-console-main {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .bb-shop-console-grid,
  .bb-shop-console-main {
    grid-template-columns: 1fr;
  }

  .bb-field-tall textarea {
    min-height: 96px;
  }
}

/* Admin */
body.admin-shell .sidebar,
body.admin-shell aside {
  background: #fff;
  border-right: 1px solid #E4E4E4;
}

body.admin-shell .topbar-copy h1 {
  font-family: "IBM Plex Sans", sans-serif;
  color: #0A0A0A;
}

/* Kill leftover glam */
body.auth-page,
body.client-shell,
body.admin-shell {
  background-image: none !important;
}

/* ── Wallet ── */
.bb-wallet {
  display: grid;
  gap: 14px;
}

.bb-wallet-head h1,
.bb-cart-head h1,
.bb-news-head h1,
.bb-support-head h1,
.bb-faq-head h1,
.bb-orders-head h1 {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0A0A0A;
}

.bb-wallet-head p,
.bb-cart-head p,
.bb-news-head p,
.bb-support-head p,
.bb-faq-head p,
.bb-orders-head p {
  margin: 4px 0 0;
  color: #6B6B6B;
  font-size: 0.9rem;
}

.bb-wallet-head,
.bb-cart-head,
.bb-news-head,
.bb-support-head,
.bb-faq-head,
.bb-orders-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bb-cart-head-actions,
.bb-support-head-actions,
.bb-faq-head-actions,
.bb-orders-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bb-wallet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 14px;
}

.bb-wallet-balance,
.bb-wallet-deposit,
.bb-wallet-address,
.bb-wallet-ledger,
.bb-cart-ledger,
.bb-news-feed,
.bb-faq-list,
.bb-orders-console,
.bb-orders-refund,
.bb-orders-ledger {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-wallet-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #E4E4E4;
  border-radius: 4px;
  overflow: hidden;
}

.bb-wallet-stats article {
  background: #fff;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}

.bb-wallet-stats span {
  color: #6B6B6B;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bb-wallet-stats strong {
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
}

.bb-wallet-deposit {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.bb-wallet-deposit h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-wallet-lead {
  margin: 0;
  color: #6B6B6B;
  font-size: 0.88rem;
}

.bb-wallet-networks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bb-wallet-network {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  background: #fff;
  color: #0A0A0A;
  font: inherit;
  cursor: pointer;
  text-align: left;
  min-width: 100px;
}

.bb-wallet-network strong {
  font-size: 0.92rem;
}

.bb-wallet-network span {
  color: #6B6B6B;
  font-size: 0.78rem;
}

.bb-wallet-network.is-active,
.bb-wallet-network:hover {
  border-color: #0A0A0A;
  background: #0A0A0A;
  color: #fff;
}

.bb-wallet-network.is-active span,
.bb-wallet-network:hover span {
  color: #C8C8C8;
}

.bb-wallet-generate {
  justify-self: start;
}

.bb-wallet-address {
  padding: 16px;
  display: grid;
  gap: 12px;
}

/* Keep HTML hidden= authoritative even when display:grid is set above */
.bb-wallet-address[hidden],
[data-wallet-address-panel][hidden],
[data-upload-progress][hidden],
[data-upload-result][hidden],
[data-file-input-section][hidden],
[data-text-input-section][hidden],
[data-check-all-status][hidden],
[data-base-details-modal][hidden],
[data-token-modal][hidden],
.bb-cart-btn[hidden],
.receipt-check-v3[hidden],
button.receipt-check-v3[hidden],
.bb-batch-target[hidden] {
  display: none !important;
}

.bb-wallet-address header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bb-wallet-address header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #0A0A0A;
}

.bb-wallet-address header span {
  color: #6B6B6B;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.bb-wallet-address-body {
  display: grid;
  gap: 12px;
}

.bb-wallet-address-body pre {
  margin: 0;
  padding: 12px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  font-size: 0.82rem;
  word-break: break-all;
  white-space: pre-wrap;
}

.bb-wallet-ledger-head {
  padding: 14px 16px;
  border-bottom: 1px solid #E4E4E4;
}

.bb-wallet-ledger-head h2 {
  margin: 0;
  font-size: 1rem;
  color: #0A0A0A;
}

.bb-wallet-ledger-head p {
  margin: 4px 0 0;
  color: #6B6B6B;
  font-size: 0.86rem;
}

.bb-wallet-table {
  min-width: 480px;
}

.bb-wallet-status {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* ── Cart ── */
.bb-cart {
  display: grid;
  gap: 14px;
}

.bb-cart-ledger {
  overflow: hidden;
}

.bb-cart-table {
  min-width: 640px;
}

.bb-cart-settle {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bb-cart-settle-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
}

.bb-cart-settle-metrics article {
  display: grid;
  gap: 2px;
}

.bb-cart-settle-metrics span {
  color: #6B6B6B;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bb-cart-settle-metrics strong {
  font-variant-numeric: tabular-nums;
  color: #0A0A0A;
}

.bb-cart-settle-metrics .is-danger {
  color: #0A0A0A;
  text-decoration: line-through;
}

.bb-cart-settle-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── News ── */
.bb-news {
  display: grid;
  gap: 14px;
}

.bb-news-feed {
  overflow: hidden;
}

.bb-news-item {
  padding: 16px 18px;
  border-bottom: 1px solid #F0F0F0;
}

.bb-news-item:last-of-type {
  border-bottom: none;
}

.bb-news-item time {
  display: block;
  color: #6B6B6B;
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  margin-bottom: 6px;
}

.bb-news-item h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-news-item p {
  margin: 0;
  color: #3A3A3A;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.bb-news-page-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bb-news-page-form input {
  width: 48px;
  padding: 4px 6px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  font: inherit;
  text-align: center;
}

/* ── Support ── */
.bb-support {
  display: grid;
  gap: 14px;
}

.bb-support-layout {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  overflow: hidden;
}

.bb-support-thread {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 420px;
}

.bb-support-stream {
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
  max-height: 520px;
  overflow-y: auto;
  background: #FAFAFA;
}

.bb-support-message {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid #E4E4E4;
  background: #fff;
}

.bb-support-message.is-user {
  justify-self: end;
  background: #0A0A0A;
  border-color: #0A0A0A;
  color: #fff;
}

.bb-support-message.is-user time {
  color: #A0A0A0;
}

.bb-support-message p {
  margin: 0 0 6px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bb-support-message time {
  display: block;
  font-size: 0.72rem;
  color: #6B6B6B;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.bb-support-composer {
  padding: 14px 16px;
  border-top: 1px solid #E4E4E4;
  display: grid;
  gap: 10px;
  background: #fff;
}

.bb-support-composer textarea {
  width: 100%;
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.bb-support-composer textarea:focus {
  outline: 1px solid #0A0A0A;
  border-color: #0A0A0A;
}

.bb-support-composer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bb-support-status {
  color: #6B6B6B;
  font-size: 0.86rem;
}

/* ── FAQ ── */
.bb-faq {
  display: grid;
  gap: 14px;
}

.bb-faq-list {
  overflow: hidden;
}

.bb-faq-item {
  padding: 16px 18px;
  border-bottom: 1px solid #F0F0F0;
}

.bb-faq-item:last-child {
  border-bottom: none;
}

.bb-faq-category {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6B6B6B;
  margin-bottom: 8px;
}

.bb-faq-item h2 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-faq-item p {
  margin: 0;
  color: #3A3A3A;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ── Checkbench (BIN / Card) — Mono Ledger, not Prostor green ── */
body.client-shell .checkbench-v3 {
  gap: 14px;
}

body.client-shell .checkbench-brief-v3,
body.client-shell .checkbench-v3.is-card-v3 .checkbench-brief-v3,
body.client-shell .checkbench-terminal-v3 {
  border: 1px solid #E4E4E4 !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-shadow: none !important;
}

body.client-shell .checkbench-brief-v3 {
  background:
    linear-gradient(180deg, #FAFAFA 0%, #fff 42%) !important;
}

body.client-shell .checkbench-brief-v3 .lens-kicker-v3 {
  color: #6B6B6B;
  letter-spacing: 0.06em;
}

body.client-shell .checkbench-brief-v3 h2 {
  font-family: "IBM Plex Sans", sans-serif !important;
  font-size: clamp(28px, 3.4vw, 42px) !important;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0A0A0A;
  line-height: 1.05;
}

body.client-shell .checkbench-brief-v3 p {
  color: #6B6B6B;
}

body.client-shell .checkbench-brief-v3 article {
  border: 1px solid #E4E4E4 !important;
  border-radius: 4px !important;
  background: #F5F5F5 !important;
  box-shadow: none !important;
}

body.client-shell .checkbench-brief-v3 article span,
body.client-shell .checkbench-terminal-v3 label {
  color: #6B6B6B !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em;
}

body.client-shell .checkbench-brief-v3 article strong {
  color: #0A0A0A !important;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
}

body.client-shell .checkbench-terminal-v3 textarea,
body.client-shell .payload-input-v3 textarea {
  border: 1px solid #C8C8C8 !important;
  border-radius: 4px !important;
  background: #0A0A0A !important;
  color: #F5F5F5 !important;
  caret-color: #fff !important;
  font-family: "IBM Plex Mono", ui-monospace, monospace !important;
  font-size: 0.92rem;
  box-shadow: none !important;
}

body.client-shell .checkbench-terminal-v3 textarea::placeholder {
  color: #6B6B6B;
}

body.client-shell .checkbench-terminal-v3 textarea:focus {
  outline: 1px solid #0A0A0A;
  border-color: #0A0A0A !important;
}

body.client-shell .checkbench-terminal-v3 button {
  border: 1px solid #0A0A0A !important;
  border-radius: 4px !important;
  background: #0A0A0A !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.client-shell .checkbench-terminal-v3 button:hover {
  background: #1F1F1F !important;
  border-color: #1F1F1F !important;
  transform: none !important;
}

body.client-shell .checker-results-v5 {
  border: 1px solid #E4E4E4 !important;
  border-radius: 4px !important;
  background: #FAFAFA !important;
  box-shadow: none !important;
}

body.client-shell .checker-meta-v5 span,
body.client-shell .checker-empty-v5,
body.client-shell .checker-table-v5 th,
body.client-shell .checker-table-v5 td {
  color: #0A0A0A;
}

body.client-shell .checker-table-v5 th {
  color: #6B6B6B;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  body.client-shell .checkbench-v3 {
    grid-template-columns: 1fr !important;
  }
}

/* ── Purchases / Orders ── */
.bb-orders {
  display: grid;
  gap: 14px;
}

.bb-orders-console {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.bb-orders-console-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bb-orders-refund {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.bb-orders-refund-gate {
  padding: 12px 14px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-orders-refund-gate strong {
  display: block;
  margin-bottom: 6px;
  color: #0A0A0A;
}

.bb-orders-refund-gate p {
  margin: 0 0 6px;
  color: #6B6B6B;
  font-size: 0.88rem;
}

.bb-orders-refund-rules {
  margin: 0;
  padding: 12px 14px;
  background: #FFF3CD;
  border: 2px solid #B42318;
  border-radius: 4px;
  color: #0A0A0A;
  display: grid;
  gap: 8px;
}

.bb-orders-refund-rules strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #B42318;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bb-orders-refund-rules ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.bb-orders-refund-rules em {
  font-style: normal;
  color: #B42318;
}

.bb-orders-refund-warn {
  margin: 0;
  padding: 10px 12px;
  background: #FAFAFA;
  border: 1px solid #0A0A0A;
  border-radius: 4px;
  color: #0A0A0A;
  font-size: 0.88rem;
  font-weight: 600;
}

.bb-orders-refund-note {
  margin: 0;
  color: #6B6B6B;
  font-size: 0.86rem;
}

.bb-orders-allowance {
  padding: 12px 14px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  display: grid;
  gap: 4px;
}

.bb-orders-allowance.is-empty {
  border-color: #C8C8C8;
  opacity: 0.85;
}

.bb-orders-allowance strong {
  color: #0A0A0A;
  font-size: 0.95rem;
}

.bb-orders-allowance span,
.bb-orders-allowance em {
  color: #6B6B6B;
  font-size: 0.82rem;
  font-style: normal;
}

.bb-orders-refund-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-orders-refund-panel strong {
  display: block;
  color: #0A0A0A;
  margin-bottom: 4px;
}

.bb-orders-refund-panel p {
  margin: 0;
  color: #6B6B6B;
  font-size: 0.86rem;
}

.bb-orders-refund-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bb-orders-refund-timer {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid #0A0A0A;
  border-radius: 4px;
  color: #0A0A0A;
}

.bb-orders-refund-status {
  font-size: 0.84rem;
  color: #6B6B6B;
}

.bb-orders-ledger {
  overflow: hidden;
}

.bb-orders-table {
  min-width: 900px;
}

.bb-orders-payload {
  max-width: 220px;
  font-size: 0.78rem;
}

.bb-orders-payload-btn {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.bb-orders-payload-btn:hover {
  color: #0A0A0A;
  text-decoration: underline;
}

.bb-orders-actions {
  white-space: nowrap;
  display: flex;
  gap: 6px;
}

.bb-payload-modal[hidden] {
  display: none !important;
}

.bb-payload-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 10, 10, 0.35);
}

.bb-payload-modal-box {
  width: min(640px, 100%);
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  background: #fff;
}

.bb-payload-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bb-payload-modal-head span {
  display: block;
  color: #6B6B6B;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bb-payload-modal-head h3 {
  margin: 4px 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-payload-modal-body {
  margin: 0;
  padding: 14px;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  background: #FAFAFA;
  color: #0A0A0A;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: min(50vh, 360px);
  overflow: auto;
}

.bb-payload-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.receipt-refund-status-v3 {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #C8C8C8;
  color: #0A0A0A;
  background: #FAFAFA;
}

.receipt-refund-status-v3.is-valid {
  border-color: #0A0A0A;
  background: #0A0A0A;
  color: #fff;
}

.receipt-refund-status-v3.is-refunded {
  border-color: #0A0A0A;
  background: #fff;
  color: #0A0A0A;
}

.receipt-refund-status-v3.is-invalid,
.receipt-refund-status-v3.is-ready {
  border-color: #C8C8C8;
  background: #F5F5F5;
  color: #6B6B6B;
}

/* Neutralize leftover Prostor / v3 classes on buyer pages */
body.client-shell .funding-station-v3,
body.client-shell .cart-command-v3,
body.client-shell .bulletin-board-v3,
body.client-shell .case-desk-v3,
body.client-shell .knowledge-shelf-v3,
body.client-shell .archive-desk-v3,
body.client-shell .client-empty {
  all: unset;
  display: revert;
}

body.client-shell .lens-kicker-v3 {
  color: #6B6B6B !important;
  background: none !important;
}

body.client-shell .client-empty {
  padding: 40px 20px;
  text-align: center;
  display: block;
}

body.client-shell .client-empty h3 {
  margin: 0 0 6px;
  color: #0A0A0A;
}

body.client-shell .client-empty p {
  margin: 0;
  color: #6B6B6B;
}

body.client-shell .is-danger {
  color: #0A0A0A !important;
}

body.client-shell .badge,
body.client-shell .badge.is-green {
  background: #fff !important;
  color: #0A0A0A !important;
  border: 1px solid #C8C8C8 !important;
}

@media (max-width: 900px) {
  .bb-wallet-grid {
    grid-template-columns: 1fr;
  }

  .bb-orders-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .bb-orders-console {
    grid-template-columns: 1fr;
  }

  .bb-cart-settle {
    flex-direction: column;
    align-items: stretch;
  }

  .bb-cart-settle-actions {
    justify-content: stretch;
  }

  .bb-cart-settle-actions .bb-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════════
   Admin shell — Mono Ledger (CSS-only; no markup rewrites)
   ══════════════════════════════════════════════════════════════ */

body.admin-shell {
  background: #F5F5F5 !important;
  color: #0A0A0A;
}

body.admin-shell .app-main {
  background: #F5F5F5;
}

/* Sidebar */
body.admin-shell .sidebar {
  background: #fff !important;
  border-right: 1px solid #E4E4E4 !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

body.admin-shell .brand-lockup {
  color: #0A0A0A;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.admin-shell .brand-lockup img {
  border-radius: 4px;
  filter: grayscale(1) contrast(1.2);
}

body.admin-shell .sidebar-label {
  color: #6B6B6B;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.admin-shell .sidebar-account {
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  color: #0A0A0A;
}

body.admin-shell .sidebar-account strong {
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

body.admin-shell .sidebar-account i {
  color: #6B6B6B;
}

body.admin-shell .nav-link {
  border-radius: 4px;
  color: #0A0A0A;
  font-weight: 600;
  font-size: 0.88rem;
}

body.admin-shell .nav-link:hover {
  background: #F5F5F5;
  color: #0A0A0A;
}

body.admin-shell .nav-link.is-active {
  background: #0A0A0A !important;
  color: #fff !important;
}

body.admin-shell .nav-link.is-active i {
  color: #fff !important;
}

body.admin-shell .nav-divider {
  color: #9A9A9A;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.admin-shell .icon-button {
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  background: #fff;
  color: #0A0A0A;
}

/* Workspace header / topbar */
body.admin-shell .workspace-header {
  background: transparent;
}

body.admin-shell .workspace-nav {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

body.admin-shell .workspace-tab {
  color: #0A0A0A;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.82rem;
}

body.admin-shell .workspace-tab.is-active {
  background: #0A0A0A;
  color: #fff;
}

body.admin-shell .workspace-account {
  color: #6B6B6B;
  font-size: 0.82rem;
}

body.admin-shell .workspace-account strong {
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

body.admin-shell .topbar {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  box-shadow: none !important;
}

body.admin-shell .topbar-copy .eyebrow {
  color: #6B6B6B;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

body.admin-shell .topbar-copy h1 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0A0A0A;
}

body.admin-shell .topbar-copy p {
  color: #6B6B6B;
  font-size: 0.9rem;
}

/* Stats strip */
body.admin-shell .stats-strip {
  gap: 10px;
}

body.admin-shell .stat-card {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  box-shadow: none !important;
  padding: 12px 14px;
}

body.admin-shell .stat-card i {
  color: #6B6B6B;
}

body.admin-shell .stat-card span {
  color: #6B6B6B;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.admin-shell .stat-card strong {
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

body.admin-shell .stat-card em {
  color: #9A9A9A;
  font-style: normal;
  font-size: 0.78rem;
}

/* Panels, cards, tables */
body.admin-shell .panel,
body.admin-shell .table-shell,
body.admin-shell .summary-card,
body.admin-shell .workspace-card {
  background: #fff !important;
  border: 1px solid #E4E4E4 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

body.admin-shell .panel-kicker,
body.admin-shell .table-subtle {
  color: #6B6B6B !important;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

body.admin-shell .panel-title {
  color: #0A0A0A;
  font-weight: 700;
}

body.admin-shell .empty-state {
  background: #FAFAFA;
  border: 1px dashed #C8C8C8;
  border-radius: 4px;
  color: #6B6B6B;
}

body.admin-shell .empty-state h3 {
  color: #0A0A0A;
}

/* Inputs & forms */
body.admin-shell .input,
body.admin-shell .select,
body.admin-shell select,
body.admin-shell textarea {
  background: #fff !important;
  border: 1px solid #C8C8C8 !important;
  border-radius: 4px !important;
  color: #0A0A0A !important;
  box-shadow: none !important;
}

body.admin-shell .input:focus,
body.admin-shell .select:focus,
body.admin-shell select:focus,
body.admin-shell textarea:focus {
  border-color: #0A0A0A !important;
  outline: 1px solid #0A0A0A !important;
  box-shadow: none !important;
}

body.admin-shell .field label,
body.admin-shell label {
  color: #6B6B6B;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Buttons */
body.admin-shell .btn {
  border-radius: 4px !important;
  font-weight: 600;
  box-shadow: none !important;
}

body.admin-shell .btn-primary {
  background: #0A0A0A !important;
  color: #fff !important;
  border: 1px solid #0A0A0A !important;
}

body.admin-shell .btn-primary:hover {
  background: #1F1F1F !important;
}

body.admin-shell .btn-secondary,
body.admin-shell .btn-ghost {
  background: #fff !important;
  color: #0A0A0A !important;
  border: 1px solid #C8C8C8 !important;
}

body.admin-shell .btn-secondary:hover,
body.admin-shell .btn-ghost:hover {
  border-color: #0A0A0A !important;
}

/* Badges */
body.admin-shell .badge {
  background: #fff !important;
  color: #0A0A0A !important;
  border: 1px solid #C8C8C8 !important;
  border-radius: 4px !important;
  font-weight: 600;
  font-size: 0.75rem;
}

body.admin-shell .badge.is-green,
body.admin-shell .badge.is-red,
body.admin-shell .badge.is-amber,
body.admin-shell .badge.is-blue,
body.admin-shell .badge.is-muted {
  background: #FAFAFA !important;
  color: #0A0A0A !important;
  border-color: #C8C8C8 !important;
}

/* Admin module v5 — kill sage/glam gradients */
body.admin-shell .admin-command-v5,
body.admin-shell .admin-data-shell-v5,
body.admin-shell .admin-alert-v5,
body.admin-shell .admin-filter-bar-v5,
body.admin-shell .admin-queue-card-v5,
body.admin-shell .admin-stat-cluster-v5,
body.admin-shell .admin-kpi-grid-v5 article,
body.admin-shell .admin-chat-card-v5,
body.admin-shell .admin-support-dialog-v5,
body.admin-shell .settings-command-v5,
body.admin-shell .settings-card-v5,
body.admin-shell .settings-metrics-v5 article,
body.admin-shell .users-command-v5,
body.admin-shell .users-table-shell-v5,
body.admin-shell .sales-command-v5,
body.admin-shell .sales-table-shell-v5 {
  background: #fff !important;
  border: 1px solid #E4E4E4 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

body.admin-shell .admin-command-v5 {
  background: #fff !important;
  background-image: none !important;
}

body.admin-shell .admin-command-v5 h2 {
  font-family: "IBM Plex Sans", sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: #0A0A0A !important;
}

body.admin-shell .admin-command-mark-v5 {
  background: #FAFAFA !important;
  border: 1px solid #E4E4E4 !important;
  color: #0A0A0A !important;
}

body.admin-shell .admin-command-mark-v5 i {
  color: #6B6B6B !important;
}

body.admin-shell .admin-queue-card-v5:hover {
  border-color: #0A0A0A !important;
  background: #FAFAFA !important;
}

body.admin-shell .admin-queue-card-v5 strong,
body.admin-shell .admin-stat-list-v5 strong {
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

body.admin-shell .admin-stat-cluster-v5 header i {
  color: #6B6B6B;
}

body.admin-shell .admin-stat-list-v5 span {
  color: #6B6B6B;
}

/* Tables in admin */
body.admin-shell table {
  border-collapse: collapse;
}

body.admin-shell table thead th {
  background: #FAFAFA !important;
  color: #6B6B6B !important;
  border-bottom: 1px solid #E4E4E4 !important;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

body.admin-shell table tbody td {
  border-bottom: 1px solid #F0F0F0 !important;
  color: #0A0A0A;
  font-size: 0.86rem;
}

body.admin-shell table tbody tr:hover {
  background: #F7F7F7;
}

body.admin-shell .form-status {
  color: #6B6B6B;
  font-size: 0.86rem;
}

body.admin-shell .form-status.is-error {
  color: #0A0A0A;
  font-weight: 600;
}

/* Base details modal (admin + seller) */
body.admin-shell .base-details-modal-v6,
body.client-shell .bb-seller-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 10, 10, 0.45);
}

body.admin-shell .base-details-modal-v6[hidden],
body.client-shell .bb-seller-modal[hidden] {
  display: none !important;
}

body.admin-shell .base-details-card-v6,
body.client-shell .bb-seller-modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  padding: 20px;
}

body.admin-shell .base-details-close-v6,
body.client-shell .bb-seller-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  background: #fff;
  color: #0A0A0A;
  cursor: pointer;
}

body.admin-shell .base-details-grid-v6,
body.client-shell .base-details-grid-v6 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 760px) {
  body.admin-shell .base-details-grid-v6,
  body.client-shell .base-details-grid-v6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.admin-shell .base-details-grid-v6 > div,
body.client-shell .base-details-grid-v6 > div {
  padding: 8px 10px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  font-size: 0.86rem;
}

body.admin-shell .base-details-grid-v6 span,
body.client-shell .base-details-grid-v6 span {
  display: block;
  color: #6B6B6B;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ══════════════════════════════════════════════════════════════
   Seller — bb-seller-* Mono Ledger
   ══════════════════════════════════════════════════════════════ */

.bb-seller {
  display: grid;
  gap: 14px;
}

.bb-seller-kicker {
  display: block;
  color: #6B6B6B;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.bb-seller-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 16px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-seller-balance h1 {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

.bb-seller-balance p {
  margin: 4px 0 0;
  color: #6B6B6B;
  font-size: 0.9rem;
}

.bb-seller-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 10px;
}

.bb-seller-metrics article,
.bb-seller-readout article,
.bb-seller-payout-rules article {
  padding: 10px 12px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  display: grid;
  gap: 4px;
}

.bb-seller-metrics span,
.bb-seller-readout span,
.bb-seller-payout-rules span {
  color: #6B6B6B;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bb-seller-metrics strong,
.bb-seller-readout strong,
.bb-seller-payout-rules strong {
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

/* Route cards */
.bb-seller-routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bb-seller-route {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  color: #0A0A0A;
  text-decoration: none;
  transition: border-color 0.15s;
}

.bb-seller-route:hover {
  border-color: #0A0A0A;
}

.bb-seller-route i {
  color: #6B6B6B;
  font-size: 1.1rem;
}

.bb-seller-route span {
  font-weight: 700;
  font-size: 0.95rem;
}

.bb-seller-route small {
  color: #6B6B6B;
  font-size: 0.82rem;
}

/* Flow section */
.bb-seller-flow {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  padding: 16px;
}

.bb-seller-flow-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bb-seller-flow-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-seller-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.bb-seller-flow-card {
  padding: 12px;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  background: #FAFAFA;
}

.bb-seller-flow-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.bb-seller-flow-card h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: #0A0A0A;
}

.bb-seller-flow-card p {
  margin: 0 0 8px;
  color: #6B6B6B;
  font-size: 0.82rem;
}

/* Meter / progress bar */
.bb-seller-meter {
  height: 4px;
  background: #E4E4E4;
  border-radius: 2px;
  overflow: hidden;
}

.bb-seller-meter i,
.bb-seller-meter em {
  display: block;
  height: 100%;
  background: #0A0A0A;
  border-radius: 2px;
  font-style: normal;
}

.bb-seller-meter-inline {
  display: grid;
  gap: 6px;
}

.bb-seller-meter-inline span {
  font-size: 0.82rem;
  color: #6B6B6B;
}

/* Badge */
.bb-seller-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  background: #fff;
  color: #0A0A0A;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* Inventory query */
.bb-seller-inventory {
  gap: 10px;
}

.bb-seller-query {
  padding: 16px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-seller-query h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-seller-query-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 140px auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.bb-seller-readout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
}

.bb-seller-readout .bb-btn {
  align-self: stretch;
  white-space: nowrap;
}

/* Processing queue */
.bb-seller-processing {
  padding: 16px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-seller-processing h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-seller-processing p {
  margin: 4px 0 12px;
  color: #6B6B6B;
  font-size: 0.86rem;
}

.bb-seller-processing-queue {
  display: grid;
  gap: 8px;
}

.bb-seller-processing-queue article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  padding: 10px 12px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  align-items: center;
}

.bb-seller-processing-queue i {
  grid-row: span 2;
  color: #6B6B6B;
}

.bb-seller-processing-queue strong {
  color: #0A0A0A;
  font-size: 0.9rem;
}

.bb-seller-processing-queue span {
  color: #6B6B6B;
  font-size: 0.78rem;
}

/* Base strips */
.bb-seller-strips {
  display: grid;
  gap: 8px;
}

.bb-seller-strip {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(120px, 1fr) auto minmax(180px, 1.4fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-seller-strip.is-processing {
  border-color: #0A0A0A;
  background: #FAFAFA;
}

.bb-seller-strip-name h3 {
  margin: 4px 0 2px;
  font-size: 0.95rem;
  color: #0A0A0A;
}

.bb-seller-strip-name small {
  color: #9A9A9A;
  font-size: 0.78rem;
}

.bb-seller-strip-price {
  font-size: 0.95rem;
  white-space: nowrap;
}

.bb-seller-strip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bb-seller-strip-tags span {
  padding: 2px 6px;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  background: #FAFAFA;
  color: #6B6B6B;
  font-size: 0.72rem;
}

/* Upload lab */
.bb-seller-upload {
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  align-items: start;
}

.bb-seller-upload-aside {
  padding: 16px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  display: grid;
  gap: 10px;
}

.bb-seller-upload-aside h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-seller-upload-aside p {
  margin: 0;
  color: #6B6B6B;
  font-size: 0.86rem;
}

.bb-seller-format-card {
  padding: 10px 12px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  display: grid;
  gap: 4px;
}

.bb-seller-format-card span {
  color: #6B6B6B;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bb-seller-format-card code {
  color: #0A0A0A;
  font-size: 0.82rem;
  word-break: break-all;
}

.bb-seller-upload-form {
  padding: 16px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  display: grid;
  gap: 12px;
}

.bb-seller-upload-meta {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.bb-seller-upload-format-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.bb-seller-mode-tabs {
  display: flex;
  gap: 6px;
}

.bb-seller-mode-tabs .bb-btn.is-active,
.bb-seller-mode-tabs .bb-btn.is-on {
  background: #0A0A0A;
  color: #fff;
  border-color: #0A0A0A;
}

.bb-seller-format-builder {
  padding: 12px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  display: grid;
  gap: 10px;
}

.bb-seller-format-presets,
.bb-seller-format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bb-seller-format-chips .bb-btn.is-on {
  background: #0A0A0A;
  color: #fff;
  border-color: #0A0A0A;
}

.bb-seller-format-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.bb-seller-format-preview button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #C8C8C8;
  border-radius: 4px;
  background: #fff;
  color: #0A0A0A;
  font-size: 0.78rem;
  cursor: pointer;
}

.bb-seller-file {
  padding: 14px;
  border: 1px dashed #C8C8C8;
  border-radius: 4px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.bb-seller-file-hint {
  color: #9A9A9A;
  font-size: 0.82rem;
}

.bb-seller-file-name {
  color: #6B6B6B;
  font-size: 0.82rem;
}

.bb-seller-progress {
  padding: 10px 12px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  display: grid;
  gap: 8px;
}

.bb-seller-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: #6B6B6B;
}

.bb-seller-upload-result {
  padding: 10px 12px;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  font-size: 0.86rem;
  color: #0A0A0A;
}

.sr-file-input-v6 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Payout */
.bb-seller-payout {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: start;
}

.bb-seller-payout-balance {
  padding: 16px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
}

.bb-seller-payout-balance h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}

.bb-seller-payout-balance p {
  margin: 4px 0 12px;
  color: #6B6B6B;
  font-size: 0.9rem;
}

.bb-seller-payout-rules {
  display: grid;
  gap: 8px;
}

.bb-seller-payout-form {
  padding: 16px;
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  display: grid;
  gap: 12px;
}

.bb-seller-payout-form h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-seller-payout-fields {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

/* History */
.bb-seller-history {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  padding: 16px;
}

.bb-seller-history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bb-seller-history-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0A0A0A;
}

.bb-seller-history-count {
  color: #6B6B6B;
  font-size: 0.86rem;
}

.bb-seller-history-list {
  display: grid;
  gap: 8px;
}

.bb-seller-history-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto minmax(0, 1.5fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  background: #FAFAFA;
}

.bb-seller-history-row-meta {
  display: grid;
  gap: 4px;
}

.bb-seller-history-row time {
  color: #9A9A9A;
  font-size: 0.78rem;
}

.bb-seller-history-row code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: #6B6B6B;
}

/* Modal extras */
.bb-seller-modal-status {
  margin: 8px 0;
  color: #6B6B6B;
  font-size: 0.86rem;
}

.bb-seller-modal-status.is-error {
  color: #0A0A0A;
  font-weight: 600;
}

.bb-seller-modal-body h3 {
  margin: 12px 0 6px;
  font-size: 0.9rem;
  color: #0A0A0A;
}

/* Neutralize leftover v3 seller glam on client-shell */
body.client-shell .seller-deck-v3,
body.client-shell .seller-flow-v3,
body.client-shell .inventory-ops-v3,
body.client-shell .processing-board-v6,
body.client-shell .inventory-strips-v3,
body.client-shell .upload-lab-v3,
body.client-shell .payout-console-v3,
body.client-shell .payout-history-v3 {
  all: unset;
  display: revert;
}

/* Seller responsive */
@media (max-width: 900px) {
  .bb-seller-head {
    grid-template-columns: 1fr;
  }

  .bb-seller-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .bb-seller-routes {
    grid-template-columns: 1fr;
  }

  .bb-seller-upload,
  .bb-seller-payout {
    grid-template-columns: 1fr;
  }

  .bb-seller-query-form {
    grid-template-columns: 1fr 1fr;
  }

  .bb-seller-readout {
    grid-template-columns: repeat(2, 1fr);
  }

  .bb-seller-strip {
    grid-template-columns: 1fr;
  }

  .bb-seller-history-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .bb-seller-query-form,
  .bb-seller-upload-meta,
  .bb-seller-payout-fields {
    grid-template-columns: 1fr;
  }

  .bb-seller-readout {
    grid-template-columns: 1fr;
  }
}

/* ===== Finish pass: kill Prostor residue + settings ===== */

body.client-shell::before,
body.auth-page::before,
body.admin-shell::before {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* Hide empty chrome map when no stats and no actions */
body.client-shell .client-page-map-v5:not(:has(.page-map-stats-v5 article)):not(:has(.page-map-actions-v5 a)):not(:has(.page-map-actions-v5 button)) {
  display: none !important;
}

body.client-shell.page-cart .page-map-stats-v5,
body.client-shell.page-purchases .page-map-stats-v5,
body.client-shell.page-news .page-map-stats-v5,
body.client-shell.page-faq .page-map-stats-v5,
body.client-shell.page-support .page-map-stats-v5,
body.client-shell.page-settings .page-map-stats-v5 {
  display: none !important;
}

/* Force utility/dock black over site.css #2f523f */
body.client-shell .client-dock-v4 a.is-active,
body.client-shell .client-utility-v4 a.is-active,
.client-shell .client-dock-v4 a.is-active,
.client-shell .client-utility-v4 a.is-active {
  background: #0A0A0A !important;
  color: #fff !important;
  border-color: #0A0A0A !important;
  box-shadow: none !important;
}

/* Refund dock — mono, keep JS class hooks */
.purchase-refund-dock-v3,
.bb-orders-refund {
  background: #fff !important;
  border: 1px solid #E4E4E4 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  color: #0A0A0A !important;
}

.purchase-refund-gate-v3,
.purchase-refund-warning-v3,
.purchase-refund-note-v3,
.purchase-refund-allowance-v3,
.purchase-refund-panel-v3 {
  background: #FAFAFA !important;
  border: 1px solid #E4E4E4 !important;
  border-radius: 4px !important;
  color: #0A0A0A !important;
  box-shadow: none !important;
}

.purchase-refund-warning-v3,
.purchase-refund-warning-v3--strong {
  border-color: #B42318 !important;
  color: #B42318 !important;
  background: #FFF8F7 !important;
}

.purchase-refund-rules-v3 {
  background: #FFF3CD !important;
  border: 2px solid #B42318 !important;
  border-radius: 4px !important;
  color: #0A0A0A !important;
  box-shadow: none !important;
}

.purchase-refund-btn-v3 {
  background: #0A0A0A !important;
  color: #fff !important;
  border: 1px solid #0A0A0A !important;
  border-radius: 4px !important;
}

.purchase-refund-btn-v3:disabled {
  opacity: 0.4 !important;
  background: #F0F0F0 !important;
  color: #6B6B6B !important;
  border-color: #C8C8C8 !important;
}

body.client-shell .badge.is-green,
body.admin-shell .badge.is-green,
.badge.is-green {
  background: #F0F0F0 !important;
  color: #0A0A0A !important;
  border: 1px solid #C8C8C8 !important;
}

body.client-shell .app-toast.is-success,
body.admin-shell .app-toast.is-success {
  border-color: #C8C8C8 !important;
  color: #0A0A0A !important;
  background: #fff !important;
}

/* Upload / format builder sage kill */
body.client-shell [data-format-preview],
body.client-shell .bb-seller-format-preview,
body.client-shell .format-preview-v6 {
  background: #FAFAFA !important;
  border: 1px solid #E4E4E4 !important;
  color: #0A0A0A !important;
}

body.client-shell .bb-btn.is-on,
body.client-shell .bb-btn.is-active,
body.client-shell [data-input-method].is-active,
body.client-shell [data-format-field].is-on {
  background: #0A0A0A !important;
  color: #fff !important;
  border-color: #0A0A0A !important;
}

/* Settings */
.bb-settings {
  display: grid;
  gap: 14px;
}

.bb-settings-head h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0A0A0A;
}

.bb-settings-head p {
  margin: 4px 0 0;
  color: #6B6B6B;
}

.bb-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 14px;
}

.bb-settings-card {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.bb-settings-card h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.bb-settings-lead {
  margin: 0;
  color: #6B6B6B;
  font-size: 0.9rem;
}

.bb-settings-dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.bb-settings-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #F0F0F0;
  padding-bottom: 8px;
}

.bb-settings-dl dt {
  color: #6B6B6B;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.bb-settings-dl dd {
  margin: 0;
  color: #0A0A0A;
  font-weight: 600;
}

.bb-settings-token {
  margin: 0;
  padding: 12px;
  background: #FAFAFA;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  overflow-x: auto;
  word-break: break-all;
  white-space: pre-wrap;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .bb-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Client shell — mobile: mast + content, rail as bottom dock */
@media (max-width: 900px) {
  body.client-shell .app-main {
    grid-template-columns: 1fr !important;
    grid-template-rows: 52px auto 1fr auto !important;
    padding-bottom: 0 !important;
  }

  body.client-shell .bb-shell-mast {
    padding: 0 12px;
  }

  body.client-shell .bb-shell-role,
  body.client-shell .bb-shell-mast-link span,
  body.client-shell .bb-shell-logout span {
    display: none;
  }

  body.client-shell .bb-shell-mast-start {
    gap: 8px;
  }

  body.client-shell .bb-shell-mast-link,
  body.client-shell .bb-shell-admin,
  body.client-shell .bb-shell-logout {
    padding: 0 8px;
  }

  body.client-shell .bb-shell-mast-meta {
    gap: 6px;
  }

  body.client-shell .bb-shell-rail {
    grid-column: 1;
    grid-row: 4;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-right: 0;
    border-top: 1px solid #E4E4E4;
    position: sticky;
    bottom: 0;
    z-index: 40;
    overflow-x: auto;
  }

  body.client-shell .bb-shell-nav,
  body.client-shell .bb-shell-tools {
    display: flex;
    flex: 1 1 auto;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  body.client-shell .bb-shell-link {
    flex: 1 1 0;
    min-width: 64px;
    min-height: 56px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 0;
    font-size: 0.68rem;
  }

  body.client-shell .bb-shell-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    margin: 0;
  }

  body.client-shell .bb-shell-map {
    grid-column: 1;
    grid-row: 2;
    margin: 10px 12px 0;
  }

  body.client-shell .content-stage {
    grid-column: 1 !important;
    grid-row: 3 !important;
    padding: 12px 12px 24px !important;
  }

  body.client-shell:not(:has(.bb-shell-map)) .content-stage {
    grid-row: 2 !important;
  }
}

/* ── Admin shell: restore left rail (site.css had hidden it for top-nav) ── */
body.admin-shell .app-shell {
  display: grid !important;
  grid-template-columns: var(--sidebar, 260px) minmax(0, 1fr);
}

body.admin-shell .app-shell > .sidebar,
body.admin-shell .app-shell > .sidebar.bb-admin-rail {
  display: grid !important;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  transform: none;
}

body.admin-shell .app-shell > .sidebar-backdrop {
  display: none !important;
}

body.admin-shell .app-main {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0 48px !important;
  min-width: 0;
}

body.admin-shell .sidebar.bb-admin-rail,
body.admin-shell .bb-admin-rail {
  background: #fff !important;
  border-right: 1px solid #E4E4E4 !important;
  box-shadow: none !important;
}

@media (max-width: 980px) {
  body.admin-shell .app-shell {
    display: block !important;
  }

  body.admin-shell .app-shell > .sidebar,
  body.admin-shell .app-shell > .sidebar.bb-admin-rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, calc(100vw - 34px));
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 60;
  }

  body.admin-shell .app-shell.sidebar-open > .sidebar,
  body.admin-shell .app-shell.sidebar-open > .sidebar.bb-admin-rail {
    transform: translateX(0);
  }

  body.admin-shell .app-shell.sidebar-open > .sidebar-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(10, 10, 10, 0.28);
  }

  body.admin-shell .bb-admin-menu.mobile-menu {
    display: inline-flex !important;
  }
}

body.admin-shell .bb-admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0A0A0A;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.admin-shell .bb-admin-brand em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6B6B6B;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  padding: 2px 6px;
}

body.admin-shell .bb-admin-rail-balance {
  border: 1px solid #E4E4E4 !important;
  border-radius: 4px;
  background: #F5F5F5 !important;
  box-shadow: none !important;
}

body.admin-shell .bb-admin-rail-balance .sidebar-label {
  color: #6B6B6B;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
}

body.admin-shell .bb-admin-rail-balance strong {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
  color: #0A0A0A;
}

body.admin-shell .bb-admin-nav .nav-link {
  border-radius: 4px;
  color: #0A0A0A;
}

body.admin-shell .bb-admin-nav .nav-link.is-active,
body.admin-shell .bb-admin-nav .nav-link.is-active:hover {
  background: #0A0A0A !important;
  color: #fff !important;
  border-color: #0A0A0A !important;
}

body.admin-shell .bb-admin-nav .nav-link.is-active i {
  color: #fff !important;
}

body.admin-shell .bb-admin-nav .admin-nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #E5484D !important;
  color: #fff !important;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

body.admin-shell .bb-admin-nav .admin-nav-badge.is-alert:not([hidden]) {
  background: #E5484D !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(229, 72, 77, 0.28);
  animation: bb-admin-badge-pulse 1.6s ease-in-out infinite;
}

body.admin-shell .bb-admin-nav .nav-link.is-active .admin-nav-badge {
  box-shadow: 0 0 0 2px #0A0A0A;
}

@keyframes bb-admin-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

body.admin-shell .bb-admin-rail-foot {
  display: grid;
  gap: 4px;
  border-top: 1px solid #E4E4E4;
  padding-top: 12px;
}

body.admin-shell .bb-admin-top.workspace-header {
  background: #fff;
  border-bottom: 1px solid #E4E4E4;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.admin-shell .bb-admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}

body.admin-shell .bb-admin-top-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

body.admin-shell .bb-admin-title h1 {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0A0A0A;
}

body.admin-shell .bb-admin-title .eyebrow {
  margin: 0 0 4px;
  color: #6B6B6B;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

body.admin-shell .bb-admin-title p {
  margin: 4px 0 0;
  color: #6B6B6B;
  font-size: 0.9rem;
}

body.admin-shell .bb-admin-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.admin-shell .bb-admin-account {
  display: grid;
  justify-items: end;
  line-height: 1.15;
}

body.admin-shell .bb-admin-account span {
  color: #6B6B6B;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

body.admin-shell .bb-admin-account strong {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
  color: #0A0A0A;
}

body.admin-shell .bb-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.admin-shell .bb-admin-stats.stats-strip {
  margin: 0;
  padding: 12px 20px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.admin-shell .bb-admin-stats .stat-card {
  background: #fff;
  border: 1px solid #E4E4E4;
  border-radius: 4px;
  box-shadow: none;
}

/* Kill leftover Prostor workspace-tabs if any markup remains */
body.admin-shell .workspace-tabs {
  display: none !important;
}

body.admin-shell .workspace-nav {
  display: none !important;
}

/* Modals must honor [hidden] even when base rule sets display:grid */
body.admin-shell .admin-support-modal-v5[hidden],
body.admin-shell .admin-user-modal-v5[hidden],
body.client-shell .bb-payload-modal[hidden],
body.auth-page .token-modal[hidden] {
  display: none !important;
}

body.admin-shell .base-details-admin-check-v6 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: span 2;
}
body.admin-shell .base-details-admin-check-row-v6 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 0.9rem;
  color: #0A0A0A;
}
body.admin-shell .base-details-admin-check-row-v6 input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
body.admin-shell .base-details-admin-gate-v6 {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #E4E4E4;
  background: #FAFAFA;
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #0A0A0A;
}
body.admin-shell .base-details-admin-gate-v6 span {
  color: #555;
}
