/* ===== PAGE SHELL ===== */
.page{
  --page-accent-1: rgba(167, 139, 250, 0.16);
  --page-accent-2: rgba(217, 70, 239, 0.12);
  --page-panel-glow: rgba(255,255,255,0.04);
  position:relative;
  isolation:isolate;
  padding:var(--space-3) var(--space-3) var(--space-4);
  border-radius:var(--radius-4);
  border:1px solid rgba(255,255,255,0.06);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.04)),
    radial-gradient(circle at top right, var(--page-accent-1), transparent 34%),
    radial-gradient(circle at 8% 20%, var(--page-accent-2), transparent 28%),
    var(--bg-surface);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 18px 40px rgba(0,0,0,0.24);
}

/* ===== Customer360 economy dashboard ===== */
.customer360-shell-navigation { display: none; }
.customer360-sidebar-mode .customer360-shell-navigation {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.customer360-sidebar-mode .sidebar-inner > :not(.customer360-shell-navigation) { display: none; }
.customer360-shell-navigation .nav-link.is-active {
  color: var(--color-primary);
  background: linear-gradient(135deg, rgba(155,114,245,0.22) 0%, rgba(124,92,191,0.12) 100%);
  box-shadow: inset 0 0 0 1px rgba(155,114,245,0.26), 0 8px 20px rgba(16,10,35,0.22);
}

.customer360-economy-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.customer360-economy-data-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.customer360-economy-data-card strong {
  color: var(--text-primary);
  font-size: var(--text-md);
}

.customer360-economy-data-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.customer360-economy-skeleton,
.customer360-economy-empty {
  padding: var(--space-5);
  color: var(--text-secondary);
  text-align: center;
}

.customer360-economy-overview,
.customer360-economy-section {
  margin-bottom: var(--space-4);
}

.customer360-economy-section-heading {
  margin-bottom: var(--space-3);
}

.customer360-economy-kicker {
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: .12em;
}

.customer360-economy-section-title {
  margin-top: var(--space-1);
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
}

.customer360-economy-section-copy,
.customer360-economy-kpi-note,
.customer360-economy-channel-foot,
.customer360-economy-list-meta {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.customer360-economy-kpi-grid,
.customer360-economy-conversion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.customer360-economy-kpi {
  margin-bottom: 0;
  min-height: 108px;
}

.customer360-economy-kpi-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.customer360-economy-kpi-value {
  margin-top: var(--space-2);
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  font-variant-numeric: tabular-nums;
}

.customer360-economy-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.customer360-economy-share-stack {
  display: flex;
  height: 18px;
  margin-bottom: var(--space-4);
  overflow: hidden;
  border-radius: var(--radius-2);
  background: var(--bg-elevated);
}

.customer360-economy-share-stack span {
  min-width: 0;
}

.customer360-economy-share-list {
  display: grid;
  gap: var(--space-2);
}

.customer360-economy-share-row {
  display: grid;
  grid-template-columns: 104px minmax(80px, 1fr) 54px 72px;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--text-sm);
}

.customer360-economy-share-label,
.customer360-economy-share-value,
.customer360-economy-share-count {
  color: var(--text-secondary);
}

.customer360-economy-share-value,
.customer360-economy-share-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.customer360-economy-share-track,
.customer360-economy-mini-track {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: var(--radius-1);
  background: var(--bg-elevated);
}

.customer360-economy-share-track span,
.customer360-economy-mini-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

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

.customer360-economy-channel-card {
  margin-bottom: 0;
}

.customer360-economy-channel-name {
  margin-bottom: var(--space-3);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
}

.customer360-economy-channel-metric {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-1);
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.customer360-economy-channel-metric strong {
  color: var(--text-primary);
}

.customer360-economy-mini-track span {
  background: var(--color-primary);
}

.customer360-economy-mini-track--sales span {
  background: var(--color-success);
}

.customer360-economy-ltv-list {
  display: grid;
  gap: var(--space-2);
}

.customer360-economy-matrix {
  margin-bottom: var(--space-3);
}

.customer360-economy-matrix th,
.customer360-economy-matrix td {
  white-space: nowrap;
}

.customer360-economy-ltv-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.customer360-economy-ltv-row strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.customer360-economy-ltv-row small {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.customer360-economy-dependency-grid,
.customer360-economy-es-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.customer360-economy-es-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer360-economy-coverage-note {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.customer360-economy-coverage-note strong {
  color: var(--color-warning);
}

.customer360-economy-health-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.customer360-economy-health-card {
  display: grid;
  gap: var(--space-1);
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.customer360-economy-health-card strong {
  color: var(--text-primary);
  font-size: var(--text-lg);
}

.customer360-economy-health-card small {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.customer360-economy-table-wrap {
  overflow-x: auto;
}

.customer360-economy-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.customer360-economy-filters input,
.customer360-economy-filters select {
  min-height: var(--control-h-md);
  padding: 0 var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.customer360-economy-filters input {
  flex: 1 1 220px;
}

.customer360-economy-customer-row {
  cursor: pointer;
}

.customer360-economy-customer-row:hover {
  background: var(--bg-elevated);
}

.customer360-economy-channel-badge,
.customer360-economy-health-badge {
  display: inline-flex;
  margin: 2px var(--space-1) 2px 0;
  padding: 2px var(--space-2);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.customer360-economy-health-badge[data-health="vip"] {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.customer360-economy-health-badge[data-health="at_risk"],
.customer360-economy-health-badge[data-health="dormant"] {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.customer360-economy-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

@media (max-width: 1024px) {
  .customer360-economy-two-column {
    grid-template-columns: 1fr;
  }
  .customer360-economy-health-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .customer360-economy-data-grid { grid-template-columns: 1fr; }
  .customer360-economy-kpi-grid,
  .customer360-economy-conversion-grid,
  .customer360-economy-channel-grid,
  .customer360-economy-dependency-grid,
  .customer360-economy-es-grid,
  .customer360-economy-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .customer360-economy-share-row {
    grid-template-columns: 88px minmax(70px, 1fr) 46px;
  }
  .customer360-economy-share-count {
    display: none;
  }
}

.page::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:
    radial-gradient(circle at 85% 14%, rgba(255,255,255,0.08) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 18%, rgba(255,255,255,0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 11% 78%, rgba(255,255,255,0.08) 0 2px, transparent 3px),
    linear-gradient(115deg, transparent 0 62%, rgba(255,255,255,0.045) 62% 63%, transparent 63% 100%);
  opacity:.9;
}

.page::after{
  content:"";
  position:absolute;
  right:24px;
  top:16px;
  width:180px;
  height:180px;
  border-radius:50%;
  pointer-events:none;
  background:
    radial-gradient(circle at 32% 32%, rgba(255,255,255,0.16) 0 2px, transparent 3px),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 10px, transparent 10px 18px);
  opacity:.45;
  filter:blur(0.2px);
}

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

#page-dashboard{ --page-accent-1: rgba(168, 85, 247, 0.18); --page-accent-2: rgba(59, 130, 246, 0.11); }
#page-analyze{ --page-accent-1: rgba(251, 191, 36, 0.15); --page-accent-2: rgba(217, 70, 239, 0.12); }
#analyze-detail-section > summary::-webkit-details-marker { display:none; }
#analyze-detail-section[open] > summary { border-radius:14px 14px 0 0; border-bottom-color:transparent; }
#analyze-detail-section[open] > div { border:1px solid var(--border-default); border-top:none; border-radius:0 0 14px 14px; padding:16px; }
#page-point{ --page-accent-1: rgba(167, 139, 250, 0.15); --page-accent-2: rgba(245, 158, 11, 0.10); }
#page-promotionlog{ --page-accent-1: rgba(167, 139, 250, 0.16); --page-accent-2: rgba(245, 158, 11, 0.10); }
#page-promotion{ --page-accent-1: rgba(245, 158, 11, 0.14); --page-accent-2: rgba(167, 139, 250, 0.10); }
#page-candidates{ --page-accent-1: rgba(20, 184, 166, 0.13); --page-accent-2: rgba(167, 139, 250, 0.10); }
#point-detail-section > summary::-webkit-details-marker { display:none; }
#point-detail-section[open] > summary { border-radius:14px 14px 0 0; border-bottom-color:transparent; }
#point-detail-section[open] > div { border:1px solid var(--border-default); border-top:none; border-radius:0 0 14px 14px; padding:16px; }
#page-products{ --page-accent-1: rgba(34, 197, 94, 0.13); --page-accent-2: rgba(168, 85, 247, 0.12); }
#page-rfm{ --page-accent-1: rgba(59, 130, 246, 0.13); --page-accent-2: rgba(34, 197, 94, 0.10); }
#page-entry-lift{ --page-accent-1: rgba(245, 158, 11, 0.14); --page-accent-2: rgba(167, 139, 250, 0.12); }
#page-keyword{ --page-accent-1: rgba(245, 158, 11, 0.14); --page-accent-2: rgba(59, 130, 246, 0.10); }
#page-import{ --page-accent-1: rgba(249, 115, 22, 0.14); --page-accent-2: rgba(168, 85, 247, 0.11); }
#page-ad{ --page-accent-1: rgba(244, 114, 182, 0.14); --page-accent-2: rgba(59, 130, 246, 0.10); }
#page-debate{ --page-accent-1: rgba(217, 70, 239, 0.13); --page-accent-2: rgba(245, 158, 11, 0.10); }
#page-mailmag{ --page-accent-1: rgba(16, 185, 129, 0.13); --page-accent-2: rgba(59, 130, 246, 0.11); }
#page-deep{ --page-accent-1: rgba(124, 58, 237, 0.16); --page-accent-2: rgba(34, 197, 94, 0.08); }
#page-bigfive{ --page-accent-1: rgba(192, 38, 211, 0.16); --page-accent-2: rgba(245, 158, 11, 0.10); }
#page-persona{ --page-accent-1: rgba(14, 165, 233, 0.13); --page-accent-2: rgba(168, 85, 247, 0.11); }
#page-subscription{ --page-accent-1: rgba(16, 185, 129, 0.13); --page-accent-2: rgba(168, 85, 247, 0.11); }
#page-notebook{ --page-accent-1: rgba(59, 130, 246, 0.12); --page-accent-2: rgba(217, 70, 239, 0.10); }
#page-settings{ --page-accent-1: rgba(245, 158, 11, 0.12); --page-accent-2: rgba(59, 130, 246, 0.10); }
#page-productstrategy{ --page-accent-1: rgba(34, 197, 94, 0.13); --page-accent-2: rgba(59, 130, 246, 0.10); }
#page-customer360{ --page-accent-1: rgba(14, 165, 233, 0.17); --page-accent-2: rgba(217, 70, 239, 0.11); }

.page-title{
  position:relative;
  display:inline-flex;
  min-height:var(--control-h-lg);
  padding:var(--space-2) var(--space-3);
  margin-bottom:var(--space-3);
  border-radius:var(--radius-3);
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    linear-gradient(135deg, var(--page-accent-1), transparent 70%);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: initial;
  color: var(--text-primary);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 14px 28px rgba(0,0,0,0.20);
}

.page-title::after{
  content:"";
  position:absolute;
  inset:auto 18px 10px 18px;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.24), transparent);
}

/* ===== COMMON RICH PANELS ===== */
.card,
.tabs-card,
.chart-card,
.dash-chart-card,
.dash-top-products,
.s-card,
.ai-card{
  position:relative;
  background-image:
    linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012) 50%, rgba(0,0,0,0.06));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 28px rgba(0,0,0,0.18);
}

.card-title,
.s-title,
.dash-chart-title,
.dash-top-title{
  letter-spacing:0.06em;
}

/* ===== PAGE HERO ===== */
.rich-page-hero{
  position:relative;
  overflow:hidden;
  margin-bottom:var(--space-3);
  padding:var(--space-3);
  border-radius:var(--radius-3);
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015) 48%, rgba(0,0,0,0.08)),
    radial-gradient(circle at top right, var(--page-accent-1), transparent 34%),
    var(--bg-surface);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 16px 36px rgba(0,0,0,0.20);
}

.rich-page-hero::before{
  content:"";
  position:absolute;
  right:-14px;
  top:-18px;
  width:160px;
  height:160px;
  border-radius:50%;
  background:
    radial-gradient(circle at 32% 32%, rgba(255,255,255,0.18) 0 2px, transparent 3px),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 12px, transparent 12px 20px);
  opacity:.55;
}

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

.rich-page-hero-title{
  font-size: var(--text-md);
  font-weight:800;
  color:var(--text-primary);
  margin-bottom:6px;
}

.rich-page-hero-copy{
  font-size: var(--text-sm);
  color:var(--text-secondary);
  line-height:1.8;
}

.rich-page-hero-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.rich-page-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  color:var(--text-secondary);
  font-size: var(--text-sm);
}

/* ===== IMPORT PAGE ===== */
.import-magazine-hero{
  margin-bottom:18px;
}

.import-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
  align-items:stretch;
}

.import-grid .card{
  overflow:hidden;
}

.import-grid .card:first-child{
  grid-column:span 2;
  background-image:
    linear-gradient(160deg, rgba(251,191,36,0.10), rgba(255,255,255,0.012) 45%, rgba(0,0,0,0.05)),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.04));
}

.import-grid .card:nth-child(2){
  grid-column:span 2;
  background-image:
    linear-gradient(160deg, rgba(168,85,247,0.10), rgba(255,255,255,0.012) 45%, rgba(0,0,0,0.05)),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.04));
}

.import-grid .card:nth-child(3){
  background-image:
    linear-gradient(160deg, rgba(59,130,246,0.10), rgba(255,255,255,0.012) 45%, rgba(0,0,0,0.05)),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.04));
}

.import-grid .card:nth-child(4){
  background-image:
    linear-gradient(160deg, rgba(16,185,129,0.10), rgba(255,255,255,0.012) 45%, rgba(0,0,0,0.05)),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.04));
}

.import-grid .card:nth-child(n+5){
  background-image:
    linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012) 50%, rgba(0,0,0,0.05)),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.04));
}

/* ===== RFM PAGE ===== */
.rfm-page-content{
  --rfm-gap: var(--space-3);
  --rfm-panel-gap: var(--space-2);
  --rfm-soft: rgba(255,255,255,0.035);
  --rfm-line: rgba(255,255,255,0.08);
  --rfm-blue: linear-gradient(to right,#4481eb,#04befe);
  --rfm-green: linear-gradient(to right,#43e97b,#38f9d7);
  --rfm-purple: linear-gradient(to right,#AC32E4,#4801FF);
}

/* ===== PRODUCT PAGES ===== */
.product-section{
  margin-bottom:var(--space-3);
}

.product-card-title{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-2);
  justify-content:space-between;
  margin-bottom:var(--space-2);
}

.product-toolbar,
.product-inline-form,
.product-radio-row,
.product-submit-row,
.product-filter-row,
.product-chip-row{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-1);
}

.product-toolbar .input,
.product-inline-form .input,
#productsSearchInput{
  font-size:var(--text-sm);
  padding:7px var(--space-2);
}

#productsSearchInput{
  width:min(240px, 100%);
}

.product-inline-form .input{
  flex:1;
  max-width:320px;
}

.product-section-title{
  color:var(--text-primary);
  font-size:var(--text-base);
  font-weight:var(--font-weight-bold);
  line-height:var(--leading-tight);
  margin-bottom:var(--space-0);
}

.product-section-title--accent{
  color:var(--color-primary);
}

.product-section-copy{
  color:var(--text-secondary);
  font-size:var(--text-xs);
  line-height:var(--leading-tight);
  margin-bottom:var(--space-2);
}

.product-section-copy--body{
  font-size:var(--text-sm);
  line-height:var(--leading-normal);
}

.product-empty-state{
  color:var(--text-muted);
  font-size:var(--text-sm);
  padding:var(--space-5) var(--space-3);
  text-align:center;
}

.product-empty-state--compact{
  padding:var(--space-2) 0;
  text-align:left;
}

.product-summary-grid{
  margin-bottom:var(--space-3);
}

.product-alert{
  border-radius:var(--radius-2);
  margin-bottom:var(--space-3);
  padding:var(--space-3);
}

.product-alert--danger{
  background:rgba(255,45,107,0.07);
  border:1px solid rgba(255,45,107,0.28);
}

.product-alert--warning{
  background:rgba(245,158,11,0.07);
  border:1px solid rgba(245,158,11,0.22);
}

.product-alert-title,
.product-step-title{
  color:var(--color-primary);
  font-size:var(--text-sm);
  font-weight:var(--font-weight-bold);
  margin-bottom:var(--space-1);
}

.product-alert-title--danger{
  color:var(--color-danger);
}

.product-chip-row{
  margin-bottom:var(--space-3);
}

.product-analysis-grid,
.product-strategy-hints{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:repeat(2, minmax(0, 1fr));
  margin-bottom:var(--space-3);
}

.product-strategy-summary{
  display:grid;
  gap:var(--space-1);
  grid-template-columns:repeat(4, minmax(0, 1fr));
  margin-bottom:var(--space-3);
  text-align:center;
}

.product-data-card{
  background:var(--bg-elevated);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-1);
  padding:var(--space-2);
}

.product-hint-card{
  border-radius:var(--radius-1);
  min-width:0;
  overflow:hidden;
  padding:var(--space-2);
}

.product-hint-card--success{
  background:rgba(16,185,129,0.07);
  border-left:3px solid var(--color-success);
}

.product-hint-card--danger{
  background:rgba(255,45,107,0.07);
  border-left:3px solid var(--color-danger);
}

.product-hint-card--info{
  background:rgba(96,165,250,0.07);
  border-left:3px solid var(--color-info);
}

.product-hint-card--warning{
  background:rgba(245,158,11,0.07);
  border-left:3px solid var(--color-warning);
}

.product-ai-card{
  border-color:var(--color-primary-dim);
  margin-bottom:var(--space-3);
}

.product-mini-heading,
.product-filter-label,
.product-form-label{
  color:var(--text-secondary);
  font-size:var(--text-xs);
  font-weight:600;
}

.product-mini-heading{
  margin-bottom:var(--space-1);
}

.product-form-field{
  margin-bottom:var(--space-2);
}

.product-form-label{
  margin-bottom:var(--space-0);
}

.product-step-card{
  background:var(--bg-elevated);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-2);
  margin-bottom:var(--space-2);
  padding:var(--space-2);
}

.product-table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);
}

.product-table-scroll::-webkit-scrollbar{
  display:block;
  height:var(--scrollbar-size);
}

.product-table-scroll::-webkit-scrollbar-track{
  background:var(--scrollbar-track);
  border-radius:var(--radius-pill);
}

.product-table-scroll::-webkit-scrollbar-thumb{
  background:var(--scrollbar-thumb);
  border-radius:var(--radius-pill);
}

.product-table-scroll::-webkit-scrollbar-thumb:hover{
  background:var(--scrollbar-thumb-hover);
}

/* ===== PROMOTION PAGES ===== */
.promotion-empty-state{
  color:var(--text-muted);
  font-size:var(--text-sm);
  padding:var(--space-4) 0;
}

.promotion-empty-state--error{
  color:var(--color-danger);
}

.promotion-section{
  margin-bottom:var(--space-3);
}

.promotion-page-head,
.promotion-list-head,
.promotion-action-row{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-2);
}

.promotion-page-head{
  justify-content:space-between;
  margin-bottom:var(--space-3);
}

.promotion-page-copy{
  color:var(--text-secondary);
  font-size:var(--text-sm);
  line-height:var(--leading-tight);
}

.promotion-list-head{
  margin-bottom:var(--space-1);
}

.promotion-list-title{
  color:var(--text-secondary);
  font-size:var(--text-xs);
  font-weight:700;
  letter-spacing:0.07em;
}

.promotion-note{
  background:rgba(245,158,11,0.06);
  border:1px solid rgba(245,158,11,0.16);
  border-radius:var(--radius-1);
  color:rgba(245,158,11,0.75);
  font-size:10px;
  line-height:1.5;
  padding:3px 10px;
}

.promotion-log-grid{
  display:grid;
  gap:var(--space-3);
  grid-template-columns:repeat(auto-fill, minmax(min(100%, 360px), 1fr));
}

.promotion-form-card{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius-3);
  border:1px solid rgba(167,139,250,0.28);
  background:linear-gradient(135deg, rgba(167,139,250,0.10), rgba(245,158,11,0.05) 60%, rgba(0,0,0,0.08));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06), 0 16px 36px rgba(0,0,0,0.22);
  margin-bottom:var(--space-4);
  padding:var(--space-4);
}

.promotion-form-grid{
  align-items:end;
  display:grid;
  gap:var(--space-2);
  margin-bottom:var(--space-2);
}

.promotion-form-grid--primary{
  grid-template-columns:minmax(0, 1fr) 140px 130px 130px;
}

.promotion-form-grid--conditions{
  grid-template-columns:160px 100px 100px minmax(0, 1fr);
}

.promotion-form-grid--meta{
  grid-template-columns:160px minmax(0, 1fr) 160px 80px;
}

#promotion-analysis-page .card,
#promo-log-content .card{
  min-width:0;
}

.promotion-view-switcher{
  margin-bottom:var(--space-3);
}

.promotion-view-switcher__head,
.promotion-coupon-role-guide__content,
.promotion-publication-link{
  align-items:flex-start;
  display:flex;
  gap:var(--space-3);
  justify-content:space-between;
}

.promotion-view-switcher__copy,
.promotion-coupon-role-guide__copy,
.promotion-publication-link p{
  color:var(--text-secondary);
  font-size:var(--text-sm);
  line-height:1.7;
  margin:var(--space-1) 0 0;
}

.promotion-view-switcher__buttons,
.promotion-coupon-role-guide__actions{
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-2);
}

.promotion-view-switcher__buttons{
  margin-top:var(--space-3);
}

.promotion-view-switcher__status{
  align-items:center;
  background:var(--bg-elevated);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-1);
  color:var(--text-secondary);
  display:flex;
  flex-wrap:wrap;
  font-size:var(--text-sm);
  gap:var(--space-2);
  margin-top:var(--space-3);
  padding:var(--space-2) var(--space-3);
}

.promotion-view-switcher__status strong{
  color:var(--color-primary);
}

.promotion-line-entry{
  white-space:nowrap;
}

.promotion-coupon-role-guide{
  border-color:var(--color-primary-dim);
  margin-top:var(--space-4);
}

.promotion-coupon-role-guide__actions{
  flex-shrink:0;
}

.promotion-publication-link{
  align-items:center;
}

#page-coupon-line-publication{
  --page-accent-1:rgba(16,185,129,0.14);
  --page-accent-2:rgba(96,165,250,0.10);
}

.coupon-line-page-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-2);
  margin-bottom:var(--space-3);
}

.coupon-line-status-card{
  display:grid;
  gap:var(--space-3);
  grid-template-columns:minmax(220px,1fr) minmax(360px,1.4fr) auto;
  margin-bottom:var(--space-3);
}

.coupon-line-status-card > div > p,
.coupon-line-section-head p,
.coupon-line-empty p{
  color:var(--text-secondary);
  font-size:var(--text-sm);
  line-height:1.7;
  margin:var(--space-1) 0 0;
}

.coupon-line-sync-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin:0;
}

.coupon-line-sync-grid div{
  background:var(--bg-elevated);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-1);
  padding:var(--space-2);
}

.coupon-line-sync-grid dt,
.coupon-line-sync-grid dd{
  font-size:var(--text-xs);
  margin:0;
}

.coupon-line-sync-grid dt{
  color:var(--text-muted);
}

.coupon-line-sync-grid dd{
  color:var(--text-primary);
  font-weight:var(--font-weight-bold);
  margin-top:var(--space-1);
}

.coupon-line-layout{
  display:grid;
  gap:var(--space-3);
}

.coupon-line-section-head{
  align-items:flex-start;
  display:flex;
  gap:var(--space-3);
  justify-content:space-between;
  margin-bottom:var(--space-3);
}

.coupon-line-section-head > span{
  color:var(--text-secondary);
  font-size:var(--text-sm);
}

.coupon-line-table-wrap{
  overflow-x:auto;
}

.coupon-line-table{
  min-width:980px;
}

.coupon-line-table tr.is-selected{
  background:var(--color-primary-dim);
}

.coupon-line-table td{
  color:var(--text-secondary);
  font-size:var(--text-sm);
  vertical-align:middle;
}

.coupon-line-table td strong,
.coupon-line-table td small{
  display:block;
}

.coupon-line-table td strong{
  color:var(--text-primary);
}

.coupon-line-table td small{
  color:var(--text-muted);
  font-size:var(--text-xs);
  margin-top:var(--space-1);
}

.coupon-line-badge{
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-pill);
  display:inline-block;
  font-size:var(--text-xs);
  font-weight:var(--font-weight-bold);
  padding:4px 9px;
  white-space:nowrap;
}

.coupon-line-badge--success{background:var(--color-success-dim);color:var(--color-success);}
.coupon-line-badge--info{background:var(--color-info-dim);color:var(--color-info);}
.coupon-line-badge--warning{background:var(--color-warning-dim);color:var(--color-warning);}
.coupon-line-badge--muted{background:var(--bg-elevated);color:var(--text-muted);}

.coupon-line-editor{
  max-width:820px;
  scroll-margin-top:80px;
}

.coupon-line-editor-empty,
.coupon-line-empty{
  color:var(--text-secondary);
  font-size:var(--text-sm);
  text-align:center;
}

.coupon-line-empty{
  padding:var(--space-5);
}

.coupon-line-empty .btn-primary{
  margin-top:var(--space-3);
}

.coupon-line-form{
  display:grid;
  gap:var(--space-3);
}

.coupon-line-form small,
.coupon-line-readonly-note{
  color:var(--text-muted);
  display:block;
  font-size:var(--text-xs);
  line-height:1.6;
  margin-top:var(--space-1);
}

.coupon-line-api-condition{
  padding:12px 14px;
  border:1px solid var(--border-default);
  border-radius:8px;
  background:var(--bg-elevated);
  color:var(--text-primary);
  font-size:var(--text-base);
  line-height:1.7;
}

.coupon-line-toggle{
  color:var(--text-primary);
  font-size:var(--text-base);
  font-weight:var(--font-weight-bold);
}

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

.coupon-line-message{
  font-size:var(--text-sm);
  min-height:1.7em;
  padding:var(--space-2) 0;
}

.coupon-line-message--success{color:var(--color-success);}
.coupon-line-message--error{color:var(--color-danger);}
.coupon-line-message--muted{color:var(--text-secondary);}

.rfm-empty-state,
.rfm-error-state{
  padding: var(--space-4) 0;
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.rfm-error-state{
  color: var(--color-danger);
}

.rfm-ai-card{
  margin-bottom: var(--space-3);
  border-color: var(--color-primary-dim);
  background:
    linear-gradient(140deg, rgba(196,181,253,0.10), rgba(96,165,250,0.045) 58%, rgba(0,0,0,0.04)),
    var(--bg-surface);
}

.rfm-card-head,
.rfm-toolbar,
.rfm-cycle-head{
  display:flex;
  align-items:center;
  gap: var(--space-2);
}

.rfm-card-head{
  justify-content:space-between;
  margin-bottom: var(--space-1);
}

.rfm-card-head--baseline{
  align-items:baseline;
}

.rfm-toolbar{
  flex-wrap:wrap;
  justify-content:flex-end;
}

.rfm-card-heading{
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
}

.rfm-panel > .rfm-card-heading,
.rfm-score-card > .rfm-card-heading,
.rfm-subsection > .rfm-card-heading{
  margin-bottom:var(--space-2);
}

.rfm-card-heading--accent{
  color: var(--color-primary);
}

.rfm-card-copy,
.rfm-mini-copy{
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: var(--leading-tight);
}

.rfm-card-head + .rfm-mini-copy,
.rfm-mini-copy + .rfm-monthly-bars{
  margin-top:var(--space-1);
}

.rfm-card-copy{
  margin-bottom: var(--space-1);
}

.rfm-ai-output{
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.rfm-magazine-stat-grid{
  display:grid;
  grid-template-columns:1.25fr repeat(4, minmax(0, 1fr));
  gap:var(--rfm-panel-gap);
  margin-bottom:var(--space-2);
  align-items:stretch;
}

.rfm-magazine-highlight{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius-3);
  border:1px solid rgba(167,139,250,0.22);
  padding:var(--space-3);
  background:
    linear-gradient(140deg, rgba(168,85,247,0.15), rgba(59,130,246,0.08) 55%, rgba(0,0,0,0.05)),
    var(--bg-surface);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 14px 32px rgba(0,0,0,0.18);
}

.rfm-magazine-highlight::before{
  content:"";
  position:absolute;
  right:-24px;
  top:-20px;
  width:130px;
  height:130px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,0.14), transparent 68%);
}

.rfm-highlight-label,
.rfm-highlight-value,
.rfm-highlight-meta{
  position:relative;
  z-index:1;
}

.rfm-highlight-label{
  color:var(--text-secondary);
  font-size:var(--text-sm);
  margin-bottom:var(--space-1);
}

.rfm-highlight-value{
  color:var(--color-primary);
  font-size:clamp(28px, 4vw, 34px);
  font-weight:800;
  line-height:1;
  letter-spacing:-0.04em;
}

.rfm-highlight-value span{
  color:var(--text-secondary);
  font-size:var(--text-base);
  font-weight:500;
  margin-left:var(--space-1);
  letter-spacing:0;
}

.rfm-highlight-meta{
  color:var(--text-secondary);
  font-size:var(--text-sm);
  line-height:var(--leading-normal);
  margin-top:var(--space-2);
}

.rfm-stat-card{
  text-align:center;
  padding:var(--space-3);
  margin-bottom:0;
}

.rfm-stat-value{
  font-size:clamp(18px, 2.2vw, 22px);
  font-weight:var(--font-weight-bold);
  line-height:1.15;
}

.rfm-stat-label{
  color:var(--text-secondary);
  font-size:var(--text-xs);
  margin-top:var(--space-0);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rfm-section-title{
  color:var(--color-primary);
  font-size:var(--text-md);
  font-weight:800;
  letter-spacing:0.04em;
  margin:var(--space-5) 0 var(--space-3);
}

.rfm-two-column{
  display:grid;
  grid-template-columns:1.2fr 0.95fr;
  gap:var(--rfm-gap);
  margin-bottom:var(--space-3);
}

.rfm-region-time-grid{
  display:grid;
  grid-template-columns:1fr 1.5fr;
  gap:var(--rfm-gap);
  margin-bottom:var(--space-2);
}

.rfm-panel,
.rfm-cycle-card,
.rfm-score-card,
.rfm-segment-card,
.rfm-table-card{
  margin-bottom:0;
}

.rfm-panel,
.rfm-cycle-card,
.rfm-score-card,
.rfm-table-card{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);
}

.rfm-panel::-webkit-scrollbar,
.rfm-cycle-card::-webkit-scrollbar,
.rfm-score-card::-webkit-scrollbar,
.rfm-table-card::-webkit-scrollbar,
.rfm-table-scroll::-webkit-scrollbar{
  display:block;
  height:var(--scrollbar-size);
}

.rfm-panel::-webkit-scrollbar-track,
.rfm-cycle-card::-webkit-scrollbar-track,
.rfm-score-card::-webkit-scrollbar-track,
.rfm-table-card::-webkit-scrollbar-track,
.rfm-table-scroll::-webkit-scrollbar-track{
  background:var(--scrollbar-track);
  border-radius:var(--radius-pill);
}

.rfm-panel::-webkit-scrollbar-thumb,
.rfm-cycle-card::-webkit-scrollbar-thumb,
.rfm-score-card::-webkit-scrollbar-thumb,
.rfm-table-card::-webkit-scrollbar-thumb,
.rfm-table-scroll::-webkit-scrollbar-thumb{
  background:var(--scrollbar-thumb);
  border-radius:var(--radius-pill);
}

.rfm-panel::-webkit-scrollbar-thumb:hover,
.rfm-cycle-card::-webkit-scrollbar-thumb:hover,
.rfm-score-card::-webkit-scrollbar-thumb:hover,
.rfm-table-card::-webkit-scrollbar-thumb:hover,
.rfm-table-scroll::-webkit-scrollbar-thumb:hover{
  background:var(--scrollbar-thumb-hover);
}

.rfm-subsection{
  border-top:1px solid var(--border-default);
  margin-top:var(--space-2);
  padding-top:var(--space-2);
}

.rfm-bar-stack{
  display:flex;
  flex-direction:column;
  gap:var(--space-1);
}

.rfm-bar-stack--compact{
  gap:6px;
}

.rfm-bar-row{
  display:flex;
  align-items:center;
  gap:var(--space-1);
  min-width:280px;
}

.rfm-bar-label{
  color:var(--text-primary);
  flex:0 0 64px;
  font-size:var(--text-xs);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rfm-bar-label--score{
  flex-basis:18px;
  color:var(--text-secondary);
  font-weight:var(--font-weight-bold);
  text-align:right;
}

.rfm-bar-track,
.rfm-funnel-track{
  flex:1;
  background:var(--bg-elevated);
  border-radius:var(--radius-1);
  overflow:hidden;
}

.rfm-bar-track{
  height:14px;
}

.rfm-bar-fill,
.rfm-funnel-fill{
  height:100%;
  border-radius:inherit;
  transition:width 0.5s ease-out;
}

.rfm-bar-count{
  color:var(--text-secondary);
  flex:0 0 54px;
  font-size:var(--text-xs);
  font-weight:600;
  text-align:right;
  white-space:nowrap;
}

.rfm-bar-count span{
  font-size:9px;
  font-weight:400;
  margin-left:2px;
}

.rfm-monthly-bars{
  display:flex;
  align-items:flex-end;
  gap:3px;
  height:var(--rfm-monthly-height, 150px);
  min-width:520px;
  padding:0 2px;
}

.rfm-mini-stat-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:var(--space-1);
  margin-top:var(--space-3);
  padding-top:var(--space-3);
  border-top:1px solid var(--border-default);
}

.rfm-cycle-head{
  justify-content:space-between;
  margin-bottom:var(--space-3);
}

.rfm-cycle-value{
  color:var(--color-primary);
  font-size:clamp(24px, 3vw, 30px);
  font-weight:800;
  margin-left:auto;
}

.rfm-scroll-list{
  max-height:360px;
  overflow-y:auto;
  padding-right:var(--space-0);
}

.rfm-hourly-chart{
  align-items:flex-end;
  border-bottom:1px solid var(--border-default);
  display:flex;
  gap:3px;
  height:120px;
  min-width:520px;
  padding:0 4px;
}

.rfm-score-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:var(--space-2);
  margin-bottom:var(--space-2);
}

.rfm-table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.rfm-funnel-row{
  margin-bottom:var(--space-1);
}

.rfm-funnel-meta{
  display:flex;
  justify-content:space-between;
  gap:var(--space-1);
  margin-bottom:3px;
}

.rfm-funnel-label,
.rfm-funnel-count{
  font-size:var(--text-xs);
  font-weight:var(--font-weight-bold);
}

.rfm-funnel-count{
  color:var(--text-primary);
  text-align:right;
}

.rfm-funnel-track{
  height:16px;
}

.rfm-rank-row{
  display:grid;
  grid-template-columns:24px minmax(0, 1fr) max-content;
  align-items:center;
  background:linear-gradient(135deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-1);
  column-gap:var(--space-1);
  margin-bottom:var(--space-1);
  max-width:100%;
  min-width:0;
  overflow:hidden;
  padding:10px var(--space-1);
  width:100%;
}

.rfm-rank-index{
  align-items:center;
  background:rgba(196,181,253,0.12);
  border:1px solid rgba(196,181,253,0.18);
  border-radius:var(--radius-pill);
  color:var(--color-primary);
  display:inline-flex;
  font-size:var(--text-xs);
  font-weight:var(--font-weight-bold);
  height:24px;
  justify-content:center;
  text-align:right;
  width:24px;
}

.rfm-rank-product{
  overflow:hidden;
  min-width:0;
  width:100%;
}

.rfm-rank-product > div{
  max-width:100%;
  min-width:0;
}

.rfm-rank-count{
  background:rgba(16,185,129,0.12);
  border:1px solid rgba(16,185,129,0.20);
  border-radius:var(--radius-pill);
  color:#6EE7B7;
  font-size:var(--text-xs);
  font-weight:700;
  padding:4px 8px;
  text-align:right;
  white-space:nowrap;
}

.rfm-journey-main-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:var(--space-4);
  margin-bottom:var(--space-4);
}

.rfm-journey-sub-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--space-4);
}

/* ===== ENTRY PRODUCT LIFT ===== */
.entry-lift-hero{ margin-bottom:var(--space-3); }
.entry-lift-filter-card{ margin-bottom:var(--space-3); }
.entry-lift-filter-grid{
  display:grid;
  grid-template-columns:minmax(260px,2fr) repeat(3,minmax(150px,1fr));
  gap:var(--space-2);
  align-items:end;
}
.entry-lift-filter-grid .form-group{ margin-bottom:0; }
.entry-lift-filter-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--space-2);
  margin-top:var(--space-2);
}
.entry-lift-export{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-2);
  margin-bottom:var(--space-3);
}
.entry-lift-export-label{
  color:var(--text-secondary);
  font-size:var(--text-sm);
  font-weight:var(--font-weight-bold);
}
.entry-lift-export-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-1);
}
.entry-lift-export .entry-lift-card-note{ margin-left:auto; margin-top:0; }
.entry-lift-check{
  align-items:center;
  color:var(--text-secondary);
  display:flex;
  font-size:var(--text-sm);
  gap:var(--space-1);
}
.entry-lift-judgment{
  align-items:center;
  border:1px solid var(--border-default);
  border-radius:var(--card-radius);
  display:grid;
  gap:var(--space-3);
  grid-template-columns:minmax(180px,.7fr) 2fr;
  margin-bottom:var(--space-3);
  padding:var(--card-padding);
}
.entry-lift-judgment--success{ background:var(--color-success-dim); border-color:var(--color-success); }
.entry-lift-judgment--warning{ background:var(--color-warning-dim); border-color:var(--color-warning); }
.entry-lift-judgment--danger{ background:var(--color-danger-dim); border-color:var(--color-danger); }
.entry-lift-eyebrow{ color:var(--text-muted); font-size:var(--text-sm); font-weight:var(--font-weight-bold); }
.entry-lift-judgment-title{ color:var(--text-primary); font-size:var(--text-xl); font-weight:var(--font-weight-bold); margin-top:var(--space-1); }
.entry-lift-judgment-copy{ color:var(--text-secondary); font-size:var(--text-base); line-height:1.75; }
.entry-lift-judgment-copy strong{ color:var(--text-primary); }
.entry-lift-judgment-copy span{ color:var(--text-muted); }
.entry-lift-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:var(--space-2);
  margin-bottom:var(--space-3);
}
.entry-lift-kpi{ min-width:0; text-align:center; }
.entry-lift-kpi .sum-val{ overflow-wrap:anywhere; }
.entry-lift-two-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--space-3);
  margin-bottom:var(--space-3);
}
.entry-lift-two-grid .card{ margin-bottom:0; }
.entry-lift-two-grid--single .card{ grid-column:1 / -1; }
.entry-lift-data-note,
.entry-lift-card-note{
  color:var(--text-muted);
  font-size:var(--text-xs);
  line-height:1.6;
}
.entry-lift-data-note{
  background:var(--color-info-dim);
  border:1px solid var(--color-info);
  border-radius:var(--radius-2);
  margin-bottom:var(--space-3);
  padding:var(--space-2);
}
.entry-lift-card-note{ margin-top:var(--space-2); }
.entry-lift-bar-row{
  align-items:center;
  display:grid;
  gap:var(--space-2);
  grid-template-columns:minmax(110px,1.2fr) minmax(100px,2fr) minmax(90px,auto);
  margin-bottom:var(--space-2);
}
.entry-lift-bar-label,
.entry-lift-bar-value{ color:var(--text-secondary); font-size:var(--text-sm); }
.entry-lift-bar-value{ text-align:right; white-space:nowrap; }
.entry-lift-bar-track{ background:var(--bg-elevated); border-radius:var(--radius-pill); height:10px; overflow:hidden; }
.entry-lift-bar-fill{ border-radius:inherit; height:100%; min-width:2px; }
.entry-lift-statline{ color:var(--text-secondary); display:flex; font-size:var(--text-base); gap:var(--space-3); margin-bottom:var(--space-3); }
.entry-lift-statline strong{ color:var(--color-success); }
.entry-lift-compare-table td:not(:first-child){ font-variant-numeric:tabular-nums; }
.entry-lift-table-scroll{ overflow-x:auto; }

@media (max-width:1100px){
  .entry-lift-kpi-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .entry-lift-filter-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .entry-lift-product-field{ grid-column:1 / -1; }
}

@media (max-width:700px){
  .entry-lift-filter-grid,
  .entry-lift-two-grid,
  .entry-lift-judgment{ grid-template-columns:1fr; }
  .entry-lift-kpi-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .entry-lift-filter-actions{ align-items:stretch; flex-direction:column; }
  .entry-lift-export{ align-items:stretch; flex-direction:column; }
  .entry-lift-export .entry-lift-card-note{ margin-left:0; }
  .entry-lift-bar-row{ grid-template-columns:minmax(88px,1fr) minmax(80px,1.4fr); }
  .entry-lift-bar-value{ grid-column:2; }
  .entry-lift-compare-table{ min-width:560px; }
  .entry-lift-two-grid .card{ overflow-x:auto; }
}

/* ===== ANALYSIS PAGE SYSTEM ===== */
.analysis-empty-state,
.analysis-error-state{
  border:1px solid var(--border-default);
  border-radius:var(--radius-3);
  color:var(--text-muted);
  font-size:var(--text-base);
  line-height:1.8;
  padding:var(--space-3);
}

.analysis-empty-state{
  background:rgba(255,255,255,0.02);
}

.analysis-error-state{
  background:rgba(255,45,107,0.08);
  border-color:rgba(255,45,107,0.24);
  color:var(--color-danger);
}

.analysis-empty-state--large{
  padding:var(--space-5) var(--space-4);
  text-align:center;
}

.analysis-empty-icon{
  font-size:40px;
  line-height:1;
  margin-bottom:var(--space-2);
}

.analysis-empty-title{
  color:var(--text-secondary);
  font-size:var(--text-md);
  font-weight:var(--font-weight-bold);
  margin-bottom:var(--space-1);
}

.analysis-empty-copy{
  font-size:var(--text-sm);
  line-height:1.8;
}

.analysis-control-row,
.analysis-tab-row,
.analysis-meta-row{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-2);
}

.analysis-control-row{
  margin-bottom:var(--space-3);
}

.analysis-tab-row{
  margin-bottom:var(--space-3);
}

.analysis-tab-row button.tab-active{
  background:rgba(192,38,211,0.18) !important;
  border:2px solid #C026D3 !important;
  color:#E879F9 !important;
}

.analysis-meta-row{
  color:var(--text-muted);
  font-size:var(--text-xs);
  margin-bottom:var(--space-2);
}

.analysis-section-head{
  align-items:flex-start;
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-2);
  justify-content:space-between;
  margin-bottom:var(--space-3);
}

.analysis-table-scroll{
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  padding-bottom:6px;
  scrollbar-color:rgba(196,181,253,0.62) rgba(255,255,255,0.06);
  scrollbar-width:thin;
  width:100%;
}

.analysis-table-scroll::-webkit-scrollbar{
  height:8px;
}

.analysis-table-scroll::-webkit-scrollbar-track{
  background:rgba(255,255,255,0.06);
  border-radius:999px;
}

.analysis-table-scroll::-webkit-scrollbar-thumb{
  background:linear-gradient(90deg,rgba(196,181,253,0.85),rgba(96,165,250,0.72));
  border-radius:999px;
}

.analysis-table-scroll > table{
  min-width:640px;
}

.point-page-toolbar{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  font-size:var(--text-xs);
  gap:var(--space-1);
  justify-content:flex-end;
  margin-bottom:var(--space-2);
}

.point-analysis-grid,
.point-detail-grid{
  align-items:start;
  display:grid;
  gap:var(--space-4);
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}

.point-analysis-grid{
  margin-bottom:var(--space-4);
}

.ad-page-shell{
  padding:var(--space-1) 0 var(--space-3);
}

.ad-period-control{
  background:var(--bg-surface);
  border:1px solid var(--border-default);
  border-radius:var(--radius-2);
  padding:var(--space-2);
}

.ad-kpi-grid{
  display:grid;
  gap:var(--space-1);
  margin-bottom:var(--space-4);
}

.ad-kpi-grid--six{
  grid-template-columns:repeat(6,minmax(0,1fr));
}

.ad-kpi-grid--four{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.ad-alert-grid{
  display:grid;
  gap:var(--space-2);
  margin-bottom:var(--space-4);
}

.ad-alert-grid--three{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.ad-alert-grid--two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.mailmag-kpi-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));
  margin-bottom:var(--space-4);
}

.mailmag-chart-grid{
  align-items:stretch;
  display:grid;
  gap:var(--space-4);
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  margin-bottom:var(--space-4);
}

.mailmag-trend-card{
  min-width:0;
}

.mailmag-device-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:repeat(4,minmax(0,1fr));
  width:100%;
}

.keyword-analysis-grid,
.keyword-hint-grid{
  display:grid;
  gap:var(--space-4);
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  margin-bottom:var(--space-4);
}

.keyword-suggestion-grid{
  display:grid;
  gap:var(--space-1);
}

.analyze-period-control{
  background:var(--bg-surface);
  border:1px solid var(--border-default);
  border-radius:var(--radius-2);
  padding:var(--space-2) var(--space-3);
}

.analyze-summary-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));
  margin-bottom:var(--space-3);
}

.analyze-filter-row{
  margin-bottom:0;
}

.analyze-coupon-stack{
  display:flex;
  flex-direction:column;
  gap:var(--space-2);
}

.analyze-metric-grid{
  background:var(--border-default);
  display:grid;
  gap:1px;
}

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

.analyze-metric-grid--four{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.analyze-metric-grid--five{
  grid-template-columns:repeat(5,minmax(0,1fr));
}

.analyze-details-chevron{
  display:inline-block;
  transition:transform 0.2s;
  font-style:normal;
}
details[open] .analyze-details-chevron{
  transform:rotate(180deg);
}

.analyze-detail-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:minmax(0,1.2fr) minmax(0,0.8fr);
  margin-bottom:var(--space-2);
}

.analyze-campaign-form-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  margin-bottom:var(--space-2);
}

/* ===== MANAGEMENT / OPERATIONS PAGES ===== */
.coverage-kpi-grid,
.subscription-kpi-grid,
.health-kpi-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));
  margin-bottom:var(--space-4);
}

.coverage-card-grid{
  display:grid;
  gap:var(--space-3);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));
}

.coverage-mini-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-bottom:var(--space-2);
}

.subscription-toolbar{
  align-items:center;
  display:flex;
  font-size:var(--text-xs);
  gap:var(--space-1);
  justify-content:space-between;
  margin-bottom:var(--space-2);
}

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

.subscription-ltv-grid{
  margin-bottom:var(--space-3);
}

.subscription-analysis-grid{
  display:grid;
  gap:var(--space-3);
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:var(--space-3);
}

.health-two-grid,
.health-suspicious-grid{
  display:grid;
  gap:var(--space-4);
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  margin-bottom:var(--space-4);
}

.health-function-grid{
  display:grid;
  gap:var(--space-4);
  grid-template-columns:minmax(0,1fr) 320px;
  margin-bottom:var(--space-4);
}

.health-scroll-card{
  background:var(--bg-surface);
  border:1px solid var(--border-default);
  border-radius:var(--radius-2);
  margin-bottom:var(--space-4);
  overflow-x:auto;
  padding:var(--space-3);
  scrollbar-color:rgba(196,181,253,0.62) rgba(255,255,255,0.06);
  scrollbar-width:thin;
}

.health-scroll-card::-webkit-scrollbar{
  height:8px;
}

.health-scroll-card::-webkit-scrollbar-track{
  background:rgba(255,255,255,0.06);
  border-radius:999px;
}

.health-scroll-card::-webkit-scrollbar-thumb{
  background:linear-gradient(90deg,rgba(196,181,253,0.85),rgba(96,165,250,0.72));
  border-radius:999px;
}

/* ===== STRATEGY / AI PAGES ===== */
.deep-stat-grid,
.deep-cac-stat-grid,
.bigfive-kpi-grid{
  display:grid;
  gap:var(--space-2);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));
  margin-bottom:var(--space-3);
}

.deep-chart-scroll{
  overflow-x:auto;
  overscroll-behavior-x:contain;
  padding-bottom:6px;
  scrollbar-color:rgba(196,181,253,0.62) rgba(255,255,255,0.06);
  scrollbar-width:thin;
}

.deep-chart-scroll::-webkit-scrollbar{
  height:8px;
}

.deep-chart-scroll::-webkit-scrollbar-track{
  background:rgba(255,255,255,0.06);
  border-radius:999px;
}

.deep-chart-scroll::-webkit-scrollbar-thumb{
  background:linear-gradient(90deg,rgba(196,181,253,0.85),rgba(96,165,250,0.72));
  border-radius:999px;
}

.deep-cac-grid{
  display:grid;
  gap:var(--space-4);
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  margin-bottom:var(--space-3);
}

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

.persona-info-grid{
  display:grid;
  font-size:var(--text-xs);
  gap:6px;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  margin-bottom:var(--space-2);
}

.notebook-page-shell{
  max-width:800px;
  width:100%;
}

.notebook-help-text{
  color:var(--text-muted);
  font-size:var(--text-xs);
  line-height:1.6;
}

.strategy-card{
  margin-bottom:var(--space-4);
}

/* ===== SETTINGS ===== */
.s-card{ background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle); border-radius: var(--card-radius); padding: var(--card-padding-flat); margin-bottom: 20px; }
.s-title{font-size: var(--font-size-base);font-weight:700;color:var(--color-primary);letter-spacing:0.05em;margin-bottom:16px;}
.persona-card{background:var(--bg-elevated);border:1px solid var(--border-default);border-radius:10px;padding:16px;margin-bottom:12px;}
.p-head{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.p-badge{font-size: var(--text-sm);font-weight:700;padding:3px 10px;border-radius:20px;letter-spacing:0.05em;}
.p-new     {background:#1a3a2a;color:#4ade80;border:1px solid #4ade8060;}
.p-prospect{background:#1a2a3a;color:#60a5fa;border:1px solid #60a5fa60;}
.p-customer{background:#3a2a1a;color:var(--color-primary);border:1px solid var(--color-primary-dim);}
.p-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.p-full{grid-column:1/-1;}
.p-label{font-size: var(--text-sm);color:var(--text-muted);margin-bottom:4px;}
.save-btn{background:var(--color-primary);color:#000;border:none;border-radius:8px;padding:10px 28px;font-size: var(--font-size-base);font-weight:700;cursor:pointer;transition:opacity 0.2s;margin-top:8px;}
.save-btn:hover{opacity:0.85;}
.saved-msg{display:inline-block;margin-left:12px;font-size: var(--text-base);color:#4ade80;opacity:0;transition:opacity 0.3s;}
.saved-msg.show{opacity:1;}

@media (max-width: 768px){
  .page{
    padding:14px 12px 20px;
    border-radius:22px;
  }

  .page-title{
    width:100%;
    justify-content:flex-start;
    padding:12px 16px;
    min-height:auto;
  }

  .rich-page-hero{
    padding:16px;
    border-radius:16px;
  }

  .import-grid{
    grid-template-columns:1fr;
    align-items:start;
  }

  /* インラインスタイルの grid-column:span2 も含め全カードをリセット */
  .import-grid .card{
    grid-column:auto !important;
  }

  .import-grid .card{
    min-height:0;
  }

  .import-grid .card > [style*="flex:1"]{
    flex:0 0 auto !important;
  }

  .import-grid .card > [style*="margin-top:auto"]{
    margin-top:14px !important;
  }

  #page-import,
  #page-import .import-grid,
  #page-import .import-grid .card{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }

  #page-import .import-grid{
    gap:12px;
  }

  #page-import .import-grid .card{
    display:block !important;
    padding:14px !important;
  }

  #page-import .import-grid .card > div[style*="height:56px"],
  #page-import .import-grid .card > div[style*="height:78px"],
  #page-import .import-grid .card > div[style*="height:40px"]{
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
  }

  #page-import .import-grid .card [style*="display:flex"][style*="gap:6px"]{
    flex-direction:column !important;
    align-items:stretch !important;
  }

  #page-import .import-grid .card input[type="date"],
  #page-import .import-grid .card input[type="month"]{
    width:100% !important;
    min-width:0 !important;
  }

  #page-import .upload-area{
    height:auto !important;
    min-height:92px;
    padding:12px !important;
  }

  .rfm-magazine-stat-grid,
  .rfm-two-column{
    grid-template-columns:1fr;
  }

  .rfm-card-head,
  .rfm-cycle-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .rfm-toolbar{
    justify-content:flex-start;
    width:100%;
  }

  .rfm-cycle-value{
    margin-left:0;
  }

  .rfm-region-time-grid,
  .rfm-score-grid,
  .rfm-journey-main-grid,
  .rfm-journey-sub-grid,
  .product-analysis-grid,
  .product-strategy-hints,
  .product-strategy-summary,
  .promotion-form-grid,
  .promotion-form-grid--primary,
  .promotion-form-grid--conditions,
  .promotion-form-grid--meta,
  .point-analysis-grid,
  .point-detail-grid,
  .ad-alert-grid,
  .mailmag-chart-grid,
  .mailmag-device-grid,
  .keyword-analysis-grid,
  .keyword-hint-grid,
  .analyze-detail-grid,
  .analyze-campaign-form-grid,
  .coverage-mini-grid,
  .subscription-skeleton-grid,
  .subscription-ltv-grid,
  .subscription-analysis-grid,
  .health-two-grid,
  .health-suspicious-grid,
  .health-function-grid,
  .deep-cac-grid,
  .persona-cards-grid,
  .persona-info-grid{
    grid-template-columns:1fr;
  }

  .rfm-region-time-grid{
    gap:var(--space-3);
  }

  .rfm-panel,
  .rfm-cycle-card,
  .rfm-score-card,
  .rfm-segment-card,
  .rfm-table-card{
    overflow-x:hidden;
  }

  .rfm-mini-stat-grid{
    min-width:0;
  }

  .rfm-bar-row,
  .rfm-monthly-bars,
  .rfm-hourly-chart,
  .rfm-rank-row{
    min-width:0;
    width:100%;
  }

  .rfm-monthly-bars{
    gap:2px;
    padding:0;
  }

  .rfm-hourly-chart{
    gap:1px;
    height:112px;
    padding:0;
  }

  .rfm-hourly-chart > div{
    min-width:0;
  }

  .rfm-hourly-chart [style*="font-size:8px"]{
    font-size:7px !important;
  }

  .rfm-bar-label{
    flex-basis:52px;
  }

  .rfm-bar-count{
    flex-basis:46px;
  }

  .rfm-rank-count{
    min-width:0;
  }

  .rfm-score-card .rfm-bar-label{
    flex-basis:18px;
  }

  .product-card-title,
  .product-inline-form,
  .product-toolbar,
  .product-submit-row{
    align-items:stretch;
    flex-direction:column;
  }

  .product-inline-form .input,
  #productsSearchInput{
    max-width:none;
    width:100%;
  }

  .promotion-page-head,
  .promotion-action-row{
    align-items:stretch;
    flex-direction:column;
  }

  .promotion-action-row > button{
    width:100%;
  }

  .promotion-form-card{
    padding:var(--space-3);
  }

  .point-page-toolbar,
  .analysis-section-head,
  .analysis-control-row,
  .analysis-tab-row{
    align-items:stretch;
  }

  .point-page-toolbar{
    justify-content:flex-start;
  }

  .point-page-toolbar > button,
  .analysis-control-row > button,
  .analysis-tab-row > button,
  .analyze-filter-row > button{
    width:100%;
  }

  .ad-kpi-grid--six,
  .ad-kpi-grid--four,
  .health-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .analyze-metric-grid--four,
  .analyze-metric-grid--five{
    min-width:520px;
  }

  .analysis-table-scroll > table{
    min-width:560px;
  }

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

  .subscription-toolbar > div:last-child{
    align-items:stretch !important;
    flex-direction:column;
    width:100%;
  }

  .subscription-toolbar button{
    width:100%;
  }
}

@media (min-width: 769px) and (max-width: 1023px){
  .ad-kpi-grid--six{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .ad-kpi-grid--four,
  .mailmag-device-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ad-alert-grid--three{
    grid-template-columns:1fr;
  }

  .point-detail-grid,
  .mailmag-chart-grid,
  .keyword-analysis-grid,
  .keyword-hint-grid,
  .analyze-detail-grid,
  .subscription-analysis-grid,
  .health-two-grid,
  .health-suspicious-grid,
  .health-function-grid{
    grid-template-columns:1fr;
  }

  .subscription-ltv-grid{
    grid-template-columns:1fr;
  }

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

/* ===== サムネイルページ タブ ===== */
.tn-tab {
  padding: 7px 16px;
  font-size: 12px;
  cursor: pointer;
  border: none;
  background: transparent !important;
  color: var(--text-secondary, #999) !important;
  min-height: unset;
  box-shadow: none;
  border-radius: 6px 6px 0 0;
}
.tn-tab--active {
  background: linear-gradient(135deg, rgba(155,114,245,0.22) 0%, rgba(124,92,191,0.12) 100%) !important;
  color: var(--text) !important;
}
.official-inventory-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

#card-official-inventory-confirmation {
  margin-top: var(--space-3);
}

#card-official-order-cancel {
  margin-top: var(--space-3);
}

.official-cancel-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  margin-bottom: 6px;
}

.official-cancel-note,
.official-cancel-empty,
.official-cancel-reason {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.official-cancel-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 14px 0;
}

.official-cancel-results {
  display: grid;
  gap: 8px;
}

.official-cancel-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
}

.official-cancel-order-main {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(100px, 1fr) 100px minmax(100px, 1fr);
  gap: 10px;
  align-items: center;
  font-size: var(--text-sm);
}

.official-cancel-order-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.official-cancelled-badge {
  color: var(--color-danger);
  background: var(--color-danger-dim);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: var(--text-xs);
}

.official-cancel-reason {
  grid-column: 1 / -1;
}

.official-inventory-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  margin-bottom: 6px;
}

.official-inventory-note,
.official-inventory-file,
.official-inventory-empty {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.official-inventory-error {
  color: var(--color-danger);
  background: var(--color-danger-dim);
  border-radius: 8px;
  padding: 12px;
  font-size: var(--text-sm);
}

.official-inventory-summary {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.official-inventory-kpi {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.official-inventory-kpi span {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.official-inventory-kpi b {
  color: var(--text-primary);
  font-size: var(--text-md);
}

.official-inventory-file {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.official-inventory-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--border-default);
  border-radius: 8px;
}

.official-inventory-table {
  margin: 0;
}

.official-inventory-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-surface);
}

.official-inventory-history {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.official-inventory-history summary {
  cursor: pointer;
}

.official-inventory-history > div {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.official-inventory-history > div > div {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr;
  gap: 12px;
}

@media (max-width: 700px) {
  .official-inventory-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .official-inventory-summary {
    grid-template-columns: 1fr;
  }

  .official-inventory-table {
    min-width: 620px;
  }

  .official-cancel-search-row,
  .official-cancel-order,
  .official-cancel-order-main {
    grid-template-columns: 1fr;
  }

  .official-cancel-order-side {
    justify-content: space-between;
  }
}
.official-accounting-card { max-width: 920px; }
.official-accounting-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.official-accounting-form label,.official-accounting-reason { display:flex; flex-direction:column; gap:7px; font-size:var(--text-sm); color:var(--text-secondary); }
.official-accounting-reason { margin-bottom:12px; }
.official-accounting-note { margin-bottom:16px; padding:12px 14px; border-radius:10px; background:var(--color-primary-dim); color:var(--text-secondary); font-size:var(--text-sm); line-height:1.7; }
.official-accounting-export-section { display:grid; gap:9px; margin-top:16px; }
.official-accounting-export-heading { color:var(--text-primary); font-size:var(--text-base); font-weight:var(--font-weight-bold); }
.official-accounting-export-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.official-accounting-export-grid .official-accounting-export-button { width:100%; }
.official-accounting-status { min-height:22px; margin-top:12px; color:var(--text-secondary); font-size:var(--text-sm); }
@media (max-width:700px) { .official-accounting-form,.official-accounting-export-grid { grid-template-columns:1fr; } .official-accounting-card .btn-primary { width:100%; } }
.customer-period-control {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.customer-period-control[hidden] { display: none; }
.customer-period-control label { display: flex; align-items: center; gap: 8px; }
.customer-period-control .input { width: auto; min-width: 150px; }
.rfm-channel-journey-card { margin-bottom: 8px; }
.rfm-channel-journey-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-top:12px; }
.rfm-channel-stat { padding:12px; border-radius:10px; background:var(--color-primary-dim); display:flex; flex-direction:column; gap:5px; }
.rfm-channel-stat span { color:var(--text-secondary); font-size:var(--text-xs); }
.rfm-channel-stat strong { color:var(--text-primary); font-size:var(--text-lg); }
.rfm-channel-stat--flow { background:rgba(110,231,183,0.1); }
@media (max-width:700px) { .rfm-channel-journey-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.c360-preview-summary { margin-bottom: 16px; }
.c360-preview-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.c360-preview-copy { margin:6px 0 0; color:var(--text-secondary); font-size:var(--text-sm); line-height:1.7; }
.c360-preview-status { padding:4px 10px; border-radius:999px; font-size:var(--text-sm); font-weight:var(--font-weight-bold); white-space:nowrap; }
.c360-preview-status.is-success { color:var(--color-success); background:var(--color-success-dim); }
.c360-preview-status.is-danger { color:var(--color-danger); background:var(--color-danger-dim); }
.c360-preview-status.is-warning { color:var(--color-warning); background:var(--color-warning-dim); }
.c360-preview-status.is-info { color:var(--color-info); background:var(--color-info-dim); }
.c360-preview-progress { height:10px; margin-top:20px; overflow:hidden; border-radius:999px; background:var(--bg-elevated); }
.c360-preview-progress-bar { height:100%; border-radius:inherit; background:var(--color-primary); transition:width .25s ease; }
.c360-preview-progress-meta { display:flex; justify-content:space-between; margin-top:8px; color:var(--text-secondary); font-size:var(--text-sm); }
.c360-preview-progress-meta strong { color:var(--text-primary); }
.c360-preview-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:18px; }
.c360-preview-note { color:var(--text-muted); font-size:var(--text-sm); }
.c360-preview-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.c360-preview-estimate-note { margin:12px 0 0; padding:12px; border-radius:8px; color:var(--color-info); background:var(--color-info-dim); font-size:var(--text-sm); line-height:1.7; }
.c360-preview-details { margin-top:16px; }
.c360-preview-details dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 20px; margin:14px 0 0; }
.c360-preview-details dl div { display:flex; justify-content:space-between; gap:12px; padding-bottom:8px; border-bottom:1px solid var(--border-subtle); }
.c360-preview-details dt { color:var(--text-muted); font-size:var(--text-sm); }
.c360-preview-details dd { margin:0; color:var(--text-primary); font-size:var(--text-sm); text-align:right; }
.c360-preview-error,.c360-preview-complete { margin-top:14px; padding:12px; border-radius:8px; font-size:var(--text-sm); line-height:1.7; }
.c360-preview-error { color:var(--color-danger); background:var(--color-danger-dim); }
.c360-preview-complete { color:var(--color-success); background:var(--color-success-dim); }
.c360-preview-safety { margin-top:16px; }
.c360-preview-safety ul { margin:12px 0 0; padding-left:20px; color:var(--text-secondary); font-size:var(--text-sm); line-height:1.8; }
.c360-pilot-card { margin-top:16px; }
.c360-pilot-grid { margin-top:18px; }
.c360-pilot-warning { margin-top:16px; padding:12px; border-radius:8px; color:var(--color-warning); background:var(--color-warning-dim); font-size:var(--text-sm); line-height:1.7; }
.c360-pilot-warning strong { color:var(--text-primary); }
@media (max-width:900px) { .c360-preview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .c360-preview-grid,.c360-preview-details dl { grid-template-columns:1fr; } .c360-preview-header { flex-direction:column; } }

/* Official EC coupons */
.official-coupon-layout { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr); gap:18px; align-items:start; }
.official-coupon-form { display:flex; flex-direction:column; gap:14px; }
.official-coupon-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.official-coupon-grid label,.official-coupon-wide-field { display:flex; flex-direction:column; gap:6px; color:var(--text-secondary); font-size:var(--text-sm); }
.official-coupon-span-two { grid-column:1 / -1; }
.official-coupon-section-title,.official-coupon-list-title { color:var(--text-primary); font-size:var(--text-lg); font-weight:var(--font-weight-bold); }
.official-coupon-section-title:not(:first-child) { margin-top:8px; padding-top:16px; border-top:1px solid var(--border-subtle); }
.official-coupon-checkbox { display:flex; align-items:center; gap:9px; color:var(--text-primary); font-size:var(--text-base); }
.official-coupon-form-actions { display:flex; gap:10px; }
.official-coupon-form-note { padding:11px 13px; border-radius:var(--radius-md); background:var(--color-primary-dim); color:var(--text-secondary); font-size:var(--text-xs); line-height:1.7; }
.official-coupon-list-title { margin-bottom:10px; }
.official-coupon-list { display:flex; flex-direction:column; gap:10px; }
.official-coupon-row { display:flex; justify-content:space-between; gap:14px; padding:15px; }
.official-coupon-row-main { min-width:0; flex:1; }
.official-coupon-row-head,.official-coupon-row-meta,.official-coupon-row-actions { display:flex; align-items:center; gap:8px; }
.official-coupon-row-head { justify-content:space-between; }
.official-coupon-row-head strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--text-base); }
.official-coupon-row-head > span { flex-shrink:0; color:var(--color-primary); font-size:var(--text-sm); font-weight:var(--font-weight-bold); }
.official-coupon-row-meta { flex-wrap:wrap; margin-top:8px; }
.official-coupon-row-meta span { padding:3px 7px; border-radius:999px; background:var(--bg-elevated); color:var(--text-secondary); font-size:var(--text-xs); }
.official-coupon-row-period,.official-coupon-empty { margin-top:8px; color:var(--text-secondary); font-size:var(--text-sm); }
.official-coupon-row-actions { align-self:center; flex-direction:column; }
.official-coupon-error { color:var(--color-danger); }
@media (max-width:900px) { .official-coupon-layout { grid-template-columns:1fr; } }
@media (max-width:560px) { .official-coupon-grid { grid-template-columns:1fr; } .official-coupon-span-two { grid-column:auto; } .official-coupon-row { flex-direction:column; } .official-coupon-row-actions { align-self:stretch; flex-direction:row; } }

@media (max-width:900px){
  .coupon-line-status-card{
    grid-template-columns:1fr;
  }

  .coupon-line-status-card > button{
    justify-self:start;
  }
}

@media (max-width:600px){
  .promotion-view-switcher__head,
  .promotion-coupon-role-guide__content,
  .promotion-publication-link,
  .coupon-line-section-head{
    align-items:stretch;
    flex-direction:column;
  }

  .promotion-view-switcher__buttons > button,
  .promotion-coupon-role-guide__actions > button,
  .promotion-publication-link > button,
  .coupon-line-page-tabs > button,
  .coupon-line-status-card > button{
    width:100%;
  }

  .promotion-coupon-role-guide__actions{
    flex-direction:column;
  }

  .coupon-line-sync-grid,
  .coupon-line-date-grid{
    grid-template-columns:1fr;
    width:100%;
  }
}

/* Official EC Customer360 management */
.official-customer360-list-title { color:var(--text-primary); font-size:var(--text-lg); font-weight:var(--font-weight-bold); margin-bottom:10px; }
.official-customer360-empty { margin-top:8px; color:var(--text-secondary); font-size:var(--text-sm); }
.official-customer360-row:hover { background:var(--bg-elevated); }

/* Customer360 unified directory: channel badges and filter chips */
.badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:var(--text-xs); background:var(--bg-elevated); color:var(--text-secondary); }
.badge--warning { background:var(--color-warning-dim); color:var(--color-warning); }
.btn-ghost.is-active { background:var(--color-primary); color:var(--bg-base); }

.customer360-directory-list-card { padding:var(--card-padding); }
.customer360-directory-list-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.customer360-directory-list-heading .official-customer360-list-title { margin-bottom:4px; }
.customer360-directory-list-help { color:var(--text-secondary); font-size:var(--text-sm); }
.customer360-directory-table-wrap { max-height:62vh; overflow:auto; border:1px solid var(--border-default); border-radius:var(--card-radius); }
.customer360-directory-table-wrap .table { min-width:920px; margin:0; }
.customer360-directory-table-wrap .table thead th { position:sticky; top:0; z-index:1; background:var(--bg-elevated); }
.customer360-directory-admin-tools { margin-top:16px; border:1px solid var(--border-default); border-radius:var(--card-radius); background:var(--bg-surface); }
.customer360-directory-admin-tools > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; color:var(--text-primary); font-size:var(--text-base); font-weight:var(--font-weight-bold); cursor:pointer; list-style:none; }
.customer360-directory-admin-tools > summary::-webkit-details-marker { display:none; }
.customer360-directory-admin-tools > summary::after { content:'＋'; color:var(--text-muted); font-size:var(--text-lg); }
.customer360-directory-admin-tools[open] > summary::after { content:'−'; }
.customer360-directory-admin-tools-body { padding:0 16px 16px; }

@media (max-width:600px) {
  .customer360-directory-list-card { padding:var(--card-padding-flat); }
  .customer360-directory-table-wrap { max-height:68vh; }
}

/* Product Operation dashboard */
.product-ops-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.product-ops-sync { display:flex; flex-wrap:wrap; gap:16px; margin-bottom:12px; color:var(--text-secondary); font-size:var(--text-sm); }
.product-ops-sources { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:8px; margin-bottom:16px; }
.product-ops-source { display:flex; justify-content:space-between; gap:8px; padding:10px 12px; border:1px solid var(--border-default); border-radius:var(--card-radius); background:var(--bg-elevated); font-size:var(--text-sm); }
.product-ops-source span { color:var(--text-secondary); }
.product-ops-source--unavailable { border-color:var(--color-danger); background:var(--color-danger-dim); }
.product-ops-source--warning { border-color:var(--color-warning); background:var(--color-warning-dim); }
.product-ops-source--empty { border-color:var(--color-info); background:var(--color-info-dim); }
.product-ops-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(165px,1fr)); gap:12px; margin-bottom:16px; }
.product-ops-kpi { border-left:4px solid var(--color-info); }
.product-ops-kpi--success { border-left-color:var(--color-success); }
.product-ops-kpi--warning { border-left-color:var(--color-warning); }
.product-ops-kpi--danger { border-left-color:var(--color-danger); }
.product-ops-kpi-label { color:var(--text-secondary); font-size:var(--text-sm); }
.product-ops-kpi-value { margin:6px 0; color:var(--text-primary); font-size:var(--text-xl); font-weight:var(--font-weight-bold); }
.product-ops-kpi-detail,.product-ops-list-note { color:var(--text-muted); font-size:var(--text-xs); }
.product-ops-list { margin-bottom:12px; overflow:auto; }
.product-ops-section-title { margin:0 0 12px; color:var(--text-primary); font-size:var(--text-md); }
.product-ops-table { min-width:640px; margin:0; }
.product-ops-empty,.product-ops-loading { color:var(--text-secondary); font-size:var(--text-sm); }
.product-ops-danger-text { color:var(--color-danger); }
.product-ops-fetch-error { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:12px; padding:12px 14px; border:1px solid var(--color-danger); border-radius:var(--card-radius); background:var(--color-danger-dim); color:var(--color-danger); font-size:var(--text-sm); }
@media (max-width:600px) {
  .product-ops-toolbar > button { flex:1 1 100%; }
  .product-ops-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
