/* Infiniyo Cart — embedded admin styles */

:root {
  --ink: #1a1c1f;
  --muted: #5c6470;
  --line: #e1e4e9;
  --bg: #f6f7f9;
  --card: #fff;
  --accent: #2f6fed;
  --ok: #0d7a4a;
  --warn: #b42318;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.app__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app__logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}

.app {
  max-width: 940px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.app__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.app__title {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
}

.app__subtitle {
  margin: 4px 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 14px;
}

.app__header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* tabs */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 9px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 550;
  cursor: pointer;
}

.tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

/* cards + form rows */

.card,
.discount,
.callout,
.empty,
.diag {
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.card {
  border: 1px solid var(--line);
}

legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 13px;
  font-size: 14px;
}

.row > span:first-child {
  font-weight: 550;
}

.row--toggle {
  flex-direction: row;
  align-items: center;
  gap: 9px;
}

.row--toggle span {
  font-weight: 450;
}

input[type='text'],
input[type='number'],
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 14px;
}

textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.hint {
  color: var(--muted);
  font-size: 12.5px;
}

.hint code,
.steps code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #eef0f4;
  font-size: 12px;
}

.muted {
  color: var(--muted);
  font-size: 13.5px;
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: #c7ccd4;
}

.btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  background: #fff;
}

.btn--small {
  padding: 6px 12px;
  font-size: 13px;
}

.form-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* badges + tags */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eceef2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.badge--ok {
  background: #e6f5ee;
  color: var(--ok);
}

.badge--warn {
  background: #fdecea;
  color: var(--warn);
}

.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef0f4;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.tag--code {
  background: #e8effd;
  color: #1b4fc4;
}

.tag--milestone {
  background: #fff2e2;
  color: #a45309;
}

.tag--min {
  background: #edf7f1;
  color: var(--ok);
}

/* discounts */

.callout {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f1f5ff;
  border-color: #d6e2fb;
  font-size: 14px;
}

.discount.is-hidden {
  opacity: 0.6;
}

.discount__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.discount__title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.discount__meta {
  margin: 3px 0 7px;
  color: var(--muted);
  font-size: 13px;
}

.discount__meta code {
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef0f4;
  font-size: 12px;
}

.discount__tags {
  margin: 0;
}

.discount__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.discount__flags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}

/* setup */

.steps {
  margin: 0;
  padding-left: 20px;
}

.steps li {
  margin-bottom: 18px;
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.steps p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.diag dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 10px 0 0;
  font-size: 13.5px;
}

.diag dt {
  color: var(--muted);
  font-weight: 600;
}

.diag dd {
  margin: 0;
}

.diag .warn {
  color: var(--warn);
}

.empty {
  text-align: center;
}

.empty h3 {
  margin: 0 0 6px;
}

.empty p {
  margin: 0 0 12px;
  color: var(--muted);
}

/* insights */

.callout--muted {
  background: #fbf7ea;
  border-color: #efe1bb;
}

.callout--muted[hidden] {
  display: none;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.kpi__value {
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.kpi__label {
  font-size: 13px;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

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

.table th {
  background: #fafbfc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.cart-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-items li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cart-items li + li {
  margin-top: 6px;
}

.cart-item__name {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Fixed box whether or not an image loaded, so titles stay on one left edge
   and a broken or missing image cannot reflow the column. */
.cart-thumb {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: rgb(0 0 0 / 0.04);
}

.cart-thumb--empty {
  display: inline-block;
}

.chip {
  display: inline-block;
  margin: 1px 0;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.chip--ok {
  border-color: #b9e2cd;
  background: #edf9f2;
  color: var(--ok);
}

.chip--warn {
  border-color: #f3cfc9;
  background: #fdf1ef;
  color: var(--warn);
}

@media (max-width: 640px) {
  .table,
  .table thead,
  .table tbody,
  .table tr,
  .table th,
  .table td {
    display: block;
  }

  .table thead {
    display: none;
  }

  .table tr {
    border-bottom: 1px solid var(--line);
  }

  .table td {
    border-bottom: 0;
  }

  .table .num {
    text-align: left;
  }
}

/* toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 550;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.22);
  z-index: 50;
}

.toast--warn {
  background: var(--warn);
}

@media (max-width: 640px) {
  .discount__body {
    grid-template-columns: 1fr;
  }

  .discount__head {
    flex-direction: column;
  }
}

/* --- Interactive Stepper / Progress Ladder --- */
.stepper-card {
  padding: 16px 20px;
  margin-bottom: 16px;
  border: 1px solid #dce2ec;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.stepper-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stepper-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  gap: 12px;
  padding: 10px 0 6px;
  overflow-x: auto;
}

.stepper__track {
  position: absolute;
  top: 24px;
  left: 30px;
  right: 30px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  z-index: 1;
}

.stepper__node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 90px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease;
}

.stepper__node:hover {
  transform: translateY(-2px);
}

.stepper__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  box-shadow: 0 0 0 3px #fff;
}

.stepper__node--code .stepper__dot {
  border-color: #2563eb;
  color: #2563eb;
}

.stepper__node--warn .stepper__dot {
  border-color: var(--warn);
  color: var(--warn);
  background: #fff5f5;
}

.stepper__amount {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.stepper__label {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Offer Controls & Filter Tabs --- */
.offer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.offer-filters {
  display: inline-flex;
  background: #eef2f7;
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
}

.filter-btn {
  padding: 5px 12px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

/* --- Validation Alert Banners --- */
.offers-validation-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13.5px;
}

.offers-validation-alert--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* --- Accordion Discounts Layout --- */
.discount-accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.discount-accordion.is-highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.discount-accordion summary {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}

.discount-accordion summary::-webkit-details-marker {
  display: none;
}

.discount-accordion__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.discount-accordion__chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.discount-accordion[open] .discount-accordion__chevron {
  transform: rotate(90deg);
}

.discount-accordion__badge-preview {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef2ff;
  color: #3730a3;
  margin-top: 2px;
  display: inline-block;
}

.discount-accordion__body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

@media (max-width: 640px) {
  .discount-accordion__body {
    grid-template-columns: 1fr;
  }
}

/* --- Live Cart Preview Drawer --- */
.preview-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

.preview-drawer[hidden] {
  display: none;
}

.preview-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.preview-drawer__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 580px;
  height: 100%;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 25px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.preview-drawer__header {
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-drawer__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.preview-drawer__sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.preview-drawer__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.device-switch {
  display: inline-flex;
  background: #eef2f7;
  padding: 3px;
  border-radius: 8px;
}

.device-btn {
  padding: 4px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.device-btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.preview-drawer__viewport {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.preview-drawer__viewport[data-preview-viewport="mobile"] .preview-cart-box {
  width: 375px;
}

.preview-drawer__viewport[data-preview-viewport="desktop"] .preview-cart-box {
  width: 520px;
}

.preview-cart-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: fit-content;
  transition: width 0.2s ease;
}

.preview-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  font-weight: 700;
  font-size: 15px;
}

.preview-milestone-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.preview-milestone-bar__header {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--ink);
}

.preview-milestone-bar__track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.preview-milestone-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
  transition: width 0.3s ease;
}

.preview-milestone-bar__dots {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.preview-coupon-card {
  background: #faf5ff;
  border: 1px dashed #d8b4fe;
  border-radius: 10px;
  padding: 12px;
}

.preview-coupon-card__head {
  font-size: 13px;
  font-weight: 650;
  color: #6b21a8;
  margin-bottom: 6px;
}

.preview-coupon-card__input-row {
  display: flex;
  gap: 6px;
}

.preview-coupon-card__input {
  flex: 1;
  font-size: 12px !important;
  padding: 6px 10px !important;
}

.preview-summary-box {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
}

.preview-summary-row--total {
  font-weight: 700;
  font-size: 15px;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.preview-cta-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}

/* --- Cart Design Split Layout --- */
.design-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 990px) {
  .design-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Sticky Live Preview Box --- */
.sticky-preview-box {
  position: sticky;
  top: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.sticky-preview-box__head {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sticky-preview-box__viewport {
  padding: 16px;
  display: flex;
  justify-content: center;
}

.sticky-preview-box__viewport[data-sticky-viewport="mobile"] .preview-cart-box {
  width: 375px;
}

.sticky-preview-box__viewport[data-sticky-viewport="desktop"] .preview-cart-box {
  width: 388px;
}

/* --- Settings Group Accordions --- */
.settings-accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 14px;
  overflow: hidden;
}

.settings-accordion summary {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}

.settings-accordion summary::-webkit-details-marker {
  display: none;
}

.settings-accordion__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.settings-accordion__icon {
  font-size: 18px;
}

.settings-accordion__title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}

.settings-accordion__desc {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.settings-accordion__body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

/* --- Contextual Subtabs for Micro-Copy --- */
.subtab-container {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.subtab-nav {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--line);
  gap: 2px;
  padding: 3px;
}

.subtab-btn {
  flex: 1;
  padding: 6px 10px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.subtab-btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.subtab-pane {
  display: none;
  padding: 14px 16px;
}

.subtab-pane.is-active {
  display: block;
}

/* --- Visual Tier Manager Card --- */
.visual-tier-card {
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.visual-tier-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 650;
}

.visual-tier-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visual-tier-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
}

.visual-tier-item__info {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Insights Analytics & Conversion Funnel --- */
.analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.analytics-range-picker {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
}

.range-btn {
  padding: 5px 12px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.range-btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  margin-left: 6px;
}

.trend-chip--up {
  background: #dcfce7;
  color: #15803d;
}

.trend-chip--down {
  background: #fee2e2;
  color: #b91c1c;
}

/* Funnel Visualization */
.funnel-card {
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.funnel-card__title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  position: relative;
}

@media (max-width: 768px) {
  .funnel-grid {
    grid-template-columns: 1fr;
  }
}

.funnel-step {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  position: relative;
}

.funnel-step__icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.funnel-step__name {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 4px;
}

.funnel-step__val {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.funnel-step__bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.funnel-step__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 999px;
}

.funnel-dropoff {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  font-weight: 500;
}

/* Attribution Grid */
.attribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.attribution-card {
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.attribution-card__label {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 4px;
}

.attribution-card__val {
  font-size: 24px;
  font-weight: 750;
  color: #1e3a8a;
}

/* UX Recommendation Cards */
.recommendation-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #fefce8;
  border: 1px solid #fef08a;
  color: #854d0e;
  font-size: 13.5px;
}

.recommendation-card__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.recommendation-card__title {
  font-weight: 700;
  margin-bottom: 2px;
}

/* --- Full-Width Master Layout & Sub-Tab Navigator --- */
.full-width-form {
  width: 100% !important;
  max-width: 100% !important;
}

.design-subtabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.design-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.design-subtab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.design-subtab-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.design-section-pane {
  display: none;
}

.design-section-pane.is-active {
  display: block;
}

/* --- Header with Master Switch --- */
.section-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.section-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.section-card__title {
  font-size: 16px;
  font-weight: 750;
  color: #0f172a;
  margin: 0 0 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-card__sub {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

/* --- 2-Column Compact Input Matrix --- */
.form-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px 20px;
}

.form-matrix-grid .row {
  margin-bottom: 0;
}

/* --- Wide Interactive Milestone Ladder Table --- */
.milestones-wide-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}

.milestones-wide-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.milestones-wide-card__title {
  font-size: 15px;
  font-weight: 750;
  color: #0f172a;
  margin: 0;
}

.milestones-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.milestones-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.milestones-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #e2e8f0;
}

.milestones-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.milestones-table tr:hover td {
  background: #f8fafc;
}

.tier-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 12px;
}

/* Product Thumbnail & SKU Badges in Insights Tables */
.cart-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.cart-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cart-items li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tag--sku {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 10.5px;
  font-family: SFMono-Regular, Consolas, Monaco, monospace;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  margin-left: 4px;
}





