/* Giá đối thủ — shared components. Uses only tokens from tokens.css. */

/* ===== base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; }               /* no horizontal jump between short and long pages */
body { margin: 0; background: var(--bg-page); color: var(--fg-1); font: var(--t-body); -webkit-font-smoothing: antialiased; }
a { color: var(--fg-1); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--highlight); text-decoration-thickness: 3px; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 2px; }
::selection { background: var(--yellow-500); color: var(--fg-1); }
h1, h2, h3, p { margin: 0; }
.u-num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 16px; height: 16px; flex: none; }
.ico-sm { width: 12px; height: 12px; flex: none; }

/* ===== app shell ===== */
.app-header { position: sticky; top: 0; z-index: 200; background: var(--yellow-500); }
.app-header__in { max-width: var(--container); height: var(--header-h); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: var(--s-6); }
.brand { display: flex; align-items: center; gap: 14px; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.brand__name { font: 700 14px/1.2 var(--font-sans); padding-left: 14px; border-left: var(--bw-strong) solid rgba(22,23,26,.3); white-space: nowrap; }
.nav { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav__item { display: inline-flex; align-items: center; height: 40px; padding: 0 var(--s-4); border-radius: var(--r-pill);
  font: var(--t-nav); color: var(--fg-1); white-space: nowrap; }
.nav__item:hover { background: rgba(255,255,255,.55); text-decoration: none; }
.nav__item.is-active { background: var(--bg-surface); font-weight: 700; box-shadow: var(--shadow-1); }
.app-header__meta { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); font: 500 13px/1.4 var(--font-sans); color: var(--fg-2); white-space: nowrap; }
@media (max-width: 900px) { .app-header__meta { display: none; } .brand__name { display: none; } }

.page { max-width: var(--container); margin: 0 auto; padding: var(--s-8) var(--gutter) var(--s-16); display: flex; flex-direction: column; gap: var(--gap); }

/* ===== page header: same structure on every view, so the title never moves ===== */
/* flex + wrap: the actions drop below the title when there is no room, instead of squeezing it */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-4) var(--s-8); }
.page-head__text { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 420px; }
.page-head__actions { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: var(--s-3); flex: 0 1 auto; }
@media (max-width: 900px) { .page-head__actions { justify-content: flex-start; } }
.kicker { display: inline-flex; align-items: center; gap: 10px; min-height: 20px; font: var(--t-kicker); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.kicker::before { content: ""; width: 24px; height: 3px; border-radius: 2px; background: var(--amber-600); flex: none; }
.kicker a { color: var(--fg-2); }
.kicker__sep { color: var(--fg-3); }
.page-title { font: var(--t-display); letter-spacing: -.02em; color: var(--fg-1); }
.page-title strong { font-weight: 800; }
.page-lead { font: var(--t-body); color: var(--fg-2); max-width: 720px; }
.page-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); min-height: 24px; }
@media (max-width: 700px) { .page-title { font: var(--t-display-m); } }

/* ===== layout primitives ===== */
.l-split { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside-w); gap: var(--gap); align-items: start; }
.l-split__aside { position: sticky; top: calc(var(--header-h) + var(--s-6)); display: flex; flex-direction: column; gap: var(--gap); }
@media (max-width: 1100px) { .l-split { grid-template-columns: minmax(0, 1fr); } .l-split__aside { position: static; } }
.l-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 1000px) { .l-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .l-stats { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.stack-md { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.spacer { flex: 1 1 0; }

/* ===== card ===== */
.card { background: var(--bg-surface); border: var(--bw) solid var(--line-1); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.card--flush { padding: 0; gap: 0; overflow: hidden; }
.card--flush > .card__head { padding: var(--s-5) var(--s-6); }
.card--flush > .card__foot { padding: var(--s-3) var(--s-6); border-top: var(--bw) solid var(--line-1); }
.card--alert { border-color: var(--tone-high-line); }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.card__titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card__title { font: var(--t-h2); color: var(--fg-1); }
.card__sub, .caption { font: var(--t-caption); color: var(--fg-3); }
.well { background: var(--bg-muted); border-radius: var(--r-md); padding: var(--s-4); display: flex; flex-direction: column; gap: 10px; }
.well--outline { background: transparent; border: var(--bw) solid var(--line-1); }

/* ===== button ===== */
.btn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--control-h); padding: 0 var(--s-5); border-radius: var(--r-pill); border: var(--bw-strong) solid transparent;
  font: var(--t-button); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--yellow-500); color: var(--fg-on-yellow); box-shadow: var(--shadow-yellow); }
.btn--primary:hover { background: var(--yellow-600); } .btn--primary:active { background: var(--yellow-700); }
.btn--dark { background: var(--gray-900); color: var(--fg-on-dark); }
.btn--dark:hover { background: var(--gray-700); }
.btn--ghost { background: transparent; color: var(--fg-1); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--bg-hover); }
.btn--sm { height: var(--control-h-sm); padding: 0 var(--s-4); }
.btn--lg { height: 52px; font-size: 15px; }
.btn--block { width: 100%; }

/* ===== chip (status, filled+outlined) / tag (neutral info) ===== */
.chip { display: inline-flex; align-items: center; gap: var(--s-1); height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  border: var(--bw) solid transparent; font: var(--t-chip); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip--high { color: var(--tone-high-fg); background: var(--tone-high-bg); border-color: var(--tone-high-line); }
.chip--low  { color: var(--tone-low-fg);  background: var(--tone-low-bg);  border-color: var(--tone-low-line); }
.chip--ok   { color: var(--tone-ok-fg);   background: var(--tone-ok-bg);   border-color: var(--tone-ok-line); }
.chip--na   { color: var(--tone-na-fg);   background: var(--tone-na-bg);   border-color: var(--tone-na-line); }
.chip--info { color: var(--tone-info-fg); background: var(--tone-info-bg); border-color: var(--tone-info-line); }
.chip--down { color: var(--tone-info-fg); background: var(--tone-info-bg); border-color: var(--tone-info-line); } /* competitor price down */
.chip--up   { color: var(--tone-low-fg);  background: var(--tone-low-bg);  border-color: var(--tone-low-line); }  /* competitor price up */
.chip--danger { color: #fff; background: var(--tone-danger-solid); }                                           /* action needed: decrease */
.chip--plain { background: transparent; border-color: transparent; padding: 0; color: var(--fg-3); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--s-2); border-radius: var(--r-pill);
  border: var(--bw) dashed var(--line-control); background: var(--bg-muted); font: 600 12px/1 var(--font-sans); color: var(--fg-2); white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot--high { background: var(--tone-high-dot); } .dot--low { background: var(--tone-low-dot); }
.dot--ok { background: var(--tone-ok-dot); } .dot--na { background: var(--tone-na-dot); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.swatch--down { background: var(--dir-down); } .swatch--up { background: var(--dir-up); }

/* ===== segmented control ===== */
.seg { display: inline-flex; flex-wrap: wrap; gap: var(--s-1); padding: var(--s-1); background: var(--bg-muted); border: var(--bw) solid var(--line-1); border-radius: 22px; }
.seg__item { appearance: none; cursor: pointer; border: 0; background: transparent; height: var(--control-h-sm); padding: 0 var(--s-4);
  border-radius: var(--r-pill); font: 600 13px/1 var(--font-sans); color: var(--fg-2); display: inline-flex; align-items: center; white-space: nowrap; }
.seg__item:hover { background: var(--bg-hover); text-decoration: none; }
.seg__item.is-active { background: var(--yellow-500); color: var(--fg-on-yellow); box-shadow: 0 2px 6px rgba(255,210,0,.45); }

/* ===== form ===== */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font: var(--t-label); color: var(--fg-2); }
.input, .select { height: var(--control-h); padding: 0 14px; border: var(--bw) solid var(--line-control); border-radius: var(--r-sm);
  background: var(--bg-surface); font: var(--t-body); color: var(--fg-1); width: 100%; }
.input::placeholder { color: var(--fg-disabled); }
.input:focus, .select:focus { outline: none; border: var(--bw-strong) solid var(--line-strong); box-shadow: var(--focus-ring); }
.check { display: inline-flex; align-items: center; gap: var(--s-2); height: var(--control-h); font: 500 14px/1.4 var(--font-sans); color: var(--fg-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--gray-900); }

/* ===== toolbar (filter bar) ===== */
.toolbar { background: var(--bg-surface); border: var(--bw) solid var(--line-1); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  padding: var(--s-4) var(--s-5); display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-4); }
.toolbar__result { display: flex; align-items: center; gap: var(--s-3); height: var(--control-h); font: 500 13px/1.4 var(--font-sans); color: var(--fg-3); }
.toolbar__result strong { color: var(--fg-1); }

/* ===== stat card (KPI) ===== */
.stat { background: var(--bg-surface); border: var(--bw) solid var(--line-1); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  padding: var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: 6px; text-align: left; font-family: var(--font-sans); min-width: 0; }
button.stat { appearance: none; cursor: pointer; transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s, border-color .2s; }
button.stat:hover { box-shadow: var(--shadow-3); transform: translateY(-2px); }
button.stat.is-active { border-color: var(--line-strong); box-shadow: var(--focus-ring), var(--shadow-2); }
.stat--alert { border-color: var(--tone-high-line); }
.stat__label { display: flex; align-items: center; gap: var(--s-2); font: var(--t-label); color: var(--fg-2); }
.stat--alert .stat__label { color: var(--tone-high-fg); }
.stat__value { font: var(--t-stat); letter-spacing: -.01em; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.stat__hint { font: var(--t-caption); color: var(--fg-3); }

/* ===== data table ===== */
.table-scroll { overflow: auto; }
.table-scroll--tall { max-height: 720px; }
.dtable { border-collapse: separate; border-spacing: 0; width: 100%; font: var(--t-body); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.dtable th { position: sticky; top: 0; z-index: 5; background: var(--bg-muted); font: var(--t-label); color: var(--fg-2); text-align: right;
  padding: var(--s-3) 14px; border-bottom: var(--bw) solid var(--line-2); white-space: nowrap; vertical-align: bottom; }
.dtable th small { display: block; font: var(--t-caption); color: var(--fg-3); margin-top: 2px; }
.dtable td { padding: var(--s-3) 14px; border-bottom: var(--bw) solid var(--line-1); text-align: right; white-space: nowrap; vertical-align: top; background: var(--bg-surface); }
.dtable tbody tr:hover td { background: var(--bg-muted); }
.dtable .l { text-align: left; }
.dtable .wrap { white-space: normal; }
.dtable .is-sticky { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--line-1); }
.dtable th.is-sticky { z-index: 7; }
.dtable .gsep { border-left: var(--bw) solid var(--line-1); }
.dtable td.col-own { background: var(--bg-own); }
.dtable tbody tr:hover td.col-own { background: #fff6b8; }
.dtable .row-day td { background: var(--bg-muted); font: 700 12px/1.4 var(--font-sans); letter-spacing: .04em; color: var(--fg-1); padding: var(--s-2) 14px; }
.dtable .strong { font-weight: 600; color: var(--fg-1); }
.col-own-head { display: inline-flex; align-items: center; gap: 6px; }
.col-own-head::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow-500); box-shadow: 0 0 0 1px var(--line-strong); }

/* product name cell */
.pname { font: var(--t-h3); color: var(--fg-1); }
.meta { display: block; font: var(--t-caption); color: var(--fg-3); margin-top: 2px; }
.meta--pricier { color: var(--delta-pricier); } .meta--cheaper { color: var(--delta-cheaper); }
.meta--promo { color: var(--tone-high-fg); font-weight: 600; cursor: help; }
.meta--promo::before { content: "⚡\FE0E"; margin-right: 3px; }
.promo-box { display: flex; flex-direction: column; gap: 6px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--tone-high-bg); border: var(--bw) solid var(--tone-high-line); }
.promo-box__title { font: var(--t-h3); color: var(--tone-high-fg); }

/* price */
.price { font-weight: 500; color: var(--fg-1); }
.price--own { font-weight: 700; }
.price--best { font-weight: 800; text-decoration: underline; text-decoration-color: var(--highlight); text-decoration-thickness: 4px; text-underline-offset: 3px; }
.price--oos { color: var(--fg-3); font-weight: 400; text-decoration: line-through; text-decoration-color: var(--fg-3); }
.price--na { color: var(--fg-3); }
.price-old { color: var(--fg-3); text-decoration: line-through; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-6); font: var(--t-caption); color: var(--fg-3); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }

/* key-value rows */
.kv { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); font: var(--t-body); color: var(--fg-2); }
.kv b { font-weight: 600; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.kv--divided { padding: 10px 0; border-bottom: var(--bw) solid var(--line-1); }

/* ===== price position (dot plot) ===== */
.dp { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) 92px 104px; align-items: center; column-gap: var(--s-4); padding: 0 var(--s-3); min-height: 48px; }
.dp--own { background: var(--bg-own); border-radius: var(--r-md); }
.dp__name { display: flex; flex-direction: column; min-width: 0; }
.dp__name a, .dp__name b { font: var(--t-h3); color: var(--fg-1); display: inline-flex; align-items: center; gap: var(--s-1); }
.dp__name span { font: var(--t-caption); color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp__track { position: relative; height: 44px; }
.dp__axis { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-1); }
.dp__band { position: absolute; top: 0; bottom: 0; background: var(--tone-ok-bg); border-left: var(--bw) dashed var(--tone-ok-fg); border-right: var(--bw) dashed var(--tone-ok-fg); }
.dp__dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--gray-700); }
.dp__dot--24h { background: var(--series-24h); }
.dp__dot--own { width: 18px; height: 18px; margin: -9px 0 0 -9px; background: var(--yellow-500); box-shadow: 0 0 0 2px var(--line-strong); }
.dp__dot--oos { background: var(--bg-surface); box-shadow: 0 0 0 1.5px var(--gray-400); }
.dp__price { text-align: right; font: 600 14px/1.4 var(--font-sans); color: var(--fg-1); font-variant-numeric: tabular-nums; }
.dp__price--oos { color: var(--fg-3); font-weight: 400; text-decoration: line-through; }
.dp__delta { text-align: right; font: 500 12px/1.4 var(--font-sans); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.dp__delta--pricier { color: var(--delta-pricier); } .dp__delta--cheaper { color: var(--delta-cheaper); }
@media (max-width: 700px) { .dp { grid-template-columns: 110px minmax(0, 1fr) 76px; } .dp > :last-child { display: none; } }

/* ===== line chart ===== */
.chart { display: flex; gap: var(--s-3); }
.chart__y { position: relative; width: 52px; height: 300px; flex: none; }
.chart__y span { position: absolute; right: 0; transform: translateY(-50%); font: var(--t-caption); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.chart__main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.chart__plot { position: relative; height: 300px; }
.chart__grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-1); }
.chart__x { display: flex; justify-content: space-between; font: var(--t-caption); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ln { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ln--other { stroke: var(--series-other); stroke-width: 1.25; } .ln--24h { stroke: var(--series-24h); stroke-width: 2; }
.ln--focus { stroke: var(--series-focus); stroke-width: 2.5; } .ln--own { stroke: var(--series-own); stroke-width: 3; }
.pt--other { fill: var(--series-other); } .pt--24h { fill: var(--series-24h); } .pt--focus { fill: var(--series-focus); } .pt--own { fill: var(--series-own); }
.legend-btn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2); height: var(--control-h-sm); padding: 0 var(--s-3);
  border-radius: var(--r-pill); border: var(--bw) solid var(--line-2); background: var(--bg-surface); font: 500 13px/1 var(--font-sans); color: var(--fg-2); }
.legend-btn:hover { border-color: var(--line-control); }
.legend-btn.is-active { border-color: var(--line-strong); color: var(--fg-1); font-weight: 700; }
.legend-btn b { font-weight: 600; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.legend-btn__sw { width: 16px; height: 3px; border-radius: 2px; background: var(--series-other); }
.legend-btn__sw--own { background: var(--series-own); height: 4px; } .legend-btn__sw--24h { background: var(--series-24h); } .legend-btn__sw--focus { background: var(--series-focus); }

/* ===== bars (changes per day) & horizontal bars ===== */
.bars-chart { display: flex; gap: var(--s-3); }
.bars-chart__y { display: flex; flex-direction: column; justify-content: space-between; height: 200px; text-align: right; font: var(--t-caption); color: var(--fg-3); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 200px; border-bottom: var(--bw) solid var(--line-2); }
.bars__col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bars__bar { width: 100%; max-width: 18px; border-radius: var(--r-xs) var(--r-xs) 0 0; min-height: 2px; }
.bars__bar--down { background: var(--dir-down); } .bars__bar--up { background: var(--dir-up); }
.bars__x { display: flex; gap: 6px; }
.bars__x span { flex: 1 1 0; min-width: 0; text-align: center; font: var(--t-caption); color: var(--fg-3); font-variant-numeric: tabular-nums; overflow: hidden; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 72px; align-items: center; gap: var(--s-3); }
.hbar__name { font: var(--t-h3); color: var(--fg-1); }
.hbar__track { display: flex; height: 14px; border-radius: var(--r-pill); overflow: hidden; background: var(--bg-muted); }
.hbar__track i { display: block; height: 100%; }
.hbar__track .down { background: var(--dir-down); } .hbar__track .up { background: var(--dir-up); }
.hbar__val { text-align: right; font: var(--t-caption); color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* ===== misc ===== */
.pager { display: flex; gap: var(--s-1); justify-content: center; padding: var(--s-4); flex-wrap: wrap; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: var(--r-pill); font: 600 14px/1 var(--font-sans); color: var(--fg-2); }
.pager a:hover { background: var(--bg-hover); text-decoration: none; }
.pager .is-active { background: var(--yellow-500); color: var(--fg-on-yellow); }
.empty { padding: var(--s-12) var(--s-6); display: flex; flex-direction: column; align-items: center; gap: var(--s-3); text-align: center; }
.empty p { max-width: 480px; color: var(--fg-2); }
.icon-tile { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--yellow-500); display: inline-flex; align-items: center; justify-content: center; color: var(--fg-1); }
.link-action { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 32px; font: 600 13px/1 var(--font-sans); color: var(--fg-1); }
.big-price { font: var(--t-price-lg); letter-spacing: -.01em; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.mid-price { font: var(--t-price); color: var(--fg-1); font-variant-numeric: tabular-nums; }
.note { font: var(--t-caption); color: var(--fg-3); }
code { font: 500 12px/1.4 ui-monospace, Menlo, monospace; background: var(--bg-muted); padding: 1px 6px; border-radius: var(--r-xs); color: var(--fg-1); }
ul.list { margin: 0; padding-left: 18px; color: var(--fg-2); line-height: 1.8; }
.meta--alert { color: var(--tone-high-fg); font-weight: 600; }
.zone-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); padding: 10px var(--s-4); border-radius: var(--r-md);
  background: var(--tone-ok-bg); border: var(--bw) dashed var(--tone-ok-fg); color: var(--fg-2); font: var(--t-caption); }
.zone-note b { font: var(--t-h3); color: var(--tone-ok-fg); }
.zone-note span b { font: inherit; font-weight: 600; color: var(--fg-1); }
.zone-note--empty { background: var(--tone-high-bg); border-color: var(--tone-high-fg); }
.zone-note--empty > b { color: var(--tone-high-fg); }
.dp__band { background: var(--zone-strong); }
.dp__band--soft { background: var(--zone-soft); border-left: 0; border-right: var(--bw) dotted var(--tone-ok-fg); }
.zone-key { display: inline-flex; align-items: center; gap: 6px; }
.zone-sw { width: 14px; height: 14px; border-radius: 3px; background: var(--zone-strong); border: var(--bw) dashed var(--tone-ok-fg); flex: none; }
.zone-sw--soft { background: var(--zone-soft); border-style: dotted; }
.zone-note .zone-soft-txt { color: var(--fg-1); }
.zone-note:has(.zone-row) { flex-direction: column; align-items: stretch; gap: 6px; }
.zone-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); }

/* ===== search combobox ===== */
.search { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.search__box { position: relative; }
.search__ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
.search__input { padding-left: 38px; }
.search__list { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: var(--s-1); list-style: none;
  background: var(--bg-surface); border: var(--bw) solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--shadow-3); max-height: 320px; overflow: auto; }
.search__list [role=option] { padding: 10px var(--s-3); border-radius: 6px; cursor: pointer; font: var(--t-body); color: var(--fg-1); }
.search__list [role=option][aria-selected=true], .search__list [role=option]:hover { background: var(--bg-hover); }
.search__list .search__empty { color: var(--fg-3); cursor: default; }

/* ===== related products strip ===== */
.related { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-8); align-items: center; margin-top: calc(var(--s-2) * -1); }
.related__group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.related__group .caption { margin-right: var(--s-1); }
.pill { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--s-3); border-radius: var(--r-pill); border: var(--bw) solid var(--line-2);
  background: var(--bg-surface); font: 500 13px/1 var(--font-sans); color: var(--fg-1); white-space: nowrap; }
.pill:hover { border-color: var(--line-control); text-decoration: none; background: var(--bg-hover); }
.pill.is-active { border-color: var(--line-strong); font-weight: 700; box-shadow: var(--focus-ring); }

/* ===== frozen columns (price table): product + Giá Kho ===== */
.dtable { --col-product-w: 240px; }
.dtable .col-product { width: var(--col-product-w); min-width: var(--col-product-w); max-width: var(--col-product-w); white-space: normal; }
.dtable .is-sticky-2 { position: sticky; left: var(--col-product-w); z-index: 2; box-shadow: 1px 0 0 var(--line-2), 6px 0 8px -6px rgba(16,17,20,.18); }
.dtable th.is-sticky-2 { z-index: 7; }
.dtable td.col-own-sticky { background: var(--bg-own); }
.dtable tbody tr:hover td.col-own-sticky { background: #fff6b8; }
.dtable .col-own-sticky { min-width: 110px; }
.price--worst { font-weight: 700; text-decoration: underline; text-decoration-color: var(--red-600); text-decoration-thickness: 4px; text-underline-offset: 3px; }
@media (max-width: 700px) { .dtable { --col-product-w: 170px; } }

/* ===== competitor just changed price ===== */
.price--moved { font-weight: 800; }
.move { display: inline-block; margin-right: 3px; font: 800 14px/1 var(--font-sans); cursor: help; }
.move--down { color: var(--dir-down); }   /* competitor cheaper -> blue */
.move--up { color: var(--dir-up); }       /* competitor pricier -> orange */

/* ===== decision options (light-green zone) ===== */
.option { display: flex; flex-direction: column; gap: 4px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); border: var(--bw) solid var(--line-2); background: var(--bg-surface); }
.option--a { border-color: var(--tone-ok-line); background: var(--tone-ok-bg); }
.option__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.option__head b { font: var(--t-h3); color: var(--fg-1); font-variant-numeric: tabular-nums; }
.option__tag { font: var(--t-kicker); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
