:root {
  color-scheme: light;
  --bg: #F4F8FD; --paper: #FFFFFF; --panel: #FFFFFF; --panel-2: #EBF2FC; --ink: #1B2838; --muted: #5B6B7F; --line: #DCE7F5; --line-2: #C4D7EE;
  --accent: #1A73E8; --accent-ink: #FFFFFF; --accent-soft: #E8F0FE; --ring: rgba(26, 115, 232, .16);
  --xanh: #0D9488; --ok-soft: #E6F4F1; --warn: #9A6700; --warn-soft: #FEF6DF; --bad: #C2412D; --bad-soft: #FDECE9; --chip: #EBF2FC; --row: #F0F6FE; --row-hover: #F0F6FE;
  --btn-hover-bg: #F4F8FD; --btn-hover-border: #8FB8EE;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gold: #9A6700; --up: #C2412D; --down: #0D9488;
  --shadow-sm: 0 1px 2px rgba(26, 115, 232, .05);
  --shadow: 0 6px 24px -12px rgba(26, 115, 232, .12);
  --pop: 0 18px 44px -14px rgba(26, 115, 232, .22);
  --glass: rgba(255, 255, 255, .86);
  --hero: radial-gradient(900px 360px at 86% -10%, rgba(56, 189, 248, .18), transparent 62%),
          linear-gradient(135deg, #E8F1FD 0%, #EFF6FF 55%, #E7F4F1 100%);
  --hero-ink: #162B42; --hero-muted: #5B6B7F;
  --ai: #6d28d9; --ai-soft: #f1ebff; --ai-ring: rgba(109, 40, 217, .18);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1440px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E141B; --paper: #151D27; --panel: #151D27; --panel-2: #1B2532; --ink: #E6EDF6; --muted: #94A6BA; --line: #253242; --line-2: #334459;
    --accent: #8AB4F8; --accent-ink: #0B1A2C; --accent-soft: #1C2E46; --ring: rgba(138, 180, 248, .24);
    --xanh: #4FD1C5; --ok-soft: #112D2B; --warn: #F0B452; --warn-soft: #31250C; --bad: #FF8A7A; --bad-soft: #3A1B18; --chip: #1B2532; --row: #1A2431; --row-hover: #1A2431;
    --btn-hover-bg: #1B2532; --btn-hover-border: #8AB4F8;
    --gold: #F0B452; --up: #FF8A7A; --down: #4FD1C5;
    --shadow-sm: none; --shadow: 0 16px 40px -20px rgba(0, 0, 0, .7); --pop: 0 18px 44px -12px rgba(0, 0, 0, .75);
    --glass: rgba(14, 20, 27, .84);
    --hero: radial-gradient(900px 360px at 86% -10%, rgba(79, 209, 197, .12), transparent 62%),
            linear-gradient(135deg, #132030 0%, #162436 55%, #12262A 100%);
    --hero-ink: #E6EDF6; --hero-muted: #94A6BA;
    --ai: #c4b5fd; --ai-soft: #251c3d; --ai-ring: rgba(196, 181, 253, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E141B; --paper: #151D27; --panel: #151D27; --panel-2: #1B2532; --ink: #E6EDF6; --muted: #94A6BA; --line: #253242; --line-2: #334459;
  --accent: #8AB4F8; --accent-ink: #0B1A2C; --accent-soft: #1C2E46; --ring: rgba(138, 180, 248, .24);
  --xanh: #4FD1C5; --ok-soft: #112D2B; --warn: #F0B452; --warn-soft: #31250C; --bad: #FF8A7A; --bad-soft: #3A1B18; --chip: #1B2532; --row: #1A2431; --row-hover: #1A2431;
  --btn-hover-bg: #1B2532; --btn-hover-border: #8AB4F8;
  --gold: #F0B452; --up: #FF8A7A; --down: #4FD1C5;
  --shadow-sm: none; --shadow: 0 16px 40px -20px rgba(0, 0, 0, .7); --pop: 0 18px 44px -12px rgba(0, 0, 0, .75);
  --glass: rgba(14, 20, 27, .84);
  --hero: radial-gradient(900px 360px at 86% -10%, rgba(79, 209, 197, .12), transparent 62%),
          linear-gradient(135deg, #132030 0%, #162436 55%, #12262A 100%);
  --hero-ink: #E6EDF6; --hero-muted: #94A6BA;
  --ai: #c4b5fd; --ai-soft: #251c3d; --ai-ring: rgba(196, 181, 253, .25);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* để kiểu display của từng khối không đè thuộc tính ẩn */
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
  font: 14px/1.5 var(--font-sans); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; }

/* nút */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); border-radius: 12px; padding: 7px 12px; font-size: 13px; font-weight: 500;
  white-space: nowrap; box-shadow: var(--shadow-sm); transition: border-color .15s, color .15s, background .15s; }
.icon-btn:hover { background: var(--btn-hover-bg); border-color: var(--btn-hover-border); color: var(--accent); }
.icon-btn:disabled { opacity: .45; cursor: default; color: var(--ink); border-color: var(--line); background: var(--panel); }
.icon-btn.sq { padding: 7px; min-width: 34px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, #2580F0, #1A73E8);
  color: #FFFFFF; border: 0; border-radius: 12px; padding: 9px 18px; font-family: var(--font-display); font-weight: 600; white-space: nowrap;
  box-shadow: 0 4px 12px -4px rgba(26, 115, 232, .38); transition: filter .15s, transform .15s, box-shadow .15s; }
.primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(26, 115, 232, .45); }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .6; cursor: default; }
.primary.sm { padding: 7px 14px; font-size: 13px; }

/* thanh trên cùng */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 24px;
  background: var(--glass); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); }
/* hàng thẻ menu CỐ ĐỊNH (người dùng 10/11/2026: "các sheet này là cố định"): ngay sau tên thương hiệu, canh trái, cùng
   thứ tự / kiểu ở mọi trang (web/trang_ma.py MENU) -> đổi trang không xê dịch */
.brand { display: flex; align-items: center; gap: 10px; margin-right: 28px; flex-shrink: 0; color: inherit; text-decoration: none; min-width: 0; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #2580F0, #1A73E8); box-shadow: 0 6px 16px -6px rgba(26, 115, 232, .45); }
.brand b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.top-links { display: flex; gap: 2px; min-width: 0; flex-shrink: 1; overflow-x: auto; scrollbar-width: none; margin-right: auto; }
.top-links::-webkit-scrollbar { display: none; }
.dt .acct, .top .acct, .top #theme { flex-shrink: 0; }
@media (max-width: 1320px) { .brand small { display: none; } }
@media (max-width: 1140px) { .acct .who { max-width: 150px; } }
.top-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 13.5px; padding: 6px 10px; border-radius: 8px;
  white-space: nowrap; }
.top-links a:hover { color: var(--accent); background: var(--accent-soft); }
.top-links a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.acct { display: flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; }
.acct .ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-size: 12.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.acct .who { font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.dt .acct .who { color: var(--dt-chu, var(--ink)); }
.dt .acct .icon-btn.sq { min-width: 34px; height: 34px; border-radius: 999px; padding: 0; border-color: var(--dt-vien, var(--line-2)); }
.goi { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--chip); color: var(--muted); }
.goi.tra_phi { background: var(--accent-soft); color: var(--accent); }

/* số liệu tổng (trong hộp Sức khỏe dữ liệu) */
.kpis { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 118px; }
.kpi b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); }

/* ô tìm */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 24px 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
/* bàn làm việc: dải thẻ + công cụ, rồi MỘT thẻ chứa ô tìm, tóm tắt và bảng (bảng chiếm gần hết màn hình) */
/* khung tìm kiếm lớn đầu trang (khối kiểu "search engine"): ô tìm, thời gian, nhóm, lối tắt */
.hero-tim { margin-top: 18px; padding: 14px 16px; }
.ht-nhan { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.hero-tim .search { padding: 0; }
.hero-tim .bar { padding: 5px; }
.hero-tim .bar .primary { padding: 9px 20px; }
.ht-loc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 10px; }
.seg-tg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; gap: 2px; }
.seg-tg button { border: 0; background: none; border-radius: 8px; padding: 5px 14px; font-size: 13px; font-weight: 500;
  color: var(--muted); transition: background .15s, color .15s; }
.seg-tg button:hover { color: var(--ink); }
.seg-tg button[aria-pressed="true"] { background: var(--panel); color: var(--accent); box-shadow: 0 1px 3px rgba(30, 43, 58, .14); }
.ht-tat { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.ht-tat a, .ht-tat .lk { color: var(--accent); text-decoration: none; border: 0; background: none; padding: 0; font: inherit;
  font-weight: 500; }
.ht-tat a:hover, .ht-tat .lk:hover { text-decoration: underline; }
/* lưới thẻ nhóm hàng: biểu tượng + tên + số dòng; tự xuống hàng, không thanh cuộn */
.nhom-luoi.tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 6px; margin-top: 12px;
  padding: 12px 0 0; border-top: 1px solid var(--line); overflow: visible; }
.nhom-luoi .tab { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 10px; padding: 6px 10px; text-align: left; color: var(--ink); white-space: normal; min-width: 0;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .1s; }
.nhom-luoi .tab:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); transform: translateY(-1px); color: var(--ink); }
svg.nhom-ic { width: 26px; height: 26px; padding: 5px; border-radius: 8px; background: var(--chip); color: var(--muted); flex-shrink: 0; }
.nhom-chu { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nhom-chu b { font-size: 12.5px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; }
.nhom-luoi .tab .n { background: none; padding: 0; font-size: 11.5px; color: var(--muted); border-radius: 0; }
.nhom-luoi .tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--accent); }
.nhom-luoi .tab[aria-selected="true"] .nhom-ic { background: var(--accent); color: var(--accent-ink); }
.nhom-luoi .tab[aria-selected="true"] .n { background: none; color: var(--accent); }
/* khối nội dung: nhãn vàng đồng nhỏ + tiêu đề */
.khoi { margin-top: 24px; scroll-margin-top: 70px; }
.khoi-nhan { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.khoi-tieu { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.khoi-tieu h2 { margin: 2px 0 10px; font-family: var(--font-display); font-size: 17px; letter-spacing: -.01em; }
.khoi-tieu small, .khoi-ghi { color: var(--muted); font-size: 12px; }
.khoi-ghi { margin: 8px 2px 0; }
.tc-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tc-o { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--accent)); border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.tc-o span { font-size: 12.5px; color: var(--muted); }
.tc-o b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.tc-o small { color: var(--muted); font-size: 12px; }
button.tc-o { text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.tc-o:hover { border-color: var(--accent); }
.xh-the { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin: 6px 0 10px; overflow-x: auto;
  scrollbar-width: none; }
.xh-the::-webkit-scrollbar { display: none; }
.xh-the button { border: 0; background: none; padding: 6px 0; font-weight: 500; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.xh-the button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.xh { padding: 2px 14px; }
.xh-dong { display: grid; grid-template-columns: 26px minmax(0, 1.7fr) 110px minmax(80px, 1fr) 80px; gap: 12px; align-items: center;
  width: 100%; padding: 9px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit;
  color: var(--ink); cursor: pointer; }
.xh-dong:first-child { border-top: 0; }
.xh-dong:hover .xh-ten b { color: var(--accent); }
.xh-stt { color: var(--muted); font-variant-numeric: tabular-nums; }
.xh-ten { min-width: 0; }
.xh-ten b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xh-ten small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xh-so { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.xh-thanh { height: 7px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.xh-thanh i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.xh-goi { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.xh-rong { padding: 18px 0; color: var(--muted); }
/* hai cột: kết quả rộng bên trái, cột bên hẹp (toàn cảnh + xếp hạng) bên phải */
.bo-cuc { margin-top: 18px; }   /* 10/11/2026: toàn cảnh + xếp hạng chuyển sang trang /tong-quan, bảng kết quả chiếm hết chiều ngang */
.bo-cuc .khoi { margin-top: 0; }
.cot-ben { display: grid; gap: 18px; position: sticky; top: 78px; max-height: calc(100vh - 86px); overflow-y: auto;
  scrollbar-width: none; padding-right: 2px; }
.cot-ben::-webkit-scrollbar { display: none; }
.cot-ben .khoi-tieu h2 { font-size: 14px; margin: 0 0 8px; }
.cot-ben .tc-kpi { grid-template-columns: 1fr 1fr; gap: 8px; }
.cot-ben .tc-o { padding: 9px 11px; border-top-width: 2px; }
.cot-ben .tc-o span, .cot-ben .tc-o small { font-size: 11.5px; }
.cot-ben .tc-o b { font-size: 17px; }
.cot-ben .xh-the { gap: 12px; font-size: 12.5px; margin: 4px 0 6px; }
.cot-ben .xh { padding: 0 14px 0 12px; }
.cot-ben .xh-so { white-space: nowrap; }
.cot-ben .xh-dong { grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; padding: 7px 0; }
.cot-ben .xh-ten b { font-size: 12.5px; }
.cot-ben .xh-ten small { font-size: 11px; }
.cot-ben .xh-so { font-size: 12.5px; }
.cot-ben .xh-thanh, .cot-ben .xh-goi { display: none; }
.cot-ben .khoi-ghi { font-size: 11px; }
@media (max-width: 1100px) { .bo-cuc { grid-template-columns: 1fr; } .cot-ben { position: static; max-height: none; } }
.kq-dau { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ws { margin-top: 0; overflow: visible; }
.search { position: relative; padding: 10px 10px 0; }
.bar { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); border-radius: 12px; flex-wrap: wrap;
  background: var(--panel); padding: 4px; transition: border-color .15s, box-shadow .15s; }
.bar .chips { margin: 0; gap: 4px; }
.bar .chip { font-size: 12.5px; padding: 2px 3px 2px 10px; }
.bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.bar select { border: 0; background: var(--chip); border-radius: 9px; padding: 8px 9px; max-width: 160px; font-weight: 500; font-size: 13px; }
.bar .ic { color: var(--muted); margin-left: 8px; }
.bar input { flex: 1; min-width: 180px; border: 0; background: transparent; padding: 8px 6px; font-size: 14.5px; outline: none; }
.bar .primary { padding: 8px 20px; }
.goi-y { position: absolute; left: 10px; right: 10px; z-index: 30; margin-top: 6px; background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--pop); max-height: min(60vh, 440px);
  overflow-y: auto; padding: 6px 0; }
.goi-y[hidden] { display: none; }
.goi-y .nhom { padding: 8px 14px 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); }
.goi-y .muc { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 14px;
  cursor: pointer; font-size: 14px; }
.goi-y .muc span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goi-y .muc[aria-selected="true"], .goi-y .muc:hover { background: var(--row-hover); }
.goi-y .so { color: var(--muted); font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border-radius: 999px;
  padding: 3px 4px 3px 12px; font-size: 13px; }
.chip b { font-weight: 600; color: var(--accent); }
.chip .op { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 1px 8px; font-size: 11px;
  color: var(--accent); font-weight: 700; }
.chip .x { border: 0; background: transparent; padding: 0 6px; color: var(--muted); font-size: 16px; line-height: 1; }
.chip .x:hover { color: var(--bad); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.hint b { color: var(--ink); font-weight: 600; }
details.adv { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
details.adv summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--accent);
  font-weight: 600; font-size: 13px; list-style: none; }
details.adv summary::-webkit-details-marker { display: none; }
details.adv summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
details.adv[open] summary::before { transform: rotate(45deg); }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.adv-grid label, .auth-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.adv-grid input, .adv-grid select, .auth-form input { border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  border-radius: 10px; padding: 8px 10px; transition: border-color .15s, box-shadow .15s; }
.adv-grid input:focus, .adv-grid select:focus, .auth-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.adv-grid .two { display: flex; gap: 6px; }
.adv-grid .two input { width: 50%; min-width: 0; }
.adv-grid .check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); padding-top: 20px; }
.adv-grid .check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* thẻ nhóm hàng */
/* Bảng sức khỏe dữ liệu: gói mới nạp 24h, tỷ lệ nhóm hàng (bánh), top 5 cơ sở (cột) — bấm là lọc bảng bên dưới */
.sk { margin-top: 16px; padding: 0; }
.sk summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sk summary::-webkit-details-marker { display: none; }
.sk summary::before { content: "▸"; color: var(--muted); font-size: 12px; }
.sk[open] summary::before { content: "▾"; }
.sk summary small { font-weight: 400; color: var(--muted); }
.sk-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 18px; padding: 0 16px 16px; }
.sk-box h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sk-box .big { font-size: 26px; font-weight: 700; line-height: 1.1; }
.sk-box .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.sk-moi ul { list-style: none; padding: 0; margin: 10px 0 0; }
.sk-moi li { font-size: 13px; margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--line-2); }
.sk button.link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.sk-donut { display: flex; gap: 14px; align-items: center; }
.sk-donut svg { width: 124px; height: 124px; flex-shrink: 0; }
.sk-donut path[data-tab] { cursor: pointer; }
.sk-donut path:hover { opacity: .75; }
.sk-leg { font-size: 12px; display: grid; gap: 4px; min-width: 0; flex: 1; }
.sk-leg button { border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.sk-leg button[disabled] { cursor: default; color: var(--muted); }
.sk-leg i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; display: inline-block; }
.sk-leg .n { color: var(--muted); margin-left: auto; white-space: nowrap; }
.sk-bars { display: grid; gap: 7px; }
.sk-bar { border: 0; background: none; padding: 0; font: inherit; text-align: left; cursor: pointer; display: grid; gap: 3px; color: var(--ink); }
.sk-bar .ten { font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.sk-bar .ten span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-bar .ten span:last-child { white-space: nowrap; color: var(--muted); }
.sk-bar .thanh { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.sk-bar .thanh i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.sk-bar small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-bar:hover .ten span:first-child { color: var(--accent); }
.sk .seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.sk .seg button { border: 0; background: none; padding: 3px 8px; font: inherit; font-size: 12px; cursor: pointer; color: var(--muted); }
.sk .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@media (max-width: 900px) { .sk-grid { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-top: 20px; padding: 2px 2px 6px; scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent; }
.tab { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 7px 14px; white-space: nowrap; font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: color .15s, border-color .15s, background .15s; }
.tab:hover { color: var(--ink); border-color: var(--line-2); }
.tab .n { font-size: 11.5px; background: var(--chip); color: var(--muted); border-radius: 999px; padding: 1px 7px;
  font-variant-numeric: tabular-nums; }
.tab .n:empty { display: none; }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tab[aria-selected="true"] .n { background: color-mix(in srgb, var(--accent-ink) 16%, transparent); color: inherit; }

/* tóm tắt kết quả */
.summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; }
.notice { width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: var(--warn);
  font-size: 12.5px; padding: 0; background: none; }
.notice { line-height: 1.5; }
/* nút Đăng nhập / Đăng ký miễn phí trong dòng thông báo + dòng hạn mức: đủ chỗ thở, cùng hàng chữ (đặc tả 09) */
.notice .icon-btn { padding: 4px 12px; font-size: 12px; line-height: 1.3; min-height: 0; box-shadow: none; vertical-align: middle; }
.quota { width: 100%; font-size: 12.5px; color: var(--muted); }
.quota:empty { display: none; }
.quota b { color: var(--ink); }
.quota { line-height: 1.7; }
.quota button.link { border: 0; background: none; padding: 1px 2px; margin: 0 1px; font: inherit; font-weight: 600;
  color: var(--accent); vertical-align: baseline; line-height: inherit; }
.count { font-size: 22px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.count small { font-family: var(--font-sans); }
.count small { font-size: 12px; color: var(--muted); font-weight: 400; }
.count small.chua-ro { color: var(--warn); }
.prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.gia-dong b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.gia-dong small { font-size: 11.5px; }
.gia-khac summary { cursor: pointer; color: var(--accent); font-size: 12.5px; list-style: none; }
.gia-khac summary::-webkit-details-marker { display: none; }
.gia-khac[open] { flex-basis: 100%; display: grid; gap: 2px; }
.price { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: 12.5px;
  box-shadow: var(--shadow-sm); }
.price .u { color: var(--accent); font-weight: 600; }
.price .u small { color: var(--muted); font-weight: 400; }
.price .pv { display: flex; gap: 14px; margin-top: 2px; }
.price .pv span { display: flex; flex-direction: column; line-height: 1.3; }
.price .pv i { font-style: normal; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.price b { font-weight: 600; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: nowrap; gap: 4px; flex-shrink: 0; }
.toolbar .icon-btn { padding: 6px 9px; font-size: 13px; }
.toolbar .n { font-size: 11px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; }
.toolbar .n:empty { display: none; }
@media (max-width: 1180px) { .toolbar .lbl { display: none; } }

/* bảng */
.table-wrap { overflow: auto; height: max(380px, calc(100vh - 150px)); border-top: 1px solid var(--line);
  border-radius: 0 0 16px 16px; transition: opacity .15s; }
.summary:not(:has(> :not([hidden]):not(:empty))) + .sua-tren-bang:empty + .table-wrap { border-top: 0; }
.table-wrap.busy { opacity: .55; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
thead th { position: sticky; top: 0; z-index: 5; background: var(--panel-2); text-align: left; font-weight: 600;
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line);
  padding: 11px 12px; white-space: nowrap; }
thead th .th { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: inherit;
  font: inherit; text-transform: inherit; letter-spacing: inherit; }
thead th .th:hover { color: var(--accent); }
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; max-width: 360px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--row-hover); }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.money { font-weight: 600; }
td.stt { color: var(--muted); text-align: right; font-size: 12px; }
td.g small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; font-weight: 400; }
td.g b.t { display: -webkit-box; font-weight: 600; }
#table td.g:has(> b.t) { min-width: 230px; }   /* cột Mặt hàng luôn đủ rộng, không bị bóp */
#table td.g:has(> span.clip) { min-width: 150px; }
td.g .link[data-ma] { font-size: 11px; padding: 0 5px; }
td.xu-o b { display: block; font-weight: 600; } td.xu-o b.len { color: var(--up); } td.xu-o b.xuong { color: var(--down); }
tr.mo-duoc { cursor: pointer; }
tr.dang-mo td { background: var(--accent-soft) !important; }
tr.ct td { background: var(--panel-2); padding: 12px 16px 14px 46px; max-width: none; }
.ct-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 18px; font-size: 13px; }
.ct-luoi span { display: block; color: var(--muted); font-size: 11.5px; }
.ct-dai { grid-column: span 2; }
.ct-gon { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; cursor: pointer; }
.ct-gon.mo { -webkit-line-clamp: unset; }
.ct-nut { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
td .clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link { color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-style: dotted; background: none;
  border: 0; padding: 0; font: inherit; text-align: left; }
.link[data-ma] { font-family: var(--mono); font-size: 12px; text-decoration: none; background: var(--accent-soft);
  border-radius: 6px; padding: 2px 7px; }
.link[data-ma]:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.badge { display: inline-block; font-size: 11px; font-weight: 500; border-radius: 999px; padding: 1px 8px;
  background: var(--chip); color: var(--muted); white-space: nowrap; }
.warn { background: var(--warn-soft); color: var(--warn); }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .sua, .sua-tren-bang .sua { color: var(--ink); font-size: 15px; margin-bottom: 10px; }
.sua-tren-bang:empty { display: none; }
.sua-tren-bang { margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sua-tren-bang .sua { margin: 0; }
.sua .link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600;
  text-decoration: underline; cursor: pointer; }
.sua .muted { color: var(--muted); font-size: 13px; }
.goi-y .sua-tren { padding: 8px 14px 4px; font-size: 13px; color: var(--ink); }
.goi-y .sua-tren b { color: var(--accent); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 13px; }

/* menu nổi, hộp thoại */
.menu { position: fixed; z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--pop); padding: 6px; min-width: 200px; animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.menu button:hover { background: var(--chip); }
.menu label { display: flex; gap: 8px; align-items: center; padding: 5px 8px; font-size: 13px; cursor: pointer; border-radius: 8px; }
.menu label:hover { background: var(--chip); }
.menu input { accent-color: var(--accent); }
.cols-menu { max-height: 60vh; overflow: auto; }
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--ink);
  width: min(980px, 94vw); padding: 0; box-shadow: var(--pop); }
dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
#dlgAuth { width: min(460px, 94vw); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; flex: 1; }
.dlg-body { padding: 16px 20px 20px; max-height: 75vh; overflow: auto; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); } .chart .lbl { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .pt { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.auth-tabs { display: flex; gap: 4px; background: var(--chip); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 7px 10px; font-weight: 500; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.auth-form { display: grid; gap: 12px; }
.auth-form .primary { padding: 11px; margin-top: 2px; }
.auth-err { color: var(--bad); font-size: 13px; min-height: 1em; }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 24px; border-top: 1px solid var(--line); }
footer p { max-width: 760px; margin: 0 auto; }

/* Tìm bằng AI: panel bên phải (màn rộng đứng cạnh bảng, màn hẹp phủ lên) */
.ai-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 10px;
  padding: 9px 14px; font-weight: 600; white-space: nowrap; color: var(--ai); background: var(--ai-soft);
  transition: border-color .15s; }
.ai-btn:hover, .ai-btn[aria-expanded="true"] { border-color: var(--ai); }
.ai-btn .ngan { display: none; }
.ai-panel { position: fixed; z-index: 35; top: 0; right: 0; bottom: 0; width: 400px; display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--pop); }
@media (min-width: 1200px) { body.ai-mo { padding-right: 400px; } .ai-panel { box-shadow: none; } }
@media (max-width: 1199px) { .ai-panel { z-index: 48; width: min(400px, 100vw); } }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ai-head h2 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
#aiClose { font-size: 20px; line-height: 1; font-weight: 400; }
.ai-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed, #0ea5e9); }
.ai-quota { font-size: 12px; font-weight: 600; color: var(--ai); background: var(--ai-soft); border-radius: 999px;
  padding: 2px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-quota:empty { display: none; }
.ai-quota.het { color: var(--bad); background: var(--chip); }
.ai-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.ai-intro p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.ai-ex { display: block; width: 100%; text-align: left; border: 1px dashed var(--line-2); background: var(--panel-2);
  border-radius: 10px; padding: 8px 11px; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.ai-ex:hover { border-color: var(--ai); color: var(--ai); }
.ai-q { align-self: flex-end; max-width: 88%; background: var(--accent); color: var(--accent-ink); border-radius: 14px 14px 4px 14px;
  padding: 8px 12px; font-size: 13.5px; overflow-wrap: anywhere; }
.ai-a { border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; background: var(--panel-2); font-size: 13px; }
.ai-a h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 11.5px; font-weight: 600; color: var(--ai);
  text-transform: uppercase; letter-spacing: .05em; }
.ai-a.cu { opacity: .7; }
.ai-a.loi { color: var(--bad); background: var(--panel); }
.ai-a.cho { color: var(--muted); }
.ai-a.cho::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border-radius: 50%;
  border: 2px solid var(--ai); border-right-color: transparent; animation: xoay .7s linear infinite; vertical-align: -1px; }
@keyframes xoay { to { transform: rotate(360deg); } }
.ai-hieu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-hieu li { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 5px 4px 5px 10px; min-height: 36px; }
.ai-hieu .k { color: var(--muted); font-size: 12px; width: 86px; flex-shrink: 0; }
.ai-hieu .v { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ai-hieu .op { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 1px 8px; font-size: 11px;
  color: var(--accent); font-weight: 700; }
.ai-hieu .x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 8px; }
.ai-hieu .x:hover { color: var(--bad); }
.ai-note { margin: 8px 0 0; color: var(--warn); font-size: 12.5px; }
.ai-res { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-weight: 600; }
.ai-res:empty { display: none; }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px 6px; border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 11px;
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.4; height: 62px; }
.ai-form textarea:focus { outline: none; border-color: var(--ai); box-shadow: 0 0 0 3px var(--ai-ring); }
.ai-form .primary { background: var(--ai); color: #fff; box-shadow: 0 4px 12px -4px var(--ai-ring); }
:root[data-theme="dark"] .ai-form .primary { color: #1e1433; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ai-form .primary { color: #1e1433; } }
.ai-foot { margin: 0; padding: 0 16px 12px; color: var(--muted); font-size: 11.5px; }

/* toàn màn hình: chỉ còn bảng */
.fs .dt, .fs .top, .fs footer, .fs .hero-tim, .fs #toan-canh, .fs #xep-hang { display: none; }
.fs main { max-width: none; }
.fs .table-wrap { height: calc(100vh - 190px); }

/* hộp Tìm nâng cao 3 cột: nhóm hàng | trường tìm (có ví dụ) | ô nhập + thẻ + mẹo + bộ lọc khác */
.dlg-adv { width: min(980px, calc(100vw - 32px)); padding: 0; }
.adv3 { display: grid; grid-template-columns: 170px 220px 1fr; gap: 14px; padding: 14px 18px; max-height: 70vh; overflow: auto; }
.adv-lbl { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.adv-col h3 { margin: 0 0 8px; font-size: 16px; }
.adv-ds { display: grid; gap: 2px; }
.adv-ds button, .adv-truong button { border: 0; background: none; text-align: left; font: inherit; color: var(--ink);
  border-radius: 9px; padding: 7px 10px; cursor: pointer; }
.adv-ds button:hover, .adv-truong button:hover { background: var(--row-hover); }
.adv-ds button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.adv-truong { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; align-self: start; }
.adv-truong .adv-lbl { margin: 6px 6px 4px; }
.adv-truong button { display: block; width: 100%; padding: 6px 8px; }
.adv-truong button small { display: block; color: var(--muted); font-size: 11.5px; }
.adv-truong button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.adv-truong button[aria-pressed="true"] small { color: inherit; opacity: .8; }
.adv-nhap { display: flex; gap: 6px; margin-bottom: 12px; }
.adv-nhap input { flex: 1; min-width: 0; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  border-radius: 10px; padding: 8px 10px; }
.adv-nhap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
#advChips { margin: 0 0 12px; min-height: 8px; }
#advChips:empty::before { content: "Chưa có từ khóa"; color: var(--muted); font-size: 12.5px; }
.adv-vd { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px;
  display: grid; gap: 4px; margin-bottom: 12px; }
.adv-vd small, .adv-ghi { color: var(--muted); font-size: 12px; }
.adv-ghi { margin: 4px 0 0; }
.adv-vd .sai { color: var(--bad); } .adv-vd .dung { color: var(--accent); }
.op-mau { font-size: 11px; font-weight: 700; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.dlg-adv .adv-grid { margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.adv-chan { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.dlg-sk { width: min(1100px, calc(100vw - 32px)); padding: 0; }
.dlg-sk .dlg-head h2 small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.dlg-sk .sk-grid { padding: 0; }
@media (max-width: 860px) {
  .adv3 { grid-template-columns: 1fr; }
  .adv-ds { grid-auto-flow: column; overflow-x: auto; }
  .adv-truong { display: flex; flex-wrap: wrap; gap: 4px; }
  .adv-truong button { width: auto; } .adv-truong button small, .adv-truong .adv-lbl { display: none; }
}

/* Điện thoại: mỗi dòng thành một thẻ, không trượt ngang */
@media (max-width: 700px) {
  .top { padding: 10px 16px; gap: 8px; flex-wrap: wrap; }
  .brand small, .acct .who { display: none; }
  .top-links { order: 3; flex-basis: 100%; }
  .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { min-width: 0; padding: 8px 12px; }
  .kpi.wide { grid-column: 1 / -1; order: 9; }
  .kpi b { font-size: 16px; }
  main { padding: 0 16px 32px; }
  .toolbar { overflow-x: auto; }
  .hero-tim { padding: 12px; }
  .nhom-luoi.tabs { grid-template-columns: 1fr 1fr; gap: 6px; }
  .nhom-luoi .tab { padding: 7px 9px; gap: 8px; }
  svg.nhom-ic { width: 26px; height: 26px; padding: 5px; }
  .seg-tg { width: 100%; } .seg-tg button { flex: 1; padding: 5px 4px; }
  .tc-kpi { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tc-o b { font-size: 19px; }
  .xh-dong { grid-template-columns: 22px minmax(0, 1fr) 84px; gap: 8px; }
  .xh-thanh, .xh-goi { display: none; }
  .top-links { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin: 0 -16px; padding: 0 12px; }
  .top-links::-webkit-scrollbar { display: none; }
  .top-links a { padding: 6px 8px; font-size: 13px; }
  .ws { background: transparent; border: 0; box-shadow: none; }
  .search { padding: 0; }
  .summary { padding: 10px 2px; }
  .top .lbl { display: none; }
  .bar { flex-wrap: wrap; }
  .bar select { max-width: none; flex-basis: 100%; }
  .bar .ic { display: none; }
  .toolbar { margin-left: 0; }
  .table-wrap { height: auto; max-height: none; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 8px 0;
    box-shadow: var(--shadow-sm); }
  tbody tr:last-child td { border-bottom: 0; }
  tbody tr:hover td { background: none; }
  tbody td { border: 0; padding: 4px 14px; max-width: none; display: flex; gap: 10px; }
  tbody td::before { content: attr(data-label); color: var(--muted); font-size: 12px; min-width: 108px; flex-shrink: 0; }
  td.num { text-align: left; } td.stt { display: none; }
  td.money::before { font-weight: 400; }
  .ai-btn { padding: 9px 12px; } .ai-btn .dai { display: none; } .ai-btn .ngan { display: inline; }
  .ai-panel { width: 100%; border-left: 0; }
  body.ai-mo { overflow: hidden; }
}

/* ================= TRANG MUA SẮM (10/11/2026: "tra giá nhanh, ưng mắt, đẹp hiện đại, giống đi shopping, mẫu đẹp tinh giản") */
.hero-tim { margin-top: 22px; padding: 18px 20px 16px; border-radius: 22px; border: 1px solid var(--line);
  box-shadow: 0 8px 28px -14px rgba(26, 115, 232, .16); }
.hero-tim .bar { padding: 6px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--panel); min-height: 58px; }
.hero-tim .bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px var(--ring); }
.hero-tim .bar input { font-size: 16px; }
.hero-tim .bar select { border-radius: 11px; }
.hero-tim .bar .primary { border-radius: 12px; padding: 11px 24px; font-size: 14.5px; }
.ai-btn { border-radius: 12px !important; }
.seg-tg { border-radius: 999px; padding: 3px; }
.seg-tg button { border-radius: 999px; padding: 6px 16px; }
.nhom-luoi.tabs { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; }
.nhom-luoi.tabs::-webkit-scrollbar { display: none; }
.nhom-luoi .tab { width: auto; flex-shrink: 0; border-radius: 999px; padding: 5px 12px 5px 5px; gap: 7px; border: 1px solid var(--line); box-shadow: none; }
.nhom-luoi .tab:hover { transform: none; border-color: var(--line-2); background: var(--panel-2); box-shadow: none; }
.nhom-luoi .nhom-chu { display: flex; flex-direction: row; align-items: baseline; gap: 6px; white-space: nowrap; }
.nhom-luoi .nhom-chu b { font-size: 13.5px; font-weight: 600; }
.nhom-luoi .tab .n { font-size: 11.5px; }
svg.nhom-ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; }
.nhom-luoi .tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.nhom-luoi .tab[aria-selected="true"] .n { color: color-mix(in srgb, var(--panel) 70%, transparent); }
.nhom-luoi .tab[aria-selected="true"] .nhom-ic { background: color-mix(in srgb, var(--panel) 16%, transparent); color: var(--panel); }
.kq-dau { align-items: center; margin-bottom: 12px; }
.seg-vx { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; gap: 2px; flex-shrink: 0; }
.seg-vx button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; border-radius: 8px; padding: 5px 10px;
  font-size: 13px; font-weight: 500; color: var(--muted); }
.seg-vx button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 28, 38, .14); }
.sort-nhanh { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 500;
  flex-shrink: 0; cursor: pointer; }
.sort-nhanh:hover { border-color: var(--accent); }
/* dạng thẻ: khung kết quả trong suốt, tóm tắt giá thành dải nhãn */
.ws.ws-luoi { background: transparent; border: 0; box-shadow: none; }
.ws.ws-luoi .summary { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; }
.ws.ws-luoi .summary:not(:has(> :not([hidden]):not(:empty))) { display: none; }
.luoi-sp { display: grid; gap: 8px; }
.luoi-sp.busy { opacity: .55; }
.sp { display: grid; align-items: center; gap: 18px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  grid-template-columns: minmax(0, 2.5fr) minmax(150px, 1fr) minmax(120px, .8fr) minmax(0, 1.9fr) minmax(118px, .75fr) 14px;
  padding: 14px 16px; cursor: pointer; box-shadow: 0 6px 24px -12px rgba(26, 115, 232, .12); transition: box-shadow .16s, border-color .16s, transform .16s; }
.sp:hover, .sp:focus-visible { border-color: var(--line-2); outline: none; transform: translateY(-1px);
  box-shadow: 0 12px 28px -14px rgba(26, 115, 232, .22); }
.c-hang { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sp-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); }
.sp-ic svg.i { width: 20px; height: 20px; }
.c-hang-chu { min-width: 0; display: grid; gap: 4px; }
.sp-ten { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; letter-spacing: -.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-ma { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.sp-ma > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sp-ma .ma-tho { font-family: var(--mono); font-size: 12px; }
.sp-gia { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; }
.sp-gia b { font-size: 21px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.sp-gia span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.sp-gia em { max-width: 100%; font-style: normal; font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 7px; padding: 1px 8px; }
.c-gia em { margin-top: 2px; }
.sp-so { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.sp-so small { flex-basis: 100%; font-size: 11.5px; }
.sp-so .tag { font-weight: 700; font-size: 12.5px; border-radius: 7px; padding: 2px 8px; background: var(--chip); color: var(--ink);
  font-variant-numeric: tabular-nums; }
.sp-so .tag.len { background: color-mix(in srgb, var(--up) 13%, var(--panel)); color: var(--up); }
.sp-so .tag.xuong { background: color-mix(in srgb, var(--down) 15%, var(--panel)); color: var(--down); }
.sp-ben { display: grid; gap: 5px; margin: 0; font-size: 13px; min-width: 0; }
.sp-ben div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px; align-items: baseline; }
.sp-ben dt { color: var(--muted); font-size: 11.5px; }
.sp-ben dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sp-chan { display: grid; gap: 3px; justify-items: end; text-align: right; font-size: 12px; color: var(--muted); }
.sp-chan b { color: var(--ink); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-chan b small { color: var(--muted); font-weight: 500; font-size: 12px; }
.sp-chan span { white-space: nowrap; }
.c-mo { color: var(--line-2); font-size: 22px; line-height: 1; transition: color .15s, transform .15s; }
.sp:hover .c-mo { color: var(--accent); transform: translateX(2px); }
@media (max-width: 1180px) {
  .sp { grid-template-columns: minmax(0, 2.2fr) minmax(140px, 1fr) minmax(0, 1.7fr) minmax(110px, .8fr) 12px; }
  .sp .c-so { display: none; }
}
.luoi-rong { grid-column: 1 / -1; display: grid; gap: 6px; place-items: center; text-align: center; padding: 56px 16px;
  background: var(--panel); border: 1px dashed var(--line-2); border-radius: 20px; color: var(--muted); }
.luoi-rong b { color: var(--ink); font-size: 16px; }
.dlg-sp { width: min(860px, calc(100vw - 32px)); border: 0; border-radius: 22px; padding: 0; background: var(--panel); color: var(--ink);
  box-shadow: var(--pop); }
.dlg-sp::backdrop { background: rgba(10, 16, 24, .45); backdrop-filter: blur(3px); }
.dlg-sp .dlg-head { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-sp .dlg-head h2 { font-size: 16px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-sp .dlg-body { padding: 18px 20px 20px; max-height: calc(100vh - 140px); overflow: auto; }
.sp.sp-lon { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; cursor: default; border: 0; padding: 0 0 16px; border-radius: 0;
  border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.sp.sp-lon:hover { transform: none; box-shadow: none; }
.sp.sp-lon .c-hang { grid-column: 1 / -1; } .sp.sp-lon .sp-ten { -webkit-line-clamp: unset; font-size: 18px; }
.sp.sp-lon .sp-gia b { font-size: 30px; } .sp.sp-lon .c-so { display: flex; } .sp.sp-lon .c-mo { display: none; }
.sp.sp-lon .sp-chan { justify-items: start; text-align: left; } .sp.sp-lon .sp-ben { grid-column: 1 / -1; }
.pager { margin-top: 18px; }
@media (max-width: 700px) {
  .hero-tim { padding: 12px; border-radius: 18px; }
  .nhom-luoi.tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 12px -12px 0; padding: 12px 12px 2px; }
  .nhom-luoi.tabs::-webkit-scrollbar { display: none; }
  .nhom-luoi .tab { flex-shrink: 0; }
  .sp { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px; border-radius: 16px; }
  .sp .c-hang { grid-column: 1 / -1; } .sp .c-so { display: flex; justify-content: flex-end; text-align: right; }
  .sp .c-so small { display: none; } .sp .c-ben { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
  .sp .c-chan { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
  .sp .c-mo { display: none; } .sp-ic { width: 34px; height: 34px; border-radius: 10px; }
  .sp.sp-lon { grid-template-columns: 1fr; }
  .kq-dau .toolbar { width: 100%; }
  .sp-gia b { font-size: 24px; }
  .seg-tg button { white-space: nowrap; padding: 6px 8px; font-size: 12.5px; }
}

/* thanh vị trí giá */
.vtg { border: 1px solid var(--line); background: var(--panel-2); border-radius: 16px; padding: 14px 16px 12px; margin: 0 0 16px; }
.vtg-chua { color: var(--muted); font-size: 13px; }
.vtg-dau { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 30px; }
.vtg-dau b { font-size: 14px; }
.vtg-ket { font-weight: 600; font-size: 13.5px; } .vtg-ket.re { color: var(--down); } .vtg-ket.dat { color: var(--up); }
.vtg-thanh { position: relative; height: 8px; border-radius: 99px; margin: 0 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--down) 55%, var(--panel)), color-mix(in srgb, var(--gold) 45%, var(--panel)) 50%, color-mix(in srgb, var(--up) 55%, var(--panel))); }
.vtg-tv { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.vtg-diem { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--panel);
  border: 4px solid var(--ink); box-shadow: 0 2px 8px rgba(20, 28, 38, .3); }
.vtg-diem.re { border-color: var(--down); } .vtg-diem.dat { border-color: var(--up); }
.vtg-diem em { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-style: normal; font-weight: 700; font-size: 12.5px;
  white-space: nowrap; background: var(--ink); color: var(--panel); border-radius: 7px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.vtg-moc { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.vtg-moc b { display: block; color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.vtg-moc .giua { text-align: center; } .vtg-moc .phai { text-align: right; }
.vtg small { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; }
/* đường + badge Trung vị / Trung bình / Đang xem: xem khối "Biểu đồ lịch sử giá" ở cuối tệp (đặc tả 36 H4) */

.ct-nut-tren { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; border: 0; }
.ct-nut-tren .icon-btn { border-radius: 999px; padding: 7px 14px; }
.ct-nut-tren .icon-btn.chinh { border: 0; background: linear-gradient(135deg, #2580F0, #1A73E8); color: #FFFFFF; box-shadow: 0 4px 12px -4px rgba(26, 115, 232, .38); }
.ct-nut-tren .icon-btn.chinh:hover { background: linear-gradient(135deg, #2580F0, #1A73E8); filter: brightness(1.06); color: #FFFFFF; transform: translateY(-1px); }
tr.ct .ct-nut-tren { margin: 2px 0 12px; }

/* ===== điều kiện tìm: hàng riêng, nối hoặc / và nổi bật */
.hero-tim .bar { flex-wrap: nowrap; }
.dk-tim { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.dk-tim .chips { margin: 0; gap: 8px; align-items: center; }
.nhom-dk { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); }
.nhom-dk-ten { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--muted); background: var(--chip);
  border-radius: 9px; padding: 4px 9px; }
.dk-tim .chip { background: var(--accent-soft); color: var(--ink); font-weight: 600; font-size: 13px; padding: 4px 4px 4px 11px; border-radius: 10px; }
.dk-tim .chip .x { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; padding: 0; }
.dk-tim .chip .x:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.noi { border: 0; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: transform .1s, filter .15s; }
.noi:hover { filter: brightness(1.08); transform: translateY(-1px); }
.noi.hoac { background: #1A73E8; color: #fff; }
.noi.va { background: #C2412D; color: #fff; }
.noi-cd { display: inline-grid; place-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .06em; background: var(--ink); color: var(--panel); cursor: help; }
.dk-cau { margin: 10px 2px 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.dk-cau b { color: var(--ink); } .dk-cau u { text-decoration: none; font-weight: 800; color: var(--ink); text-transform: uppercase; font-size: 11.5px; letter-spacing: .05em; }
.dk-cau .lk { border: 0; background: none; padding: 0; margin-left: 6px; color: var(--bad); font: inherit; font-weight: 600; cursor: pointer; }
.dk-cau .lk:hover { text-decoration: underline; }
.mo-rong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--gold) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); font-size: 13px; }
.mo-rong span { font-weight: 600; margin-right: 4px; }
.mo-rong button { border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); background: var(--panel); border-radius: 999px; padding: 6px 13px;
  font-size: 13px; font-weight: 500; cursor: pointer; }
.mo-rong button:hover { border-color: var(--gold); color: var(--gold); }

/* ===== nhóm hàng: lưới ô gọn, mọi nhóm hiện đủ, màu riêng */
.hero-tim { container-type: inline-size; container-name: khung-tim; }
.nhom-luoi.tabs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; overflow: visible; flex-wrap: initial; }
.nhom-luoi .tab { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--panel); min-width: 0; text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .12s, background .15s; }
.nhom-luoi .tab:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, var(--line));
  box-shadow: 0 10px 22px -16px color-mix(in srgb, var(--c) 70%, transparent); background: var(--panel); }
.nhom-luoi .nhom-chu { display: grid; gap: 1px; min-width: 0; white-space: normal; }
.nhom-luoi .nhom-chu b { font-size: 12.5px; font-weight: 700; line-height: 1.25; overflow: hidden; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nhom-luoi .tab .n { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
svg.nhom-ic { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: color-mix(in srgb, var(--c) 13%, var(--panel)); color: var(--c); }
.nhom-luoi .tab[aria-selected="true"] { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 72%, #000)); border-color: transparent;
  color: #fff; box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--c) 85%, transparent); }
.nhom-luoi .tab[aria-selected="true"] .n { color: rgba(255, 255, 255, .82); }
.nhom-luoi .tab[aria-selected="true"] .nhom-ic { background: rgba(255, 255, 255, .18); color: #fff; }
@container khung-tim (max-width: 1260px) { .nhom-luoi.tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@container khung-tim (max-width: 700px) { .nhom-luoi.tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nhom-luoi .tab { overflow: hidden; } .nhom-luoi .nhom-chu, .nhom-luoi .nhom-chu b, .nhom-luoi .tab .n { min-width: 0; max-width: 100%; }
.nhom-luoi .tab .n { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .nhom-luoi.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; overflow: visible; margin: 12px 0 0; padding: 12px 0 0; }
  .nhom-luoi .tab { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 8px 4px; gap: 4px; }
  .nhom-luoi .nhom-chu b { font-size: 11.5px; white-space: normal; } .nhom-luoi .tab .n { font-size: 10.5px; }
  svg.nhom-ic { width: 28px; height: 28px; padding: 6px; }
  .hero-tim .bar { flex-wrap: wrap; }
}

/* chỉ dẫn thêm điều kiện */
.them-tu { border: 1px dashed var(--line-2); background: none; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
  color: var(--accent); cursor: pointer; }
.them-tu:hover { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.them-dk { border: 0; border-radius: 12px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; color: #FFFFFF;
  background: linear-gradient(135deg, #2580F0, #1A73E8); box-shadow: 0 4px 12px -4px rgba(26, 115, 232, .38); }
.them-dk:hover { filter: brightness(1.1); }
.menu-them { min-width: 260px; }
.menu-them .menu-tieu { padding: 6px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-them button small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.meo-tim { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.meo-buoc { display: inline-flex; align-items: center; gap: 7px; }
.meo-buoc b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--accent-soft); color: var(--accent); }
.meo-buoc kbd { font: 600 11px var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--panel); color: var(--ink); }
.meo-thu { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.meo-thu button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.meo-thu button:hover { border-color: var(--accent); color: var(--accent); }
.bar.nhac { animation: nhac .9s ease; }
@keyframes nhac { 0%, 100% { box-shadow: 0 0 0 0 var(--ring); } 35% { box-shadow: 0 0 0 7px var(--ring); border-color: var(--accent); } }
@media (prefers-reduced-motion: reduce) { .bar.nhac { animation: none; } }
@media (max-width: 700px) { .meo-buoc:nth-child(3) { display: none; } .meo-thu { margin-left: 0; } }

/* biểu đồ xu hướng trong hộp chi tiết */
.xh-bieu { border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px 12px; margin: 0 0 16px; background: var(--panel); }
.xh-rong { color: var(--muted); font-size: 13px; padding: 6px 0; }
.xh-dau { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; margin-bottom: 6px; }
.xh-dau b { display: block; font-size: 15px; } .xh-dau small { color: var(--muted); font-size: 12px; }
.xh-chu-thich { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); align-items: center; }
.xh-chu-thich span { display: inline-flex; align-items: center; gap: 6px; }
.xh-chu-thich i { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.xh-chu-thich i.p50 { height: 3px; background: var(--xanh); } .xh-chu-thich i.dai { background: color-mix(in srgb, var(--xanh) 22%, var(--panel)); border: 1px solid color-mix(in srgb, var(--xanh) 40%, var(--panel)); }
.xh-chu-thich i.gia { height: 0; border-top: 2px dashed var(--up); }
.xh-svg { width: 100%; height: auto; display: block; }
.xh-svg .luoi { stroke: var(--line); stroke-dasharray: 4 5; }
.xh-svg .truc, .xh-svg .thang { font: 11.5px var(--mono); fill: var(--muted); }
.xh-svg .thang.chon { fill: var(--xanh); font-weight: 700; }
.xh-svg .dai { fill: color-mix(in srgb, var(--xanh) 16%, transparent); stroke: color-mix(in srgb, var(--xanh) 35%, transparent); stroke-width: 1; }
.xh-svg .p50 { fill: none; stroke: var(--xanh); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.xh-svg .doc { stroke: var(--xanh); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: .7; }
.xh-svg .gia-nay { stroke: var(--up); stroke-width: 1.5; stroke-dasharray: 6 5; opacity: .8; }
.xh-svg .gia-nay-chu { font: 600 11.5px var(--mono); fill: var(--up); }
.xh-svg .diem { cursor: pointer; outline: none; }
.xh-svg .vung-bam { fill: transparent; }
.xh-svg .cham { fill: var(--panel); stroke: var(--xanh); stroke-width: 2.6; transition: r .12s; }
.xh-svg .diem:hover .cham, .xh-svg .diem:focus-visible .cham { r: 7.5; }
.xh-svg .diem.chon .cham { fill: var(--xanh); }
.xh-svg .nhan { font: 600 11.5px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; }
.xh-ky { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 10px 12px; margin-top: 6px; border-radius: 12px;
  background: color-mix(in srgb, var(--xanh) 8%, var(--panel)); font-size: 13px; color: var(--muted); }
.xh-ky > b { color: var(--xanh); font-size: 14px; } .xh-ky span b { color: var(--ink); }
.xh-ky .lk { margin-left: auto; border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.xh-ky .lk:hover { text-decoration: underline; }
.xh-ghi { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; }

/* gợi ý khi gõ: nhãn nhóm rõ ràng */
.goi-y .nhom { padding: 10px 12px 4px; text-transform: none; letter-spacing: 0; }
.goi-y .nhom span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, var(--panel)); border-radius: 999px; padding: 4px 11px 4px 8px; }
.goi-y .nhom svg.i { width: 14px; height: 14px; }
.goi-y .nhom:not(:first-child) { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
.goi-y .muc { font-size: 14px; color: var(--ink); }
.goi-y .muc[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--accent); }

/* ---------------------------------------------------------------- DASHBOARD phân tích kết quả (đặc tả 09, 13/11/2026)
   Bento: 4 thẻ KPI nền pastel · 2 cột (tỉnh, mặt hàng) · 3 cột (thời gian, nhà thầu, chủ đầu tư). Nền pastel trộn từ màu
   nhấn với --panel nên tự đúng ở nền tối. Điện thoại: một cột, không tràn ngang. */
.ws-dash .summary .prices { display: none; }
.dash { padding: 4px 0 8px; min-width: 0; }
.dash.busy { opacity: .55; transition: opacity .2s; }
.dash-dau { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 4px 0 14px; }
.dash-dau h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.dash-dau p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.dash-loc { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; min-width: 0; }
.dash-loc span { background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 12.5px;
  color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-loc b { color: var(--muted); font-weight: 600; }
.dash-hang1 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dash-hang2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.dash-hang3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.dash-kpi { --k: #2563eb; display: flex; gap: 12px; align-items: flex-start; min-width: 0; padding: 14px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--k) 7%, var(--panel)); border: 1px solid color-mix(in srgb, var(--k) 18%, var(--line)); }
.dash-kpi.k-goi { --k: var(--xanh); } .dash-kpi.k-nt { --k: #d97706; } .dash-kpi.k-cdt { --k: #7c3aed; }
.dash-ic { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; color: var(--k);
  background: color-mix(in srgb, var(--k) 15%, var(--panel)); }
.dash-ic .i { width: 21px; height: 21px; }
.dash-kpi div { min-width: 0; }
.dash-kpi span { display: block; color: var(--muted); font-size: 12.5px; }
.dash-kpi b { display: block; margin: 3px 0 2px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere; }
.dash-kpi small { display: block; color: var(--muted); font-size: 11.5px; }
.dash-the { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 14px 10px; }
.dash-the-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dash-the h4 { margin: 0; font-size: 14px; font-weight: 700; }
.dash-chon { border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 12.5px; padding: 4px 6px; }
.dash-ds { list-style: none; margin: 0; padding: 0; }
.dash-muc { width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 8px;
  align-items: center; text-align: left; border: 0; background: none; color: var(--ink); font: inherit; padding: 7px 6px; border-radius: 9px; cursor: pointer; }
.dash-muc:hover, .dash-muc:focus-visible { background: var(--row-hover); }
.dash-so { grid-row: 1 / 3; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; font-size: 11.5px;
  font-weight: 700; color: var(--muted); background: var(--chip); }
.dash-ten { min-width: 0; }
.dash-ten b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-ten small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-gt { font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-thanh { grid-column: 2 / 4; height: 5px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.dash-thanh i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--xanh)); }
.dash-cot { display: block; width: 100%; height: auto; }
.dash-cot rect { fill: var(--accent); opacity: .85; } .dash-cot rect:hover { opacity: 1; fill: var(--xanh); }
.dash-cot text { font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1; fill: var(--muted); }
.dash-cot .dash-cot-nhan { font-weight: 700; fill: var(--ink); }
.dash-rong { color: var(--muted); font-size: 13px; margin: 8px 0; }
.dash-trong { text-align: center; padding: 34px 16px; color: var(--muted); }
.dash-trong .i { width: 40px; height: 40px; color: var(--accent); }
.dash-trong h3 { margin: 10px 0 6px; color: var(--ink); font-size: 17px; }
.dash-trong p { max-width: 560px; margin: 0 auto 16px; line-height: 1.5; }
.dash-khoa { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 13px; background: var(--warn-soft); color: var(--warn); }
.dash-ghi { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 1023px) {
  .dash-hang1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hang3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hang3 > .dash-the:first-child { grid-column: 1 / -1; }
}
@media (max-width: 699px) {
  .dash-hang1, .dash-hang2, .dash-hang3 { grid-template-columns: minmax(0, 1fr); }
  .dash-hang3 > .dash-the:first-child { grid-column: auto; }
  .dash-kpi { padding: 12px; } .dash-kpi b { font-size: 19px; }
  .dash-loc { justify-content: flex-start; }
}

/* === V2 CUSTOMER POLISH === */
/* Separated #field pill + input capsule + animated first-focus dropdown */
.hero-tim .bar { display:flex; align-items:center; gap:10px; border:0 !important; background:transparent !important; box-shadow:none !important; padding:0 !important; min-height:0 !important; }
.hero-tim .bar:focus-within { box-shadow:none !important; }
.field-pill { flex-shrink:0; border-radius:16px; padding:4px; background:color-mix(in srgb,var(--panel) 84%,transparent);
  backdrop-filter:blur(12px); border:1.5px solid var(--line-2); box-shadow:0 4px 14px -8px rgba(26,115,232,.2), inset 0 1px 0 rgba(255,255,255,.7); }
.field-pill select { border:0 !important; background:transparent !important; padding:9px 12px !important; font-weight:600; font-size:13.5px; color:var(--ink); max-width:none !important; cursor:pointer; outline:none; }
.bar-input { flex:1; min-width:0; display:flex; align-items:center; gap:6px; border:1.5px solid var(--line-2); border-radius:18px;
  background:color-mix(in srgb,var(--panel) 92%,transparent); backdrop-filter:blur(14px); padding:5px 5px 5px 10px;
  box-shadow:0 8px 22px -12px rgba(26,115,232,.2), inset 0 1px 0 rgba(255,255,255,.8); transition:border-color .15s, box-shadow .15s; }
.bar-input:focus-within { border-color:var(--accent); box-shadow:0 0 0 4px var(--ring); }
.bar-input input { flex:1 1 0%; width:0; min-width:0; border:0; background:transparent; padding:9px 6px; font-size:15.5px; outline:none; color:var(--ink); }
.bar-input .primary { border-radius:13px; padding:10px 22px; }
@keyframes dropFadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.goi-y.vao-nhe { animation:dropFadeIn .18s cubic-bezier(.2,.8,.2,1); }
.ht-loc { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:12px; }
.ht-trai, .ht-phai { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.glass-btn { background:color-mix(in srgb,var(--panel) 84%,transparent); backdrop-filter:blur(10px); border-radius:12px; }

/* Unified compact icon cluster in toolbar */
.tool-cluster { display:inline-flex; align-items:center; background:color-mix(in srgb,var(--panel) 88%,transparent); backdrop-filter:blur(12px);
  border:1px solid var(--line-2); border-radius:13px; padding:2px; box-shadow:0 4px 14px -10px rgba(26,115,232,.2); }
.tool-cluster .cluster-btn { display:inline-flex; align-items:center; gap:5px; border:0; background:transparent; color:var(--ink);
  padding:6px 10px; border-radius:10px; font-family:inherit; font-size:13px; font-weight:600; line-height:1.2; cursor:pointer; transition:all .15s; }
.tool-cluster .cluster-btn:hover { background:var(--accent-soft); color:var(--accent); }
.tool-cluster .cluster-btn + .cluster-btn { position:relative; }
.tool-cluster .cluster-btn + .cluster-btn::before { content:""; position:absolute; left:0; top:22%; bottom:22%; width:1px; background:var(--line); }
.tool-cluster .sr-hint:empty { display:none; }

/* Clickable price chart + target reference line + detail card */
.chart-wrap { margin:8px 0 14px; }
.chart-chu-thich { display:flex; flex-wrap:wrap; gap:8px 18px; align-items:center; font-size:12px; color:var(--muted); margin-bottom:6px; }
.chart-chu-thich i { display:inline-block; vertical-align:middle; margin-right:5px; }
.chart-chu-thich .dot-mau { width:9px; height:9px; border-radius:50%; background:var(--accent); }
.chart-chu-thich .line-muc { width:20px; border-top:2px dashed var(--xanh); }
svg.chart g.pt-btn { cursor:pointer; outline:none; }
svg.chart circle.pt-hit { fill:transparent; }
svg.chart circle.pt { fill:var(--panel); stroke:var(--accent); stroke-width:2.2; transition:r .12s, fill .12s; }
svg.chart g.pt-btn:hover circle.pt, svg.chart g.pt-btn.active circle.pt { fill:var(--accent); stroke:var(--panel); stroke-width:2.5; }
.pt-card { margin-top:8px; padding:12px 14px; border-radius:14px; border:1px solid var(--line);
  background:color-mix(in srgb,var(--panel-2) 86%,transparent); box-shadow:0 6px 18px -12px rgba(26,115,232,.2); }
.pt-card-top { display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.pt-card-top b { font-size:14.5px; color:var(--ink); }
.pt-card-top span { font-size:12px; color:var(--muted); }
.pt-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.pt-card-grid div { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:8px 10px; min-width:0; }
.pt-card-grid span { display:block; font-size:11.5px; color:var(--muted); margin-bottom:2px; }
.pt-card-grid b { display:block; font-size:13.5px; color:var(--ink); overflow-wrap:anywhere; }
.pt-card-grid b.qdt { color:var(--accent); font-variant-numeric:tabular-nums; }
.pt-card-grid b.qd { color:var(--xanh); font-variant-numeric:tabular-nums; }
.pt-card-grid b small { font-weight:600; opacity:.85; }

/* 5 contextual detail tabs */
.ct-tabs { display:flex; flex-wrap:wrap; gap:6px; padding:4px; margin-bottom:12px; border-radius:14px;
  background:var(--chip); border:1px solid var(--line); }
.ct-tab { border:0; background:transparent; color:var(--muted); border-radius:10px; padding:7px 12px; font-family:inherit; font-size:12.5px; font-weight:600; line-height:1.2; cursor:pointer; transition:all .15s; }
.ct-tab:hover { color:var(--ink); background:color-mix(in srgb,var(--panel) 60%,transparent); }
.ct-tab[aria-selected="true"] { background:var(--panel); color:var(--accent); box-shadow:0 2px 8px -3px rgba(26,115,232,.22); }
.ct-qd-bar { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.ct-qd-bar > div { flex:1 1 180px; background:var(--panel-2); border:1px solid var(--line); border-radius:12px; padding:9px 12px; }
.ct-qd-bar > div.qd { border-color:color-mix(in srgb,var(--xanh) 35%,var(--line)); background:color-mix(in srgb,var(--xanh) 6%,var(--panel)); }
.ct-qd-bar span { display:block; font-size:11.5px; color:var(--muted); }
.ct-qd-bar b { display:block; font-size:15px; color:var(--ink); font-variant-numeric:tabular-nums; }
.ct-qd-bar b em { font-style:normal; font-size:12px; color:var(--xanh); font-weight:600; }
.ct-sub-head { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.ct-sub-head b { font-size:14px; color:var(--ink); }
.ct-sub-head span { font-size:12px; color:var(--muted); }
.ct-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:10px; }
.ct-card-mini { background:var(--panel-2); border:1px solid var(--line); border-radius:12px; padding:10px 12px; display:grid; gap:6px; }
.ct-card-t b { display:block; font-size:13.5px; color:var(--ink); }
.ct-card-t span { display:block; font-size:12px; color:var(--muted); }
.ct-card-m { display:flex; justify-content:space-between; align-items:baseline; gap:8px; font-size:12.5px; }
.ct-price { color:var(--accent); font-variant-numeric:tabular-nums; }
.ct-card-qd { font-size:12px; color:var(--xanh); font-weight:600; }
.ct-mini-tbl { overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--panel); margin-top:8px; }
.ct-mini-tbl table { width:100%; border-collapse:collapse; font-size:12.5px; }
.ct-mini-tbl th, .ct-mini-tbl td { padding:7px 10px; border-bottom:1px solid var(--line); text-align:left; }
.ct-mini-tbl td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ct-mini-tbl td small { display:block; font-size:11px; color:var(--xanh); }
.ct-loading, .ct-empty { padding:16px; text-align:center; color:var(--muted); font-size:13.5px; }
@media (max-width:700px) { .hero-tim .bar { flex-direction:column; align-items:stretch; } .hero-tim .bar > * { width:100%; min-width:0; max-width:100%; } .field-pill select { width:100%; } .pt-card-grid { grid-template-columns:1fr; } }

/* ô đồng ý Điều kiện + Chính sách bảo mật (NĐ 13/2023): không tích sẵn */
.auth-form label.dong-y { flex-direction: row; align-items: flex-start; gap: 8px; line-height: 1.5; color: var(--ink-2); }
.auth-form label.dong-y input { width: 18px; height: 18px; margin-top: 2px; flex: none; padding: 0; }
.auth-form .hint { margin: 0; font-size: 12px; }
.auth-form .ma-xt { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.auth-form .ma-xt[hidden] { display: none; }
.auth-form .ma-xt .ma-gui { height: 36px; padding: 0 12px; white-space: nowrap; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--accent); cursor: pointer; }
.auth-form .ma-xt .ma-gui:disabled { color: var(--muted); cursor: default; }
.auth-form .ma-xt .hint { grid-column: 1 / -1; }
.auth-form .ma-xt input { letter-spacing: 4px; font-variant-numeric: tabular-nums; }
.auth-form .auth-qmk { justify-self: center; border: 0; background: none; padding: 4px 8px; font-size: 13px; color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-style: dotted; }

/* công tắc "Mở rộng tìm trong cấu hình & tên gói" (đặc tả 20): mặc định tìm Tên hàng & mã hiệu */

/* Nút "Xóa điều kiện": góc phải DƯỚI khung điều kiện (cùng hàng với câu "Đang tìm..."; điện thoại thì xuống dòng riêng, sát phải) */
.dk-chan { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; }
.dk-chan .dk-cau { flex: 1 1 260px; min-width: 0; }
.xoa-het { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0 auto; padding: 4px 11px; font-family: inherit;
  font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--muted); background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 999px; cursor: pointer; }
.xoa-het[hidden] { display: none; }
.xoa-het:hover, .xoa-het:focus-visible { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.xoa-het .i { width: 13px; height: 13px; }
.xoa-het .n { min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--chip); color: var(--ink); font-size: 11px;
  font-weight: 700; line-height: 18px; text-align: center; }
.xoa-het .n:empty { display: none; }

/* ===== Ô TÌM MỘT KHỐI (Chủ dự án 17/11/2026): "Tìm trong" nằm trong ô tìm, menu thả tự vẽ; Tìm nâng cao đưa lên cạnh nút tìm;
   3 bước hướng dẫn nằm trong nút "Hướng dẫn tìm". <select id="field"> giữ làm nguồn giá trị, ẩn dưới nút (không nhận chuột). */
.hero-tim .bar { display:flex; align-items:stretch; gap:10px; flex-wrap:nowrap; }
.hero-tim .bar-input { flex:1 1 auto; min-width:0; padding:5px 5px 5px 5px; gap:4px; border-radius:18px; }
.hero-tim .bar-input .ic { margin-left:6px; color:var(--muted); flex-shrink:0; }
.hero-tim .field-pill { position:relative; flex-shrink:0; display:flex; align-items:stretch; padding:0; border:0; border-radius:0;
  background:none; box-shadow:none; backdrop-filter:none; }
.hero-tim .field-pill::after { content:""; align-self:center; width:1px; height:28px; margin-left:4px; background:var(--line-2); }
.hero-tim .field-pill select { position:absolute; inset:0; width:100%; height:100%; opacity:0; pointer-events:none; }
.field-nut { display:inline-flex; align-items:center; gap:8px; border:0; background:transparent; color:var(--ink); cursor:pointer;
  padding:4px 10px 4px 12px; border-radius:13px; font-family:inherit; line-height:1.15; text-align:left; transition:background .15s; }
.field-nut:hover, .field-nut[aria-expanded="true"] { background:var(--accent-soft); }
.field-nut:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.field-nhan { display:block; font-size:10.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.field-ten { display:block; font-size:14px; font-weight:650; max-width:170px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.field-nut { display:grid; grid-template-columns:auto auto; grid-template-rows:auto auto; column-gap:8px; }
.field-nut .field-nhan { grid-column:1; grid-row:1; }
.field-nut .field-ten { grid-column:1; grid-row:2; }
.field-nut .field-mui { grid-column:2; grid-row:1 / 3; align-self:center; width:15px; height:15px; color:var(--muted); transition:transform .18s; }
.field-nut[aria-expanded="true"] .field-mui { transform:rotate(180deg); color:var(--accent); }
.field-nut.dang-loc .field-ten { color:var(--accent); }
.field-menu { position:absolute; z-index:60; top:calc(100% + 12px); left:-5px; width:320px; max-height:min(420px, 70vh); overflow:auto;
  padding:6px; border-radius:16px; background:var(--panel); border:1px solid var(--line); box-shadow:var(--pop);
  animation:dropFadeIn .16s cubic-bezier(.2,.8,.2,1); }
.field-muc { display:grid; grid-template-columns:1fr auto; align-items:center; column-gap:10px; width:100%; border:0; background:transparent;
  border-radius:11px; padding:8px 12px; text-align:left; font-family:inherit; color:var(--ink); cursor:pointer; }
.field-muc-ten { font-size:14px; font-weight:600; }
.field-muc small { grid-column:1; font-size:12px; color:var(--muted); }
.field-muc .field-tich { grid-column:2; grid-row:1 / 3; width:16px; height:16px; color:var(--accent); visibility:hidden; }
.field-muc[aria-selected="true"] { background:var(--accent-soft); }
.field-muc[aria-selected="true"] .field-muc-ten { color:var(--accent); }
.field-muc[aria-selected="true"] .field-tich { visibility:visible; }
.field-muc:hover, .field-muc:focus-visible { background:var(--row-hover); outline:none; }
.bar-phu { display:flex; align-items:stretch; gap:8px; flex-shrink:0; }
.adv-btn { position:relative; display:inline-flex; align-items:center; gap:8px; padding:0 16px; border-radius:16px; cursor:pointer;
  border:1.5px solid var(--line-2); background:color-mix(in srgb,var(--panel) 92%,transparent); color:var(--ink);
  font:600 14px/1.2 var(--font-sans); white-space:nowrap; transition:border-color .15s, color .15s, background .15s; }
.adv-btn .i { width:18px; height:18px; color:var(--accent); }
.adv-btn:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.adv-btn .n { min-width:18px; padding:0 5px; border-radius:99px; background:var(--accent); color:var(--accent-ink); font-size:11px; line-height:18px; text-align:center; }
.adv-btn .n:empty { display:none; }
.hero-tim .ai-btn { padding:0 16px; }
.ht-loc { margin-top:14px; }
.hd-boc { position:relative; }
.hd-nut { display:inline-flex !important; align-items:center; gap:6px; }
.hd-nut .i { width:16px; height:16px; }
.hd-pop { position:absolute; z-index:55; top:calc(100% + 10px); right:0; width:360px; max-width:calc(100vw - 32px); padding:16px 18px 14px;
  border-radius:16px; background:var(--panel); border:1px solid var(--line); box-shadow:var(--pop); color:var(--ink); text-align:left;
  animation:dropFadeIn .16s cubic-bezier(.2,.8,.2,1); }
.hd-tieu { display:block; font:700 14.5px/1.3 var(--font-display); margin-bottom:10px; }
.hd-pop .meo-tim { display:grid; gap:10px; margin:0 0 12px; padding:0; list-style:none; font-size:13.5px; line-height:1.5; color:var(--ink-2, var(--ink)); }
.hd-pop .meo-buoc { display:grid !important; grid-template-columns:22px 1fr; align-items:start; gap:10px; }
.hd-pop .meo-buoc b { width:22px; height:22px; margin-top:1px; }
.hd-pop .meo-buoc em { font-style:normal; font-weight:600; color:var(--accent); }
.hd-adv { width:100%; border:0; border-top:1px solid var(--line); background:none; padding:10px 0 0; text-align:left; cursor:pointer;
  font:600 13px/1.3 var(--font-sans); color:var(--accent); }
.hd-adv:hover { text-decoration:underline; }
@media (max-width:900px) { .adv-btn .lbl, .hero-tim .ai-btn .dai { display:none; } .hero-tim .ai-btn .ngan { display:inline; } .adv-btn, .hero-tim .ai-btn { padding:0 13px; } }
@media (max-width:700px) {
  .hero-tim .bar { flex-direction:column; align-items:stretch; gap:8px; }
  .hero-tim .bar > * { width:auto; }
  .hero-tim .bar-input { width:100%; }
  .hero-tim .bar-input .ic { display:none; }
  .field-nhan { display:none; }
  .field-nut { padding:4px 8px; }
  .field-ten { max-width:92px; font-size:13px; }
  .hero-tim .bar-input .primary { padding:10px 14px; }
  .bar-phu > * { flex:1 1 0; justify-content:center; min-height:42px; }
  .adv-btn .lbl, .hero-tim .ai-btn .dai { display:inline; } .hero-tim .ai-btn .ngan { display:none; }
  .field-menu { width:min(320px, calc(100vw - 48px)); }
  .field-nut .field-ten { grid-row:1 / 3; align-self:center; }
  .ht-phai { position:relative; width:100%; }
  .hd-boc { position:static; }
  .hd-pop { left:0; right:0; top:calc(100% + 8px); width:auto; max-width:none; }
}
/* khung tìm nổi trên vùng kết quả: menu "Tìm trong" / hộp hướng dẫn không bị đầu bảng đè */
.hero-tim { position:relative; z-index:30; }
/* "Bệnh viện này mua gì" trên hàng tab chi tiết: là thao tác lọc cả bảng (không phải tab) -> chữ xanh + mũi tên ra ngoài */
.ct-tab.ct-tab-loc { display:inline-flex; align-items:center; gap:5px; color:var(--accent); }
.ct-tab.ct-tab-loc .i { width:13px; height:13px; }
.ct-tab.ct-tab-loc:hover { background:var(--accent-soft); color:var(--accent); }
/* Trung vị / Trung bình trên biểu đồ lịch sử giá (17/11/2026) */
.tk-seg { display:inline-flex; padding:2px; gap:2px; border-radius:10px; background:var(--chip); border:1px solid var(--line); }
.tk-seg button { border:0; background:transparent; color:var(--muted); border-radius:8px; padding:4px 10px; font:600 12px/1.2 var(--font-sans); cursor:pointer; }
.tk-seg button[aria-pressed="true"] { background:var(--panel); color:var(--accent); box-shadow:0 1px 3px rgba(20,28,38,.14); }
.chart-wrap[data-tk="tv"] .tk-tb, .chart-wrap[data-tk="tb"] .tk-tv { display:none; }
.xh-chu-thich .tk-seg { margin-right:4px; }
/* Khách hết lượt tìm (17/11/2026): khung mời đăng ký — KHÔNG làm mờ danh sách miễn phí */
.het-luot-khung { display:flex; gap:14px; align-items:flex-start; margin:12px; padding:16px 18px; border-radius:16px;
  background:color-mix(in srgb, var(--accent) 7%, var(--panel)); border:1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.het-luot-khung .hl-o { flex:none; width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:var(--accent-soft); color:var(--accent); }
.het-luot-khung .hl-o .i { width:22px; height:22px; }
.het-luot-khung b { display:block; font-size:15px; color:var(--ink); }
.het-luot-khung p { margin:4px 0 10px; color:var(--muted); font-size:13.5px; line-height:1.5; }
.het-luot-khung .hl-nut { display:flex; flex-wrap:wrap; gap:8px; }
.het-luot-khung .hl-nut .primary { padding:8px 16px; border-radius:10px; }
/* Danh sách nổi bật hôm nay: một trang duy nhất */
.pager.an-nb { display:none; }

/* HÀNG TAB CHI TIẾT KIỂU GẠCH CHÂN (Chủ dự án 17/11/2026: "hiện đại nhất có thể, bỏ hình viên thuốc vì quá AI") */
.ct-tabs { flex-wrap:nowrap; gap:0 22px; padding:0 2px; margin:0 0 14px; border:0; border-bottom:1px solid var(--line); border-radius:0;
  background:none; overflow-x:auto; scrollbar-width:none; }
.ct-tabs::-webkit-scrollbar { display:none; }
.ct-tab { position:relative; flex:none; padding:11px 0 12px; border-radius:0; background:none !important; box-shadow:none !important;
  font-size:13.5px; font-weight:600; color:var(--muted); white-space:nowrap; transition:color .15s; }
.ct-tab:hover { color:var(--ink); }
.ct-tab[aria-selected="true"] { color:var(--ink); }
.ct-tab[aria-selected="true"]::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px; border-radius:2px 2px 0 0; background:var(--accent); }
.ct-tab:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }
.ct-tab.ct-tab-loc { color:var(--accent); }
.ct-tab.ct-tab-loc:hover { color:var(--accent); text-decoration:underline; text-underline-offset:4px; background:none; }
.ct-tab.ct-tab-loc::after { display:none; }
.ct-nut-tren .icon-btn.chinh { display:inline-flex; align-items:center; gap:7px; border-radius:10px; padding:7px 13px; font-weight:600; font-size:13px;
  background:var(--accent-soft); color:var(--accent); border:1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); box-shadow:none; }
.ct-nut-tren .icon-btn.chinh .i { width:15px; height:15px; }
.ct-nut-tren .icon-btn.chinh:hover { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); filter:none; transform:none; }

/* ===== Biểu đồ lịch sử giá & xu hướng (đặc tả 36 H4, 18/11/2026) ===== */
.chart-wrap { --c-tv:#C2410C; --c-tb:#6D28D9; --c-muc:#0F766E; }
svg.chart line.tv { stroke:var(--c-tv); stroke-width:2; stroke-dasharray:6 4; opacity:.92; }
.chart-wrap[data-tk="tb"] svg.chart line.tv { stroke:var(--c-tb); }
svg.chart line.muc-ngang { stroke:var(--c-muc); stroke-width:1.8; stroke-dasharray:6 4; opacity:.95; }
svg.chart .badge-tv { fill:var(--c-tv); } svg.chart .badge-tb { fill:var(--c-tb); } svg.chart .badge-muc { fill:var(--c-muc); }
svg.chart text.badge-chu { fill:#fff; font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; pointer-events:none; }
svg.chart line.badge-noi { stroke:var(--muted); stroke-width:1; opacity:.7; }
svg.chart .lbl-x { font-size:11px; }
svg.chart text.pt-lbl { fill:var(--ink); font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; paint-order:stroke; stroke:var(--panel); stroke-width:4px; stroke-linejoin:round; pointer-events:none; }
svg.chart.chart-nhieu .line { opacity:.45; stroke-width:1.4; }
svg.chart.chart-nhieu circle.pt { stroke-width:1.3; opacity:.65; }
svg.chart.chart-nhieu g.pt-btn.active circle.pt, svg.chart.chart-nhieu g.pt-btn:hover circle.pt { opacity:1; stroke-width:2.2; }
svg.chart polyline.line-trend { fill:none; stroke:var(--accent); stroke-width:2.6; stroke-linejoin:round; stroke-linecap:round; pointer-events:none; }
svg.chart circle.trend-cham { fill:var(--panel); stroke:var(--accent); stroke-width:2.4; pointer-events:none; }
.chart-chu-thich .tk-chips { display:inline-flex; flex-wrap:wrap; gap:6px; }
.chart-chu-thich .tk-chip { display:inline-flex; gap:4px; align-items:baseline; padding:3px 9px; border-radius:999px; border:1px solid var(--line); background:var(--panel-2); color:var(--muted); font-size:12px; }
.chart-chu-thich .tk-chip b { color:var(--ink); font-variant-numeric:tabular-nums; }
.chart-wrap[data-tk="tv"] .tk-chip.tv, .chart-wrap[data-tk="tb"] .tk-chip.tb { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); font-weight:700; }
.tk-seg .tk-so { margin-left:3px; font-variant-numeric:tabular-nums; opacity:.85; font-weight:700; }
.tk-seg button[aria-pressed="true"] { box-shadow:0 0 0 1.5px var(--accent), 0 1px 3px rgba(20,28,38,.14); }
.vtg-moc.bon { grid-template-columns:repeat(4, 1fr); }
.vtg-moc .giua.tb b { color:var(--c-tb, #6D28D9); }
.vtg-thanh .vtg-tb { position:absolute; top:-3px; bottom:-3px; width:2px; margin-left:-1px; background:#6D28D9; border-radius:2px; opacity:.85; }
.xh-ky .dang-ve, .xh-ky .dang-ve b { color:var(--xanh); font-weight:700; }
.moc-du-lieu { font-weight:600; color:var(--accent); }
@media (max-width:520px) { .vtg-moc.bon { font-size:10.5px; } .vtg-moc.bon b { font-size:12.5px; } .chart-chu-thich { gap:6px 10px; } }
.chart-cuon { overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; }
svg.chart .lbl { font-size:12px; } svg.chart text.pt-lbl { font-size:12px; }
@media (max-width:640px) { .chart-cuon svg.chart { min-width:720px; } }
