/* Page-specific layouts */

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  align-items: end;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  padding: var(--space-8) var(--space-6);
  background:
    radial-gradient(ellipse 80% 90% at 100% 0%, rgba(26, 107, 138, 0.08), transparent 55%),
    linear-gradient(135deg, #12304f 0%, #1a4468 48%, #1f5a78 100%);
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  color: #e8eef5;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.04) 40.5%, transparent 70%);
  pointer-events: none;
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero .brand-signal {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 238, 245, 0.65);
  margin: 0 0 var(--space-3);
}

.dashboard-hero h1 {
  margin-bottom: var(--space-2);
  color: #fff;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  max-width: 18ch;
}

.dashboard-hero .lead {
  margin: 0;
  color: rgba(232, 238, 245, 0.78);
  font-size: var(--text-sm);
  max-width: 36ch;
  line-height: 1.5;
}

.dashboard-hero .date {
  margin: var(--space-3) 0 0;
  color: rgba(232, 238, 245, 0.55);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.dashboard-hero .hero-actions,
.admin-hero .hero-actions,
.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-hero .btn-primary {
  background: #fff;
  color: var(--color-accent);
  box-shadow: none;
}

.dashboard-hero .btn-primary:hover:not(:disabled) {
  background: #f0f5fa;
  color: var(--color-accent-hover);
}

.dashboard-hero .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.dashboard-hero .btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
}

.admin-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-page-header > div:first-child {
  min-width: 0;
  flex: 1 1 14rem;
}

.admin-page-header h1 {
  font-size: var(--text-xl);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.admin-page-header .subtitle {
  max-width: 56ch;
}

.admin-page-header .actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  flex: 0 0 auto;
  align-items: center;
}

.admin-page-header .actions .btn {
  white-space: nowrap;
}

/* ??? Admin home (bookkeeper-friendly) ??? */
.admin-home {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
  max-width: none;
}

.admin-home-hero h1 {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.admin-home-kicker {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-bright);
}

.admin-home-hero .subtitle {
  margin: 0;
  max-width: 52ch;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}

.admin-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.admin-task-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-3);
  row-gap: 6px;
  align-items: start;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.admin-task-card:hover {
  border-color: var(--color-accent-mid);
  box-shadow: var(--shadow-md);
  background: var(--color-surface-elevated);
}

.admin-task-card--primary {
  background: linear-gradient(160deg, var(--color-commission-bg) 0%, var(--color-accent-soft) 55%, #fff 100%);
  border-color: #b7d4d6;
  color: var(--color-text);
}

.admin-task-card--primary:hover {
  border-color: var(--color-commission);
  box-shadow: var(--shadow-md);
  background: linear-gradient(160deg, #dcefee 0%, var(--color-accent-soft) 50%, #fff 100%);
}

.admin-task-card--primary h2 {
  color: var(--color-accent);
}

.admin-task-card--primary p {
  color: var(--color-text-secondary);
}

.admin-task-card--primary .admin-task-go {
  color: var(--color-commission);
}

.admin-task-card--primary .admin-task-icon {
  background: var(--color-commission);
  color: #fff;
}

.admin-task-icon {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-accent-soft);
  color: var(--color-accent-mid);
  flex-shrink: 0;
}

.admin-task-card > div {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.admin-task-card h2 {
  margin: 0 0 4px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.admin-task-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.admin-task-go {
  grid-column: 2;
  grid-row: 2;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent-bright);
  margin-top: 2px;
}

.admin-home-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.admin-section-head h2 {
  margin: 0 0 4px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-section-head p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.admin-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-warning);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-glance-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}

.admin-glance {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  min-height: 96px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--color-accent-bright);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-glance:hover {
  border-color: var(--color-accent-mid);
  border-top-color: var(--color-commission);
  box-shadow: var(--shadow-md);
}

.admin-glance-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

.admin-glance strong {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  font-family: var(--font-sans);
  color: var(--color-accent);
}

.admin-glance-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.3;
  margin-top: auto;
}

.admin-attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.admin-attention-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.admin-attention-card:hover {
  border-color: var(--color-accent-mid);
  box-shadow: var(--shadow-md);
}

.admin-attention-card.is-active.tone-danger {
  border-color: #e8b4b0;
  background: var(--color-danger-bg);
}

.admin-attention-card.is-active.tone-warning {
  border-color: #e8c99a;
  background: var(--color-warning-bg);
}

.admin-attention-card.is-active.tone-info {
  border-color: #b5cce3;
  background: var(--color-info-bg);
}

.admin-attention-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.admin-attention-title {
  font-size: var(--text-sm);
  font-weight: 700;
}

.admin-attention-count {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--color-text-muted);
}

.admin-attention-card.is-active .admin-attention-count {
  color: var(--color-text);
}

.admin-attention-card.is-active.tone-danger .admin-attention-count {
  color: var(--color-danger);
}

.admin-attention-card.is-active.tone-warning .admin-attention-count {
  color: var(--color-warning);
}

.admin-attention-card.is-active.tone-info .admin-attention-count {
  color: var(--color-info);
}

.admin-attention-body {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
  flex: 1;
}

.admin-attention-cta {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent-bright);
}

.admin-ops-grid--home {
  margin-top: 0;
}

.admin-panel-sub {
  margin: 2px 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
}

.admin-howto {
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-commission-bg) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.admin-howto h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-accent);
}

.admin-howto ol {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-howto li {
  font-size: var(--text-sm);
  color: var(--color-text-secondary, var(--color-text));
  line-height: 1.45;
}

.admin-howto em {
  font-style: normal;
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 960px) {
  .admin-task-grid,
  .admin-attention-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .admin-glance-grid {
    grid-template-columns: 1fr;
  }

  .admin-task-card {
    grid-template-columns: auto 1fr;
  }
}

.admin-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1px;
  margin-bottom: var(--space-5);
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
}

.admin-kpi-strip--compact {
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  margin-bottom: var(--space-4);
}

/* Even columns when the KPI count is known (announcements strip) */
.admin-kpi-strip--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .admin-kpi-strip--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .admin-kpi-strip--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-kpi {
  background: var(--color-surface);
  padding: var(--space-3) var(--space-3);
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.admin-kpi-label {
  margin: 0 0 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.admin-kpi-value {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  line-height: 1.1;
  font-family: var(--font-sans);
}

.admin-kpi-meta {
  margin: 4px 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.admin-kpi-meta a {
  font-weight: 600;
  text-decoration: none;
}

.admin-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.admin-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

.admin-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.admin-panel-head > div:first-child,
.admin-panel-head h2 {
  min-width: 0;
  flex: 1 1 10rem;
}

.admin-panel-head h2 {
  margin: 0;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0;
}

.admin-panel-head a,
.admin-panel-head .btn {
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.admin-panel .admin-table-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.admin-panel .admin-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.admin-panel .admin-table th,
.admin-panel .admin-table td {
  overflow: hidden;
  vertical-align: middle;
}

.admin-panel .admin-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-panel .admin-table .col-primary {
  width: auto;
}

.admin-panel .admin-table .row-identity,
.admin-panel .admin-table .row-meta {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-panel .admin-table .num,
.admin-panel .admin-table th.num,
.admin-panel .admin-table .actions-cell {
  white-space: nowrap;
  overflow: visible;
  overflow-wrap: normal;
  word-break: normal;
}

/* Qty / stock / dates: right-align header + value together */
.admin-panel .admin-table .num,
.admin-panel .admin-table th.num {
  width: 6.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Shrink actions column to the button; no empty right gap */
.admin-panel .admin-table .actions-cell,
.admin-panel .admin-table th.actions-cell {
  width: 1%;
  padding-left: 0.5rem;
  padding-right: var(--space-4);
  text-align: right;
  vertical-align: middle;
}

.admin-panel .admin-table .admin-table-action {
  background: var(--color-accent-mid);
  box-shadow: none;
  padding: 0.32rem 0.65rem;
}

.admin-panel .admin-table .admin-table-action:hover:not(:disabled) {
  background: var(--color-accent);
}

.admin-simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-simple-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.admin-simple-list li:last-child {
  border-bottom: none;
}

.admin-simple-list strong {
  display: block;
  font-size: var(--text-sm);
}

.admin-empty-cell {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--space-5) var(--space-4) !important;
  text-align: center;
}

.admin-table-wrap {
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.admin-table {
  min-width: 640px;
  width: 100%;
  font-size: 0.8125rem;
}

.admin-table th,
.admin-table td {
  padding: 0.45rem 0.65rem;
}

.admin-table th {
  font-size: 0.62rem;
}

.admin-table .num,
.admin-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-table .col-check {
  width: 42px;
  padding-left: 0.6rem;
  padding-right: 0.35rem;
  vertical-align: middle;
}

.admin-table .col-check input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-accent);
  vertical-align: middle;
}

.admin-table .actions-cell {
  white-space: nowrap;
  vertical-align: middle;
  min-width: 9.5rem;
}

.admin-table .cell-clip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-deals-table {
  min-width: 1120px;
}

.admin-deal-cell--text {
  max-width: 240px;
}

.admin-image-col {
  min-width: 200px;
  max-width: 280px;
  vertical-align: middle;
}

.admin-image-cell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.admin-thumb--col {
  width: 36px;
  height: 36px;
}

.admin-image-url {
  display: block;
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--color-text-muted, #64748b);
  word-break: break-all;
}

a.admin-image-url {
  color: var(--color-accent-mid, #2563eb);
  text-decoration: none;
}

a.admin-image-url:hover {
  text-decoration: underline;
}

.admin-image-empty {
  color: var(--color-text-muted, #94a3b8);
}

.admin-stack-meta .admin-stack-image dd {
  min-width: 0;
}

.admin-stack-meta .admin-stack-image .admin-image-cell {
  flex-wrap: wrap;
}

.admin-stack-meta .admin-stack-image .admin-image-url {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-deal-cell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 280px;
}

.admin-thumb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 0;
}

.admin-thumb .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  box-sizing: border-box;
  display: block;
}

.admin-thumb .product-img.is-fallback,
.admin-thumb .product-img[src=""],
.admin-thumb .product-img:not([src]) {
  opacity: 0.55;
}

.admin-deal-text {
  min-width: 0;
}

.admin-deal-text .row-identity {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8125rem;
}

.row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}

.row-actions .btn-sm {
  padding: 0.28rem 0.55rem;
}

.admin-row-menu {
  position: relative;
  display: inline-block;
}

.admin-row-menu > summary {
  list-style: none;
  cursor: pointer;
}

.admin-row-menu > summary::-webkit-details-marker {
  display: none;
}

.admin-row-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 10rem;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-row-menu-panel .btn {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.admin-stack-list .row-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: var(--space-2);
}

/* Subtle colored row CTAs (navy / teal / soft status) */
.row-actions .btn-action-edit {
  color: var(--color-accent-mid);
}

.row-actions .btn-action-edit:hover:not(:disabled) {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.row-actions .btn-action-pin {
  color: var(--color-accent-bright);
}

.row-actions .btn-action-pin:hover:not(:disabled) {
  color: var(--color-commission);
  background: var(--color-commission-bg);
}

.row-actions .btn-action-publish,
.bulk-bar .btn-action-publish {
  color: var(--color-success);
}

.row-actions .btn-action-publish:hover:not(:disabled),
.bulk-bar .btn-action-publish:hover:not(:disabled) {
  color: var(--color-success);
  background: var(--color-success-bg);
}

.row-actions .btn-action-unpublish,
.bulk-bar .btn-action-unpublish {
  color: var(--color-warning);
}

.row-actions .btn-action-unpublish:hover:not(:disabled),
.bulk-bar .btn-action-unpublish:hover:not(:disabled) {
  color: var(--color-warning);
  background: var(--color-warning-bg);
}


.admin-inline-select {
  width: auto;
  max-width: 150px;
  font-size: 0.75rem;
  padding: 0.3rem 0.45rem;
}

.admin-tabs {
  margin-bottom: var(--space-3);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  width: 100%;
}

.admin-toolbar .search-field {
  flex: 1 1 16rem;
  min-width: min(16rem, 100%);
}

.admin-toolbar .toolbar-group {
  flex: 0 1 auto;
  margin-left: auto;
}

.admin-toolbar > .select {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Announcements list table: scroll on narrow, cards on mobile */
.admin-announcements-table {
  min-width: 900px;
  width: 100%;
  table-layout: auto;
}

.admin-announcements-table .col-title {
  width: auto;
  min-width: 12rem;
}

.admin-announcements-table .col-category {
  width: 7.5rem;
}

.admin-announcements-table .col-audience {
  width: 6.5rem;
}

.admin-announcements-table .col-status {
  width: 7rem;
}

.admin-announcements-table .col-author {
  width: 7.5rem;
}

.admin-announcements-table .col-publish {
  width: 6.75rem;
}

.admin-announcements-table .col-actions {
  width: 9.5rem;
}

@media (max-width: 1100px) {
  .admin-announcements-table .col-actions {
    width: 9rem;
  }

  .admin-announcements-table .col-author,
  .admin-announcements-table .col-publish {
    width: 6rem;
  }
}

.admin-announcements-table .col-title .row-identity {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-announcements-table td {
  white-space: normal;
  vertical-align: middle;
}

.admin-announcements-table .col-actions,
.admin-announcements-table .actions-cell {
  white-space: nowrap;
}

.admin-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
}

.admin-stack-list {
  display: none;
}

.admin-stack-row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.admin-stack-check {
  padding-top: 4px;
}

.admin-stack-check input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-accent);
}

.admin-stack-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.admin-stack-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
}

.admin-stack-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin: 0;
  font-size: var(--text-xs);
}

.admin-stack-meta div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dotted var(--color-border);
  padding-bottom: 2px;
}

.admin-stack-meta dt {
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.62rem;
}

.admin-stack-meta dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  text-align: right;
}

.admin-stack-reason {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

@media (max-width: 960px) {
  .admin-ops-grid {
    grid-template-columns: 1fr;
  }

  .app-main {
    padding-block: var(--space-4);
    padding-inline-start: var(--space-4);
    padding-inline-end: calc(var(--space-4) + var(--scroll-content-gap));
  }

  .admin-page-header {
    gap: var(--space-3);
  }

  .admin-toolbar,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar .toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .tabs .tab {
    flex: 0 0 auto;
  }

  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .admin-tabs .tab {
    flex: 0 0 auto;
  }
}

/* Legacy aliases kept for any remaining references */
.admin-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: 0 0 var(--space-4);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
}

.admin-hero .brand-signal {
  display: none;
}

.admin-hero h1 {
  font-size: var(--text-xl);
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: 4px;
}

.admin-hero .subtitle {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 1px;
  margin-bottom: var(--space-5);
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-stat-grid .stat-card {
  border: none;
  border-radius: 0;
  padding: var(--space-3);
  box-shadow: none;
}

.admin-stat-grid .stat-card .value {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
}

.admin-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (max-width: 960px) {
  .admin-panels {
    grid-template-columns: 1fr;
  }
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}

.panel-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.panel-row strong {
  font-size: var(--text-sm);
  display: block;
}

.panel-row .meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.newest-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 290px);
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.newest-rail .deal-card {
  scroll-snap-align: start;
}

.deal-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-6);
  align-items: start;
}

.deal-detail-media {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.deal-detail-media.product-media--detail {
  background: var(--color-bg);
}

.deal-detail-media img,
.deal-detail-media .product-img {
  width: 100%;
  height: 100%;
  max-height: min(520px, 70vh);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
}

.deal-detail-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
}

.deal-detail-panel h1 {
  margin-top: var(--space-2);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
  padding: var(--space-4);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
}

.detail-specs dt {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-specs dd {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.detail-specs .commission-spec dd {
  color: var(--color-commission);
  font-weight: 650;
  font-size: var(--text-base);
}

/* ?? Deal Details (buyer reservation layout) ?? */
.deal-details-page {
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dd-page-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dd-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.dd-page-head-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.dd-page-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.dd-page-title .dash-refresh {
  width: 30px;
  height: 30px;
}

.deal-details-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  width: fit-content;
  font-size: var(--text-sm);
  color: #2a5278;
  text-decoration: none;
  font-weight: 600;
}

.deal-details-page .back-link:hover {
  color: #12304f;
  text-decoration: underline;
}

.deal-details-page .back-link .icon {
  flex-shrink: 0;
}

.dd-overview {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px 22px;
  align-items: start;
  margin-bottom: 0;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.dd-media {
  position: relative;
  width: 168px;
  height: 168px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: auto;
  box-shadow: none;
}

.dd-media-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.dd-media-link:focus-visible {
  outline: 2px solid var(--color-accent-mid);
  outline-offset: 2px;
}

.dd-media-link:hover .product-img {
  transform: scale(1.02);
}

.dd-media-link .product-img {
  transition: transform 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  .dd-media-link .product-img {
    transition: none;
  }
  .dd-media-link:hover .product-img {
    transform: none;
  }
}

.dd-media-hint {
  display: none;
}

.dd-media img,
.dd-media .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  padding: 8px;
  box-sizing: border-box;
}

.dd-watch-fab {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.dd-watch-fab:hover,
.dd-watch-fab.is-active,
.dd-watch-fab[aria-pressed='true'] {
  color: #c9a227;
  border-color: #e0d4a8;
  background: #fffbeb;
}

.dd-overview-copy {
  min-width: 0;
  padding-top: 0;
}

.dd-title {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.25;
  font-family: var(--font-sans);
  font-weight: 700;
  color: #1a2b48;
  letter-spacing: -0.015em;
}

.dd-pricing-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
}

.dd-ends-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #fde8dc;
  color: #111827;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.dd-ends-badge .icon {
  flex-shrink: 0;
  color: #111827;
}

.dd-ends-badge.is-ended {
  background: #e8eef4;
  color: #4a5568;
}

.dd-ends-time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.dd-money-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dd-price-main {
  margin: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #5a6b7d;
  line-height: 1.2;
}

.dd-price-main strong {
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: #0c1a2b;
}

.dd-price-earn {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 1.05rem;
  font-weight: 750;
  color: #48bca2;
  line-height: 1.2;
}

.dd-price-earn-hint {
  margin: 2px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: #6b7c8f;
  line-height: 1.35;
  max-width: 28ch;
}

.dd-price-comp {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #6b7c8f;
  line-height: 1.3;
}

.dd-comp-info {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-grid;
  place-items: center;
  color: #8a9aab;
  cursor: pointer;
  border-radius: 50%;
}

.dd-comp-info:hover {
  color: #2a5278;
}

.dd-price-delta-line {
  margin: 2px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #6b7c8f;
  font-weight: 550;
}

.dd-pricing {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.dd-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.dd-price-label {
  font-size: 0.82rem;
  color: #4a5568;
  font-weight: 500;
  min-width: 6.25rem;
}

.dd-price-value {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dd-price-value--payout {
  color: #48bca2;
}

.dd-price-value--retail {
  color: #1e2d44;
  font-size: 1.05rem;
  font-weight: 700;
}

.dd-price-sep {
  display: inline-block;
  width: 1px;
  height: 1.1em;
  background: #c5d0dc;
  align-self: center;
  margin: 0 2px;
}

.dd-price-delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #cfb04c;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dd-price-delta.is-up {
  color: #48bca2;
}

.dd-price-delta.is-down {
  color: #cfb04c;
}

.dd-price-caret {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.dd-price-delta-pct {
  font-size: 0.9rem;
  font-weight: 700;
}

.dd-price-pipe {
  color: #c5d0dc;
  font-weight: 500;
}

.dd-meta-line,
.dd-open-product,
.dd-secondary-actions {
  display: none;
}

.dd-related {
  margin-top: 8px;
}

.dd-related .section-header {
  margin-bottom: 10px;
}

.dd-related .section-header h2 {
  font-size: var(--text-base);
  margin: 0;
}

.dd-meta-line span:not(:last-child)::after {
  content: '?';
  margin-left: var(--space-3);
  color: var(--color-border-strong);
}

.dd-open-product {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
}

.dd-open-product a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-link, #1d4ed8);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dd-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}


.dd-instruction-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.dd-instruction {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: 550;
}

.dd-stock {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--color-text-secondary);
  border: none;
  background: transparent;
  padding: 4px 0;
  cursor: pointer;
  font-family: inherit;
}

.dd-stock.is-off .dd-stock-toggle,
.dd-stock:not(.is-on) .dd-stock-toggle {
  background: #c5d0dc;
}

.dd-stock.is-off .dd-stock-knob,
.dd-stock:not(.is-on) .dd-stock-knob {
  transform: translateX(2px);
}

/* In-stock checks stay visible in both filter modes (toggle only filters rows). */
.dd-table .dd-stock-check {
  display: inline-flex;
}

.dd-stock-empty {
  margin: 12px 0 0;
  padding: 14px;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-muted);
  border-radius: 8px;
}

.dd-stock-toggle {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #c5d0dc;
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition);
}

.dd-stock.is-on .dd-stock-toggle {
  background: #3bb39a;
}

.dd-stock-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition);
}

.dd-stock.is-on .dd-stock-knob {
  transform: translateX(20px);
}

.dd-stock-remain {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
}

.dd-primary-retailer {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.dd-primary-retailer a {
  color: var(--color-focus);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dd-reserve-block {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-sm);
}

.dd-table-wrap {
  /* Keep horizontal scroll for narrow viewports; never vertical ? page scrolls instead.
     (overflow-x:auto + overflow-y:visible computes to overflow-y:auto and shows a phantom scrollbar.) */
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.dd-table-wrap:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.dd-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 520px;
  font-size: var(--text-sm);
}

.dd-table thead th {
  text-align: left;
  padding: 8px 12px;
  background: #f7fafb;
  color: var(--color-text-secondary);
  font-weight: 650;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  text-transform: none;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  vertical-align: middle;
}

.dd-th-retailer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.retailer-logo-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.retailer-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  color: transparent;
  font-size: 0;
}

.retailer-logo:-moz-broken,
.retailer-logo:not([src]),
.retailer-logo[src=''] {
  display: none;
}

.retailer-logo-fallback {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.dd-th-retailer-label {
  display: inline;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.dd-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e8eef2;
  vertical-align: middle;
  background: #fff;
}

.dd-table tbody tr:nth-child(even) td {
  background: #fafcfd;
}

.dd-table tbody tr:last-child td {
  border-bottom: none;
}


.dd-item-cell {
  min-width: 0;
  vertical-align: middle !important;
}

.dd-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.dd-item-swatch {
  width: 16px;
  height: 28px;
  border-radius: 4px;
  background: var(--swatch, #999);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
  flex: 0 0 auto;
  border: none;
  padding: 0;
  pointer-events: none;
  user-select: none;
}

.dd-item-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #1a2b48;
  line-height: 1.35;
  word-break: break-word;
}

.dd-item-cat {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.dd-item-sep {
  color: #1a2b48;
  font-weight: 600;
}

.dd-copy-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9aa8b5;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.dd-copy-btn:hover {
  color: var(--color-accent);
  background: var(--color-surface-muted);
}

.dd-th-items,
.dd-item-cell {
  text-align: left;
  width: 42%;
}

.dd-th-qty,
.dd-qty-cell {
  text-align: center;
  width: 110px;
  vertical-align: middle;
}

/* Beat `.dd-table thead th { text-align: left }` so retailer headers match cell centering (same as Quantity). */
.dd-table thead th.dd-th-qty,
.dd-table thead th.dd-th-retailer,
.dd-th-retailer,
.dd-retailer-cell {
  text-align: center;
  vertical-align: middle;
}

.dd-th-retailer,
.dd-retailer-cell,
.dd-retailer-pair {
  max-height: none;
  overflow: visible;
}

.dd-qty-input {
  width: 72px;
  margin: 0 auto;
  text-align: center;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  padding: 8px 6px;
  display: block;
}

.dd-pool-hint {
  margin: 0.3rem 0 0;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  text-align: center;
}

.dd-actions-hint {
  text-align: right;
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  justify-content: flex-end;
}

.dd-qty-input:focus {
  border-color: var(--color-accent-mid);
  box-shadow: 0 0 0 3px rgba(42, 82, 120, 0.18);
  outline: none;
}

.dd-retailer-cell {
  white-space: nowrap;
}

.dd-retailer-cell--empty {
  color: var(--color-text-muted);
}

.dd-no-exact-match {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: var(--text-sm);
  font-style: italic;
  white-space: nowrap;
}

.dd-retailer-cell--no-exact .dd-retailer-pair {
  justify-content: center;
}

.dd-retailer-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.dd-retailer-link {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm);
}

.dd-retailer-link:hover {
  color: #1e3a8a;
}

.dd-stock-check {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3bb39a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: help;
  line-height: 0;
}

.dd-stock-check .icon {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2.5;
  pointer-events: none;
}

/* Native title/aria-label only. CSS ::after tips clipped by .dd-table-wrap
   (overflow-y:hidden) and inflated scroll height when left idle. */

.dd-empty {
  color: #9aa8b5;
  font-weight: 500;
}

.dd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.dd-btn-reset {
  border-color: #3bb39a !important;
  color: #1f7a6a !important;
  background: #fff !important;
  min-width: 100px;
}

.dd-btn-reset:hover:not(:disabled) {
  background: #eefaf7 !important;
}

.dd-btn-reserve {
  background: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  color: #fff !important;
  min-width: 160px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 1px 2px rgba(12, 26, 43, 0.12);
}

.dd-btn-reserve:hover:not(:disabled) {
  background: var(--color-accent-hover) !important;
  border-color: var(--color-accent-hover) !important;
}

.dd-btn-reserve.is-full,
.dd-btn-reserve.btn-danger.is-full:disabled {
  background: var(--color-danger) !important;
  border-color: var(--color-danger) !important;
  color: #fff !important;
  opacity: 1;
  cursor: not-allowed;
  gap: 8px;
}

.dd-commitments {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.dd-commitments-title {
  margin: 0 0 6px;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text);
}

.dd-commitments-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.dd-commitments-full {
  margin-top: 4px;
  color: var(--color-danger);
}

.dd-commitments-full strong {
  font-weight: 700;
  color: var(--color-danger);
}

.dd-reserve-block.is-full .dd-instruction {
  color: var(--color-danger);
  font-weight: 650;
}

.dd-notes {
  margin-top: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.dd-notes summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
}

.dd-notes[open] summary {
  margin-bottom: var(--space-3);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text-secondary);
}

.back-link:hover {
  color: var(--color-accent);
}

.commit-box {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.qty-control input {
  width: 72px;
  text-align: center;
}

.success-panel {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.success-panel .check-circle {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: var(--color-success-bg);
  color: var(--color-success);
  display: grid;
  place-items: center;
}

.prefs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
}

.prefs-grid label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  transition: border-color var(--transition), background var(--transition);
}

.prefs-grid label:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-muted);
}

.integration-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-warning-bg);
  border: 1px solid #f0d9a8;
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-top: var(--space-3);
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.announcement-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.announcement-item:hover {
  border-color: var(--color-border-strong);
}

.announcement-item.pinned {
  border-color: #c5daf0;
  background: linear-gradient(90deg, var(--color-info-bg), var(--color-surface) 36%);
  box-shadow: inset 3px 0 0 var(--color-info);
}

.announcement-item header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}

.announcement-item h3 {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: var(--text-base);
  font-family: var(--font-display);
}

.announcement-item .ann-meta {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.settings-card {
  max-width: 720px;
}

.app-main--account .settings-card {
  max-width: 640px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.app-shell--account .app-main--account {
  background: linear-gradient(180deg, #e8f3f0 0%, var(--color-bg) 42%);
}


.account-surface--wide {
  max-width: 820px;
}

.prefs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pref-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #f7fafc;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  margin: 0;
}

.pref-chip input {
  accent-color: #3bb39a;
}

.pref-chip:has(input:checked) {
  background: rgba(59, 179, 154, 0.12);
  border-color: rgba(59, 179, 154, 0.45);
  color: var(--color-text);
  font-weight: 600;
}

.pref-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: var(--text-sm);
}

.form-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.notif-perm {
  margin: 8px 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.security-panel {
  max-width: 920px;
}

.security-section-title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

.security-password-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: var(--space-6);
  align-items: start;
}

.password-rules {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.password-rules ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.btn-save-soft {
  background: #b8e6d8;
  color: #0f3d34;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.4rem;
  font-weight: 700;
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.btn-save-soft:hover {
  background: #a3dccb;
}

@media (max-width: 800px) {
  .security-password-layout {
    grid-template-columns: 1fr;
  }
}

.sessions-panel {
  max-width: 1100px;
}

.sessions-table-wrap {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: auto;
}

.sessions-table {
  min-width: 860px;
}

.sessions-table th {
  white-space: nowrap;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.sessions-table td {
  font-size: var(--text-sm);
  vertical-align: middle;
}

.session-device {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
}

.session-current-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.session-current-check input {
  accent-color: #3bb39a;
}

.sessions-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: var(--space-5);
}

.btn-outline-teal {
  background: #fff;
  color: var(--color-accent-mid);
  border: 1.5px solid var(--color-accent-mid);
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font-weight: 700;
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-outline-teal:hover {
  background: var(--color-accent-soft);
}

.btn-teal {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  font-weight: 700;
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(18, 48, 79, 0.22);
  transition: background var(--transition);
}

.btn-teal:hover {
  background: var(--color-accent-hover);
}

.sessions-art {
  display: grid;
  place-items: center;
  margin-top: var(--space-8);
  opacity: 0.95;
}

.prev-sessions-table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: auto;
  max-height: min(50vh, 420px);
}

.prev-sessions-empty {
  text-align: center;
  padding: 2.5rem 1rem !important;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.sort-hint {
  font-size: 0.65rem;
  opacity: 0.55;
  margin-left: 2px;
}

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

  .deal-detail-panel {
    position: static;
  }

  .dd-overview {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
  }

  .dd-media {
    width: 120px;
    height: 120px;
    max-width: none;
    margin: 0;
  }

  .dd-actions {
    justify-content: stretch;
  }

  .dd-actions .btn {
    flex: 1;
  }

  .dd-actions-hint {
    text-align: left;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    padding: var(--space-6) var(--space-5);
  }
}

@media (max-width: 640px) {
  .deal-details-page {
    max-width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .dd-overview {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .dd-media {
    width: min(100%, 200px);
    height: auto;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
  }

  .dd-overview-copy {
    text-align: left;
  }

  .dd-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .dd-pricing-stack {
    width: 100%;
    max-width: 100%;
  }

  .dd-ends-badge {
    flex-wrap: wrap;
    max-width: 100%;
    border-radius: 10px;
  }

  .dd-price-main {
    font-size: 1.65rem;
  }

  .dd-price-earn-hint,
  .dd-price-comp,
  .dd-price-delta-line {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .dd-reserve-block {
    padding: 12px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .dd-instruction-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dd-instruction {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .dd-stock {
    flex-wrap: wrap;
  }

  /* Stack qty rows as cards (same approach as Quick Commit) */
  .dd-table-wrap {
    overflow-x: hidden;
    overflow-y: hidden;
    max-width: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    margin-bottom: 10px;
  }

  .dd-table,
  .dd-table tbody {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .dd-table {
    table-layout: auto;
  }

  .dd-table thead {
    display: none;
  }

  .dd-table tbody tr.dd-product-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    margin-bottom: 0.55rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
  }

  .dd-table tbody tr.dd-product-row td {
    display: block;
    width: auto;
    max-width: 100%;
    padding: 0;
    border-bottom: none;
    background: transparent !important;
    min-width: 0;
  }

  .dd-table tbody tr.dd-product-row td.dd-item-cell {
    flex: 1 1 100%;
    width: 100%;
  }

  .dd-table tbody tr.dd-product-row td.dd-qty-cell {
    flex: 0 0 auto;
  }

  .dd-table tbody tr.dd-product-row td.dd-retailer-cell {
    flex: 1 1 auto;
    white-space: normal;
  }

  .dd-table tbody tr.dd-product-row td.dd-retailer-cell[data-retailer-label]::before {
    content: attr(data-retailer-label);
    display: block;
    font-size: 0.68rem;
    font-weight: 650;
    color: var(--color-text-muted);
    margin-bottom: 2px;
    overflow-wrap: anywhere;
  }

  .dd-table tbody tr.dd-product-row td.dd-retailer-cell--empty {
    display: none;
  }

  .dd-item-row {
    width: 100%;
  }

  .dd-item-text {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .dd-qty-input {
    margin: 0;
    width: 4.5rem;
  }

  .dd-pool-hint {
    text-align: left;
  }

  .dd-retailer-pair {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dd-retailer-link {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .dd-actions {
    flex-direction: column-reverse;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .dd-actions .btn,
  .dd-btn-reset,
  .dd-btn-reserve {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .dd-actions-hint {
    text-align: center;
  }

  .top-deal-rail,
  .deal-grid--browse {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
  }

  .top-deal-card,
  .deal-card {
    max-width: 100%;
    min-width: 0;
  }

  .newest-rail {
    grid-auto-columns: minmax(min(100%, 260px), 82vw);
  }

}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent-soft);
  border: 1px solid rgba(18, 48, 79, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
}

.bulk-bar[hidden] {
  display: none;
}

.image-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
}

.browse-intro {
  margin-bottom: var(--space-2);
}

.notif-drawer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  gap: var(--space-2);
}

.notif-drawer-toolbar .unread-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ???????????????????????????????????????????
   Buyer Dashboard ? partner ops home
   Inspired by marketplace dashboards; unique BBB look
   ??????????????????????????????????????????? */

.buyer-dash {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 1180px;
}

.dash-welcome-line {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.dash-welcome-line strong {
  color: var(--color-accent-mid);
  font-weight: 700;
}

.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dash-stat-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 168px;
}

.dash-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 28px;
}

.dash-stat-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a2b48;
  flex-shrink: 0;
}

.dash-stat-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.dash-stat-card .dash-refresh {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.dash-stat-card .dash-refresh:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.dash-stat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.dash-stat-body--center {
  align-items: center;
  text-align: center;
}

.dash-stat-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.dash-period {
  position: relative;
  display: inline-flex;
  margin: 0;
}

.dash-period-toggle {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a2b48;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-height: 22px;
  line-height: 1.2;
}

.dash-period-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}

.dash-period.is-open .dash-period-caret {
  transform: rotate(180deg);
}

.dash-period-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: 20;
  min-width: 148px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 4px;
}

.dash-period-option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.dash-period-option:hover,
.dash-period-option.is-selected {
  background: var(--color-surface-muted);
  color: #1a2b48;
}

.dash-stat-main {
  margin-top: 0;
  width: 100%;
}

.dash-stat-kicker {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.3;
}

.dash-stat-amount {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 700;
  color: #1a2b48;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dash-stat-cols {
  display: grid;
  gap: 10px;
  align-items: stretch;
  margin-top: auto;
  width: 100%;
}

.dash-stat-cols--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-stat-cols--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-stat-col {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  background: #f7fafc;
}

.dash-stat-col .dash-stat-kicker {
  margin-bottom: 6px;
}

.dash-stat-col .dash-stat-amount {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.dash-stat-col-hint {
  margin-bottom: 4px;
}

.dash-stat-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.dash-stat-link span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-stat-link-arrow {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 1px;
}

.dash-stat-link:hover {
  text-decoration: none;
  color: #1d4ed8;
}

.dash-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.dash-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.dash-title-row h1 {
  margin: 0;
  font-size: var(--text-2xl);
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dash-refresh {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}

.dash-refresh:hover {
  color: var(--color-accent);
  border-color: var(--color-border-strong);
}

.dash-refresh:active {
  transform: rotate(-45deg);
}

.dash-page-head-aside {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.dash-payout-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.9rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.dash-payout-coin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffe9a8, #d4a017 55%, #a67c00);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.dash-payout-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.dash-payout-chip strong {
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.dash-unread-chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--color-info-bg);
  color: var(--color-info);
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
}

.dash-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
  gap: var(--space-5);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 70% 120% at 100% 0%, rgba(26, 107, 138, 0.2), transparent 50%),
    linear-gradient(135deg, #0f2438 0%, #153552 48%, #1a4a6e 100%);
  color: #e8eef5;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.dash-spotlight::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.dash-spotlight-kicker {
  margin: 0 0 var(--space-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 238, 245, 0.55);
}

.dash-spotlight-copy h2 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 650;
  color: #fff;
  max-width: 18ch;
  line-height: 1.2;
}

.dash-spotlight-copy > p {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: rgba(232, 238, 245, 0.78);
  max-width: 42ch;
  line-height: 1.5;
}

.dash-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.dash-spotlight .btn-primary {
  background: #fff;
  color: var(--color-accent);
  box-shadow: none;
}

.dash-spotlight .btn-primary:hover:not(:disabled) {
  background: #f0f5fa;
}

.dash-spotlight .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.dash-spotlight .btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.dash-spotlight-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  align-content: center;
  position: relative;
  z-index: 1;
}

.dash-spotlight-stats li {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-spotlight-stats strong {
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.dash-spotlight-stats span {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(232, 238, 245, 0.6);
}

.dash-welcome {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.dash-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.dash-panel,
.dash-deadline,
.dash-top-deals {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dash-panel {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 100%;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.dash-panel-head h2,
.dash-panel-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.dash-panel-title .dash-refresh {
  width: 28px;
  height: 28px;
}

.dash-panel-head a,
.dash-view-all {
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--color-accent-mid);
  text-decoration: none;
}

.dash-panel-head a:hover,
.dash-view-all:hover {
  text-decoration: underline;
}

.dash-panel-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-surface-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.dash-panel-head--stack {
  align-items: flex-start;
  padding: var(--space-4) var(--space-4) 0;
}

.dash-panel-sub {
  margin: 4px 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.dash-metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.dash-metric-row--3 {
  grid-template-columns: 1fr;
}

.dash-metric {
  padding: var(--space-3);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.dash-metric-label {
  margin: 0 0 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.dash-metric-value {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.dash-metric-meta {
  margin: 4px 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.dash-metric-link {
  display: inline-block;
  margin-top: 6px;
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--color-accent-mid);
  text-decoration: none;
}

.dash-metric-link:hover {
  text-decoration: underline;
}

.dash-deadline {
  padding: var(--space-4);
}

.dash-deadline-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.dash-deadline-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.dash-deadline-empty {
  margin: var(--space-3) 0 0;
  padding: var(--space-5);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
}

.dash-deadline-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.dash-deadline-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
}

.dash-deadline-list strong {
  display: block;
  font-size: var(--text-sm);
}

.dash-deadline-list span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: capitalize;
}

.dash-deadline-list time {
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--color-warning);
  white-space: nowrap;
}

.dash-ann-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-info-bg);
  border: 1px solid #c5daf0;
  border-radius: var(--radius-lg);
}

.dash-ann-banner strong {
  display: block;
  margin: 4px 0;
  font-size: var(--text-sm);
}

.dash-ann-banner p {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.dash-top-deals {
  padding: var(--space-4);
  padding-bottom: var(--space-5);
}

/* Dashboard Top Deals ? cards grow with title height (same as Browse Deals) */
.dash-top-deals .top-deal-rail .top-deal-card {
  height: auto;
  align-self: start;
}

.top-deal-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  margin-top: var(--space-3);
}

@media (min-width: 1100px) {
  .top-deal-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  .top-deal-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.top-deal-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(12, 26, 43, 0.04);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.top-deal-card:hover {
  border-color: #d5dbe3;
  box-shadow: 0 4px 16px rgba(12, 26, 43, 0.07);
  transform: none;
}

.top-deal-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-bg);
  isolation: isolate;
  margin: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
}

.top-deal-media-link {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
}

.top-deal-media .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.85rem 1rem;
  box-sizing: border-box;
  background: transparent;
  transition: transform 0.25s ease;
}

.top-deal-media-link:hover .product-img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .top-deal-media-link:hover .product-img {
    transform: none;
  }
}

.top-deal-media-badges {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: calc(100% - 1.1rem);
}

.top-deal-media-badges .badge {
  box-shadow: 0 1px 4px rgba(12, 26, 43, 0.08);
}

.top-deal-body {
  padding: 0.65rem 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
}

.top-deal-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  min-width: 0;
  color: var(--color-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Title / price / meter are text-only - suppress stray broken-image glyphs */
.top-deal-title img,
.top-deal-price-row img,
.top-deal-price-block img,
.top-deal-body > img,
.buyer-pool-meter img {
  display: none !important;
}

.top-deal-title a {
  color: inherit;
  text-decoration: none;
}

.top-deal-title a:hover {
  color: var(--color-accent-mid);
}

.top-deal-price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.top-deal-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 0.12rem;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  min-height: 0;
  padding-top: 0;
}

.top-deal-price-label {
  display: block;
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.top-deal-price {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent-mid);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.top-deal-price-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.top-deal-retail-price {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.top-deal-earn {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  color: #48bca2;
  line-height: 1.3;
  cursor: help;
}

.top-deal-qty-badge {
  display: none;
}

.top-deal-pct {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #cfb04c;
  cursor: default;
  width: fit-content;
}

.top-deal-pct.is-up {
  color: #48bca2;
}

.top-deal-pct.is-down {
  color: #cfb04c;
}

.top-deal-pct.is-flat {
  color: var(--color-text-muted);
}

.top-deal-pct-caret {
  font-size: 0.8rem;
  line-height: 1;
}

.top-deal-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  background: var(--color-surface-muted);
  min-width: 0;
  overflow: visible;
}

.top-deal-info-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

.top-deal-info-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
}

.top-deal-ends {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--color-text);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.top-deal-retailers {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 28px;
  overflow: visible;
  /* Room for the in-stock check that sits slightly outside the logo */
  padding: 3px 3px 0 0;
}

.top-deal-retailers-empty {
  display: block;
  width: 0;
  height: 28px;
}

.top-deal-retailer {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid #cdd6e1;
  background: #fff;
  color: var(--color-accent);
  font-size: 0.58rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  text-decoration: none;
  overflow: visible;
}

.top-deal-retailer-logo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  overflow: hidden;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-accent);
}

.top-deal-retailer-logo.is-initials {
  letter-spacing: -0.02em;
}

.top-deal-retailer-logo img {
  width: 20px;
  height: 20px;
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
  display: block;
}

.top-deal-retailer:hover {
  border-color: var(--color-accent-mid);
  color: var(--color-accent);
}

.top-deal-retailer-check {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
  z-index: 1;
  cursor: help;
}

.top-deal-retailer--muted {
  opacity: 0.6;
}

.top-deal-retailer-more {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  line-height: 1;
  padding-left: 2px;
}

.top-deal-footer {
  margin-top: auto;
  padding-top: 0.15rem;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.top-deal-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}

.top-deal-buy,
.top-deal-view-deal,
.top-deal-reserve {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.top-deal-view-deal {
  border-color: var(--color-accent-mid);
  color: var(--color-accent-mid);
  background: #fff;
}

.top-deal-view-deal:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.top-deal-buy.is-committed,
.top-deal-buy:disabled {
  opacity: 0.72;
  cursor: default;
}

.top-deal-buy.is-full,
.top-deal-buy.btn-danger.is-full:disabled {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}

.top-deal-full-note {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-danger);
  line-height: 1.3;
  text-align: center;
}

/* Deal card tool icons ? cart / commitment / copy SKU (quiet toolbar, not over image) */
.td-float-rail {
  display: none;
}

.td-float-cart-row,
.td-float-btn,
.td-commit {
  pointer-events: auto;
}

.td-float-cart-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.td-add-cart-label {
  position: absolute;
  right: calc(100% + 6px);
  top: 50%;
  transform: translate(4px, -50%);
  border: 1px solid #d5dbe3;
  background: #fff;
  color: #4a5568;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  z-index: 6;
}

.td-float-cart:hover + .td-add-cart-label,
.td-float-cart:focus-visible + .td-add-cart-label,
.td-add-cart-label.is-flash {
  opacity: 1;
  transform: translate(0, -50%);
}

.td-add-cart-label.is-in-cart {
  border-color: var(--color-accent-mid);
  color: var(--color-accent);
}

.td-float-btn {
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.td-float-cart {
  border: none;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 1px 4px rgba(18, 48, 79, 0.18);
}

.td-float-cart:hover {
  background: var(--color-accent-hover);
}

.td-float-cart.is-in-cart {
  background: #1f8a74;
}

.td-float-copy {
  border: 1.5px solid var(--color-border-strong);
  background: #fff;
  color: var(--color-text-muted);
}

.td-float-copy:hover:not(:disabled) {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-mid);
  color: var(--color-accent-mid);
}

.td-float-copy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.td-commit {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}

.td-commit-svg {
  width: 30px;
  height: 30px;
  display: block;
}

.td-commit-track {
  fill: none;
  stroke: #e6e9ee;
  stroke-width: 3.5;
}

.td-commit-prog {
  fill: none;
  stroke: #2fbb7a;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s ease;
}

.td-commit-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.52rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  line-height: 1;
  pointer-events: none;
}

.td-float-tip {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  color: #6b7a8c;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 6;
}

.td-commit:hover .td-float-tip,
.td-float-copy:hover .td-float-tip,
.td-commit:focus-within .td-float-tip,
.td-float-copy:focus-visible .td-float-tip {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 640px) {
  .td-add-cart-label {
    display: none;
  }

  .top-deal-ctas {
    gap: 0.4rem;
  }

  .top-deal-buy,
  .top-deal-view-deal {
    padding: 0.5rem 0.55rem;
    font-size: 0.78rem;
  }

  .top-deal-info-bar {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .top-deal-info-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-add-cart-label,
  .td-commit-prog,
  .td-float-tip {
    transition: none;
  }
}

/* Quick Commit reserve modal */
.qb-backdrop {
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: center;
  box-sizing: border-box;
}

.qb-backdrop .qb-modal {
  width: min(100%, 40rem);
  max-width: min(100%, calc(100vw - 16px));
  margin: auto;
  padding: 1.15rem 1.25rem 1.2rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e6e9ee;
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: min(90dvh, 90vh);
  overflow-x: hidden;
  overflow-y: hidden;
  min-width: 0;
}

.qb-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex: 0 0 auto;
  min-width: 0;
}

.qb-modal-head-text {
  min-width: 0;
  flex: 1 1 auto;
}

.qb-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--color-accent);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.qb-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.qb-modal-promo {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.qb-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.qb-price-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qb-price-item span {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.qb-price-item strong {
  font-size: 1.05rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.qb-price-item .qb-retail {
  color: #8a95a3;
}

.qb-price-delta {
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 1px;
}

.qb-price-delta.is-down {
  color: #c9a227;
}

.qb-price-delta.is-up {
  color: #2fbb7a;
}

.qb-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.qb-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  table-layout: auto;
}

.qb-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 1px solid #e6e9ee;
  background: #fafbfc;
  white-space: nowrap;
}

.qb-table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f5;
}

.qb-table tfoot td {
  border-bottom: none;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.qb-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

.qb-item-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
  pointer-events: none;
  user-select: none;
  outline: none;
  box-shadow: none;
}

.qb-item-swatch {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--swatch, #999);
  box-shadow: 0 0 0 1.5px #fff, inset 0 0 0 1px rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

.qb-item-thumb .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  color: transparent;
  font-size: 0;
}

.qb-item-thumb .product-img:-moz-broken,
.qb-item-thumb .product-img:not([src]),
.qb-item-thumb .product-img[src=''] {
  visibility: hidden;
}

.qb-item-thumb .product-img.is-fallback {
  visibility: visible;
}

.qb-variant-row.is-empty {
  opacity: 0.55;
}

.qb-pool-hint {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  display: flex;
  justify-content: flex-start;
}

.qb-item-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.qb-item-label {
  font-weight: 650;
  color: var(--color-text);
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.qb-copy-sku {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px;
  display: grid;
  place-items: center;
}

.qb-copy-sku:hover {
  color: var(--color-accent-mid);
}

.qb-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  max-width: 100%;
}

.qb-qty-btn {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  background: #fff;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.qb-qty-btn:hover {
  border-color: var(--color-accent-mid);
  color: var(--color-accent);
}

.qb-qty-input {
  width: 2.6rem;
  height: 1.85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  background: #fff;
  -moz-appearance: textfield;
}

.qb-qty-input::-webkit-outer-spin-button,
.qb-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qb-retailers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
}

.qb-retailer {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.55rem;
  font-weight: 800;
  overflow: visible;
}

.qb-retailer-logo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.qb-retailer-logo img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.qb-retailer-check {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5b4db8;
  color: #fff;
  font-size: 0.45rem;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 0 1.5px #fff;
  cursor: help;
}

.qb-payout-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.qb-total-label {
  text-align: right;
  font-weight: 700;
  color: var(--color-text);
}

.qb-modal-foot {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
}

.qb-modal-foot--split {
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.qb-util-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.qb-util-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.15rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid #d8dee6;
  background: #f7f9fb;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.qb-util-btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--color-accent-mid);
  color: var(--color-accent);
}

.qb-util-btn:focus-visible {
  outline: 2px solid var(--color-accent-mid);
  outline-offset: 2px;
}

.qb-util-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qb-util-btn svg {
  flex: 0 0 auto;
}

.qb-util-cart.is-in-cart {
  background: #e8f6f2;
  border-color: #1f8a74;
  color: #1f8a74;
}

.qb-util-fav.is-active {
  background: #fbf6e6;
  border-color: #c9a227;
  color: #c9a227;
}

.qb-modal-foot-ctas {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.qb-cancel {
  min-width: min(6.5rem, 100%);
  border-radius: 10px;
  font-weight: 650;
  box-sizing: border-box;
}

.qb-save {
  min-width: min(7.5rem, 100%);
  border-radius: 10px;
  padding: 0.6rem 1.35rem;
  font-weight: 700;
  box-sizing: border-box;
}

.qb-save:disabled,
.qb-save.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .qb-backdrop {
    padding: 8px;
    place-items: center;
  }

  .qb-backdrop .qb-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding: 0.9rem;
    max-height: 90dvh;
  }

  .qb-modal-head h2 {
    font-size: 1.05rem;
  }

  .qb-price-row {
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
  }

  /* Stack table rows so Commit/Cancel stay in viewport width */
  .qb-table-wrap {
    overflow-x: hidden;
    border: none;
    border-radius: 0;
  }

  .qb-table,
  .qb-table tbody,
  .qb-table tfoot {
    display: block;
    width: 100%;
  }

  .qb-table thead {
    display: none;
  }

  .qb-table tbody tr.qb-variant-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'item item'
      'qty payout'
      'retailers retailers';
    gap: 0.45rem 0.65rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    margin-bottom: 0.55rem;
    border: 1px solid #e6e9ee;
    border-radius: 12px;
    background: #fff;
  }

  .qb-table tbody tr.qb-variant-row td {
    display: block;
    width: auto;
    max-width: 100%;
    padding: 0;
    border-bottom: none;
    min-width: 0;
  }

  .qb-table tbody tr.qb-variant-row td.qb-item-cell {
    grid-area: item;
  }

  .qb-table tbody tr.qb-variant-row td:nth-child(2) {
    grid-area: qty;
  }

  .qb-table tbody tr.qb-variant-row td:nth-child(3) {
    grid-area: retailers;
  }

  .qb-table tbody tr.qb-variant-row td.qb-payout-cell {
    grid-area: payout;
    text-align: right;
    align-self: center;
  }

  .qb-item {
    width: 100%;
  }

  .qb-item-thumb {
    width: 40px;
    height: 40px;
  }

  .qb-qty-btn {
    width: 1.7rem;
    height: 1.7rem;
    flex: 0 0 auto;
  }

  .qb-qty-input {
    width: 2.35rem;
    height: 1.7rem;
    flex: 0 0 auto;
  }

  .qb-retailer {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
  }

  .qb-table tfoot tr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.15rem 0.15rem;
  }

  .qb-table tfoot td {
    width: auto;
    padding: 0;
  }

  .qb-total-label {
    text-align: left;
  }

  .qb-modal-foot {
    margin-top: 0.85rem;
  }

  .qb-modal-foot--split {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
  }

  .qb-util-bar {
    justify-content: stretch;
    width: 100%;
  }

  .qb-util-btn {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding: 0 0.45rem;
  }

  .qb-util-label {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .qb-modal-foot-ctas {
    width: 100%;
    margin-left: 0;
    flex-direction: column-reverse;
  }

  .qb-cancel,
  .qb-save {
    width: 100%;
    min-width: 0;
  }
}

.dash-top-cta {
  display: flex;
  justify-content: center;
  padding: var(--space-5) var(--space-4) var(--space-2);
}

.dash-go-deals {
  min-width: min(100%, 280px);
  justify-content: center;
  padding: 0.85rem 2rem;
  font-size: var(--text-base);
  font-weight: 700;
}

@media (max-width: 1024px) {
  .dash-stat-grid {
    grid-template-columns: 1fr;
  }

  .dash-panels {
    grid-template-columns: 1fr;
  }

  .dash-metric-row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .dash-stat-cols--3,
  .dash-stat-cols--2,
  .dash-metric-row,
  .dash-metric-row--3 {
    grid-template-columns: 1fr;
  }

  .dash-deadline-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ?? Notifications retailer matrix ?? */
.notif-page {
  max-width: 920px;
}

.notif-page .account-page-header h1 {
  margin-bottom: 0;
}

.notif-page .subtitle {
  display: none;
}

.notif-matrix-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 720px);
}

.notif-matrix-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.notif-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
}

.notif-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef5f8;
  color: #8a97a8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.notif-col-retailer {
  text-align: left;
  width: 42%;
}

.notif-col-tier {
  text-align: center;
  width: 19.3%;
}

.notif-col-label {
  display: block;
  margin-bottom: 8px;
}

.notif-matrix tbody th,
.notif-matrix tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef2f5;
  background: #fff;
  vertical-align: middle;
}

.notif-matrix tbody tr:last-child th,
.notif-matrix tbody tr:last-child td {
  border-bottom: none;
}

.notif-retailer-name {
  text-align: left;
  font-weight: 500;
  color: #3d4a5c;
  font-size: 0.92rem;
}

.notif-retailer-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notif-retailer-logo-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.notif-retailer-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  grid-area: 1 / 1;
}

.notif-retailer-fallback {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: #1a4a6e;
  grid-area: 1 / 1;
}

.notif-retailer-fallback[hidden] {
  display: none !important;
}

.notif-retailer-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-check {
  display: inline-grid;
  place-items: center;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
  width: 20px;
  height: 20px;
}

.notif-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.notif-check-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid #b7c4d0;
  background: #fff;
  display: grid;
  place-items: center;
  color: transparent;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.notif-check-box .icon {
  width: 12px;
  height: 12px;
}

.notif-check input:checked + .notif-check-box {
  background: #7ec9b8;
  border-color: #7ec9b8;
  color: #fff;
}

.notif-check input:indeterminate + .notif-check-box {
  background: #b7e0d6;
  border-color: #7ec9b8;
  color: #fff;
}

.notif-check input:focus-visible + .notif-check-box {
  outline: 2px solid var(--color-accent-mid);
  outline-offset: 2px;
}

.notif-matrix-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  background: #fff;
}

.notif-selected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #3bb39a;
  font-size: var(--text-sm);
  font-weight: 600;
}

.notif-selected-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3bb39a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

.notif-matrix-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notif-btn-cancel {
  border-color: #7ec9b8;
  color: #2f8f7f;
  background: #fff;
}

.notif-btn-cancel:hover {
  background: #f2fbf8;
}

.notif-btn-save {
  background: #7ec9b8;
  border-color: #7ec9b8;
  color: #fff;
  min-width: 88px;
}

.notif-btn-save:hover {
  background: #6bbba9;
  border-color: #6bbba9;
}

.notif-disclaimer {
  margin: 12px 4px 0;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.4;
}

@media (max-width: 720px) {
  .notif-matrix thead th,
  .notif-matrix tbody th,
  .notif-matrix tbody td {
    padding: 10px 8px;
  }

  .notif-col-label {
    font-size: 0.58rem;
    letter-spacing: 0.04em;
  }

  .notif-matrix-card {
    max-height: min(65vh, 640px);
  }
}

/* ?? Deals Cart page ?? */
.dcart-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dcart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dcart-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.dcart-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 1rem;
  align-items: start;
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.15rem;
}

.dcart-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.dcart-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.88rem;
}

.dcart-table col.dcart-col-item { width: 34%; }
.dcart-table col.dcart-col-price { width: 11%; }
.dcart-table col.dcart-col-reimburse { width: 18%; }
.dcart-table col.dcart-col-expires { width: 13%; }
.dcart-table col.dcart-col-qty { width: 14%; }
.dcart-table col.dcart-col-actions { width: 14%; }

.dcart-table th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  padding: 0.65rem 0.75rem 0.8rem;
  border-bottom: 1px solid #e6e9ee;
  white-space: nowrap;
  vertical-align: bottom;
  box-sizing: border-box;
}

.dcart-table th.dcart-col-num,
.dcart-table td.dcart-col-num {
  text-align: right;
}

.dcart-table th.dcart-col-center,
.dcart-table td.dcart-col-center {
  text-align: center;
}

.dcart-table td {
  padding: 0.95rem 0.75rem;
  border-bottom: 1px solid #e4e8ee;
  vertical-align: middle;
  box-sizing: border-box;
}

.dcart-table tbody tr:last-child td {
  border-bottom: 1px solid #e4e8ee;
}

.dcart-table tbody tr.is-zero-qty {
  background: #fafbfc;
}

.dcart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.dcart-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
  overflow: hidden;
  background: #fff;
  display: block;
}

.dcart-thumb .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.dcart-item-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dcart-name {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.88rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dcart-name:hover {
  color: var(--color-accent-mid);
}

.dcart-sku {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.dcart-full-msg {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--color-danger);
  line-height: 1.35;
}

.dcart-table tbody tr.is-unavailable {
  opacity: 0.88;
}

.dcart-table tbody tr.is-full {
  background: var(--color-danger-bg);
}

.dcart-price-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: #8a95a3;
  white-space: nowrap;
}

.dcart-reimburse {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.dcart-reimburse strong {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  /* Glossary "Payout Price" tone */
  color: #48bca2;
  white-space: nowrap;
}

.dcart-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.2;
}

.dcart-delta.is-down {
  background: #fdeeee;
  color: #c0392b;
}

.dcart-delta.is-up {
  background: var(--color-success-bg, #e8f7f1);
  color: #48bca2;
}

.dcart-delta.is-flat {
  background: #eef3f8;
  color: #6b7a8c;
}

.dcart-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: left;
}

.dcart-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dcart-qty-btn {
  appearance: none;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 6px;
  border: 1px solid #cdd6e1;
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  flex: 0 0 auto;
}

.dcart-qty-btn:hover:not(:disabled) {
  border-color: var(--color-accent-mid);
  color: var(--color-accent);
  background: #f4f7fa;
}

.dcart-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dcart-qty-input {
  width: 2.6rem;
  height: 1.85rem;
  border: 1px solid #cdd6e1;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.dcart-qty-input::-webkit-outer-spin-button,
.dcart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dcart-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

.dcart-icon-btn {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #dde3ea;
  background: #fff;
  color: #4a5568;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  flex: 0 0 auto;
}

.dcart-icon-btn:hover {
  border-color: var(--color-accent-mid);
  color: var(--color-accent);
}

.dcart-icon-btn.is-danger {
  color: #c0392b;
  border-color: #f0c4c0;
}

.dcart-icon-btn.is-danger:hover {
  background: #fdf2f1;
  border-color: #c0392b;
}

.dcart-empty-row td {
  padding: 3.5rem 1rem;
}

.dcart-empty {
  margin: 0;
  text-align: center;
  color: #9aa6b5;
  font-size: 0.95rem;
  font-weight: 500;
}

.dcart-summary {
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  padding: 1rem;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dcart-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.dcart-summary-row strong {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.dcart-summary-row:first-of-type strong {
  /* Only "Payout Price" row */
  color: #48bca2;
}

.dcart-summary-hint {
  margin: -0.15rem 0 0.35rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.dcart-commit {
  margin-top: 0.35rem;
  width: 100%;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 700;
}

.dcart-commit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

  .dcart-summary {
    order: -1;
  }
}

@media (max-width: 720px) {
  .dcart-table thead {
    display: none;
  }

  .dcart-table,
  .dcart-table tbody,
  .dcart-table tr,
  .dcart-table td {
    display: block;
    width: 100%;
  }

  .dcart-table {
    min-width: 0;
  }

  .dcart-table tbody tr {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
  }

  .dcart-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    padding: 0.45rem 0;
    border: none;
    text-align: right;
  }

  .dcart-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
  }

  .dcart-table td.dcart-item-cell {
    display: block;
    text-align: left;
  }

  .dcart-table td.dcart-item-cell::before {
    display: none;
  }

  .dcart-table colgroup {
    display: none;
  }
}

/* ?? Confirm Purchase drawer ?? */
.drawer--confirm {
  width: min(440px, 100vw);
}

.drawer--confirm .drawer-header h2 {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cp-drawer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 0.5rem;
}

.cp-product {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.cp-product-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
}

.cp-product-thumb .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.cp-product-title {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.cp-product-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.cp-ends-badge {
  margin-top: 0.45rem;
}

.cp-optional {
  font-weight: 500;
  color: var(--color-text-muted);
}

.cp-note {
  resize: vertical;
  min-height: 64px;
}

.cp-note-meta {
  margin-top: 4px;
  text-align: right;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.cp-types {
  margin: 0;
  padding: 0;
  border: 0;
}

.cp-types legend {
  margin: 0 0 0.5rem;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--color-text);
}

.cp-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-type-chip {
  position: relative;
  cursor: pointer;
}

.cp-type-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cp-type-chip span {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #cdd6e1;
  background: #fff;
  color: #3d4a5c;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cp-type-chip:hover span {
  border-color: var(--color-accent-mid);
}

.cp-type-chip input:checked + span {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-mid);
  color: var(--color-accent);
}

.cp-drop {
  border: 1.5px dashed #b8c5d4;
  border-radius: 14px;
  background: #f7f9fb;
  padding: 1.15rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cp-drop:hover,
.cp-drop.is-drag {
  border-color: var(--color-accent-mid);
  background: var(--color-accent-soft);
  box-shadow: 0 0 0 3px rgba(42, 82, 120, 0.08);
}

.cp-drop-inner {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
}

.cp-drop-inner p {
  margin: 0.35rem 0 0;
}

.cp-drop-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-accent-mid);
  margin-bottom: 0.15rem;
}

.cp-browse {
  appearance: none;
  border: 0;
  background: none;
  color: var(--color-accent-mid);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.cp-drop-hint {
  font-size: 0.72rem !important;
  color: var(--color-text-muted) !important;
}

.cp-file-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cp-file-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 0.8rem;
}

.cp-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.cp-file-size {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.cp-footer {
  margin-top: 0.35rem;
  padding-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cp-submit {
  width: 100%;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.cp-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cp-footer-hint {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* ?? Commitment cards ?? */
.commit-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.commit-card {
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: none;
}

.commit-card.needs-action {
  border-color: #f0d4a8;
}

.commit-card-main {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.commit-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid #e6e9ee;
  overflow: hidden;
  background: #fff;
  display: block;
}

.commit-thumb .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.commit-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.commit-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.commit-card-title {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

a.commit-card-title-link {
  color: inherit;
  text-decoration: none;
}

a.commit-card-title-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.commit-card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.commit-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.commit-card-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
}

.commit-card-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.commit-card-stats span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.commit-card-stats strong {
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.commit-stat-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.commit-stat-price.is-earn strong {
  color: #48bca2;
}

.commit-stat-price.is-payout strong {
  color: #48bca2;
}

.commit-earn-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 4px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  opacity: 0.75;
  vertical-align: middle;
}

.commit-earn-tip:hover,
.commit-earn-tip:focus-visible {
  opacity: 1;
  outline: none;
}

.commit-stat-unit {
  margin: 0;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commit-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  max-width: 18rem;
  flex: 1 1 11rem;
  background: none;
  border: none;
  color: #9a6418;
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.35;
}

.commit-alert .icon {
  flex: 0 0 auto;
  color: #c47d14;
}

.commit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
  padding-top: 0.55rem;
  border-top: 1px solid #eef1f5;
}

.commit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.commit-confirm-btn {
  gap: 6px;
}

@media (max-width: 1200px) {
  .commit-card-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .commit-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commit-card-main {
    flex-direction: column;
  }

  .commit-alert {
    max-width: none;
    flex: 1 1 100%;
  }

  .commit-actions {
    margin-left: 0;
    width: 100%;
  }
}

/* ?? Confirm Purchase drawer ?? */
.drawer--confirm {
  width: min(440px, 100vw);
}

.drawer--confirm .drawer-header h2 {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cp-drawer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 0.5rem;
}

.cp-product {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.cp-product-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
}

.cp-product-thumb .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.cp-product-title {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.cp-product-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.cp-ends-badge {
  margin-top: 0.45rem;
}

.cp-optional {
  font-weight: 500;
  color: var(--color-text-muted);
}

.cp-note {
  resize: vertical;
  min-height: 64px;
}

.cp-note-meta {
  margin-top: 4px;
  text-align: right;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.cp-types {
  margin: 0;
  padding: 0;
  border: 0;
}

.cp-types legend {
  margin: 0 0 0.5rem;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--color-text);
}

.cp-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-type-chip {
  position: relative;
  cursor: pointer;
}

.cp-type-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cp-type-chip span {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #cdd6e1;
  background: #fff;
  color: #3d4a5c;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cp-type-chip:hover span {
  border-color: var(--color-accent-mid);
}

.cp-type-chip input:checked + span {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-mid);
  color: var(--color-accent);
}

.cp-drop {
  border: 1.5px dashed #b8c5d4;
  border-radius: 14px;
  background: #f7f9fb;
  padding: 1.15rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cp-drop:hover,
.cp-drop.is-drag {
  border-color: var(--color-accent-mid);
  background: var(--color-accent-soft);
  box-shadow: 0 0 0 3px rgba(42, 82, 120, 0.08);
}

.cp-drop-inner {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
}

.cp-drop-inner p {
  margin: 0.35rem 0 0;
}

.cp-drop-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-accent-mid);
  margin-bottom: 0.15rem;
}

.cp-browse {
  appearance: none;
  border: 0;
  background: none;
  color: var(--color-accent-mid);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.cp-drop-hint {
  font-size: 0.72rem !important;
  color: var(--color-text-muted) !important;
}

.cp-file-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cp-file-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 0.8rem;
}

.cp-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.cp-file-size {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.cp-footer {
  margin-top: 0.35rem;
  padding-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cp-submit {
  width: 100%;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.cp-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cp-footer-hint {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* Compact deal listing form */
.deal-form-page {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: var(--space-8);
}

.deal-form-header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
}

.deal-form-header h1 {
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  margin-bottom: 4px;
}

.deal-form-header .subtitle {
  max-width: 42ch;
  font-size: var(--text-sm);
}

.deal-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.deal-form-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.deal-form-section-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.deal-form-step {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-sans);
}

.deal-form-section-head h2 {
  margin: 0;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-text);
}

.deal-form-section-head p {
  margin: 2px 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.deal-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.deal-form-fields .field {
  margin-bottom: 0;
}

.deal-form-fields .field.full,
.deal-form-fields .full {
  grid-column: 1 / -1;
}

.deal-form-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}

.deal-form-more {
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.deal-form-more summary {
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--color-accent-mid);
  list-style: none;
}

.deal-form-more summary::-webkit-details-marker {
  display: none;
}

.deal-form-more summary::before {
  content: '+';
  display: inline-block;
  width: 1.2em;
  font-weight: 700;
}

.deal-form-more[open] summary::before {
  content: '\2212';
}

.deal-form-more[open] summary {
  margin-bottom: var(--space-3);
}

.deal-form-actions {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.deal-form-actions .btn-primary {
  min-width: 8.5rem;
}

.deal-form-page .deal-dropzone {
  min-height: 140px;
  padding: var(--space-4);
}

.deal-form-page .deal-dropzone-filled .image-preview-wrap {
  width: min(140px, 100%);
}

.deal-form-page .deal-image-field .select {
  max-width: 100%;
}

/* Deal form variations (per-color link / price / photo) */
.deal-variations {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.deal-variations-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.deal-variations-head h3 {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--color-text);
}

.deal-variations-head p {
  margin: 2px 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 42ch;
}

.deal-variations-head .deal-store-priority-note {
  margin-top: 0.5rem;
  max-width: 56ch;
  line-height: 1.45;
}

.deal-variations-head .btn .deal-dropzone-plus {
  font-size: 1rem;
  line-height: 1;
}

.deal-variations-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.deal-variation-row {
  background: var(--color-surface-muted, #f7f8fa);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.deal-variation-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.deal-variation-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.deal-variation-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.deal-variation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.deal-variation-grid .hint {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
}

@media (min-width: 900px) {
  .deal-variation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.deal-variation-grid .field {
  margin-bottom: 0;
}

.deal-variation-grid .field.full {
  grid-column: 1 / -1;
}

.deal-variation-photo > label {
  display: block;
  margin-bottom: 6px;
}

.deal-var-hex-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deal-var-hex-swatch {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 4px;
  border: 1px solid var(--color-border-strong, #c5cad3);
  background: #d1d5db;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.deal-var-hex-row .input {
  flex: 1 1 auto;
  min-width: 0;
}

.deal-var-hex-picker {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  cursor: pointer;
  flex: 0 0 auto;
}

.deal-var-hex-picker::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.deal-var-hex-picker::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.deal-var-stores {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--color-border);
}

.deal-var-stores-head {
  margin-bottom: var(--space-2);
}

.deal-var-stores-head > span {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.deal-var-stores-head p {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.deal-var-stores-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.deal-var-store {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}

.deal-var-store-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.deal-var-store-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-secondary, #4b5563);
}

.deal-var-store-head .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.deal-var-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-3);
}

.deal-var-store-grid .field {
  margin-bottom: 0;
}

.deal-var-store-grid .field.full {
  grid-column: 1 / -1;
}

.deal-var-store-grid .hint {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
}

.deal-var-stock-toggle .deal-in-stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text, #111827);
  cursor: pointer;
  user-select: none;
}

.deal-var-stock-toggle .deal-in-stock-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-accent, #2563eb);
}

.deal-retail-hint {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-sm, 6px);
  background: var(--color-surface-muted, #f8fafc);
  color: var(--color-text-secondary, #4b5563);
  font-size: 13px;
  line-height: 1.4;
}

.deal-var-add-store {
  margin-top: var(--space-2);
}

.deal-var-add-store .deal-dropzone-plus {
  font-size: 1rem;
  line-height: 1;
}

@media (min-width: 900px) {
  .deal-var-store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .deal-var-store-grid {
    grid-template-columns: 1fr;
  }
}

.deal-var-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px dashed var(--color-border-strong, #c5cad3);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.deal-var-dropzone.has-image {
  cursor: default;
  min-height: 0;
  padding: 12px;
  border-style: solid;
  border-color: var(--color-border);
}

.deal-var-dropzone:hover,
.deal-var-dropzone:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.deal-var-dropzone.has-image:hover,
.deal-var-dropzone.has-image:focus-visible {
  border-color: var(--color-border);
}

.deal-var-dropzone.is-dragover {
  border-color: var(--color-accent);
  background: rgba(37, 99, 235, 0.04);
}

.deal-var-dropzone.is-busy {
  pointer-events: none;
  opacity: 0.85;
}

.deal-var-dropzone.is-busy .deal-var-dropzone-empty,
.deal-var-dropzone.is-busy .deal-var-dropzone-filled {
  opacity: 0.35;
}

.deal-var-dropzone-empty,
.deal-var-dropzone-filled {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.deal-var-dropzone-filled {
  align-items: flex-start;
  flex-wrap: wrap;
}

.deal-var-dropzone-empty[hidden],
.deal-var-dropzone-filled[hidden] {
  display: none;
}

.deal-var-drop-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.deal-var-thumb {
  width: min(200px, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  margin-top: 0;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.deal-var-thumb:hover,
.deal-var-thumb:focus-visible {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.deal-var-thumb .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-2);
}

.deal-var-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  flex: 1 1 10rem;
  padding-top: 2px;
}

.deal-var-photo-actions .hint {
  margin: 0;
  width: 100%;
  font-size: 11px;
}

.deal-var-busy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: inherit;
}

.deal-var-busy[hidden] {
  display: none;
}

/* Variation photo fullscreen lightbox */
.image-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background: rgba(12, 26, 43, 0.78);
  backdrop-filter: blur(3px);
  animation: soft-in 160ms ease;
  cursor: zoom-out;
}

.image-lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.image-lightbox-img {
  max-width: min(92vw, 960px);
  max-height: min(88vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-lg);
  cursor: default;
  padding: var(--space-3);
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .deal-form-fields {
    grid-template-columns: 1fr;
  }

  .deal-variation-grid {
    grid-template-columns: 1fr;
  }

  .deal-variations-head {
    flex-direction: column;
    align-items: stretch;
  }

  .deal-form-actions {
    bottom: 8px;
  }

  .deal-form-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Public landing + auth */

.public-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.public-frame--bare {
  background: #081121;
}

.public-frame--auth {
  background:
    radial-gradient(ellipse 50% 40% at 10% 0%, rgba(124, 58, 237, 0.28), transparent 55%),
    radial-gradient(ellipse 40% 35% at 90% 10%, rgba(159, 103, 255, 0.18), transparent 50%),
    #081121;
}

.public-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) clamp(1rem, 4vw, 2.5rem);
  position: relative;
  z-index: 2;
  background: rgba(8, 17, 33, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(159, 103, 255, 0.16);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: #e8eef5;
}

.public-brand:hover {
  color: #fff;
}

.public-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #9f67ff 0%, #7c3aed 55%, #4c1d95 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: "Syne", "DM Sans", var(--font-display), sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.public-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.public-brand-text strong {
  font-family: "Syne", "DM Sans", var(--font-display), sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.public-brand-text span {
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.public-nav-link {
  color: rgba(226, 232, 240, 0.85);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.35rem 0.5rem;
}

.public-nav-link:hover,
.public-nav-link.is-active {
  color: #fff;
}

.public-nav-cta {
  text-decoration: none;
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

.public-main {
  flex: 1;
  width: 100%;
}

.public-main--bare {
  padding: 0;
}

.public-foot {
  padding: var(--space-6) clamp(1rem, 4vw, 2.5rem) var(--space-8);
  text-align: center;
}

.public-foot p {
  margin: 0;
  font-size: var(--text-xs);
  color: #64748b;
}

.public-foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.1rem;
  margin: 0 0 0.75rem;
}

.public-foot-links a {
  color: rgba(226, 232, 240, 0.78);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 600;
}

.public-foot-links a:hover {
  color: #fff;
}

/* Legal / contact pages on the dark public chrome */
.public-frame--auth .legal-page {
  padding: clamp(1.25rem, 4vh, 2.5rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 5vh, 3rem);
}

.public-frame--auth .legal-page-header h1 {
  color: #f8fafc;
}

.public-frame--auth .legal-page-header .subtitle {
  color: rgba(226, 232, 240, 0.72);
}

.public-frame--auth .legal-back a {
  color: rgba(226, 232, 240, 0.9);
}

.public-frame--auth .legal-back a:hover {
  color: #fff;
}

.public-frame--auth .auth-panel {
  background: rgba(12, 24, 41, 0.88);
  border: 1px solid rgba(159, 103, 255, 0.22);
  color: #e2e8f0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), 0 0 40px rgba(124, 58, 237, 0.18);
}

.public-frame--auth .auth-brand {
  color: #9f67ff;
}

.public-frame--auth .auth-panel h1 {
  color: #fff;
}

.public-frame--auth .auth-lead,
.public-frame--auth .auth-switch,
.public-frame--auth .auth-back,
.public-frame--auth .auth-hint {
  color: #94a3b8;
}

.public-frame--auth .auth-switch a,
.public-frame--auth .auth-back a {
  color: #c4b5fd;
}

.public-frame--auth .field label {
  color: #cbd5e1;
}

.public-frame--auth .input {
  background: rgba(8, 17, 33, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.public-frame--auth .auth-hint {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.public-frame--auth .auth-hint code {
  background: rgba(124, 58, 237, 0.2);
  color: #ddd6fe;
}

.public-frame--auth .btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}


/* BBB one-page landing styles live in css/lp-landing.css */

/* Auth forms */
.auth-page {
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 5vh, 3rem) clamp(1rem, 4vw, 2rem) clamp(2.5rem, 6vh, 4rem);
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: lp-rise 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-bright);
}

.auth-panel h1 {
  margin-bottom: var(--space-2);
  font-size: clamp(1.45rem, 3vw, 1.75rem);
}

.auth-lead {
  margin: 0 0 var(--space-6);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.auth-form .field:last-of-type {
  margin-bottom: var(--space-3);
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 0.35rem;
}

.field-label-row label {
  margin-bottom: 0;
}

.auth-forgot {
  font-size: var(--text-xs);
  font-weight: 550;
  color: var(--color-accent-bright);
  text-decoration: none;
  white-space: nowrap;
}

.auth-forgot:hover {
  text-decoration: underline;
}

.public-frame--auth .auth-forgot {
  color: #c4b5fd;
}

.auth-form-error {
  margin: 0 0 var(--space-4);
}

.auth-form-error[hidden] {
  display: none;
}

.auth-success[hidden],
.auth-demo-link[hidden] {
  display: none;
}

.auth-success h2 {
  margin: 0 0 var(--space-2);
  font-size: 1.25rem;
  color: inherit;
}

.auth-success p {
  margin: 0 0 var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.public-frame--auth .auth-success p {
  color: #94a3b8;
}

.auth-demo-link {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(159, 103, 255, 0.28);
  background: rgba(124, 58, 237, 0.12);
}

.auth-demo-label {
  margin: 0 0 var(--space-2) !important;
  font-size: var(--text-xs) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #c4b5fd !important;
}

.auth-demo-anchor {
  display: block;
  margin-bottom: var(--space-3);
  word-break: break-all;
  font-size: var(--text-xs);
  color: #ddd6fe;
}

.auth-password-rules {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(159, 103, 255, 0.18);
}

.auth-password-rules ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.public-frame--auth .auth-password-rules ul {
  color: #94a3b8;
}

.auth-submit {
  width: 100%;
  margin-top: var(--space-2);
  padding: 0.7rem 1rem;
}

.auth-switch,
.auth-back,
.auth-hint {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-align: center;
}

.auth-back {
  margin-top: var(--space-2);
}

.auth-hint {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.45;
}

.auth-hint code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--color-surface-muted);
  color: var(--color-accent);
}

@media (max-width: 560px) {
  .public-brand-text span {
    display: none;
  }

  .public-nav-link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel {
    animation: none !important;
  }
}


