:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --line: #e4e8ef;
  --line-dark: #d6dce6;
  --text: #1f2937;
  --muted: #6b7280;
  --blue: #1263f1;
  --blue-soft: #eef5ff;
  --green: #14a44d;
  --orange: #f59e0b;
  --red: #ef4444;
  --cyan: #0891b2;
  --shadow: 0 8px 22px rgba(15, 23, 42, .08);
  --mobile-width: 390px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, .08);
  --shadow-card: 0 14px 34px rgba(15, 23, 42, .12);
  --shadow-float: 0 20px 44px rgba(15, 23, 42, .2);
  --mobile-height: 780px;
  --radius-card: 24px;
  --radius-pill: 999px;
  --radius-sheet: 28px;
  --shadow-premium: 0 24px 60px rgba(15, 23, 42, .14);
  --blur-glass: blur(18px);
  --ease-premium: cubic-bezier(.2,.8,.2,1);
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 14px;
  --space-lg: 20px;
  --space-xl: 28px;
  /* WANFAN_ADMIN_DESIGN_TOKENS: extracted from the canonical 数据中心 route. */
  --wanfan-admin-page-bg: #f5f7fa;
  --wanfan-admin-content-bg: #f8fafc;
  --wanfan-admin-card-bg: #ffffff;
  --wanfan-admin-card-border: #edf1f5;
  --wanfan-admin-table-header-bg: #fafbfc;
  --wanfan-admin-table-row-bg: #ffffff;
  --wanfan-admin-hover-bg: #edf5ff;
  --wanfan-admin-primary: #1e7df2;
  --wanfan-admin-primary-strong: #1478ef;
  --wanfan-admin-primary-soft: #4c9ff5;
  --wanfan-admin-text: #344054;
  --wanfan-admin-text-strong: #273244;
  --wanfan-admin-text-muted: #667085;
  --wanfan-admin-text-disabled: #a0a8b5;
  --wanfan-admin-input-bg: #ffffff;
  --wanfan-admin-input-border: #e5e9ef;
  --wanfan-admin-danger: #f04438;
  --wanfan-admin-radius: 2px;
  --wanfan-admin-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --wanfan-admin-page-padding: 12px 14px 40px;
  --wanfan-admin-card-gap: 12px;
  --wanfan-admin-table-row-height: 42px;
  --wanfan-admin-font-body: 12px;
  --wanfan-admin-font-control: 11px;
  --wanfan-admin-font-section: 14px;
  --wanfan-admin-font-page: 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* Stage 24: candidate-to-listing workflow */
.candidate-flow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 16px;padding:14px 16px;border:1px solid #dbe4f0;border-radius:14px;background:#f8fafc}.candidate-flow span{padding:8px 12px;border-radius:999px;background:#fff;color:#1e3a8a;font-weight:700;box-shadow:0 1px 3px rgba(15,23,42,.08)}.candidate-flow b{color:#64748b}.candidate-actions{min-width:230px}.candidate-detail-page{display:grid;gap:18px}.candidate-detail-summary{display:grid;grid-template-columns:220px 1fr;gap:22px;align-items:start}.candidate-hero{display:grid;gap:8px}.candidate-hero img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:18px;border:1px solid #dbe4f0;background:#f8fafc}.candidate-hero small{color:#b45309}.candidate-status-row,.candidate-review-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.candidate-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.candidate-detail-grid article,.facebook-pack article{padding:16px;border:1px solid #dbe4f0;border-radius:14px;background:#fff}.candidate-detail-grid h3,.facebook-pack h2{margin-top:0}.candidate-detail-grid dl{display:grid;grid-template-columns:110px 1fr;gap:9px 12px;margin:0}.candidate-detail-grid dt{font-weight:700;color:#475569}.candidate-detail-grid dd{margin:0;color:#0f172a;overflow-wrap:anywhere}.facebook-pack{display:grid;gap:12px}.facebook-pack article strong{color:#1d4ed8}.facebook-pack article p{white-space:pre-wrap;line-height:1.65;margin-bottom:0}.workflow-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin:0 0 16px}.workflow-stats article{padding:14px;border:1px solid #dbe4f0;border-radius:13px;background:#fff}.workflow-stats span{display:block;color:#64748b;font-size:12px}.workflow-stats strong{display:block;margin-top:5px;font-size:22px;color:#0f172a}
@media(max-width:1100px){.workflow-stats{grid-template-columns:repeat(3,1fr)}.candidate-detail-grid{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.candidate-detail-summary,.candidate-detail-grid{grid-template-columns:1fr}.candidate-hero{max-width:260px}.workflow-stats{grid-template-columns:repeat(2,1fr)}}

.commerce-detail-section{display:grid;gap:14px;padding:16px;border:1px solid #dbe4f0;border-radius:16px;background:#fff}
.commerce-hero-layout{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:18px;align-items:start}
.commerce-image-meta{display:grid;gap:8px;padding:14px;border-radius:14px;background:#f8fafc;color:#334155}
.commerce-image-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.commerce-image-grid.detail-strip{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.commerce-image-card{display:grid;gap:8px;padding:10px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;min-width:0}
.commerce-image-frame{width:100%;aspect-ratio:3/4;overflow:hidden;border-radius:12px;background:#f1f5f9;display:grid;place-items:center}
.commerce-image-frame img,.landing-commerce-long-images img,.detail-image-grid.ecommerce-gallery img{width:100%;height:100%;object-fit:cover;display:block}
.commerce-image-placeholder{display:grid;place-items:center;width:100%;height:100%;color:#64748b;font-weight:700;text-align:center}
.commerce-image-card strong{font-size:13px;color:#0f172a}
.commerce-image-card p{margin:0;color:#64748b;font-size:12px;line-height:1.45}
.commerce-package-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.commerce-package-card{display:grid;gap:8px;padding:14px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;position:relative}
.commerce-package-card.recommended{border-color:#f97316;box-shadow:0 10px 28px rgba(249,115,22,.15)}
.commerce-package-card .package-tag{width:max-content;padding:4px 9px;border-radius:999px;background:#fff7ed;color:#c2410c;font-size:12px;font-weight:700}
.commerce-package-card strong{font-size:15px;color:#0f172a}
.commerce-package-card b{font-size:24px;color:#dc2626}
.commerce-package-card small,.commerce-package-card em{color:#64748b;font-style:normal}
.shipping-method-pills{display:flex;flex-wrap:wrap;gap:8px}
.shipping-method-pills span{padding:8px 12px;border-radius:999px;border:1px solid #dbe4f0;color:#64748b;background:#fff}
.shipping-method-pills span.active{background:#ecfdf5;border-color:#86efac;color:#047857;font-weight:700}
.logistics-methods.inline{display:flex;gap:10px;flex-wrap:wrap}
.landing-commerce-long-images{display:flex;flex-direction:column;gap:12px;margin:18px -10px 0}
.landing-commerce-long-images article{display:block;padding:0;border-radius:20px;background:#fff;border:1px solid #e2e8f0;overflow:hidden;box-shadow:0 10px 24px rgba(15,23,42,.08)}
.landing-commerce-long-images article img{width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;border-radius:0;background:#f8fafc}
.landing-commerce-long-images article strong{display:block;padding:12px 14px 2px;font-size:16px;color:#0f172a}
.landing-commerce-long-images article p{margin:0;padding:0 14px 14px;color:#475569;line-height:1.55}
.detail-image-grid.ecommerce-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.detail-image-grid.ecommerce-gallery img{aspect-ratio:3/4;border-radius:14px;background:#f8fafc;object-fit:cover}
@media(max-width:720px){.commerce-hero-layout{grid-template-columns:1fr}.commerce-image-grid,.commerce-package-grid{grid-template-columns:1fr}.commerce-detail-section{padding:12px}}

/* Stage 15 final overrides: keep premium mobile templates above legacy mobile styles. */
.premium-mobile-device.stage8-device,
.premium-mobile-device.stage7-device {
  width: var(--mobile-width);
  max-width: var(--mobile-width);
}

.premium-mobile-phone.stage8-phone,
.premium-mobile-phone.stage7-phone {
  height: var(--mobile-height);
  border-radius: 42px;
  padding: 10px;
  background: #111827;
}

.premium-mobile-screen.stage8-screen,
.premium-mobile-screen.stage7-screen {
  position: relative;
  height: calc(var(--mobile-height) - 62px);
  overflow-y: auto;
  padding: 18px 16px 118px;
  border-radius: 32px;
}

/* Final template preview override, intentionally placed at EOF. */
.drawer.template-preview-drawer {
  width: min(1180px, 90vw) !important;
  max-width: 1180px !important;
}

.drawer.template-preview-drawer .drawer-body {
  min-height: 0 !important;
  /* Keep the fixed-size phone reachable at real browser zoom. */
  overflow: auto !important;
  padding: 0 !important;
  background: #eef2f7 !important;
}

.template-preview-shell.template-preview-stage7,
.template-large-preview {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 320px) minmax(430px, 1fr) !important;
  gap: 0 !important;
  align-items: stretch !important;
  background: #eef2f7 !important;
}

.template-preview-device-area {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 24px !important;
}

.mobile-preview-device.mobile-preview-frame,
.mobile-preview-frame {
  width: min(414px, calc(100% - 48px)) !important;
  min-width: min(375px, calc(100% - 48px)) !important;
  height: min(844px, calc(100vh - 132px)) !important;
  min-height: min(750px, calc(100vh - 132px)) !important;
  max-width: 430px !important;
  max-height: calc(100vh - 132px) !important;
}

.mobile-preview-frame .mobile-device,
.mobile-preview-frame .premium-mobile-device,
.mobile-preview-frame .stage8-device,
.mobile-preview-frame .stage7-device {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.mobile-preview-frame .mobile-phone,
.mobile-preview-frame .premium-mobile-phone,
.mobile-preview-frame .stage8-phone,
.mobile-preview-frame .stage7-phone {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 32px minmax(0, 1fr) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.mobile-preview-frame .mobile-screen,
.mobile-preview-frame .premium-mobile-screen,
.mobile-preview-frame .stage8-screen,
.mobile-preview-frame .stage7-screen {
  height: auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Tall workspace utilization: keep phone-width realistic, expand height to use preview area. */
.mobile-preview-device.mobile-preview-frame,
.mobile-preview-frame {
  width: min(430px, calc(100% - 48px)) !important;
  min-width: min(390px, calc(100% - 48px)) !important;
  height: clamp(750px, calc(100vh - 108px), 1010px) !important;
  min-height: min(750px, calc(100vh - 108px)) !important;
  max-height: calc(100vh - 108px) !important;
}

/* Final specificity guard for the upgraded COD payment card. */
.landing-order-form .cod-pay {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  gap: 10px;
  border: 1.5px solid #f3a19b;
  border-radius: 14px;
  background: #fff8f7;
  color: #172033;
}

.landing-order-form .cod-pay input,
.landing-order-form .shipping-method-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

/* Stage: backend mobile landing preview.  This is an admin review shell only;
   the iframe loads the real public Stage57 landing page. */
.mobile-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
}

.mobile-preview-toolbar h2 {
  margin: 4px 0;
  font-size: 18px;
  color: #0f172a;
}

.mobile-preview-toolbar p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.mobile-preview-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mobile-preview-controls .segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.mobile-preview-controls .segmented button {
  border: 0;
  background: transparent;
  color: #475569;
  padding: 7px 12px;
  border-radius: 6px;
  font-weight: 700;
}

.mobile-preview-controls .segmented button.active {
  color: #0f172a;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}

.mobile-preview-controls select {
  min-width: 138px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 0 10px;
}

.mobile-preview-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(470px, 620px);
  gap: 16px;
  align-items: start;
  justify-content: center;
  min-height: calc(100vh - 190px);
}

.mobile-preview-inspector {
  display: grid;
  gap: 12px;
}

.compact-dl {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
}

.compact-dl dt {
  color: #64748b;
}

.compact-dl dd {
  margin: 0;
  min-width: 0;
  color: #0f172a;
  word-break: break-all;
}

.mobile-preview-media-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
}

.mobile-preview-media-stats span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
}

.mobile-preview-media-stats b {
  color: #0f172a;
  font-size: 20px;
}

.mobile-preview-device-pane {
  min-height: max(calc(100vh - 190px), 992px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #eef2f7, #f8fafc);
  overflow: auto;
}

.mobile-preview-device-frame {
  width: var(--preview-width);
  height: var(--preview-height);
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  padding: 10px;
  border-radius: 36px;
  background: #111827;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .26);
  box-sizing: content-box;
}

.mobile-preview-device-frame.android {
  border-radius: 28px;
}

.mobile-preview-device-frame.tablet {
  border-radius: 24px;
}

.mobile-preview-device-status {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items: center;
  padding: 0 14px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.mobile-preview-device-status b {
  height: 6px;
  border-radius: 999px;
  background: #020617;
}

.mobile-preview-device-status span:last-child {
  text-align: right;
}

.mobile-preview-device-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 26px;
  background: #fff;
  overflow: hidden;
}

@media (max-width: 1180px) {
  .mobile-preview-workbench {
    grid-template-columns: 1fr;
  }

  .mobile-preview-device-pane {
    justify-content: center;
    align-items: center;
  }
}

/* Product/Selection Editor polish V2: one shared 12-column form contract. */
body.product-editor-route .editor-form-grid-v2 {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  column-gap: 24px !important;
  row-gap: 20px !important;
  align-items: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.product-editor-route .editor-form-grid-v2 > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body.product-editor-route .editor-form-grid-v2 > .editor-col-4 { grid-column: span 4; }
body.product-editor-route .editor-form-grid-v2 > .editor-col-6 { grid-column: span 6; }
body.product-editor-route .editor-form-grid-v2 > .editor-col-12 { grid-column: 1 / -1; }

body.product-editor-route .company-form-section,
body.product-editor-route .editor-card.full-editor-card,
body.product-editor-route .company-content-settings,
body.product-editor-route .company-spec-page,
body.product-editor-route .company-marketing-page {
  margin: 0 !important;
  padding: 24px !important;
  border: 0 !important;
  border-bottom: 1px solid #e7ebf0 !important;
  background: #fff !important;
  box-sizing: border-box;
}

body.product-editor-route .company-form-section + .company-form-section {
  padding-top: 24px !important;
}

body.product-editor-route .company-form-section h2,
body.product-editor-route .editor-card.full-editor-card > h2 {
  display: flex !important;
  align-items: baseline !important;
  width: 100% !important;
  height: auto !important;
  min-height: 24px !important;
  gap: 10px !important;
  margin: 0 0 20px !important;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf0f4 !important;
  color: #344054 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

body.product-editor-route .company-form-section h2 small,
body.product-editor-route .editor-card.full-editor-card > h2 small {
  color: #8a94a3 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

body.product-editor-route .company-field,
body.product-editor-route .editor-form-grid-v2 .field,
body.product-editor-route .editor-settings-section .field {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  color: #4a5362;
  font-size: 12px;
  line-height: 1.35;
}

body.product-editor-route .company-field input,
body.product-editor-route .company-field select,
body.product-editor-route .editor-form-grid-v2 input:not([type="checkbox"]):not([type="radio"]),
body.product-editor-route .editor-form-grid-v2 select,
body.product-editor-route .editor-settings-section input:not([type="checkbox"]):not([type="radio"]),
body.product-editor-route .editor-settings-section select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border: 1px solid #dfe4ea !important;
  border-radius: 3px !important;
  background: #fff !important;
  box-sizing: border-box;
  font-size: 12px !important;
}

body.product-editor-route .editor-form-grid-v2 textarea,
body.product-editor-route .editor-settings-section textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 88px !important;
  padding: 9px 10px !important;
  border: 1px solid #dfe4ea !important;
  border-radius: 3px !important;
  resize: vertical;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.55;
}

body.product-editor-route .countdown-hours-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

body.product-editor-route .countdown-hours-field > span {
  color: #475569;
  font-size: 14px;
  white-space: nowrap;
}

body.product-editor-route .template-editor-settings {
  padding: 22px 24px 28px !important;
  overflow: visible !important;
  border-top: 1px solid #e7ebf0 !important;
}

body.product-editor-route .editor-settings-section {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 18px;
  border: 1px solid #e4e8ee;
  border-radius: 4px;
  background: #fbfcfd;
}

body.product-editor-route .editor-settings-section > h3 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8ecf1;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

body.product-editor-route .logistics-methods {
  min-height: 0;
  padding: 18px 24px;
}

body.product-editor-route .logistics-fees,
body.product-editor-route .company-ad-settings-pane .company-ad-pixel-grid {
  padding: 22px 24px 28px !important;
}

body.product-editor-route .company-rich-body .rich-description-caret-host {
  display: block;
  width: 100%;
  min-height: 22px;
  margin: 2px 0;
  padding: 0 4px;
  border-radius: 2px;
  caret-color: #1769ff;
  box-sizing: border-box;
}

body.product-editor-route .company-rich-body .rich-description-caret-host:hover,
body.product-editor-route .company-rich-body .rich-description-caret-host:focus {
  background: #f2f7ff;
  box-shadow: inset 2px 0 0 #1769ff;
  outline: none;
}

body.product-editor-route .company-rich-body .is-rich-media-selected {
  outline: 2px solid #1769ff !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(23, 105, 255, .1);
}

@media (max-width: 1100px) {
  body.product-editor-route .editor-form-grid-v2 > .editor-col-4,
  body.product-editor-route .editor-form-grid-v2 > .editor-col-6 {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  body.product-editor-route .editor-form-grid-v2 > .editor-col-4,
  body.product-editor-route .editor-form-grid-v2 > .editor-col-6,
  body.product-editor-route .editor-form-grid-v2 > .editor-col-12 {
    grid-column: 1 / -1;
  }

  body.product-editor-route .company-form-section,
  body.product-editor-route .editor-card.full-editor-card,
  body.product-editor-route .company-content-settings,
  body.product-editor-route .company-spec-page,
  body.product-editor-route .company-marketing-page {
    padding: 18px 16px !important;
  }
}

/* Product-list Review management center. */
.drawer.product-review-center-drawer {
  width: min(1480px, 96vw);
  max-width: none;
  grid-template-rows: 58px minmax(0, 1fr) 58px;
}

.product-review-center-drawer .drawer-body { padding: 0; background: #f7f9fc; }
.product-review-center { min-width: 1080px; }
.product-review-center-product {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
}
.product-review-center-product > img,
.product-review-center-cover {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #f2f4f7;
  color: #98a2b3;
  object-fit: cover;
}
.product-review-center-product > div { display: grid; gap: 5px; min-width: 0; }
.product-review-center-product strong { overflow: hidden; color: #101828; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.product-review-center-product span { color: #475467; font-size: 13px; }
.product-review-center-product small { color: #98a2b3; font-size: 12px; }
.product-review-center .product-review-manager { margin: 16px 18px 24px; padding: 18px; border: 1px solid #e4e7ec; background: #fff; }
.product-review-center .product-review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.product-review-center .product-review-toolbar p { margin: 0; color: #667085; font-size: 12px; }
.product-review-center .product-review-toolbar > div { display: flex; gap: 8px; }
.product-review-center .product-review-table-wrap { overflow: auto; border: 1px solid #e4e7ec; }
.product-review-center .product-review-table-wrap table { width: 100%; min-width: 1240px; border-collapse: collapse; table-layout: fixed; }
.product-review-center .product-review-table-wrap th,
.product-review-center .product-review-table-wrap td { padding: 11px 10px; border-bottom: 1px solid #edf0f4; color: #344054; font-size: 12px; text-align: left; vertical-align: top; }
.product-review-center .product-review-table-wrap th { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #667085; font-weight: 700; }
.product-review-center .product-review-table-wrap th:nth-child(1) { width: 46px; }
.product-review-center .product-review-table-wrap th:nth-child(2) { width: 100px; }
.product-review-center .product-review-table-wrap th:nth-child(3) { width: 96px; }
.product-review-center .product-review-table-wrap th:nth-child(4) { width: 280px; }
.product-review-center .product-review-table-wrap th:nth-child(5) { width: 190px; }
.product-review-center .product-review-table-wrap th:nth-child(6) { width: 100px; }
.product-review-center .product-review-table-wrap th:nth-child(7) { width: 90px; }
.product-review-center .product-review-table-wrap th:nth-child(8) { width: 64px; }
.product-review-center .product-review-table-wrap th:nth-child(9) { width: 138px; }
.product-review-center .product-review-table-wrap th:nth-child(10) { width: 140px; }
.product-review-center .product-review-table-wrap td p { max-height: 58px; margin: 0; overflow: hidden; line-height: 1.55; }
.product-review-center .product-review-stars { color: #f59e0b; letter-spacing: 0; white-space: nowrap; }
.product-review-center .product-review-admin-thumbs,
.product-review-center .product-review-upload-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.product-review-center .product-review-admin-thumbs img,
.product-review-center .product-review-upload-preview img { display: block; width: 52px; height: 52px; border: 1px solid #e4e7ec; border-radius: 4px; object-fit: cover; }
.product-review-center .product-review-form { margin: 16px 0 0; padding: 16px; border: 1px solid #cfd8e6; background: #fbfdff; }
.product-review-center .product-review-form > header,
.product-review-center .product-review-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-review-center .product-review-form > header { margin-bottom: 14px; }
.product-review-center .product-review-form > header h3 { margin: 0; font-size: 15px; }
.product-review-center .product-review-form > header span { color: #667085; font-size: 11px; }
.product-review-center .product-review-form > footer { justify-content: flex-end; margin-top: 14px; }
.product-review-center .product-review-upload-preview { margin-top: 12px; }
.product-review-center .product-review-upload-preview figure { margin: 0; }
.product-review-center .product-review-upload-preview figcaption { max-width: 60px; overflow: hidden; color: #667085; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-review-center .product-review-state,
.product-review-center .product-review-empty { padding: 28px; color: #98a2b3; text-align: center; }
.product-review-batch-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #bfdbfe; background: #eff6ff; }
.product-review-batch-bar label { display: flex; align-items: center; gap: 6px; margin-left: auto; color: #475467; font-size: 12px; }
.product-review-batch-bar input { width: 76px; height: 32px; }
.product-review-import-panel { margin: 0 0 16px; padding: 16px; border: 1px solid #cbd5e1; background: #f8fafc; }
.product-review-import-panel > header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.product-review-import-panel h3 { margin: 0 0 5px; font-size: 15px; }
.product-review-import-panel p { margin: 0; color: #667085; font-size: 12px; }
.review-import-files { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto; gap: 12px; align-items: end; }
.review-import-files label { display: grid; gap: 6px; color: #344054; font-size: 12px; font-weight: 700; }
.review-import-files input { height: 36px; padding: 5px 8px; border: 1px solid #d0d5dd; background: #fff; }
.review-import-file-status { display: flex; gap: 24px; margin-top: 9px; color: #667085; font-size: 11px; }
.review-import-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 14px; border: 1px solid #e4e7ec; background: #fff; }
.review-import-summary span { display: grid; gap: 3px; padding: 10px 12px; border-right: 1px solid #e4e7ec; color: #667085; font-size: 11px; }
.review-import-summary span:last-child { border-right: 0; }
.review-import-summary strong { color: #101828; font-size: 18px; }
.review-import-preview-table { max-height: 280px; margin-top: 12px; overflow: auto; border: 1px solid #e4e7ec; background: #fff; }
.review-import-preview-table table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.review-import-preview-table th,
.review-import-preview-table td { padding: 9px; border-bottom: 1px solid #edf0f4; font-size: 11px; text-align: left; vertical-align: top; }
.review-import-preview-table th { position: sticky; top: 0; background: #f8fafc; }
.review-import-preview-table .is-error { background: #fff7f7; }
.review-import-error { display: block; color: #b42318; line-height: 1.45; }
.product-review-import-panel > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; color: #667085; font-size: 12px; }

@media (max-width: 1180px) {
  .drawer.product-review-center-drawer { width: 98vw; }
}

/* V3 specificity lock for legacy replica rules declared later in this file. */
body.product-editor-route .company-editor-layout.company-editor-continuous-layout {
  grid-template-columns: minmax(0, 1fr) 132px !important;
  align-items: start !important;
}

body.product-editor-route .company-editor-main.company-editor-continuous-main {
  display: block !important;
  padding: 0 0 88px !important;
  overflow: visible !important;
}

body.product-editor-route .company-business-nav.company-editor-anchor-nav {
  position: sticky !important;
  top: 36px !important;
  align-self: start !important;
  width: 132px !important;
  max-width: 132px !important;
  max-height: calc(100vh - 88px) !important;
  padding: 20px 10px 72px !important;
  overflow-y: auto !important;
  border-left: 1px solid #edf0f4 !important;
}

body.product-editor-route .company-business-nav.company-editor-anchor-nav button {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  border-radius: 4px !important;
}

body.product-editor-route .company-business-nav.company-editor-anchor-nav button.active,
body.product-editor-route .company-business-nav.company-editor-anchor-nav button:hover {
  color: #1769ff !important;
  background: #edf5ff !important;
}

@media (max-width: 1180px) {
  body.product-editor-route .company-editor-layout.company-editor-continuous-layout {
    grid-template-columns: minmax(0, 1fr) 112px !important;
  }

  body.product-editor-route .company-business-nav.company-editor-anchor-nav {
    width: 112px !important;
    max-width: 112px !important;
  }
}

@media (max-width: 720px) {
  body.product-editor-route .company-editor-layout.company-editor-continuous-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "editor-anchor" "editor-content" !important;
  }

  body.product-editor-route .company-business-nav.company-editor-anchor-nav {
    position: sticky !important;
    top: 36px !important;
    z-index: 8 !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    padding: 8px 16px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-bottom: 1px solid #edf0f4 !important;
    border-left: 0 !important;
  }
}

/* Product/Selection Editor V3: every editable section stays mounted in one
   continuous document. The right rail is navigation only; it never swaps DOM. */
body.product-editor-route .company-editor-continuous-layout {
  grid-template-columns: minmax(0, 1fr) 132px !important;
  align-items: start !important;
  min-height: calc(100vh - 36px) !important;
}

body.product-editor-route .company-editor-continuous-main {
  display: block !important;
  padding: 0 0 88px !important;
  overflow: visible !important;
}

body.product-editor-route .company-editor-continuous-main > *,
body.product-editor-route .company-editor-continuous-main section,
body.product-editor-route .company-continuous-section {
  scroll-margin-top: 52px;
}

body.product-editor-route .company-editor-continuous-main .company-base-pane {
  display: block !important;
}

body.product-editor-route .company-editor-continuous-main .company-form-section,
body.product-editor-route .company-editor-continuous-main .editor-card.full-editor-card,
body.product-editor-route .company-editor-continuous-main .company-spec-page,
body.product-editor-route .company-editor-continuous-main .company-marketing-page,
body.product-editor-route .company-editor-continuous-main .company-continuous-section {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 24px 30px 30px !important;
  border: 0 !important;
  border-bottom: 10px solid #f6f8fb !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

body.product-editor-route .company-editor-continuous-main .company-content-settings {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body.product-editor-route .company-editor-continuous-main .company-form-section + .company-form-section {
  padding-top: 24px !important;
}

body.product-editor-route .company-editor-continuous-main .company-spec-page > h2,
body.product-editor-route .company-editor-continuous-main .company-marketing-page > h2,
body.product-editor-route .company-editor-continuous-main .company-continuous-section > h2 {
  display: flex !important;
  align-items: baseline !important;
  gap: 10px !important;
  min-height: 24px !important;
  margin: 0 0 20px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid #edf0f4 !important;
  color: #344054 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

body.product-editor-route .company-editor-continuous-main h2 small {
  color: #8a94a3 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

body.product-editor-route .company-editor-continuous-main .company-content-field + .company-content-field {
  margin-top: 18px !important;
}

body.product-editor-route .company-editor-continuous-main #detail .company-detail-field {
  display: block !important;
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

body.product-editor-route .company-editor-continuous-main #detail .company-rich-editor {
  width: 100% !important;
  min-width: 0 !important;
}

body.product-editor-route .product-review-manager .product-review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

body.product-editor-route .product-review-manager .product-review-toolbar p {
  margin: 0;
  color: #667085;
  font-size: 12px;
}

body.product-editor-route .product-review-table-wrap {
  overflow-x: auto;
  border: 1px solid #e6eaf0;
}

body.product-editor-route .product-review-table-wrap table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  table-layout: fixed;
}

body.product-editor-route .product-review-table-wrap th,
body.product-editor-route .product-review-table-wrap td {
  padding: 12px;
  border-bottom: 1px solid #edf0f4;
  color: #344054;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

body.product-editor-route .product-review-table-wrap th {
  background: #f8fafc;
  color: #667085;
  font-weight: 600;
}

body.product-editor-route .product-review-table-wrap td:nth-child(1) { width: 120px; }
body.product-editor-route .product-review-table-wrap td:nth-child(2) { width: 100px; }
body.product-editor-route .product-review-table-wrap td:nth-child(4) { width: 52px; }
body.product-editor-route .product-review-table-wrap td:nth-child(5) { width: 76px; }
body.product-editor-route .product-review-table-wrap td:nth-child(6) { width: 138px; white-space: nowrap; }
body.product-editor-route .product-review-table-wrap td small { display: block; margin-top: 4px; color: #98a2b3; }
body.product-editor-route .product-review-table-wrap td p { margin: 0 0 8px; line-height: 1.6; }
body.product-editor-route .product-review-table-wrap .btn + .btn { margin-left: 6px; }

body.product-editor-route .product-review-stars {
  color: #f59e0b;
  letter-spacing: 0;
  white-space: nowrap;
}

body.product-editor-route .product-review-admin-thumbs,
body.product-editor-route .product-review-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.product-editor-route .product-review-admin-thumbs img,
body.product-editor-route .product-review-upload-preview img {
  display: block;
  width: 60px;
  height: 60px;
  border: 1px solid #e4e7ec;
  object-fit: cover;
}

body.product-editor-route .product-review-form {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d8e2f0;
  background: #fbfdff;
}

body.product-editor-route .product-review-form > header,
body.product-editor-route .product-review-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.product-editor-route .product-review-form > header { margin-bottom: 16px; }
body.product-editor-route .product-review-form > header h3 { margin: 0; font-size: 14px; color: #344054; }
body.product-editor-route .product-review-form > header span { color: #98a2b3; font-size: 11px; }
body.product-editor-route .product-review-form > footer { justify-content: flex-end; margin-top: 16px; }
body.product-editor-route .product-review-upload-preview { min-height: 0; margin-top: 12px; }
body.product-editor-route .product-review-upload-preview figure { margin: 0; }
body.product-editor-route .product-review-upload-preview figcaption { max-width: 72px; margin-top: 3px; overflow: hidden; color: #667085; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
body.product-editor-route .product-review-state,
body.product-editor-route .product-review-empty { padding: 24px; color: #98a2b3; text-align: center; }

body.product-editor-route .company-editor-anchor-nav {
  position: sticky !important;
  top: 36px !important;
  align-self: start !important;
  width: 132px !important;
  max-width: 132px !important;
  max-height: calc(100vh - 88px) !important;
  padding: 20px 10px 72px !important;
  overflow-y: auto !important;
  border-left: 1px solid #edf0f4 !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

body.product-editor-route .company-editor-anchor-nav button {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}

body.product-editor-route .company-editor-anchor-nav button.active,
body.product-editor-route .company-editor-anchor-nav button:hover {
  color: #1769ff !important;
  background: #edf5ff !important;
}

@media (max-width: 1180px) {
  body.product-editor-route .company-editor-continuous-layout {
    grid-template-columns: minmax(0, 1fr) 112px !important;
  }

  body.product-editor-route .company-editor-anchor-nav {
    width: 112px !important;
    max-width: 112px !important;
  }
}

@media (max-width: 720px) {
  body.product-editor-route .company-editor-continuous-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "editor-anchor" "editor-content" !important;
  }

  body.product-editor-route .company-editor-continuous-main {
    grid-area: editor-content !important;
  }

  body.product-editor-route .company-editor-anchor-nav {
    position: sticky !important;
    top: 36px !important;
    z-index: 8 !important;
    grid-area: editor-anchor !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    padding: 8px 16px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-bottom: 1px solid #edf0f4 !important;
    border-left: 0 !important;
  }

  body.product-editor-route .company-editor-anchor-nav h3 {
    display: none !important;
  }

  body.product-editor-route .company-editor-continuous-main .company-form-section,
  body.product-editor-route .company-editor-continuous-main .editor-card.full-editor-card,
  body.product-editor-route .company-editor-continuous-main .company-spec-page,
  body.product-editor-route .company-editor-continuous-main .company-marketing-page,
  body.product-editor-route .company-editor-continuous-main .company-continuous-section {
    padding: 20px 16px 24px !important;
  }
}

@media (max-width: 720px) {
  .mobile-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-preview-device-pane {
    padding: 10px;
  }

  .mobile-preview-device-frame {
    transform-origin: top left;
    transform: scale(.86);
  }
}

/* AI Agent orchestrator is scoped to the old Yugo admin task center. */
.agent-task-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.agent-task-kpis article,
.agent-stage-card {
  border: 1px solid #d9e2ef;
  background: #fff;
  border-radius: 10px;
  padding: 14px;
}

.agent-task-kpis span,
.agent-stage-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.agent-task-kpis b {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  color: #0f172a;
}

.agent-task-create,
.agent-task-detail {
  margin-top: 14px;
}

.agent-stage-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.agent-stage-card strong {
  display: block;
  margin: 6px 0 10px;
  color: #334155;
}

.agent-stage-card.completed {
  border-color: #9ad9bc;
  background: #f0fdf6;
}

.agent-stage-card.running {
  border-color: #93c5fd;
  background: #eff6ff;
}

.agent-stage-card.need_review,
.agent-stage-card.failed {
  border-color: #fdba74;
  background: #fff7ed;
}

.agent-stage-card button {
  width: 100%;
}

.agent-output-editor textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 440px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}

.agent-output-view pre {
  max-height: 560px;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.agent-runtime-create,
.agent-runtime-detail {
  margin-top: 14px;
}

.agent-runtime-detail code {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .agent-task-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .agent-stage-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .agent-task-kpis,
  .agent-stage-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Stage 59: backend-only advertising analytics and human decision support. */
.ad-analytics-note { margin: 0 0 14px; padding: 12px 14px; color: #334155; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.ad-analytics-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.ad-analytics-kpis article, .ad-mini-metrics span { display: grid; gap: 4px; padding: 14px; border: 1px solid #dbeafe; border-radius: 10px; background: #fff; }
.ad-analytics-kpis span, .ad-mini-metrics { color: #64748b; font-size: 12px; }
.ad-analytics-kpis b { color: #0f172a; font-size: 20px; }
.ad-analytics-panel { margin-bottom: 16px; }
.ad-analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ad-analytics-grid .panel { min-width: 0; overflow: auto; }
.ad-mini-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 10px 0 14px; }
.ad-mini-metrics span b { color: #0f172a; font-size: 16px; }
.ad-report-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ad-report-columns article { padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.ad-optimization-summary { border-color: #bfdbfe; background: linear-gradient(180deg, #eff6ff, #fff); }
.ai-decision-summary { border-color: #c4b5fd; background: linear-gradient(180deg, #f5f3ff, #fff); }
.ai-decision-callouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 16px; }
.ai-decision-callouts article { padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.ai-decision-callouts h2 { margin: 0 0 8px; font-size: 16px; }
.ai-decision-callouts p { margin: 8px 0 0; color: #475569; line-height: 1.5; }
.ai-decision-callouts .scale { border-color: #86efac; background: #f0fdf4; }
.ai-decision-callouts .optimize { border-color: #fdba74; background: #fff7ed; }
.ai-decision-callouts .stop { border-color: #fca5a5; background: #fef2f2; }

@media (max-width: 900px) {
  .ad-analytics-kpis, .ad-mini-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-analytics-grid, .ad-report-columns, .ai-decision-callouts { grid-template-columns: 1fr; }
}

/* Stage 57: backend-only AI landing-page generation review.  This does not
   affect customer-facing landing-page CSS or the Stage54 media-asset renderer. */
.landing-generation-panel .generation-panel-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: #475569;
  font-size: 13px;
}
.landing-generation-preview {
  display: grid;
  gap: 16px;
  color: #172033;
}
.landing-generation-hero {
  padding: 22px;
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #fdf2f8);
}
.landing-generation-hero > span {
  display: inline-block;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.landing-generation-hero h3 { margin: 8px 0; font-size: 26px; }
.landing-generation-hero p { margin: 0 0 14px; color: #475569; }
.landing-generation-hero dl { display: grid; grid-template-columns: 96px 1fr; gap: 7px 12px; margin: 0; font-size: 13px; }
.landing-generation-hero dt { color: #64748b; }
.landing-generation-hero dd { margin: 0; font-weight: 600; }
.landing-generation-flow { display: grid; gap: 8px; }
.landing-generation-flow article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.landing-generation-flow article > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}
.landing-generation-flow h4, .landing-generation-flow p { margin: 0; }
.landing-generation-flow p { color: #475569; font-size: 13px; }
.landing-generation-flow small { color: #64748b; font-size: 12px; }
.landing-generation-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.landing-generation-split > article, .landing-generation-packages {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}
.landing-generation-split h3, .landing-generation-packages h3 { margin: 0 0 10px; font-size: 16px; }
.landing-generation-split p { margin: 0 0 10px; color: #475569; font-size: 13px; }
.landing-generation-split p small { display: block; margin-top: 3px; color: #94a3b8; }
.landing-generation-packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.landing-generation-packages h3 { grid-column: 1 / -1; }
.landing-generation-packages article { display: grid; gap: 5px; padding: 12px; border: 1px solid #dbe4f0; border-radius: 12px; }
.landing-generation-packages article.recommended { border-color: #2563eb; background: #eff6ff; }
.landing-generation-packages article span { width: max-content; padding: 2px 6px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 11px; }
.landing-generation-packages article b { font-size: 20px; color: #dc2626; }
.landing-generation-packages article small { color: #64748b; font-size: 12px; }
.generation-disclaimer { margin: 0; color: #64748b; font-size: 12px; }
@media (max-width: 720px) {
  .landing-generation-hero { padding: 16px; }
  .landing-generation-hero h3 { font-size: 22px; }
  .landing-generation-flow article { grid-template-columns: 30px minmax(0, 1fr); }
  .landing-generation-flow article small { grid-column: 2; }
  .landing-generation-split, .landing-generation-packages { grid-template-columns: 1fr; }
  .landing-generation-packages h3 { grid-column: auto; }
}

/* Stage 58: backend-only AI media planning, QA and creative-library views. */
.ai-media-task-panel { border-color: #a7f3d0; background: linear-gradient(180deg, #f0fdf4, #fff); }
.ai-media-task-mini-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.ai-media-task-mini-list article { display: grid; gap: 6px; padding: 11px; border: 1px solid #d1fae5; border-radius: 11px; background: #fff; }
.ai-media-task-mini-list article small { color: #64748b; font-size: 12px; }
.ai-media-task-detail { display: grid; gap: 16px; }
.ai-media-task-detail dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 14px; margin: 0; }
.ai-media-task-detail dt { color: #64748b; font-weight: 700; }
.ai-media-task-detail dd { margin: 0; overflow-wrap: anywhere; }
.media-qa-result { padding: 14px; border: 1px solid #bae6fd; border-radius: 12px; background: #f8fdff; }
.media-qa-result h3 { margin: 0 0 10px; }
.media-qa-result p { margin: 7px 0; font-size: 13px; }
.media-qa-result .pass { color: #047857; }
.media-qa-result .missing { color: #b45309; }
.creative-library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.creative-library-grid > section { min-width: 0; padding: 14px; border: 1px solid #dbeafe; border-radius: 14px; background: #fff; }
.creative-library-grid .panel-head h3 { margin: 0; color: #1e40af; }
.creative-library-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid #eff6ff; }
.creative-library-card:first-of-type { border-top: 0; }
.creative-library-card > div { display: grid; width: 72px; height: 72px; place-items: center; overflow: hidden; border: 1px dashed #93c5fd; border-radius: 9px; background: #f8fafc; color: #64748b; font-size: 12px; }
.creative-library-card img { width: 100%; height: 100%; object-fit: cover; }
.creative-library-card section { display: grid; gap: 4px; min-width: 0; }
.creative-library-card p, .creative-library-card small { margin: 0; color: #64748b; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .ai-media-task-detail dl { grid-template-columns: 1fr; gap: 4px; }
  .ai-media-task-detail dd { margin-bottom: 8px; }
}

.product-brief-center {
  border: 1px solid #bfdbfe;
  background: #f8fbff;
}

.product-brief-center > .sub {
  margin: -6px 0 14px;
  color: #475569;
}

.ai-product-ops-center {
  border: 1px solid #b9d0ff;
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.ops-center-section-title {
  margin: 16px 0 10px;
  color: #1d4ed8;
  font-size: 15px;
}

.product-production-engine {
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.media-production-center {
  border: 1px solid #bae6fd;
  background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
}

.media-assets-center {
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.media-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 12px;
}

.media-asset-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d1fae5;
  border-radius: 10px;
  background: #fff;
}

.media-asset-group h4 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 10px;
  color: #047857;
}

.media-asset-group h4 small { color: #64748b; }

.media-asset-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #ecfdf5;
}

.media-asset-card:first-of-type { border-top: 0; }

.media-asset-thumb {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #86efac;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
}

.media-asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-asset-card p { display: flex; flex-wrap: wrap; gap: 6px; margin: 5px 0; }
.media-asset-card small { color: #64748b; overflow-wrap: anywhere; }

.media-production-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.media-production-summary span {
  padding: 6px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  font-size: 12px;
}

.media-production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.media-production-list {
  margin-top: 16px;
}

.media-production-list > h4 {
  margin: 0 0 8px;
  color: #0369a1;
}

.media-production-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.media-production-list > h4,
.media-production-list > .sub {
  grid-column: 1 / -1;
}

.media-production-task {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.media-production-task header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.media-production-task dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 6px 10px;
  margin: 0;
}

.media-production-task dt {
  color: #64748b;
}

.media-production-task dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.product-production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.product-production-card,
.production-plan-list article {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.product-production-card h4,
.production-plan-list h4 {
  margin: 0 0 10px;
  color: #1d4ed8;
}

.product-production-card dl,
.production-plan-list article {
  margin: 0;
}

.production-plan-list {
  margin-top: 16px;
}

.production-plan-list > article {
  display: grid;
  grid-template-columns: 28px minmax(120px, 0.55fr) minmax(180px, 1fr) minmax(140px, 0.75fr);
  gap: 10px;
  align-items: start;
  margin-top: 8px;
}

.production-plan-list article span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

.production-plan-list article p,
.production-plan-list article small {
  margin: 0;
  color: #64748b;
}

@media (max-width: 720px) {
  .production-plan-list > article {
    grid-template-columns: 28px 1fr;
  }

  .production-plan-list article p,
  .production-plan-list article small {
    grid-column: 2;
  }
}

/* Product editor and template center share the active registry cards. */
.template-editor-current { display:grid; grid-template-columns:minmax(220px,1fr) minmax(240px,1fr) auto; gap:12px; align-items:center; margin-bottom:16px; padding:14px; border:1px solid #dfe7e5; border-radius:12px; background:#f8fbfa; }
.template-editor-current > div { display:grid; gap:4px; }
.template-editor-current small,.template-editor-current span { color:#687673; font-size:12px; }
.template-editor-current strong { color:#173d37; font-size:15px; }
.template-editor-current code { width:max-content; padding:3px 7px; border-radius:5px; color:#245a50; background:#e7f2ef; }
.editor-active-template-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.editor-active-template-card { display:grid; grid-template-columns:112px minmax(0,1fr); gap:13px; min-height:188px; padding:12px; border:1px solid #dde5e3; border-radius:12px; background:#fff; }
.editor-active-template-card.is-selected { border:2px solid #168462; box-shadow:0 7px 20px rgba(22,132,98,.12); }
.editor-active-template-thumb { width:112px; height:164px; overflow:hidden; border:1px solid #d6dcda; border-radius:9px; background:#eef1f0; pointer-events:none; }
.editor-active-template-thumb iframe { width:430px; height:932px; border:0; transform:scale(.26); transform-origin:top left; }
.editor-active-template-copy { display:grid; align-content:space-between; gap:8px; min-width:0; }
.editor-active-template-copy header { display:flex; justify-content:space-between; gap:8px; align-items:start; }
.editor-active-template-copy h3 { margin:3px 0 0; color:#173d37; font-size:15px; line-height:1.4; }
.editor-active-template-copy small,.editor-active-template-copy p { margin:0; color:#687673; font-size:11px; line-height:1.55; }
.editor-active-template-copy > div { display:flex; gap:7px; }
.editor-template-empty { padding:20px; border:1px dashed #aebbb8; border-radius:12px; text-align:center; }
.template-editor-settings { border-top:1px solid #e4e9e8; padding-top:16px; }
@media (max-width:1100px) { .editor-active-template-grid { grid-template-columns:1fr; } }
@media (max-width:760px) {
  .template-editor-current { grid-template-columns:1fr; }
  .editor-active-template-card { grid-template-columns:92px minmax(0,1fr); }
  .editor-active-template-thumb { width:92px; height:140px; }
  .editor-active-template-thumb iframe { transform:scale(.22); }
}

/* Formal Product template selection stays compact; the registry is browsed in a bounded modal. */
.product-template-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  min-height: 92px;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
}
.product-template-summary-copy { display: grid; min-width: 0; gap: 4px; }
.product-template-summary-copy small { color: #667085; font-size: 12px; }
.product-template-summary-copy strong { overflow: hidden; color: #101828; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.product-template-summary-copy span { overflow: hidden; color: #667085; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-template-current-state {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #a6f4c5;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.product-template-current-state.is-pending { border-color: #fedf89; background: #fffaeb; color: #b54708; }
.product-template-summary-actions { display: flex; gap: 8px; white-space: nowrap; }

.drawer.product-template-selector-drawer {
  top: 6vh;
  right: 4vw;
  width: min(1400px, 92vw);
  max-width: none;
  height: 88vh;
  grid-template-rows: 58px minmax(0, 1fr) 60px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(16, 24, 40, .24);
}
.drawer.product-template-selector-drawer .drawer-head { padding: 0 20px; }
.drawer.product-template-selector-drawer .drawer-head h2 { font-size: 18px; }
.drawer.product-template-selector-drawer .drawer-body { min-height: 0; overflow: hidden; padding: 0; }
.drawer.product-template-selector-drawer .drawer-foot { padding: 0 20px; background: #fff; }
.product-template-selector { display: grid; height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr); background: #f7f9fc; }
.product-template-selector-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(3, minmax(130px, .8fr)) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px 18px;
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
}
.product-template-selector-filters label { display: grid; min-width: 0; gap: 5px; color: #475467; font-size: 12px; }
.product-template-selector-filters :is(input, select) { width: 100%; min-width: 0; height: 38px; box-sizing: border-box; }
.product-template-selector-layout { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) 300px; }
.product-template-selector-browser { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; }
.product-template-selector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; align-items: start; }
.product-template-selector-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 9px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #101828;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
.product-template-selector-card:hover { border-color: #84adff; box-shadow: 0 6px 16px rgba(16, 24, 40, .08); }
.product-template-selector-card.is-selected { border: 2px solid #1769ff; padding: 8px; box-shadow: 0 0 0 3px rgba(23, 105, 255, .12); }
.product-template-selector-card:focus-visible { outline: 3px solid rgba(23, 105, 255, .25); outline-offset: 2px; }
.product-template-mobile-thumb { position: relative; display: grid; width: 100%; aspect-ratio: 9 / 16; grid-template-rows: 12px 48% 1fr 24px; overflow: hidden; border: 1px solid #e4e7ec; border-radius: 4px; background: #fff; box-sizing: border-box; }
.product-template-mobile-status { display: flex; align-items: center; justify-content: flex-end; gap: 2px; padding: 0 5px; background: #f2f4f7; }
.product-template-mobile-status i { width: 8px; height: 2px; background: #98a2b3; }
.product-template-mobile-hero { display: grid; place-items: center; overflow: hidden; background: #eef2f6; color: #98a2b3; font-size: 30px; font-weight: 700; }
.product-template-mobile-hero img { width: 100%; height: 100%; object-fit: cover; }
.product-template-mobile-copy { display: grid; align-content: start; gap: 5px; padding: 8px; }
.product-template-mobile-copy b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.product-template-mobile-copy strong { color: var(--template-accent); font-size: 12px; }
.product-template-mobile-copy i { display: block; width: 100%; height: 4px; border-radius: 2px; background: #eaecf0; }
.product-template-mobile-copy i:nth-last-child(1) { width: 62%; }
.product-template-mobile-cta { display: grid; place-items: center; background: var(--template-accent); color: #fff; font-size: 9px; font-weight: 700; }
.product-template-selector-card-copy { display: grid; min-width: 0; gap: 3px; }
.product-template-selector-card-copy strong { overflow: hidden; font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.product-template-selector-card-copy small { overflow: hidden; color: #667085; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-template-card-state { position: absolute; top: 15px; right: 15px; padding: 3px 6px; border-radius: 4px; background: #1769ff; color: #fff; font-size: 10px; font-weight: 700; }
.product-template-info-panel { min-width: 0; overflow-y: auto; padding: 20px; border-left: 1px solid #e4e7ec; background: #fff; }
.product-template-info-panel header { padding-bottom: 14px; border-bottom: 1px solid #eaecf0; }
.product-template-info-panel header small { color: #1769ff; font-weight: 700; }
.product-template-info-panel h3 { margin: 6px 0 0; color: #101828; font-size: 17px; line-height: 1.45; }
.product-template-info-panel dl { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px 10px; margin: 18px 0; font-size: 12px; line-height: 1.6; }
.product-template-info-panel dt { color: #98a2b3; }
.product-template-info-panel dd { min-width: 0; margin: 0; color: #344054; overflow-wrap: anywhere; }

@media (min-width: 1800px) {
  .product-template-selector-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
}
@media (max-width: 1180px) {
  .product-template-selector-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-template-selector-filters > button { width: 100%; }
  .product-template-selector-layout { grid-template-columns: minmax(0, 1fr) 270px; }
}
@media (max-width: 900px) {
  .drawer.product-template-selector-drawer { top: 0; right: 0; width: 100vw; height: 100vh; border: 0; border-radius: 0; }
  .product-template-selector-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .product-template-selector-grid { grid-template-columns: repeat(2, minmax(136px, 1fr)); }
}
@media (max-width: 700px) {
  .product-template-summary { grid-template-columns: minmax(0, 1fr) auto; }
  .product-template-summary-actions { grid-column: 1 / -1; }
  .product-template-selector-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-template-selector-layout { grid-template-columns: 1fr; }
  .product-template-info-panel { display: none; }
}

/* Mobile render quality — Phone Frame -> Viewport -> Page Renderer.
   Every admin/template preview embeds the exact public /product route at the
   Apple Pro Max CSS viewport (430 × 932). */
.mobile-page-renderer-device {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  justify-content: center;
  align-items: center;
  overflow: auto;
}

.mobile-page-renderer-device .mobile-preview-device-frame,
.mobile-preview-device-frame {
  position: relative !important;
  display: block !important;
  flex: 0 0 auto !important;
  width: var(--preview-width,430px) !important;
  height: 932px !important;
  min-width: var(--preview-width,430px) !important;
  max-width: var(--preview-width,430px) !important;
  min-height: 932px !important;
  max-height: 932px !important;
  padding: 10px !important;
  border: 0 !important;
  border-radius: 38px !important;
  box-sizing: content-box !important;
  overflow: hidden !important;
  background: #111827 !important;
  box-shadow: 0 20px 54px rgba(15, 23, 42, .28) !important;
  transform: none !important;
}

.mobile-page-renderer-device .mobile-preview-device-status,
.mobile-preview-device-frame .mobile-preview-device-status {
  position: absolute !important;
  z-index: 4 !important;
  top: 10px !important;
  left: 10px !important;
  width: var(--preview-width,430px) !important;
  height: 30px !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
  color: #0f172a !important;
  pointer-events: none !important;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.76), transparent) !important;
}

.mobile-page-renderer-device .mobile-preview-device-status b,
.mobile-preview-device-frame .mobile-preview-device-status b {
  background: #0f172a !important;
}

.mobile-preview-viewport {
  position: relative !important;
  display: block !important;
  width: var(--preview-width,430px) !important;
  height: 932px !important;
  min-width: var(--preview-width,430px) !important;
  max-width: var(--preview-width,430px) !important;
  min-height: 932px !important;
  max-height: 932px !important;
  border-radius: 30px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  background: #fff !important;
}

.mobile-page-renderer-device .mobile-preview-page-renderer,
.mobile-preview-device-frame .mobile-preview-page-renderer {
  display: block !important;
  width: var(--preview-width,430px) !important;
  height: 932px !important;
  min-width: var(--preview-width,430px) !important;
  max-width: var(--preview-width,430px) !important;
  min-height: 932px !important;
  max-height: 932px !important;
  border: 0 !important;
  border-radius: inherit !important;
  overflow: hidden !important;
  background: #fff !important;
}

/* Landing Preview Runtime V1.3: never expose a browser broken-frame page. */
.landing-preview-runtime-loading,
.landing-preview-runtime-error,
.mobile-preview-render-error {
  width: min(430px, 100%);
  min-height: 360px;
  margin: auto;
  padding: 32px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  border: 1px solid #dbe2ea;
  border-radius: 28px;
  background: #fff;
  color: #172033;
}

.landing-preview-runtime-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.landing-preview-runtime-loading .spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: preview-runtime-spin .8s linear infinite;
}

@keyframes preview-runtime-spin { to { transform: rotate(360deg); } }

.landing-preview-health {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1.35;
  color: #475569;
  background: rgba(255, 255, 255, .96);
}

.mobile-preview-device-frame > .landing-preview-health {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 8;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .16);
  pointer-events: none;
}

.landing-preview-health span { white-space: normal; overflow-wrap: anywhere; }
.landing-preview-health .ready { color: #047857; }
.landing-preview-health .degraded { color: #b45309; }
.landing-preview-health .failed { color: #b91c1c; }
.landing-preview-health .loading { color: #1d4ed8; }

.landing-runtime-minimal { width: 100%; max-width: none; margin: 0; padding: 0 0 96px; background: #fff; }
.landing-runtime-minimal-hero { width: 100%; }
.landing-runtime-minimal-hero img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #f8fafc; }
.landing-runtime-minimal-hero > div { padding: 18px 16px 24px; }
.landing-runtime-minimal-hero h1 { margin: 0 0 10px; overflow-wrap: anywhere; }
.landing-runtime-minimal-hero strong { display: block; margin: 12px 0; color: #dc2626; font-size: clamp(28px, 8vw, 42px); }
.landing-runtime-minimal-hero button { width: 100%; min-height: 50px; border: 0; border-radius: 12px; background: #dc2626; color: #fff; font-weight: 800; }
.landing-runtime-degraded-note { display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: #fff7ed; color: #9a3412; font-size: 12px; }
.landing-runtime-customer-note { margin: 0; padding: 8px 16px; background: #f8fafc; color: #64748b; font-size: 12px; }
.landing-media-fallback { object-fit: contain !important; background: #f8fafc !important; }

.mobile-preview-device-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.single-render-preview,
.template-preview-shell.single-render-preview,
.template-large-preview.single-render-preview,
.active-template-preview-layout.single-render-preview,
.drawer-mobile-preview.single-render-preview {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: none !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 8px !important;
  overflow: auto !important;
}

.template-preview-device-area {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  justify-content: center !important;
  overflow: auto !important;
}

.active-template-card {
  min-height: 0 !important;
}

.active-template-card-thumbnail {
  position: relative;
  width: 100%;
  height: 318px;
  overflow: hidden;
  border: 1px solid #dbe4e2;
  border-radius: 12px;
  background: #edf2f1;
}

.active-template-card-thumbnail iframe {
  position: absolute;
  top: 0;
  left: 50%;
  width: 430px;
  height: 932px;
  border: 0;
  transform: translateX(-50%) scale(.34);
  transform-origin: top center;
  pointer-events: none;
  background: #fff;
}

.active-template-static-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #f7faf9, #e8efed);
}

.active-template-static-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

.active-template-static-thumb > span {
  color: #245a50;
  font-size: 40px;
  font-weight: 800;
}

.active-template-static-thumb small {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  color: #fff;
  background: rgba(12, 45, 39, .82);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.active-template-card > p {
  min-height: 0 !important;
}

@media (max-width: 720px) {
  .mobile-page-renderer-device {
    justify-content: center;
    align-items: center;
  }

  .mobile-page-renderer-device .mobile-preview-device-frame,
  .mobile-preview-device-frame {
    transform: none !important;
  }
}

/* Simple Hugo-style product editor: cover + gallery + one HTML description. */
.product-content-head { align-items: center; gap: 18px; margin-bottom: 18px; }
.detail-v2-head-actions { display: flex; align-items: center; gap: 10px; }
.detail-v2-sync-badge { color: #15803d; font-size: 12px; font-weight: 800; white-space: nowrap; }
.detail-v2-primary-media { margin-bottom: 16px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.detail-v2-primary-media summary { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; list-style: none; }
.detail-v2-primary-media summary::-webkit-details-marker { display: none; }
.detail-v2-primary-media summary::after { content: "⌄"; margin-left: auto; color: #64748b; }
.detail-v2-primary-media summary span { color: #94a3b8; font-size: 12px; }
.detail-v2-primary-media > details > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0 16px 16px; }
.detail-editor-v2-workbench { display: grid; grid-template-columns: minmax(560px, 1fr) 468px; gap: 20px; align-items: start; min-width: 0; height: 1040px; }
.detail-editor-v2-main { min-width: 0; height: 1040px; border: 1px solid #dce4ef; border-radius: 8px; background: #fff; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.detail-editor-v2-preview-pane { display: grid; justify-items: center; gap: 10px; min-width: 0; height: 1040px; padding: 16px 18px 18px; border: 1px solid #dce4ef; border-radius: 8px; background: #f8fafc; box-sizing: border-box; overflow: hidden; }
.detail-editor-v2-preview-pane > header { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-editor-v2-preview-pane > header small { color: #2563eb; font-weight: 800; }
.detail-editor-v2-preview-pane > header h3 { margin: 3px 0 0; font-size: 15px; }
.detail-editor-v2-preview-pane > header > span { padding: 4px 8px; border-radius: 999px; color: #166534; background: #dcfce7; font-size: 10px; font-weight: 800; }
.detail-editor-v2-preview-pane > p { margin: 0; color: #64748b; font-size: 11px; line-height: 1.6; text-align: center; }
.detail-editor-v2-phone { position: relative; width: 430px; height: 932px; overflow: hidden; border: 10px solid #171717; border-radius: 54px; background: #fff; box-shadow: 0 20px 50px rgba(15, 23, 42, .22); box-sizing: border-box; }
.detail-editor-v2-phone::before { content: ""; position: absolute; top: 8px; left: 50%; z-index: 8; width: 122px; height: 26px; border-radius: 16px; background: #171717; transform: translateX(-50%); pointer-events: none; }
.detail-editor-v2-phone-status { position: relative; z-index: 6; height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 21px; color: #111827; background: #fff; font-size: 11px; box-sizing: border-box; }
.detail-editor-v2-phone-viewport { position: relative; width: 100%; height: calc(100% - 38px); min-width: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border-radius: 0 0 43px 43px; background: #fff; }
.detail-editor-v2-phone-viewport > [data-mobile-page-renderer] { width: 100% !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; box-shadow: none !important; }
.detail-editor-v2-phone-viewport .pcs-sticky,
.detail-editor-v2-phone-viewport [class*="sticky"] { max-width: 100%; }
.detail-editor-v2-phone-viewport .pcs-sticky { position: sticky; left: auto; right: auto; bottom: 0; transform: none; }
.detail-v2-module-library { padding: 15px 16px 16px; border-bottom: 1px solid #dce4ef; background: #f8fafc; }
.detail-v2-module-library > header,
.detail-v2-canvas-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-v2-module-library > header { margin-bottom: 12px; }
.detail-v2-module-library h3,
.detail-v2-canvas-head h3 { margin: 2px 0 0; font-size: 15px; }
.detail-v2-module-library small,
.detail-v2-canvas-head small { color: #64748b; }
.detail-v2-module-library > header > span,
.detail-v2-canvas-head > span { color: #2563eb; font-size: 12px; font-weight: 800; }
.detail-v2-module-library > div { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.detail-v2-module-button { position: relative; min-width: 0; min-height: 76px; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px; border: 1px solid #dbe3ee; border-radius: 7px; color: #334155; background: #fff; text-align: left; cursor: pointer; font: inherit; box-sizing: border-box; }
.detail-v2-module-button:hover { border-color: #2563eb; color: #1d4ed8; box-shadow: 0 4px 12px rgba(37, 99, 235, .12); }
.detail-v2-module-button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: #2563eb; background: #eff6ff; font-size: 11px; font-weight: 900; }
.detail-v2-module-button b { font-size: 12px; }
.detail-v2-module-button small { min-width: 0; overflow: hidden; color: #94a3b8; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.detail-v2-module-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.detail-v2-canvas-head { padding: 13px 16px 0; background: #fff; }
.detail-editor-v2 .description-block-dropzone { min-height: 440px; padding-top: 13px; background: #fff; }
.detail-editor-v2 .description-block-card { border-radius: 7px; box-shadow: none; }
.detail-editor-v2 .description-block-card > header { min-height: 48px; padding: 8px 10px; background: #f8fafc; }
.detail-v2-module-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 6px; color: #1d4ed8; background: #dbeafe; font-size: 10px; font-weight: 900; }
.detail-editor-v2 .description-block-card > header .btn { min-width: auto; padding: 4px 8px; font-size: 11px; }
.description-block-body[hidden] { display: none !important; }
.description-block-copy-editor > p { margin: 0; padding: 10px 16px 0; color: #94a3b8; font-size: 11px; }
.description-structural-reference { padding: 18px; background: #f8fafc; }
.description-structural-reference strong { color: #1d4ed8; }
.description-structural-reference p { margin: 6px 0 0; color: #64748b; line-height: 1.6; }
.pcs-detail-v2-media { padding: 0 !important; }
.pcs-detail-v2-media figure { width: 100%; margin: 0; }
.pcs-detail-v2-media img,
.pcs-detail-v2-media video { display: block; width: 100%; height: auto; object-fit: contain; }
.pcs-detail-v2-media figcaption { padding: 10px 14px; color: #475569; line-height: 1.6; }
.pcs-detail-v2-copy { overflow-wrap: anywhere; }
@media (max-width: 1420px) {
  .detail-editor-v2-workbench { grid-template-columns: minmax(520px, 1fr) 410px; }
  .detail-editor-v2-phone { width: 390px; height: 844px; border-radius: 48px; }
  .detail-v2-module-library > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .detail-editor-v2-workbench { grid-template-columns: 1fr; height: auto; }
  .detail-editor-v2-main { height: auto; max-height: 1000px; }
  .detail-editor-v2-preview-pane { height: auto; }
  .detail-v2-primary-media > details > div { grid-template-columns: 1fr; }
}
.simple-product-content-editor { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.simple-product-media-column { display: grid; gap: 16px; }
.simple-editor-module { border: 1px solid #dce4ef; background: #fff; border-radius: 8px; padding: 16px; min-width: 0; }
.simple-editor-module > header { margin-bottom: 14px; }
.simple-editor-module > header > span { color: #2563eb; font-size: 12px; font-weight: 700; }
.simple-editor-module > header h3 { margin: 4px 0 0; font-size: 17px; }
.simple-editor-module > header p { margin: 7px 0 0; color: #667085; font-size: 13px; }
.simple-product-media-column .upload-field { margin: 0; }
.simple-product-media-column .commerce-cover-field .managed-upload-preview { grid-template-columns: 1fr; }
.simple-product-media-column .commerce-gallery-field .managed-upload-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rich-description-module { padding: 0; overflow: hidden; }
.rich-description-module > header { padding: 16px 18px 0; }
.simple-rich-editor { border: 0; border-top: 1px solid #e3e8f0; border-radius: 0; }
.simple-rich-editor .rich-toolbar { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; background: #f8fafc; border-bottom: 1px solid #dce4ef; }
.simple-rich-editor .rich-toolbar button,
.rich-upload-button { min-height: 32px; padding: 5px 10px; border: 1px solid #cfd8e6; border-radius: 5px; background: #fff; color: #243248; font-size: 12px; line-height: 20px; cursor: pointer; }
.rich-format-select { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 3px 6px; border: 1px solid #cfd8e6; border-radius: 5px; background: #fff; color: #475569; font-size: 12px; }
.rich-format-select select { max-width: 112px; min-height: 24px; border: 0; background: transparent; color: #243248; font-size: 12px; outline: none; }
.simple-rich-editor .rich-toolbar button:hover,
.rich-upload-button:hover { border-color: #2563eb; color: #1d4ed8; }
.simple-rich-editor .rich-toolbar button.danger { color: #c62828; }
.rich-upload-button input { display: none; }
.rich-toolbar-divider { width: 1px; min-height: 30px; margin: 0 2px; background: #dce4ef; }
.simple-rich-body { min-height: 680px; padding: 22px; overflow-wrap: anywhere; outline: none; background: #fff; color: #1f2937; line-height: 1.75; }
.simple-rich-body:focus { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .15); }
.simple-rich-body h2,
.simple-rich-body h3 { margin: 24px 0 10px; color: #111827; }
.simple-rich-body p,
.simple-rich-body ul,
.simple-rich-body ol { margin: 8px 0 14px; }
.simple-rich-body figure { position: relative; width: 100%; margin: 16px 0; border: 1px solid transparent; background: #f8fafc; }
.simple-rich-body figure.is-rich-media-selected,
.simple-rich-body img.is-rich-media-selected,
.simple-rich-body video.is-rich-media-selected { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.simple-rich-body img,
.simple-rich-body video { display: block; width: 100%; max-width: 100%; height: auto; }
.simple-rich-body figcaption { padding: 10px 12px; color: #475569; }
.simple-rich-body figcaption strong { display: block; color: #172033; }
.simple-rich-editor .rich-status { display: flex; justify-content: space-between; padding: 8px 12px; border-top: 1px solid #e3e8f0; background: #f8fafc; color: #667085; font-size: 12px; }

/* Detail editor V1.1: ProductData.media.detailContent is the only write source. */
.product-description-block-editor { border-top: 1px solid #e3e8f0; min-width: 0; }
.description-editor-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #dce4ef; background: #f8fafc; }
.description-editor-toolbar label.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.description-editor-toolbar input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.description-editor-help { padding: 10px 16px; color: #475569; background: #eff6ff; font-size: 12px; line-height: 1.6; }
.description-block-dropzone { display: grid; gap: 12px; min-height: 360px; padding: 16px; border: 2px dashed transparent; background: #f8fafc; transition: .15s ease; }
.description-block-dropzone.is-empty { place-content: center; border-color: #94a3b8; color: #64748b; text-align: center; }
.description-block-dropzone.is-drag-over { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .12); }
.description-block-card { min-width: 0; border: 1px solid #dce4ef; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.description-block-card.is-dragging { opacity: .45; }
.description-block-card > header { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; border-bottom: 1px solid #e5e7eb; background: #f8fafc; }
.description-block-card > header b { min-width: 0; overflow-wrap: anywhere; }
.description-block-card > header em { margin-right: auto; color: #15803d; font-size: 11px; font-style: normal; }
.description-block-card > header > div { display: flex; gap: 4px; }
.description-block-card > header .btn { min-width: 32px; min-height: 30px; padding: 3px 7px; }
.description-drag-handle { color: #64748b; cursor: grab; user-select: none; }
.description-block-text { min-height: 120px; padding: 16px; outline: none; overflow-wrap: anywhere; line-height: 1.75; }
.description-block-text:focus { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .18); }
.description-block-media { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; }
.description-block-media img,
.description-block-media video { display: block; width: 100%; aspect-ratio: 3 / 4; height: auto; max-height: 520px; border-radius: 8px; background: #f1f5f9; object-fit: contain; }
.description-block-media label { display: grid; gap: 6px; color: #475569; font-size: 12px; }
.description-block-media label + label { margin-top: 10px; }
.description-block-media input { width: 100%; min-width: 0; }
.description-cod-reference { padding: 20px; color: #334155; background: #f0fdf4; }
.description-cod-reference p { margin: 6px 0 0; }
.description-upload-status { display: grid; gap: 6px; padding: 10px 16px; border-bottom: 1px solid #e5e7eb; }
.description-upload-status > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px 10px; border-radius: 7px; background: #f8fafc; }
.description-upload-status .failed { color: #b91c1c; background: #fef2f2; }
.description-upload-status small { grid-column: 1 / -1; }
.description-asset-library { padding: 16px; border-top: 1px solid #dce4ef; }
.description-asset-library h4 { margin: 0 0 10px; }
.description-asset-library h4 small { color: #64748b; font-weight: 400; }
.description-asset-library > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 9px; }
.description-asset-library article { min-width: 0; padding: 7px; border: 1px solid #dce4ef; border-radius: 8px; background: #fff; cursor: grab; }
.description-asset-library img { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; background: #f1f5f9; object-fit: contain; }
.description-asset-library span { display: block; margin-top: 6px; overflow-wrap: anywhere; color: #475569; font-size: 11px; }

.simple-product-media-column .managed-media-item img,
.simple-product-media-column .commerce-media-thumb img,
.media-assets-center .media-asset-thumb img { object-fit: contain; }
.simple-product-media-column .commerce-media-thumb img { width: 100%; height: 100%; }
.simple-product-media-column .managed-media-item img,
.simple-product-media-column .commerce-media-thumb { aspect-ratio: 1 / 1; }

@media (max-width: 1100px) {
  .simple-product-content-editor { grid-template-columns: 1fr; }
  .simple-product-media-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .simple-product-media-column { grid-template-columns: 1fr; }
  .simple-rich-body { min-height: 520px; padding: 16px; }
  .description-block-media { grid-template-columns: 1fr; }
  .description-block-card > header { align-items: flex-start; flex-wrap: wrap; }
  .description-block-card > header > div { width: 100%; }
}

.product-brief-grid,
.product-brief-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.product-brief-card {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.product-brief-card h4,
.product-brief-card strong {
  margin: 0 0 10px;
  color: #0f172a;
}

.product-brief-card header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.product-brief-card header small {
  margin-left: auto;
  color: #64748b;
}

.product-brief-card dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
}

.product-brief-card dt {
  color: #64748b;
}

.product-brief-card dd {
  margin: 0;
  color: #1e293b;
  line-height: 1.55;
}

.product-brief-version {
  margin-top: 14px;
  border-top: 1px solid #dbeafe;
  padding-top: 12px;
}

/* Stage 34 final public-width override.
   Must stay at EOF because legacy admin/mobile-preview blocks above redefine
   .admin-shell, .main-shell and .public-landing-page later in the stylesheet. */
body.public-landing-mode .admin-shell,
body.public-landing-mode .main-shell,
body.public-landing-mode #app.content-area,
body.public-landing-mode #app {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  grid-template-columns: none !important;
}

body.public-landing-mode .tw-cod-landing.public-landing-page,
body.public-landing-mode .tw-cod-landing,
body.public-landing-mode .tb-cod-landing.public-landing-page,
body.public-landing-mode .tb-cod-landing {
  display: block !important;
  width: 100% !important;
  max-width: 750px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: hidden !important;
}

/* Stage 33: Taiwan COD customer landing page final overrides. */
body.public-landing-mode {
  background: #e5e7eb !important;
}

body.public-landing-mode .app-shell,
body.public-landing-mode .module-menu,
body.public-landing-mode .topbar,
body.public-landing-mode .tab-strip,
body.public-landing-mode .side-nav {
  display: none !important;
}

body.public-landing-mode .admin-shell,
body.public-landing-mode .main-shell,
body.public-landing-mode #app.content-area,
body.public-landing-mode #app {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

.customer-cod-landing {
  width: min(100%, 760px) !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: 0 0 104px !important;
  background: #fff !important;
  color: #111827 !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .16) !important;
}

.customer-cod-landing .customer-hero {
  display: block !important;
  background: #fff !important;
}

.customer-hero-media {
  position: relative !important;
  min-height: min(70vh, 780px) !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

.customer-hero-img,
.customer-hero-placeholder {
  width: 100% !important;
  height: min(70vh, 780px) !important;
  min-height: 620px !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.customer-hero-placeholder {
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 18px !important;
  padding: 42px 28px !important;
  color: #0f172a !important;
  text-align: center !important;
  background:
    radial-gradient(circle at 50% 32%, rgba(255,255,255,.92) 0 0, rgba(255,255,255,.88) 185px, transparent 186px),
    linear-gradient(145deg, #dcfce7 0%, #dbeafe 55%, #fef3c7 100%) !important;
}

.customer-hero-placeholder strong {
  max-width: 13em !important;
  font-size: clamp(34px, 9vw, 58px) !important;
  line-height: 1.08 !important;
}

.customer-hero-placeholder span {
  width: min(92%, 520px) !important;
  padding: 14px 18px !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, .86) !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.customer-hero-placeholder small {
  color: #475569 !important;
  font-weight: 800 !important;
}

.customer-hero-overlay {
  position: absolute !important;
  left: 18px !important;
  right: 18px !important;
  top: 18px !important;
  display: grid !important;
  gap: 8px !important;
  padding: 14px 16px !important;
  border-radius: 22px !important;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(15,23,42,.84), rgba(15,23,42,.46)) !important;
  backdrop-filter: blur(8px) !important;
}

.customer-hero-overlay span {
  width: max-content !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.customer-hero-overlay strong {
  font-size: clamp(22px, 5.8vw, 38px) !important;
  line-height: 1.12 !important;
}

.customer-hero-price {
  left: 18px !important;
  right: 18px !important;
  bottom: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border-radius: 24px !important;
  background: rgba(15, 23, 42, .92) !important;
}

.customer-hero-price strong {
  font-size: clamp(28px, 8vw, 44px) !important;
  color: #fff !important;
}

.customer-hero-price small {
  max-width: 38% !important;
  color: #fde68a !important;
  font-weight: 900 !important;
  text-align: right !important;
}

.customer-hero-copy {
  padding: 24px 18px 30px !important;
}

.customer-badge {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.customer-hero h1 {
  margin: 14px 0 10px !important;
  font-size: clamp(31px, 8.5vw, 52px) !important;
  line-height: 1.05 !important;
  letter-spacing: -.04em !important;
}

.customer-hero p {
  margin: 0 !important;
  font-size: 17px !important;
  line-height: 1.65 !important;
  color: #334155 !important;
}

.customer-primary-cta,
.customer-sticky-buy button,
.customer-cod .landing-order-form button {
  min-height: 52px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 950 !important;
}

.customer-section {
  padding: 30px 18px !important;
  border-top: 10px solid #f1f5f9 !important;
}

.customer-section h2 {
  font-size: clamp(24px, 6.6vw, 36px) !important;
  line-height: 1.14 !important;
  letter-spacing: -.03em !important;
}

.customer-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.customer-gallery img,
.customer-long-images img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  object-position: center !important;
  background: #f8fafc !important;
}

.customer-long-images {
  display: grid !important;
  gap: 16px !important;
}

.customer-long-images article {
  border-radius: 24px !important;
}

.customer-package-card {
  cursor: pointer !important;
  border-radius: 24px !important;
  padding: 18px !important;
}

.customer-package-card.recommended::after {
  content: "最高推薦" !important;
  position: absolute !important;
  right: 14px !important;
  top: 14px !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: #dc2626 !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

.customer-package-card b {
  font-size: 34px !important;
}

.customer-package-card i {
  color: #0f172a !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

.customer-trust-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.customer-trust-strip span {
  padding: 12px !important;
  border-radius: 16px !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  font-weight: 900 !important;
}

.customer-faq > div {
  display: grid !important;
  gap: 12px !important;
}

.customer-faq article {
  padding: 16px !important;
  border-radius: 18px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.customer-sticky-buy {
  z-index: 80 !important;
}

@media (min-width: 820px) {
  .customer-cod-landing .customer-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr) !important;
  }

  .customer-hero-media {
    min-height: 760px !important;
  }

  .customer-hero-img,
  .customer-hero-placeholder {
    height: 760px !important;
  }
}

@media (max-width: 640px) {
  body.public-landing-mode {
    background: #fff !important;
  }

  .customer-cod-landing {
    width: 100% !important;
    box-shadow: none !important;
  }

  .customer-hero-media {
    min-height: 68vh !important;
  }

  .customer-hero-img,
  .customer-hero-placeholder {
    min-height: 0 !important;
    height: 68vh !important;
  }

  .customer-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .customer-trust-strip {
    grid-template-columns: 1fr !important;
  }

  .customer-sticky-buy {
    bottom: 10px !important;
    width: calc(100% - 20px) !important;
  }
}

/* Stage 34: rebuilt Taiwan COD landing-page-renderer.
   This section intentionally owns the real customer sales page and does not reuse
   the old phone-preview / backend-detail layouts. */
body.public-landing-mode {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  background: #f3f4f6 !important;
  overflow-x: hidden !important;
}

.tw-cod-landing,
.tw-cod-landing * {
  box-sizing: border-box !important;
}

.tw-cod-landing {
  display: block !important;
  width: 100% !important;
  max-width: 750px !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: 0 0 104px !important;
  background: #fff !important;
  color: #111827 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif !important;
  line-height: 1.55 !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .14) !important;
  overflow-x: hidden !important;
}

.landing-preview-return-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  background: rgba(15, 23, 42, .94) !important;
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18) !important;
}

.landing-preview-return-bar button {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 9px 14px !important;
  background: #2563eb !important;
  color: #fff !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.landing-preview-return-bar span {
  font-size: 12px !important;
  color: rgba(255, 255, 255, .78) !important;
}

.tw-cod-landing img {
  max-width: 100% !important;
  display: block !important;
}

/* Stage 36: Taobao mobile detail-page style COD landing.
   Customer pages use full-width image flow instead of backend cards. */
.tb-cod-landing,
.tb-cod-landing * {
  box-sizing: border-box !important;
}

.tb-cod-landing {
  display: block !important;
  width: 100% !important;
  max-width: 750px !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: 0 0 92px !important;
  background: #fff !important;
  color: #111827 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif !important;
  overflow-x: hidden !important;
}

.tb-cod-landing img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
}

.tb-hero {
  width: 100% !important;
  background: #fff !important;
}

.tb-hero-img {
  width: 100% !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  object-position: center !important;
  background: #f8fafc !important;
}

.tb-hero-info {
  padding: 18px 18px 22px !important;
  background: #fff !important;
  border-bottom: 10px solid #f3f4f6 !important;
}

.tb-badge {
  display: inline-flex !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
  background: #fee2e2 !important;
  color: #dc2626 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.tb-hero-info h1 {
  margin: 12px 0 8px !important;
  font-size: clamp(28px, 8vw, 48px) !important;
  line-height: 1.08 !important;
  font-weight: 950 !important;
  color: #111827 !important;
}

.tb-hero-info p {
  margin: 0 0 14px !important;
  color: #374151 !important;
  font-size: 16px !important;
}

.tb-price {
  display: grid !important;
  gap: 4px !important;
  padding: 14px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #fff7ed, #fee2e2) !important;
  border: 1px solid #fecaca !important;
}

.tb-price small {
  color: #6b7280 !important;
  font-weight: 800 !important;
}

.tb-price strong {
  color: #dc2626 !important;
  font-size: clamp(34px, 10vw, 56px) !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

.tb-price em {
  color: #b91c1c !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

.tb-package-shortcuts {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  margin: 14px 0 !important;
}

.tb-package-shortcuts button,
.tb-package-card {
  appearance: none !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  border-radius: 14px !important;
  padding: 10px !important;
  text-align: left !important;
  color: #111827 !important;
  cursor: pointer !important;
}

.tb-package-shortcuts button.active,
.tb-package-card.active,
.tb-package-card.recommended {
  border-color: #ef4444 !important;
  background: #fff7ed !important;
  box-shadow: 0 8px 20px rgba(239, 68, 68, .12) !important;
}

.tb-package-shortcuts span,
.tb-package-card span {
  display: block !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.tb-package-shortcuts b,
.tb-package-card b {
  display: block !important;
  margin-top: 4px !important;
  color: #dc2626 !important;
  font-size: 18px !important;
}

.tb-main-cta,
.tb-trust-section .landing-order-form button {
  width: 100% !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 16px 18px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.tb-detail-flow {
  display: block !important;
  width: 100% !important;
  background: #f3f4f6 !important;
}

/* Stage43: customer-facing GIFs are full-width detail-flow media, never
   backend cards or file-path placeholders. */
body.public-landing-mode .tb-gif-poster {
  display:block !important;
  width:100vw !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-bottom:8px solid #f3f4f6 !important;
  border-radius:0 !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body.public-landing-mode .tb-gif-poster img {
  display:block !important;
  width:100vw !important;
  max-width:none !important;
  height:auto !important;
  min-height:240px !important;
  object-fit:cover !important;
  object-position:center !important;
  background:#f8fafc !important;
}
body.public-landing-mode .tb-gif-poster figcaption {
  display:block !important;
  width:100vw !important;
  margin:0 !important;
  padding:14px 16px 18px !important;
  background:#fff !important;
  color:#111827 !important;
}
body.public-landing-mode .tb-gif-poster figcaption strong { display:block !important; font-size:22px !important; line-height:1.2 !important; font-weight:950 !important; }
body.public-landing-mode .tb-gif-poster figcaption span { display:block !important; margin-top:6px !important; color:#4b5563 !important; font-size:15px !important; line-height:1.55 !important; }

.gif-asset-manager .sub{margin:0;color:#64748b}.gif-asset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}.gif-asset-card{display:grid;gap:10px;padding:12px;border:1px solid #dbe4f0;border-radius:12px;background:#f8fafc}.gif-asset-card>img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;background:#e2e8f0}.gif-asset-card p,.gif-asset-card small{margin:4px 0 0;color:#64748b;line-height:1.45}.gif-asset-actions{display:flex;flex-wrap:wrap;gap:8px}.gif-preview-drawer img{display:block;width:100%;height:auto;border-radius:10px;background:#f1f5f9}.gif-preview-drawer h3,.gif-preview-drawer p,.gif-position-drawer h3,.gif-position-drawer p{margin:12px 0 0}.gif-asset-actions .danger{color:#b91c1c;border-color:#fecaca;background:#fff1f2}.gif-video-placeholder{display:grid;place-items:center;gap:8px;min-height:170px;aspect-ratio:4/3;border:1px dashed #94a3b8;border-radius:10px;background:#eef2f7;color:#334155;text-align:center}.gif-video-placeholder strong{font-size:16px}.gif-video-placeholder span{font-size:13px;color:#64748b}
.dynamic-video-source-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin:12px 0}.dynamic-video-source-list article{display:grid;gap:7px;padding:10px;border:1px solid #dbe4f0;border-radius:10px;background:#fff}.dynamic-video-source-list video{display:block;width:100%;aspect-ratio:4/3;border-radius:8px;background:#0f172a}.dynamic-video-source-list p,.dynamic-video-source-list small{margin:0;color:#64748b;line-height:1.45}
@media(max-width:720px){.gif-asset-grid{grid-template-columns:1fr}}

.tb-dynamic-media-section{display:block;width:100%;background:#f3f4f6;padding:0;margin:0}
.tb-dynamic-media-status{display:grid;gap:3px;padding:12px 16px;background:#111827;color:#fff}.tb-dynamic-media-status span{font-size:11px;font-weight:900;letter-spacing:.08em;color:#fbbf24}.tb-dynamic-media-status small{color:#d1d5db;font-size:12px}.tb-dynamic-media-inline{border-bottom:8px solid #f3f4f6}
.tb-dynamic-media-section header{padding:18px 16px;background:#111827;color:#fff}
.tb-dynamic-media-section header span{display:block;font-size:12px;font-weight:900;letter-spacing:.08em;color:#fbbf24}
.tb-dynamic-media-section header h2{margin:4px 0 0;font-size:26px;line-height:1.15}
.tb-dynamic-media-section header p{margin:8px 0 0;color:#d1d5db;font-size:14px;line-height:1.45}
.tb-dynamic-media-card{margin:0;background:#fff;border:0;border-bottom:8px solid #f3f4f6}
.tb-dynamic-media-frame{width:100%;background:#0f172a}
.tb-dynamic-media-frame img{display:block;width:100%;height:auto}
.tb-dynamic-placeholder{display:grid;place-items:center;gap:8px;min-height:360px;padding:28px;background:linear-gradient(135deg,#111827,#334155);color:#fff;text-align:center}
.tb-dynamic-placeholder span{font-size:22px;font-weight:950}
.tb-dynamic-placeholder small{max-width:360px;color:#cbd5e1;font-size:14px;line-height:1.5}
.tb-dynamic-media-card figcaption{padding:14px 16px 18px;background:#fff;color:#111827}
.tb-dynamic-media-card figcaption em{display:block;font-style:normal;font-size:12px;font-weight:900;color:#dc2626}
.tb-dynamic-media-card figcaption strong{display:block;margin-top:4px;font-size:22px;line-height:1.2;font-weight:950}
.tb-dynamic-media-card figcaption span{display:block;margin-top:6px;color:#374151;font-size:15px;line-height:1.5}
.tb-dynamic-media-card figcaption p{margin:6px 0 0;color:#6b7280;font-size:14px;line-height:1.5}

.tb-detail-poster {
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 8px solid #f3f4f6 !important;
  overflow: hidden !important;
}

.tb-detail-poster img {
  width: 100% !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  object-position: center !important;
  background: #fff !important;
}

.tb-detail-poster figcaption {
  margin: 0 !important;
  padding: 14px 18px 18px !important;
  background: #fff !important;
}

.tb-detail-poster figcaption strong {
  display: block !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  color: #111827 !important;
  font-weight: 950 !important;
}

.tb-detail-poster figcaption span {
  display: block !important;
  margin-top: 6px !important;
  color: #4b5563 !important;
  font-size: 15px !important;
}

.tb-buy-section,
.tb-trust-section,
.tb-cod-landing .tw-faq {
  margin: 0 !important;
  padding: 20px 18px !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 10px solid #f3f4f6 !important;
}

.tb-buy-section h2,
.tb-trust-section h2 {
  margin: 0 0 8px !important;
  color: #111827 !important;
  font-size: 28px !important;
  line-height: 1.15 !important;
  font-weight: 950 !important;
}

.tb-buy-section p,
.tb-trust-section p {
  color: #4b5563 !important;
}

.tb-package-list {
  display: grid !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

.tb-package-card {
  display: grid !important;
  gap: 4px !important;
  padding: 14px !important;
}

.tb-package-card strong {
  font-size: 18px !important;
  font-weight: 950 !important;
}

.tb-package-card del {
  color: #9ca3af !important;
  font-size: 13px !important;
}

.tb-package-card small,
.tb-package-card em {
  color: #4b5563 !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

.tb-trust-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  margin: 14px 0 !important;
}

.tb-trust-grid span {
  border-radius: 12px !important;
  padding: 12px !important;
  background: #f9fafb !important;
  color: #111827 !important;
  font-weight: 900 !important;
}

.tb-sticky-buy {
  position: fixed !important;
  left: 50% !important;
  bottom: 0 !important;
  z-index: 70 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 750px !important;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
  background: rgba(17, 24, 39, .96) !important;
  color: #fff !important;
  box-shadow: 0 -16px 36px rgba(15, 23, 42, .22) !important;
}

.tb-sticky-buy span {
  display: block !important;
  color: rgba(255, 255, 255, .72) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.tb-sticky-buy strong {
  display: block !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 950 !important;
}

.tb-sticky-buy button {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 13px 24px !important;
  background: #dc2626 !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.tw-hero {
  background: #fff !important;
}

.tw-hero-image-wrap {
  position: relative !important;
  width: 100% !important;
  background: #f8fafc !important;
  overflow: hidden !important;
}

.tw-hero-image {
  width: 100% !important;
  height: auto !important;
  min-height: min(70vh, 760px) !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  object-position: center !important;
}

.tw-hero-ribbon {
  position: absolute !important;
  left: 16px !important;
  top: 16px !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: rgba(220, 38, 38, .94) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  box-shadow: 0 10px 24px rgba(127, 29, 29, .22) !important;
}

.tw-hero-copy {
  padding: 22px 18px 28px !important;
}

.tw-badge,
.tw-kicker {
  display: inline-flex !important;
  align-items: center !important;
  width: max-content !important;
  max-width: 100% !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: #fee2e2 !important;
  color: #b91c1c !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
}

.tw-hero h1 {
  margin: 14px 0 8px !important;
  font-size: clamp(32px, 8.8vw, 54px) !important;
  line-height: 1.06 !important;
  letter-spacing: -.045em !important;
  color: #0f172a !important;
}

.tw-hero p {
  margin: 0 !important;
  color: #334155 !important;
  font-size: 17px !important;
  line-height: 1.65 !important;
}

.tw-hero-price {
  display: grid !important;
  gap: 4px !important;
  margin: 18px 0 !important;
  padding: 16px !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg, #fff7ed, #fee2e2) !important;
  border: 1px solid #fed7aa !important;
}

.tw-hero-price span {
  color: #64748b !important;
  font-weight: 800 !important;
}

.tw-hero-price strong {
  color: #dc2626 !important;
  font-size: clamp(30px, 8vw, 46px) !important;
  line-height: 1 !important;
}

.tw-hero-price em {
  width: max-content !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: #dc2626 !important;
  color: #fff !important;
  font-style: normal !important;
  font-weight: 950 !important;
}

.tw-mini-packages {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}

.tw-mini-packages button {
  min-height: 74px !important;
  padding: 10px 8px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  text-align: left !important;
}

.tw-mini-packages button.active {
  border-color: #f97316 !important;
  background: #fff7ed !important;
}

.tw-mini-packages b {
  display: block !important;
  margin-top: 4px !important;
  color: #dc2626 !important;
  font-size: 18px !important;
}

.tw-primary-cta,
.tw-sticky-buy button,
.tw-cod .landing-order-form button {
  width: 100% !important;
  min-height: 54px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .28) !important;
}

.tw-section {
  padding: 30px 18px !important;
  border-top: 10px solid #f3f4f6 !important;
  background: #fff !important;
}

.tw-section h2 {
  margin: 10px 0 16px !important;
  color: #0f172a !important;
  font-size: clamp(25px, 7vw, 38px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.035em !important;
}

.tw-pain > div,
.tw-solution > div,
.tw-benefits > div,
.tw-cod-cards,
.tw-faq > div,
.tw-specs {
  display: grid !important;
  gap: 12px !important;
}

.tw-pain article,
.tw-solution article,
.tw-benefits article,
.tw-cod-cards article,
.tw-faq article,
.tw-specs article {
  padding: 16px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
}

.tw-pain article {
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  gap: 12px !important;
}

.tw-pain b,
.tw-benefits i {
  display: grid !important;
  place-items: center !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 14px !important;
  background: #fee2e2 !important;
  color: #dc2626 !important;
  font-style: normal !important;
  font-weight: 950 !important;
}

.tw-benefits article {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 18px !important;
}

.tw-gallery > div,
.tw-detail-images,
.tw-package-visuals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.tw-gallery figure,
.tw-detail-images figure {
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  border: 1px solid #e5e7eb !important;
  background: #f8fafc !important;
}

.tw-gallery img,
.tw-detail-images img,
.tw-usage img,
.tw-package-visuals img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  object-position: center !important;
}

.tw-gallery figcaption,
.tw-detail-images figcaption {
  padding: 9px 10px !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.tw-usage-grid {
  display: grid !important;
  gap: 12px !important;
}

.tw-usage article {
  overflow: hidden !important;
  border-radius: 22px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
}

.tw-usage article strong,
.tw-usage article p {
  display: block !important;
  margin: 0 !important;
  padding: 0 14px 14px !important;
}

.tw-usage article strong {
  padding-top: 14px !important;
  font-size: 19px !important;
}

.tw-usage article p {
  color: #475569 !important;
}

.tw-detail-images {
  margin-bottom: 14px !important;
}

.tw-package-visuals {
  margin-bottom: 12px !important;
}

.tw-package-list {
  display: grid !important;
  gap: 12px !important;
}

.tw-package-card {
  position: relative !important;
  display: grid !important;
  gap: 7px !important;
  padding: 18px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 24px !important;
  background: #fff !important;
  color: #0f172a !important;
  text-align: left !important;
  cursor: pointer !important;
}

.tw-package-card.active,
.tw-package-card.recommended {
  border-color: #f97316 !important;
  background: #fff7ed !important;
  box-shadow: 0 16px 34px rgba(249, 115, 22, .16) !important;
}

.tw-package-card span {
  width: max-content !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  background: #fed7aa !important;
  color: #9a3412 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

.tw-package-card strong {
  font-size: 20px !important;
}

.tw-package-price {
  display: flex !important;
  align-items: baseline !important;
  gap: 10px !important;
}

.tw-package-price b {
  color: #dc2626 !important;
  font-size: 34px !important;
  line-height: 1 !important;
}

.tw-package-card small,
.tw-package-card em {
  color: #475569 !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

.tw-trust {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.tw-trust span {
  padding: 12px !important;
  border-radius: 16px !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  font-weight: 950 !important;
}

.tw-cod .landing-order-form {
  margin-top: 16px !important;
  display: grid !important;
  gap: 12px !important;
}

.tw-cod .landing-order-form label,
.tw-cod .landing-order-form .field {
  display: grid !important;
  gap: 6px !important;
}

.tw-cod .landing-order-form input,
.tw-cod .landing-order-form select,
.tw-cod .landing-order-form textarea {
  width: 100% !important;
  min-height: 46px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  font-size: 16px !important;
}

.tw-sticky-buy {
  position: fixed !important;
  left: 50% !important;
  bottom: 12px !important;
  transform: translateX(-50%) !important;
  z-index: 90 !important;
  width: min(calc(100% - 20px), 720px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 24px !important;
  background: rgba(15, 23, 42, .94) !important;
  color: #fff !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .28) !important;
}

.tw-sticky-buy div {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.tw-sticky-buy span {
  color: #cbd5e1 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.tw-sticky-buy strong {
  color: #fff !important;
  font-size: 22px !important;
}

.tw-sticky-buy button {
  width: auto !important;
  min-width: 132px !important;
  padding: 0 20px !important;
  box-shadow: none !important;
}

@media (min-width: 760px) {
  .tw-cod-landing {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .tw-hero-copy,
  .tw-section {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }

  .tw-usage-grid,
  .tw-pain > div,
  .tw-solution > div,
  .tw-benefits > div,
  .tw-cod-cards,
  .tw-faq > div,
  .tw-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  body.public-landing-mode {
    background: #fff !important;
  }

  .tw-cod-landing {
    max-width: none !important;
    box-shadow: none !important;
  }

  .tw-hero-image {
    min-height: 66vh !important;
  }

  .tw-mini-packages {
    grid-template-columns: 1fr !important;
  }

  .tw-gallery > div,
  .tw-detail-images,
  .tw-trust,
  .tw-package-visuals {
    grid-template-columns: 1fr !important;
  }
}

/* Stage 31: hot-reference comparison inside old Yugo backend. */
.reference-analysis-grid,
.reference-compare-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reference-analysis-grid article,
.reference-compare-columns article,
.reference-hero-card {
  border: 1px solid #dbe3ef;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
}

.reference-analysis-grid article strong,
.reference-compare-columns article h3,
.reference-compare-columns article h4,
.reference-hero-card strong {
  color: #0f172a;
}

.reference-analysis-grid article p,
.reference-hero-card span,
.reference-hero-card small {
  display: block;
  margin-top: 6px;
  color: #475569;
  line-height: 1.6;
}

.reference-compare-columns.compact {
  margin-top: 8px;
}

.reference-compare-columns dl {
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 12px;
}

.reference-compare-columns dt {
  color: #64748b;
}

.reference-compare-columns dd {
  margin: 0;
  color: #1e293b;
  min-width: 0;
  word-break: break-word;
}

.hot-reference-page-analysis .candidate-detail-summary {
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
}

.reference-hero-card {
  min-height: 150px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

@media (max-width: 900px) {
  .reference-analysis-grid,
  .reference-compare-columns,
  .hot-reference-page-analysis .candidate-detail-summary {
    grid-template-columns: 1fr;
  }
}

/* Stage 32: real customer COD landing page, separated from backend product detail. */
body.public-landing-mode {
  background: #f1f5f9;
}

.customer-cod-landing {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 0 96px;
  background: #fff;
  color: #0f172a;
  min-height: 100vh;
  box-shadow: 0 20px 70px rgba(15, 23, 42, .12);
}

.customer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.customer-hero-media {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
}

.customer-hero-img,
.customer-hero-placeholder {
  display: block;
  width: 100%;
  height: auto;
  min-height: min(74vh, 760px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
}

.customer-hero-placeholder {
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  background: linear-gradient(135deg, #dcfce7, #dbeafe);
}

.customer-hero-placeholder strong {
  font-size: 34px;
}

.customer-hero-price {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 12px 16px;
  border-radius: 18px;
  color: #fff;
  background: rgba(15, 23, 42, .86);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 2px;
}

.customer-hero-price span,
.customer-badge,
.customer-section header span {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.customer-hero-price strong {
  font-size: 30px;
}

.customer-hero-copy {
  padding: 22px 18px 26px;
}

.customer-badge {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.customer-hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(30px, 8vw, 48px);
  line-height: 1.05;
}

.customer-hero p {
  color: #475569;
  font-size: 16px;
  line-height: 1.7;
}

.customer-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.customer-hero-points em {
  padding: 8px 11px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-style: normal;
  font-weight: 700;
}

.customer-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.customer-price-row strong {
  font-size: 34px;
  color: #dc2626;
}

.customer-price-row del {
  color: #94a3b8;
}

.customer-price-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
}

.customer-primary-cta,
.customer-sticky-buy button,
.customer-cod .landing-order-form button {
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .28);
}

.customer-primary-cta {
  width: 100%;
  padding: 16px 20px;
  font-size: 18px;
}

.customer-section {
  padding: 26px 18px;
  border-top: 10px solid #f1f5f9;
}

.customer-section header {
  margin-bottom: 16px;
}

.customer-section header span {
  color: #2563eb;
  font-weight: 900;
}

.customer-section h2 {
  margin: 6px 0 0;
  font-size: 26px;
}

.customer-pain > div,
.customer-solution > div,
.customer-usage > div,
.customer-cod > div,
.customer-detail-grid {
  display: grid;
  gap: 12px;
}

.customer-pain article,
.customer-solution article,
.customer-usage article,
.customer-cod article,
.customer-detail-grid article {
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.customer-pain article {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
}

.customer-pain b,
.customer-solution strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fee2e2;
  color: #dc2626;
}

.customer-solution strong {
  background: #dbeafe;
  color: #2563eb;
}

.customer-usage > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-usage article {
  min-height: 92px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  font-size: 18px;
  font-weight: 900;
}

.customer-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}

.customer-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #f8fafc;
}

.customer-gallery img,
.customer-long-images img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.customer-gallery figcaption {
  padding: 8px;
  font-size: 12px;
  color: #475569;
}

.customer-long-images {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.customer-long-images article {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.customer-long-images article div {
  padding: 14px 16px 16px;
}

.customer-long-images strong {
  font-size: 18px;
}

.customer-long-images p {
  color: #475569;
  line-height: 1.6;
}

.customer-empty-image {
  padding: 20px;
  border-radius: 18px;
  background: #fffbeb;
  color: #92400e;
}

.customer-package-list {
  display: grid;
  gap: 12px;
}

.customer-package-card {
  text-align: left;
  border: 2px solid #e2e8f0;
  border-radius: 22px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 6px;
  position: relative;
}

.customer-package-card.active,
.customer-package-card.recommended {
  border-color: #f97316;
  background: #fff7ed;
  box-shadow: 0 14px 32px rgba(249, 115, 22, .16);
}

.customer-package-card span {
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fed7aa;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}

.customer-package-card strong {
  font-size: 19px;
}

.customer-package-card b {
  font-size: 30px;
  color: #dc2626;
}

.customer-package-card small,
.customer-package-card em,
.customer-section p {
  color: #475569;
  line-height: 1.6;
  font-style: normal;
}

.customer-cod .landing-order-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.customer-cod .checkout-card {
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.customer-sticky-buy {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 720px);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 22px;
  background: rgba(15, 23, 42, .94);
  color: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .28);
  z-index: 30;
}

.customer-sticky-buy div {
  display: grid;
  gap: 2px;
}

.customer-sticky-buy span {
  font-size: 12px;
  color: #cbd5e1;
}

.customer-sticky-buy strong {
  font-size: 22px;
}

.customer-sticky-buy button {
  padding: 13px 22px;
  white-space: nowrap;
}

@media (min-width: 820px) {
  .customer-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
    align-items: stretch;
  }

  .customer-hero-copy {
    align-self: center;
    padding: 34px;
  }

  .customer-pain > div,
  .customer-solution > div,
  .customer-cod > div,
  .customer-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .customer-cod-landing {
    width: 100%;
    box-shadow: none;
  }

  .customer-hero-img,
  .customer-hero-placeholder {
    min-height: 70vh;
  }

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

/* Training knowledge base */
.hidden-file {
  display: none;
}

.training-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.training-hero > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
}

.training-hero h2 {
  margin: 8px 0;
  font-size: 20px;
  color: #101828;
}

.training-hero p {
  margin: 0;
  color: #667085;
  line-height: 1.6;
}

.training-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.training-kpis span {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 72px;
  border: 1px solid #e6edf7;
  background: #f8fbff;
  padding: 12px;
  color: #667085;
}

.training-kpis b {
  font-size: 24px;
  color: var(--blue);
}

.training-grid,
.training-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: start;
}

.panel-head.inline {
  height: auto;
  min-height: 42px;
  padding: 10px 12px;
}

.training-card-list {
  display: grid;
  gap: 10px;
}

.training-sop-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e4e7ec;
  background: #fff;
  padding: 12px;
}

.training-sop-card.compact {
  grid-template-columns: minmax(0, 1fr) 72px;
}

.training-sop-card h3,
.training-sop-card p {
  margin: 6px 0 0;
}

.training-sop-card p {
  color: #667085;
  line-height: 1.55;
}

.training-fast-links {
  display: grid;
  gap: 8px;
}

.training-fast-links .btn {
  justify-content: flex-start;
}

.training-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.training-category-card {
  display: grid;
  gap: 6px;
  text-align: left;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 4px;
  padding: 12px;
  color: #101828;
}

.training-category-card span {
  color: #667085;
  font-size: 12px;
}

.training-sop-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.training-sop-list {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 12px;
}

.training-sop-list button {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid #e4e7ec;
  background: #fff;
  border-radius: 4px;
  padding: 10px;
  color: #344054;
}

.training-sop-list button.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.training-sop-list span,
.training-sop-list small {
  color: #667085;
}

.training-sop-meta,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.training-sop-meta div,
.detail-grid div {
  border: 1px solid #edf0f5;
  background: #fbfcfe;
  padding: 10px;
}

.training-sop-meta span,
.detail-grid span {
  display: block;
  color: #667085;
  font-size: 12px;
  margin-bottom: 4px;
}

.training-step-list {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.training-step-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #e4e7ec;
  background: #fff;
  padding: 12px;
}

.step-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 700;
}

.step-body header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #344054;
}

.step-body p {
  margin: 8px 0;
  color: #475467;
  line-height: 1.55;
}

.step-fields,
.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.step-fields span,
.tag-row span {
  background: #f2f4f7;
  color: #344054;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
}

.step-warning {
  margin-top: 8px;
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
  padding: 8px;
}

.training-record-list,
.training-search-results {
  display: grid;
  gap: 10px;
}

.training-record-list article,
.training-search-results article {
  border: 1px solid #e4e7ec;
  background: #fff;
  padding: 12px;
}

.training-search-results h3 {
  margin: 8px 0 6px;
}

.training-search-results p {
  color: #475467;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .training-hero,
  .training-grid,
  .training-review-layout,
  .training-sop-layout {
    grid-template-columns: 1fr;
  }

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

  .training-sop-list {
    position: static;
  }
}

/* Final Stage 29 template picker workspace overrides. */
.template-picker-workflow {
  display: grid !important;
  grid-template-columns: 260px minmax(420px, 1fr) minmax(420px, 480px) !important;
  gap: 16px !important;
  min-height: 680px !important;
  height: calc(100vh - 150px) !important;
  align-items: stretch !important;
}

.template-picker-workflow .template-picker-sidebar,
.template-picker-workflow .template-picker-main,
.template-picker-workflow .template-picker-preview-panel {
  min-height: 0 !important;
  overflow: auto !important;
}

.template-picker-workflow .template-picker-sidebar,
.template-picker-workflow .template-picker-preview-panel {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 14px !important;
}

.template-picker-workflow .template-filter-tabs,
.template-picker-workflow .template-sort-controls {
  display: grid !important;
  gap: 12px !important;
}

.template-picker-workflow .template-filter-tabs > div,
.template-picker-workflow .template-sort-controls {
  display: grid !important;
  gap: 8px !important;
}

.template-picker-workflow .template-picker-main .template-picker-grid {
  grid-template-columns: 1fr !important;
}

.template-picker-workflow .template-picker-preview-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 14px !important;
}

.template-picker-workflow .template-picker-preview-panel .template-info-panel {
  position: static !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 0 0 12px !important;
  max-height: 190px !important;
  overflow: auto !important;
}

.template-picker-live-preview {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 10px !important;
}

.template-picker-preview-head {
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
}

.template-picker-preview-head strong {
  color: var(--text) !important;
  font-size: 14px !important;
}

.template-picker-live-preview .template-preview-device-area {
  height: 100% !important;
  min-height: 0 !important;
  padding: 12px !important;
  border-radius: 18px !important;
  background: #eef2f7 !important;
}

.template-picker-live-preview .mobile-preview-device.mobile-preview-frame,
.template-picker-live-preview .mobile-preview-frame {
  width: min(390px, 100%) !important;
  min-width: min(360px, 100%) !important;
  height: min(812px, calc(100vh - 390px)) !important;
  min-height: min(560px, calc(100vh - 390px)) !important;
  max-height: calc(100vh - 390px) !important;
}

.template-picker-live-preview .mobile-preview-content {
  height: 100% !important;
  overflow-y: auto !important;
}

/* Company-backend workflow refactor: dense buyer operations layout. */
.page-head {
  align-items: flex-start;
  gap: 12px;
}

.page-title .crumb {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.page-title h1 {
  font-size: 20px;
  line-height: 1.25;
}

.filters.compact {
  grid-template-columns: repeat(7, minmax(120px, 1fr)) auto auto;
  align-items: end;
  padding: 12px;
}

.filters.compact .field {
  gap: 5px;
}

.filters.compact input,
.filters.compact select {
  min-height: 32px;
  border-radius: 4px;
  font-size: 13px;
}

.toolbar,
.page-actions {
  gap: 8px;
}

.table-scroll {
  border-radius: 4px;
  box-shadow: none;
}

.table-scroll table {
  font-size: 13px;
}

.table-scroll th {
  background: #f6f8fb;
  color: #475569;
  font-weight: 700;
  height: 38px;
}

.table-scroll td {
  height: 48px;
  vertical-align: middle;
}

.roi-tabs {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.roi-tabs button {
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
}

.roi-tabs button.active {
  color: var(--blue);
  background: transparent;
  border-bottom-color: var(--blue);
}

.roi-summary-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.roi-summary-row.compact {
  grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.roi-summary-row article {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.roi-summary-row span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.roi-summary-row strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 17px;
}

.roi-product-id {
  font-weight: 700;
}

.ad-roi-table {
  min-width: 1320px;
}

.ad-roi-product-table {
  min-width: 1880px;
}

.ad-roi-table th,
.ad-roi-table td {
  height: 44px;
  font-size: 12px;
}

.ad-roi-table .tag {
  max-width: 210px;
  white-space: normal;
  text-align: left;
  line-height: 1.35;
}

.roi-total-row td {
  color: #b42318;
  font-weight: 750;
  background: #f8fafc;
  border-top: 1px solid var(--line-dark);
}

.roi-total-row td:first-child {
  color: #dc2626;
}

.sign-delivery-filters {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.sign-delivery-date-range > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.sign-delivery-table {
  min-width: 1880px;
}

.sign-delivery-table th,
.sign-delivery-table td {
  height: 44px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.sign-delivery-table td:nth-child(5),
.sign-delivery-table th:nth-child(5) {
  min-width: 220px;
  white-space: normal;
}

.sign-delivery-total-row td {
  color: #b42318;
  font-weight: 750;
  background: #f8fafc;
  border-top: 1px solid var(--line-dark);
}

.sign-delivery-total-row td:first-child,
.sign-delivery-table .risk-rate {
  color: #dc2626;
}

.sign-delivery-pagination {
  justify-content: flex-end;
}

.sign-delivery-pagination select {
  width: auto;
  min-width: 96px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.company-empty-panel {
  margin-top: 10px;
}

.company-product-info {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: start;
}

.company-product-info .cover {
  width: 72px;
  height: 72px;
  border-radius: 4px;
}

.company-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px 14px;
  margin-top: 10px;
}

.company-info-grid span,
.company-product-kpis article,
.quality-metric-grid article {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 4px;
  padding: 8px 10px;
  color: #64748b;
  font-size: 12px;
}

.company-info-grid strong,
.company-product-kpis strong,
.quality-metric-grid strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 15px;
}

.company-product-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.company-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.company-analysis-block {
  border-radius: 4px;
  box-shadow: none;
}

.funnel-list {
  display: grid;
  gap: 8px;
}

.funnel-list article {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.funnel-list article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: rgba(18, 99, 241, .08);
}

.funnel-list strong,
.funnel-list b,
.funnel-list span {
  position: relative;
}

.funnel-list span {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 12px;
}

.quality-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.company-bar-chart {
  display: grid;
  grid-template-columns: repeat(24, minmax(18px, 1fr));
  align-items: end;
  gap: 4px;
  height: 170px;
  padding: 10px 8px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  margin-bottom: 10px;
}

.company-bar-chart span {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  height: 100%;
}

.company-bar-chart b {
  display: block;
  width: 100%;
  min-height: 4px;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #1263f1, #70a5ff);
}

.company-bar-chart em {
  position: absolute;
  bottom: -19px;
  color: #64748b;
  font-style: normal;
  font-size: 10px;
}

.hourly-analysis {
  margin-top: 12px;
}

@media (max-width: 1280px) {
  .filters.compact {
    grid-template-columns: repeat(4, minmax(120px, 1fr)) auto auto;
  }
  .roi-summary-row,
  .roi-summary-row.compact {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }
  .company-product-info,
  .company-analysis-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1360px) {
  .template-picker-workflow {
    grid-template-columns: 230px minmax(360px, 1fr) 420px !important;
  }

  .template-picker-workflow .template-picker-card {
    grid-template-columns: 120px 1fr !important;
  }
}

@media (max-width: 1100px) {
  .template-picker-workflow {
    height: auto !important;
    grid-template-columns: 1fr !important;
  }

  .template-picker-workflow .template-picker-preview-panel {
    grid-template-rows: auto !important;
  }

  .template-picker-live-preview .mobile-preview-device.mobile-preview-frame,
  .template-picker-live-preview .mobile-preview-frame {
    height: 760px !important;
    max-height: 85vh !important;
  }
}

/* Stage 30 UI frame reset: company-admin-like dense operation console. */
body {
  background: #eef1f5 !important;
  color: #1f2937 !important;
  font-size: 13px !important;
}

.admin-shell {
  min-height: 100vh !important;
  display: grid !important;
  grid-template-columns: 128px 174px minmax(0, 1fr) !important;
  background: #eef1f5 !important;
}

.left-nav {
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  background: #1f2937 !important;
  border-right: 0 !important;
  color: #d9e1ec !important;
}

.logo-block {
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .1) !important;
}

.logo-mark {
  width: 18px !important;
  height: 18px !important;
  border-radius: 3px !important;
  background: #2563eb !important;
  box-shadow: none !important;
}

.logo-mark::before {
  content: "" !important;
}

.side-nav {
  display: block !important;
  padding: 6px 0 !important;
}

.side-button {
  height: 34px !important;
  width: 100% !important;
  justify-content: flex-start !important;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #d9e1ec !important;
  padding: 0 13px !important;
  font-size: 13px !important;
  line-height: 34px !important;
}

.side-button:hover,
.side-button.active {
  background: #111827 !important;
  color: #fff !important;
  border-left-color: #409eff !important;
}

.module-menu {
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  background: #fff !important;
  border-right: 1px solid #d9dee8 !important;
}

.module-menu-title {
  height: 50px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  border-bottom: 1px solid #e5e9f0 !important;
}

.module-menu-scroll {
  height: calc(100vh - 50px) !important;
  padding: 8px 8px 16px !important;
}

.module-menu-group {
  margin-bottom: 12px !important;
}

.module-menu-group h3 {
  margin: 8px 7px 6px !important;
  color: #8a94a6 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.module-menu-group button {
  min-height: 32px !important;
  height: 32px !important;
  border-radius: 3px !important;
  color: #344054 !important;
  padding: 0 9px !important;
  font-size: 13px !important;
}

.module-menu-group button:hover,
.module-menu-group button.active {
  background: #eaf2ff !important;
  color: #1263f1 !important;
  font-weight: 600 !important;
}

/* Desktop navigation width contract. Keep both rails stable when the content
   grid is under pressure; labels may truncate, but must never wrap vertically. */
@media (min-width: 900px) {
  .admin-shell {
    grid-template-columns: 128px 174px minmax(0, 1fr) !important;
  }

  .left-nav {
    width: 128px !important;
    min-width: 128px !important;
  }

  .module-menu {
    width: 174px !important;
    min-width: 174px !important;
    max-width: 174px !important;
  }

  .admin-shell.module-menu-collapsed {
    grid-template-columns: 128px 44px minmax(0, 1fr) !important;
  }

  .admin-shell.module-menu-collapsed .module-menu {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
  }

  .admin-shell.module-menu-collapsed .module-menu-title {
    justify-content: center !important;
    padding: 0 !important;
  }

  .admin-shell.module-menu-collapsed .module-menu-title-label,
  .admin-shell.module-menu-collapsed .module-menu-scroll {
    display: none !important;
  }

  .side-button,
  .module-menu-group button {
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  .side-button > span,
  .module-menu-title,
  .module-menu-group h3,
  .module-menu-group button {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  body.dashboard-route .admin-shell {
    grid-template-columns: 96px minmax(0, 1fr) !important;
  }

  body.dashboard-route .left-nav {
    width: 96px !important;
    min-width: 96px !important;
  }
}

.module-menu-title {
  justify-content: space-between !important;
  gap: 6px !important;
}

.module-menu-title-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-menu-toggle {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #e1e6ee;
  border-radius: 3px;
  background: #fff;
  color: #667085;
  font: inherit;
  line-height: 24px;
}

.module-menu-toggle:hover,
.module-menu-toggle:focus-visible {
  border-color: #9ec1ff;
  color: #1263f1;
  outline: 2px solid rgba(18, 99, 241, .16);
  outline-offset: 1px;
}

/* The campaign summary contains compact, dashboard-only tables. The global
   1120px table minimum is for operational data grids and must not make this
   two-column summary widen the document. */
body.campaign-dashboard-route .main-shell,
body.campaign-dashboard-route .content-area,
body.campaign-dashboard-route .dashboard-layout,
body.campaign-dashboard-route .dashboard-layout > *,
body.campaign-dashboard-route .mini-grid,
body.campaign-dashboard-route .panel {
  min-width: 0 !important;
}

body.campaign-dashboard-route .package-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body.campaign-dashboard-route .package-table th,
body.campaign-dashboard-route .package-table td {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 899px) {
  html,
  body,
  body.dashboard-route {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .admin-shell,
  body.dashboard-route .admin-shell {
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
  }

  .left-nav,
  .module-menu,
  body.dashboard-route .left-nav,
  body.dashboard-route .module-menu {
    display: none !important;
  }

  .main-shell,
  body.dashboard-route .main-shell {
    width: 100% !important;
    min-width: 0 !important;
  }

  .system-top,
  body.dashboard-route .system-top {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .system-tools {
    display: none !important;
  }

  .content-area,
  body.dashboard-route .content-area {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }
}

.main-shell {
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: 36px minmax(0, 1fr) !important;
}

.system-top {
  height: 36px !important;
  background: #fff !important;
  border-bottom: 1px solid #d9dee8 !important;
  box-shadow: none !important;
}

.tab-strip {
  align-items: stretch !important;
}

.top-context {
  width: 184px !important;
  min-width: 184px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 12px !important;
  border-right: 1px solid #d9dee8 !important;
  background: #fff !important;
  color: #1f2937 !important;
  overflow: hidden !important;
}

.top-context strong {
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.top-context span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #8a94a6 !important;
  font-size: 12px !important;
}

.top-open-tabs {
  min-width: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.page-tab {
  min-width: 96px !important;
  height: 36px !important;
  justify-content: center !important;
  border-right: 1px solid #e5e9f0 !important;
  background: #f8fafc !important;
  color: #344054 !important;
  padding: 0 12px !important;
  font-size: 13px !important;
}

.page-tab.active {
  background: #fff !important;
  color: #1263f1 !important;
  box-shadow: inset 0 -2px 0 #1263f1 !important;
}

.system-tools {
  height: 36px !important;
}

.tool-icon {
  height: 36px !important;
  min-width: 38px !important;
  border-color: #e5e9f0 !important;
  font-size: 12px !important;
}

.account-chip {
  height: 36px !important;
}

.content-area {
  padding: 10px 12px 60px !important;
  background: #eef1f5 !important;
}

.page-head {
  height: 42px !important;
  margin: 0 0 8px !important;
  padding: 0 12px !important;
  background: #fff !important;
  border: 1px solid #dfe5ee !important;
  border-radius: 2px !important;
}

.page-title {
  gap: 6px !important;
}

.crumb {
  color: #8a94a6 !important;
  font-size: 12px !important;
}

h1 {
  font-size: 16px !important;
  font-weight: 700 !important;
}

h2 {
  font-size: 14px !important;
}

.page-actions {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
}

.filters {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(142px, 1fr)) auto auto !important;
  gap: 8px !important;
  align-items: end !important;
  padding: 10px 12px !important;
  margin: 0 0 8px !important;
  border: 1px solid #dfe5ee !important;
  border-radius: 2px !important;
  background: #fff !important;
}

.filters.compact {
  grid-template-columns: repeat(6, minmax(132px, 1fr)) auto auto !important;
}

.field {
  gap: 4px !important;
  font-size: 12px !important;
  color: #5b6472 !important;
}

input,
select,
textarea {
  min-height: 30px !important;
  height: 30px !important;
  border-radius: 2px !important;
  border-color: #cfd6e2 !important;
  font-size: 13px !important;
}

textarea {
  height: auto !important;
  min-height: 72px !important;
}

.btn,
.toolbar button,
.actions button,
.link-button {
  min-height: 30px !important;
  height: 30px !important;
  border-radius: 2px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
}

.toolbar {
  min-height: 38px !important;
  margin: 0 0 8px !important;
  padding: 6px 8px !important;
  background: #fff !important;
  border: 1px solid #dfe5ee !important;
  border-radius: 2px !important;
}

.tabs {
  height: 36px !important;
  gap: 20px !important;
  margin: 0 0 8px !important;
  padding: 0 12px !important;
  border: 1px solid #dfe5ee !important;
  border-radius: 2px !important;
}

.tabs button {
  height: 36px !important;
  font-size: 13px !important;
}

.panel {
  border-radius: 2px !important;
  border-color: #dfe5ee !important;
  box-shadow: none !important;
}

.panel-head {
  height: 38px !important;
  padding: 0 10px !important;
}

.table-scroll {
  border-radius: 2px !important;
  border-color: #dfe5ee !important;
}

table {
  min-width: 1120px !important;
  font-size: 12.5px !important;
}

th,
td {
  height: 38px !important;
  padding: 6px 9px !important;
}

th {
  height: 34px !important;
  background: #f3f6fa !important;
  color: #344054 !important;
  font-weight: 600 !important;
}

td {
  background: #fff !important;
}

tr:hover td {
  background: #f8fbff !important;
}

.metric-row,
.workflow-stats {
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.metric,
.workflow-stats article {
  min-height: 76px !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}

.editor-overview {
  margin-bottom: 8px !important;
  border-radius: 2px !important;
}

.editor-tabs {
  border-radius: 2px !important;
}

/* Template picker workflow: buyer-facing selection, not admin rating management. */
.template-picker-workflow {
  display: grid;
  grid-template-columns: 260px minmax(420px, 1fr) minmax(420px, 480px);
  gap: 16px;
  min-height: 680px;
  height: calc(100vh - 150px);
  align-items: stretch;
}

.template-picker-sidebar,
.template-picker-main,
.template-picker-preview-panel {
  min-height: 0;
  overflow: auto;
}

.template-picker-sidebar,
.template-picker-preview-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.template-picker-sidebar h3 {
  margin: 0 0 12px;
}

.template-picker-workflow .template-filter-tabs,
.template-picker-workflow .template-sort-controls {
  display: grid;
  gap: 12px;
}

.template-picker-workflow .template-filter-tabs > div,
.template-picker-workflow .template-sort-controls {
  display: grid;
  gap: 8px;
}

.template-picker-workflow .template-filter-tabs span,
.template-picker-workflow .template-sort-controls > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.template-picker-workflow .template-filter-tabs button,
.template-picker-workflow .template-sort-controls button {
  justify-self: start;
}

.template-picker-workflow .template-picker-main .template-picker-grid {
  grid-template-columns: 1fr;
}

.template-picker-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.template-picker-preview-panel .template-info-panel {
  position: static;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0 0 12px;
  max-height: 190px;
  overflow: auto;
}

.template-picker-live-preview {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.template-picker-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.template-picker-preview-head strong {
  color: var(--text);
  font-size: 14px;
}

.template-picker-live-preview .template-preview-device-area {
  height: 100% !important;
  min-height: 0 !important;
  padding: 12px !important;
  border-radius: 18px;
  background: #eef2f7;
}

.template-picker-live-preview .mobile-preview-device.mobile-preview-frame,
.template-picker-live-preview .mobile-preview-frame {
  width: min(390px, 100%) !important;
  min-width: min(360px, 100%) !important;
  height: min(812px, calc(100vh - 390px)) !important;
  min-height: min(560px, calc(100vh - 390px)) !important;
  max-height: calc(100vh - 390px) !important;
}

.template-picker-live-preview .mobile-preview-content {
  height: 100%;
  overflow-y: auto;
}

@media (max-width: 1360px) {
  .template-picker-workflow {
    grid-template-columns: 230px minmax(360px, 1fr) 420px;
  }

  .template-picker-card {
    grid-template-columns: 120px 1fr;
  }
}

@media (max-width: 1100px) {
  .template-picker-workflow {
    height: auto;
    grid-template-columns: 1fr;
  }

  .template-picker-preview-panel {
    grid-template-rows: auto;
  }

  .template-picker-live-preview .mobile-preview-device.mobile-preview-frame,
  .template-picker-live-preview .mobile-preview-frame {
    height: 760px !important;
    max-height: 85vh !important;
  }
}

/* Stage 30 COD conversion templates: real Taiwan mobile selling pages, not demo cards. */
.cod-mobile-screen {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: #f7f3ec;
  padding-bottom: 118px !important;
}

.cod-hero {
  min-height: 620px;
  grid-template-rows: minmax(410px, 70%) auto;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
}

.cod-hero-media {
  padding: 10px 10px 4px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.72), transparent 32%),
    linear-gradient(145deg, rgba(248,250,252,.82), rgba(226,232,240,.58));
}

.cod-hero-media::before {
  inset: 18px;
  border-radius: 34px;
  background: rgba(255,255,255,.34);
}

.cod-hero-media .landing-visual,
.cod-hero-media .landing-css-placeholder {
  width: 96%;
  height: 94%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 30px;
}

.cod-product-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255,255,255,.92), rgba(226,232,240,.68)),
    radial-gradient(circle at 50% 18%, rgba(37,99,235,.14), transparent 34%);
  color: #111827;
}

.cod-product-placeholder span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 950;
  font-size: 24px;
}

.cod-product-placeholder strong {
  max-width: 78%;
  font-size: 24px;
  line-height: 1.18;
}

.cod-product-placeholder small {
  color: #64748b;
  font-weight: 800;
}

.cod-hero-copy {
  padding: 14px 16px 18px;
}

.cod-hero-type {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-weight: 800;
}

.cod-hero h1 {
  margin: 9px 0 6px;
  font-size: 28px;
}

.cod-hero p {
  font-size: 14px;
}

.cod-price {
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 4px 8px;
  margin: 10px 0;
  padding: 11px 12px;
}

.cod-price span {
  grid-column: 1 / -1;
}

.cod-price strong {
  font-size: 36px;
}

.cod-price small {
  grid-column: 1 / -1;
}

.cod-main-cta,
.cod-promotion button,
.cod-floating-buy button,
.cod-mobile-screen .landing-order-form button {
  min-height: 54px;
  font-size: 16px;
}

.cod-section {
  margin: 10px 10px 0;
  padding: 15px;
  border-radius: 18px;
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, .07);
}

.cod-section h2 {
  font-size: 20px;
}

.cod-sales-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px;
}

.cod-sales-proof article {
  min-height: 76px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
}

.cod-sales-proof strong {
  display: block;
  color: #dc2626;
  font-size: 15px;
}

.cod-sales-proof span {
  display: block;
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.cod-trust-proof > div {
  display: grid;
  gap: 10px;
}

.cod-trust-proof article {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.cod-trust-proof strong {
  display: block;
  color: #111827;
  margin-bottom: 5px;
}

.cod-trust-proof p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.cod-product-detail {
  overflow: hidden;
}

.cod-detail-media {
  margin: -15px -15px 12px;
  height: 250px;
  background: #f1f5f9;
  overflow: hidden;
}

.cod-detail-media img,
.cod-detail-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cod-detail-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  color: #1d4ed8;
  font-size: 52px;
  font-weight: 950;
}

.cod-detail-copy {
  color: #334155;
  line-height: 1.7;
}

.cod-detail-copy ul {
  padding-left: 18px;
}

.cod-review-list {
  grid-template-columns: 1fr;
}

.cod-review-list article {
  position: relative;
  padding: 13px 13px 13px 15px;
  border: 1px solid rgba(15,23,42,.08);
  background: #fffdf8;
}

.cod-review-list article::before {
  content: "★★★★★";
  display: block;
  color: #f59e0b;
  font-size: 13px;
  letter-spacing: 1px;
}

.cod-review-list span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.cod-package-list button {
  min-height: 108px;
  border-radius: 17px;
  background: linear-gradient(180deg, #fff, #fffaf5);
}

.cod-package-list button.active {
  border-color: #dc2626;
  background: #fff1e7;
}

.cod-package-list b {
  font-size: 24px;
}

.cod-sku div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.cod-sku button {
  min-height: 44px;
  text-align: center;
}

.cod-mobile-screen .l-checkout {
  margin: 10px;
}

.cod-mobile-screen .checkout-card {
  border-radius: 16px;
  background: #fff;
}

.cod-floating-buy {
  bottom: 10px;
  left: 10px;
  right: 10px;
  border-radius: 20px;
  padding: 9px 10px;
}

.cod-health .cod-hero-media { background: linear-gradient(145deg, #eef7e9, #dfeecf); }
.cod-beauty .cod-hero-media { background: linear-gradient(145deg, #fff1f5, #ffe4ec); }
.cod-general .cod-hero-media { background: linear-gradient(145deg, #eff6ff, #dbeafe); }
.cod-promo .cod-hero-media { background: linear-gradient(145deg, #fff7ed, #fed7aa); }
.cod-trust .cod-hero-media { background: linear-gradient(145deg, #f8fafc, #dbe4f0); }
.cod-minimal .cod-hero { min-height: 540px; }
.cod-minimal .cod-hero-media { background: #f8fafc; }

/* Taiwan COD conversion templates */
.cod-mobile-device {
  padding: 0;
  background: #111827;
}

.cod-mobile-phone {
  border: 10px solid #111827;
  background: #111827;
}

.cod-status {
  color: #fff;
  background: #111827;
}

.cod-mobile-screen {
  background: #f5f1ea;
  padding: 0 0 112px;
  color: #191919;
  scroll-behavior: smooth;
}

.cod-health .cod-mobile-screen { background: #f3f7ed; }
.cod-beauty .cod-mobile-screen { background: #fff3f5; }
.cod-general .cod-mobile-screen { background: #f5f7fb; }
.cod-promo .cod-mobile-screen { background: #fff7ed; }
.cod-trust .cod-mobile-screen { background: #f6f7fb; }
.cod-minimal .cod-mobile-screen { background: #ffffff; }

.cod-hero {
  min-height: 560px;
  display: grid;
  grid-template-rows: minmax(310px, 58%) auto;
  background: #fff;
}

.cod-hero-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 14px;
}

.cod-hero-media::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(255,255,255,.65), rgba(15,23,42,.06));
}

.cod-hero-media .landing-visual,
.cod-hero-media .landing-css-placeholder {
  position: relative;
  z-index: 1;
  width: 94%;
  max-height: 330px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: 0 22px 56px rgba(15, 23, 42, .16);
}

.cod-hero-copy {
  padding: 16px 18px 20px;
}

.cod-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 11px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.cod-hero h1 {
  margin: 12px 0 8px;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
  color: #111827;
}

.cod-hero p {
  margin: 0;
  color: #4b5563;
  line-height: 1.55;
}

.cod-hero-points {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.cod-hero-points em {
  border-radius: 999px;
  background: rgba(17, 24, 39, .07);
  padding: 6px 9px;
  color: #374151;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.cod-main-cta,
.cod-promotion button,
.cod-floating-buy button,
.cod-checkout button,
.cod-mobile-screen .landing-order-form button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(17,24,39,.24);
}

.cod-main-cta {
  width: 100%;
  margin-top: 12px;
}

.cod-price {
  display: grid;
  gap: 2px;
  margin: 14px 0;
  padding: 13px 14px;
  border-radius: 20px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, .18);
}

.cod-price.inline {
  margin: 12px 0 0;
}

.cod-price span {
  color: #9a3412;
  font-weight: 900;
  font-size: 12px;
}

.cod-price strong {
  color: #dc2626;
  font-size: 34px;
  line-height: 1;
}

.cod-price del,
.cod-price small {
  color: #6b7280;
}

.cod-section {
  margin: 12px 12px 0;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.cod-section h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
  color: #111827;
}

.cod-promotion {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(135deg, #dc2626, #fb923c);
  color: #fff;
}

.cod-promotion strong {
  font-size: 18px;
}

.cod-promotion span {
  opacity: .9;
}

.cod-promotion button {
  grid-row: span 2;
  min-height: 42px;
  padding: 0 14px;
  background: #111827;
}

.cod-countdown {
  display: grid;
  grid-template-columns: 1fr repeat(3, 48px);
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 12px;
  border-radius: 20px;
  background: #111827;
  color: #fff;
}

.cod-countdown b {
  border-radius: 12px;
  background: #fff;
  color: #dc2626;
  padding: 8px 0;
  text-align: center;
}

.cod-countdown small {
  grid-column: 1 / -1;
  color: rgba(255,255,255,.72);
}

.cod-pain div,
.cod-point-grid,
.cod-review-list {
  display: grid;
  gap: 10px;
}

.cod-pain article,
.cod-point-grid article,
.cod-review-list article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.cod-pain b,
.cod-point-grid b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111827;
  color: #fff;
}

.cod-point-grid strong {
  align-self: center;
  line-height: 1.45;
}

.cod-usage div,
.cod-sku div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cod-usage span,
.cod-sku button {
  border: 1px solid rgba(17, 24, 39, .12);
  border-radius: 999px;
  background: #fff;
  padding: 9px 12px;
  font-weight: 800;
}

.cod-sku button.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.cod-ingredient dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 9px 12px;
  margin: 0;
}

.cod-ingredient dt {
  color: #6b7280;
  font-weight: 900;
}

.cod-ingredient dd {
  margin: 0;
  color: #111827;
  line-height: 1.5;
}

.cod-before-after div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cod-before-after article {
  border-radius: 18px;
  background: #f8fafc;
  padding: 12px;
}

.cod-before-after span {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
}

.cod-package-list {
  display: grid;
  gap: 10px;
}

.cod-package-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  text-align: left;
  border: 2px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  padding: 14px;
}

.cod-package-list button.active {
  border-color: #dc2626;
  background: #fff7ed;
  box-shadow: 0 12px 28px rgba(220, 38, 38, .12);
}

.cod-package-list span {
  width: max-content;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.cod-package-list strong,
.cod-package-list small,
.cod-package-list em {
  grid-column: 1;
}

.cod-package-list b {
  grid-row: 1 / span 3;
  grid-column: 2;
  align-self: center;
  color: #dc2626;
  font-size: 22px;
}

.cod-package-list em {
  color: #6b7280;
  font-style: normal;
}

.cod-detail-wrap .l-detail {
  margin: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.cod-review-list article {
  grid-template-columns: 1fr;
}

.cod-review-list strong {
  color: #111827;
}

.cod-review-list p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

.cod-mobile-screen .l-checkout {
  margin: 12px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .1);
}

.cod-mobile-screen .mobile-checkout-form,
.cod-mobile-screen .landing-order-form {
  gap: 12px;
}

.cod-mobile-screen .checkout-card {
  border: 1px solid #eef2f7;
  box-shadow: none;
}

.cod-mobile-screen input,
.cod-mobile-screen textarea {
  min-height: 48px;
  border-radius: 14px;
}

.cod-policy {
  margin-bottom: 16px;
}

.cod-floating-buy {
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 22px;
  background: rgba(17, 24, 39, .94);
  color: #fff;
  box-shadow: 0 18px 44px rgba(17,24,39,.32);
  backdrop-filter: blur(14px);
}

.cod-floating-buy span {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: 12px;
}

.cod-floating-buy strong {
  display: block;
  font-size: 19px;
}

.cod-floating-buy button {
  min-width: 128px;
  background: #dc2626;
}

.cod-health .cod-badge,
.cod-health .cod-main-cta,
.cod-health .cod-floating-buy button,
.cod-health .cod-pain b,
.cod-health .cod-point-grid b { background: #166534; }

.cod-beauty .cod-badge,
.cod-beauty .cod-main-cta,
.cod-beauty .cod-floating-buy button,
.cod-beauty .cod-pain b,
.cod-beauty .cod-point-grid b { background: #be185d; }

.cod-general .cod-badge,
.cod-general .cod-main-cta,
.cod-general .cod-floating-buy button,
.cod-general .cod-pain b,
.cod-general .cod-point-grid b { background: #1d4ed8; }

.cod-promo .cod-badge,
.cod-promo .cod-main-cta,
.cod-promo .cod-floating-buy button,
.cod-promo .cod-pain b,
.cod-promo .cod-point-grid b { background: #dc2626; }

.cod-trust .cod-badge,
.cod-trust .cod-main-cta,
.cod-trust .cod-floating-buy button,
.cod-trust .cod-pain b,
.cod-trust .cod-point-grid b { background: #0f172a; }

.cod-minimal .cod-hero {
  min-height: 500px;
}

.cod-minimal .cod-section {
  box-shadow: none;
  border: 1px solid #eef2f7;
}

/* Final override for daily template preview. Keep this after legacy stage blocks. */
.drawer.template-preview-drawer {
  width: min(1180px, 90vw) !important;
  max-width: 1180px !important;
}

.drawer.template-preview-drawer .drawer-body {
  min-height: 0 !important;
  /* Keep the fixed-size phone reachable at real browser zoom. */
  overflow: auto !important;
  padding: 0 !important;
  background: #eef2f7 !important;
}

.template-preview-shell.template-preview-stage7,
.template-large-preview {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 320px) minmax(430px, 1fr) !important;
  gap: 0 !important;
  align-items: stretch !important;
  background: #eef2f7 !important;
}

.template-preview-device-area {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 24px !important;
}

.mobile-preview-device.mobile-preview-frame,
.mobile-preview-frame {
  width: min(414px, calc(100% - 48px)) !important;
  min-width: min(375px, calc(100% - 48px)) !important;
  height: min(844px, calc(100vh - 132px)) !important;
  min-height: min(750px, calc(100vh - 132px)) !important;
  max-width: 430px !important;
  max-height: calc(100vh - 132px) !important;
}

.mobile-preview-frame .mobile-device,
.mobile-preview-frame .premium-mobile-device,
.mobile-preview-frame .stage8-device,
.mobile-preview-frame .stage7-device {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.mobile-preview-frame .mobile-phone,
.mobile-preview-frame .premium-mobile-phone,
.mobile-preview-frame .stage8-phone,
.mobile-preview-frame .stage7-phone {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 32px minmax(0, 1fr) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.mobile-preview-frame .mobile-screen,
.mobile-preview-frame .premium-mobile-screen,
.mobile-preview-frame .stage8-screen,
.mobile-preview-frame .stage7-screen {
  height: auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Final template preview layout. This intentionally overrides legacy thumbnail
   styles such as .template-preview { height: 220px; } for real landing preview. */
.drawer.template-preview-drawer {
  width: min(1180px, 90vw);
  max-width: 1180px;
}

.drawer.template-preview-drawer .drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: #eef2f7;
}

.drawer.template-preview-drawer .drawer-head,
.drawer.template-preview-drawer .drawer-foot {
  position: relative;
  z-index: 2;
  background: #fff;
}

.template-large-preview,
.template-preview-shell.template-preview-stage7 {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(430px, 1fr);
  gap: 0;
  align-items: stretch;
  background: #eef2f7;
}

.template-preview-meta,
.template-preview-copy {
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  border-radius: 0;
  border-right: 1px solid #dbe4f0;
  background: #fff;
  color: #0f172a;
}

.template-preview-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.template-preview-copy p,
.template-preview-meta p {
  color: #475569;
  line-height: 1.7;
}

.template-preview-device-area {
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(37, 99, 235, .12), transparent 34%),
    linear-gradient(180deg, #f8fafc, #e5eaf3);
}

.mobile-preview-device.mobile-preview-frame,
.mobile-preview-frame {
  width: min(414px, calc(100% - 48px));
  min-width: min(375px, calc(100% - 48px));
  height: min(844px, calc(100vh - 132px));
  min-height: min(750px, calc(100vh - 132px));
  max-width: 430px;
  max-height: calc(100vh - 132px);
  margin: 0 auto;
  border-radius: 34px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.mobile-preview-content.mobile-preview-scroll,
.mobile-preview-scroll {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.mobile-preview-frame .mobile-device,
.mobile-preview-frame .premium-mobile-device,
.mobile-preview-frame .stage8-device,
.mobile-preview-frame .stage7-device {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.mobile-preview-frame .mobile-phone,
.mobile-preview-frame .premium-mobile-phone,
.mobile-preview-frame .stage8-phone,
.mobile-preview-frame .stage7-phone {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 32px minmax(0, 1fr) !important;
  border: 10px solid #0f172a !important;
  border-radius: 34px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.mobile-preview-frame .mobile-screen,
.mobile-preview-frame .premium-mobile-screen,
.mobile-preview-frame .stage8-screen,
.mobile-preview-frame .stage7-screen {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .drawer.template-preview-drawer {
    width: 100vw;
  }

  .template-large-preview,
  .template-preview-shell.template-preview-stage7 {
    grid-template-columns: 1fr;
  }

  .template-preview-meta,
  .template-preview-copy {
    max-height: 28vh;
    border-right: 0;
    border-bottom: 1px solid #dbe4f0;
  }

  .mobile-preview-device.mobile-preview-frame,
  .mobile-preview-frame {
    width: min(390px, calc(100vw - 32px));
    min-width: 0;
    height: min(812px, calc(72vh - 20px));
    min-height: 560px;
  }
}

.public-product-title {
  max-width: 720px;
  margin: 16px auto 12px;
  padding: 0 18px;
  color: #111827;
  font-size: clamp(22px, 5vw, 36px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.real-mobile-public .public-product-title,
.phone-public-preview .public-product-title {
  max-width: var(--mobile-width);
}

/* Stage 17 template final QA */
.template-picker-card.disabled,
.template-lab-card.disabled {
  opacity: .62;
  filter: grayscale(.15);
}

.template-admin-controls {
  display: none;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  background: rgba(248, 250, 252, .82);
}

.template-admin-controls label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #475467;
}

.template-admin-controls input,
.template-admin-controls select {
  min-height: 34px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  color: #475467;
  font-size: 13px;
}

.rendered-check-result {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.quality-items.compact {
  max-height: 150px;
  overflow: auto;
}

.quality-items .warn,
.quality-items span.warn {
  background: #fff7ed;
  color: #c2410c;
}

.template-compare-mode,
.device-test-panel {
  margin-bottom: 16px;
}

.template-compare-result {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.template-compare-result header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.template-compare-result dl {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.template-compare-result dt {
  color: #667085;
}

.template-compare-result dd {
  margin: 0;
  color: #101828;
}

.device-test-list {
  display: grid;
  gap: 10px;
}

.device-test-list article {
  display: grid;
  grid-template-columns: 1fr 160px auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  background: #fff;
}

.device-test-list select {
  min-height: 38px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 10px;
  padding: 0 10px;
}

.mobile-submit-state {
  position: sticky;
  top: 10px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .88);
  color: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
  backdrop-filter: blur(14px);
}

.mobile-submit-state strong {
  font-size: 15px;
}

.mobile-submit-state span {
  font-size: 12px;
  color: rgba(255, 255, 255, .76);
}

.mobile-order-success-card {
  position: relative;
  z-index: 30;
  margin: 10px 0 16px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .14);
}

.mobile-order-success-card strong {
  display: block;
  font-size: 22px;
  color: #0f172a;
  margin-bottom: 8px;
}

.mobile-order-success-card p {
  margin: 0 0 12px;
  color: #475467;
  line-height: 1.65;
}

.mobile-order-success-card dl {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 7px 10px;
  margin: 12px 0;
}

.mobile-order-success-card dt {
  color: #667085;
}

.mobile-order-success-card dd {
  margin: 0;
  color: #101828;
  font-weight: 700;
}

.real-mobile-public-view {
  background: #fff;
}

.real-mobile-public-view .app-shell,
.real-mobile-public-view .content-area,
.real-mobile-public-view .public-landing-page.real-mobile-public {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: #fff;
  display: block;
}

.real-mobile-public-view .premium-mobile-device,
.real-mobile-public-view .premium-mobile-phone,
.real-mobile-public-view .mobile-device,
.real-mobile-public-view .stage8-device,
.real-mobile-public-view .stage8-phone {
  width: 100vw;
  max-width: 100vw;
  height: auto;
  min-height: 100vh;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.real-mobile-public-view .premium-mobile-screen,
.real-mobile-public-view .mobile-screen,
.real-mobile-public-view .stage8-screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  padding: 14px 14px 128px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.real-mobile-public-view .premium-status-bar,
.real-mobile-public-view .mobile-status,
.real-mobile-public-view .stage8-status {
  border-radius: 0;
}

.real-mobile-public-view .premium-sticky-purchase,
.real-mobile-public-view .mobile-sticky-cta {
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
}

@media (max-width: 720px) {
  .device-test-list article,
  .template-compare-result dl {
    grid-template-columns: 1fr;
  }
}

/* Stage 18 Supabase live integration */
.admin-auth-locked .left-nav,
.admin-auth-locked .module-menu,
.admin-auth-locked .system-top {
  display: none;
}

.admin-auth-locked .main-shell {
  margin: 0;
}

body.login-route {
  min-width: 320px !important;
  overflow: hidden !important;
  background: #f4f7fb !important;
}

body.login-route .admin-shell,
body.login-route .main-shell {
  display: block !important;
  min-height: 100vh !important;
  width: 100% !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
}

body.login-route .content-area {
  width: 100% !important;
  min-height: 100vh !important;
  padding: 0 !important;
  background: transparent !important;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(21, 108, 152, .08), transparent 34%),
    radial-gradient(circle at 88% 82%, rgba(213, 166, 47, .10), transparent 30%),
    linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}

.login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 18px;
  padding: 36px 38px 30px;
  border: 1px solid #e5eaf1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(15, 39, 61, .10);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid #edf0f4;
}

.login-brand img {
  width: 126px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.login-brand div {
  display: grid;
  gap: 4px;
}

.login-brand strong {
  color: #0a4d68;
  font-size: 18px;
}

.login-brand span {
  color: #8a94a5;
  font-size: 12px;
}

.login-heading {
  display: grid;
  gap: 6px;
}

.login-card h1 {
  margin: 0;
  font-size: 24px;
  color: #101828;
}

.login-card p {
  margin: 0;
  color: #667085;
  line-height: 1.6;
}

.login-field {
  gap: 8px;
  color: #344054;
  font-weight: 600;
}

.login-field input {
  height: 44px;
  border-color: #d7dde7;
  border-radius: 5px;
  padding: 0 13px;
  font-weight: 400;
}

.login-field input:focus {
  border-color: #176fa1;
  outline: 3px solid rgba(23, 111, 161, .10);
}

.login-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
  border-radius: 5px;
  background: #0b658e;
  font-size: 15px;
  font-weight: 700;
}

.login-submit:hover {
  background: #095777;
}

.form-error {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
}

.login-security-note {
  text-align: center;
  font-size: 12px;
}

.auth-bootstrap-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #667085;
  background: #f4f7fb;
}

@media (max-width: 560px) {
  .login-card {
    padding: 28px 22px 24px;
  }

  .login-brand img {
    width: 112px;
  }
}

.storage-test-preview {
  width: min(320px, 100%);
  margin: 12px 0;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #fff;
}

.template-lab-controls .form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.template-lab-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.template-lab-copy header,
.template-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.template-lab-copy p {
  margin: 8px 0;
  color: #667085;
  line-height: 1.6;
}

.template-lab-copy .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.template-large-preview {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-height: calc(90vh - 120px);
}

.template-preview-meta {
  width: 100%;
  display: grid;
  gap: 8px;
  align-items: start;
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
}

.template-preview-meta strong {
  font-size: 22px;
  color: #101828;
}

.template-preview-meta dl,
.template-preview-copy dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px 10px;
  margin: 8px 0 0;
}

.template-preview-meta dt,
.template-preview-copy dt {
  color: #667085;
  font-weight: 700;
}

.template-preview-meta dd,
.template-preview-copy dd {
  margin: 0;
  color: #101828;
  line-height: 1.5;
}

.mobile-preview-frame {
  width: 390px;
  max-width: 100%;
  height: 812px;
  margin: 0 auto;
  border-radius: 32px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.mobile-preview-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.mobile-preview-frame .mobile-device,
.mobile-preview-frame .premium-mobile-device,
.mobile-preview-frame .stage8-device,
.mobile-preview-frame .stage7-device {
  width: 390px !important;
  max-width: 390px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.mobile-preview-frame .mobile-phone,
.mobile-preview-frame .premium-mobile-phone,
.mobile-preview-frame .stage8-phone,
.mobile-preview-frame .stage7-phone {
  width: 390px !important;
  height: 812px !important;
  max-width: 390px !important;
  border-radius: 32px !important;
  box-sizing: border-box;
}

.mobile-preview-frame .mobile-screen,
.mobile-preview-frame .premium-mobile-screen,
.mobile-preview-frame .stage8-screen,
.mobile-preview-frame .stage7-screen {
  height: calc(812px - 52px) !important;
  overflow-y: auto !important;
}

.mobile-order-success-card {
  position: relative;
  z-index: 40;
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-float);
  color: #101828;
}

.mobile-order-success-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.mobile-order-success-card p {
  color: #667085;
  line-height: 1.7;
}

.mobile-order-success-card dl,
.public-success-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  text-align: left;
  margin: 14px 0;
}

.mobile-order-success-card dt,
.public-success-card dt {
  color: #667085;
}

.mobile-order-success-card dd,
.public-success-card dd {
  margin: 0;
  font-weight: 800;
}

.premium-mobile-screen.sheet-open .premium-sticky-purchase {
  pointer-events: none;
  opacity: .18;
}

.premium-bottom-sheet .premium-checkout-form {
  padding-bottom: 12px;
}

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

  .template-lab-controls .form-grid.three {
    grid-template-columns: 1fr;
  }
}

/* ===== Stage 15 Premium Mobile Templates ===== */
.premium-mobile-device {
  width: var(--mobile-width);
}

.premium-mobile-phone {
  height: var(--mobile-height);
  border-radius: 42px;
  padding: 10px;
  background: #111827;
  box-shadow: var(--shadow-float);
}

.premium-mobile-screen {
  position: relative;
  height: calc(var(--mobile-height) - 62px);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 32px;
  padding: 18px 16px 118px;
  scroll-behavior: smooth;
}

.premium-mobile-screen::-webkit-scrollbar {
  width: 4px;
}

.premium-mobile-screen::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, .18);
  border-radius: 99px;
}

.premium-status {
  color: #fff;
}

.premium-hero,
.premium-section,
.floating-product-card,
.premium-price-block,
.persona-trust-strip,
.minimal-checkout-head {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.premium-hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  margin-bottom: 16px;
}

.premium-hero h1,
.minimal-checkout-head h1 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

.premium-hero p,
.minimal-checkout-head p {
  margin: 0;
  line-height: 1.65;
  color: rgba(31, 41, 55, .72);
}

.premium-hero .landing-visual,
.premium-hero .landing-css-placeholder,
.floating-product-card .landing-visual,
.floating-product-card .landing-css-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 26px;
}

.premium-price-block {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: var(--blur-glass);
}

.premium-price-block span,
.premium-section header span,
.premium-hero > span,
.hero-meta span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #667085;
  letter-spacing: .08em;
}

.premium-price-block strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  color: #111827;
}

.premium-price-block del {
  color: #98a2b3;
}

.premium-price-block small {
  display: block;
  margin-top: 8px;
  color: #667085;
  line-height: 1.5;
}

.persona-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, .78);
}

.persona-trust-strip span {
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, .06);
  padding: 9px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.premium-section {
  margin-bottom: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, .86);
}

.premium-section header {
  margin-bottom: 14px;
}

.premium-section h2 {
  margin: 4px 0 0;
  font-size: 21px;
}

.premium-package-grid {
  display: grid;
  gap: 10px;
}

.premium-package-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 22px;
  padding: 14px;
  background: #fff;
  transition: transform .2s var(--ease-premium), box-shadow .2s var(--ease-premium), border-color .2s;
}

.premium-package-card.active {
  border-color: currentColor;
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.premium-package-card span {
  display: inline-flex;
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  background: rgba(15, 23, 42, .08);
  font-size: 11px;
  font-weight: 800;
}

.premium-package-card strong,
.premium-package-card b,
.premium-package-card small,
.premium-package-card em {
  display: block;
  margin-top: 6px;
}

.premium-package-card b {
  font-size: 22px;
}

.premium-package-card small,
.premium-package-card em {
  color: #667085;
  font-style: normal;
}

.luxury-order-summary,
.checkout-card {
  border-radius: 22px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

.luxury-order-summary img,
.luxury-order-summary > div > span,
.minimal-checkout-head img,
.minimal-checkout-head > span {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  background: #f2f4f7;
  display: grid;
  place-items: center;
}

.luxury-order-summary > div,
.cart-product,
.minimal-checkout-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.luxury-order-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 14px 0 0;
}

.luxury-order-summary dt {
  color: #667085;
}

.luxury-order-summary dd {
  margin: 0;
  font-weight: 800;
}

.premium-checkout-form {
  display: grid;
  gap: 12px;
}

.premium-checkout-form .checkout-card,
.premium-checkout-form .checkout-group {
  display: grid;
  gap: 10px;
}

.premium-checkout-form h3 {
  margin: 0;
  font-size: 15px;
}

.premium-checkout-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-weight: 700;
}

.premium-checkout-form input,
.premium-checkout-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 16px;
  padding: 11px 12px;
  background: #fff;
}

.premium-checkout-form textarea {
  min-height: 82px;
  resize: vertical;
}

.premium-checkout-form > button,
.premium-sticky-purchase button {
  border: 0;
  border-radius: var(--radius-pill);
  min-height: 50px;
  padding: 0 18px;
  font-weight: 900;
  background: #111827;
  color: #fff;
}

.shipping-radio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.radio-card {
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 16px;
  padding: 10px;
}

.cod-pay {
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 18px;
  padding: 12px;
  background: #f8fafc;
}

.premium-bottom-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  max-height: 82%;
  overflow-y: auto;
  transform: translateY(calc(100% + 24px));
  transition: transform .28s var(--ease-premium);
  z-index: 25;
  border-radius: var(--radius-sheet);
  padding: 12px 14px 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-float);
}

.premium-sheet-mask {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 42, .32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s;
}

.premium-mobile-screen.sheet-open .premium-bottom-sheet {
  transform: translateY(0);
}

.premium-mobile-screen.sheet-open .premium-sheet-mask {
  opacity: 1;
  pointer-events: auto;
}

.sheet-handle {
  display: block;
  width: 48px;
  height: 5px;
  margin: 4px auto 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: #d0d5dd;
}

.premium-sticky-purchase,
.premium-bottom-nav {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 24px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-float);
  backdrop-filter: var(--blur-glass);
}

.premium-sticky-purchase div {
  flex: 1;
}

.premium-sticky-purchase span,
.premium-sticky-purchase strong {
  display: block;
}

.premium-bottom-nav {
  justify-content: space-around;
  bottom: 80px;
}

.premium-bottom-nav button {
  border: 0;
  background: transparent;
  font-weight: 800;
}

.scenario-story > div,
.s8-scenario > div,
.problem-flow {
  display: grid;
  gap: 10px;
}

.scenario-story article,
.comparison-mini .compare-row,
.safe-review-placeholder p {
  border-radius: 18px;
  padding: 14px;
  background: rgba(15, 23, 42, .04);
}

.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.safe-review-placeholder p {
  line-height: 1.7;
  color: #667085;
}

.template-app-luxe-product .premium-mobile-screen {
  background: #f4efe7;
}

.template-app-luxe-product .luxury-hero {
  min-height: 570px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, #fbfaf7, #ebe3d6);
}

.template-app-luxe-product .hero-image-wrap {
  margin: -8px -4px 18px;
}

.template-app-luxe-product .premium-package-card.active,
.template-app-luxe-product .premium-sticky-purchase button {
  color: #111;
  background: #111;
  color: #fff;
}

.template-clean-beauty-studio .premium-mobile-screen {
  background: linear-gradient(180deg, #fff8f1, #ffeef2);
}

.template-clean-beauty-studio .beauty-studio-hero {
  min-height: 470px;
  background: radial-gradient(circle at 78% 12%, rgba(255, 255, 255, .9), transparent 28%), linear-gradient(145deg, #fff6ed, #ffdbe5);
}

.beauty-float {
  filter: drop-shadow(0 22px 28px rgba(196, 106, 122, .22));
}

.template-clean-beauty-studio .premium-package-card.active,
.template-clean-beauty-studio .premium-sticky-purchase button {
  color: #be4b67;
  border-color: #f3a8b7;
  background: #be4b67;
  color: #fff;
}

.template-streetwear-youth .premium-mobile-screen {
  background: #0f0f0f;
  color: #fff;
}

.template-streetwear-youth .street-hero,
.template-streetwear-youth .floating-product-card,
.template-streetwear-youth .premium-section {
  background: #f5f5f0;
  color: #101010;
}

.street-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 12px;
  align-items: end;
}

.template-streetwear-youth .premium-package-card.active,
.template-streetwear-youth .premium-sticky-purchase button {
  background: #b6ff39;
  color: #101010;
}

.template-minimal-checkout-pro .premium-mobile-screen {
  background: #f7f8fa;
}

.template-minimal-checkout-pro .minimal-checkout-head {
  padding: 18px;
  margin-bottom: 14px;
  background: #fff;
}

.template-minimal-checkout-pro .premium-section {
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, .08);
}

.template-dark-tech-premium .premium-mobile-screen {
  background: radial-gradient(circle at 50% 0%, #26325c, #080b16 44%, #05070d);
  color: #fff;
}

.template-dark-tech-premium .tech-hero,
.template-dark-tech-premium .premium-section,
.template-dark-tech-premium .persona-trust-strip,
.template-dark-tech-premium .premium-price-block {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: var(--blur-glass);
}

.template-dark-tech-premium .premium-price-block strong,
.template-dark-tech-premium .premium-hero p,
.template-dark-tech-premium .premium-package-card b {
  color: #fff;
}

.template-dark-tech-premium .premium-package-card {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.template-dark-tech-premium .premium-sticky-purchase button {
  background: linear-gradient(135deg, #60a5fa, #8b5cf6);
}

.template-natural-wellness-soft .premium-mobile-screen {
  background: #f4f7ed;
}

.template-natural-wellness-soft .wellness-hero,
.template-natural-wellness-soft .premium-section {
  background: #fbfff6;
}

.template-natural-wellness-soft .premium-package-card.active,
.template-natural-wellness-soft .premium-sticky-purchase button {
  background: #47745b;
  color: #fff;
}

.template-bundle-value-deal .premium-mobile-screen {
  background: #fff7ed;
}

.template-bundle-value-deal .bundle-hero {
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
}

.template-bundle-value-deal .bundle-focus .premium-package-grid {
  grid-template-columns: 1fr;
}

.template-bundle-value-deal .premium-package-card.active,
.template-bundle-value-deal .premium-sticky-purchase button {
  background: #b42318;
  color: #fff;
}

.template-problem-solution-trust .premium-mobile-screen {
  background: #eef4ff;
}

.template-problem-solution-trust .problem-hero,
.template-problem-solution-trust .premium-section {
  background: #fff;
}

.template-problem-solution-trust .premium-package-card.active,
.template-problem-solution-trust .premium-sticky-purchase button {
  background: #1d4ed8;
  color: #fff;
}

.premium-template-filters {
  display: grid;
  gap: 10px;
}

.premium-template-filters > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.premium-template-filters > div > span {
  width: 64px;
  color: #667085;
  font-weight: 800;
}

.template-recommendation {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 18px;
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e4e8ef;
}

.template-recommendation strong {
  width: 100%;
}

.template-recommendation em {
  color: #667085;
  font-style: normal;
}

.mini-luxe-hero,
.mini-beauty-studio,
.mini-street-grid,
.mini-tech-hero,
.mini-wellness-hero {
  border-radius: 18px;
  overflow: hidden;
}

.mini-luxe-hero img,
.mini-beauty-studio img,
.mini-street-grid img,
.mini-tech-hero img,
.mini-wellness-hero img {
  width: 100%;
  height: 86px;
  object-fit: cover;
}

.mini-luxe-copy,
.mini-deal-head,
.mini-order-summary,
.mini-checkout-product,
.mini-copy.dark {
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, .8);
  margin-top: 6px;
}

.mini-street-top,
.mini-bottom-nav,
.mini-glass-tags,
.mini-deal-packages,
.mini-scenario-lines {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.mini-street-top span,
.mini-glass-tags span,
.mini-deal-packages i,
.mini-scenario-lines i,
.mini-luxe-pack i {
  flex: 1;
  height: 12px;
  border-radius: 99px;
  background: rgba(15, 23, 42, .14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 100px 132px minmax(0, 1fr);
}

.left-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 5;
}

.logo-block {
  height: 86px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: #2563eb;
  font-size: 12px;
}

.logo-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #0b5fe8 0%, #1799f6 52%, #28d0c2 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .36), 0 8px 18px rgba(18, 99, 241, .22);
}

.logo-mark::before {
  content: "HG";
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0;
}

.side-nav {
  display: grid;
  gap: 4px;
  padding: 4px 0 18px;
}

.side-button {
  height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: #344054;
  padding: 0 9px;
  text-align: left;
}

.side-button:hover,
.side-button.active {
  background: var(--blue-soft);
  border-left-color: var(--blue);
  color: var(--blue);
}

.nav-ico {
  width: 18px;
  text-align: center;
  color: inherit;
}

.module-menu {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 5;
  overflow: hidden;
}

.module-menu-title {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 800;
  color: #111827;
}

.module-menu-scroll {
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 0 10px 18px;
}

.module-menu-group {
  margin-bottom: 14px;
}

.module-menu-group h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

.module-menu-group button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #475467;
  text-align: left;
  padding: 0 8px;
}

.module-menu-group button:hover,
.module-menu-group button.active {
  background: #f2f6ff;
  color: var(--blue);
}

.main-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
}

.system-top {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.tab-strip {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.page-tab {
  min-width: 88px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: #344054;
  padding: 0 13px;
  white-space: nowrap;
}

.page-tab.active {
  color: var(--blue);
  background: #fbfdff;
  box-shadow: inset 0 -2px 0 var(--blue);
}

.page-tab .close-tab {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #98a2b3;
  font-size: 13px;
}

.page-tab .close-tab:hover {
  color: #111827;
  background: #eef2f7;
}

.system-tools {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--line);
  background: #fff;
}

.tool-icon {
  width: 40px;
  height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  position: relative;
  color: #344054;
}

.tool-icon::before {
  content: attr(data-tool);
  display: block;
  font-size: 12px;
  transform: scale(.88);
}

.has-dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  position: absolute;
  top: 8px;
  right: 8px;
}

.account-chip {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  white-space: nowrap;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #fee2e2;
  color: #b42318;
  font-weight: 700;
}

.account-chip small {
  color: var(--muted);
}

.content-area {
  min-width: 0;
  padding: 12px 18px 70px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 18px;
  font-weight: 700;
}

h2 {
  font-size: 15px;
  font-weight: 700;
}

h3 {
  font-size: 14px;
  font-weight: 700;
}

.crumb {
  color: var(--muted);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr)) auto auto;
  gap: 10px 12px;
  align-items: end;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.filters.compact {
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto auto;
}

.field {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 12px;
}

.field.inline {
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
}

input,
select,
textarea {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: #fff;
  color: var(--text);
  padding: 0 9px;
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
  padding-top: 8px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(18, 99, 241, .12);
}

.btn {
  min-height: 32px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: #fff;
  color: #344054;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

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

.btn.danger {
  border-color: #fecaca;
  color: var(--red);
}

.btn.text {
  border: 0;
  color: var(--blue);
  background: transparent;
  padding-inline: 4px;
}

.btn.muted {
  color: #98a2b3;
  background: #f2f4f7;
  border-color: #edf0f5;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  overflow: hidden;
}

.segmented button {
  height: 32px;
  min-width: 56px;
  border: 0;
  border-right: 1px solid var(--line-dark);
  background: #fff;
  color: #344054;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--blue);
  color: #fff;
}

.tabs {
  display: flex;
  gap: 22px;
  height: 40px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  background: #fff;
  padding: 0 12px;
}

.tabs button {
  height: 40px;
  border: 0;
  background: transparent;
  color: #344054;
  padding: 0 4px;
}

.tabs button.active {
  color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 12px;
}

.panel.pad {
  padding: 12px;
}

.panel-head {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

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

.metric {
  min-height: 116px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 50px;
  top: 52px;
  height: 8px;
  border-radius: 8px;
  background: #e9eef6;
}

.metric::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 52px;
  height: 8px;
  width: var(--bar, 70%);
  border-radius: 8px;
  background: var(--accent, var(--blue));
}

.metric span {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin-top: 30px;
  font-size: 24px;
}

.metric small {
  color: var(--muted);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
}

.chart-box {
  min-height: 330px;
  padding: 12px;
}

.empty-chart {
  min-height: 250px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line-dark);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
}

.empty-chart strong {
  color: var(--text);
  font-size: 18px;
}

.empty-state {
  min-height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.empty-state.compact {
  min-height: 120px;
}

.empty-state.large {
  min-height: 280px;
  border: 1px dashed var(--line-dark);
  border-radius: 6px;
  background: #fff;
}

.chart-svg {
  width: 100%;
  height: 270px;
}

.chart-grid line {
  stroke: #e8edf4;
}

.chart-area {
  fill: rgba(18, 99, 241, .13);
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
}

.chart-bars rect {
  fill: var(--green);
  rx: 3;
}

.right-rail {
  display: grid;
  gap: 12px;
}

.system-card {
  min-height: 150px;
  background: linear-gradient(135deg, #e0f2fe, #fef3c7);
  border: 1px solid #dbeafe;
  border-radius: 4px;
  padding: 16px;
}

.system-card strong {
  display: block;
  color: var(--blue);
  font-size: 20px;
  margin-bottom: 10px;
}

.progress {
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .75);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: #3b82f6;
}

.todo-row,
.notice-row {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}

.todo-row:last-child,
.notice-row:last-child {
  border-bottom: 0;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.table-scroll {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

th,
td {
  height: 48px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  height: 42px;
  background: #f1f4f8;
  color: #344054;
  font-weight: 600;
}

th:last-child,
td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -1px 0 0 var(--line);
}

th:last-child {
  z-index: 2;
  background: #f1f4f8;
}

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

.row-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 220px;
}

.cover,
.site-logo,
.material-thumb {
  width: 42px;
  height: 42px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #38bdf8, #f97316);
  overflow: hidden;
}

.cover.blue { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.cover.green { background: linear-gradient(135deg, #22c55e, #0f766e); }
.cover.orange { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.cover.purple { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.cover.rose,
.material-thumb.rose {
  background: linear-gradient(135deg, #fb7185, #7c3aed);
}

.cover img,
.material-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link {
  color: var(--blue);
  text-decoration: none;
}

.sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 3px;
  padding: 0 7px;
  color: #175cd3;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 12px;
}

.tag.green {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.tag.red {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecaca;
}

.tag.orange {
  color: #b54708;
  background: #fffaeb;
  border-color: #fedf89;
}

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

.actions button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.actions .danger {
  color: var(--red);
}

.pagination {
  height: 44px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.page-num {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-dark);
  background: #fff;
  border-radius: 3px;
}

.page-num.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

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

.template-summary article,
.ab-metrics article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
}

.template-summary span,
.ab-metrics span {
  color: var(--muted);
}

.template-summary strong,
.ab-metrics strong {
  display: block;
  font-size: 22px;
  margin-top: 8px;
}

.landing-template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.landing-template-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.landing-template-hero {
  min-height: 150px;
  display: grid;
  align-content: end;
  gap: 7px;
  padding: 14px;
  color: #fff;
  background: linear-gradient(145deg, #111827, #2563eb 52%, #f97316);
}

.landing-template-hero.light {
  color: #111827;
  background: linear-gradient(145deg, #fef3c7, #38bdf8 55%, #ffffff);
}

.landing-template-hero.green {
  background: linear-gradient(145deg, #064e3b, #16a34a 55%, #fde68a);
}

.landing-template-hero.rose,
.template-preview.rose {
  background: linear-gradient(145deg, #831843, #e11d48 48%, #fbbf24);
}

.template-kind {
  width: fit-content;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, .22);
  font-size: 12px;
}

.landing-template-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.template-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

.section-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.section-chips span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 3px;
  background: #eff6ff;
  color: #175cd3;
  padding: 0 7px;
  font-size: 12px;
}

.post-lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  align-items: start;
}

.post-preview-panel {
  position: sticky;
  top: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
}

.social-post {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.post-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.post-head span:not(.avatar) {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.social-post p {
  margin: 0;
  padding: 0 12px 12px;
  line-height: 1.65;
}

.post-media {
  min-height: 190px;
  display: grid;
  align-content: end;
  padding: 16px;
  color: #fff;
  background: linear-gradient(145deg, #1e3a8a, #0ea5e9 50%, #f97316);
}

.post-media strong {
  font-size: 22px;
}

.post-actions,
.post-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.post-links button {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: #f8fafc;
  color: var(--blue);
}

.ab-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.launch-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.launch-card {
  padding: 14px;
}

.launch-cover {
  height: 220px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff1f2, #dbeafe);
  overflow: hidden;
}

.launch-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.launch-card h2 {
  margin: 14px 0 6px;
  font-size: 20px;
}

.launch-card p {
  color: var(--muted);
  line-height: 1.6;
}

.launch-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0;
}

.launch-price span {
  color: #e11d48;
  font-size: 26px;
  font-weight: 800;
}

.launch-price del {
  color: #98a2b3;
}

.launch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.launch-tags span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 8px;
  background: #f8fafc;
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--blue);
  text-decoration: none;
}

.launch-review {
  padding: 14px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 12px;
}

.check-item strong {
  display: block;
  color: #067647;
  margin-bottom: 6px;
}

.check-item span {
  color: #475467;
  line-height: 1.55;
}

.launch-score {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.launch-score article {
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  background: #eff6ff;
  padding: 12px;
}

.launch-score span {
  color: #475467;
}

.launch-score strong {
  display: block;
  margin-top: 8px;
  color: #175cd3;
  font-size: 20px;
}

.landing-workbench {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.workbench-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.workbench-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.landing-page {
  max-width: 1120px;
  margin: 18px auto;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.shop-preview-nav {
  height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid #eceff3;
  background: #fff;
}

.beauty-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 32px;
  align-items: center;
  min-height: 500px;
  padding: 44px;
  background:
    linear-gradient(120deg, rgba(255, 241, 242, .94), rgba(239, 246, 255, .9)),
    linear-gradient(135deg, #fff, #e0f2fe);
}

.beauty-hero-copy {
  display: grid;
  gap: 18px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #9f1239;
  background: #ffe4e6;
  border: 1px solid #fecdd3;
  font-weight: 700;
}

.beauty-hero h1 {
  max-width: 560px;
  margin: 0;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0;
}

.beauty-hero p {
  max-width: 600px;
  margin: 0;
  color: #475467;
  font-size: 16px;
  line-height: 1.8;
}

.hero-offer {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.hero-offer span {
  color: #be123c;
  font-size: 34px;
  font-weight: 900;
}

.hero-offer del {
  color: #667085;
}

.hero-offer small {
  color: #067647;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.hero-actions button,
.landing-order-form button,
.sticky-buy button {
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  padding: 0 18px;
  background: #111827;
  color: #fff;
  font-weight: 800;
}

.hero-actions .ghost {
  background: #fff;
  color: #111827;
  border: 1px solid #d0d5dd;
}

.beauty-visual {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 35% 28%, rgba(251, 113, 133, .18), transparent 28%),
    linear-gradient(145deg, #ffffff, #fef2f2 58%, #dbeafe);
  overflow: hidden;
}

.beauty-visual img {
  width: min(86%, 430px);
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 28px 32px rgba(15, 23, 42, .16));
}

.landing-placeholder {
  min-height: 180px;
  width: min(86%, 360px);
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #667085;
  font-weight: 800;
}

.skin-chip {
  position: absolute;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
  font-weight: 800;
}

.skin-chip.one {
  left: 28px;
  top: 34px;
}

.skin-chip.two {
  right: 26px;
  bottom: 36px;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #eceff3;
  border-bottom: 1px solid #eceff3;
  background: #111827;
  color: #fff;
}

.proof-strip article {
  padding: 22px;
  border-right: 1px solid rgba(255, 255, 255, .13);
}

.proof-strip strong {
  display: block;
  font-size: 26px;
}

.proof-strip span {
  color: #d1d5db;
}

.benefit-section,
.bundle-section,
.faq-section,
.routine-section,
.ingredient-section {
  padding: 38px 44px;
}

.section-title span,
.ingredient-section span,
.bundle-copy span {
  color: #be123c;
  font-weight: 800;
}

.section-title h2,
.ingredient-section h2,
.bundle-copy h2 {
  margin: 8px 0 0;
  font-size: 28px;
}

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

.benefit-grid article,
.faq-section article,
.routine-section article {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.benefit-grid strong,
.faq-section strong,
.routine-section strong {
  font-size: 16px;
}

.benefit-grid p,
.faq-section p,
.routine-section p,
.ingredient-section p,
.bundle-copy p {
  color: #475467;
  line-height: 1.7;
}

.ingredient-section {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 24px;
  background: #f8fafc;
}

.ingredient-section ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  list-style: none;
}

.ingredient-section li {
  min-height: 52px;
  display: flex;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 5px;
  background: #fff;
  padding: 0 14px;
}

.routine-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.routine-section span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #be123c;
  font-weight: 900;
}

.bundle-section {
  display: grid;
  grid-template-columns: .72fr 1fr;
  gap: 18px;
  background: #fff7ed;
}

.bundle-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bundle-cards article {
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff;
  padding: 14px;
}

.bundle-cards article.hot {
  border-color: #f43f5e;
  box-shadow: 0 0 0 2px rgba(244, 63, 94, .12);
}

.bundle-cards article.green {
  border-color: #86efac;
}

.bundle-cards span,
.bundle-cards b,
.bundle-cards p {
  display: block;
  margin-top: 8px;
}

.bundle-cards b {
  color: #be123c;
  font-size: 22px;
}

.landing-order-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
}

.landing-order-form input,
.landing-order-form textarea {
  min-height: 42px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  padding: 0 12px;
  background: #fff;
}

.landing-order-form textarea {
  min-height: 42px;
  padding-top: 10px;
  resize: vertical;
}

.m-detail .landing-order-form {
  grid-template-columns: 1fr;
}

.faq-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sticky-buy {
  position: sticky;
  bottom: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 0 24px;
  border-top: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
}

.sticky-buy span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
}

.sticky-buy strong {
  color: #be123c;
  font-size: 22px;
}

.template-shelf,
.template-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.template-phone-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.template-phone-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(18, 99, 241, .16);
}

.template-phone-card footer {
  height: 40px;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.template-phone-screen {
  min-height: 300px;
  background: #fff;
  overflow: hidden;
}

.mini-hero {
  position: relative;
  height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #2563eb 58%, #f97316);
}

.mini-hero.compact {
  height: 112px;
}

.mini-hero.slim {
  height: 94px;
}

.mini-hero img {
  width: 84%;
  height: 116px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(15, 23, 42, .2));
}

.mini-hero span {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #175cd3;
  font-weight: 800;
}

.mini-hero.red,
.template-phone-card.red .mini-buy { background: linear-gradient(135deg, #7f1d1d, #dc2626); }
.mini-hero.pink,
.template-phone-card.pink .mini-buy { background: linear-gradient(135deg, #fb7185, #ec4899); }
.mini-hero.green,
.template-phone-card.green .mini-buy { background: linear-gradient(135deg, #047857, #86efac); }
.mini-hero.blue,
.template-phone-card.blue .mini-buy { background: linear-gradient(135deg, #1d4ed8, #93c5fd); }
.mini-hero.navy,
.template-phone-card.navy .mini-buy { background: linear-gradient(135deg, #0f172a, #1d4ed8); }
.mini-hero.yellow,
.template-phone-card.yellow .mini-buy { background: linear-gradient(135deg, #facc15, #fb923c); }
.mini-hero.purple,
.template-phone-card.purple .mini-buy { background: linear-gradient(135deg, #581c87, #a855f7); }
.mini-hero.brown,
.template-phone-card.brown .mini-buy { background: linear-gradient(135deg, #78350f, #c2410c); }

.mini-copy {
  padding: 10px;
}

.mini-copy strong {
  display: block;
  min-height: 40px;
  line-height: 1.35;
  font-size: 12px;
}

.mini-copy p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 11px;
}

.mini-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mini-price b {
  color: #e11d48;
}

.mini-price del {
  color: #98a2b3;
  font-size: 11px;
}

.mini-service {
  display: flex;
  gap: 5px;
  margin: 8px 0;
}

.mini-service span {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  padding: 0 5px;
  background: #fef2f2;
  color: #be123c;
  font-size: 10px;
}

.mini-icons {
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  color: #667085;
}

.mini-icons i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-style: normal;
  font-size: 10px;
}

.mini-buy {
  height: 30px;
  display: grid;
  place-items: center;
  margin-top: 4px;
  color: #fff;
  background: #ef4444;
  font-weight: 800;
  font-size: 12px;
}

.mini-topbar,
.mini-shop-head,
.mini-classic-head,
.mini-cert-head,
.mini-leaf-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.mini-shop-head,
.mini-classic-head,
.mini-cert-head,
.mini-leaf-head {
  justify-content: space-between;
  padding: 0 10px;
}

.mini-topbar { background: #d90429; }
.mini-shop-head.red,
.mini-classic-head.red,
.mini-cert-head.red,
.mini-leaf-head.red { background: #dc2626; }
.mini-shop-head.pink,
.mini-classic-head.pink,
.mini-cert-head.pink,
.mini-leaf-head.pink { background: #ec4899; }
.mini-shop-head.green,
.mini-classic-head.green,
.mini-cert-head.green,
.mini-leaf-head.green { background: #059669; }
.mini-shop-head.blue,
.mini-classic-head.blue,
.mini-cert-head.blue,
.mini-leaf-head.blue { background: #2563eb; }
.mini-shop-head.navy,
.mini-classic-head.navy,
.mini-cert-head.navy,
.mini-leaf-head.navy { background: #111827; }
.mini-shop-head.yellow,
.mini-classic-head.yellow,
.mini-cert-head.yellow,
.mini-leaf-head.yellow { background: #f59e0b; }
.mini-shop-head.purple,
.mini-classic-head.purple,
.mini-cert-head.purple,
.mini-leaf-head.purple { background: #7c3aed; }
.mini-shop-head.brown,
.mini-classic-head.brown,
.mini-cert-head.brown,
.mini-leaf-head.brown { background: #92400e; }

.mini-countdown,
.mini-coupon-row,
.mini-badge-row,
.mini-cert-row,
.mini-dual-buy,
.mini-stepper {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mini-countdown b {
  min-width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: #111827;
  color: #fff;
  font-size: 11px;
}

.mini-coupon-row span,
.mini-badge-row span,
.mini-cert-row span {
  min-height: 20px;
  border-radius: 3px;
  background: #fff1f2;
  color: #be123c;
  padding: 3px 6px;
  font-size: 10px;
}

.mini-dual-buy {
  margin-top: 8px;
}

.mini-dual-buy span,
.mini-dual-buy b {
  flex: 1;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 11px;
}

.mini-dual-buy span {
  background: #f3f4f6;
  color: #475467;
}

.mini-dual-buy b {
  color: #fff;
  background: #ef4444;
}

.mini-cert-head {
  min-height: 70px;
  display: grid;
  align-content: center;
  justify-items: start;
}

.mini-cert-head span,
.mini-leaf-head span,
.mini-shop-head span,
.mini-classic-head span {
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  padding: 3px 7px;
}

.mini-cert-head p {
  margin: 3px 0 0;
  font-weight: 500;
  font-size: 10px;
}

.mini-trust-product,
.mini-product-row,
.mini-natural-grid {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  align-items: center;
}

.mini-trust-product img,
.mini-product-row img,
.mini-natural-grid img,
.mini-premium-head img {
  width: 100%;
  height: 76px;
  object-fit: contain;
}

.mini-trust-product strong,
.mini-product-row strong {
  display: block;
  line-height: 1.35;
  font-size: 12px;
}

.mini-policy-list,
.mini-long-stack {
  display: grid;
  gap: 6px;
  margin: 8px 0;
}

.mini-policy-list i,
.mini-long-stack i,
.mini-form-line {
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
}

.mini-long-stack i:nth-child(2),
.mini-form-line.short {
  width: 72%;
}

.mini-long-stack i:nth-child(3) {
  width: 88%;
}

.mini-long-stack i:nth-child(4) {
  width: 62%;
}

.mini-natural-grid {
  grid-template-columns: 1fr 72px;
  background: #f0fdf4;
}

.mini-natural-grid div:last-child {
  display: grid;
  gap: 5px;
}

.mini-natural-grid b {
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  font-size: 10px;
}

.mini-review-line {
  margin: 8px 0;
  color: #f59e0b;
  font-size: 11px;
  font-weight: 700;
}

.mini-stepper {
  width: calc(100% - 20px);
  margin: 0 10px 8px;
  justify-content: center;
}

.mini-stepper span,
.mini-stepper b {
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-style: normal;
}

.mini-form-line {
  margin: 7px 10px;
}

.mini-premium-head {
  position: relative;
  height: 128px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #f0abfc, transparent 38%), linear-gradient(135deg, #312e81, #7e22ce);
}

.mini-premium-head span {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #fff;
  font-weight: 800;
}

.premium-copy {
  background: #faf5ff;
}

.mini-accordion {
  display: grid;
  gap: 5px;
  margin: 8px 0;
}

.mini-accordion span {
  min-height: 22px;
  display: flex;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #475467;
  font-size: 10px;
}

.template-picker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
}

.template-info-panel {
  position: sticky;
  top: 0;
  align-self: start;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.template-info-panel h3 {
  margin-top: 0;
  color: var(--blue);
}

.template-info-panel dt {
  margin-top: 18px;
  color: var(--muted);
}

.template-info-panel dd {
  margin: 6px 0 0;
  color: var(--text);
}

.mobile-sim-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: start;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.mobile-sim-info {
  padding: 12px;
}

.mobile-sim-info h2 {
  margin: 8px 0;
  font-size: 22px;
}

.mobile-sim-info p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.8;
}

.mobile-device {
  width: 360px;
  height: 720px;
  margin: 0 auto;
  border: 12px solid #111;
  border-radius: 42px;
  background: #111;
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(15, 23, 42, .22);
  position: relative;
}

.mobile-notch {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  color: #111;
  font-weight: 800;
  z-index: 2;
  pointer-events: none;
}

.mobile-notch::after {
  content: "";
  position: absolute;
  left: 96px;
  right: 96px;
  top: 0;
  height: 24px;
  border-radius: 0 0 16px 16px;
  background: #111;
}

.mobile-screen {
  height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: 30px;
  padding-bottom: 58px;
}

.m-hero {
  min-height: 258px;
  display: grid;
  place-items: center;
  padding-top: 28px;
  background: linear-gradient(135deg, #dbeafe, #fff1f2);
}

.m-hero img {
  width: 92%;
  max-height: 238px;
  object-fit: contain;
}

.m-product-main {
  padding: 12px 14px;
}

.m-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.m-price-row strong {
  color: #e11d48;
  font-size: 22px;
}

.m-price-row del {
  color: #98a2b3;
}

.m-price-row span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 0 6px;
  background: #fecdd3;
  color: #be123c;
}

.m-product-main h1 {
  font-size: 18px;
  line-height: 1.42;
  margin: 10px 0;
  letter-spacing: 0;
}

.m-countdown {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  color: #e11d48;
  margin: 10px 0;
}

.m-countdown b {
  min-width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  background: #fb7185;
}

.m-service-row {
  display: flex;
  gap: 10px;
  color: #667085;
  margin-bottom: 10px;
}

.m-service-row span::before {
  content: "●";
  margin-right: 4px;
  color: #16a34a;
}

.m-package-list {
  display: grid;
  gap: 8px;
}

.m-package-list button {
  min-height: 38px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  font-weight: 800;
}

.m-package-list button.active {
  border-color: #e11d48;
  background: #e11d48;
  color: #fff;
}

.m-selected {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.m-selected strong {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.m-selected div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.m-selected img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border: 1px solid #fecdd3;
  border-radius: 4px;
}

.m-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.m-tabs span {
  height: 44px;
  display: grid;
  place-items: center;
  color: #667085;
}

.m-tabs span.active {
  color: #be123c;
  box-shadow: inset 0 -2px 0 #be123c;
}

.m-detail {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.m-detail article {
  border: 1px solid #f3d2d8;
  border-radius: 5px;
  padding: 10px;
  background: #fff7f8;
}

.m-detail p {
  margin: 6px 0 0;
  color: #475467;
  line-height: 1.65;
}

.m-detail img {
  width: 100%;
  border-radius: 5px;
  background: #f8fafc;
}

.m-policy {
  margin: 10px 0 76px;
  border-top: 1px solid #e5e7eb;
}

.google-policy-notice {
  background: #eaf2f5;
  color: #1f2937;
  padding: 12px 14px;
  font-size: 10px;
  line-height: 1.65;
}

.google-policy-notice p {
  margin: 0 0 4px;
}

.policy-accordion {
  border-bottom: 1px solid #e5e7eb;
  background: #f3f3f3;
}

.policy-accordion summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  list-style: none;
  cursor: pointer;
  color: #111827;
  font-weight: 500;
}

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

.policy-accordion[open] {
  background: #fff;
}

.policy-accordion[open] summary {
  background: #f3f3f3;
  border-bottom: 1px solid #e5e7eb;
}

.policy-copy {
  padding: 14px 15px 18px;
  color: #111827;
  font-size: 11px;
  line-height: 1.75;
}

.policy-copy p {
  margin: 0 0 10px;
}

.policy-copy ol {
  margin: 0 0 10px;
  padding-left: 18px;
}

.policy-copy li {
  margin: 0 0 6px;
}

.m-floating-icons {
  position: sticky;
  bottom: 76px;
  display: grid;
  justify-content: end;
  gap: 6px;
  padding-right: 10px;
  pointer-events: none;
}

.m-floating-icons span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ef4444;
  background: #fff;
  border: 1px solid #fecaca;
}

.m-sticky-buy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  background: #fff;
  border-top: 1px solid var(--line);
}

.m-sticky-buy button {
  border: 0;
  background: #fff;
  color: #e11d48;
  font-weight: 800;
  font-size: 16px;
}

.m-sticky-buy button:last-child {
  background: #fb7185;
  color: #fff;
}

.drawer-mobile-preview {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 140px);
}

.problem-section,
.capsule-section,
.long-detail-section,
.review-section,
.policy-section {
  padding: 38px 44px;
}

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

.problem-grid article {
  min-height: 140px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.problem-grid span {
  color: #be123c;
  font-weight: 900;
}

.problem-grid p {
  color: #475467;
  line-height: 1.7;
}

.capsule-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  background: #fff7ed;
}

.capsule-section span,
.review-section span {
  color: #be123c;
  font-weight: 900;
}

.capsule-section h2,
.review-section h2 {
  font-size: 28px;
}

.capsule-section p,
.review-section p {
  color: #475467;
  line-height: 1.75;
}

.capsule-demo {
  min-height: 220px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #fee2e2);
  padding: 24px;
}

.capsule-demo i {
  height: 90px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8d5bf, #bd7d55);
}

.capsule-demo i:nth-child(2) { background: linear-gradient(180deg, #f2c6a5, #9f6742); }
.capsule-demo i:nth-child(3) { background: linear-gradient(180deg, #e8b184, #7c4a2b); }
.capsule-demo i:nth-child(4) { background: linear-gradient(180deg, #d79a6b, #5f3721); }

.capsule-demo strong {
  grid-column: 1 / -1;
  text-align: center;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.detail-gallery article {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.detail-gallery img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  background: #f8fafc;
}

.detail-gallery div {
  padding: 12px;
}

.detail-gallery p {
  color: #475467;
}

.review-section {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 24px;
  background: #f8fafc;
}

.review-cards {
  display: grid;
  gap: 12px;
}

.review-cards article {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.review-cards strong {
  color: #f59e0b;
}

.policy-section {
  display: grid;
  gap: 0;
  background: #fff;
}

.policy-section .policy-accordion {
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.material-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.material-thumb {
  width: 100%;
  height: 170px;
  border-radius: 0;
  font-size: 32px;
}

.material-body {
  padding: 10px;
}

.form-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 12px;
  align-items: start;
}

.editor-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 12px;
}

.editor-card h2 {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.editor-card h2 small {
  color: var(--muted);
  font-weight: 400;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 36px;
  padding: 18px 24px 26px;
}

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

.company-ad-settings-pane {
  margin: 0;
}

.company-ad-settings-pane .company-ad-pixel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 36px;
  padding: 18px 24px 26px;
}

.company-ad-settings-pane .company-ad-setting-field,
.company-ad-settings-pane .input-line-action,
.company-ad-settings-pane input,
.company-ad-settings-pane select {
  min-width: 0;
  max-width: 100%;
}

.company-ad-settings-pane .company-ad-setting-field {
  margin: 0;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.editor-tabs {
  margin-bottom: 14px;
}

.required,
.required-field::before {
  color: var(--red);
}

.required-field::before {
  content: "* ";
}

.input-line-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.template-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  padding: 20px 24px 28px;
  max-width: 100%;
  overflow: hidden;
}

.editor-card,
.full-editor-card {
  max-width: 100%;
  overflow: hidden;
}

.template-editor-grid > div {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.template-editor-grid .field,
.template-editor-grid .input-line-action,
.template-editor-grid input:not([type="checkbox"]),
.template-editor-grid select,
.template-editor-grid textarea {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.editor-policy-note {
  display: grid;
  gap: 10px;
}

.logistics-panel {
  display: grid;
  gap: 0;
  padding: 0;
}

.logistics-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: center;
  min-height: 72px;
  padding: 18px 24px 22px;
  border-bottom: 1px solid var(--line);
}

.logistics-methods > span {
  flex-basis: 100%;
  color: #1f2937;
}

.logistics-methods .checkbox-line {
  color: #2563eb;
  font-weight: 600;
}

.logistics-methods input[type="checkbox"] {
  accent-color: #2563eb;
}

.logistics-fees {
  align-items: start;
}

.logistics-fees input:disabled {
  background: #eee;
  color: #9ca3af;
}

.logistics-help {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: #98a2b3;
  line-height: 1.7;
  font-size: 12px;
}

.contact-table {
  border: 1px solid var(--line-dark);
  background: #fff;
}

.contact-table label {
  min-height: 36px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.contact-table label:last-child {
  border-bottom: 0;
}

.contact-table span {
  height: 100%;
  display: grid;
  place-items: center;
  background: #fafafa;
  border-right: 1px solid var(--line);
}

.contact-table input {
  border: 0;
  border-radius: 0;
}

.mini-form-table {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.mini-form-table table {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed;
}

.mini-form-table input:not([type="checkbox"]) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mini-form-table th,
.mini-form-table td {
  height: 36px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.mini-form-table input[type="checkbox"],
.template-editor-grid input[type="checkbox"],
.contact-table input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
}

@media (max-width: 1200px) {
  .template-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .template-editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.switch-row {
  display: grid;
  gap: 8px;
  color: #344054;
}

.toggle-switch {
  width: 34px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
}

.toggle-switch.off {
  background: #e5e7eb;
  color: #98a2b3;
}

.recommend-block {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 24px;
}

.checkbox-line {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--blue);
  font-weight: 700;
}

.graphic-settings {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  padding: 18px 24px 28px;
}

.graphic-upload-column {
  display: grid;
  gap: 24px;
}

.upload-field {
  display: grid;
  gap: 8px;
}

.upload-field label,
.editor-label {
  color: #344054;
  font-weight: 600;
}

.upload-field p {
  margin: 0;
  color: #98a2b3;
  line-height: 1.7;
}

.upload-box {
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px dashed #cfd5df;
  background: #f7f7f7;
  color: #8a93a3;
  cursor: pointer;
}

.upload-box input {
  display: none;
}

.upload-box b {
  font-size: 30px;
  font-weight: 300;
}

.upload-box.small {
  width: 54px;
  height: 54px;
}

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.graphic-editor-column {
  display: grid;
  gap: 10px;
}

.large-rich .rich-body {
  min-height: 470px;
}

.rich-toolbar-wrap {
  height: auto;
  min-height: 70px;
  flex-wrap: wrap;
  align-content: center;
}

.rich-toolbar-wrap button {
  min-width: 26px;
}

.rich-status {
  min-height: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  color: #98a2b3;
  padding: 0 8px;
}

.full-editor-card {
  margin-bottom: 70px;
}

.draft-layout {
  grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr);
}

.draft-output {
  margin-bottom: 24px;
}

.draft-output article {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 12px;
  white-space: normal;
  line-height: 1.6;
}

.draft-output article p {
  margin-top: 8px;
  color: #475467;
}

.script-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px 18px;
}

.script-list article {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 12px;
  color: #344054;
  line-height: 1.6;
}

.inline-footer {
  position: static;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  margin: 0;
}

.spec-head-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 26px 70px;
  padding: 28px 34px 24px;
}

.spec-option-box {
  position: relative;
  margin: 0 34px 26px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  background: #f7f8fa;
}

.spec-option-box .btn.text {
  justify-self: start;
}

.spec-image-upload {
  display: grid;
  gap: 16px;
  align-content: start;
}

.subsection-title {
  border-top: 1px solid var(--line);
}

.spec-detail-table {
  margin: 16px 34px 28px;
  width: calc(100% - 68px);
}

.marketing-editor {
  min-height: calc(100vh - 150px);
}

.marketing-type {
  min-height: 76px;
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 0 34px;
}

.marketing-type label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.marketing-grid {
  display: grid;
  grid-template-columns: 270px 420px 200px 200px 200px 58px 110px;
  gap: 18px;
  align-items: end;
  padding: 18px 34px 28px;
}

.package-upload-cell {
  display: grid;
  gap: 8px;
}

.ab-rule-card,
.landing-check-card {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  background: #eff6ff;
  color: #1d4ed8;
}

.ab-rule-card small,
.landing-check-card small {
  color: #475467;
  line-height: 1.6;
}

.desktop-landing-hidden {
  display: none;
}

.right-anchor {
  position: sticky;
  top: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 0;
}

.right-anchor button {
  width: 100%;
  height: 34px;
  border: 0;
  background: transparent;
  text-align: left;
  color: #475467;
  padding: 0 12px;
}

.right-anchor button.active,
.right-anchor button:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.editor-footer {
  position: sticky;
  bottom: 0;
  height: 56px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  padding: 0 18px;
  z-index: 3;
}

.editor-footer.inline-footer {
  position: static;
  margin: 0;
}

.rich-editor {
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: #fff;
}

.rich-toolbar {
  height: 38px;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.rich-toolbar button {
  width: 28px;
  height: 26px;
  border: 1px solid var(--line-dark);
  background: #fff;
  border-radius: 3px;
}

.rich-toolbar.rich-toolbar-wrap {
  min-height: 50px;
  height: auto;
  align-items: flex-start;
  align-content: flex-start;
  padding: 8px;
}

.rich-toolbar.rich-toolbar-wrap button {
  width: auto;
  min-width: 28px;
  max-width: 92px;
  height: 26px;
  padding: 0 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 24px;
}

.rich-body {
  min-height: 150px;
  padding: 12px;
  color: var(--text);
  outline: none;
}

.package-table {
  width: 100%;
  min-width: 0;
}

.hidden-file {
  display: none;
}

.status-select {
  min-height: 28px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: #fff;
}

.risk-high-row {
  background: #fff1f2;
}

.finance-positive {
  color: var(--green);
}

.finance-negative {
  color: var(--red);
}

.finance-kpis {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.diagnostics-grid span {
  min-height: 36px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 0 10px;
  color: #344054;
}

.variant-editor-list {
  display: grid;
  gap: 14px;
  padding: 18px 24px 26px;
}

.variant-editor-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.variant-editor-card header {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.variant-editor-card header .link {
  margin-left: auto;
}

.m-variant-copy {
  margin: 8px 0 0;
  color: #475467;
  line-height: 1.55;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(17, 24, 39, .52);
  z-index: 20;
}

.drawer-backdrop.open {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(1120px, 84vw);
  height: 100vh;
  background: #fff;
  box-shadow: -16px 0 38px rgba(15, 23, 42, .18);
  transform: translateX(103%);
  transition: transform .18s ease;
  z-index: 21;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr) 56px;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head,
.drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-foot {
  justify-content: flex-end;
  gap: 10px;
  border-bottom: 0;
  border-top: 1px solid var(--line);
}

.drawer-body {
  overflow: auto;
  padding: 16px;
}

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

.template-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.template-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(18, 99, 241, .12);
}

.template-preview {
  height: 220px;
  display: grid;
  align-content: end;
  padding: 12px;
  color: #fff;
  background: linear-gradient(160deg, #1f2937, #2563eb 55%, #f97316);
}

.template-preview.light {
  background: linear-gradient(160deg, #fef3c7, #38bdf8 55%, #fff);
  color: #111827;
}

.template-preview.green {
  background: linear-gradient(160deg, #064e3b, #22c55e 55%, #fde68a);
}

.template-card footer {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-phone {
  width: 280px;
  min-height: 560px;
  margin: 0 auto;
  border: 10px solid #111827;
  border-radius: 28px;
  background: #fff;
  overflow: hidden;
}

.phone-hero {
  height: 210px;
  display: grid;
  align-items: end;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, #312e81, #2563eb, #f97316);
  position: relative;
  overflow: hidden;
}

.phone-hero.rose {
  background: linear-gradient(135deg, #831843, #e11d48, #fbbf24);
}

.phone-hero img {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 128px;
  height: 128px;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .22));
}

.phone-hero h2,
.phone-hero p {
  position: relative;
  z-index: 1;
}

.phone-body {
  padding: 14px;
}

.phone-price {
  color: var(--red);
  font-size: 22px;
  font-weight: 800;
}

.phone-btn {
  height: 40px;
  display: grid;
  place-items: center;
  margin-top: 12px;
  border-radius: 20px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
}

.empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 4px;
  background: #111827;
  color: #fff;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .16s ease, transform .16s ease;
  z-index: 50;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

.kpi {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  padding: 13px;
}

.kpi span {
  color: var(--muted);
}

.kpi strong {
  display: block;
  font-size: 22px;
  margin-top: 8px;
}

.landing-template-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.landing-template-side {
  position: sticky;
  top: 58px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 16px;
}

.stage7-device {
  display: grid;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
}

.stage7-phone {
  width: 390px;
  height: 780px;
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr);
  border: 10px solid #111827;
  border-radius: 34px;
  background: #111827;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .22);
}

.stage7-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #fff;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.stage7-status b,
.stage7-status i {
  width: 34px;
  height: 7px;
  border-radius: 999px;
  background: #111827;
}

.stage7-status i {
  width: 18px;
}

.stage7-screen {
  position: relative;
  overflow: auto;
  background: #fff;
  color: #111827;
}

.stage7-screen h1 {
  font-size: 28px;
  line-height: 1.22;
}

.stage7-screen h2 {
  font-size: 20px;
}

.l-hero {
  padding: 18px;
}

.l-hero .landing-visual {
  width: 100%;
  object-fit: contain;
}

.landing-css-placeholder {
  min-height: 210px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fafc, #dbeafe);
}

.landing-css-placeholder span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
  font-size: 36px;
  font-weight: 900;
}

.l-hero.classic .landing-visual {
  height: 245px;
  border-radius: 18px;
  background: #f8fafc;
}

.classic-copy {
  display: grid;
  gap: 10px;
  padding: 16px 2px 0;
}

.l-hero.poster {
  padding: 0;
  background: #fff1f2;
}

.poster-bg {
  min-height: 430px;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: linear-gradient(160deg, #ffe4e6, #fff 58%, #fce7f3);
}

.poster-bg .landing-visual {
  position: absolute;
  top: 30px;
  right: 18px;
  width: 72%;
  max-height: 300px;
  filter: drop-shadow(0 20px 28px rgba(190, 24, 93, .18));
}

.poster-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 24px;
  color: #831843;
}

.poster-copy span {
  width: fit-content;
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  font-weight: 800;
}

.l-hero.trust {
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, #eff6ff, #fff);
}

.trust-labels,
.l-trust {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trust-labels span,
.l-trust span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.trust-hero-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.trust-hero-card .landing-visual {
  height: 130px;
}

.trust-hero-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #344054;
}

.l-hero.flash {
  display: grid;
  gap: 12px;
  background: linear-gradient(180deg, #dc2626, #fff7ed 68%, #fff);
  color: #fff;
}

.l-hero.flash .landing-visual {
  height: 230px;
  border-radius: 18px;
  background: #fff;
}

.l-hero.flash h1,
.l-hero.flash p {
  color: #111827;
}

.flash-countdown,
.package-timer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-countdown b,
.package-timer b {
  min-width: 34px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #111827;
  color: #fff;
}

.l-price {
  display: grid;
  gap: 4px;
  margin: 0 14px 12px;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.l-price strong {
  color: #dc2626;
  font-size: 32px;
  font-weight: 900;
}

.price-ribbon {
  border-radius: 0 22px 22px 0;
  margin-left: 0;
  background: #be185d;
  color: #fff;
}

.price-ribbon strong,
.price-ribbon small {
  color: #fff;
}

.price-calm {
  background: #eff6ff;
  box-shadow: none;
}

.price-flash {
  background: #fff7ed;
  border: 2px solid #fed7aa;
}

.l-trust {
  padding: 0 14px 12px;
}

.template-flash-sale .l-trust span {
  border-color: #fed7aa;
  color: #c2410c;
}

.l-section {
  margin: 12px 14px;
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.l-section header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.l-section header span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.package-options {
  display: grid;
  gap: 10px;
}

.package-option {
  display: grid;
  gap: 5px;
  min-height: 82px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  text-align: left;
}

.package-option span {
  color: #667085;
  font-size: 12px;
}

.package-option b {
  color: #dc2626;
  font-size: 20px;
}

.package-option.active {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .1);
}

.package-card .package-options {
  grid-template-columns: 1fr;
}

.package-card .package-option {
  border-radius: 18px;
  background: #fff7fb;
  box-shadow: 0 10px 18px rgba(190, 24, 93, .1);
}

.package-list .package-option {
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  min-height: 58px;
  background: #eff6ff;
}

.package-flash {
  background: #fff7ed;
}

.package-flash .package-option {
  border-color: #fb923c;
  background: #fff;
}

.detail-html {
  display: grid;
  gap: 10px;
  color: #344054;
  line-height: 1.65;
}

.detail-cover .landing-visual {
  height: 220px;
  border-radius: 14px;
  background: #f8fafc;
}

.detail-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.detail-image-grid img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
}

.l-faq details,
.policy-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
  padding: 10px 12px;
}

.l-faq summary,
.policy-accordion summary {
  font-weight: 800;
}

.l-faq p,
.policy-copy {
  color: #475467;
  line-height: 1.65;
}

.landing-order-form.stage7 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cart-summary {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
}

.cart-product {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.cart-product img,
.cart-product span {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
}

.cart-product span {
  display: grid;
  place-items: center;
  color: #2563eb;
  font-weight: 900;
}

.cart-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 0;
}

.cart-summary dt {
  color: #667085;
}

.checkout-group {
  display: grid;
  gap: 8px;
  border-top: 1px solid #eef2f7;
  padding-top: 12px;
}

.checkout-group h3 {
  font-size: 14px;
}

.cod-pay {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  font-weight: 800;
}

.landing-order-form.stage7 input,
.landing-order-form.stage7 select,
.landing-order-form.stage7 textarea {
  min-height: 42px;
  border-radius: 10px;
}

.landing-order-form.stage7 button {
  min-height: 48px;
  border-radius: 999px;
  background: #dc2626;
}

.template-beauty-pink .landing-order-form.stage7 button {
  background: #be185d;
}

.template-trust-blue .landing-order-form.stage7 button {
  background: #2563eb;
}

.template-flash-sale .landing-order-form.stage7 button {
  background: #ea580c;
}

.l-sticky {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.l-sticky button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.cta-double button:first-child {
  flex: .6;
  background: #eff6ff;
  color: #1d4ed8;
}

.cta-double .order-lookup-link {
  display:flex;
  min-height:44px;
  flex:.6;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:900;
  text-decoration:none;
}

.cta-double button:last-child,
.cta-single button,
.cta-bar button {
  flex: 1;
  background: #dc2626;
}

.cta-icon button:nth-child(1),
.cta-icon button:nth-child(2) {
  width: 46px;
  padding: 0;
  background: #fff1f2;
  color: #be185d;
}

.cta-icon button:last-child {
  flex: 1;
  background: #be185d;
}

.cta-bar {
  background: #111827;
  color: #fff;
}

.cta-bar strong {
  color: #fed7aa;
  font-size: 20px;
}

.safe-area {
  height: 18px;
}

.template-picker-stage7 {
  display: grid;
  gap: 14px;
}

.template-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.template-filter-tabs button {
  min-height: 32px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
}

.template-filter-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.template-picker-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}

.template-picker-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.template-picker-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 99, 241, .12);
}

.template-card-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-tags i {
  border-radius: 999px;
  background: #f2f4f7;
  padding: 4px 8px;
  color: #475467;
  font-style: normal;
  font-size: 12px;
}

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

.template-info-panel.stage7 {
  position: sticky;
  top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.template-info-panel.stage7 p {
  color: #475467;
  line-height: 1.65;
}

.template-thumb-phone {
  width: 132px;
  height: 236px;
  display: grid;
  grid-template-rows: 18px 1fr;
  border: 7px solid #111827;
  border-radius: 22px;
  background: #111827;
  overflow: hidden;
}

.thumb-status {
  display: flex;
  align-items: center;
  padding-left: 10px;
  background: #fff;
  color: #111827;
  font-size: 9px;
  font-weight: 900;
}

.thumb-screen {
  position: relative;
  overflow: hidden;
  background: #fff;
  font-size: 9px;
}

.template-mini-placeholder,
.thumb-screen img {
  width: 100%;
  object-fit: contain;
}

.template-mini-placeholder {
  height: 70px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #1d4ed8;
  font-size: 22px;
  font-weight: 900;
}

.mini-hero.large {
  height: 72px;
  background: #eff6ff;
}

.mini-hero.large img {
  height: 72px;
}

.mini-copy,
.mini-soft-card {
  display: grid;
  gap: 4px;
  padding: 7px;
}

.mini-trust-row,
.mini-package-buttons,
.mini-card-packages,
.mini-list-packages,
.mini-faq-lines {
  display: flex;
  gap: 4px;
}

.mini-trust-row span,
.mini-package-buttons b {
  border-radius: 999px;
  background: #eff6ff;
  padding: 3px 5px;
  font-size: 8px;
}

.mini-price {
  color: #dc2626;
  font-size: 16px;
  font-weight: 900;
}

.mini-package-buttons .active {
  background: #dc2626;
  color: #fff;
}

.mini-sticky {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: #fff;
}

.mini-sticky b,
.mini-sticky span {
  flex: 1;
  border-radius: 999px;
  text-align: center;
  padding: 4px 3px;
  background: #dc2626;
  color: #fff;
}

.mini-sticky span {
  background: #eff6ff;
  color: #1d4ed8;
}

.template-beauty-pink .thumb-screen {
  background: #fff1f2;
}

.mini-poster {
  height: 92px;
  position: relative;
  display: grid;
  align-items: end;
  background: linear-gradient(150deg, #ffe4e6, #fce7f3);
  padding: 6px;
  color: #9f1239;
  font-weight: 900;
}

.mini-poster img {
  position: absolute;
  right: 5px;
  top: 7px;
  width: 68px;
  height: 68px;
}

.mini-price.ribbon {
  margin: 6px 0;
  border-radius: 0 999px 999px 0;
  background: #be185d;
  color: #fff;
  padding: 5px 8px;
}

.mini-card-packages i,
.mini-list-packages i,
.mini-faq-lines span,
.mini-quick-form i {
  flex: 1;
  height: 18px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #fbcfe8;
}

.template-trust-blue .thumb-screen {
  background: #eff6ff;
}

.mini-trust-head {
  display: flex;
  justify-content: space-between;
  padding: 7px;
  color: #1d4ed8;
  font-weight: 900;
}

.mini-question-card {
  margin: 6px;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.mini-list-packages,
.mini-faq-lines {
  display: grid;
  gap: 5px;
  padding: 0 7px 7px;
}

.template-flash-sale .thumb-screen {
  background: #fff7ed;
}

.mini-flash-timer {
  display: flex;
  gap: 4px;
  padding: 7px;
  background: #dc2626;
}

.mini-flash-timer b {
  flex: 1;
  border-radius: 4px;
  background: #111827;
  color: #fff;
  text-align: center;
}

.mini-flash-hero {
  position: relative;
  height: 85px;
  background: #fff;
}

.mini-flash-hero img {
  height: 82px;
}

.mini-flash-hero strong {
  position: absolute;
  right: 6px;
  bottom: 6px;
  color: #dc2626;
  font-size: 14px;
}

.mini-flash-pack {
  margin: 7px;
  border-radius: 8px;
  background: #fff;
  padding: 7px;
}

.template-preview-stage7 {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
}

.template-preview-copy {
  display: grid;
  gap: 12px;
}

/* Mobile landing polish */
.stage8-device {
  padding: var(--space-xl);
  border: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.stage8-phone {
  width: var(--mobile-width);
  height: 780px;
  grid-template-rows: 32px minmax(0, 1fr);
  border: 10px solid #0f172a;
  border-radius: 36px;
  box-shadow: var(--shadow-float);
}

.stage8-status {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.stage8-screen {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  padding-bottom: 0;
}

.stage8-screen::-webkit-scrollbar {
  width: 4px;
}

.stage8-screen::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, .18);
  border-radius: 999px;
}

.template-conversion-classic .stage8-screen {
  background: #f7f9fc;
}

.template-beauty-pink .stage8-screen {
  background: linear-gradient(180deg, #fff1f5, #fff 44%, #fff7fb);
}

.template-trust-blue .stage8-screen {
  background: linear-gradient(180deg, #eff6ff, #fff 42%, #f8fafc);
}

.template-flash-sale .stage8-screen {
  background: linear-gradient(180deg, #b91c1c, #fff7ed 34%, #fff);
}

.s8-hero {
  position: relative;
  overflow: hidden;
}

.s8-classic-hero {
  padding: 16px;
  background: #fff;
}

.s8-hero-media {
  height: 280px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #eef6ff, #fff);
  overflow: hidden;
}

.s8-hero-media .landing-visual {
  width: 88%;
  height: 245px;
  object-fit: contain;
}

.s8-hero-copy {
  display: grid;
  gap: 10px;
  padding: 16px 2px 0;
}

.s8-hero-copy p,
.beauty-copy p,
.s8-trust-hero p,
.s8-flash-hero p {
  margin: 0;
  color: #475467;
  line-height: 1.7;
}

.s8-hero-copy button,
.beauty-copy button,
.s8-flash-hero button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.s8-hero-copy button {
  background: #dc2626;
}

.s8-trust-pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.s8-trust-pills span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.s8-price-inline strong,
.s8-price-card strong {
  color: #dc2626;
  font-size: 30px;
  font-weight: 950;
}

.s8-price-inline del,
.s8-price-card del {
  margin-left: 8px;
  color: #98a2b3;
}

.s8-beauty-hero {
  min-height: 470px;
  display: grid;
  align-content: end;
  padding: 24px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .75), transparent 25%),
    linear-gradient(155deg, #f9a8d4, #fff1f2 52%, #fff);
}

.soft-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
}

.soft-dot.one {
  width: 72px;
  height: 72px;
  top: 34px;
  left: 28px;
}

.soft-dot.two {
  width: 36px;
  height: 36px;
  top: 96px;
  right: 50px;
}

.beauty-label {
  position: relative;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #9f1239;
  padding: 7px 12px;
  font-weight: 900;
}

.beauty-floating {
  position: absolute;
  top: 68px;
  right: -12px;
  width: 78%;
  height: 250px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 22px 30px rgba(190, 24, 93, .22));
}

.beauty-floating .landing-visual {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
}

.beauty-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.beauty-copy h1 {
  color: #831843;
  font-size: 31px;
}

.beauty-copy button {
  background: #be185d;
  box-shadow: 0 12px 22px rgba(190, 24, 93, .24);
}

.s8-trust-hero {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(180deg, #dbeafe, #fff);
}

.trust-step-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.trust-step-row span {
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  font-weight: 900;
}

.trust-info-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .92);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.trust-info-card .landing-visual {
  height: 130px;
  object-fit: contain;
}

.trust-info-card span {
  display: block;
  margin-top: 6px;
  color: #475467;
  line-height: 1.55;
}

.s8-flash-hero {
  padding: 0 14px 18px;
  color: #fff;
}

.flash-topbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 -14px 14px;
  padding: 0 14px;
  background: #111827;
}

.flash-topbar span {
  margin-right: auto;
  font-weight: 900;
}

.flash-topbar b {
  min-width: 34px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  color: #b91c1c;
}

.flash-hero-grid {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: var(--radius-xl);
  background: #fff;
  color: #111827;
  padding: 14px;
  box-shadow: var(--shadow-card);
}

.flash-hero-grid .landing-visual {
  height: 170px;
  object-fit: contain;
}

.flash-badge {
  display: inline-flex;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 5px 9px;
  font-weight: 900;
}

.flash-hero-grid strong {
  display: block;
  color: #dc2626;
  font-size: 30px;
  font-weight: 950;
  margin: 8px 0;
}

.flash-hero-grid button {
  background: #ea580c;
}

.s8-price-card {
  display: grid;
  gap: 5px;
  margin: 12px 14px;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.s8-price-card span {
  color: #667085;
  font-weight: 900;
}

.s8-price-card p {
  margin: 0;
  color: #475467;
}

.s8-price-card.beauty {
  background: linear-gradient(135deg, #be185d, #fb7185);
  color: #fff;
}

.s8-price-card.beauty strong,
.s8-price-card.beauty span,
.s8-price-card.beauty p,
.s8-price-card.beauty del {
  color: #fff;
}

.s8-price-card.trust {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  box-shadow: none;
}

.s8-price-card.flash {
  border: 2px solid #fed7aa;
  background: #fff7ed;
}

.s8-guarantee > div,
.s8-scenario > div,
.problem-flow {
  display: grid;
  gap: 10px;
}

.s8-guarantee article,
.s8-scenario article,
.problem-flow article {
  border-radius: var(--radius-md);
  background: #f8fafc;
  padding: 12px;
  line-height: 1.6;
}

.s8-guarantee b {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  margin-right: 8px;
}

.template-beauty-pink .s8-scenario article {
  background: #fff1f2;
  color: #9f1239;
}

.template-trust-blue .problem-flow article {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.landing-order-form.stage8 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.checkout-card {
  display: grid;
  gap: 10px;
  border: 1px solid #edf0f5;
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.checkout-card h3 {
  font-size: 15px;
  color: #111827;
}

.checkout-card label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.checkout-card input,
.checkout-card textarea,
.checkout-card select {
  min-height: 44px;
  border-radius: var(--radius-sm);
  border-color: #dbe1ea;
}

/* Taiwan COD order template v2 */
.landing-order-form.stage8,
.premium-checkout-form.landing-order-form {
  --cod-red: #e53e35;
  --cod-red-dark: #c92f28;
  --cod-ink: #172033;
  --cod-muted: #667085;
  --cod-line: #e4e7ec;
  --cod-soft: #f8fafc;
  width: 100%;
  min-width: 0;
  padding-bottom: 96px;
}

.landing-order-form .checkout-card {
  min-width: 0;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #e6e9ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .055);
}

.checkout-group-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.checkout-group-heading .checkout-step {
  flex: 0 0 28px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #fff0ef;
  color: var(--cod-red);
  font-size: 13px;
  font-weight: 900;
}

.checkout-group-heading h3 {
  margin: 1px 0 2px;
  color: var(--cod-ink);
  font-size: 16px;
  line-height: 1.3;
}

.checkout-group-heading p {
  margin: 0;
  color: var(--cod-muted);
  font-size: 12px;
  line-height: 1.45;
}

.landing-order-form .checkout-group > label:not(.shipping-method-card):not(.cod-pay) {
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.landing-order-form .required {
  display: inline-flex;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: #fff0ef;
  color: #d92d20;
  font-size: 10px;
  font-weight: 850;
  vertical-align: 1px;
}

.landing-order-form input,
.landing-order-form select,
.landing-order-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  color: var(--cod-ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.landing-order-form textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
}

.landing-order-form input:focus,
.landing-order-form select:focus,
.landing-order-form textarea:focus {
  border-color: var(--cod-red);
  box-shadow: 0 0 0 3px rgba(229, 62, 53, .12);
}

.landing-order-form .is-invalid {
  border-color: #d92d20 !important;
  background: #fff8f7 !important;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .1) !important;
}

.landing-order-form select:disabled {
  cursor: not-allowed;
  background: #f2f4f7;
  color: #98a2b3;
}

.field-assist {
  display: block;
  color: var(--cod-muted);
  font-size: 11px;
  line-height: 1.55;
}

.shipping-method-cards {
  display: grid;
  gap: 10px;
}

.shipping-method-card {
  position: relative;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) auto 20px;
  min-height: 70px;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1.5px solid var(--cod-line);
  border-radius: 14px;
  background: #fff;
  color: var(--cod-ink);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.shipping-method-card:active {
  transform: scale(.99);
}

.shipping-method-card.is-selected {
  border-color: var(--cod-red);
  background: #fff8f7;
  box-shadow: 0 0 0 3px rgba(229, 62, 53, .08);
}

.shipping-method-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.shipping-method-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  background: #f2f4f7;
  font-size: 20px;
}

.shipping-method-card.is-selected .shipping-method-icon {
  background: #ffe8e6;
}

.shipping-method-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.shipping-method-copy strong {
  color: var(--cod-ink);
  font-size: 14px;
}

.shipping-method-copy small {
  color: var(--cod-muted);
  font-size: 11px;
}

.shipping-method-card em {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--cod-red);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.shipping-method-card > i,
.cod-pay > i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1.5px solid #cbd1da;
  border-radius: 50%;
}

.shipping-method-card.is-selected > i,
.cod-pay > i {
  border: 5px solid var(--cod-red);
  background: #fff;
}

.taiwan-area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
}

.taiwan-area-grid label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.taiwan-area-grid .district-field {
  grid-column: 1 / -1;
}

.cod-pay {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  min-height: 78px;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1.5px solid #f3a19b;
  border-radius: 14px;
  background: #fff8f7;
  color: var(--cod-ink);
}

.cod-pay input {
  position: absolute;
  width: 1px;
  min-height: 0;
  opacity: 0;
}

.cod-pay-icon {
  font-size: 24px;
}

.cod-pay > span:nth-of-type(2) {
  display: grid;
  gap: 4px;
}

.cod-pay strong {
  color: var(--cod-ink);
  font-size: 15px;
}

.cod-pay small {
  color: var(--cod-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.cod-payment-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cod-payment-trust span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 10px;
  font-weight: 750;
}

.cod-order-submit-bar {
  position: sticky;
  z-index: 18;
  bottom: calc(68px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(92px, 104px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 4px -4px 0;
  padding: 10px;
  border: 1px solid rgba(208, 213, 221, .85);
  border-radius: 17px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -8px 28px rgba(17, 24, 39, .12);
  backdrop-filter: blur(14px);
}

.cod-order-submit-bar > div {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding-left: 4px;
}

.cod-order-submit-bar > div span,
.cod-order-submit-bar > div small {
  overflow: hidden;
  color: var(--cod-muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cod-order-submit-bar > div strong {
  overflow: hidden;
  color: var(--cod-red);
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cod-order-submit-bar > button {
  display: grid;
  min-width: 0;
  min-height: 54px;
  place-content: center;
  gap: 1px;
  padding: 8px 12px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cod-red), var(--cod-red-dark));
  box-shadow: 0 9px 18px rgba(201, 47, 40, .28);
  color: #fff;
  cursor: pointer;
}

.cod-order-submit-bar > button span {
  font-size: 16px;
  font-weight: 900;
}

.cod-order-submit-bar > button small {
  color: rgba(255, 255, 255, .82);
  font-size: 9px;
}

@media (max-width: 390px) {
  .landing-order-form.stage8,
  .premium-checkout-form.landing-order-form,
  .landing-order-form .checkout-card,
  .taiwan-area-grid,
  .shipping-method-card,
  .cod-order-submit-bar {
    max-width: 100%;
    box-sizing: border-box;
  }

  .landing-order-form .checkout-card {
    padding: 16px 14px;
  }

  .shipping-method-card {
    grid-template-columns: 38px minmax(0, 1fr) auto 18px;
    padding: 11px;
  }
}

@media (max-width: 350px) {
  .taiwan-area-grid {
    grid-template-columns: 1fr;
  }

  .taiwan-area-grid .district-field {
    grid-column: auto;
  }

  .shipping-method-card em {
    display: none;
  }
}

.shipping-radio-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.radio-card {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  gap: 6px;
  border: 1px solid #dbe1ea;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: #fff;
}

.radio-card input {
  width: auto;
  min-height: auto;
}

.radio-card.cod-pay {
  display: flex !important;
  gap: 8px;
  border-radius: var(--radius-md);
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.radio-card.cod-pay input {
  width: auto;
  min-height: auto;
}

.landing-order-form.stage8 > button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
  background: #dc2626;
  box-shadow: 0 12px 22px rgba(220, 38, 38, .24);
}

.template-beauty-pink .landing-order-form.stage8 > button {
  background: #be185d;
  box-shadow: 0 12px 22px rgba(190, 24, 93, .22);
}

.template-trust-blue .landing-order-form.stage8 > button {
  background: #2563eb;
  box-shadow: 0 12px 22px rgba(37, 99, 235, .2);
}

.template-flash-sale .landing-order-form.stage8 > button {
  background: #ea580c;
  box-shadow: 0 12px 22px rgba(234, 88, 12, .24);
}

.policy-accordion {
  border: 0;
  border-radius: var(--radius-md);
  background: #f8fafc;
  padding: 0;
  overflow: hidden;
}

.policy-accordion + .policy-accordion {
  margin-top: 8px;
}

.policy-accordion summary {
  min-height: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
}

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

.policy-accordion[open] {
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.policy-accordion[open] summary b {
  transform: rotate(180deg);
}

.policy-copy {
  padding: 0 14px 14px;
}

.template-picker-card {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.template-picker-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

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

.drawer {
  width: min(1240px, 92vw);
}

.drawer.template-preview-drawer {
  width: min(900px, 90vw);
}

.template-preview-stage7 {
  grid-template-columns: 300px minmax(390px, 1fr);
  gap: 24px;
  align-items: start;
}

.template-preview-stage7 .stage8-device {
  padding: 0;
  background: transparent;
}

.template-preview-stage7 .mobile-preview-frame .stage8-device,
.template-preview-stage7 .mobile-preview-frame .stage7-device {
  padding: 0 !important;
  background: transparent !important;
}

@media (max-width: 860px) {
  .drawer.template-preview-drawer {
    width: min(100vw, 720px);
  }

  .template-large-preview,
  .template-preview-stage7 {
    grid-template-columns: 1fr;
  }
}

.variant-template-summary {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.variant-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.variant-metrics span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #fff;
  padding: 0 10px;
  color: #475467;
}

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

/* Quality and workflow polish */
.stage8-screen {
  padding-bottom: 120px;
}

.safe-area {
  height: 120px;
}

.template-conversion-classic .s8-classic-hero {
  border-bottom: 1px solid #edf2f7;
  background:
    linear-gradient(180deg, rgba(29, 78, 216, .04), transparent 42%),
    #fff;
}

.template-conversion-classic .s8-hero-media {
  border: 1px solid #e6edf7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.template-conversion-classic .s8-price-card.classic {
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #fee2e2;
  background: linear-gradient(135deg, #fff, #fff5f5);
}

.template-conversion-classic .l-trust {
  margin: 12px 14px;
  padding: 10px;
  border-radius: 18px;
  background: #eff6ff;
}

.template-beauty-pink .stage8-phone {
  border-color: #831843;
}

.template-beauty-pink .s8-beauty-hero {
  border-radius: 0 0 34px 34px;
  box-shadow: 0 18px 30px rgba(190, 24, 93, .14);
}

.template-beauty-pink .l-section {
  margin: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 32px rgba(190, 24, 93, .08);
}

.template-beauty-pink .package-option {
  border-radius: 22px;
  border-color: #fbcfe8;
  background: linear-gradient(180deg, #fff, #fff7fb);
}

.template-beauty-pink .package-option.active {
  border-color: #be185d;
  box-shadow: 0 12px 24px rgba(190, 24, 93, .16);
}

.template-beauty-pink .checkout-card {
  border-radius: 24px;
  border-color: #fce7f3;
}

.template-trust-blue .s8-trust-hero {
  border-bottom: 1px solid #bfdbfe;
}

.template-trust-blue .trust-step-row span {
  position: relative;
}

.template-trust-blue .trust-step-row span::after {
  content: "";
  position: absolute;
  right: -7px;
  width: 6px;
  height: 2px;
  background: #93c5fd;
}

.template-trust-blue .trust-step-row span:last-child::after {
  display: none;
}

.template-trust-blue .l-faq details {
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #fff;
}

.template-trust-blue .package-option {
  display: grid;
  grid-template-columns: 1fr auto;
  text-align: left;
  border-radius: 14px;
}

.template-flash-sale .flash-topbar {
  box-shadow: 0 12px 26px rgba(17, 24, 39, .22);
}

.template-flash-sale .s8-price-card.flash {
  border: 0;
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
  box-shadow: 0 16px 28px rgba(234, 88, 12, .16);
}

.template-flash-sale .package-option {
  border: 2px solid #fed7aa;
  border-radius: 18px;
  background: #fff;
}

.template-flash-sale .package-option.active {
  border-color: #dc2626;
  background: linear-gradient(135deg, #fff7ed, #fff);
  box-shadow: 0 14px 24px rgba(220, 38, 38, .16);
}

.template-flash-sale .l-sticky.cta-bar {
  min-height: 72px;
  border-top: 0;
  background: linear-gradient(90deg, #111827, #b91c1c);
  color: #fff;
  box-shadow: 0 -16px 30px rgba(185, 28, 28, .22);
}

.package-option {
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.package-option:hover {
  transform: translateY(-1px);
}

.package-option.active {
  outline: 0;
}

.l-sticky {
  position: sticky;
  bottom: 0;
  z-index: 9;
}

.landing-order-form.stage8 > button {
  margin-bottom: 18px;
}

.mini-form-lines,
.mini-quick-form {
  display: grid;
  gap: 4px;
  padding: 7px;
  border-radius: 10px;
  background: #fff;
}

.mini-form-lines i,
.mini-quick-form i {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: #e5e7eb;
}

.mini-form-lines.pink {
  background: #fff1f2;
}

.mini-form-lines.blue {
  background: #eff6ff;
}

.mini-policy-line {
  height: 18px;
  border-radius: 8px;
  background: rgba(255, 247, 237, .95);
}

.mini-poster > i {
  position: absolute;
  width: 38px;
  height: 38px;
  right: 10px;
  top: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
}

.mini-card-packages .active {
  background: #be185d;
}

.mini-question-card img,
.mini-question-card .template-mini-placeholder {
  width: 46px;
  height: 46px;
  float: right;
  margin-left: 6px;
}

.template-picker-card.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12), var(--shadow-card);
}

.template-quality-panel {
  margin-top: 16px;
}

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

.quality-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.quality-card header,
.check-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quality-card header span,
.check-summary span {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 9px;
  font-weight: 800;
}

.quality-items,
.check-list {
  display: grid;
  gap: 8px;
}

.quality-items span,
.check-item {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 6px 10px;
  background: #f8fafc;
  color: #475467;
}

.quality-items .pass,
.check-item.ok strong {
  color: #15803d;
}

.quality-items .missing,
.check-item.danger strong {
  color: #dc2626;
}

.check-item.warning strong {
  color: #f97316;
}

.system-check-result {
  display: grid;
  gap: 14px;
}

.check-item {
  justify-content: flex-start;
}

.check-item strong {
  min-width: 52px;
}

.check-item small {
  margin-left: auto;
  color: #98a2b3;
}

.storage-usage {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.storage-usage span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f8fafc;
  padding: 0 10px;
  color: #475467;
}

.storage-usage .storage-warning {
  background: #fff7ed;
  color: #c2410c;
}

.storage-usage .storage-ok {
  background: #ecfdf3;
  color: #15803d;
}

/* Pipeline and batch workflow */
.mobile-device {
  padding: var(--space-xl);
  border: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.mobile-phone {
  width: var(--mobile-width);
  height: 780px;
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  border: 10px solid #0f172a;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--shadow-float);
}

.mobile-status {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.mobile-screen {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  padding-bottom: 120px;
}

.mobile-sticky-cta {
  position: sticky;
  bottom: 0;
  z-index: 9;
}

.mobile-checkout-form {
  display: grid;
  grid-template-columns: 1fr;
}

.tag.gray {
  background: #f2f4f7;
  color: #475467;
}

.tag.blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.tag.purple {
  background: #f5f3ff;
  color: #6d28d9;
}

.tag.yellow {
  background: #fef9c3;
  color: #a16207;
}

.tag.red {
  background: #fee2e2;
  color: #b91c1c;
}

.inline-select {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid #dbe1ea;
  padding: 0 10px;
  background: #fff;
}

.batch-panel,
.pipeline-panel,
.operation-log-panel {
  margin-bottom: 16px;
}

.batch-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.batch-action-buttons {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pipeline-columns {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pipeline-column {
  min-width: 150px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px;
}

.pipeline-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pipeline-list {
  display: grid;
  gap: 8px;
}

.pipeline-card {
  display: grid;
  gap: 5px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, .04);
}

.pipeline-card span,
.pipeline-card small,
.pipeline-empty {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.operation-log-list {
  display: grid;
  gap: 8px;
}

.operation-log-list article {
  display: grid;
  gap: 4px;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.operation-log-list span,
.operation-log-list small {
  color: #667085;
  font-size: 12px;
}

.launch-result {
  display: grid;
  gap: 16px;
}

.launch-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.launch-kpis span {
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
  color: #475467;
}

.launch-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.launch-check-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.launch-check-grid span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #f8fafc;
  color: #475467;
}

.launch-check-grid .pass {
  background: #ecfdf3;
  color: #15803d;
}

.launch-check-grid .missing {
  background: #fff7ed;
  color: #c2410c;
}

.table-scroll code {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: #1d4ed8;
}

.notice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
}

.notice-card span {
  color: #475467;
}

/* Company-density order operations, skinned with the Wanfan light tokens. */
.order-status-tabs {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 0;
  margin: 0 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface, #fff);
}

.order-status-tabs button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary, #667085);
  white-space: nowrap;
}

.order-status-tabs button:hover { background: var(--hover-bg, #f8fafc); }
.order-status-tabs button.active {
  color: var(--primary, #2563eb);
  background: var(--primary-soft, #eff6ff);
  box-shadow: inset 0 -2px 0 var(--primary, #2563eb);
}
.order-status-tabs b { margin-left: 3px; font-weight: 600; }

.order-status-tab-dot {
  width: 7px;
  height: 7px;
  margin-right: 5px;
  flex: 0 0 7px;
  border: 0;
  border-radius: 50%;
  background: var(--order-status-main);
}

.order-status-badge {
  --order-status-bg: #f2f4f7;
  --order-status-main: #64748b;
  --order-status-color: #475467;
  --order-status-border: #d0d5dd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 58px;
  max-width: 104px;
  height: 24px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid var(--order-status-border);
  border-radius: 4px;
  background: var(--order-status-bg);
  color: var(--order-status-color);
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.order-status-badge::before {
  width: 7px;
  height: 7px;
  margin-right: 6px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--order-status-main);
  content: "";
}

.order-status-tone-neutral { --order-status-bg: #f1f5f9; --order-status-main: #64748b; --order-status-color: #475569; --order-status-border: #cbd5e1; }
.order-status-tone-pending { --order-status-bg: #fff7d6; --order-status-main: #d99a00; --order-status-color: #8a5700; --order-status-border: #e5b22e; }
.order-status-tone-established { --order-status-bg: #ecfeff; --order-status-main: #0891b2; --order-status-color: #0e7490; --order-status-border: #67e8f9; }
.order-status-tone-fulfillment { --order-status-bg: #fff1e8; --order-status-main: #ea580c; --order-status-color: #c2410c; --order-status-border: #fb923c; }
.order-status-tone-transit { --order-status-bg: #eff6ff; --order-status-main: #2563eb; --order-status-color: #1d4ed8; --order-status-border: #93c5fd; }
.order-status-tone-pickup { --order-status-bg: #f5f3ff; --order-status-main: #7c3aed; --order-status-color: #6d28d9; --order-status-border: #c4b5fd; }
.order-status-tone-success { --order-status-bg: #ecfdf3; --order-status-main: #16a34a; --order-status-color: #15803d; --order-status-border: #86efac; }
.order-status-tone-rejected { --order-status-bg: #fef2f2; --order-status-main: #dc2626; --order-status-color: #b91c1c; --order-status-border: #f87171; }
.order-status-tone-reverse { --order-status-bg: #fff7ed; --order-status-main: #b45309; --order-status-color: #92400e; --order-status-border: #fdba74; }
.order-status-tone-refunded { --order-status-bg: #fdf4ff; --order-status-main: #c026d3; --order-status-color: #a21caf; --order-status-border: #f0abfc; }
.order-status-tone-closed { --order-status-bg: #e2e8f0; --order-status-main: #475569; --order-status-color: #334155; --order-status-border: #94a3b8; }
.order-status-tone-exception { --order-status-bg: #fef2f2; --order-status-main: #991b1b; --order-status-color: #7f1d1d; --order-status-border: #ef4444; }
.order-status-badge.order-status-tone-exception,
.order-status-badge.order-status-tone-rejected { font-weight: 700; }
.order-status-badge.order-status-tone-exception { box-shadow: inset 2px 0 0 var(--order-status-main); }

.order-company-row [data-order-column="status"] {
  min-width: 82px;
  white-space: nowrap;
}

.order-company-row [data-order-column="status"] > .tag { margin-left: 4px; }

.order-filter-panel {
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow-soft);
}
.order-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 7px 10px;
}
.order-filter-advanced { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.order-filter-panel.is-collapsed .order-filter-advanced { display: none; }
.order-filter-field { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; }
.order-filter-field > span:first-child { color: var(--text-secondary, #667085); font-size: 12px; white-space: nowrap; }
.order-filter-field input,
.order-filter-field select { width: 100%; min-width: 0; height: 32px; border-radius: 5px; background: #fff; }
.order-filter-field.is-disabled { opacity: .62; }
.order-filter-date { grid-column: span 1; }
.order-filter-date > span:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 5px; }
.order-filter-date b { color: #98a2b3; font-weight: 400; }
.order-filter-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.order-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.order-table-toolbar > div { display: flex; min-width: 0; align-items: center; gap: 8px; }
.order-list-page {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.order-list-page > * { min-width: 0; max-width: none; }
.order-company-table {
  width: 100%;
  min-width: 0;
  max-width: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.order-company-table table {
  display: block;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.order-company-table thead,
.order-company-table tbody { display: block; width: 100%; min-width: 0; }
.order-company-table thead > tr,
.order-company-table tbody > .order-company-row {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: var(--order-grid-wide);
}
.order-company-table th { height: 36px; min-width: 0; padding: 6px 8px; overflow: hidden; background: var(--table-header, #f8fafc); color: #475467; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.order-company-table td { min-width: 0; padding: 7px 8px; overflow: hidden; color: #344054; font-size: 12px; line-height: 1.35; vertical-align: top; }
.order-company-table [data-order-column] { width: auto; min-width: 0; max-width: 100%; }
.order-company-row:hover > td { background: var(--hover-bg, #f8fafc); }
.order-company-row td > strong,
.order-company-row td > .sub,
.order-company-row td > a { display: block; }
.order-company-row td > strong { margin: 2px 0; color: #101828; font-size: 12px; }
.order-company-row .sub { margin-top: 2px; color: #667085; white-space: normal; }
.order-select-cell { width: auto; min-width: 0; text-align: center; }
.order-expand-cell { width: auto; min-width: 0; text-align: center; }
.order-expand-button { width: 24px; height: 24px; padding: 0; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #2563eb; }
.order-cell-stack {
  display: flex;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  flex-direction: column;
  gap: 2px;
}
.order-cell-stack > * { min-width: 0; max-width: 100%; }
.order-technical-text,
.order-region-name,
.order-product-name,
.order-customer-name,
.order-product-id,
.order-internal-code,
.order-package-summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-technical-text { color: #667085; font-size: 11px; line-height: 1.4; }
.order-region-name { color: #344054; font-weight: 600; line-height: 1.4; }
.order-source-text { margin-top: 2px; }
.order-product-code-line { display: flex; min-width: 0; max-width: 100%; align-items: center; gap: 4px; color: #98a2b3; }
.order-internal-code { max-width: 92px; flex: 0 0 auto; }
.order-product-id { flex: 1 1 auto; color: #667085; font-size: 11px; }
.order-product-name,
.order-customer-name { margin: 0; color: #101828; font-size: 12px; line-height: 1.4; }
.order-copy-link,
.order-row-expand-label,
.order-address-preview { display: block; width: 100%; max-width: 100%; padding: 0; border: 0; background: transparent; color: #2563eb; text-align: left; font-size: 12px; }
.order-copy-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row-expand-label { margin-top: 4px; color: #98a2b3; }
.order-address-preview { display: -webkit-box; overflow: hidden; color: #475467; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.order-url { display: block; max-width: 200px; overflow: hidden; color: #2563eb; text-overflow: ellipsis; white-space: nowrap; }
.order-expanded-row { display: block; width: 100%; }
.order-expanded-row > td { display: block; width: 100%; padding: 0 !important; background: #f8fbff !important; }
.order-inline-detail { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 10px; padding: 14px 16px; border-top: 1px solid #dbeafe; border-bottom: 1px solid #dbeafe; }
.order-inline-detail section { min-width: 0; padding: 12px; border: 1px solid #e4e7ec; border-radius: 9px; background: #fff; }
.order-inline-detail h4 { margin: 0 0 8px; color: #101828; }
.order-inline-detail p { margin: 4px 0; overflow-wrap: anywhere; }
.order-history-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.order-history-list li { display: grid; grid-template-columns: 145px 74px minmax(0, 1fr); gap: 7px; align-items: start; }
.order-history-list time,
.order-history-list span { color: #667085; }
.order-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); color: #667085; }
.order-pagination button { min-width: 30px; height: 30px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; }
.order-pagination button.active { border-color: #2563eb; background: #2563eb; color: #fff; }
.order-column-editor { display: grid; gap: 8px; }
.order-column-option { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border: 1px solid #e4e7ec; border-radius: 8px; background: #fff; color: #475467; }
.order-column-option.is-active { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.order-column-option b { font-size: 12px; }
.order-environment-tag { font-size: 11px; font-weight: 600; }
.order-time-sort { display:inline-flex;align-items:center;gap:5px;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer; }
.order-time-sort span { color:var(--primary,#2563eb); }
.order-more-tools { position:relative; }
.order-more-tools summary { min-height:30px;padding:5px 10px;border:1px solid #d0d5dd;border-radius:6px;background:#fff;color:#475467;cursor:pointer;list-style:none; }
.order-more-tools summary::-webkit-details-marker { display:none; }
.order-more-tools > div { position:absolute;z-index:20;top:36px;right:0;display:grid;min-width:110px;padding:5px;border:1px solid var(--line);border-radius:7px;background:#fff;box-shadow:var(--shadow-soft); }
.order-more-tools > div button { padding:7px 9px;border:0;background:transparent;text-align:left;color:#475467; }
.order-more-tools > div button:hover { background:var(--hover-bg,#f8fafc); }
.order-bulk-tools .btn:disabled { opacity:.52;cursor:not-allowed; }

@media (max-width: 1599px) {
  .order-filter-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  .order-inline-detail { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .order-company-table thead > tr,
  .order-company-table tbody > .order-company-row { grid-template-columns: var(--order-grid-normal); }
}

@media (max-width: 1279px) {
  .order-filter-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .order-filter-date { grid-column: span 2; }
  .order-filter-actions { flex-wrap: wrap; }
  .order-table-toolbar { flex-wrap: wrap; }
  .order-table-toolbar > div:last-child { flex-wrap: wrap; justify-content: flex-end; }
  .order-company-table table { width: var(--order-grid-compact-min); min-width: var(--order-grid-compact-min); }
  .order-company-table thead > tr,
  .order-company-table tbody > .order-company-row { grid-template-columns: var(--order-grid-compact); }
}

@media (max-width: 900px) {
  .order-filter-field { grid-template-columns: 78px minmax(0, 1fr); }
  .order-table-toolbar { align-items: flex-start; }
  .order-table-toolbar > div { width: 100%; }
  .order-table-toolbar > div:last-child { justify-content: flex-start; }
  .order-inline-detail { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .order-filter-grid { grid-template-columns: minmax(0, 1fr); }
  .order-filter-date { grid-column: auto; }
  .order-filter-field { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .order-filter-date > span:last-child { grid-template-columns: minmax(0, 1fr); }
  .order-filter-date b { display: none; }
  .order-table-toolbar > div { flex-wrap: wrap; }
}

.policy-admin-grid,
.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.policy-admin-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.policy-admin-card header,
.detail-card h3 {
  margin: 0 0 12px;
}

.policy-admin-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-policy-preview {
  max-width: 430px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}

.approval-log-list,
.timeline,
.operation-log-list {
  display: grid;
  gap: 8px;
}

.approval-log-list article,
.timeline span {
  display: grid;
  gap: 2px;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  color: #475467;
}

.risk-panel {
  border-color: #fed7aa;
  background: #fff7ed;
}

.role-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.role-switcher article {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.role-switcher article.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.role-switcher span {
  min-height: 44px;
  color: #667085;
}

body.public-landing-mode {
  background: #f3f4f6;
}

body.public-landing-mode .left-nav,
body.public-landing-mode .module-menu,
body.public-landing-mode .system-top {
  display: none;
}

body.public-landing-mode .admin-shell {
  display: block;
  min-height: 100vh;
}

body.public-landing-mode .main-shell,
body.public-landing-mode .content-area {
  min-height: 100vh;
  width: 100%;
  padding: 0;
  margin: 0;
  background: #f3f4f6;
}

body.public-landing-mode #app.content-area {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

.public-landing-page {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 24px 12px;
}

/* Operation Brain: knowledge management lives inside the existing Yugo admin. */
.operation-brain-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.operation-brain-stats article {
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
}

.operation-brain-stats span,
.operation-brain-stats b { display: block; }
.operation-brain-stats span { color: #64748b; font-size: 12px; }
.operation-brain-stats b { margin-top: 6px; color: #0f172a; font-size: 28px; }

.operation-brain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.operation-brain-document pre {
  margin: 0;
  padding: 18px;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.operation-brain-rule-trace {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}

.operation-brain-rule-trace h4 { margin: 0 0 10px; }
.operation-brain-rule-trace > div { display: flex; flex-wrap: wrap; gap: 8px; }
.operation-brain-rule-trace span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 999px; background: #fff; color: #334155; }
.operation-brain-rule-trace code { color: #1d4ed8; }

.knowledge-center-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.knowledge-center-toolbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-center-toolbar nav button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #d6e0ee;
  border-radius: 9px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.knowledge-center-toolbar nav button.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 750;
}

.knowledge-center-toolbar nav button span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 11px;
}

.knowledge-center-toolbar label {
  display: grid;
  width: min(430px, 42vw);
  gap: 6px;
  color: #64748b;
  font-size: 12px;
}

.knowledge-center-toolbar input {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.knowledge-overlay-editor textarea {
  min-height: 260px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 900px) {
  .operation-brain-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operation-brain-grid { grid-template-columns: 1fr; }
  .knowledge-center-toolbar { align-items: stretch; flex-direction: column; }
  .knowledge-center-toolbar label { width: 100%; }
}

.public-success-card {
  width: min(390px, calc(100vw - 24px));
  margin-top: 12vh;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  text-align: center;
}

.public-success-card strong {
  display: block;
  font-size: 24px;
  color: #101828;
  margin-bottom: 10px;
}

.public-success-card p {
  color: #667085;
  line-height: 1.7;
  margin-bottom: 20px;
}

.storage-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.storage-mode-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.storage-mode-grid article.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.schema-list {
  display: grid;
  gap: 14px;
}

.schema-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.schema-card table {
  width: 100%;
  border-collapse: collapse;
}

.schema-card th,
.schema-card td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

.health-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 12px;
}

.health-score strong {
  font-size: 42px;
  color: #101828;
}

.error-panel pre {
  overflow: auto;
  border-radius: 12px;
  background: #111827;
  color: #f9fafb;
  padding: 12px;
}

@media (max-width: 1280px) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .landing-template-shell,
  .template-picker-body {
    grid-template-columns: 1fr;
  }

  .landing-template-side {
    position: static;
  }

  .draft-layout,
  .script-list,
  .policy-admin-grid,
  .order-detail-grid,
  .role-switcher {
    grid-template-columns: 1fr;
  }

  .storage-mode-grid {
    grid-template-columns: 1fr;
  }
}

/* Stage 15 final overrides: keep premium mobile templates above legacy mobile styles. */
.premium-mobile-device.stage8-device,
.premium-mobile-device.stage7-device {
  width: var(--mobile-width);
  max-width: var(--mobile-width);
}

.premium-mobile-phone.stage8-phone,
.premium-mobile-phone.stage7-phone {
  height: var(--mobile-height);
  border-radius: 42px;
  padding: 10px;
  background: #111827;
}

.premium-mobile-screen.stage8-screen,
.premium-mobile-screen.stage7-screen {
  position: relative;
  height: calc(var(--mobile-height) - 62px);
  overflow-y: auto;
  padding: 18px 16px 118px;
  border-radius: 32px;
}

/* Final template preview override, intentionally placed after legacy stage blocks. */
.drawer.template-preview-drawer {
  width: min(1180px, 90vw) !important;
  max-width: 1180px !important;
}

.drawer.template-preview-drawer .drawer-body {
  min-height: 0 !important;
  /* Keep the fixed-size phone reachable at real browser zoom. */
  overflow: auto !important;
  padding: 0 !important;
  background: #eef2f7 !important;
}

.template-preview-shell.template-preview-stage7,
.template-large-preview {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 320px) minmax(430px, 1fr) !important;
  gap: 0 !important;
  align-items: stretch !important;
  background: #eef2f7 !important;
}

.template-preview-device-area {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 24px !important;
}

.mobile-preview-device.mobile-preview-frame,
.mobile-preview-frame {
  width: min(414px, calc(100% - 48px)) !important;
  min-width: min(375px, calc(100% - 48px)) !important;
  height: min(844px, calc(100vh - 132px)) !important;
  min-height: min(750px, calc(100vh - 132px)) !important;
  max-width: 430px !important;
  max-height: calc(100vh - 132px) !important;
}

.mobile-preview-frame .mobile-device,
.mobile-preview-frame .premium-mobile-device,
.mobile-preview-frame .stage8-device,
.mobile-preview-frame .stage7-device {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.mobile-preview-frame .mobile-phone,
.mobile-preview-frame .premium-mobile-phone,
.mobile-preview-frame .stage8-phone,
.mobile-preview-frame .stage7-phone {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 32px minmax(0, 1fr) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.mobile-preview-frame .mobile-screen,
.mobile-preview-frame .premium-mobile-screen,
.mobile-preview-frame .stage8-screen,
.mobile-preview-frame .stage7-screen {
  height: auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
/* Tall workspace utilization: keep phone-width realistic, expand height to use preview area. */
.mobile-preview-device.mobile-preview-frame,
.mobile-preview-frame {
  width: min(430px, calc(100% - 48px)) !important;
  min-width: min(390px, calc(100% - 48px)) !important;
  height: clamp(750px, calc(100vh - 108px), 1010px) !important;
  min-height: min(750px, calc(100vh - 108px)) !important;
  max-height: calc(100vh - 108px) !important;
}
.landing-v4-backend-panel {
  overflow: hidden;
}

.landing-v4-backend-frame {
  display: block;
  width: 100%;
  height: 960px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #e9e8e4;
}

@media (max-width: 900px) {
  .landing-v4-backend-frame { height: 860px; }
}

/* Active Landing Template Library: product -> template -> preview -> generate */
.active-template-steps { display:flex; align-items:center; gap:10px; margin-bottom:14px; padding:13px 16px; overflow-x:auto; border:1px solid #dde4e3; border-radius:13px; background:#fff; white-space:nowrap; }
.active-template-steps span { color:#81908d; font-size:12px; font-weight:800; }
.active-template-steps .done { color:#168462; }
.active-template-steps .current { color:#fff; padding:7px 10px; border-radius:99px; background:#172f2d; }
.active-template-steps b { color:#b6c0be; }
.active-template-product-panel { display:grid; grid-template-columns:1.1fr minmax(260px,.9fr) 1.2fr; gap:18px; align-items:end; padding:18px; }
.active-template-product-panel > div { display:grid; gap:5px; }
.active-template-product-panel small,.active-template-product-panel label { color:#6e7c79; font-size:12px; font-weight:700; }
.active-template-product-panel strong { font-size:16px; }
.active-template-product-panel span { color:#788582; font-size:12px; line-height:1.5; }
.active-template-product-panel label { display:grid; gap:7px; }
.active-template-product-panel select { min-height:44px; padding:0 12px; border:1px solid #cfd8d6; border-radius:9px; background:white; }
.active-template-toolbar { display:flex; justify-content:space-between; align-items:end; margin:24px 0 12px; }
.active-template-toolbar h2,.active-template-toolbar p { margin:0; }
.active-template-toolbar p { margin-top:5px; color:#71807d; font-size:12px; }
.active-template-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.active-template-card { display:grid; gap:13px; min-height:330px; padding:16px; border:1px solid #dce3e2; border-radius:15px; background:#fff; box-shadow:0 6px 20px rgba(22,47,45,.05); }
.active-template-card.is-selected { border:2px solid #168462; box-shadow:0 8px 24px rgba(22,132,98,.14); }
.active-template-card header,.active-template-card footer { display:flex; justify-content:space-between; gap:12px; align-items:start; }
.active-template-card h3 { margin:4px 0 0; font-size:17px; line-height:1.35; }
.active-template-type { color:#75817f; font-size:10px; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.active-template-card > p { margin:0; min-height:42px; color:#52615e; font-size:12px; line-height:1.65; }
.active-template-card > small { color:#75817f; line-height:1.55; }
.active-template-meta { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.active-template-meta span { padding:8px; border-radius:8px; color:#586662; background:#f2f6f5; font-size:11px; }
.active-template-section-flow { display:flex; align-items:center; gap:4px; min-height:62px; overflow-x:auto; padding-bottom:4px; }
.active-template-section-flow i { flex:0 0 auto; padding:6px 7px; border-radius:6px; color:#173b37; background:#e8f4f1; font-size:10px; font-style:normal; font-weight:800; }
.active-template-section-flow b { color:#a9b5b2; font-size:10px; }
.active-template-card footer { align-items:center; margin-top:auto; }
.active-template-card footer > div { display:flex; gap:7px; }
.drawer.active-template-preview-drawer { width:min(1120px,96vw); }
.active-template-preview-layout { display:grid; grid-template-columns:minmax(230px,320px) 420px; justify-content:center; gap:28px; align-items:start; }
.active-template-preview-layout > aside { position:sticky; top:0; padding:18px; border-radius:14px; background:#f3f6f5; }
.active-template-preview-layout h3 { margin:12px 0; }
.active-template-preview-layout ol { display:grid; gap:8px; padding-left:20px; color:#53615e; line-height:1.55; }
.active-template-preview-layout dl { display:grid; gap:0; margin-top:18px; }
.active-template-preview-layout dl > div { display:grid; grid-template-columns:76px 1fr; gap:8px; padding:10px 0; border-top:1px solid #d8e0de; }
.active-template-preview-layout dt { color:#75817f; font-size:11px; font-weight:700; }
.active-template-preview-layout dd { margin:0; font-size:12px; line-height:1.55; }
.active-template-phone { width:390px; max-height:calc(100vh - 190px); overflow-y:auto; border:10px solid #151918; border-radius:30px; background:white; box-shadow:0 24px 60px rgba(16,29,27,.22); }
.active-template-phone-bar { position:sticky; z-index:100; top:0; display:flex; justify-content:space-between; align-items:center; height:28px; padding:0 14px; color:white; background:#151918; font-size:10px; }
.active-template-phone .active-template-page { width:100%; box-shadow:none; }
.active-template-phone .atl-sticky { position:sticky; bottom:0; left:0; width:100%; transform:none; }
.archived-template-panel { margin-top:18px; padding:16px; }
.archived-template-panel summary { cursor:pointer; font-weight:850; }
.archived-template-panel > div { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.archived-template-panel > div span { padding:6px 9px; border-radius:6px; color:#6c7472; background:#eef1f0; font-size:11px; text-decoration:line-through; }
@media (max-width:1100px) {
  .active-template-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .active-template-product-panel { grid-template-columns:1fr 1fr; }
  .active-template-product-panel > div:last-child { grid-column:1/-1; }
}
@media (max-width:760px) {
  .active-template-grid,.active-template-product-panel,.active-template-preview-layout { grid-template-columns:1fr; }
  .active-template-product-panel > div:last-child { grid-column:auto; }
  .active-template-phone { width:min(390px,100%); margin:0 auto; }
  .active-template-preview-layout > aside { position:static; }
}

/* Product Detail Builder: template -> editable blocks -> landing page */
.product-detail-builder {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dde6e4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(18, 35, 33, .05);
}

.product-detail-builder .panel-head {
  align-items: start;
  margin: 0;
  padding: 0;
  border: 0;
}

.detail-builder-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px dashed #ccd8d5;
  border-radius: 12px;
  background: #f7faf9;
}

.detail-builder-list {
  display: grid;
  gap: 12px;
}

.detail-builder-block {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #dbe5e2;
  border-radius: 12px;
  background: #fbfdfc;
}

.detail-builder-block.is-dragging {
  opacity: .55;
}

.detail-builder-block.drag-over {
  border-color: #1677ff;
  box-shadow: inset 0 0 0 2px rgba(22, 119, 255, .16);
}

.detail-builder-handle {
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #586662;
  background: #eef4f2;
  cursor: grab;
  font-weight: 900;
}

.detail-builder-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.detail-builder-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.detail-builder-block label {
  display: grid;
  gap: 6px;
  color: #65736f;
  font-size: 12px;
  font-weight: 800;
}

.detail-builder-block input,
.detail-builder-block select,
.detail-builder-block textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd8d5;
  border-radius: 9px;
  background: #fff;
  color: #24302e;
  font: inherit;
  box-sizing: border-box;
}

.detail-builder-block textarea {
  min-height: 82px;
  resize: vertical;
}

.detail-builder-actions {
  display: grid;
  gap: 7px;
  align-content: start;
}

.managed-upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.managed-media-item {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #dbe5e2;
  border-radius: 11px;
  background: #fff;
}

.managed-media-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
}

.managed-media-item strong {
  min-height: 16px;
  color: #34423f;
  font-size: 11px;
  line-height: 1.35;
}

.commerce-media-grid {
  align-items: stretch;
}

.upload-field.is-finder-drag-over .commerce-media-grid {
  border-radius: 8px;
  outline: 2px dashed #2563eb;
  outline-offset: 5px;
  background: #eff6ff;
  box-shadow: 0 0 0 8px rgba(37, 99, 235, .08);
}

.commerce-media-card {
  min-width: 0;
}

.commerce-media-card[draggable="true"] {
  cursor: grab;
}

.commerce-media-card.is-dragging {
  opacity: .45;
}

.commerce-media-card.drag-over {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.commerce-media-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.commerce-media-thumb img {
  display: block;
}

.commerce-media-thumb span {
  position: absolute;
  inset: auto 6px 6px;
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  text-align: center;
  font-size: 11px;
  opacity: 0;
  transform: translateY(4px);
  transition: .16s ease;
}

.commerce-media-thumb:hover span,
.commerce-media-thumb:focus-within span {
  opacity: 1;
  transform: translateY(0);
}

.commerce-media-add {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 6px;
  border: 1px dashed #9aa9bd;
  border-radius: 11px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  cursor: pointer;
}

.commerce-media-add:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.commerce-media-add b {
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.commerce-media-add input,
.commerce-media-thumb input {
  display: none;
}

.commerce-cover-field .managed-media-actions {
  grid-template-columns: 1fr;
}

.managed-media-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.managed-media-actions .btn {
  min-height: 30px;
  padding: 4px 6px;
  font-size: 11px;
}

@media (max-width: 900px) {
  .detail-builder-block {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .detail-builder-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Public Order Lookup: customer-facing confirmation only, not logistics tracking. */
body.public-landing-mode:has(.order-lookup-page) {
  margin: 0;
  background: #fff;
  overflow-x: hidden;
}

.order-lookup-page {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  color: #282828;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif;
}

.order-lookup-hero {
  position: relative;
  min-height: 58px;
  padding: max(10px, env(safe-area-inset-top)) 52px 10px;
  box-sizing: border-box;
  color: #333;
  background: #fff;
  border-bottom: 1px solid #ececec;
  text-align: center;
}

.order-lookup-back { position: absolute; left: 12px; top: max(10px, env(safe-area-inset-top)); display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; color: #777; text-decoration: none; }
.order-lookup-hero > span { display: none; }
.order-lookup-hero h1 { margin: 8px 0 0; font-size: 20px; line-height: 1.2; font-weight: 600; }
.order-lookup-hero p { position: absolute; top: 74px; left: 20px; right: 20px; margin: 0; color: #777; font-size: 13px; line-height: 1.5; text-align: left; }

.order-lookup-card {
  width: 100%;
  max-width: 560px;
  margin: 56px auto 0;
  padding: 0 20px 20px;
  box-sizing: border-box;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.order-lookup-card form { display: grid; gap: 16px; }
.order-lookup-card label { display: grid; gap: 8px; font-size: 14px; font-weight: 750; }
.order-lookup-card input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 16px;
}
.order-lookup-card input:focus { outline: 3px solid rgba(37, 99, 235, .16); border-color: #2563eb; }
.order-lookup-card form button { width: 100%; min-height: 50px; border: 0; border-radius: 2px; color: #fff; background: #86a6e0; font-size: 17px; font-weight: 700; }
.order-lookup-card form button:disabled { opacity: .65; }
.order-lookup-privacy { margin: -4px 0 0; color: #64748b; font-size: 12px; line-height: 1.55; }
.order-lookup-error { margin-top: 16px; padding: 12px 14px; border-radius: 10px; color: #a21c1c; background: #fff1f1; font-size: 14px; }
.order-lookup-result { margin-top: 22px; border-top: 1px solid #e2e8f0; padding-top: 20px; }
.order-lookup-status { display: flex; gap: 12px; align-items: center; padding: 15px; border-radius: 14px; background: #ecfdf3; color: #167141; }
.order-lookup-status.is-cancelled { background: #fff1f1; color: #a21c1c; }
.order-lookup-status > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: currentColor; color: #fff; font-weight: 900; }
.order-lookup-status small, .order-lookup-status strong { display: block; }
.order-lookup-status small { font-size: 12px; opacity: .75; }
.order-lookup-status strong { margin-top: 2px; font-size: 20px; }
.order-lookup-summary { display: grid; grid-template-columns: minmax(88px, .75fr) minmax(0, 1.4fr); gap: 0; margin: 14px 0 0; }
.order-lookup-summary dt, .order-lookup-summary dd { margin: 0; padding: 12px 4px; border-bottom: 1px solid #eef2f7; overflow-wrap: anywhere; }
.order-lookup-summary dt { color: #64748b; font-size: 13px; }
.order-lookup-summary dd { color: #172033; font-size: 14px; font-weight: 700; text-align: right; }
.order-lookup-summary .order-lookup-price { color: #e52420; font-size: 18px; }
.order-lookup-notice { margin: 16px 0 0; padding: 12px; border-radius: 10px; background: #f8fafc; color: #475569; font-size: 13px; line-height: 1.65; }

@media (min-width: 431px) {
  .order-lookup-page { max-width: 430px; margin: 0 auto; box-shadow: 0 0 48px rgba(15, 23, 42, .12); }
}

/* Public return request: server-validated order identity and private image intake. */
body.public-landing-mode:has(.return-request-page) { margin: 0; overflow-x: hidden; background: #fff; }
.return-request-page { width: 100%; min-height: 100dvh; box-sizing: border-box; padding-bottom: max(24px, env(safe-area-inset-bottom)); color: #282828; background: #fff; font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif; }
.return-request-hero { position: relative; min-height: 58px; padding: max(10px, env(safe-area-inset-top)) 52px 10px; box-sizing: border-box; color: #333; background: #fff; border-bottom: 1px solid #ececec; text-align: center; }
.return-request-back { position: absolute; left: 12px; top: max(10px, env(safe-area-inset-top)); display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; color: #777; text-decoration: none; }
.return-request-hero > span { display: none; }
.return-request-hero h1 { margin: 8px 0 0; font-size: 20px; line-height: 1.2; font-weight: 600; }
.return-request-hero p { margin: 20px -32px 0; color: #777; font-size: 13px; line-height: 1.55; text-align: left; }
.return-request-card { width: 100%; max-width: 560px; margin: 40px auto 0; padding: 0 20px 20px; box-sizing: border-box; border-radius: 0; background: #fff; box-shadow: none; }
.return-request-card form { display: grid; gap: 16px; }
.return-request-card label { display: grid; gap: 8px; min-width: 0; font-size: 14px; font-weight: 760; }
.return-request-card input, .return-request-card select, .return-request-card textarea { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #d8d8d8; border-radius: 2px; color: #0f172a; background: #fff; font: inherit; font-size: 16px; }
.return-request-card input, .return-request-card select { min-height: 50px; padding: 0 13px; }
.return-request-card textarea { padding: 12px 13px; resize: vertical; }
.return-request-card input[type="file"] { height: auto; padding: 11px; font-size: 13px; }
.return-request-card label small, .return-request-privacy { margin: 0; color: #64748b; font-size: 12px; font-weight: 500; line-height: 1.55; }
.return-request-card form > button, .return-request-primary { display: grid; min-height: 50px; place-items: center; border: 0; border-radius: 2px; color: #fff; background: #86a6e0; font-size: 17px; font-weight: 700; text-decoration: none; }
.return-request-card form > button:disabled { opacity: .65; }
.return-request-error { padding: 12px 14px; border-radius: 10px; color: #a21c1c; background: #fff1f1; font-size: 14px; }
.return-request-success { text-align: center; }
.return-request-success > b { display: grid; width: 54px; height: 54px; margin: 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #17834b; font-size: 28px; }
.return-request-success h2 { margin: 14px 0; }
.return-request-success dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); margin: 0 0 16px; text-align: left; }
.return-request-success dt, .return-request-success dd { margin: 0; padding: 10px 4px; border-bottom: 1px solid #edf1f5; overflow-wrap: anywhere; }
.return-request-success dt { color: #64748b; font-size: 13px; }
.return-request-success dd { font-weight: 750; text-align: right; }
.return-request-success p { color: #475569; font-size: 13px; line-height: 1.65; }
@media (min-width: 431px) { .return-request-page { max-width: 430px; margin: 0 auto; box-shadow: 0 0 48px rgba(15, 23, 42, .12); } }

/* Product Center V1.2: operational table, non-cropping thumbnails and fixed actions. */
.product-center-blocker { max-width: 760px; margin: 20px auto; border-left: 4px solid #dc2626; }
.product-center-blocker h2 { color: #991b1b; }
.product-list-loading,
.error-state { margin: 12px 0; padding: 12px 16px; border-radius: 8px; background: #eff6ff; color: #1e40af; }
.error-state { background: #fef2f2; color: #991b1b; }
.product-center-table-scroll { position: relative; overflow-x: auto; }
.product-center-table { min-width: 1780px; table-layout: auto; }
.product-center-table th,
.product-center-table td { min-width: 108px; vertical-align: top; }
.product-center-table th:nth-child(3),
.product-center-table td:nth-child(3) { min-width: 260px; }
.product-center-table th:nth-child(12),
.product-center-table td:nth-child(12) { min-width: 250px; }
.product-center-table th:last-child,
.product-center-table td.product-operation-cell {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 330px;
  min-width: 330px;
  background: #fff;
  box-shadow: -8px 0 16px rgb(15 23 42 / 6%);
}
.product-center-table th:last-child { z-index: 3; background: #f8fafc; }
.product-operation-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.product-operation-actions button { min-width: 0; white-space: normal; }
.product-cover-square,
.simple-product-media-column .media-preview-card,
.description-asset-library article { aspect-ratio: 1 / 1; }
.product-cover-square img,
.simple-product-media-column .media-preview-card img,
.description-asset-library article img { width: 100%; height: 100%; object-fit: contain !important; }
.description-block-media img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain !important; background: #f8fafc; }
.variant-link-config { margin: 16px 0 22px; padding: 16px; border: 1px solid #dbe4ef; border-radius: 12px; background: #f8fafc; }
.product-remote-pagination { position: sticky; left: 0; width: max-content; min-width: 420px; }
.product-scope-tabs { margin-bottom: 12px; }
.editor-workflow { margin: 12px 0; padding: 12px 16px; border-radius: 10px; color: #334155; background: #eef2ff; font-size: 13px; overflow-wrap: anywhere; }

/* Product Center V1.4 — company-backoffice screenshot replica. */
.product-list-replica {
  position: relative;
  min-height: calc(100vh - 116px);
  margin: 0;
  padding: 28px 22px 18px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  color: #26344b;
  font-size: 14px;
}
.product-replica-tabs {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  min-width: 1780px;
  height: 45px;
  margin: 0 0 16px;
  padding: 0 0 0 2px;
  border-bottom: 1px solid #f0f2f5;
}
.product-replica-tabs button {
  position: relative;
  height: 45px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #252f42;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.product-replica-tabs button.active { color: #1769ff; font-weight: 600; }
.product-replica-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 2px;
  background: #1769ff;
  content: "";
}
.product-replica-filter-shell { min-width: 1780px; }
.product-replica-filter-shell.is-collapsed { display: flex; justify-content: flex-end; min-height: 40px; }
.product-replica-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px 16px;
  width: 100%;
  min-width: 1780px;
  margin: 0;
}
.product-replica-filter {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  box-sizing: border-box;
  border: 1px solid #f0f2f5;
  border-radius: 4px;
  background: #f7f9fc;
  color: #344054;
  white-space: nowrap;
}
.product-replica-filter > span:first-child {
  flex: 0 0 auto;
  margin-right: 10px;
  color: #344054;
  font-size: 13px;
}
.product-replica-filter input,
.product-replica-filter select {
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #5d6778;
  font: inherit;
  font-size: 13px;
}
.product-replica-filter input::placeholder { color: #adb5c2; opacity: 1; }
.product-replica-filter select { color: #a5adba; cursor: pointer; }
.product-filter-span-2 { grid-column: span 2; }
.product-replica-date { padding-right: 10px; }
.product-replica-date > span:first-child::after { margin-left: 8px; color: #a9b1bf; content: "◷"; }
.product-date-range { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); align-items: center; min-width: 0; }
.product-date-range b { color: #536071; font-weight: 400; text-align: center; }
.product-replica-filter-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 40px;
}
.product-filter-actions-row { grid-column: 1 / -1; }
.product-filter-actions-inline { grid-column: span 4; }
.product-replica-filter-actions .btn {
  min-width: 78px;
  height: 40px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 5px;
  font-size: 14px;
}
.product-replica-filter-actions .btn.primary { border-color: #1769ff; background: #1769ff; }
.product-reset-button { border-color: #eef1f5 !important; background: #f4f5f7 !important; color: #596477 !important; }
.product-collapse-query,
.product-filter-expand {
  padding: 0;
  border: 0;
  background: transparent;
  color: #1769ff;
  font: inherit;
  cursor: pointer;
}
.product-filter-expand { height: 40px; }
.product-create-row {
  min-width: 1780px;
  height: 64px;
  padding-top: 22px;
  box-sizing: border-box;
}
.product-create-button { min-width: 100px; height: 36px; min-height: 36px; padding: 0 16px; border-radius: 5px; }
.product-list-loading,
.product-list-replica > .error-state { min-width: 1748px; margin: 14px 0; }
.product-replica-table-scroll {
  position: relative;
  width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  overflow-y: visible;
  border: 0;
  background: #fff;
}
.product-replica-filters-b + .product-replica-table-scroll { margin-top: 18px; }
.product-replica-table {
  width: 100%;
  min-width: 1985px !important;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: fixed;
  background: #fff;
  color: #26344b;
  font-size: 13px;
}
.product-replica-table th,
.product-replica-table td {
  height: 90px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  vertical-align: middle;
  text-align: left;
  overflow-wrap: anywhere;
}
.product-replica-table th {
  height: 52px;
  padding-top: 0;
  padding-bottom: 0;
  background: #f4f6f8;
  color: #303a4d;
  font-weight: 600;
  white-space: nowrap;
}
.product-replica-table th:nth-child(1), .product-replica-table td:nth-child(1) { width: 62px; text-align: center; }
.product-replica-table th:nth-child(2), .product-replica-table td:nth-child(2) { width: 175px; }
.product-replica-table th:nth-child(3), .product-replica-table td:nth-child(3) { width: 148px; }
.product-replica-table th:nth-child(4), .product-replica-table td:nth-child(4) { width: 90px; }
.product-replica-table th:nth-child(5), .product-replica-table td:nth-child(5) { width: 130px; }
.product-replica-table th:nth-child(6), .product-replica-table td:nth-child(6) { width: 130px; }
.product-replica-table th:nth-child(7), .product-replica-table td:nth-child(7) { width: 153px; }
.product-replica-table th:nth-child(8), .product-replica-table td:nth-child(8) { width: 117px; }
.product-replica-table th:nth-child(9), .product-replica-table td:nth-child(9) { width: 230px; }
.product-replica-table th:nth-child(10), .product-replica-table td:nth-child(10) { width: 300px; }
.product-replica-table th:nth-child(11), .product-replica-table td:nth-child(11) { width: 180px; }
.product-replica-table th:nth-child(12), .product-replica-table td:nth-child(12) { width: 270px; }
.product-replica-table tbody tr,
.product-replica-table tbody td { height: 90px !important; }
.product-replica-table tbody td:not(.product-operation-cell) { overflow: hidden; }
.product-list-ellipsis {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-title-cell,
.product-template-cell,
.product-promotion-cell,
.product-related-cell {
  min-width: 0;
  overflow: hidden;
}
.product-operation-cell { min-width: 0; overflow: visible; }
.product-replica-table td.product-operation-cell:has(.product-more-menu[open]) { z-index: 5; }
.product-title-cell > *,
.product-template-cell > *,
.product-promotion-cell > *,
.product-related-cell > * {
  min-width: 0;
  box-sizing: border-box;
}
.product-title-cell .product-list-ellipsis,
.product-template-cell .product-list-ellipsis,
.product-promotion-cell .product-list-ellipsis,
.product-related-cell .product-list-ellipsis {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-replica-table td > span:not(.product-replica-cover),
.product-title-cell > span,
.product-code-cell > span,
.product-price-cell > span { display: block; margin-top: 5px; }
.product-title-link,
.product-template-link,
.plain-link {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1769ff;
  font: inherit;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}
.product-title-link { display: block; font-weight: 500; }
.admin-product-detail-route {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.admin-product-detail-route-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid #e5e9f0;
  border-radius: 4px;
  background: #fff;
}
.admin-product-detail-route-head h2 { margin: 5px 0 6px; font-size: 20px; }
.admin-product-detail-route-head p { margin: 0; color: #7a8494; }
.admin-product-detail-route-status { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.admin-product-detail-route-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(470px, 520px);
  gap: 20px;
  align-items: start;
  min-width: 0;
}
.admin-product-detail-route-content {
  min-width: 0;
  padding: 20px;
  border: 1px solid #e5e9f0;
  border-radius: 4px;
  background: #fff;
}
.admin-product-detail-route-content .candidate-detail-summary { grid-template-columns: 160px minmax(0, 1fr); }
.admin-product-detail-route-content .candidate-hero img { object-fit: contain; border-radius: 4px; }
.admin-product-detail-route-preview {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #e5e9f0;
  border-radius: 4px;
  background: #fff;
}
.admin-product-detail-route-preview .panel-head { margin: 0; }
.admin-product-detail-route-preview h3 { margin: 4px 0 0; }
.admin-product-detail-route-preview > .sub { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.admin-product-detail-phone { display: flex; justify-content: center; min-width: 0; overflow: auto; }
@media (max-width: 1380px) {
  .admin-product-detail-route-layout { grid-template-columns: 1fr; }
  .admin-product-detail-route-preview { position: static; }
}
@media (max-width: 760px) {
  .admin-product-detail-route-head { flex-direction: column; }
  .admin-product-detail-route-status { justify-content: flex-start; }
  .admin-product-detail-route-content,
  .admin-product-detail-route-preview { padding: 12px; }
  .admin-product-detail-route-content .candidate-detail-summary { grid-template-columns: 1fr; }
}
.product-replica-cover {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #eef0f3;
  background: #fafafa;
  color: #8993a4;
}
.product-replica-cover img { display: block; width: 100%; height: 100%; object-fit: contain !important; }
.product-price-cell span:nth-child(2),
.product-price-cell span:nth-child(3) { color: #1769ff; }
.product-promotion-cell { white-space: nowrap; }
.product-promotion-cell .plain-link { display: inline-block; width: auto; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.copy-mini { margin-left: 6px; padding: 0; border: 0; background: transparent; color: #a4adba; cursor: pointer; }
.product-operation-cell,
.product-replica-table th:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff !important;
  box-shadow: -8px 0 12px rgba(23, 34, 51, .04);
}
.product-replica-table th:last-child { z-index: 4; background: #f4f6f8 !important; }
.product-replica-actions { display: flex; width: 100%; min-width: 0; align-items: center; gap: 10px; overflow: hidden; white-space: nowrap; }
.product-replica-actions:has(.product-more-menu[open]) { overflow: visible; }
.product-replica-actions > button,
.product-more-menu summary,
.product-more-popover button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #1769ff;
  font: inherit;
  cursor: pointer;
}
.product-replica-actions > .danger-link { color: #fa3f4b; }
.muted-inline { color: #8c96a6; }
.product-more-menu { position: relative; }
.product-more-menu summary { list-style: none; font-size: 20px; line-height: 1; }
.product-more-menu summary::-webkit-details-marker { display: none; }
.product-more-popover {
  position: absolute;
  top: 22px;
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 132px;
  padding: 7px 0;
  border: 1px solid #e6eaf0;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(25, 38, 62, .14);
}
.product-more-popover button { padding: 8px 14px; text-align: left; white-space: nowrap; }
.product-more-popover button:hover { background: #f5f8ff; }
.product-replica-empty { height: 180px !important; color: #8c96a6; text-align: center !important; }
.product-replica-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 1780px;
  height: 64px;
  color: #7e8795;
}
.product-replica-pagination select,
.product-replica-pagination input,
.product-replica-pagination .page-num {
  width: auto;
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #e2e6ec;
  border-radius: 4px;
  background: #fff;
  color: #5c6676;
  font: inherit;
}
.product-replica-pagination input { width: 50px; padding: 0 6px; text-align: center; }
.product-replica-pagination .page-num.active { border-color: #1769ff; background: #1769ff; color: #fff; }
.product-replica-pagination .page-num:disabled { color: #c1c7d0; background: #fafbfc; }

/* V1.4 template history is visible but deliberately read-only. */
.archived-template-panel { margin-top: 28px; }
.archived-template-panel > .panel-head { align-items: flex-start; }
.archived-template-panel > .panel-head h2 { margin-bottom: 6px; }
.archived-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 16px; }
.archived-template-card { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 14px; min-width: 0; padding: 13px; border: 1px solid #e5e9ef; border-radius: 10px; background: #fafbfc; }
.archived-template-thumb { width: 108px; min-width: 108px; opacity: .82; filter: saturate(.72); }
.archived-template-card .active-template-static-thumb { height: 142px; }
.archived-template-copy { min-width: 0; }
.archived-template-copy header { display: flex; justify-content: space-between; gap: 8px; }
.archived-template-copy small { color: #7d8797; }
.archived-template-copy h3 { margin: 4px 0 7px; font-size: 15px; line-height: 1.35; }
.archived-template-copy p { margin: 5px 0; font-size: 12px; line-height: 1.5; }
.archived-template-copy > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.archived-template-copy .btn { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.archived-template-preview-layout { display: grid; grid-template-columns: minmax(280px, .8fr) 430px; align-items: start; gap: 28px; }
.archived-template-definition { display: grid; grid-template-columns: 110px minmax(0, 1fr); margin: 20px 0 0; border-top: 1px solid #e6eaf0; }
.archived-template-definition dt,
.archived-template-definition dd { margin: 0; padding: 12px 4px; border-bottom: 1px solid #e6eaf0; overflow-wrap: anywhere; }
.archived-template-definition dt { color: #7d8797; }
.archived-template-phone { width: 430px; height: 720px; overflow: hidden; border: 10px solid #202630; border-radius: 42px; background: #fff; box-shadow: 0 18px 48px rgba(15, 23, 42, .18); }
.archived-template-phone-status { height: 38px; padding: 11px 18px 0; box-sizing: border-box; background: #202630; color: #fff; font-size: 11px; text-align: center; }
.archived-template-phone-scroll { height: calc(100% - 38px); overflow-y: auto; background: #f7f8fa; }
.archived-template-preview-hero { min-height: 250px; background: #fff; }
.archived-template-preview-hero .active-template-static-thumb { height: 250px; border-radius: 0; }
.archived-template-phone-scroll > section { display: grid; gap: 8px; min-height: 160px; padding: 28px 24px; box-sizing: border-box; border-bottom: 8px solid #f0f2f5; background: #fff; }
.archived-template-phone-scroll > section small { color: #1769ff; font-weight: 700; }
.archived-template-phone-scroll > section strong { font-size: 22px; }
@media (max-width: 980px) {
  .archived-template-preview-layout { grid-template-columns: 1fr; }
  .archived-template-phone { width: min(430px, 100%); }
}

/* Company product editor replica: evidence captured at 1366x768. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.company-editor-shell {
  min-width: 960px;
  border: 1px solid #edf0f4;
  background: #fff;
}
.company-editor-tabs {
  display: flex;
  align-items: flex-end;
  gap: 44px;
  height: 58px;
  padding: 0 24px;
  border-bottom: 1px solid #edf0f4;
  box-sizing: border-box;
}
.company-editor-tabs button {
  position: relative;
  height: 58px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #30394a;
  font-size: 14px;
  cursor: pointer;
}
.company-editor-tabs button.active { color: #1769ff; }
.company-editor-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #1769ff;
}
.company-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  min-height: 680px;
  background: #fff;
}
.company-editor-main {
  min-width: 0;
  padding: 28px 28px 40px;
  border-right: 1px solid #edf0f4;
}
.company-editor-standalone { padding: 28px; background: #fff; }
.company-business-nav {
  padding: 25px 16px;
  background: #fff;
}
.company-business-nav h3 {
  margin: 0 0 14px;
  color: #5b6677;
  font-size: 14px;
  font-weight: 500;
}
.company-business-nav button {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #657184;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.company-business-nav button.active {
  color: #1769ff;
  background: #edf5ff;
}
.company-base-pane { display: grid; gap: 22px; }
.company-content-settings { display: grid; gap: 18px; min-width: 0; }
.company-content-field,
.company-detail-field { min-width: 0; }
.company-content-field .upload-field {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
}
.company-content-field .upload-field > label {
  padding-top: 7px;
  color: #394354;
  font-size: 14px;
}
.company-content-field .upload-field > p { grid-column: 2; margin: 0; }
body.product-editor-route .company-content-field .commerce-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 84px);
  grid-auto-flow: row;
  justify-content: start;
  align-items: start;
  gap: 8px;
  min-height: 84px;
}
body.product-editor-route .company-content-field .commerce-media-card {
  display: grid;
  width: 84px;
  min-width: 84px;
  height: auto;
  min-height: 0;
  gap: 7px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-sizing: border-box;
}
body.product-editor-route .company-content-field .commerce-media-thumb,
body.product-editor-route .company-content-field .commerce-media-add {
  width: 84px;
  min-width: 84px;
  height: 84px;
  min-height: 84px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #dce1e8;
  border-radius: 3px;
  background: #fff;
  box-sizing: border-box;
}
body.product-editor-route .company-content-field .commerce-media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  background: #f7f8fa;
}
body.product-editor-route .company-content-field .commerce-media-add {
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 0;
  color: #6e7887;
  text-align: center;
}
body.product-editor-route .company-content-field .commerce-media-add b {
  font-size: 24px;
  line-height: 1;
}
body.product-editor-route .company-content-field .commerce-media-add span {
  font-size: 10px;
  line-height: 1.2;
}
body.product-editor-route .company-content-field .commerce-media-card > strong {
  display: block;
  min-height: 16px;
  overflow-wrap: anywhere;
}
body.product-editor-route .company-content-field .managed-media-actions {
  display: grid;
  width: 84px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}
body.product-editor-route .company-content-field .commerce-cover-field .managed-media-actions {
  grid-template-columns: minmax(0, 1fr);
}
body.product-editor-route .company-content-field .managed-media-actions .btn {
  min-width: 0;
  min-height: 26px;
  padding: 3px 2px;
  font-size: 10px;
}
.company-detail-field {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.company-detail-label {
  padding-top: 12px;
  color: #394354;
  font-size: 14px;
}
.company-detail-label .required { margin-right: 4px; color: #f05252; }
.company-rich-editor {
  min-width: 0;
  border: 1px solid #d9dee7;
  background: #fff;
}
.company-rich-editor.is-fullscreen {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 0;
}
.company-rich-editor.is-fullscreen .company-rich-body {
  min-height: 0;
  max-height: none;
  height: 100%;
}
.company-rich-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid #d9dee7;
  background: #fafbfc;
}
.company-rich-toolbar-row {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  padding: 3px 8px;
  box-sizing: border-box;
}
.company-rich-toolbar-row + .company-rich-toolbar-row { border-top: 1px solid #eef1f5; }
.company-rich-toolbar button,
.company-rich-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #303a4b;
  font-size: 13px;
  cursor: pointer;
  box-sizing: border-box;
}
.company-rich-toolbar button:hover,
.company-rich-upload:hover { border-color: #cdd5df; background: #fff; }
.company-rich-toolbar button.danger { color: #d43939; }
.company-rich-upload input { display: none; }
.company-toolbar-divider { width: 1px; height: 24px; margin: 0 5px; background: #dfe4ea; }
.company-format-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 30px;
  min-width: 86px;
  padding: 0 22px 0 8px;
  border: 1px solid #d8dde5;
  background: #fff;
  color: #394354;
  font-size: 12px;
  box-sizing: border-box;
}
.company-format-select select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.company-font-size { min-width: 60px; }
.company-rich-body {
  min-height: 570px;
  max-height: 720px;
  padding: 28px 22px;
  overflow-y: auto;
  color: #222b38;
  background: #fff;
  font-size: 13px;
  line-height: 1.65;
  outline: none;
  box-sizing: border-box;
}
.company-rich-body:focus { box-shadow: inset 0 0 0 1px rgba(23, 105, 255, .22); }
.company-rich-body .rich-description-caret-host {
  min-height: 1.65em;
  margin: 8px 0;
  border-radius: 3px;
  caret-color: #1769ff;
}
.company-rich-body .rich-description-caret-host:focus,
.company-rich-body .rich-description-caret-host:hover { background: rgba(23, 105, 255, .035); }
.company-rich-body img,
.company-rich-body video {
  display: block;
  width: auto !important;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.company-rich-body .product-description-media,
.company-rich-body figure.product-description-media,
.company-rich-body figure[data-detail-block-type],
.company-rich-body figure {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto;
  background: transparent;
}
.company-rich-body .product-description-video video { width: auto !important; max-width: 100%; }
/* Runtime-only presentation markers. Original inline dimensions remain in the
   saved HTML; text, tables and author-supplied separators are not image blocks. */
.company-rich-body [data-rich-image-layout="wrapper"],
.company-rich-body img[data-rich-image-layout="image"] {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}
.company-rich-body img[data-rich-image-layout="image"] { object-fit: contain !important; }
/* Replace the legacy transparent editor frame; explicit author borders still win. */
.company-rich-body figure[data-rich-image-layout="wrapper"] { border: 0; }
.company-rich-body [data-rich-image-layout="caret"]:not(:focus) {
  min-height: 22px !important; height: auto !important; margin: 2px 0 !important;
  padding: 0 4px !important; line-height: 22px !important; overflow: visible;
  border-bottom: 1px dotted #d8e2ee;
}
.company-rich-body .is-rich-media-selected { outline: 2px solid #1769ff; outline-offset: 2px; }
.company-rich-body .rich-description-block { position: relative; min-width: 0; }
.company-rich-body .rich-description-block-controls {
  position: absolute;
  z-index: 4;
  top: 4px;
  right: 4px;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #cfd8e6;
  border-radius: 3px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.company-rich-body .rich-description-block:hover > .rich-description-block-controls,
.company-rich-body .rich-description-block.is-rich-media-selected > .rich-description-block-controls {
  opacity: 1;
  pointer-events: auto;
}
.company-rich-body .rich-description-block-controls button {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  color: #344054;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.company-rich-body .rich-description-block-controls button:hover { border-color: #b8c4d6; background: #f3f6fb; }
.company-rich-body .rich-description-block-controls button:disabled { opacity: .35; cursor: not-allowed; }
.company-rich-body [data-rich-block-drag-handle] { cursor: grab !important; }
.company-rich-body [data-rich-block-drag-handle]:active { cursor: grabbing !important; }
.company-rich-body.is-rich-drag-over { box-shadow: inset 0 0 0 2px rgba(23, 105, 255, .28); }
.company-rich-body [data-rich-media-draggable="true"] { cursor: grab; user-select: none; -webkit-user-drag: element; }
.company-rich-body [data-rich-media-draggable="true"]:active { cursor: grabbing; }
.company-rich-body .is-rich-media-dragging { opacity: .42; }
.company-rich-body .is-rich-drop-before,
.company-rich-body .is-rich-drop-after { position: relative; }
.company-rich-body .is-rich-drop-before::before,
.company-rich-body .is-rich-drop-after::after {
  position: absolute;
  z-index: 2;
  right: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: #1769ff;
  content: "";
  pointer-events: none;
}
.company-rich-body .is-rich-drop-before::before { top: -5px; }
.company-rich-body .is-rich-drop-after::after { bottom: -5px; }
.company-rich-status {
  display: flex;
  justify-content: space-between;
  min-height: 28px;
  padding: 6px 10px;
  border-top: 1px solid #d9dee7;
  color: #7a8493;
  background: #fafbfc;
  font-size: 11px;
  box-sizing: border-box;
}
.company-editor-footer {
  position: sticky;
  z-index: 10;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  min-width: 960px;
  padding: 12px 24px;
  border-top: 1px solid #e6eaf0;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -4px 14px rgba(20, 35, 55, .06);
}
.company-editor-footer .btn { min-width: 84px; }
.product-editor-unsaved {
  margin-left: auto;
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
}

.product-editor-unsaved[hidden] { display: none; }
.drawer.product-preview-drawer { width: min(560px, 42vw); grid-template-rows: 52px minmax(0, 1fr); }
.drawer.product-preview-drawer .drawer-body { padding: 12px; background: #fff; }
.drawer.product-preview-drawer .drawer-foot { display: none; }
.drawer.product-preview-drawer .drawer-mobile-preview { min-height: calc(100vh - 76px); }
.drawer.product-preview-drawer .product-preview-close { min-width: 30px; padding: 0; border: 0; font-size: 26px; font-weight: 300; }

/* Company product editor: observed through Sunflower at 1366x768 on 2026-07-22. */
.company-form-section {
  padding: 0 0 30px;
  border: 0;
  border-bottom: 12px solid #f7f9fc;
  background: #fff;
}
.company-form-section + .company-form-section { padding-top: 28px; }
.company-form-section h2 {
  margin: 0 0 22px;
  color: #303846;
  font-size: 14px;
  font-weight: 600;
}
.company-form-section h2 small { color: #9aa3af; font-size: 11px; font-weight: 400; }
.company-form-grid { display: grid; gap: 22px 70px; }
.company-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.company-field {
  display: flex;
  position: relative;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  color: #4a5362;
  font-size: 12px;
}
.company-field.required::before {
  content: "*";
  position: absolute;
  top: 0;
  left: -10px;
  color: #f05252;
}
.company-field input,
.company-field select,
.company-package-row > input,
.company-spec-value-row input,
.company-sku-table input {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #e2e6ec;
  border-radius: 2px;
  color: #4f5866;
  background: #fff;
  font-size: 12px;
  box-sizing: border-box;
  outline: none;
}
.company-field input:focus,
.company-field select:focus,
.company-package-row > input:focus,
.company-spec-value-row input:focus { border-color: #1769ff; }
.company-field small { color: #a3aab5; font-size: 10px; line-height: 1.45; }
.company-field-spacer { visibility: hidden; }
.company-input-search { display: grid; grid-template-columns: minmax(0, 1fr) 36px; }
.company-input-search button { border: 1px solid #e2e6ec; border-left: 0; color: #9da5b0; background: #fff; }
.company-purchase-links { margin-top: 20px; color: #4a5362; font-size: 12px; }
.company-purchase-links > strong { display: block; margin-bottom: 10px; font-weight: 500; }
.company-purchase-row { display: grid; grid-template-columns: 315px 315px 28px; gap: 18px; align-items: center; }
.company-purchase-row input { height: 32px; padding: 0 10px; border: 1px solid #e2e6ec; box-sizing: border-box; }
.company-purchase-row button,
.company-row-trash,
.company-spec-image-cell > button { border: 0; color: #7d8795; background: transparent; cursor: pointer; }
.company-link-button {
  margin-top: 10px;
  padding: 0;
  border: 0;
  color: #1769ff;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}
.company-outline-button {
  height: 30px;
  margin-top: 18px;
  padding: 0 12px;
  border: 1px solid #8db8ff;
  border-radius: 3px;
  color: #1769ff;
  background: #fff;
  font-size: 11px;
}
.company-spec-page,
.company-marketing-page { min-height: 570px; color: #4a5362; font-size: 12px; }
.company-spec-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 350px));
  gap: 22px 72px;
  padding: 0 0 30px;
}
.company-toggle-field { align-items: flex-start; }
.company-switch { display: inline-flex; align-items: center; width: 32px; height: 18px; }
.company-switch input { position: absolute; opacity: 0; pointer-events: none; }
.company-switch span { position: relative; display: block; width: 30px; height: 16px; border-radius: 10px; background: #d8dde5; transition: .15s; }
.company-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .15s; }
.company-switch input:checked + span { background: #1769ff; }
.company-switch input:checked + span::after { transform: translateX(14px); }
.company-spec-groups { margin: 0 -4px; padding: 0 4px 28px; border-top: 12px solid #f7f9fc; }
.company-spec-group { margin-top: 18px; padding: 16px 14px 14px; background: #fafbfd; }
.company-spec-grid,
.company-spec-value-row { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 340px) minmax(120px, 1fr); gap: 28px 72px; align-items: end; }
.company-spec-value-row { margin-top: 18px; }
.company-spec-image-cell { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.company-spec-image-cell img,
.company-square-upload { width: 44px; height: 44px; object-fit: contain; box-sizing: border-box; }
.company-square-upload { position: relative; display: grid; place-items: center; overflow: hidden; border: 1px dashed #dce1e8; color: #9aa3ae; cursor: pointer; background: #fff; }
.company-square-upload img { width: 100%; height: 100%; border: 0; object-fit: contain; }
.company-square-upload input { display: none; }
.company-media-bind-zone { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 2px; border: 1px solid transparent; border-radius: 3px; box-sizing: border-box; transition: border-color .15s, background-color .15s; }
.company-media-bind-zone.is-drag-over { border-color: #1769ff; background: #eaf2ff; }
.company-media-replace-label { position: absolute; right: 0; bottom: 0; left: 0; padding: 2px 0; color: #fff; background: rgba(22, 34, 51, .68); font-size: 9px; text-align: center; }
.company-media-unbind { padding: 0; border: 0; color: #f05252; background: transparent; font-size: 10px; cursor: pointer; white-space: nowrap; }
.company-media-binding-shelf { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #edf0f4; background: #fafbfd; }
.company-media-binding-shelf header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.company-media-binding-shelf header strong { color: #4a5362; font-size: 12px; font-weight: 500; }
.company-media-binding-shelf header small { color: #98a1ad; font-size: 10px; }
.company-media-binding-shelf > div { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.company-media-binding-shelf article { position: relative; flex: 0 0 54px; width: 54px; cursor: grab; }
.company-media-binding-shelf article.is-dragging { opacity: .55; }
.company-media-binding-shelf article img { display: block; width: 54px; height: 54px; border: 1px solid #e1e5eb; background: #fff; object-fit: contain; box-sizing: border-box; }
.company-media-binding-shelf article span { display: block; overflow: hidden; margin-top: 3px; color: #7b8491; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.company-detail-section { margin-top: 18px; }
.company-detail-section h3,
.company-package-details h3 { margin: 0 0 18px; font-size: 12px; font-weight: 500; }
.company-detail-section h3 span,
.company-package-details h3 span,
.company-activity-type strong span { color: #f05252; }
.company-sku-table,
.company-package-detail-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.company-sku-table th,
.company-sku-table td,
.company-package-detail-table th,
.company-package-detail-table td { height: 44px; padding: 7px 10px; border-bottom: 1px solid #edf0f4; text-align: left; font-size: 11px; font-weight: 400; box-sizing: border-box; }
.company-sku-table th,
.company-package-detail-table th { color: #555f6e; background: #f8f9fb; }
.company-sku-table th button { border: 0; color: #1769ff; background: transparent; }
.company-activity-type { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; }
.company-activity-type strong { font-weight: 500; }
.company-activity-type label { display: flex; align-items: center; gap: 6px; }
.company-activity-type small,
.company-activity-help { color: #a1a9b4; font-size: 10px; }
.company-addon-fields { display: grid; width: 350px; gap: 22px; }
.company-package-editor { position: relative; }
.company-package-head,
.company-package-row { display: grid; grid-template-columns: 1.2fr 1.8fr .88fr .88fr .88fr 92px 52px 64px 28px; gap: 14px; align-items: center; }
.company-package-head { margin-bottom: 10px; color: #4e5764; font-size: 11px; }
.company-package-head span:first-child::first-letter,
.company-package-head span:nth-child(2)::first-letter,
.company-package-head span:nth-child(3)::first-letter,
.company-package-head span:nth-child(5)::first-letter { color: #f05252; }
.company-package-row { margin-bottom: 12px; }
.company-package-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px dashed #dce1e8; color: #6e7887; background: #fafbfc; cursor: pointer; }
.company-package-icon-picker { position: absolute; z-index: 15; top: 54px; right: 80px; width: 170px; padding: 10px; border: 1px solid #e2e6ec; background: #fff; box-shadow: 0 6px 20px rgba(22,35,55,.12); }
.company-package-icon-picker section + section { margin-top: 8px; }
.company-package-icon-picker strong { display: block; margin-bottom: 6px; color: #77808e; font-size: 10px; }
.company-package-icon-picker section div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.company-package-icon-picker button { height: 30px; border: 1px solid #edf0f4; background: #fff; }
.company-package-details { margin-top: 18px; }
.company-package-details nav { display: flex; gap: 20px; border-bottom: 1px solid #e7ebf0; }
.company-package-details nav button { position: relative; padding: 0 4px 12px; border: 0; color: #6c7582; background: transparent; font-size: 11px; }
.company-package-details nav button.active { color: #1769ff; }
.company-package-details nav button.active::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: #1769ff; }
.company-package-detail-table img,
.company-empty-thumb { display: block; width: 28px; height: 28px; object-fit: contain; }
.company-quantity { display: grid; grid-template-columns: 28px 1fr 28px; }
.company-quantity button { border: 1px solid #e3e7ed; background: #fff; }
.company-quantity input { height: 28px; text-align: center; border: 1px solid #e3e7ed; }
.company-text-danger { border: 0; color: #f05252; background: transparent; }
.company-package-detail-table tfoot td { color: #f05252; background: #fafbfc; }
@media (max-width: 1100px) {
  .company-editor-shell,
  .company-editor-footer { min-width: 900px; }
  .company-editor-layout { grid-template-columns: minmax(0, 1fr) 140px; }
  .company-editor-main { padding: 22px 18px 36px; }
  .company-detail-field,
  .company-content-field .upload-field { grid-template-columns: 108px minmax(0, 1fr); }
  .drawer.product-preview-drawer { width: min(520px, 52vw); }
}

/* Product editor visual parity pass V2.
   These overrides are intentionally route-scoped so the rest of the Hugo
   admin keeps its existing two-level navigation and density. */
body.product-editor-route {
  min-width: 1180px;
  background: #fff !important;
  color: #4a5362 !important;
  font-size: 12px !important;
}

body.product-editor-route .admin-shell {
  grid-template-columns: 90px minmax(0, 1fr) !important;
  background: #fff !important;
}

body.product-editor-route #moduleMenu {
  display: none !important;
}

body.product-editor-route .main-shell {
  grid-column: 2 !important;
  grid-template-rows: 36px minmax(0, 1fr) !important;
  min-width: 0 !important;
  background: #fff !important;
}

body.product-editor-route .left-nav {
  width: 90px !important;
  height: 100vh !important;
  background: #fff !important;
  color: #6d7786 !important;
  border-right: 1px solid #edf0f4 !important;
}

body.product-editor-route .logo-block {
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  width: 90px !important;
  height: 86px !important;
  gap: 2px !important;
  padding: 0 !important;
  color: #2474d8 !important;
  border-bottom: 0 !important;
  font-size: 9px !important;
  line-height: 1 !important;
}

body.product-editor-route .logo-mark {
  width: 43px !important;
  height: 43px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #0758c7 2%, #159af2 55%, #27cec3 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .42), 0 3px 8px rgba(18, 99, 241, .16) !important;
}

body.product-editor-route .logo-mark::before {
  content: "HG" !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body.product-editor-route .side-nav {
  display: block !important;
  width: 90px !important;
  padding: 0 !important;
}

body.product-editor-route .side-button {
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr) !important;
  align-items: center !important;
  width: 90px !important;
  height: 34px !important;
  min-height: 34px !important;
  gap: 4px !important;
  padding: 0 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #687383 !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 34px !important;
  text-align: left !important;
}

body.product-editor-route .side-button:hover,
body.product-editor-route .side-button.active {
  color: #1769d7 !important;
  background: #f3f8ff !important;
}

body.product-editor-route .company-editor-side-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  color: currentColor;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

body.product-editor-route .system-top {
  height: 36px !important;
  background: #fff !important;
  border-bottom: 1px solid #edf0f4 !important;
}

body.product-editor-route .tab-strip {
  min-width: 0 !important;
}

body.product-editor-route .company-editor-top-tabs {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

body.product-editor-route .company-editor-top-tabs .page-tab {
  width: auto !important;
  min-width: 64px !important;
  height: 36px !important;
  padding: 0 12px !important;
  border-right: 1px solid #edf0f4 !important;
  color: #566170 !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

body.product-editor-route .company-editor-top-tabs .page-tab.active {
  color: #1769ff !important;
  background: #fbfdff !important;
  box-shadow: inset 0 -2px 0 #1769ff !important;
}

body.product-editor-route .company-editor-top-tabs .close-tab {
  margin-left: 5px;
  color: #9ca4af;
  font-size: 12px;
}

body.product-editor-route .system-tools {
  height: 36px !important;
}

body.product-editor-route .tool-icon,
body.product-editor-route .account-chip {
  height: 36px !important;
  font-size: 10px !important;
}

body.product-editor-route #app.content-area {
  height: calc(100vh - 36px) !important;
  min-width: 0 !important;
  padding: 0 0 52px !important;
  overflow: auto !important;
  background: #fff !important;
}

body.product-editor-route .company-editor-shell {
  min-width: 0 !important;
  min-height: calc(100vh - 36px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

body.product-editor-route .company-editor-tabs {
  height: 42px !important;
  gap: 35px !important;
  padding: 0 30px !important;
  border-bottom: 1px solid #edf0f4 !important;
}

body.product-editor-route .company-editor-tabs button {
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  color: #3f4855 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

body.product-editor-route .company-editor-tabs button.active {
  color: #1769ff !important;
}

body.product-editor-route .company-editor-tabs button.active::after {
  height: 2px !important;
}

body.product-editor-route .company-editor-layout {
  grid-template-columns: minmax(0, 1fr) 112px !important;
  min-height: calc(100vh - 78px) !important;
  background: #fff !important;
}

body.product-editor-route .company-editor-main {
  min-width: 0 !important;
  padding: 18px 30px 64px !important;
  border-right: 0 !important;
  background: #fff !important;
}

body.product-editor-route .company-editor-standalone {
  min-height: calc(100vh - 78px) !important;
  padding: 18px 30px 66px !important;
  background: #fff !important;
}

body.product-editor-route .company-business-nav {
  padding: 18px 8px !important;
  border-left: 0 !important;
  background: #fff !important;
}

body.product-editor-route .company-business-nav h3 {
  margin: 0 0 9px !important;
  color: #687383 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

body.product-editor-route .company-business-nav button {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  color: #687383 !important;
  background: transparent !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

body.product-editor-route .company-business-nav button.active {
  color: #1769ff !important;
  background: transparent !important;
}

body.product-editor-route .company-base-pane {
  gap: 0 !important;
}

body.product-editor-route .company-form-section {
  padding: 0 0 14px !important;
  border-bottom: 12px solid #f8fafc !important;
}

body.product-editor-route .company-form-section + .company-form-section {
  padding-top: 28px !important;
}

body.product-editor-route .company-form-section h2 {
  margin: 0 0 18px !important;
  color: #3e4754 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

body.product-editor-route .company-form-section h2 small {
  color: #9ca4af !important;
  font-size: 10px !important;
}

body.product-editor-route .company-form-grid {
  gap: 22px 70px !important;
}

body.product-editor-route .company-field {
  gap: 7px !important;
  color: #515a67 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.product-editor-route .company-field input,
body.product-editor-route .company-field select,
body.product-editor-route .company-package-row > input,
body.product-editor-route .company-spec-value-row input,
body.product-editor-route .company-sku-table input,
body.product-editor-route .company-purchase-row input {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  border-color: #e5e8ed !important;
  border-radius: 1px !important;
  color: #5d6571 !important;
  background: #fff !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

body.product-editor-route .company-field small {
  color: #a2a9b2 !important;
  font-size: 9px !important;
}

body.product-editor-route .company-input-search {
  grid-template-columns: minmax(0, 1fr) 32px !important;
}

body.product-editor-route .company-input-search button {
  height: 24px !important;
  min-height: 24px !important;
  border-color: #e5e8ed !important;
  font-size: 10px !important;
}

body.product-editor-route .company-purchase-links {
  margin-top: 17px !important;
  font-size: 11px !important;
}

body.product-editor-route .company-purchase-links > strong {
  margin-bottom: 8px !important;
  font-weight: 400 !important;
}

body.product-editor-route .company-link-button {
  margin-top: 8px !important;
  color: #1769ff !important;
  font-size: 10px !important;
}

body.product-editor-route .company-spec-page,
body.product-editor-route .company-marketing-page {
  min-height: 0 !important;
  color: #515a67 !important;
  font-size: 11px !important;
}

body.product-editor-route .company-spec-summary {
  gap: 22px 72px !important;
  padding: 0 0 24px !important;
}

body.product-editor-route .company-switch {
  width: 30px !important;
  height: 16px !important;
}

body.product-editor-route .company-switch span {
  width: 30px !important;
  height: 16px !important;
}

body.product-editor-route .company-switch span::before {
  content: "关";
  position: absolute;
  top: 0;
  right: 4px;
  z-index: 1;
  color: #fff;
  font-size: 8px;
  line-height: 16px;
}

body.product-editor-route .company-switch input:checked + span::before {
  content: "开";
  right: auto;
  left: 4px;
}

body.product-editor-route .company-spec-groups {
  border-top-color: #f8fafc !important;
}

body.product-editor-route .company-spec-group {
  background: #fbfcfd !important;
}

body.product-editor-route .company-spec-grid,
body.product-editor-route .company-spec-value-row {
  grid-template-columns: minmax(0, 340px) minmax(0, 340px) minmax(120px, 1fr) !important;
  gap: 28px 72px !important;
}

body.product-editor-route .company-outline-button {
  height: 24px !important;
  min-height: 24px !important;
  margin-top: 16px !important;
  padding: 0 10px !important;
  font-size: 10px !important;
}

body.product-editor-route .company-sku-table th,
body.product-editor-route .company-sku-table td,
body.product-editor-route .company-package-detail-table th,
body.product-editor-route .company-package-detail-table td {
  height: 38px !important;
  padding: 6px 8px !important;
  border-bottom-color: #eef1f5 !important;
  background: #fff !important;
  font-size: 10px !important;
}

body.product-editor-route .company-sku-table th,
body.product-editor-route .company-package-detail-table th {
  background: #fafbfc !important;
  color: #596270 !important;
}

body.product-editor-route .company-activity-type {
  gap: 18px !important;
  margin-bottom: 50px !important;
  white-space: nowrap !important;
}

body.product-editor-route .company-activity-type strong,
body.product-editor-route .company-activity-type label {
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.product-editor-route .company-activity-type input[type="radio"] {
  width: 12px !important;
  min-width: 12px !important;
  height: 12px !important;
  min-height: 12px !important;
  margin: 0 !important;
  accent-color: #1769ff;
}

body.product-editor-route .company-package-head,
body.product-editor-route .company-package-row {
  grid-template-columns: 187px 287px 136px 136px 138px 72px 44px 44px 18px !important;
  gap: 14px !important;
  width: 1174px !important;
  max-width: 100% !important;
}

body.product-editor-route .company-package-head {
  margin-bottom: 8px !important;
  font-size: 10px !important;
}

body.product-editor-route .company-package-head span {
  white-space: nowrap !important;
}

body.product-editor-route .company-package-row {
  margin-bottom: 12px !important;
}

body.product-editor-route .company-package-icon {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border-color: #e0e4ea !important;
  background: #fff !important;
  font-size: 10px !important;
}

body.product-editor-route .company-package-details {
  margin-top: 16px !important;
}

body.product-editor-route .company-package-details h3,
body.product-editor-route .company-detail-section h3 {
  margin-bottom: 14px !important;
  font-size: 11px !important;
}

body.product-editor-route .company-editor-footer {
  position: fixed !important;
  z-index: 30 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 90px !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 50px !important;
  padding: 12px 34px !important;
  border-top: 1px solid #f0f2f5 !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: none !important;
}

/* Editor drawers must cover the fixed save bar (z-index: 30). Otherwise a
   preview's return/close button can hit the underlying Complete action. */
body.product-editor-route .drawer-backdrop { z-index: 41; }
body.product-editor-route .drawer { z-index: 42; }

body.product-editor-route .company-editor-footer .btn {
  width: auto !important;
  min-width: 40px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 10px !important;
  border-radius: 2px !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

/* Product editor viewport contract.
   The editor owns the space left by the primary rail and its business anchor;
   nested forms may reflow or use a local scroller, but must not widen body. */
body.product-editor-route {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body.product-editor-route .admin-shell,
body.product-editor-route .main-shell,
body.product-editor-route #app.content-area,
body.product-editor-route .company-editor-shell,
body.product-editor-route .company-editor-layout,
body.product-editor-route .company-editor-main,
body.product-editor-route .company-editor-standalone,
body.product-editor-route .company-base-pane,
body.product-editor-route .company-form-section,
body.product-editor-route .company-form-grid,
body.product-editor-route .company-form-grid > *,
body.product-editor-route .company-spec-page,
body.product-editor-route .company-marketing-page,
body.product-editor-route .company-package-editor,
body.product-editor-route .company-content-settings,
body.product-editor-route .company-detail-field,
body.product-editor-route .company-detail-field > *,
body.product-editor-route .company-content-field,
body.product-editor-route .company-content-field .upload-field,
body.product-editor-route .company-content-field .upload-field > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.product-editor-route .admin-shell,
body.product-editor-route .main-shell,
body.product-editor-route #app.content-area,
body.product-editor-route .company-editor-shell,
body.product-editor-route .company-editor-layout {
  width: 100% !important;
}

body.product-editor-route .left-nav,
body.product-editor-route .side-nav {
  width: 90px !important;
  min-width: 90px !important;
  max-width: 90px !important;
}

body.product-editor-route .company-editor-layout {
  grid-template-columns: minmax(0, 1fr) 112px !important;
}

body.product-editor-route .company-business-nav {
  width: 112px !important;
  min-width: 0 !important;
  max-width: 112px !important;
  box-sizing: border-box !important;
}

body.product-editor-route .company-form-grid {
  column-gap: clamp(20px, 4vw, 70px) !important;
}

body.product-editor-route .company-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.product-editor-route .company-field input,
body.product-editor-route .company-field select,
body.product-editor-route .company-field textarea,
body.product-editor-route .company-input-search,
body.product-editor-route .company-purchase-row input,
body.product-editor-route .company-spec-value-row input,
body.product-editor-route .company-package-row > input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body.product-editor-route .company-purchase-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body.product-editor-route .company-spec-summary,
body.product-editor-route .company-spec-grid,
body.product-editor-route .company-spec-value-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  column-gap: clamp(20px, 4vw, 72px) !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body.product-editor-route .company-spec-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.product-editor-route .company-package-editor,
body.product-editor-route .company-detail-section,
body.product-editor-route .company-package-details,
body.product-editor-route .company-rich-toolbar-row {
  overflow-x: auto !important;
  overscroll-behavior-inline: contain;
}

body.product-editor-route .company-package-head,
body.product-editor-route .company-package-row {
  width: max(100%, 980px) !important;
  max-width: none !important;
}

body.product-editor-route .company-sku-table,
body.product-editor-route .company-package-detail-table {
  min-width: 680px;
}

@media (max-width: 1180px) {
  body.product-editor-route .company-editor-layout {
    grid-template-columns: minmax(0, 1fr) 96px !important;
  }

  body.product-editor-route .company-business-nav {
    width: 96px !important;
    max-width: 96px !important;
  }

  body.product-editor-route .company-editor-main,
  body.product-editor-route .company-editor-standalone {
    padding-inline: 20px !important;
  }
}

@media (max-width: 1024px) {
  body.product-editor-route .company-form-grid.three,
  body.product-editor-route .company-spec-grid,
  body.product-editor-route .company-spec-value-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 899px) {
  body.product-editor-route .admin-shell,
  body.product-editor-route .main-shell {
    display: block !important;
  }

  body.product-editor-route .main-shell {
    grid-column: auto !important;
  }

  body.product-editor-route #app.content-area {
    overflow-x: visible !important;
  }

  body.product-editor-route .company-editor-footer {
    left: 0 !important;
  }
}

@media (max-width: 720px) {
  body.product-editor-route .company-editor-tabs {
    gap: 22px !important;
    padding-inline: 16px !important;
    overflow-x: auto !important;
  }

  body.product-editor-route .company-editor-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "business-nav" "editor-main";
  }

  body.product-editor-route .company-editor-main {
    grid-area: editor-main;
    padding: 18px 16px 64px !important;
  }

  body.product-editor-route .company-business-nav {
    grid-area: business-nav;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 16px !important;
    overflow-x: auto !important;
    border-bottom: 1px solid #edf0f4 !important;
  }

  body.product-editor-route .company-business-nav h3,
  body.product-editor-route .company-business-nav button {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  body.product-editor-route .company-form-grid.three,
  body.product-editor-route .company-spec-summary,
  body.product-editor-route .company-spec-grid,
  body.product-editor-route .company-spec-value-row,
  body.product-editor-route .company-detail-field,
  body.product-editor-route .company-content-field .upload-field {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.product-editor-route .company-content-field .upload-field > p {
    grid-column: 1 !important;
  }

  body.product-editor-route .company-purchase-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.product-editor-route .company-purchase-row button {
    justify-self: start;
  }

  body.product-editor-route .company-editor-footer {
    padding-inline: 16px !important;
  }
}

/* Dashboard 1:1 replica: scoped to the home route only. */
body.dashboard-route {
  min-width: 1180px !important;
  background: #f5f7fa !important;
  color: #344054 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif !important;
  font-size: 12px !important;
}

body.dashboard-route .admin-shell {
  grid-template-columns: 96px minmax(0, 1fr) !important;
  background: #f5f7fa !important;
}

body.dashboard-route .module-menu {
  display: none !important;
}

body.dashboard-route .left-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  height: 100vh !important;
  overflow: hidden !important;
  border-right: 1px solid #eef1f5 !important;
  background: #fff !important;
  color: #667085 !important;
}

body.dashboard-route .logo-block {
  height: 86px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 4px !important;
  border-bottom: 0 !important;
  background: #fff !important;
  color: #1683df !important;
  font-size: 9px !important;
  letter-spacing: .4px !important;
}

body.dashboard-route .logo-mark,
body.dashboard-route .logo-block strong {
  visibility: hidden !important;
}

body.dashboard-route .logo-mark {
  position: relative !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: conic-gradient(from 205deg, #0468bd 0deg 126deg, #18b7db 126deg 218deg, #eef8ff 218deg 280deg, #0757a2 280deg 360deg) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75) !important;
}

body.dashboard-route .logo-mark::before {
  content: "" !important;
  position: absolute !important;
  inset: 10px !important;
  border-radius: 50% !important;
  background: #fff !important;
}

/* Shared Wanfan wordmark: one image source for every Admin sidebar state. */
.logo-block {
  box-sizing: border-box !important;
  padding: 0 10px !important;
  background: #1f2937 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .09) !important;
}

.logo-block .sidebar-brand-logo {
  display: block !important;
  width: 100px !important;
  max-width: 100% !important;
  height: 34px !important;
  max-height: calc(100% - 12px) !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)) !important;
}

body.product-editor-route .logo-block,
body.dashboard-route .logo-block {
  padding: 0 6px !important;
  background: #fff !important;
  border-bottom-color: rgba(15, 23, 42, .06) !important;
}

body.product-editor-route .logo-block .sidebar-brand-logo {
  width: 78px !important;
  height: 32px !important;
  filter: none !important;
}

body.dashboard-route .logo-block .sidebar-brand-logo {
  width: 82px !important;
  height: 34px !important;
  filter: none !important;
}

body.dashboard-route .side-nav {
  display: grid !important;
  gap: 2px !important;
  padding: 3px 0 16px !important;
}

body.dashboard-route .side-button {
  width: 100% !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 9px 0 15px !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #667085 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-align: left !important;
}

body.dashboard-route .side-button > span {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
}

body.dashboard-route .side-button:hover,
body.dashboard-route .side-button.active {
  border-left-color: transparent !important;
  background: #edf5ff !important;
  color: #1777e6 !important;
}

.company-dashboard-side-icon {
  width: 18px;
  color: inherit;
  font-size: 14px;
  text-align: center;
}

body.dashboard-route .main-shell {
  grid-template-rows: 38px minmax(0, 1fr) !important;
}

body.dashboard-route .system-top {
  height: 38px !important;
  border-bottom: 1px solid #edf0f4 !important;
  background: #fff !important;
}

body.dashboard-route .tab-strip {
  min-width: 0 !important;
  background: #fff !important;
}

.company-dashboard-top-tabs {
  display: flex;
  height: 38px;
  align-items: stretch;
}

body.dashboard-route .company-dashboard-top-tabs .page-tab {
  min-width: 104px !important;
  height: 38px !important;
  border-right: 1px solid #eef1f5 !important;
  background: #fff !important;
  color: #596579 !important;
  font-size: 12px !important;
}

body.dashboard-route .company-dashboard-top-tabs .page-tab.active {
  color: #1478ef !important;
  background: #fbfdff !important;
  box-shadow: inset 0 -2px 0 #1478ef !important;
}

body.dashboard-route .system-tools,
body.dashboard-route .tool-icon,
body.dashboard-route .account-chip {
  height: 38px !important;
}

body.dashboard-route .tool-icon {
  min-width: 38px !important;
  color: #596579 !important;
  border-color: #eef1f5 !important;
}

body.dashboard-route .content-area {
  min-width: 0 !important;
  padding: 12px 14px 40px !important;
  background: #f8fafc !important;
}

.company-dashboard {
  min-width: 0;
  color: #4b5565;
}

.company-dashboard-heading {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 252px 10px 0;
  padding: 0 4px;
  background: transparent;
}

.company-dashboard-heading-title {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.company-dashboard-heading-title h1 {
  color: #273244;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.company-dashboard-heading-title span {
  color: #98a2b3;
  font-size: 12px;
}

.company-dashboard-heading-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.company-dashboard-heading-controls > select {
  width: 150px !important;
}

.company-dashboard-heading-controls time {
  min-width: 76px;
  color: #a0a8b7;
  white-space: nowrap;
}

.company-dashboard-inline-stats {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #a0a8b7;
  font-size: 11px;
  white-space: nowrap;
}

.company-dashboard-inline-stats b {
  color: #7da7d6;
  font-weight: 600;
}

.company-dashboard-inline-stats span:last-child b {
  color: #ec9d9d;
}

.company-dashboard-view-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  border: 1px solid #e1e6ee;
  border-radius: 2px;
  overflow: hidden;
}

.company-dashboard-view-tabs button,
.company-dashboard-filter-tabs button,
.company-dashboard-filters > button,
.company-dashboard-sales-ranking button,
.company-dashboard-side-title button,
.company-dashboard-todo button {
  min-height: 0 !important;
  border: 0;
  background: #fff;
  color: #667085;
  font: inherit;
}

.company-dashboard-view-tabs button {
  min-width: 62px;
  padding: 0 10px;
  border-right: 1px solid #e1e6ee;
}

.company-dashboard-view-tabs button:last-child {
  border-right: 0;
}

.company-dashboard-view-tabs button.active,
.company-dashboard-filter-tabs button.active,
.company-dashboard-filters > button.active,
.company-dashboard-sales-ranking button.active {
  background: #1e7df2;
  color: #fff;
}

.company-dashboard-main-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  align-items: start;
}

.company-dashboard-main,
.company-dashboard-right {
  min-width: 0;
}

.company-dashboard-period-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.company-dashboard-period-card {
  --dashboard-accent: #4c9ff5;
  min-width: 0;
  min-height: 150px;
  padding: 17px 17px 13px;
  border: 1px solid #edf1f5;
  background: linear-gradient(145deg, #fff 45%, rgba(237, 246, 255, .86));
}

.company-dashboard-period-card.is-yesterday {
  --dashboard-accent: #31bd68;
  background: linear-gradient(145deg, #fff 45%, rgba(236, 252, 241, .9));
}

.company-dashboard-period-card.is-week {
  --dashboard-accent: #1977ed;
  background: linear-gradient(145deg, #fff 45%, rgba(238, 244, 255, .92));
}

.company-dashboard-period-card.is-month {
  --dashboard-accent: #ff8c46;
  background: linear-gradient(145deg, #fff 45%, rgba(255, 243, 234, .96));
}

.company-dashboard-period-card h3 {
  margin: 0 0 14px;
  color: #455164;
  font-size: 14px !important;
  font-weight: 600 !important;
}

.company-dashboard-progress {
  height: 7px;
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 8px;
  background: rgba(206, 217, 231, .45);
}

.company-dashboard-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--dashboard-accent);
}

.company-dashboard-order-counts {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #a0a8b5;
  font-size: 11px;
}

.company-dashboard-order-counts strong {
  margin-left: 8px;
  color: #273244;
  font-size: 22px;
}

.company-dashboard-period-card p {
  margin: 11px 0 2px;
  color: #9aa4b3;
  font-size: 11px;
}

.company-dashboard-period-card > b {
  color: #344054;
  font-size: 15px;
}

.company-dashboard-period-card > b em {
  font-style: normal;
}

.company-dashboard-section {
  min-width: 0;
  border: 1px solid #edf1f5;
  background: #fff;
}

.company-dashboard-section-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
}

.company-dashboard-section-head h2,
.company-dashboard-side-section h2 {
  color: #303b4d;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.company-dashboard-filters {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.company-dashboard select,
.company-dashboard input {
  min-height: 28px !important;
  height: 28px !important;
  border: 1px solid #e5e9ef !important;
  border-radius: 2px !important;
  background-color: #fff !important;
  color: #8993a3 !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  box-shadow: none !important;
}

.company-dashboard-filters select {
  width: 105px !important;
}

.company-dashboard-filter-tabs {
  display: inline-flex;
  height: 28px;
  border: 1px solid #e5e9ef;
  border-radius: 2px;
  overflow: hidden;
}

.company-dashboard-filter-tabs button,
.company-dashboard-filters > button {
  height: 28px;
  padding: 0 11px;
  border-right: 1px solid #e5e9ef;
}

.company-dashboard-filters > button.more {
  border-right: 0;
  color: #2b7fe6;
  padding-right: 0;
}

.company-dashboard-date-range {
  width: 178px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  color: #a0a8b5;
}

.company-dashboard-date-range input {
  width: 100% !important;
  border-left: 0 !important;
}

.company-dashboard-analysis {
  min-height: 336px;
  margin-bottom: 12px;
}

.company-dashboard-chart-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 2px 0 -5px;
  color: #677386;
  font-size: 11px;
}

.company-dashboard-chart-legend span::before {
  content: "";
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: -1px;
}

.company-dashboard-chart-legend .orders::before {
  background: #1977ed;
}

.company-dashboard-chart-legend .roi::before {
  background: #21bc66;
}

.company-dashboard-chart-axes {
  display: flex;
  justify-content: space-between;
  margin: 0 72px -7px;
  color: #9aa4b3;
  font-size: 10px;
}

.company-dashboard-chart {
  width: 100%;
  height: 254px;
  display: block;
}

.company-dashboard-chart .grid line {
  stroke: #e9edf2;
  stroke-width: 1;
}

.company-dashboard-chart text {
  fill: #697586;
  font-size: 10px;
}

.company-dashboard-chart .bars rect.orders {
  fill: #1977ed;
  rx: 2px;
}

.company-dashboard-chart .bars rect.roi {
  fill: #21bc66;
  rx: 2px;
}

.company-dashboard-ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.company-dashboard-ranking {
  height: 230px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.company-dashboard-ranking .company-dashboard-section-head {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  flex: 0 0 44px;
  padding-right: 8px;
}

.company-dashboard-ranking .company-dashboard-filters {
  gap: 5px;
  height: 28px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.company-dashboard-ranking .company-dashboard-filters::-webkit-scrollbar {
  display: none;
}

.company-dashboard-ranking .company-dashboard-filters select {
  width: 90px !important;
}

.company-dashboard-table-wrap {
  overflow-x: auto;
}

.company-dashboard-ranking .company-dashboard-table-wrap {
  height: 184px;
  min-height: 184px;
  flex: 1 1 184px;
  overflow: auto;
}

.company-dashboard-ranking .company-dashboard-table-wrap table {
  min-height: 100%;
}

.company-dashboard-ranking .company-dashboard-table-wrap tbody:has(.company-dashboard-empty) {
  height: calc(100% - 35px);
}

.company-dashboard-ranking .company-dashboard-table-wrap .company-dashboard-empty {
  height: 100% !important;
  vertical-align: middle;
}

@media (max-width: 1100px) {
  .company-dashboard-ranking-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.company-dashboard table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  color: #566174;
  font-size: 10px;
}

.company-dashboard th {
  height: 35px;
  padding: 0 10px;
  border-top: 1px solid #f1f3f6;
  border-bottom: 1px solid #f1f3f6;
  background: #fafbfc;
  color: #5e697a;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.company-dashboard td {
  height: 42px;
  padding: 5px 10px;
  border-bottom: 1px solid #f1f3f6;
  vertical-align: middle;
}

.company-dashboard-product-cell {
  min-width: 150px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.company-dashboard-product-cell img,
.company-dashboard-product-placeholder {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  border: 1px solid #f0f2f5;
  background: #f8fafc;
}

.company-dashboard-product-cell strong,
.company-dashboard-product-cell small {
  max-width: 125px;
  display: block;
  overflow: hidden;
  color: #4d596c;
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-dashboard-product-cell small {
  color: #8c96a5;
}

.company-dashboard-rank {
  color: #8a94a3;
  font-size: 15px;
}

.company-dashboard-rank.rank-1 {
  color: #f1b62c;
}

.company-dashboard-rank.rank-2 {
  color: #b9c8d6;
}

.company-dashboard-rank.rank-3 {
  color: #f0a078;
}

.company-dashboard-platform {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid #8ebee9;
  border-radius: 3px;
  color: #3b8ad4;
  font-size: 9px;
  text-transform: lowercase;
}

.company-dashboard-empty {
  height: 88px !important;
  color: #a0a8b5;
  text-align: center !important;
}

.company-dashboard-right {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

body.dashboard-route .drawer:not(.open) {
  display: none !important;
}

.company-dashboard-department-card {
  min-height: 166px;
  padding: 15px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef7ff 0%, #dff2ff 62%, #fff4dd 100%);
  color: #637086;
}

.company-dashboard-department-card h2 {
  margin: 0 0 8px;
  color: #2f78c8;
  font-size: 18px !important;
}

.company-dashboard-department-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 13px;
}

.company-dashboard-department-tabs span {
  padding: 3px 7px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .68);
  color: #8491a4;
  font-size: 9px;
}

.company-dashboard-department-tabs span.active {
  color: #4d8ccd;
}

.company-dashboard-department-card > strong {
  display: block;
  color: #6589b6;
  font-size: 10px;
}

.company-dashboard-department-card > b {
  display: block;
  margin: 3px 0 7px;
  color: #647187;
  font-size: 16px;
}

.company-dashboard-department-card > b small {
  font-size: 11px;
  font-weight: 400;
}

.company-dashboard-quota {
  height: 6px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255, 255, 255, .65);
}

.company-dashboard-quota span {
  display: block;
  height: 100%;
  background: #78b8ef;
}

.company-dashboard-department-card p {
  margin: 7px 0 0;
  color: #7c8ba0;
  font-size: 10px;
}

.company-dashboard-side-section {
  padding: 7px 0 0;
  border: 1px solid #f0f2f5;
  background: #fff;
}

.company-dashboard-side-section > h2,
.company-dashboard-side-title {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 10px;
}

.company-dashboard-todo {
  min-height: 62px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-top: 1px solid #f4f5f7;
}

.company-dashboard-todo .icon {
  color: #60aef5;
  font-size: 20px;
}

.company-dashboard-todo > span:nth-child(2) {
  display: grid;
  gap: 3px;
  color: #667085;
  font-size: 11px;
}

.company-dashboard-todo b {
  color: #394456;
}

.company-dashboard-todo button,
.company-dashboard-side-title button {
  color: #3685d9;
  font-size: 10px;
}

.company-dashboard-training-banner {
  min-height: 76px;
  display: grid;
  align-content: center;
  justify-items: end;
  margin: 0 9px 6px;
  padding: 8px 11px;
  border-radius: 4px;
  background: #f8fbff url("/public/assets/dashboard-company-replica/company-training-banner.png") center / cover no-repeat;
  color: #4677d4;
}

.company-dashboard-training-banner > * {
  visibility: hidden;
}

.company-dashboard-training-banner span,
.company-dashboard-training-banner strong,
.company-dashboard-training-banner small {
  display: block;
  max-width: 132px;
  text-align: center;
}

.company-dashboard-training-banner span {
  font-size: 13px;
  font-weight: 700;
}

.company-dashboard-training-banner strong {
  font-size: 12px;
}

.company-dashboard-training-banner small {
  color: #8b8f9b;
  font-size: 8px;
}

.company-dashboard-training ul,
.company-dashboard-news ul {
  margin: 0;
  padding: 0 10px 8px;
  list-style: none;
}

.company-dashboard-training li,
.company-dashboard-news li {
  overflow: hidden;
  margin: 4px 0;
  color: #8b94a2;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-dashboard-training li::before {
  content: "○";
  margin-right: 4px;
  color: #b5bdc8;
}

.company-dashboard-news > p {
  margin: -2px 10px 6px;
  color: #a4acb8;
  font-size: 9px;
}

.company-dashboard-news-banner {
  height: 72px;
  margin: 0 9px 7px;
  background: #eef8ef url("/public/assets/dashboard-company-replica/company-news-banner.png") center / cover no-repeat;
}

.company-dashboard-news li span {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 3px;
  border-radius: 2px;
  font-size: 8px;
}

.company-dashboard-news li span.green {
  background: #ebf8e5;
  color: #72b354;
}

.company-dashboard-news li span.orange {
  background: #fff3dc;
  color: #e7a338;
}

.company-dashboard-sales-ranking .company-dashboard-side-title > div {
  display: flex;
  gap: 3px;
}

.company-dashboard-sales-ranking button {
  height: 24px;
  padding: 0 7px;
  font-size: 9px;
}

.company-dashboard-sales-ranking th,
.company-dashboard-sales-ranking td {
  height: 30px;
  padding: 0 7px;
  font-size: 9px;
}

.company-dashboard-right table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}

.company-dashboard-storage-retained {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e3e8ef;
}

.company-dashboard-storage-note {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid #e1e6ed;
  border-bottom: 0;
  background: #fff;
}

.company-dashboard-storage-note > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.company-dashboard-storage-note strong {
  color: #303b4d;
  font-size: 14px;
}

.company-dashboard-storage-note span {
  color: #8b95a5;
}

.company-dashboard-supabase {
  padding: 4px 8px;
  border-radius: 3px;
  background: #fff7e6;
  color: #b57617 !important;
}

.company-dashboard-supabase.is-connected {
  background: #ecfdf3;
  color: #16794b !important;
}

.company-dashboard-storage-retained .storage-settings {
  margin: 0 !important;
  border-radius: 0 !important;
}

@media (max-width: 1279px) {
  .company-dashboard-heading {
    margin-right: 232px;
  }

  .company-dashboard-inline-stats {
    gap: 7px;
    font-size: 10px;
  }

  .company-dashboard-main-grid {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .company-dashboard-ranking .company-dashboard-filters select {
    width: 78px !important;
  }
}
/* Company selection workflow replica: list and library only. */
.selection-list-tabs{display:flex;gap:34px;padding:6px 18px 0;border-bottom:1px solid #edf0f5;background:#fff}.selection-list-tabs button{border:0;background:none;padding:14px 2px 12px;color:#303846;font-size:14px;cursor:pointer}.selection-list-tabs button.active{color:#1769ff;border-bottom:3px solid #1769ff}.selection-list-filters{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:16px 18px;padding:18px;background:#fff}.selection-filter{height:40px;display:flex;align-items:center;gap:8px;padding:0 12px;background:#f7f9fc;border-radius:4px;color:#475569;font-size:13px;min-width:0}.selection-filter span{flex:0 0 auto}.selection-filter input,.selection-filter select{width:100%;min-width:0;border:0;background:transparent;outline:0;color:#64748b}.selection-filter-actions{grid-column:1/-1;display:flex;gap:12px}.selection-company-table{margin-top:16px;overflow-x:auto}.selection-company-table table{min-width:1720px}.selection-company-table th{height:52px;white-space:nowrap}.selection-company-table td{height:88px;vertical-align:middle}.selection-table-cover{display:flex;width:54px;height:54px;align-items:center;justify-content:center;background:#f4f6f8;border:1px solid #e4e8ef}.selection-table-cover img{width:100%;height:100%;object-fit:contain}.selection-title-link{text-align:left}.selection-library-toolbar{background:#fff;padding:18px;margin-bottom:14px}.selection-library-filters{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:14px}.selection-library-filters label{display:flex;align-items:center;gap:8px;padding:0 12px;height:40px;background:#f7f9fc;font-size:13px}.selection-library-filters input,.selection-library-filters select{border:0;background:transparent;min-width:0;width:100%;outline:0}.selection-library-sort{display:flex;flex-wrap:wrap;gap:0;margin-top:18px;border-bottom:1px solid #e8edf3}.selection-library-sort button{border:0;background:none;padding:10px 18px;color:#566176}.selection-library-sort button.active{color:#1769ff;border-bottom:3px solid #1769ff}.selection-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:18px}.selection-library-card{position:relative;background:#fff;border:1px solid #e4e8ef;border-radius:6px;overflow:hidden}.selection-library-check{position:absolute;z-index:3;top:10px;left:10px;padding:5px 8px;background:rgba(255,255,255,.92);border-radius:4px;font-size:12px}.selection-card-cover{position:relative;aspect-ratio:1/1;background:#f5f7fa;display:flex;align-items:center;justify-content:center;font-size:48px;color:#c0c7d2}.selection-card-cover>img{width:100%;height:100%;object-fit:contain}.selection-card-overlay{position:absolute;inset:auto 0 0;display:flex;gap:6px;padding:10px;background:linear-gradient(transparent,rgba(0,0,0,.72));opacity:0;transition:opacity .15s}.selection-card-cover:hover .selection-card-overlay{opacity:1}.selection-card-overlay button{flex:1;border:0;border-radius:3px;padding:6px 2px;font-size:11px;color:#fff;background:rgba(24,105,255,.9)}.selection-card-body{display:flex;flex-direction:column;gap:6px;padding:12px}.selection-card-body strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selection-card-body b{color:#f04438}.selection-card-body span,.selection-card-body small{color:#667085;font-size:12px}.selection-card-body em{color:#067647;font-style:normal;font-size:12px}@media(max-width:1100px){.selection-list-filters{grid-template-columns:repeat(3,minmax(150px,1fr))}.selection-library-filters{grid-template-columns:repeat(2,minmax(160px,1fr))}}

/* Selection library canonical sales metrics: compact and responsive. */
.selection-card-sales {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
  padding: 9px 10px;
  border: 1px solid #e7ebf1;
  border-radius: 6px;
  background: #f8fafc;
}
.selection-card-sales > span { display: grid; gap: 2px; min-width: 0; }
.selection-card-sales > span + span { padding-left: 9px; border-left: 1px solid #e2e8f0; }
.selection-card-sales small { color: #667085; font-size: 11px; }
.selection-card-sales strong { color: #344054; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.selection-card-sales > span:last-child strong { color: #1769ff; }
.selection-card-sales i { margin-left: 2px; color: #667085; font-size: 10px; font-style: normal; font-weight: 500; }
.selection-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.selection-card-meta span, .selection-card-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-library-sort { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.selection-library-sort button { flex: 0 0 auto; white-space: nowrap; }
.selection-library-filters { align-items: center; }
.selection-library-filter-actions { display: flex; align-items: center; gap: 8px; }
.selection-library-ranking-row { display: flex; min-width: 0; align-items: center; gap: 12px; }
.selection-library-ranking-row .selection-library-sort { flex: 1 1 auto; }
.selection-period-selector { display: grid; grid-template-columns: 30px minmax(108px, auto) 30px; flex: 0 0 auto; align-items: center; height: 38px; overflow: hidden; border: 1px solid #dfe5ed; border-radius: 5px; background: #fff; }
.selection-period-selector button { height: 100%; border: 0; background: transparent; color: #1769ff; font-size: 19px; cursor: pointer; }
.selection-period-selector button:hover { background: #f2f7ff; }
.selection-period-selector strong { padding: 0 8px; color: #344054; font-size: 12px; text-align: center; white-space: nowrap; }
.selection-library-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px 12px; border: 1px solid #e4e8ef; border-radius: 6px; background: #fff; color: #667085; font-size: 12px; }
.selection-library-pagination > div { display: flex; gap: 8px; }
@media (max-width: 1100px) {
  .selection-library-ranking-row { align-items: stretch; flex-direction: column; }
  .selection-period-selector { align-self: flex-start; }
}
@media (max-width: 700px) {
  .selection-library-filter-actions { grid-column: 1 / -1; }
  .selection-library-pagination { align-items: stretch; flex-direction: column; }
}

/* Sidebar hotfix final guards: these must follow route-specific replica CSS. */
body.product-editor-route .side-button {
  display: flex !important;
  grid-template-columns: none !important;
}

body.product-editor-route .side-button > span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
}

@media (max-width: 899px) {
  body.product-editor-route,
  body.product-editor-route .admin-shell,
  body.product-editor-route .main-shell,
  body.product-editor-route #app.content-area {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.product-editor-route .admin-shell {
    display: block !important;
  }

  body.product-editor-route .left-nav,
  body.product-editor-route #moduleMenu {
    display: none !important;
  }

  body.product-editor-route .main-shell {
    grid-column: 1 !important;
  }

  body.product-editor-route .system-top {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.product-editor-route #app.content-area {
    overflow-x: auto !important;
  }
}

/* P2 responsive layout: browser zoom reduces the CSS viewport. Keep the
   desktop navigation rails stable, but let the workspace consume the actual
   viewport instead of inheriting the legacy 1180px document floor. Wide data
   grids retain their own horizontal scroller; the document itself stays fluid. */
@media (min-width: 900px) and (max-width: 1179px) {
  html,
  body,
  body.dashboard-route {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .admin-shell,
  body.dashboard-route .admin-shell,
  .main-shell,
  body.dashboard-route .main-shell,
  .content-area,
  body.dashboard-route .content-area {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .content-area > *,
  .panel,
  .panel > *,
  .toolbar,
  .page-head,
  .page-actions,
  .tabs,
  .filters,
  .filters.compact {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .page-head,
  .page-actions,
  .toolbar,
  .panel-head {
    flex-wrap: wrap;
  }

  .panel-head {
    height: auto !important;
    min-height: 38px;
    padding-block: 6px !important;
  }

  .filters,
  .filters.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .filters .field,
  .filters.compact .field {
    min-width: 0;
  }

  .finance-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .metric-row,
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .selection-list-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .selection-library-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .table-scroll,
  .selection-company-table,
  .product-center-table-scroll,
  .company-dashboard-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
}

/* WANFAN_ADMIN_LIGHT_SHELL
   数据中心与商品中心共同确立后台唯一浅色外壳。所有标准 Admin route
   共享导航、顶部栏和内容画布；各业务 renderer 仍拥有自身布局与行为。 */
body.wanfan-admin-light-shell {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--wanfan-admin-page-bg) !important;
  color: var(--wanfan-admin-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif !important;
  font-size: var(--wanfan-admin-font-body) !important;
}

body.wanfan-admin-light-shell .admin-shell,
body.wanfan-admin-light-shell .main-shell,
body.wanfan-admin-light-shell .content-area {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.wanfan-admin-light-shell .admin-shell {
  grid-template-columns: 128px 174px minmax(0, 1fr) !important;
  background: var(--wanfan-admin-page-bg) !important;
}

body.wanfan-admin-light-shell.dashboard-route .admin-shell {
  grid-template-columns: 128px minmax(0, 1fr) !important;
}

/* Product editor is a wide workspace with no secondary module rail. Keep the
   shared light shell, but collapse its three-column list-page grid to the
   primary rail plus one fluid editor track. */
body.wanfan-admin-light-shell.product-editor-route .admin-shell {
  grid-template-columns: 128px minmax(0, 1fr) !important;
}

body.wanfan-admin-light-shell.product-editor-route .main-shell {
  grid-column: 2 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

body.wanfan-admin-light-shell.product-editor-route .left-nav,
body.wanfan-admin-light-shell.product-editor-route .side-nav {
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
}

body.wanfan-admin-light-shell.product-editor-route .logo-block {
  width: 128px !important;
  max-width: 128px !important;
}

body.wanfan-admin-light-shell .left-nav {
  width: 128px !important;
  min-width: 128px !important;
  border-right: 1px solid #eef1f5 !important;
  background: var(--wanfan-admin-card-bg) !important;
  color: var(--wanfan-admin-text-muted) !important;
}

body.wanfan-admin-light-shell .logo-block {
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-content: initial !important;
  gap: 0 !important;
  padding: 0 6px !important;
  border-bottom-color: rgba(15, 23, 42, .06) !important;
  background: var(--wanfan-admin-card-bg) !important;
}

body.wanfan-admin-light-shell .logo-block .sidebar-brand-logo {
  width: 82px !important;
  height: 34px !important;
  filter: none !important;
}

body.wanfan-admin-light-shell .side-nav {
  display: grid !important;
  gap: 2px !important;
  padding: 3px 0 16px !important;
}

body.wanfan-admin-light-shell .side-button {
  width: 100% !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 9px 0 15px !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: var(--wanfan-admin-card-bg) !important;
  color: var(--wanfan-admin-text-muted) !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-align: left !important;
}

body.wanfan-admin-light-shell .side-button:hover,
body.wanfan-admin-light-shell .side-button.active {
  background: var(--wanfan-admin-hover-bg) !important;
  color: #1777e6 !important;
}

body.wanfan-admin-light-shell .module-menu {
  border-right-color: #eef1f5 !important;
  background: var(--wanfan-admin-card-bg) !important;
}

body.wanfan-admin-light-shell .module-menu-title {
  border-bottom-color: #eef1f5 !important;
  color: var(--wanfan-admin-text-strong) !important;
}

body.wanfan-admin-light-shell .module-menu-group h3 {
  color: var(--wanfan-admin-text-disabled) !important;
}

body.wanfan-admin-light-shell .module-menu-group button {
  color: var(--wanfan-admin-text-muted) !important;
}

body.wanfan-admin-light-shell .module-menu-group button:hover,
body.wanfan-admin-light-shell .module-menu-group button.active {
  background: var(--wanfan-admin-hover-bg) !important;
  color: var(--wanfan-admin-primary-strong) !important;
}

body.wanfan-admin-light-shell .system-top,
body.wanfan-admin-light-shell .tab-strip,
body.wanfan-admin-light-shell .top-open-tabs,
body.wanfan-admin-light-shell .page-tab,
body.wanfan-admin-light-shell .system-tools {
  background: var(--wanfan-admin-card-bg) !important;
}

body.wanfan-admin-light-shell .main-shell {
  grid-template-rows: 36px minmax(0, 1fr) !important;
}

body.wanfan-admin-light-shell .system-top,
body.wanfan-admin-light-shell .company-dashboard-top-tabs,
body.wanfan-admin-light-shell .company-dashboard-top-tabs .page-tab,
body.wanfan-admin-light-shell .system-tools,
body.wanfan-admin-light-shell .tool-icon,
body.wanfan-admin-light-shell .account-chip {
  height: 36px !important;
}

body.wanfan-admin-light-shell .system-top,
body.wanfan-admin-light-shell .page-tab,
body.wanfan-admin-light-shell .tool-icon {
  border-color: #eef1f5 !important;
}

body.wanfan-admin-light-shell .page-tab {
  color: #596579 !important;
}

body.wanfan-admin-light-shell .page-tab.active {
  color: var(--wanfan-admin-primary-strong) !important;
  background: #fbfdff !important;
  box-shadow: inset 0 -2px 0 var(--wanfan-admin-primary-strong) !important;
}

body.wanfan-admin-light-shell .content-area {
  width: 100% !important;
  overflow-x: hidden !important;
  padding: var(--wanfan-admin-page-padding) !important;
  background: var(--wanfan-admin-content-bg) !important;
}

.admin-page {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  align-content: start;
  gap: var(--wanfan-admin-card-gap);
  color: var(--wanfan-admin-text);
}

.admin-card,
.admin-filter-panel,
body.admin-commerce-route .admin-table,
body.admin-commerce-route .admin-pagination {
  border: 1px solid var(--wanfan-admin-card-border) !important;
  border-radius: var(--wanfan-admin-radius) !important;
  background: var(--wanfan-admin-card-bg) !important;
  box-shadow: var(--wanfan-admin-shadow) !important;
}

body.admin-commerce-route .page-head {
  width: 100%;
  min-width: 0;
  min-height: 36px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 4px !important;
  border: 0 !important;
  background: transparent !important;
}

body.admin-commerce-route .page-head h1 {
  color: var(--wanfan-admin-text-strong) !important;
  font-size: var(--wanfan-admin-font-page) !important;
  font-weight: 700 !important;
}

body.admin-commerce-route .crumb,
body.admin-commerce-route .sub,
body.admin-commerce-route .muted-inline {
  color: var(--wanfan-admin-text-muted) !important;
}

body.admin-commerce-route .page-actions {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px !important;
}

.admin-tabs,
body.admin-commerce-route .selection-list-tabs,
body.admin-commerce-route .selection-library-sort,
body.admin-commerce-route .product-replica-tabs {
  min-width: 0 !important;
  min-height: 38px;
  height: auto !important;
  display: flex;
  align-items: flex-end;
  gap: 28px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  overflow-x: auto;
  border: 1px solid var(--wanfan-admin-card-border) !important;
  border-radius: var(--wanfan-admin-radius) !important;
  background: var(--wanfan-admin-card-bg) !important;
  box-shadow: var(--wanfan-admin-shadow) !important;
}

body.admin-commerce-route .admin-tabs button,
body.admin-commerce-route .selection-list-tabs button,
body.admin-commerce-route .selection-library-sort button,
body.admin-commerce-route .product-replica-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  color: #596579 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  white-space: nowrap;
}

body.admin-commerce-route .admin-tabs button.active,
body.admin-commerce-route .selection-list-tabs button.active,
body.admin-commerce-route .selection-library-sort button.active,
body.admin-commerce-route .product-replica-tabs button.active {
  color: var(--wanfan-admin-primary-strong) !important;
  font-weight: 600 !important;
}

body.admin-commerce-route .admin-tabs button.active::after,
body.admin-commerce-route .selection-list-tabs button.active::after,
body.admin-commerce-route .selection-library-sort button.active::after,
body.admin-commerce-route .product-replica-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 0;
  background: var(--wanfan-admin-primary-strong);
  content: "";
}

body.admin-commerce-route .admin-filter-panel,
body.admin-commerce-route .product-replica-filter-shell {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--wanfan-admin-card-border) !important;
  border-radius: var(--wanfan-admin-radius) !important;
  background: var(--wanfan-admin-card-bg) !important;
  box-shadow: var(--wanfan-admin-shadow) !important;
}

body.admin-commerce-route .selection-list-filters {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px 12px;
}

body.admin-commerce-route .selection-library-filters {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px 12px;
}

body.admin-commerce-route .selection-filter,
body.admin-commerce-route .selection-library-filters label,
body.admin-commerce-route .product-replica-filter {
  min-width: 0 !important;
  height: 30px !important;
  padding: 0 9px !important;
  border: 1px solid var(--wanfan-admin-input-border) !important;
  border-radius: var(--wanfan-admin-radius) !important;
  background: var(--wanfan-admin-input-bg) !important;
  color: var(--wanfan-admin-text) !important;
  font-size: var(--wanfan-admin-font-control) !important;
}

body.admin-commerce-route .selection-filter input,
body.admin-commerce-route .selection-filter select,
body.admin-commerce-route .selection-library-filters input,
body.admin-commerce-route .selection-library-filters select,
body.admin-commerce-route .product-replica-filter input,
body.admin-commerce-route .product-replica-filter select {
  min-width: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--wanfan-admin-text-muted) !important;
  font-size: var(--wanfan-admin-font-control) !important;
  box-shadow: none !important;
}

body.admin-commerce-route .selection-filter:focus-within,
body.admin-commerce-route .selection-library-filters label:focus-within,
body.admin-commerce-route .product-replica-filter:focus-within {
  border-color: var(--wanfan-admin-primary-soft) !important;
  box-shadow: 0 0 0 2px rgba(30, 125, 242, .10) !important;
}

body.admin-commerce-route .selection-filter-actions,
body.admin-commerce-route .product-replica-filter-actions {
  gap: 8px;
}

body.admin-commerce-route .btn,
body.admin-commerce-route .page-num,
body.admin-commerce-route .admin-pagination select,
body.admin-commerce-route .admin-pagination input {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
  border: 1px solid var(--wanfan-admin-input-border) !important;
  border-radius: var(--wanfan-admin-radius) !important;
  background: var(--wanfan-admin-card-bg) !important;
  color: var(--wanfan-admin-text-muted) !important;
  font-size: var(--wanfan-admin-font-control) !important;
  box-shadow: none !important;
}

body.admin-commerce-route .btn:hover,
body.admin-commerce-route .page-num:hover:not(:disabled) {
  border-color: #bfd8f7 !important;
  background: #f7fbff !important;
  color: var(--wanfan-admin-primary-strong) !important;
}

body.admin-commerce-route .btn.primary,
body.admin-commerce-route .page-num.active {
  border-color: var(--wanfan-admin-primary) !important;
  background: var(--wanfan-admin-primary) !important;
  color: #fff !important;
}

body.admin-commerce-route .btn.danger,
body.admin-commerce-route .danger-link {
  color: var(--wanfan-admin-danger) !important;
}

body.admin-commerce-route .btn:disabled,
body.admin-commerce-route .page-num:disabled {
  border-color: var(--wanfan-admin-card-border) !important;
  background: #fafbfc !important;
  color: var(--wanfan-admin-text-disabled) !important;
}

body.admin-commerce-route .tag {
  min-height: 20px;
  padding: 0 6px;
  border-radius: var(--wanfan-admin-radius);
  font-size: 11px;
}

body.admin-commerce-route .admin-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 !important;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

body.admin-commerce-route .admin-table table {
  color: var(--wanfan-admin-text) !important;
  font-size: 11px !important;
}

body.admin-commerce-route .admin-table th,
body.admin-commerce-route .admin-table .product-replica-table th,
body.admin-commerce-route .admin-table th:last-child {
  height: 35px !important;
  padding: 0 8px !important;
  border-bottom: 1px solid #f1f3f6 !important;
  background: var(--wanfan-admin-table-header-bg) !important;
  color: #5e697a !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

body.admin-commerce-route .admin-table td,
body.admin-commerce-route .admin-table .product-replica-table td {
  border-bottom: 1px solid #f1f3f6 !important;
  background: var(--wanfan-admin-table-row-bg) !important;
  color: var(--wanfan-admin-text) !important;
}

body.admin-commerce-route .selection-company-table td {
  height: 72px !important;
  padding: 7px 8px !important;
}

body.admin-commerce-route .product-replica-table tbody tr,
body.admin-commerce-route .product-replica-table tbody td {
  height: 72px !important;
}

body.admin-commerce-route .admin-table tbody tr:hover td,
body.admin-commerce-route .admin-table tbody tr:hover .product-operation-cell {
  background: #f8fbff !important;
}

body.admin-commerce-route .selection-table-cover,
body.admin-commerce-route .product-replica-cover {
  width: 48px;
  height: 48px;
  border-color: var(--wanfan-admin-card-border);
  border-radius: var(--wanfan-admin-radius);
  background: #fafbfc;
}

body.admin-commerce-route .pagination,
body.admin-commerce-route .admin-pagination {
  min-width: 0 !important;
  height: 46px !important;
  padding: 0 12px !important;
  color: var(--wanfan-admin-text-muted) !important;
}

body.admin-commerce-route .admin-empty-state,
body.admin-commerce-route .empty-state {
  min-height: 120px;
  background: var(--wanfan-admin-card-bg) !important;
  color: var(--wanfan-admin-text-muted) !important;
}

body.admin-commerce-route .selection-library-toolbar {
  display: grid;
  gap: 12px;
}

body.admin-commerce-route .selection-library-toolbar .selection-library-sort {
  border-width: 0 0 1px !important;
  box-shadow: none !important;
}

body.admin-commerce-route .selection-library-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--wanfan-admin-card-gap);
}

body.admin-commerce-route .selection-library-card {
  border-color: var(--wanfan-admin-card-border);
  border-radius: var(--wanfan-admin-radius);
  background: var(--wanfan-admin-card-bg);
  box-shadow: var(--wanfan-admin-shadow);
}

body.admin-commerce-route .selection-library-check {
  border: 1px solid var(--wanfan-admin-card-border);
  border-radius: var(--wanfan-admin-radius);
  color: var(--wanfan-admin-text-muted);
}

body.admin-commerce-route .selection-card-overlay button {
  border-radius: var(--wanfan-admin-radius);
  background: rgba(30, 125, 242, .92);
}

body.admin-commerce-route .product-list-replica {
  min-width: 0;
  min-height: calc(100vh - 98px);
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  color: var(--wanfan-admin-text);
  font-size: var(--wanfan-admin-font-body);
}

body.admin-commerce-route .product-replica-filter-shell {
  width: 100%;
}

body.admin-commerce-route .product-replica-filters {
  min-width: 0 !important;
  grid-template-columns: repeat(6, minmax(135px, 1fr));
  gap: 10px 12px;
}

body.admin-commerce-route .product-replica-filter > span:first-child {
  color: var(--wanfan-admin-text) !important;
  font-size: var(--wanfan-admin-font-control) !important;
}

body.admin-commerce-route .product-replica-filter-actions {
  min-height: 30px;
}

body.admin-commerce-route .product-replica-filter-actions .btn {
  min-width: 68px;
}

body.admin-commerce-route .product-collapse-query,
body.admin-commerce-route .product-filter-expand,
body.admin-commerce-route .plain-link,
body.admin-commerce-route .product-title-link,
body.admin-commerce-route .product-template-link,
body.admin-commerce-route .product-replica-actions > button,
body.admin-commerce-route .product-more-menu summary,
body.admin-commerce-route .product-more-popover button {
  color: var(--wanfan-admin-primary-strong);
}

body.admin-commerce-route .product-create-row {
  min-width: 0;
  height: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border: 1px solid var(--wanfan-admin-card-border);
  background: var(--wanfan-admin-card-bg);
}

body.admin-commerce-route .product-list-loading,
body.admin-commerce-route .product-list-replica > .error-state {
  min-width: 0;
  margin: 0;
}

body.admin-commerce-route .product-replica-table-scroll {
  margin: 0;
  border: 1px solid var(--wanfan-admin-card-border);
}

body.admin-commerce-route .product-replica-table {
  min-width: 1720px !important;
}

body.admin-commerce-route .product-operation-cell,
body.admin-commerce-route .product-replica-table th:last-child {
  box-shadow: -6px 0 10px rgba(15, 23, 42, .035);
}

body.admin-commerce-route .product-replica-pagination {
  justify-content: flex-end;
}

@media (max-width: 1599px) {
  body.admin-commerce-route .selection-list-filters,
  body.admin-commerce-route .product-replica-filters {
    grid-template-columns: repeat(4, minmax(135px, 1fr));
  }

  body.admin-commerce-route .product-filter-actions-inline {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1279px) {
  body.admin-commerce-route .selection-list-filters,
  body.admin-commerce-route .product-replica-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.admin-commerce-route .selection-library-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.admin-commerce-route .product-filter-span-2 {
    grid-column: span 2;
  }

  body.admin-commerce-route .product-filter-actions-row,
  body.admin-commerce-route .product-filter-actions-inline {
    grid-column: 1 / -1;
  }
}

@media (max-width: 999px) {
  body.admin-commerce-route .selection-list-filters,
  body.admin-commerce-route .product-replica-filters,
  body.admin-commerce-route .selection-library-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.admin-commerce-route .page-head {
    align-items: flex-start !important;
    flex-direction: column;
    padding-bottom: 4px !important;
  }

  body.admin-commerce-route .admin-tabs,
  body.admin-commerce-route .selection-list-tabs,
  body.admin-commerce-route .selection-library-sort,
  body.admin-commerce-route .product-replica-tabs {
    gap: 20px !important;
  }
}

/* Local Visit Detail center: scoped to the canonical WanFan light shell. */
.visit-detail-center{display:flex;flex-direction:column;gap:10px;min-width:0;color:var(--wf-text-primary,#1f2937)}
.visit-detail-center .page-head{margin-bottom:0}
.visit-detail-filters{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px;padding:12px;background:var(--wf-surface,#fff);border:1px solid var(--wf-border,#e5e7eb);border-radius:var(--wf-radius-md,6px)}
.visit-detail-filters label{display:flex;align-items:center;gap:8px;min-width:0;height:34px;padding:0 10px;background:var(--wf-control-bg,#f8fafc);border:1px solid var(--wf-border-subtle,#edf2f7);border-radius:var(--wf-radius-sm,4px);font-size:12px;color:var(--wf-text-secondary,#475569)}
.visit-detail-filters label span{flex:0 0 auto;white-space:nowrap}
.visit-detail-filters input,.visit-detail-filters select{width:100%;min-width:0;border:0;background:transparent;outline:0;color:var(--wf-text-primary,#334155);font-size:12px}
.visit-detail-filter-actions{grid-column:1/-1;display:flex;gap:8px;align-items:center}
.visit-detail-filter-collapsed{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--wf-surface,#fff);border:1px solid var(--wf-border,#e5e7eb);border-radius:var(--wf-radius-md,6px);color:var(--wf-text-secondary,#64748b)}
.visit-detail-table-wrap{min-width:0;overflow-x:auto;background:var(--wf-surface,#fff);border:1px solid var(--wf-border,#e5e7eb);border-radius:var(--wf-radius-md,6px)}
.visit-detail-table-wrap .table-wrap{border:0;border-radius:0;overflow-x:auto}
.visit-detail-table{min-width:1520px;font-size:12px}
.visit-detail-table th{height:36px;background:var(--wf-table-head,#f8fafc);white-space:nowrap;color:var(--wf-text-secondary,#475569)}
.visit-detail-table td{height:56px;vertical-align:middle;white-space:nowrap}
.visit-detail-table .sub{display:block;margin-top:3px;color:var(--wf-text-muted,#94a3b8);font-size:11px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.visit-detail-table .visit-url{max-width:260px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.visit-unmapped-row td{background:#fff7ed}
.visit-detail-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:10px 12px;border-top:1px solid var(--wf-border,#e5e7eb);font-size:12px;color:var(--wf-text-secondary,#64748b)}
.visit-detail-pagination strong{color:var(--wf-text-primary,#0f172a)}
@media(max-width:1180px){.visit-detail-filters{grid-template-columns:repeat(3,minmax(140px,1fr))}}

/* Meta account binding V2: local read-only integration surface. */
.meta-account-notice{margin-bottom:10px}.meta-account-table-card{padding:0;overflow:hidden}.meta-account-table-shell{width:100%;max-width:100%;overflow-x:auto}.meta-account-table{min-width:1680px;margin:0}.meta-account-table th,.meta-account-table td{white-space:nowrap;vertical-align:middle}.meta-account-table td:nth-child(2){min-width:220px}.meta-account-table .sub{display:block;margin-top:4px;color:#8a95a8;font-size:11px}.meta-account-actions{display:flex;gap:4px}.meta-account-actions .btn{padding-inline:7px!important}.meta-account-footer{display:flex;justify-content:flex-end;padding:10px 12px;border-top:1px solid #e7ecf3;color:#64748b;font-size:12px}.meta-account-modal-backdrop{position:fixed;inset:0;z-index:1500;display:grid;place-items:center;padding:24px;background:rgba(15,23,42,.48)}.meta-account-modal{width:min(760px,calc(100vw - 48px));max-height:calc(100vh - 48px);overflow:auto;border:1px solid #d8dfeb;border-radius:6px;background:#fff;box-shadow:0 24px 80px rgba(15,23,42,.24)}.meta-account-modal header,.meta-account-modal footer{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e7ecf3}.meta-account-modal header h2,.meta-account-modal header p{margin:0}.meta-account-modal header p{margin-top:5px;color:#64748b;font-size:12px}.meta-account-modal footer{justify-content:flex-end;gap:8px;border-top:1px solid #e7ecf3;border-bottom:0}.meta-account-binding-form{display:grid;grid-template-columns:1fr 1fr;gap:15px 18px;padding:18px 20px}.meta-account-binding-form label{display:grid;gap:7px;color:#435069;font-size:13px}.meta-account-binding-form input,.meta-account-binding-form select{width:100%;height:36px;padding:0 10px;border:1px solid #d8dfeb;border-radius:3px;background:#fff}.meta-account-config-warning{margin:16px 20px 0;padding:10px 12px;border:1px solid #fed7aa;background:#fff7ed;color:#9a3412}.meta-verification-result{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;margin-top:10px;padding:10px 12px;border:1px solid #d8dfeb;background:#f8fafc}.meta-verification-result.success{border-color:#a7f3d0;background:#ecfdf5}.meta-verification-result.failed{border-color:#fecaca;background:#fef2f2}.meta-creative-fixture-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.meta-creative-fixture-card{padding:16px;border:1px solid #e2e8f0;background:#fff}.meta-creative-fixture-card dl{display:grid;grid-template-columns:90px 1fr;gap:7px}.meta-creative-fixture-card dt{color:#64748b}@media(max-width:800px){.meta-account-binding-form,.meta-creative-fixture-grid{grid-template-columns:1fr}.meta-verification-result{grid-template-columns:1fr}}
.product-analysis-center { min-width: 0; color: #334155; }

.product-analysis-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px 10px;
  margin-bottom: 8px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid #edf1f5;
}

.product-analysis-filters label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  color: #64748b;
  font-size: 11px;
  background: #fff;
  border: 1px solid #edf1f5;
  border-radius: 2px;
}

.product-analysis-filters label > span { flex: 0 0 auto; white-space: nowrap; }
.product-analysis-filters input,
.product-analysis-filters select { width: 100%; min-width: 0; height: 26px; padding: 0; border: 0; outline: 0; color: #334155; background: transparent; font-size: 11px; }
.product-analysis-date-range { grid-column: span 2; }
.product-analysis-date-range input { min-width: 108px; }
.product-analysis-date-range b { flex: 0 0 auto; color: #94a3b8; font-weight: 500; }
.product-analysis-filter-actions { display: flex; align-items: center; justify-content: flex-start; gap: 6px; }
.product-analysis-filter-actions .btn { min-height: 30px; padding: 0 14px; border-radius: 2px; font-size: 11px; }

.product-analysis-table-wrap {
  background: #fff;
  border: 1px solid #edf1f5;
  border-radius: 0;
  overflow: hidden;
}

.product-analysis-table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.product-analysis-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 11px;
}

.product-analysis-table th,
.product-analysis-table td {
  height: 48px;
  padding: 4px 7px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.product-analysis-table th {
  height: 32px;
  background: #f6f8fb;
  color: #475569;
  font-weight: 600;
}

.product-analysis-table td:nth-child(2) {
  min-width: 190px;
  white-space: normal;
}

.product-analysis-table td:nth-child(2) strong { display: block; overflow: hidden; color: #26344a; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.product-analysis-table td:nth-child(n+3):nth-child(-n+12) { font-variant-numeric: tabular-nums; }

.product-analysis-cover {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 3px;
  overflow: hidden;
  background: #f1f3f6;
}

.product-analysis-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-analysis-cover-empty { padding: 2px; color: #94a3b8; font-size: 9px; line-height: 1.2; text-align: center; }

.product-analysis-link,
.product-analysis-sort {
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.product-analysis-link {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  margin-top: 2px;
  font-size: 10px;
  white-space: nowrap;
}

.product-analysis-sort {
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
}

.product-analysis-sort.active span { color: #2563eb; }
.wanfan-pagination.product-analysis-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  height: 44px !important;
  min-height: 44px;
  padding: 6px 10px !important;
  overflow-x: auto;
  overflow-y: hidden;
  color: #64748b;
  background: #fff;
  border-top: 1px solid #edf1f5;
  font-size: 11px;
  white-space: nowrap;
  scrollbar-width: thin;
}

.wanfan-pagination-controls {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: max-content;
  margin-left: auto;
  white-space: nowrap;
}

.wanfan-pagination-total { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; margin-right: 7px; }
.wanfan-pagination-total strong { color: #334155; font-weight: 500; }
.wanfan-pagination-pages,
.wanfan-pagination-jump { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; white-space: nowrap; }

.wanfan-admin-light-shell .product-analysis-pagination .wanfan-pagination-size,
.wanfan-admin-light-shell .product-analysis-pagination input,
.wanfan-admin-light-shell .product-analysis-pagination .page-num,
.wanfan-admin-light-shell .product-analysis-pagination .product-analysis-jump {
  box-sizing: border-box;
  flex: 0 0 auto;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0;
  border: 1px solid var(--wanfan-admin-input-border, #d8dee9) !important;
  border-radius: var(--wanfan-admin-radius, 2px) !important;
  background: #fff !important;
  color: var(--wanfan-admin-text-muted, #64748b) !important;
  font-size: 11px !important;
  line-height: 28px;
  white-space: nowrap;
}

.wanfan-admin-light-shell .product-analysis-pagination .wanfan-pagination-size { width: 88px; padding: 0 24px 0 9px !important; }
.wanfan-admin-light-shell .product-analysis-pagination input { width: 48px; padding: 0 6px !important; text-align: center; }
.wanfan-admin-light-shell .product-analysis-pagination .page-num { width: 30px; min-width: 30px; padding: 0 8px !important; overflow: visible; }
.wanfan-admin-light-shell .product-analysis-pagination .product-analysis-page-nav { width: auto !important; min-width: 58px !important; padding: 0 11px !important; }
.wanfan-admin-light-shell .product-analysis-pagination .product-analysis-jump { width: auto !important; min-width: 48px !important; padding: 0 11px !important; }
.wanfan-admin-light-shell .product-analysis-pagination .page-num.active { border-color: var(--wanfan-admin-primary, #1e7df2) !important; background: var(--wanfan-admin-primary, #1e7df2) !important; color: #fff !important; }
.wanfan-admin-light-shell .product-analysis-pagination .page-num:disabled { border-color: #e5e9ef !important; background: #f8fafc !important; color: #a7b0bf !important; opacity: 1; }
.wanfan-admin-light-shell .product-analysis-pagination .page-num:hover:not(:disabled),
.wanfan-admin-light-shell .product-analysis-pagination .product-analysis-jump:hover { border-color: #bfd8f7 !important; background: #f7fbff !important; color: var(--wanfan-admin-primary-strong, #1769d2) !important; }
.product-analysis-roi-link { display: block; margin-top: 5px; padding: 0; }

.product-analysis-detail header { display: flex; gap: 14px; align-items: flex-start; }
.product-analysis-detail header img,
.product-analysis-detail-empty { display: grid; place-items: center; width: 88px; height: 88px; flex: 0 0 88px; border-radius: 4px; object-fit: cover; background: #f1f3f6; color: #94a3b8; font-size: 11px; }
.product-analysis-detail header h3 { margin: 2px 0 8px; font-size: 16px; }
.product-analysis-detail header p { margin: 3px 0; color: #6b7280; font-size: 12px; }
.product-analysis-detail header p b { display: inline-block; min-width: 70px; color: #475569; font-weight: 500; }
.product-analysis-detail-section { margin-top: 18px; }
.product-analysis-detail-section h4 { margin: 0 0 7px; color: #334155; font-size: 13px; }
.product-analysis-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.product-analysis-detail dl div { border: 1px solid #e8edf3; border-radius: 3px; padding: 9px 10px; background: #fafbfc; }
.product-analysis-detail dt { color: #6b7280; font-size: 12px; }
.product-analysis-detail dd { margin: 5px 0 0; font-weight: 600; }

@media (max-width: 1180px) {
  .product-analysis-filters { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .product-analysis-date-range { grid-column: span 2; }
  .wanfan-pagination-controls { margin-left: auto; }
}

.estimated-profit-center {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
}

.estimated-profit-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.estimated-profit-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  min-width: 0;
  padding: 0 8px;
  color: #64748b;
  font-size: 11px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 2px;
}

.estimated-profit-filters label span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.estimated-profit-filters input,
.estimated-profit-filters select {
  width: 100%;
  min-width: 0;
  height: 26px;
  border: 0;
  outline: 0;
  color: #334155;
  font-size: 11px;
  background: transparent;
}

.estimated-profit-date {
  grid-column: span 2;
}

.estimated-profit-date input {
  min-width: 96px;
}

.estimated-profit-date b {
  color: #94a3b8;
  font-weight: 500;
}

.estimated-profit-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.estimated-profit-actions .btn {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 2px;
  font-size: 11px;
}

.estimated-profit-table-wrap {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #edf1f5;
  border-radius: 0;
}

.estimated-profit-table {
  table-layout: fixed;
  width: 100%;
  min-width: 2290px;
  height: auto;
  border-collapse: collapse;
  font-size: 11px;
  color: #334155;
}

.estimated-profit-table th,
.estimated-profit-table td {
  height: 32px;
  padding: 0 6px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #eef2f6;
}

.estimated-profit-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 32px;
  color: #475569;
  font-weight: 600;
  background: #f6f8fb;
}

.estimated-profit-table td {
  background: #fff;
}

.estimated-profit-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.estimated-profit-table .profit-gain strong {
  color: #15803d;
}

.estimated-profit-table .profit-loss strong,
.estimated-profit-table .finance-negative,
.estimated-profit-risk strong {
  color: #dc2626;
}

.estimated-profit-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 1;
  height: 34px;
  font-weight: 600;
  background: #fafbfc;
  border-top: 1px solid #dfe5ec;
}

.estimated-profit-table tfoot td:first-child {
  color: #ef4444;
}

.estimated-profit-risk td {
  background: #fff;
}

.estimated-profit-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 38px;
  padding: 6px 10px;
  color: #64748b;
  font-size: 11px;
  background: #fff;
  border: 1px solid #edf1f5;
  border-top: 0;
  border-radius: 0;
  white-space: nowrap;
}

.estimated-profit-page-number,
.estimated-profit-page-btn {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 26px;
  padding: 0 7px;
  color: #64748b;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 2px;
  font-size: 11px;
  cursor: pointer;
}

.estimated-profit-page-number.active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

.estimated-profit-page-btn:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.estimated-profit-pagination select,
.estimated-profit-pagination input {
  height: 26px;
  padding: 0 7px;
  border: 1px solid #d8dee9;
  border-radius: 2px;
  background: #fff;
  font-size: 11px;
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
}

.estimated-profit-pagination select {
  width: 88px;
}

.estimated-profit-pagination input {
  width: 46px;
}

@container (max-width: 420px) {
  .estimated-profit-date {
    grid-column: 1;
    flex-wrap: wrap;
    height: auto;
    min-height: 30px;
  }
  .estimated-profit-date input { flex: 1 1 96px; }
  .estimated-profit-actions { justify-content: flex-start; }
}

/* Product Review center final drawer override. */
.drawer.product-review-center-drawer {
  width: min(1480px, 96vw) !important;
  max-width: none !important;
  grid-template-rows: 58px minmax(0, 1fr) 58px !important;
}
.drawer.product-review-center-drawer .drawer-body { padding: 0 !important; background: #f7f9fc !important; }

/* Product/Selection shared package detail table layout V2. */
body.product-editor-route .company-package-editor {
  overflow-x: hidden !important;
}

body.product-editor-route .company-package-details {
  min-width: 0 !important;
  overflow-x: visible !important;
}

body.product-editor-route .company-package-detail-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 0;
  padding-bottom: 2px;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

body.product-editor-route .company-package-detail-table {
  width: 1220px !important;
  min-width: 1220px !important;
  max-width: none !important;
  table-layout: fixed !important;
}

body.product-editor-route .company-package-detail-table col.package-col-name { width: 220px; }
body.product-editor-route .company-package-detail-table col.package-col-region { width: 80px; }
body.product-editor-route .company-package-detail-table col.package-col-id { width: 150px; }
body.product-editor-route .company-package-detail-table col.package-col-owner { width: 150px; }
body.product-editor-route .company-package-detail-table col.package-col-cover { width: 130px; }
body.product-editor-route .company-package-detail-table col.package-col-quantity { width: 130px; }
body.product-editor-route .company-package-detail-table col.package-col-attribute { width: 170px; }
body.product-editor-route .company-package-detail-table col.package-col-cost { width: 110px; }
body.product-editor-route .company-package-detail-table col.package-col-action { width: 80px; }

body.product-editor-route .company-package-detail-table th,
body.product-editor-route .company-package-detail-table td {
  padding-inline: 12px !important;
  vertical-align: middle;
}

body.product-editor-route .company-package-detail-table th { white-space: nowrap; }
body.product-editor-route .company-package-detail-table tbody td { height: 64px !important; }

body.product-editor-route .package-product-name > span {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.product-editor-route .package-product-id strong,
body.product-editor-route .package-product-id small,
body.product-editor-route .package-product-owner span,
body.product-editor-route .package-product-owner small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.product-editor-route .package-product-id strong,
body.product-editor-route .package-product-owner span {
  color: #394352;
  font-weight: 600;
}

body.product-editor-route .package-product-id small,
body.product-editor-route .package-product-owner small {
  margin-top: 4px;
  color: #8a94a3;
  font-size: 10px;
}

body.product-editor-route .package-product-region,
body.product-editor-route .package-product-cover,
body.product-editor-route .package-product-attribute,
body.product-editor-route .package-product-cost,
body.product-editor-route .package-product-action { white-space: nowrap; }

body.product-editor-route .package-product-cover { text-align: center; }

body.product-editor-route .package-item-cover-preview img,
body.product-editor-route .package-item-cover-preview .company-empty-thumb {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain;
}

body.product-editor-route .package-item-cover-control {
  display: grid;
  grid-template-columns: 48px minmax(48px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

body.product-editor-route .package-item-cover-preview {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid #d9e0e9;
  border-radius: 4px;
  background: #fff;
}

body.product-editor-route .package-item-cover-actions {
  display: grid;
  gap: 3px;
}

body.product-editor-route .package-item-cover-upload,
body.product-editor-route .package-item-cover-delete {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1769e0;
  font-size: 11px;
  line-height: 18px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

body.product-editor-route .package-item-cover-input { display: none; }
body.product-editor-route .package-item-cover-delete { color: #d92d20; }
body.product-editor-route .package-item-cover-delete:disabled { color: #aab2bf; cursor: default; }

.package-item-cover-large-preview {
  display: grid;
  min-height: 320px;
  place-items: center;
  background: #f6f8fb;
}

.package-item-cover-large-preview img {
  max-width: min(720px, 100%);
  max-height: 70vh;
  object-fit: contain;
}

body.product-editor-route .package-product-quantity .company-quantity {
  display: inline-grid;
  grid-template-columns: 28px 44px 28px;
  width: 100px;
  white-space: nowrap;
  vertical-align: middle;
}

body.product-editor-route .package-product-quantity .company-quantity button,
body.product-editor-route .package-product-quantity .company-quantity input {
  min-width: 0;
  margin: 0;
}

body.product-editor-route .package-product-cost {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

body.product-editor-route .package-product-action,
body.product-editor-route .package-product-action .company-text-danger { white-space: nowrap; }

body.product-editor-route .company-package-detail-table th:last-child,
body.product-editor-route .company-package-detail-table td:last-child {
  position: static !important;
  right: auto !important;
}

body.product-editor-route .company-package-editor .company-switch input {
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
}

/* Keep the shared Editor V2 contract last so legacy replica overrides cannot
   reintroduce uneven fields at browser zoom levels. */
body.product-editor-route .editor-form-grid-v2 {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  column-gap: 24px !important;
  row-gap: 20px !important;
}

body.product-editor-route .editor-form-grid-v2 > .editor-col-4 { grid-column: span 4 !important; }
body.product-editor-route .editor-form-grid-v2 > .editor-col-6 { grid-column: span 6 !important; }
body.product-editor-route .editor-form-grid-v2 > .editor-col-12 { grid-column: 1 / -1 !important; }

body.product-editor-route .company-form-section,
body.product-editor-route .editor-card.full-editor-card,
body.product-editor-route .company-content-settings,
body.product-editor-route .company-spec-page,
body.product-editor-route .company-marketing-page {
  margin: 0 !important;
  padding: 24px !important;
  border: 0 !important;
  border-bottom: 1px solid #e7ebf0 !important;
}

body.product-editor-route .company-field input,
body.product-editor-route .company-field select,
body.product-editor-route .editor-form-grid-v2 input:not([type="checkbox"]):not([type="radio"]),
body.product-editor-route .editor-form-grid-v2 select,
body.product-editor-route .editor-settings-section input:not([type="checkbox"]):not([type="radio"]),
body.product-editor-route .editor-settings-section select {
  height: 34px !important;
  min-height: 34px !important;
}

body.product-editor-route .template-editor-settings {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 20px 24px !important;
  padding: 22px 24px 28px !important;
}

body.product-editor-route .logistics-fees,
body.product-editor-route .company-ad-settings-pane .company-ad-pixel-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 20px 24px !important;
  padding: 22px 24px 28px !important;
}

@media (max-width: 1100px) {
  body.product-editor-route .editor-form-grid-v2 > .editor-col-4,
  body.product-editor-route .editor-form-grid-v2 > .editor-col-6 {
    grid-column: span 6 !important;
  }
}

@media (max-width: 720px) {
  body.product-editor-route .editor-form-grid-v2 > .editor-col-4,
  body.product-editor-route .editor-form-grid-v2 > .editor-col-6,
  body.product-editor-route .editor-form-grid-v2 > .editor-col-12 {
    grid-column: 1 / -1 !important;
  }

  body.product-editor-route .company-form-section,
  body.product-editor-route .editor-card.full-editor-card,
  body.product-editor-route .company-content-settings,
  body.product-editor-route .company-spec-page,
  body.product-editor-route .company-marketing-page {
    padding: 18px 16px !important;
  }
}

/* Selection remains a native checkbox, with a compact visual and a 44px hit area. */
.selection-library-check { width:44px; height:44px; padding:0; top:4px; left:4px; display:grid; place-items:center; background:transparent; cursor:pointer; }
.selection-library-check input { position:absolute; inset:0; width:44px; height:44px; margin:0; opacity:0; cursor:inherit; }
.selection-library-check .selection-check-mark { width:22px; height:22px; display:grid; place-items:center; border:1.5px solid #667085; border-radius:6px; background:#fff; color:#fff; font-size:16px; pointer-events:none; box-shadow:0 1px 4px #0002; }
.selection-library-check input:checked + .selection-check-mark { background:#1769ff; border-color:#1769ff; }
.selection-library-check input:checked + .selection-check-mark::after { content:"✓"; }
.selection-library-check input:focus-visible + .selection-check-mark { outline:3px solid #94bdff; outline-offset:3px; }
.selection-library-check input:disabled + .selection-check-mark { background:#667085; border-color:#667085; }
.selection-library-card:has(.selection-library-check input:checked) { border-color:#1769ff; box-shadow:0 0 0 1px #1769ff; }

.detail-mode-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:8px; }
.detail-mode-controls small { color:#667085; }
.detail-mode-controls [aria-pressed=true] { color:#1769ff; border-color:#1769ff; }
.detail-source-panel { display:flex; height:460px; border:1px solid #d0d5dd; background:#f8fafc; }
.detail-source-panel[hidden],.company-rich-body[hidden] { display:none; }
.detail-source-lines { width:48px; flex-shrink:0; text-align:right; overflow:hidden; color:#667085; border-right:1px solid #d0d5dd; }
.detail-source-code { position:relative; min-width:0; flex:1; }
.detail-source-panel pre,.detail-source-panel textarea { box-sizing:border-box; margin:0; padding:12px; font:14px/1.6 monospace; tab-size:2; white-space:pre; }
.detail-source-highlight,.detail-source-code textarea { position:absolute; inset:0; width:100%; height:100%; overflow:auto; border:0; }
.detail-source-highlight { pointer-events:none; color:#334155; }
.detail-source-code textarea { color:transparent; caret-color:#111827; background:transparent; resize:none; -webkit-text-fill-color:transparent; }
.detail-source-code textarea::selection { background:#b8d6ff; }
.detail-code-tag { color:#085cad; }
.company-rich-body img,.company-rich-body video { max-width:100%; height:auto; }
.company-rich-toolbar input[type=color] { width:30px; height:26px; padding:0; }

.company-rich-toolbar input[data-detail-paste-plain]{width:16px;height:16px;min-height:0;display:inline-block;margin:0 5px 0 0;vertical-align:middle}
.company-rich-toolbar label:has([data-detail-paste-plain]){display:inline-flex;align-items:center}

.wanfan-public-detail{padding:16px;overflow-wrap:anywhere;max-width:100%;box-sizing:border-box}.wanfan-public-detail img,.wanfan-public-detail video{max-width:100%!important;height:auto!important;object-fit:contain}.wanfan-public-detail *{max-width:100%;box-sizing:border-box}

.detail-editor-notice{padding:12px;background:#eef6ff;color:#175ea8;border-radius:4px}

.drawer.template-preview-drawer.saved-customer-preview-drawer{width:min(560px,100vw)!important;max-width:560px!important}
.drawer.saved-customer-preview-drawer .drawer-body{overflow:auto!important;display:flex;flex-direction:column;align-items:stretch}
.drawer.saved-customer-preview-drawer .customer-preview-saved-notice{padding:10px 16px;margin:0;color:#475569;font-size:12px;background:#f8fafc}
.drawer.saved-customer-preview-drawer .active-template-preview-layout{flex:none;min-height:0;padding:12px 0}

.drawer.package-composition-drawer{z-index:42;width:min(1000px,96vw)}
.drawer-backdrop.package-composition-backdrop{z-index:41}
.drawer.package-composition-drawer .drawer-body{overflow:auto}
[data-composition-row] td{padding:8px;vertical-align:middle}
[data-composition-quantity]{display:inline-block;min-width:28px;text-align:center}

.package-composition-table{table-layout:fixed;width:100%;min-width:960px}
.package-composition-table td{white-space:normal!important;overflow-wrap:anywhere}
.package-composition-table th:nth-child(1){width:24%}.package-composition-table th:nth-child(2){width:7%}.package-composition-table th:nth-child(3){width:17%}.package-composition-table th:nth-child(4){width:7%}.package-composition-table th:nth-child(5){width:12%}.package-composition-table th:nth-child(6){width:14%}.package-composition-table th:nth-child(7){width:11%}.package-composition-table th:nth-child(8){width:8%}

/* Saved-customer drawer must keep fixed checkout controls above its footer. */
.saved-customer-preview-drawer .mobile-preview-device-frame,
.saved-customer-preview-drawer .mobile-preview-viewport,
.saved-customer-preview-drawer .mobile-preview-page-renderer {
  height: min(932px, calc(100dvh - 190px)) !important;
  min-height: 0 !important;
  max-height: min(932px, calc(100dvh - 190px)) !important;
}

/* Order-center detail is not a compact product row. */
.order-list-page .order-company-table .order-expanded-row,
.order-list-page .order-company-table .order-expanded-row > td {
 height:auto !important; min-height:0 !important; max-height:none !important;
 overflow:visible; white-space:normal; position:static;
}
.order-inline-detail { max-height:65vh; overflow:auto; grid-template-columns:repeat(3,minmax(0,1fr)); }
.order-inline-detail p,.order-inline-detail li { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:900px){.order-inline-detail{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* Company detail editor: two compact rows; source display never rewrites URLs. */
.company-rich-editor .detail-editor-hint{margin:8px 0;color:#667085;font-size:12px}
.company-rich-editor .company-rich-toolbar-row{min-height:34px;padding:3px 6px;gap:2px;flex-wrap:nowrap}
.company-rich-editor .company-rich-toolbar button{height:26px;min-width:26px;padding:0 5px;flex-shrink:0}
.company-rich-editor .company-rich-toolbar button[hidden]{display:none}
.company-rich-editor .company-rich-toolbar button[aria-pressed=true]{background:#e7efff;border-color:#80a9ef;color:#1557be}
.company-rich-editor .company-rich-toolbar button:disabled,.company-rich-editor .company-rich-toolbar input:disabled,.company-rich-editor .company-rich-toolbar select:disabled{opacity:.4;cursor:not-allowed}
.company-rich-editor .company-toolbar-divider{height:20px;flex-shrink:0;margin:0 3px}
.company-rich-editor .detail-mode-controls{display:inline-flex;margin:0;padding:0}
.company-rich-editor .company-format-select{height:26px;min-width:72px;padding-left:5px;flex-shrink:0}
.company-rich-editor .company-font-size{min-width:58px}
.company-rich-editor .company-rich-toolbar label{white-space:nowrap;font-size:12px;flex-shrink:0}
.company-rich-editor .detail-source-panel{height:500px}
.company-rich-editor .detail-source-code textarea,.company-rich-editor .detail-source-highlight{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all;overflow-x:hidden;scrollbar-gutter:stable}
.company-rich-editor .detail-code-line,.company-rich-editor .detail-source-lines>span{display:block;min-height:22.4px}
.company-rich-editor .detail-source-lines{white-space:normal;padding-right:10px}
.company-rich-editor .detail-no-wrap textarea,.company-rich-editor .detail-no-wrap .detail-source-highlight{white-space:pre;overflow-wrap:normal;word-break:normal;overflow-x:auto}
.company-rich-editor .detail-table-dialog{padding:10px;display:flex;gap:10px;align-items:center;background:#f3f6fa}
.company-rich-editor .detail-table-dialog[hidden]{display:none}
.company-rich-editor .detail-table-dialog input{width:65px}
.company-rich-editor table{max-width:100%;table-layout:fixed}
.company-rich-editor td,.company-rich-editor th{overflow-wrap:anywhere;min-width:32px}
.detail-code-attribute{color:#6a45a1}.detail-code-value{color:#a33d2d}
.company-rich-editor [data-detail-media-notice]{margin:8px 0;font-size:12px}
.company-rich-editor [data-detail-media-notice][hidden]{display:none}
.company-rich-editor .company-format-select select,.company-rich-editor .company-format-select select:disabled{opacity:0}
.company-rich-editor .company-format-select:has(select:disabled){opacity:.4}
.company-rich-editor .company-format-select:focus-within{outline:1px solid #80a9ef}

/* Read-only structural projection: raw source remains the single saved value. */
.company-rich-editor .detail-source-panel{display:flex;flex-direction:column;height:560px}
.company-rich-editor .detail-source-panel[hidden]{display:none}
.detail-source-nav{display:flex;align-items:center;gap:6px;padding:8px;border-bottom:1px solid #dbe3ef;flex-wrap:wrap;background:#f4f7fc}
.detail-source-nav button{padding:5px 10px;border:1px solid #ccd6e4;border-radius:3px;background:white;font-size:12px}
.detail-source-nav button[aria-pressed=true]{color:#145ab6;border-color:#7ea8df;background:#eaf2ff}
.detail-source-nav small{color:#667085;font-size:12px}
.detail-source-raw{display:flex;flex:1;min-height:0}
.detail-source-raw[hidden],.detail-structure[hidden]{display:none}
.detail-structure{flex:1;overflow:auto;padding:12px 0;font:13px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;background:#fbfcfe}
.detail-structure-row{display:flex;align-items:flex-start;min-height:25px}
.detail-structure-row:hover{background:#eff5ff}
.detail-structure-row>button{flex:none;width:44px;border:0;border-right:1px solid #dbe3ef;border-radius:0;background:transparent;color:#7a899d;font:12px/25px monospace;cursor:pointer}
.detail-structure-token{padding-left:calc(12px + var(--depth)*18px);padding-right:12px;white-space:pre-wrap;overflow-wrap:anywhere;min-width:0;color:#1260a0}
.detail-whitespace{color:#8b96a6;font-size:11px}
.detail-data-fold{display:inline;white-space:normal;color:#94472e}
.detail-data-fold summary{display:inline-block;cursor:pointer;border:1px solid #ddc7af;border-radius:4px;background:#fff5e5;color:#895019;padding:0 8px;font-size:12px}
.detail-data-fold summary::before{content:'▸ ';}.detail-data-fold[open] summary::before{content:'▾ ';}
.detail-data-fold code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;padding:8px;background:#fff8ef;color:#94472e;max-height:180px;overflow:auto}
.detail-missing-image{display:flex!important;position:static!important;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;width:100%;min-height:88px;margin:10px 0;padding:16px;border:1px dashed #c99b5a;border-radius:6px;background:#fff8ec;color:#79531b;font:13px/1.6 sans-serif;box-sizing:border-box;user-select:none}
.detail-missing-image button,.detail-missing-image label{padding:4px 9px;border:1px solid #d9bb8e;background:#fff;border-radius:3px;cursor:pointer;font-size:12px}
.detail-missing-image input{position:absolute;width:1px;height:1px;opacity:0}
.company-rich-body img:has(+[data-rich-missing-ui]){display:none}
.company-rich-editor .company-rich-toolbar-row{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.company-rich-editor .company-rich-toolbar .company-format-select{min-width:65px;padding-right:15px}
.company-rich-editor .company-rich-toolbar .company-font-size{min-width:53px}
.company-rich-editor .company-toolbar-divider{margin:0 4px;background:#ccd5e2}
.company-rich-editor [data-command=justifyLeft]{text-align:left}.company-rich-editor [data-command=justifyRight]{text-align:right}
.company-rich-editor .detail-color-tool{display:inline-flex;align-items:center;justify-content:center;position:relative;width:25px;height:26px;cursor:pointer}
.company-rich-editor .detail-color-tool input{position:absolute;inset:0;width:25px;height:26px;opacity:0;cursor:pointer}
.detail-color-letter{border-bottom:3px solid #263647;font-size:14px;line-height:16px}
.detail-highlight-letter{background:#fff09a;font-size:14px;padding:0 3px;line-height:18px}
.company-rich-editor .detail-color-tool:has(input:disabled){opacity:.4;cursor:not-allowed}
.company-rich-editor .company-rich-toolbar button svg{flex-shrink:0}

.detail-structure-text{color:#37465a}

/* A failed order review remains visible next to the unchanged input. */
#order-review-note[aria-invalid="true"] { border: 2px solid #b42318; outline-color: #b42318; }
#order-review-error:not(:empty) { margin-top: 12px; padding: 10px 12px; color: #912018; background: #fff1ef; border-left: 3px solid #b42318; line-height: 1.6; }

/* R10: grouped company palette is editor chrome, never customer HTML. */
.detail-palette-host{position:relative;display:inline-flex}
.company-rich-toolbar .detail-palette{position:fixed;inset:auto;margin:0;box-sizing:border-box;overflow:auto;z-index:80;width:274px;padding:12px;background:#fff;color:#172033;border:1px solid #cbd5e1;box-shadow:0 6px 22px #17203330;border-radius:5px}
.detail-palette[hidden]{display:none}
.company-rich-toolbar .detail-palette h4{font-size:12px;margin:10px 0 6px}
.detail-palette-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:4px}
.detail-palette-shades{margin-top:8px;row-gap:2px}
.company-rich-editor .company-rich-toolbar .detail-palette .detail-color-swatch{width:21px;height:19px;min-width:0;padding:0;border:1px solid #b8bec8;border-radius:1px}
.company-rich-toolbar .detail-color-swatch:hover,.detail-color-swatch:focus-visible{outline:2px solid #2563eb;outline-offset:1px}
.detail-palette-entry{display:flex;gap:5px;align-items:center}
.company-rich-toolbar .detail-palette-entry input{width:90px;height:28px;padding:3px 6px;border:1px solid #cbd5e1;position:static;opacity:1}
.detail-palette-status{font-size:12px;white-space:normal;margin:8px 0 0;line-height:1.5}
/* Explicit admin inspection widths; changing these never changes product data. */
.mobile-preview-device-frame,
.mobile-preview-device-frame .mobile-preview-device-status,
.mobile-preview-device-frame .mobile-preview-viewport,
.mobile-preview-device-frame .mobile-preview-page-renderer {
  width:var(--preview-width,430px)!important;
  min-width:var(--preview-width,430px)!important;
  max-width:var(--preview-width,430px)!important;
}
/* Admin preview tools sit above the fixed-width phone, never beside it. */
.preview-width-picker{display:flex;flex:0 0 auto;gap:8px;align-items:center;justify-content:center;margin:8px 0;font-size:13px;line-height:1.5;white-space:nowrap}
.preview-width-picker select{flex:0 0 104px;width:104px!important;min-width:104px!important;height:36px!important;box-sizing:border-box;padding:0 28px 0 12px!important;font:inherit}
/* Company order list: retain each column's reading width instead of squeezing
   thirteen columns into the viewport. Full values remain in expandable detail. */
.order-list-page .order-company-table{overflow-x:auto}
.order-list-page .order-company-table table{width:100%;min-width:var(--order-grid-compact-min)!important}
.order-list-page .order-company-table thead>tr,
.order-list-page .order-company-table tbody>.order-company-row{grid-template-columns:var(--order-grid-fluid,var(--order-grid-compact))}
/* Collapsed summary rows have a real 96px grid track. Details are separate
   rows, so long facts remain readable there without changing summary geometry. */
.order-list-page .order-company-table tbody>.order-company-row{height:96px;min-height:96px;grid-template-rows:96px;box-sizing:border-box}
.order-list-page .order-company-table .order-company-row>td{height:96px!important;min-height:0;padding:10px 9px!important;box-sizing:border-box;line-height:18px;overflow:hidden;overflow-wrap:normal}
.order-list-page .order-company-table th{padding:9px!important;height:auto!important;min-height:40px}
.order-list-page .order-cell-stack{gap:2px;line-height:18px}
.order-list-page .order-product-name,.order-list-page .order-package-summary,
.order-list-page .order-address-preview,.order-list-page .order-note-summary{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}
.order-list-page .order-row-expand-label{margin-top:0;line-height:16px}
.order-list-page .order-company-row .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}
.order-list-page .order-company-row [data-order-column="amount"]{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.order-list-page .order-company-row [data-order-column="createdAt"]{overflow-wrap:anywhere;line-height:18px;font-variant-numeric:tabular-nums}
/* The global last-cell sticky rule must not overlay these measured grid
   columns. All order columns scroll together within their own container. */
.order-list-page .order-company-table [data-order-column="actions"]{position:static;right:auto;z-index:auto;box-shadow:none}
.order-list-page [data-order-column="actions"] .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:22px;align-items:center;gap:4px 6px;margin:0}
.order-list-page .order-company-row [data-order-column="actions"] :is(a,button){min-width:0;min-height:22px;height:22px;box-sizing:border-box;white-space:nowrap;font-size:13px;line-height:22px;padding:0;text-align:center}
.order-list-page .order-inline-detail{line-height:1.6}
.order-list-page td[data-order-column="status"]{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.order-list-page [data-order-column="status"] .order-status-badge{width:96px;min-width:96px;max-width:96px;height:24px;min-height:24px;padding:0 4px;line-height:22px;white-space:nowrap;flex-shrink:0;border-radius:4px;font-size:13px;box-sizing:border-box}
.order-list-page [data-order-column="status"] .order-fulfillment-badge{width:108px;min-width:108px;max-width:108px;font-size:12px}
.order-list-page .order-review-badge{background:#fff7d6;color:#8a5700;border-color:#e5b22e}
.order-list-page .order-review-badge::before{display:none}
.order-list-page .order-review-badge[data-review-status="APPROVED"]{background:#ecfdf3;color:#166534;border-color:#bbf7d0}
.order-list-page .order-review-badge[data-review-status="REJECTED"]{background:#f2f4f7;color:#475467;border-color:#d0d5dd}
.order-list-page .order-test-label{align-self:flex-start;margin-top:2px;padding:0 5px;line-height:18px;color:#475467;background:#f2f4f7;border:1px solid #d0d5dd;border-radius:3px;font-size:12px;white-space:nowrap}
.order-list-page [data-order-column="actions"] :is(a,a:visited,button){color:var(--primary,#2563eb);font:inherit;line-height:1.5;text-align:left;background:transparent;border:0;padding:3px 0;text-decoration:none}
.order-list-page [data-order-column="actions"] :is(a,button):hover{color:#1d4ed8;text-decoration:underline}
.order-list-page [data-order-column="actions"] :is(a,button):focus-visible{outline:2px solid var(--primary,#2563eb);outline-offset:2px;border-radius:3px}
.order-list-page [data-order-column="actions"] :is(button:disabled,a[aria-disabled="true"]){color:#94a3b8;text-decoration:none;cursor:not-allowed}
.order-logistics-detail .detail-card{min-width:0;overflow-wrap:anywhere}
.order-logistics-detail ol{padding-left:24px}
.order-logistics-detail li{margin:8px 0}
.order-logistics-detail .logistics-parcel{border-top:1px solid var(--line,#e2e8f0);padding-top:12px;margin-top:12px}


/* A successful server-confirmed draft save highlights only its actual list row. */
.selection-company-table tr.selection-saved-row > td { background-color: #eef8f0; }

.product-replica-actions .order-entry-unavailable { display: block; flex-basis: 100%; color: #667085; font-size: 11px; line-height: 1.5; white-space: normal; }
.product-replica-actions button[aria-busy="true"] { cursor: progress; opacity: .7; }
.detail-module-dialog{width:min(900px,90vw);max-height:90vh;overflow:auto;padding:24px;border:1px solid #cbd5e1;border-radius:12px}.detail-module-dialog textarea{width:100%;font:13px/1.5 monospace;white-space:pre;resize:vertical}.detail-module-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere}.detail-module-dialog::backdrop{background:#0006}figure[data-detail-module]{margin:12px 0;max-width:100%;contain:layout paint}figure[data-detail-module] iframe{max-width:100%;display:block}

/* Isolated module envelopes occupy the detail column, not intrinsic iframe width. */
[data-rich-editor] figure[data-detail-module]{width:100%!important;display:block!important}

/* Keep operation hints readable without changing row actions. */
.product-replica-actions { flex-wrap:wrap; min-width:240px; }
.product-replica-actions > button { flex-shrink:0; }
.product-replica-actions .order-entry-unavailable { min-width:220px; width:100%; flex-shrink:0; overflow-wrap:anywhere; }
.product-promotion-cell small { display:block; white-space:normal; }

/* A single centered phone column; tools never consume a side column. */
.drawer.saved-customer-preview-drawer .active-template-preview-layout.single-render-preview{display:flex!important;flex-direction:column;align-items:center;grid-template-columns:none;gap:12px;width:100%;min-width:0}
.saved-customer-preview-drawer .mobile-preview-device-frame,.saved-customer-preview-drawer .mobile-preview-viewport{width:var(--preview-width,430px)!important;max-width:var(--preview-width,430px)!important;min-width:var(--preview-width,430px)!important;margin-inline:auto}
.saved-customer-preview-drawer .mobile-preview-page-renderer{width:100%!important;max-width:100%!important;min-width:0!important}
.drawer.assisted-mobile-drawer{width:min(560px,100vw)!important;max-width:100vw;grid-template-rows:auto minmax(0,1fr) auto}
.assisted-mobile-drawer .drawer-body{display:flex!important;flex-direction:column;align-items:center;padding:12px;min-width:0;min-height:0;overflow:auto}
.assisted-drawer-note{font-size:12px;line-height:1.5;margin:0 0 10px;max-width:430px}
.assisted-phone-shell{width:min(100%,430px);min-width:0;flex:1;min-height:240px;display:flex;box-sizing:border-box;border:1px solid #dbe3ef;border-radius:12px}
.assisted-phone-frame{display:block;width:100%;min-width:0;height:100%;min-height:240px;border:0;border-radius:12px;background:white}
.assisted-close-choice{padding:12px;background:#fff7e5;width:100%;box-sizing:border-box;font-size:13px}.assisted-close-choice[hidden]{display:none}.assisted-close-choice button{margin:4px;padding:8px}

/* Editor rerenders retain their own viewport. Disable browser re-anchoring of
   replaced controls, not scrolling itself; wheel/touch/section links still work. */
body.product-editor-route #app { overflow-anchor: none; }

/* Raw editing uses the native glyph and caret layer. Structural highlighting is
   a separate read-only view: no transparent overlay can drift at browser zoom. */
.company-rich-editor .detail-source-code textarea {
 color:#253449;-webkit-text-fill-color:currentColor;background:#fff;
 font:14px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;
 letter-spacing:normal;text-transform:none;tab-size:2;
}
.company-rich-editor .detail-source-highlight {visibility:hidden;}

/* Source navigation is editor UI only; original source stays in its textarea. */
[data-detail-image-index] { padding: 8px; border-bottom: 1px solid #d8e2ee; background:#f8faff; }
[data-detail-image-index] > div { max-height: 240px; overflow:auto; }
.detail-image-source-row { padding:8px; border-bottom:1px solid #d8e2ee; overflow-wrap:anywhere; }
.detail-image-source-row > span { display:block; margin-bottom:4px; }
.detail-image-source-row button { margin:0 8px 4px 0; }
.detail-image-source-row pre { white-space:pre-wrap; overflow-wrap:anywhere; user-select:text; }

/* Scoped library and package layout; no customer template rules. */
body.admin-commerce-route .selection-library-filters { grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); }
body.admin-commerce-route .selection-library-filters label { display:flex; align-items:center; gap:12px; height:36px !important; }
body.admin-commerce-route .selection-library-filters .selection-filter-label { flex:0 0 64px; white-space:nowrap; line-height:20px; }
body.admin-commerce-route .selection-library-filters input,
body.admin-commerce-route .selection-library-filters select { flex:1 1 0; width:0; }
body.admin-commerce-route .selection-library-filter-actions { grid-column:1/-1; display:flex; gap:8px; }
body.product-editor-route .company-package-detail-table-wrap { overflow-x:auto; }
body.product-editor-route .package-composition-table { min-width:1050px; table-layout:auto; font-size:13px; line-height:1.5; }
body.product-editor-route .package-composition-table th { white-space:nowrap; }
body.product-editor-route .package-composition-table td:nth-child(3) { max-width:220px; overflow-wrap:anywhere; }
body.product-editor-route .package-composition-table td:nth-child(5),
body.product-editor-route .package-composition-table td:nth-child(6),
body.product-editor-route .package-composition-table td:last-child { white-space:nowrap; }
body.product-editor-route .package-composition-table .composition-action { display:inline-flex; align-items:center; justify-content:center; min-height:32px; padding:4px 9px; margin:2px; font:inherit; white-space:nowrap; }
body.product-editor-route [data-composition-quantity] { display:inline-block; min-width:26px; text-align:center; }

body.admin-commerce-route .selection-card-identity { font-size:12px; line-height:1.5; color:var(--wanfan-admin-text-muted); overflow-wrap:anywhere; }
body.admin-commerce-route .selection-card-identity summary { cursor:pointer; padding:4px 0; }
body.admin-commerce-route .selection-card-body > strong { white-space:normal; overflow-wrap:anywhere; line-height:1.5; }

/* Editable source block UI only, never included in product HTML. */
.company-rich-editor .detail-image-block-editor{position:static!important;display:block;width:100%;height:130px;min-height:100px;resize:vertical;border:1px solid #cbd5e1;background:#fff;color:#172033;-webkit-text-fill-color:#172033;white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.6 ui-monospace,SFMono-Regular,monospace;}

/* Explicitly supersede the older fixed 1220px / 8%-action-column replica rules.
   Keep controls horizontal; narrow/zoomed viewports scroll this table only. */
body.product-editor-route .company-package-detail-table.package-composition-table {
 width:100%!important;min-width:1160px!important;table-layout:auto!important;
}
body.product-editor-route .package-composition-table th,
body.product-editor-route .package-composition-table td {font-size:13px;line-height:1.5;}
body.product-editor-route .package-composition-table th:nth-child(1){width:22%;min-width:180px;}
body.product-editor-route .package-composition-table th:nth-child(3){width:18%;}
body.product-editor-route .package-composition-table th:last-child{width:180px;min-width:180px;}
body.product-editor-route .package-composition-table td:nth-child(5),
body.product-editor-route .package-composition-table td:nth-child(6),
body.product-editor-route .package-composition-table td:last-child {white-space:nowrap!important;}
body.product-editor-route .package-composition-table td:last-child{min-width:180px;}

/* Source selection actions stay outside the image and never mimic selection. */
.admin-selection-library .selection-adopted-badge { position:absolute; z-index:3; top:10px; left:10px; padding:5px 10px; border:1px solid #b9dacb; border-radius:5px; background:#effbf4; color:#067647; font-size:12px; }
.admin-selection-library .selection-card-actions { display:flex; flex-wrap:wrap; gap:8px; padding:12px 12px 0; }
.admin-selection-library .selection-card-actions .btn { flex:1 0 auto; white-space:nowrap; min-height:32px; }
.admin-selection-library .selection-card-body > .btn { white-space:nowrap; }
.selection-maintenance { margin:16px 0; }

/* Only shown after an actual editor backup failure; never part of customer HTML. */
.editor-recovery-failure{position:fixed;z-index:1100;right:20px;bottom:80px;max-width:min(440px,calc(100vw - 40px));padding:14px;background:#fff8e8;border:1px solid #d99a27;border-radius:8px;box-shadow:0 4px 18px #0002;color:#49340c;font-size:14px;line-height:1.5}
.editor-recovery-failure p{margin:0 0 10px;overflow-wrap:anywhere}.editor-recovery-failure .btn{margin-right:8px;white-space:nowrap}

/* Keep the source-to-formal action outside columns covered by sticky review controls. */
.admin-selection-list .selection-formal-link { display:block; margin-top:6px; white-space:nowrap; line-height:1.5; padding:4px 0; }

/* SKU procurement currency belongs to its own cost cell, never the sales column. */
body.product-editor-route .company-sku-scroll { max-width:100%; overflow-x:auto; }
body.product-editor-route .procurement-sku-mapping-table { min-width:1120px; table-layout:fixed; }
body.product-editor-route .procurement-sku-mapping-table th:first-child { width:24%; }
body.product-editor-route .procurement-sku-mapping-table th:nth-child(5) { width:17%; }
body.product-editor-route .procurement-sku-mapping-table td { vertical-align:top; height:auto!important; }
body.product-editor-route .procurement-sku-mapping-table td label { display:flex; flex-direction:column; gap:6px; margin-bottom:6px; }
body.product-editor-route .procurement-sku-mapping-table td input:not([type="hidden"]),
body.product-editor-route .procurement-sku-mapping-table td select {
  display:block; width:100%; max-width:100%; min-width:0; box-sizing:border-box;
  height:36px!important; padding:0 10px!important; margin:0 0 6px; font-size:13px!important;
}
body.product-editor-route .procurement-sku-mapping-table td small { display:block; white-space:normal; line-height:1.5; }

/* Scoped gift data editor; no changes to product or landing-page controls. */
.fulfillment-catalog-form fieldset { border:0; padding:0; margin:0; min-width:0; }
.fulfillment-catalog-form label { display:flex; flex-direction:column; gap:7px; margin:12px 0; font-size:14px; }
.fulfillment-catalog-form input,.fulfillment-catalog-form select { box-sizing:border-box; width:100%; height:40px !important; padding:8px 12px; font:inherit; }
.fulfillment-catalog-form .fc-skus section { border:1px solid #dce3ee; border-radius:6px; padding:12px; margin:16px 0; }
.fulfillment-catalog-form code { overflow-wrap:anywhere; }

/* Actual versioned renderer in a non-interactive, isolated thumbnail viewport. */
.template-version-thumbnail { display:block; position:relative; width:100%; aspect-ratio:430/765; overflow:hidden; background:#f4f6fa; border:1px solid #dce3ee; border-radius:6px; box-sizing:border-box; text-align:center; }
.template-version-thumbnail > iframe { position:absolute; top:0; left:0; width:430px !important; height:765px !important; max-width:none !important; border:0; transform-origin:top left; pointer-events:none; }
.template-version-thumbnail > [role] { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:12px; font-size:13px; line-height:1.6; font-family:inherit; background:#f4f6fa; overflow-wrap:anywhere; }

/* Scoped report headings: keep explicit currency/provenance readable. */
.estimated-profit-center .estimated-profit-currency-note {
  margin: 0; padding: 8px 12px; font-size: 12px; line-height: 1.5; color: #64748b;
}
.estimated-profit-center .estimated-profit-table th {
  height: auto; min-height: 32px; padding: 8px 6px; white-space: normal; line-height: 1.4;
  overflow-wrap: anywhere; text-overflow: clip;
}
.estimated-profit-center .estimated-profit-table .estimated-profit-department {
  white-space: normal; overflow-wrap: anywhere; line-height: 1.4; padding: 6px;
}

/* The simulated status bar owns space outside the document viewport. Overlaying
   it on an iframe hides sticky timers and opening-module controls. */
.mobile-page-renderer-device .mobile-preview-device-frame,
.mobile-preview-device-frame.iphone {display:flex!important;flex-direction:column!important;}
.mobile-preview-device-frame>.mobile-preview-device-status {position:relative!important;inset:auto!important;flex:0 0 30px!important;background:#fff!important;}
.mobile-preview-device-frame>.mobile-preview-viewport {flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;border-top-left-radius:0!important;border-top-right-radius:0!important;}
.mobile-preview-device-frame>.mobile-preview-viewport>.mobile-preview-page-renderer {height:100%!important;min-height:0!important;max-height:none!important;}

.local-trial-controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px; margin:12px 0; border:1px solid #e5ba64; background:#fff8df; }
.local-trial-controls strong { flex:1 1 320px; }
/* F3 accessible, bounded hour facts; original detail only. */
.pa-detail .pa-detail-controls{display:flex;flex-wrap:wrap;align-items:end;gap:10px}.pa-detail .pa-detail-controls label{display:flex;flex-direction:column;gap:6px}.pa-detail .pa-detail-controls input,.pa-detail [data-pa-hour]{width:auto;min-width:120px;max-width:200px}.pa-detail .pa-card{min-width:0;align-self:start}.pa-detail .pa-card table{display:block;overflow:auto;max-height:400px}.pa-detail .pa-chart{max-height:230px;width:100%}.pa-hour-scroll{overflow:auto;padding:160px 16px 16px;margin-top:-120px}.pa-hour-chart{display:flex;align-items:end;gap:7px;min-width:760px;height:215px;border-bottom:1px solid #ccd8e5}.pa-hour-point{position:relative;display:flex;flex:1;align-items:center;justify-content:end;flex-direction:column;height:180px;min-width:24px;border:0;background:transparent;color:#334155;font:inherit;padding:0;cursor:pointer}.pa-hour-bar{display:block;background:#5193ec;width:70%;max-width:32px;height:var(--bar);min-height:1px;max-height:145px}.pa-hour-tick{font-size:12px;line-height:24px}.pa-hour-value{font-size:12px}.pa-hour-tooltip{display:none;position:absolute;bottom:80%;left:0;min-width:240px;padding:12px;background:white;border:1px solid #bcd0e8;box-shadow:0 5px 20px #0002;border-radius:6px;z-index:8;text-align:left;line-height:1.65;font-size:13px;pointer-events:none}.pa-hour-point:nth-last-child(-n+8) .pa-hour-tooltip{left:auto;right:0}.pa-hour-tooltip span{display:block}.pa-hour-point:hover .pa-hour-tooltip,.pa-hour-point:focus .pa-hour-tooltip{display:block}.pa-hour-point:focus-visible{outline:2px solid #1677ff;outline-offset:2px}.pa-detail .pa-summary{display:flex;flex-wrap:wrap;gap:12px}.pa-detail .pa-grid{align-items:start}.pa-detail .pa-empty-ring{max-height:120px}.pa-detail .pa-card h2{font-size:17px;line-height:1.5}

/* Hour tooltip sizing stays within its own visible chart; no backend overlays. */
.pa-hour-tooltip{box-sizing:border-box;width:260px;min-width:0;max-width:calc(100vw - 32px);white-space:normal;overflow-wrap:anywhere}

/* Server-confirmed customer receipt only; never restyles the checkout form. */
.mobile-order-success-card {box-sizing:border-box;width:100%;max-width:540px;margin:16px auto;padding:20px 16px 32px;border:1px solid #e8ecf1;border-radius:24px;background:#f7f9fc;color:#17212e;box-shadow:0 14px 40px #16263812;overflow-wrap:anywhere;--receipt-brand:var(--atl-accent,#e52524);}
.mobile-order-success-card *, .mobile-order-success-card *::before,.mobile-order-success-card *::after {box-sizing:border-box;min-width:0;}
.mobile-order-success-card .receipt-hero {text-align:center;padding:6px 0 20px;}
.mobile-order-success-card .receipt-success-icon {display:grid;place-items:center;width:64px;height:64px;margin:0 auto 16px;border:1px solid #cce5db;border-radius:50%;background:#eaf6ef;color:var(--receipt-brand);box-shadow:0 0 0 7px #eaf6ef70;}
.mobile-order-success-card .receipt-success-icon svg {width:34px;height:34px;}
.mobile-order-success-card .receipt-hero h1 {margin:0 0 10px;font-size:26px!important;line-height:1.35;font-weight:750;color:#17212e;}
.mobile-order-success-card p {font-size:14px;line-height:1.7;color:#667085;margin:8px 0;}
.mobile-order-success-card .receipt-card {margin:0 0 14px;padding:18px 16px;background:#fff;border:1px solid #e4eaf0;border-radius:16px;}
.mobile-order-success-card .receipt-card h2 {margin:0 0 14px;font-size:17px!important;line-height:1.5;color:#243449;}
.mobile-order-success-card .receipt-label {display:block;font-size:13px;font-weight:500;color:#667085;margin-bottom:6px;}
.mobile-order-success-card .receipt-amount-card {text-align:center;border-top:3px solid var(--receipt-brand);}
.mobile-order-success-card strong.receipt-total {display:block;font-size:32px;line-height:1.25;font-weight:800;color:var(--receipt-brand);margin:0 0 14px;font-variant-numeric:tabular-nums;}
.mobile-order-success-card .receipt-statuses {display:flex;justify-content:center;flex-wrap:wrap;gap:8px;}
.mobile-order-success-card .receipt-statuses span {padding:5px 10px;border:1px solid #d9e7e0;border-radius:20px;background:#f3f8f5;font-size:13px;font-weight:600;}
.mobile-order-success-card dl {display:grid;grid-template-columns:80px minmax(0,1fr);gap:10px 12px;margin:16px 0 0;text-align:left;font-size:14px;line-height:1.6;}
.mobile-order-success-card dt {color:#667085;font-weight:400;}
.mobile-order-success-card dd {margin:0;color:#243449;font-weight:600;overflow-wrap:anywhere;white-space:pre-wrap;}
.mobile-order-success-card .receipt-order-number {display:flex;align-items:center;gap:12px;padding-bottom:14px;border-bottom:1px solid #edf0f5;}
.mobile-order-success-card .receipt-order-number>div {flex:1;}
.mobile-order-success-card code {display:block;font:600 13px/1.65 ui-monospace,SFMono-Regular,monospace;white-space:normal;overflow-wrap:anywhere;color:#243449;}
.mobile-order-success-card .receipt-copy {flex:none;min-width:48px;min-height:44px;border:1px solid #cfd9df;border-radius:10px;background:#fff;color:var(--receipt-brand);font-family:inherit;font-size:14px;font-weight:600;line-height:1.2;padding:10px;cursor:pointer;}
.mobile-order-success-card .receipt-items {list-style:none;margin:0;padding:0;}
.mobile-order-success-card .receipt-item {display:flex;align-items:flex-start;gap:12px;padding:14px 0;border-top:1px solid #edf0f5;}
.mobile-order-success-card .receipt-item:first-child {padding-top:0;border-top:0;}
.mobile-order-success-card .receipt-item:last-child {padding-bottom:0;}
.mobile-order-success-card .receipt-item-image {display:block;flex:none;width:64px;height:72px;object-fit:contain;border-radius:10px;background:#f5f7fa;border:1px solid #edf0f5;}
.mobile-order-success-card .receipt-image-missing {display:grid;place-items:center;color:#a8b2bf;font-size:26px;}
.mobile-order-success-card .receipt-item-content {flex:1;}
.mobile-order-success-card .receipt-item h4 {font-size:14px;line-height:1.6;margin:6px 0 2px;color:#243449;white-space:pre-wrap;overflow-wrap:anywhere;}
.mobile-order-success-card .receipt-role {display:inline-block;padding:2px 7px;border-radius:5px;font-size:11px;background:#edf3fa;color:#365574;}
.mobile-order-success-card .receipt-role.is-gift {background:#fff3e5;color:#89541d;}
.mobile-order-success-card .receipt-sku {font-size:13px;margin:4px 0;color:#667085;}
.mobile-order-success-card .receipt-quantity {display:block;font-size:13px;font-weight:600;color:#243449;}
.mobile-order-success-card .receipt-privacy,.mobile-order-success-card .receipt-source {font-size:12px;color:#667085;line-height:1.7;overflow-wrap:anywhere;}
.mobile-order-success-card .receipt-test-notice {padding:10px 12px;border-radius:10px;background:#fff3cd;color:#745a16;font-size:12px;text-align:center;margin:0 0 20px;}
.mobile-order-success-card .receipt-actions {display:grid;grid-template-columns:1fr;gap:10px;margin:20px 0 0;padding-bottom:env(safe-area-inset-bottom);}
.mobile-order-success-card .receipt-action {display:flex;align-items:center;justify-content:center;min-height:48px;width:100%;margin:0;padding:12px 16px;border:1px solid var(--receipt-brand);border-radius:12px;font-size:15px;font-weight:650;line-height:1.5;text-decoration:none;cursor:pointer;}
.mobile-order-success-card .receipt-action-primary {background:var(--receipt-brand);color:#fff;}
.mobile-order-success-card .receipt-action-secondary {background:#fff;color:var(--receipt-brand);}
.mobile-order-success-card :is(.receipt-action,.receipt-copy):hover {filter:brightness(.95);}
.mobile-order-success-card :is(.receipt-action,.receipt-copy):focus-visible {outline:3px solid #88b5e9;outline-offset:3px;}
/* Success owns the page controls; inherited floating support must not cover them. */
body:has(.mobile-order-success-card) :is(.wanfan-floating-contact,.wanfan-contact-floating,.tc-floating,.premium-floating-tools,.floating-contact-buttons,.pcs-floating-tools,.wanfan-floating-tools,.cod-v1-floating-tools) {display:none!important;}
@media(max-width:359px) {.mobile-order-success-card{padding:16px 10px 24px;border-radius:18px;}.mobile-order-success-card .receipt-card{padding:16px 12px;}.mobile-order-success-card dl{grid-template-columns:66px minmax(0,1fr);gap:10px;}.mobile-order-success-card .receipt-item-image{width:54px;height:64px;}.mobile-order-success-card strong.receipt-total{font-size:30px;}}

.mobile-order-success-card .receipt-copy-status:empty{display:none;}
.mobile-order-success-card .receipt-copy-status{font-size:12px;color:var(--receipt-brand);margin:8px 0 0;}

/* Admin phone previews keep their own document viewport above the drawer footer
   at real browser zoom. Only its height changes; inspection width and content
   scale stay exact, and the customer document retains its normal scrolling. */
.drawer .mobile-preview-device-frame {
  height: min(932px, max(180px, calc(100dvh - 320px))) !important;
  min-height: 0 !important;
  max-height: min(932px, max(180px, calc(100dvh - 320px))) !important;
}
/* Editor protection tools stay accessible without occupying the working form. */
#app .editor-version-tools {display:block;padding:0;margin:0 0 12px;border:1px solid #e2e8f0;border-radius:6px;font-size:13px;}
#app .editor-version-tools>summary {padding:8px 12px;cursor:pointer;font-weight:600;}
#app .editor-version-tools:not([open])>:not(summary) {display:none;}
#app .editor-version-tools[open] {padding-bottom:12px;}
#app .editor-version-tools[open]>:not(summary) {margin:8px 12px;}
#app .editor-version-tools label {display:block;}
#app .editor-version-tools input {box-sizing:border-box;width:100%;}
#app .editor-recovery-tools {display:flex;flex-wrap:wrap;gap:8px;}
#app .editor-recovery-tools p {flex-basis:100%;margin:0;}
#app .editor-recovery-hint {display:block;max-width:100%;margin:0 0 8px;padding:8px 12px;border:1px solid #ead3a1;border-radius:6px;background:#fff9ec;color:#854d0e;text-align:left;}

/* Server-backed exception and customer rules share the original admin pages. */
.risk-server-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;padding:14px;background:#fff}
.risk-server-filters label{display:grid;gap:6px;min-width:160px}.risk-server-filters input,.risk-server-filters select{min-height:36px;padding:7px;border:1px solid #d8dfeb}
.risk-server-table{overflow:auto}.risk-server-table table{min-width:1000px;width:100%;table-layout:fixed}.risk-server-table td,.risk-server-table th{padding:12px;vertical-align:top;overflow-wrap:anywhere}.risk-server-table td small{display:block;color:#64748b;line-height:1.6;margin-top:6px}.risk-server-table .actions{display:flex;gap:9px;flex-wrap:wrap}
/* Exception operations stay inside a real table cell; the inner group owns flex. */
#app .risk-exceptions-page .risk-exception-table { width:100%; max-width:100%; min-width:0; overflow:auto; overscroll-behavior-x:contain; }
#app .risk-exceptions-page .risk-exception-table table { width:100%; min-width:1140px; table-layout:fixed; border-collapse:separate; border-spacing:0; font-size:12px!important; }
#app .risk-exceptions-page .risk-col-order { width:24%; }
#app .risk-exceptions-page .risk-col-reason { width:29%; }
#app .risk-exceptions-page .risk-col-review { width:calc(47% - 340px); }
#app .risk-exceptions-page .risk-col-state { width:100px; }
#app .risk-exceptions-page .risk-col-actions { width:240px; }
#app .risk-exceptions-page .risk-exception-table th { height:36px!important; padding:6px 12px!important; font-size:12px!important; vertical-align:middle; border-bottom:1px solid #e2e8f0!important; background:#f1f4f8!important; }
#app .risk-exceptions-page .risk-exception-row { --risk-row-bg:#fff; }
#app .risk-exceptions-page .risk-exception-row:nth-child(even) { --risk-row-bg:#f8fbff; }
#app .risk-exceptions-page .risk-exception-row:hover { --risk-row-bg:#eff6ff; }
#app .risk-exceptions-page .risk-exception-row[aria-selected="true"] { --risk-row-bg:#eaf2ff; }
#app .risk-exceptions-page .risk-exception-row[aria-selected="true"]:hover { --risk-row-bg:#e3efff; }
#app .risk-exceptions-page .risk-exception-table td { box-sizing:border-box; height:56px; padding:6px 12px!important; vertical-align:middle!important; white-space:normal; line-height:1.45; border-bottom:1px solid #e2e8f0!important; background:var(--risk-row-bg,#fff)!important; }
#app .risk-exceptions-page .risk-exception-table td small { margin-top:3px; font-size:11px; line-height:1.4; white-space:normal; }
#app .risk-exceptions-page .risk-exception-reason { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
#app .risk-exceptions-page .risk-exception-table .risk-exception-actions-cell { display:table-cell!important; position:sticky; right:0; z-index:1; white-space:nowrap; box-shadow:-1px 0 0 #e2e8f0; }
#app .risk-exceptions-page .risk-exception-table th:last-child { position:sticky; right:0; z-index:2; box-shadow:-1px 0 0 #e2e8f0; }
#app .risk-exceptions-page .risk-exception-table td[colspan] { position:static; box-shadow:none; }
#app .risk-exceptions-page .risk-exception-actions { display:flex; flex-wrap:nowrap; align-items:center; justify-content:flex-start; gap:8px; width:208px; margin:0; }
#app .risk-exceptions-page .risk-exception-actions button { box-sizing:border-box; flex:0 0 auto; height:30px!important; min-height:30px; padding:0 8px!important; border:1px solid #1263f1; border-radius:4px; font-size:13px!important; line-height:28px; text-align:center; white-space:nowrap; cursor:pointer; transition:background-color .12s,border-color .12s; }
#app .risk-exceptions-page .risk-exception-primary { width:96px; color:#fff!important; background:#1263f1!important; }
#app .risk-exceptions-page .risk-exception-secondary { width:104px; color:#1263f1!important; background:var(--risk-row-bg,#fff)!important; }
#app .risk-exceptions-page .risk-exception-primary:hover:not(:disabled) { background:#0f54d2!important; border-color:#0f54d2; }
#app .risk-exceptions-page .risk-exception-secondary:hover:not(:disabled) { background:#e6f0ff!important; border-color:#0f54d2; }
#app .risk-exceptions-page .risk-exception-actions button:focus-visible { outline:2px solid #1263f1; outline-offset:2px; }
#app .risk-exceptions-page .risk-exception-actions button:disabled { color:#7b8798!important; background:#edf1f6!important; border-color:#cbd5e1; cursor:wait; }
#drawer [data-risk-field]{display:block;width:100%;min-height:40px;margin:8px 0 14px;padding:8px;box-sizing:border-box}#drawer label:has([data-risk-confirm]){display:block;margin:14px 0;line-height:1.7}.risk-form-error{color:#b91c1c;white-space:pre-wrap}.order-review-reason{white-space:normal;overflow-wrap:anywhere;line-height:1.5;max-width:100%}

/* Saved marketing A/B relation only; unrelated recommendation/gift tables unchanged. */
.product-replica-table .product-related-cell .product-ab-summary { display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-width:0; }
.product-replica-table .product-related-cell .product-ab-label { text-align:left; white-space:normal; overflow-wrap:anywhere; line-height:1.45; }
.product-replica-table .product-related-cell .plain-link,
.product-replica-table .product-related-cell .plain-link:visited { color:#1260d6; }
.product-replica-table .product-related-cell .plain-link:hover { text-decoration:underline; }
.product-replica-table .product-related-cell .plain-link:focus-visible { outline:2px solid #1260d6; outline-offset:2px; }
.product-replica-table .product-related-cell { overflow:visible; }
.b-product-draft-status { color:#9a5b00; font-size:13px; }
