/* Alogas Admin catalogue screens (phase 1, 11/2026): TiHa code check, bulk add, photos, rich
   descriptions, display order, categories, TiHa prices, banners. Built from the approved mockups in
   _design-assets/alogas/admin-20261106. */
@font-face { font-family: "BVP"; src: url(fonts/be_vietnam_pro_medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: "BVP"; src: url(fonts/be_vietnam_pro_bold.ttf); font-weight: 700; font-display: swap; }
/* New Admin components for phase 1 (TiHa code check, bulk add, bulk select). Builds on admin.css tokens. */
:root { --ink: #23252a; --soft: #f7f8f9; --ok: #247247; --ok-bg: #eef7f2; --ok-line: #cfe6d9; --warn: #8a5a12; --warn-bg: #fff7e8; --warn-line: #f1dcb3; --bad: #b12735; --bad-bg: #fff3f4; --bad-line: #f2cdd2; --info-bg: #f3f5f8; }
.nav a { position: relative; }
.nav-new { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: #e9570b; border-radius: 99px; padding: 1px 7px; }
.lead { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.page-heading .actions { display: flex; gap: 10px; }

/* Code check card */
.tiha-check { border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.tiha-check h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--pink); color: #fff; font-size: 13px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.step.done { background: var(--ok); }
.code-row { display: flex; gap: 10px; align-items: flex-end; }
.code-row label { flex: 1; }
.code-row input { font-size: 16px !important; font-weight: 600; letter-spacing: .02em; }
.code-row .button, .code-row button { height: 44px; white-space: nowrap; }
.hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; display: flex; gap: 8px; align-items: flex-start; }
.hint svg { width: 16px; height: 16px; margin-top: 2px; }
.result { border-radius: 8px; padding: 14px 16px; border: 1px solid; display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 12px; align-items: start; font-size: 14px; line-height: 1.55; }
.result > svg { width: 22px; height: 22px; }
.result strong { font-size: 15px; }
.result p { margin: 0; grid-column: 2; }
.result .result-action { grid-row: 1 / span 2; grid-column: 3; align-self: center; }
.result.ok { background: var(--ok-bg); border-color: var(--ok-line); color: #1d5c39; }
.result.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.result.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.result.info { background: var(--info-bg); border-color: #dfe3e8; color: #444b53; }
.tiha-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 10px; border-top: 1px solid var(--ok-line); padding-top: 12px; }
.tiha-facts div { padding-right: 14px; }
.tiha-facts dt { font-size: 12px; color: #4d7a61; font-weight: 600; }
.tiha-facts dd { margin: 3px 0 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.fetched { grid-column: 1 / -1; font-size: 12px; color: #4d7a61; margin-top: 2px; }

/* Locked (not yet verified) form */
.is-locked { position: relative; }
.is-locked > .editor-main, .is-locked > .editor-aside { opacity: .38; filter: grayscale(1); pointer-events: none; }
.lock-note { position: absolute; left: 50%; top: 90px; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 30px #0000001f; border-radius: 10px; padding: 14px 18px; font-size: 14px; font-weight: 600; }

/* Price lock */
.price-lock { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 16px; align-items: center; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.price-lock .big { font-size: 26px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.price-lock .lock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #4a5056; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; }
.price-lock .lock svg { width: 15px; height: 15px; }
.price-lock small { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.price-lock.no-price { background: #fff8eb; border-color: #f2d49b; }
.price-lock.no-price .big { color: #8a5a00; }
.price-history { font-size: 13px; border-collapse: collapse; width: 100%; }
.price-history td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.price-history td:last-child { text-align: right; color: var(--muted); }

/* Category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 8px 6px 12px; border: 1px solid #cdd2d7; border-radius: 99px; font-size: 14px; font-weight: 600; background: #fff; }
.chip.main { border-color: var(--pink); background: #fdf0f5; color: #a51c58; }
.chip small { display: inline; margin: 0; font-size: 12px; color: inherit; font-weight: 500; opacity: .8; }
.chip svg { width: 16px; height: 16px; }
.chip.add { border-style: dashed; color: #4a5056; padding-right: 12px; }

/* Image grid */
.image-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .grip, .tile .remove { position: absolute; top: 6px; width: 30px; height: 30px; border-radius: 6px; background: #ffffffe6; border: 1px solid var(--line); display: grid; place-items: center; color: #4a5056; }
.tile .grip { left: 6px; cursor: grab; } .tile .remove { right: 6px; }
.tile .grip svg, .tile .remove svg { width: 16px; height: 16px; }
.tile .cover { position: absolute; left: 6px; bottom: 6px; font-size: 12px; font-weight: 700; color: #fff; background: var(--pink); border-radius: 4px; padding: 2px 8px; }
.tile.add { border: 1.5px dashed #c3c8ce; background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #4a5056; font-size: 13px; font-weight: 600; text-align: center; padding: 8px; }
.tile.add svg { width: 26px; height: 26px; }
.tile.add small { margin: 0; font-weight: 400; }

/* Toggles */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 14px; font-weight: 600; }
.switch-row small { display: block; margin: 2px 0 0; font-weight: 400; }
.switch { width: 44px; height: 26px; border-radius: 99px; background: #cdd2d7; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; }
.switch.on { background: var(--pink); } .switch.on::after { left: 21px; }

/* Mini App preview card */
.mini-preview { background: #f4f1f3; border-radius: 10px; padding: 14px; }
.mini-card { width: 168px; margin: 0 auto; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px #0000001a; font-family: Arial, sans-serif; }
.mini-card img { width: 168px; height: 168px; object-fit: cover; display: block; }

.mini-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 18px; font-weight: 600; min-height: 36px; }
.mini-card .p { color: #c8296a; font-weight: 700; font-size: 15px; margin-top: 6px; }
.mini-card s { color: #8a8f95; font-size: 12px; }
.mini-preview > small { text-align: center; margin-top: 10px; }

/* Buttons */
.button.ghost, button.ghost { border-color: transparent; background: transparent; color: var(--pink); padding-inline: 8px; }
button.primary:disabled, .button.primary.disabled { background: #e8b5cb; border-color: #e8b5cb; opacity: 1; cursor: not-allowed; }
.button.sm, button.sm { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.savebar .grow { margin-right: auto; align-self: center; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* Segmented tabs */
.seg { display: inline-flex; background: #f1f2f4; border-radius: 8px; padding: 4px; gap: 4px; }
.seg span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #4a5056; }
.seg span.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #0000001f; }
.seg svg { width: 17px; height: 17px; }

/* Bulk add */
.steps { display: flex; gap: 0; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.steps div { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--muted); background: #fff; }
.steps div + div { border-left: 1px solid var(--line); }
.steps div.on { color: var(--ink); background: #fdf0f5; box-shadow: inset 0 -3px 0 var(--pink); }
.steps div.done { color: var(--ok); }
.steps .step { background: #c3c8ce; } .steps .on .step { background: var(--pink); } .steps .done .step { background: var(--ok); }
.paste-box textarea { font-family: Consolas, "Courier New", monospace; font-size: 15px; line-height: 1.7; min-height: 230px; }
.two-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.side-note { background: var(--soft); border-radius: 10px; padding: 18px; font-size: 14px; line-height: 1.6; }
.side-note h3 { margin: 0 0 8px; font-size: 15px; }
.side-note ul { margin: 0; padding-left: 18px; }
.side-note li + li { margin-top: 6px; }
.counts { display: flex; flex-wrap: wrap; gap: 8px; }
.count { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; border: 1px solid; }
.count svg { width: 16px; height: 16px; }
.count.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.count.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.count.bad { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.grid-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.grid-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; background: #f7f8f9; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid-table input:not([type=checkbox]), .grid-table select { margin: 0 !important; min-height: 40px !important; padding: 8px 10px !important; font-size: 14px; }
.grid-table .code { font-weight: 700; white-space: nowrap; }
.grid-table .from-tiha { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid-table tr.skip td { background: #fafafa; color: #6b7178; }
.grid-table tr.skip .code { text-decoration: line-through; text-decoration-color: #b8bdc3; }
.grid-table tr.sel td { background: #fdf6f9; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status svg { width: 17px; height: 17px; }
.status.ok { color: var(--ok); } .status.warn { color: var(--warn); } .status.bad { color: var(--bad); }
.status + small { margin-top: 2px; white-space: normal; }
.mini-drop { width: 52px; height: 52px; border: 1.5px dashed #c3c8ce; border-radius: 6px; display: grid; place-items: center; color: #7c838a; background: var(--soft); }
.mini-drop svg { width: 20px; height: 20px; }
.mini-thumb { width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 6px; object-fit: contain; display: block; background: #fff; }
.apply-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: #fdf0f5; border: 1px solid #f3cadb; border-radius: 10px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.apply-bar select { width: auto !important; min-width: 220px; margin: 0 !important; min-height: 40px !important; padding: 8px 10px !important; }
.apply-bar .sep { width: 1px; height: 26px; background: #f0bcd2; }
.tiha-browse .row { display: grid; grid-template-columns: 32px 130px minmax(0, 1fr) 70px 120px 120px; align-items: center; gap: 12px; padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tiha-browse .row.head { background: #f7f8f9; font-size: 12px; font-weight: 600; color: var(--muted); }
.tiha-browse .row.on { background: #fdf6f9; }
.tiha-browse .row.dis { color: #9aa0a6; }
.tiha-browse .price { font-weight: 700; text-align: right; white-space: nowrap; }
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar label { margin: 0; }
.toolbar .search { flex: 1; min-width: 240px; }
.toggle-inline { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 600; }
.done-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.done-list .row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 140px 160px 130px; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.done-list .row:last-child { border-bottom: 0; }
.done-list img, .done-list .noimg { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; }
.done-list .noimg { display: grid; place-items: center; color: #a2a8af; background: var(--soft); }
.big-ok { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 10px; background: var(--ok-bg); border: 1px solid var(--ok-line); margin-bottom: 18px; }
.big-ok svg { width: 34px; height: 34px; color: var(--ok); }
.big-ok h2 { margin: 0; font-size: 20px; }
.big-ok p { margin: 2px 0 0; color: #2d5e43; }

/* Product list with selection */
.status-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.status-tabs span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; font-size: 14px; font-weight: 600; color: #4a5056; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.status-tabs span.on { color: #a51c58; border-color: var(--pink); }
.status-tabs b { font-size: 12px; background: #eef0f2; color: #555f68; border-radius: 99px; padding: 1px 8px; }
.status-tabs .on b { background: #fce9f1; color: #a51c58; }
.sel-table .product-row { grid-template-columns: 34px minmax(250px, 2.7fr) minmax(100px, 1fr) 150px 140px 20px; }
.sel-table .product-row.picked { background: #fdf6f9; }
.cbox { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid #9aa0a6; background: #fff; display: grid; place-items: center; }
.cbox.on { background: var(--pink); border-color: var(--pink); color: #fff; }
.cbox.mid { background: var(--pink); border-color: var(--pink); }
.cbox.mid::after { content: ""; width: 10px; height: 2px; background: #fff; border-radius: 2px; }
.cbox svg { width: 14px; height: 14px; stroke-width: 3; }
.price-cell { display: flex; flex-direction: column; gap: 2px; }
.price-notice { display: flex; align-items: flex-start; gap: 10px; background: #fff8ec; color: #6f4708; border: 1px solid #f1d9ad; }
.price-notice svg { margin-top: 3px; }
.price-notice a { font-weight: 600; white-space: nowrap; }
.price-cell small { margin: 0; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.price-cell small svg { width: 13px; height: 13px; }
.bulk-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 3; display: flex; align-items: center; gap: 6px; background: #23252a; color: #fff; border-radius: 12px; padding: 8px 8px 8px 18px; box-shadow: 0 12px 40px #0000004d; font-size: 14px; white-space: nowrap; }
.bulk-bar .n { font-weight: 700; margin-right: 6px; }
.bulk-bar .all { color: #ff9cc6; font-weight: 600; margin-right: 10px; }
.bulk-bar button { background: transparent; color: #fff; border-color: #ffffff3d; min-height: 42px; }
.bulk-bar button.danger { background: #c23a48; border-color: #c23a48; color: #fff; }
.bulk-bar .x { border: 0; padding: 0 10px; }
.has-bulk { position: relative; padding-bottom: 110px; }
.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 3; display: flex; align-items: center; gap: 14px; background: #23252a; color: #fff; border-radius: 12px; padding: 10px 10px 10px 18px; box-shadow: 0 12px 40px #0000004d; font-size: 14px; white-space: nowrap; }
.toast svg { color: #7fd6a4; }
.toast button { background: #fff; color: var(--ink); border: 0; min-height: 40px; }
.toast .t { color: #b7bcc2; font-size: 13px; }

/* Dialog mock */
dialog.sheet { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); z-index: 5; width: 520px; background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 20px 60px #0000004d; }
dialog.sheet h2 { display: flex; gap: 10px; align-items: center; font-size: 20px; margin: 0 0 6px; }
dialog.sheet h2 svg { color: var(--bad); width: 24px; height: 24px; }
dialog.sheet p { margin: 0 0 14px; font-size: 14px; color: #4a5056; }
dialog.sheet .list { border: 1px solid var(--line); border-radius: 8px; max-height: 220px; overflow: hidden; }
dialog.sheet .list div { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 14px; border-bottom: 1px solid var(--line); }
dialog.sheet .list div:last-child { border-bottom: 0; }
dialog.sheet .list img { width: 36px; height: 36px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; }
dialog.sheet .list small { margin: 0 0 0 auto; }
dialog.sheet ul.facts { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; display: grid; gap: 8px; }
dialog.sheet ul.facts li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
dialog.sheet ul.facts svg { width: 17px; height: 17px; margin-top: 2px; color: #4a5056; }
dialog.sheet .dialog-actions { margin-top: 20px; }
button.danger-solid { background: #c23a48; border-color: #c23a48; color: #fff; }
/* fixes after first render */
.price-lock .lock { justify-self: start; }
.mini-card > div { padding: 8px 10px 10px; }
.mini-card div div, .mini-card .p { padding: 0; }
label small, .hint, .editor-section small { font-weight: 400; }
/* Rich description editor (shared by the product form boards) */
.rte { border: 1px solid #cdd2d7; border-radius: 8px; overflow: hidden; margin-top: 6px; font-weight: 400; }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; background: #f7f8f9; border-bottom: 1px solid var(--line); }
.rte-bar .b { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 6px; color: #3a4047; font-weight: 700; font-size: 14px; padding: 0 5px; }
.rte-bar .b svg { width: 17px; height: 17px; }
.rte-bar .sel { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid #cdd2d7; border-radius: 6px; background: #fff; font-size: 13px; font-weight: 600; margin-right: 6px; }
.rte-bar .sel svg { width: 15px; height: 15px; }
.rte-bar .sep { width: 1px; height: 22px; background: #d9dde1; margin: 0 5px; }
.rte-body { padding: 12px 14px; min-height: 96px; font-size: 14px; line-height: 1.6; color: #333; }
.rte-foot { display: flex; justify-content: space-between; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); background: #fafbfc; }

/* Round 2 components: display order, home tiles, category tree. Builds on admin-next.css. */
.order-layout { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.card-head h2 { margin: 0; font-size: 16px; }
.card-head small { margin: 2px 0 0; }
.tree .node { display: grid; grid-template-columns: 22px 18px 56px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 52px; padding: 6px 12px; border-bottom: 1px solid #eef0f2; font-size: 14px; }
.tree .node.child { padding-left: 40px; }
.tree .node.on { background: #fdf0f5; box-shadow: inset 3px 0 0 var(--pink); }
.tree .node b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .node .n { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tree .node img { width: 56px; height: 24px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.tree .grip, .olist .grip, .tile-row .grip { color: #9aa0a6; cursor: grab; display: grid; place-items: center; }
.tree .grip svg, .olist .grip svg, .tile-row .grip svg { width: 18px; height: 18px; }
.tree .caret { display: grid; place-items: center; } .tree .caret svg { width: 16px; height: 16px; color: #6b7178; }
.tree .hint { padding: 12px 14px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; line-height: 1.5; margin: 0; }
.tree .hint svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.olist { position: relative; }
.olist .row { display: grid; grid-template-columns: 30px 22px 52px minmax(0, 1fr) 100px 76px; align-items: center; gap: 10px; min-height: 66px; padding: 7px 14px; border-bottom: 1px solid #eef0f2; font-size: 14px; background: #fff; }
.olist .pos { font-size: 13px; font-weight: 700; color: #6b7178; text-align: center; }
.olist img { width: 52px; height: 52px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.olist .nm { min-width: 0; } .olist .nm b { font-weight: 600; display: block; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olist .nm small { margin: 2px 0 0; }
.olist .pr { text-align: right; font-weight: 700; white-space: nowrap; }
.olist .qa { display: flex; gap: 4px; justify-content: flex-end; }
.olist .qa span { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: #4a5056; }
.olist .qa svg { width: 16px; height: 16px; }
.olist .row.placeholder { background: repeating-linear-gradient(135deg, #fafbfc, #fafbfc 8px, #f0f1f3 8px, #f0f1f3 16px); }
.olist .row.placeholder > * { visibility: hidden; }
.olist .row.changed .pos { color: #fff; background: #e9570b; border-radius: 99px; width: 26px; height: 26px; display: grid; place-items: center; margin: 0 auto; }
.olist .drop-line { height: 0; border-top: 3px solid var(--pink); position: relative; margin: -2px 0 -1px; z-index: 2; }
.olist .drop-line::before { content: ""; position: absolute; left: 8px; top: -7px; width: 11px; height: 11px; border-radius: 50%; background: var(--pink); }
.olist .floating { position: absolute; left: 30px; right: -6px; z-index: 3; box-shadow: 0 14px 34px #0000002e; transform: rotate(-.6deg); border: 1.5px solid var(--pink); border-radius: 8px; }
.olist .more-row { padding: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.list-tools { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-tools input, .list-tools select { margin: 0 !important; min-height: 38px !important; padding: 7px 10px !important; font-size: 14px; width: auto; }
.list-tools .grow { flex: 1; min-width: 200px; }
.list-tools span { font-size: 13px; font-weight: 600; color: #4a5056; }
.note-inline { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: #f3f5f8; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; color: #444b53; }
.note-inline svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.banner-warn { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); font-size: 14px; line-height: 1.55; margin-bottom: 18px; }
.banner-warn svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.banner-warn b { color: #6d4508; }
/* Home tiles editor */
.tiles-layout { display: grid; grid-template-columns: minmax(0, 1fr) 406px; gap: 24px; align-items: start; }
.tile-row { display: grid; grid-template-columns: 22px 56px minmax(0, .8fr) minmax(0, 1.2fr) 64px; align-items: center; gap: 12px; min-height: 72px; padding: 8px 14px; border-bottom: 1px solid #eef0f2; font-size: 14px; }
.tile-row.th { min-height: 40px; background: #f7f8f9; font-size: 12px; color: var(--muted); font-weight: 600; }
.tile-row.off { background: #fafbfc; } .tile-row.off img, .tile-row.off input, .tile-row.off select { opacity: .5; }
.tile-row img { width: 52px; height: 52px; object-fit: contain; }
.tile-row .noimg { width: 52px; height: 52px; border: 1.5px dashed #c3c8ce; border-radius: 8px; display: grid; place-items: center; color: #8a9097; }
.tile-row .noimg svg { width: 20px; height: 20px; }
.tile-row input, .tile-row select { margin: 0 !important; min-height: 40px !important; padding: 7px 10px !important; font-size: 14px; }
.phone { width: 406px; border-radius: 32px; overflow: hidden; border: 8px solid #23252a; background: #f3f1f3; box-shadow: 0 10px 30px #0000002e; font-family: "BVP", system-ui, sans-serif; font-weight: 500; color: #2b282d; }
.phone .pbar { background: #c8296a; padding: 10px 14px 12px; }
.phone .pstatus { display: flex; justify-content: space-between; color: #fff; font-size: 13px; font-weight: 700; padding: 0 6px 8px; }
.phone .plogo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.phone .plogo img { height: 30px; filter: brightness(0) invert(1); }
.phone .plogo span { color: #fff; font-size: 13px; font-weight: 700; background: #00000026; border-radius: 99px; padding: 6px 10px; }
.phone .psearch { display: flex; gap: 8px; } .phone .psearch div { flex: 1; height: 44px; border-radius: 12px; background: #fff; display: flex; align-items: center; padding: 0 12px; color: #9a979c; font-size: 14px; gap: 8px; }
.phone .psearch svg { width: 18px; height: 18px; color: #6b676d; }
.phone .psearch span { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: #c8296a; }
.phone .psearch span svg { color: #c8296a; }
.phone .pcard { margin: 14px 12px; background: #fff; border-radius: 16px; padding: 12px 0 8px; box-shadow: 0 1px 3px #0000000f; }
.phone .pcard .t { display: flex; justify-content: space-between; align-items: center; padding: 0 14px; font-size: 16px; font-weight: 700; } .phone .pcard .t span { font-size: 13px; color: #c8296a; font-weight: 600; }
.phone .ptiles { display: flex; gap: 8px; padding: 8px 14px 4px; overflow: hidden; }
.phone .ptiles div { min-width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.phone .ptiles img { width: 64px; height: 64px; object-fit: contain; }
.phone .pbanner { margin: 0 12px 14px; height: 120px; border-radius: 16px; background: #fff; display: grid; place-items: center; color: #b7b3b8; font-size: 13px; }
.phone-cap { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }
/* Category tree table */
.cat-table .tr { display: grid; grid-template-columns: minmax(0, 1fr) 80px 110px 44px; align-items: center; gap: 10px; min-height: 58px; padding: 6px 14px; border-bottom: 1px solid #eef0f2; font-size: 14px; }
.cat-table .tr.th { min-height: 40px; background: #f7f8f9; font-size: 12px; color: var(--muted); font-weight: 600; }
.cat-table .tr.on { background: #fdf0f5; box-shadow: inset 3px 0 0 var(--pink); }
.cat-table .name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cat-table .name img { width: 72px; height: 30px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); flex: none; }
.cat-table .name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-table .name small { margin: 0; white-space: nowrap; }
.cat-table .child .name { padding-left: 34px; position: relative; }
.cat-table .child .name::before { content: ""; position: absolute; left: 12px; top: -16px; height: 32px; width: 14px; border-left: 1.5px solid #cdd2d7; border-bottom: 1.5px solid #cdd2d7; border-bottom-left-radius: 6px; }
.cat-table .caret { width: 18px; color: #6b7178; flex: none; display: grid; place-items: center; } .cat-table .caret svg { width: 16px; height: 16px; }
.cat-table .num { text-align: right; font-weight: 600; }
.cat-table .ic { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; color: var(--pink); }
.cat-table .ic svg { width: 17px; height: 17px; }
.cat-image { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 6px; }
.cat-image img { width: 100%; aspect-ratio: 2.5; object-fit: cover; display: block; }
.cat-image .acts { display: flex; gap: 6px; padding: 8px; background: #fafbfc; border-top: 1px solid var(--line); flex-wrap: wrap; }
.facts-box { display: grid; gap: 8px; font-size: 14px; }
.facts-box div { display: flex; gap: 10px; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 8px; background: var(--soft); }
.facts-box svg { width: 17px; height: 17px; color: #4a5056; flex: none; }
.facts-box a { margin-left: auto; font-weight: 600; white-space: nowrap; }
.radio-list { display: grid; gap: 8px; margin-top: 12px; }
.radio-opt { display: grid; grid-template-columns: 22px 1fr; gap: 4px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; }
.radio-opt.on { border-color: var(--pink); background: #fdf6f9; }
.radio-opt .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9aa0a6; margin-top: 1px; }
.radio-opt.on .dot { border: 5px solid var(--pink); }
.radio-opt small { grid-column: 2; margin: 0; font-weight: 400; }
.radio-opt select { grid-column: 2; margin: 4px 0 0 !important; min-height: 38px !important; padding: 6px 10px !important; }
.split-cats { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }

/* Round 3 components: TiHa price sync, scheduled banners. Builds on admin-next.css + admin-next-r2.css. */
.page-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 22px; }
.page-tabs span { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; font-size: 14px; font-weight: 600; color: #4a5056; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.page-tabs span.on { color: #a51c58; border-color: var(--pink); }
.page-tabs svg { width: 17px; height: 17px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.stat .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #f1f2f4; color: #4a5056; flex: none; }
.stat .ic svg { width: 20px; height: 20px; }
.stat.off .ic { background: #f1f2f4; } .stat.on .ic { background: var(--ok-bg); color: var(--ok); }
.stat small { margin: 0; font-size: 12.5px; }
.stat b { font-size: 16px; display: block; }
.step-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.step-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.step-card > header h2 { display: flex; gap: 10px; align-items: center; margin: 0; font-size: 18px; }
.step-card > header p { margin: 4px 0 0 36px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.step-card.locked { background: #fafbfc; }
.step-card.locked > *:not(header) { opacity: .5; }
.count.neutral { color: #4a5056; background: #f1f2f4; border-color: #e1e4e8; }
.price-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.price-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; background: #f7f8f9; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.price-table td { padding: 10px 12px; border-bottom: 1px solid #eef0f2; vertical-align: middle; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table .prod { display: flex; align-items: center; gap: 10px; }
.price-table .prod img { width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; }
.price-table .prod b { font-weight: 600; display: block; } .price-table .prod small { margin: 1px 0 0; }
.price-table .num { text-align: right; white-space: nowrap; font-weight: 600; }
.price-table .arrow { color: var(--muted); text-align: center; }
.diff-up { color: var(--bad); font-weight: 700; } .diff-down { color: var(--ok); font-weight: 700; }
.toggle-big { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; background: var(--soft); }
.toggle-big b { display: block; font-size: 15px; } .toggle-big small { margin: 2px 0 0; }
.toggle-big .switch { margin-left: auto; }
.issue-list { display: grid; gap: 8px; }
.issue { display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.issue svg { width: 18px; height: 18px; color: var(--warn); }
.issue small { grid-column: 2; margin: 0; }
.issue .button { grid-row: 1 / span 2; grid-column: 3; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
/* Banner manager */
.banner-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }
.bn-row { display: grid; grid-template-columns: 22px 84px minmax(0, 1fr) 44px; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #eef0f2; }
.bn-row.on { background: #fdf0f5; box-shadow: inset 3px 0 0 var(--pink); }
.bn-row img, .bn-row .noimg { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.bn-row .noimg { display: grid; place-items: center; background: var(--soft); color: #9aa0a6; }
.bn-row b { font-size: 15px; font-weight: 600; display: block; }
.bn-row .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-s { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; border-radius: 99px; padding: 3px 9px; background: #eef0f2; color: #4a5056; }
.chip-s svg { width: 13px; height: 13px; }
.chip-s.ok { background: var(--ok-bg); color: var(--ok); } .chip-s.warn { background: var(--warn-bg); color: var(--warn); } .chip-s.plan { background: #eef3fb; color: #2f5d9c; }
.bn-row .link { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.bn-row .link svg { width: 13px; height: 13px; }
.sq-tile { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.sq-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sq-tile .acts { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.sq-tile .acts button { background: #ffffffeb; }
.seg.full { display: flex; } .seg.full span { flex: 1; justify-content: center; padding: 0 8px; }
.when { display: grid; gap: 8px; margin-top: 8px; }
.when .radio-opt { font-weight: 600; }
.dt-row { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.dt-row label { font-size: 12px; font-weight: 600; color: var(--muted); }
.dt-row input { margin-top: 4px !important; min-height: 40px !important; padding: 8px 10px !important; font-size: 14px; }

/* ---------- Interactive parts (live pages) ---------- */
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast-host .toast { position: static; transform: none; box-shadow: 0 12px 40px #0000004d; white-space: normal; }
.toast.bad svg:first-child { color: #ff9aa5; } .toast.warn svg:first-child { color: #ffd27a; }
.toast .x { background: transparent; color: #fff; border: 0; min-height: 36px; padding: 0 6px; }
dialog.sheet { position: fixed; left: 50%; top: 10vh; transform: translateX(-50%); margin: 0; max-width: calc(100vw - 32px); max-height: 80vh; overflow: auto; border: 0; }
dialog.sheet.wide { width: 640px; }
dialog.sheet::backdrop { background: #00000070; }
dialog.sheet h2 svg { color: var(--pink); }
dialog.sheet .danger-title svg { color: var(--bad); }
.sort-placeholder { border: 2px dashed var(--pink); border-radius: 8px; background: #fdf0f5; margin: 2px 0; }
.is-dragging { position: relative; z-index: 20; box-shadow: 0 14px 34px #0000002e; background: #fff; pointer-events: none; }
body.is-sorting, body.is-sorting * { cursor: grabbing !important; user-select: none; }
[data-grip] { cursor: grab; touch-action: none; border: 0; background: transparent; min-height: 0; padding: 4px; color: #9aa0a6; }
[data-grip]:focus-visible { outline: 2px solid var(--pink); border-radius: 4px; }
.dropzone { border: 2px dashed #c3c8ce; border-radius: 12px; background: var(--soft); padding: 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.dropzone > svg { width: 40px; height: 40px; color: var(--pink); }
.dropzone strong { font-size: 17px; }
.dropzone.over { border-color: var(--pink); background: #fdf0f5; }
.dropzone-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.mode-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.mode-pick legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.radio-opt { position: relative; cursor: pointer; }
.radio-opt input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.radio-opt:has(input:checked) { border-color: var(--pink); background: #fdf6f9; }
.radio-opt:has(input:checked) .dot { border: 5px solid var(--pink); }
.radio-opt:has(input:focus-visible) { outline: 2px solid var(--pink); }
.img-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) 80px minmax(0, 2fr) minmax(140px, 1fr); gap: 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #eef0f2; font-size: 14px; }
.img-row.head { background: #f7f8f9; font-size: 12px; color: var(--muted); font-weight: 600; padding-block: 9px; }
.img-row.over { background: #fdf0f5; outline: 2px dashed var(--pink); outline-offset: -4px; }
.img-row .nm b { display: block; font-weight: 600; }
.img-row .nm small { margin: 2px 0 0; }
.img-row .thumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.new-thumb { position: relative; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.new-thumb img { width: 100%; height: 100%; object-fit: contain; }
.new-thumb .remove { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; background: #ffffffeb; }
.new-thumb .remove svg { width: 13px; height: 13px; }
.new-thumb.unused { opacity: .4; }
.new-thumb.bad { outline: 2px solid var(--bad); }
.drop-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); border: 1.5px dashed #c3c8ce; border-radius: 8px; padding: 10px 12px; }
.drop-hint svg { width: 16px; height: 16px; }
.img-row select { margin: 0; min-height: 40px; padding: 7px 10px; }
.progress { margin: 0 0 16px; }
.progress .bar { height: 10px; border-radius: 99px; background: #eef0f2; overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--pink); transition: width .2s; }
.big-ok.working { background: var(--soft); border-color: var(--line); }
.big-ok.working svg { color: var(--pink); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.thumb-button { position: relative; padding: 0; border: 0; background: none; min-height: 0; border-radius: 5px; }
.thumb-button .swap { position: absolute; inset: 0; display: grid; place-items: center; background: #23252ab3; color: #fff; border-radius: 5px; opacity: 0; transition: opacity .15s; font-size: 11px; font-weight: 700; }
.thumb-button:hover .swap, .thumb-button:focus-visible .swap, .thumb-button.busy .swap { opacity: 1; }
.thumb-button .swap svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .img-row { grid-template-columns: 1fr; }
  .two-panel, .two-col, .order-layout, .tiles-layout, .banner-layout, .split-cats { grid-template-columns: 1fr; }
  .bulk-bar { left: 12px; right: 12px; transform: none; flex-wrap: wrap; white-space: normal; }
  .stat-row { grid-template-columns: 1fr; }
  .tiha-facts { grid-template-columns: 1fr 1fr; }
}
.status-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; font-size: 14px; font-weight: 600; color: #4a5056; border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; }
.status-tabs a:hover { color: #a51c58; text-decoration: none; }
.status-tabs a.on { color: #a51c58; border-color: var(--pink); }
.status-tabs a b { font-size: 12px; background: #eef0f2; color: #555f68; border-radius: 99px; padding: 1px 8px; }
.status-tabs a.on b { background: #fce9f1; color: #a51c58; }
.status-tabs { overflow-x: auto; }
.cbox-label { display: grid; place-items: center; min-height: 44px; min-width: 34px; cursor: pointer; }
.cbox-label input { width: 20px; height: 20px; accent-color: var(--pink); }
.sel-table .product-row:hover { background: #fcf8fa; }
.sel-table .title-link { display: flex; flex-direction: column; min-width: 0; color: inherit; }
.sel-table .title-link:hover strong { color: var(--pink); }
.sel-table .product-title img, .sel-table .thumb-static img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 5px; background: #fff; display: block; }
body.has-bulk-bar main { padding-bottom: 120px; }
.bulk-bar { position: fixed; bottom: 22px; z-index: 30; }
.bulk-bar .all { background: transparent; border: 0; color: #ff9cc6; font-weight: 600; padding: 0 8px; }
/* Product editor (live) */
.product-form .lock-wrap { position: relative; margin-top: 22px; }
.product-form .lock-wrap.is-locked .product-editor { opacity: .38; filter: grayscale(1); pointer-events: none; user-select: none; }
.product-form .lock-wrap:not(.is-locked) .lock-note { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; }
.chip button { min-height: 0; padding: 2px; border: 0; background: transparent; color: inherit; }
.chip .chip-star svg { width: 15px; height: 15px; }
.chip:not(.main) .chip-star { color: #9aa0a6; }
.chip.add select { border: 0; margin: 0; min-height: 0; padding: 4px 6px; background: transparent; font-weight: 600; width: auto; min-width: 150px; }
.tile .replace { position: absolute; right: 6px; bottom: 6px; display: inline-flex; gap: 4px; align-items: center; min-height: 28px; padding: 2px 8px; font-size: 12px; border-radius: 6px; background: #ffffffeb; border: 1px solid var(--line); opacity: 0; transition: opacity .15s; }
.tile:hover .replace, .tile:focus-within .replace { opacity: 1; }
.tile .replace svg { width: 14px; height: 14px; }
.tile .grip, .tile .remove { min-height: 0; padding: 0; }
.tile.add { cursor: pointer; font-family: inherit; }
.tile.add.busy { opacity: .6; pointer-events: none; }
.image-grid.over { outline: 2px dashed var(--pink); outline-offset: 6px; border-radius: 10px; }
.mini-card .mini-noimg { width: 168px; height: 168px; display: grid; place-items: center; background: #f6f4f6; color: #b7b3b8; }
.mini-card .mini-noimg svg { width: 34px; height: 34px; }
input.switch-toggle { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: #cdd2d7; position: relative; flex: none; cursor: pointer; margin: 0; }
input.switch-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; transition: left .15s; }
input.switch-toggle:checked { background: var(--pink); }
input.switch-toggle:checked::after { left: 21px; }
input.switch-toggle:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.rte-tabs .seg button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #4a5056; border: 0; background: transparent; }
.rte-tabs .seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #0000001f; }
.rte-bar .b { border: 0; background: transparent; cursor: pointer; }
.rte-bar .b:hover { background: #e6e8eb; }
.rte-bar label.b { position: relative; }
.rte-bar label.b input[type=color] { position: absolute; inset: auto 4px 2px 4px; width: auto; height: 4px; min-height: 0; padding: 0; border: 0; margin: 0; }
.rte-bar.disabled { opacity: .45; pointer-events: none; }
.rte-bar select.sel { width: auto; min-height: 36px; margin: 0 6px 0 0; padding: 4px 8px; }
.rte-body { min-height: 260px; max-height: 70vh; overflow: auto; outline: none; }
.rte-body:focus-visible { box-shadow: inset 0 0 0 2px #cf4b87; }
.rich-admin { font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.7; color: #333; }
.rich-admin h2 { font-size: 22px; margin: 22px 0 10px; } .rich-admin h3 { font-size: 18px; margin: 18px 0 8px; } .rich-admin h4, .rich-admin h5 { font-size: 15px; margin: 14px 0 6px; }
.rich-admin p { margin: 0 0 12px; } .rich-admin img { max-width: 100%; height: auto; } .rich-admin figure { margin: 10px 0 16px; background: #f1f1f1; }
.rich-admin figcaption { font-size: 13px; font-style: italic; text-align: center; padding: 6px; }
.rich-admin table { border-collapse: collapse; width: 100%; margin: 0 0 12px; } .rich-admin td, .rich-admin th { border: 1px solid #ddd; padding: 8px 10px; }
.rte-html { width: 100%; min-height: 360px; border: 0; border-radius: 0; font-family: Consolas, monospace; font-size: 13px; margin: 0; }
.rte-preview { background: #f3f1f3; padding: 20px; display: grid; place-items: center; }
.phone-frame { width: 390px; max-width: 100%; border: 8px solid #23252a; border-radius: 28px; background: #f3f1f3; padding: 10px 0; max-height: 70vh; overflow: auto; }
.mini-card-desc { margin: 0 10px; background: #fff; border-radius: 18px; padding: 14px 16px; font-family: "BVP", system-ui, sans-serif; }
.mini-card-desc h3 { margin: 0 0 8px; font-size: 16px; }
.rich { font-size: 14px; line-height: 22px; color: #4a474d; overflow-wrap: anywhere; }
.rich h2 { font-size: 17px; line-height: 24px; color: #2b282d; margin: 18px 0 8px; } .rich h3 { font-size: 15.5px; color: #2b282d; margin: 16px 0 6px; } .rich h4, .rich h5, .rich h6 { font-size: 14px; margin: 12px 0 6px; }
.rich p { margin: 0 0 10px; } .rich img { width: 100%; height: auto; border-radius: 10px; display: block; } .rich figure { margin: 12px 0 14px; }
.rich figcaption { font-size: 12.5px; font-style: italic; text-align: center; color: #77737a; margin-top: 6px; }
.rich ol, .rich ul { padding-left: 20px; } .rich a { color: #c8296a; } .rich hr { border: 0; border-top: 1px solid #ece7eb; margin: 16px 0; }
.rich .table-wrap { overflow-x: auto; border: 1px solid #e6e1e5; border-radius: 10px; margin: 4px 0 12px; } .rich table { border-collapse: collapse; width: 100%; font-size: 13px; }
.rich td, .rich th { border-bottom: 1px solid #eee9ed; border-right: 1px solid #eee9ed; padding: 8px; }
.price-history-box summary { font-size: 13px; font-weight: 600; cursor: pointer; }
.savebar .grow svg { width: 17px; height: 17px; }
.step.done svg { width: 15px; height: 15px; }
.result-action { white-space: nowrap; }
/* Bulk add (live) */
.seg button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #4a5056; border: 0; background: transparent; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #0000001f; }
.seg button svg { width: 17px; height: 17px; }
.paste-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.paste-actions .muted { margin-right: auto; font-size: 14px; }
.toolbar .group-filter { min-width: 240px; }
.toggle-inline { cursor: pointer; }
.browse-more { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.cbox-input { width: 20px; height: 20px; accent-color: var(--pink); margin: 0; }
.tiha-browse .row > input { justify-self: center; }
.grid-table .w-name { width: 32%; } .grid-table .w-cat { width: 18%; } .grid-table .num-head, .grid-table td.num { text-align: right; white-space: nowrap; }
.grid-table select.invalid { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-bg); }
.inline-fix { display: flex; gap: 8px; align-items: center; }
.inline-fix input { max-width: 240px; }
.grid-table .mini-drop { border: 1.5px dashed #c3c8ce; cursor: pointer; min-height: 0; padding: 0; }
.grid-table .mini-drop.over, .grid-table .thumb-button.over { outline: 2px dashed var(--pink); }
.grid-table .thumb-button .mini-thumb { display: block; }
.skipped-box { margin-top: 18px; }
.skipped-box summary { font-weight: 600; cursor: pointer; }
.done-list .row a.button { justify-self: end; }

/* ---------- Thứ tự hiển thị (live page) ---------- */
.tree-list .node { grid-template-columns: 30px 56px minmax(0, 1fr) 36px; gap: 8px; padding: 6px 10px; }
.tree-list .node.child { padding-left: 34px; background: #fcfcfd; }
.tree-list .node.on { background: #fdf0f5; }
.tree-list .node.off b { color: var(--muted); }
.tree-list .node .noimg { width: 56px; height: 24px; border-radius: 4px; border: 1px dashed #c3c8ce; display: grid; place-items: center; color: #9aa0a6; }
.tree-list .node .noimg svg { width: 14px; height: 14px; }
.tree-list .node .pick { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; justify-items: start; width: 100%; gap: 1px; min-height: 40px; padding: 2px 4px; border: 0; background: transparent; text-align: left; font-weight: 400; min-width: 0; }
.tree-list .node .pick:hover { background: transparent; color: #a51c58; }
.tree-list .node .pick b { max-width: 100%; }
.tree-list .node .more { width: 36px; min-height: 36px; padding: 0; border-color: transparent; background: transparent; color: #6b7178; }
.tree-list .node .more:hover { border-color: var(--line); background: #fff; }
.tree .grip, .olist .grip, .tile-row .grip { min-height: 40px; width: 30px; padding: 0; border: 0; background: transparent; border-radius: 6px; }
.tree .grip:hover, .olist .grip:hover, .tile-row .grip:hover { background: #f1f2f4; color: #4a5056; }
.tree-children { min-height: 0; }
body.is-sorting .tree-children { min-height: 12px; }
.tree-group { background: #fff; }
.olist .row { grid-template-columns: 30px 30px 52px minmax(0, 1fr) 104px 80px; }
.olist .row .noimg { width: 52px; height: 52px; border: 1px dashed #c3c8ce; border-radius: 6px; display: grid; place-items: center; color: #9aa0a6; }
.olist .row.changed { background: #fff8e8; box-shadow: inset 3px 0 0 #e0a43a; }
.olist .row.off img, .olist .row.off .nm b { opacity: .6; }
.olist .tag-off { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: #eef0f2; color: #555f68; font-size: 11px; font-weight: 600; }
.olist .qa button { width: 36px; min-height: 36px; padding: 0; }
.olist.filtering .grip { visibility: hidden; pointer-events: none; }
.filter-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 14px; background: #fff8e8; color: #7a5310; font-size: 13px; line-height: 1.5; border-bottom: 1px solid var(--line); }
.filter-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.empty-list { padding: 40px 16px; text-align: center; color: var(--muted); }
.empty-list svg { width: 30px; height: 30px; }
.empty-list p { margin: 8px 0 0; }
.savebar .grow.dirty { color: #a51c58; font-weight: 600; }
.savebar .grow.bad { color: #b12735; font-weight: 600; }
.radio-opt.disabled { opacity: .5; cursor: not-allowed; }
dialog .radio-list { display: grid; gap: 8px; max-height: 52vh; overflow: auto; padding: 2px; }
.tile-row { grid-template-columns: 30px 60px minmax(0, .9fr) minmax(0, 1.1fr) 52px 40px; }
.tile-row.has-issue { background: #fff6f6; }
.tile-row .tile-name { display: grid; gap: 2px; min-width: 0; }
.tile-row .tile-name small { margin: 0; }
.tile-row small.bad { color: #b12735; font-weight: 600; }
.tile-row .tile-image { width: 56px; height: 56px; }
.tile-row .tile-image img { width: 56px; height: 56px; object-fit: contain; }
.tile-row .tile-image .noimg { width: 56px; height: 56px; }
.tile-row select.invalid, .tile-row input.invalid { border-color: #d0465a !important; }
button.icon-only { width: 40px; padding: 0; color: #6b7178; }
button.icon-only:hover { color: #b52732; }
.tiles-foot { display: flex; align-items: center; gap: 14px; padding: 12px 14px; flex-wrap: wrap; }
.tiles-foot small { margin: 0; }
.phone .ptiles { overflow-x: auto; scrollbar-width: thin; }
.phone .ptiles span { text-align: center; line-height: 1.25; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone .ptiles p { margin: 6px 0; font-size: 13px; }
@media (max-width: 760px) {
  .olist .row { grid-template-columns: 26px 30px 44px minmax(0, 1fr) 76px; }
  .olist .row .pr { display: none; }
  .tile-row { grid-template-columns: 30px 56px minmax(0, 1fr) 52px 40px; }
  .tile-row > select { grid-column: 3 / -1; }
  .phone { width: 100%; }
}

/* ---------- Danh mục (live page) ---------- */
.cat-table a.tr { color: inherit; text-decoration: none; }
.cat-table a.tr:hover { background: #fcf8fa; }
.cat-table a.tr:hover .ic { background: #fdf0f5; }
.cat-table .name .label { min-width: 0; display: grid; }
.cat-table .noimg { width: 72px; height: 30px; flex: none; border-radius: 4px; border: 1px dashed #c3c8ce; display: grid; place-items: center; color: #9aa0a6; }
.cat-table .noimg svg { width: 15px; height: 15px; }
.cat-table .child.orphan .name { padding-left: 0; }
.cat-table .child.orphan .name::before { display: none; }
.cat-table .empty-list { padding: 28px 16px; margin: 0; }
.cat-panel { border: 1px solid var(--line); border-radius: 10px; padding: 20px; position: sticky; top: 16px; }
.cat-panel .panel-title { display: flex; justify-content: space-between; align-items: center; margin: 0; }
.cat-panel .panel-title small { margin: 0; font-size: 13px; font-weight: 600; }
.cat-image.over { outline: 2px dashed var(--pink); outline-offset: 2px; }
.cat-noimg { display: flex; gap: 10px; align-items: center; justify-content: center; aspect-ratio: 2.5; padding: 12px; background: var(--soft); color: #6b7178; font-size: 13px; text-align: center; }
.cat-noimg svg { width: 22px; height: 22px; flex: none; }
.cat-image .acts .remove-image { color: #b52732; }
.field-error { display: block; color: #b12735; font-size: 13px; margin-top: 4px; font-weight: 600; }
.field-error:empty { display: none; }
.hint-line { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.hint-line svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.panel-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel-actions .grow { flex: 1; }
dialog.sheet .list .more { color: var(--muted); font-size: 13px; }
dialog.sheet .list .noimg { width: 36px; height: 36px; display: grid; place-items: center; border: 1px dashed #c3c8ce; border-radius: 4px; color: #9aa0a6; flex: none; }
dialog.sheet .list .noimg svg { width: 16px; height: 16px; }
dialog.sheet .radio-list { margin-top: 14px; }
dialog.sheet.wide { max-width: calc(100vw - 32px); }
@media (max-width: 760px) { .cat-panel { position: static; } .cat-table .tr { grid-template-columns: minmax(0, 1fr) 54px 92px 30px; } }

/* ---------- Kết nối TiHa (live pages) ---------- */
.page-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; font-size: 14px; font-weight: 600; color: #4a5056; border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; }
.page-tabs a:hover { color: #a51c58; text-decoration: none; }
.page-tabs a.on { color: #a51c58; border-color: var(--pink); }
.badge.red { background: var(--bad-bg); color: var(--bad); }
.badge.amber { background: var(--warn-bg); color: var(--warn); }
.chip-s.bad { background: var(--bad-bg); color: var(--bad); } .chip-s.neutral { background: #eef0f2; color: #4a5056; }
.readiness { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 12px; border: 1px solid; margin-bottom: 16px; }
.readiness.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.readiness.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.readiness .ic svg { width: 28px; height: 28px; }
.readiness b { display: block; font-size: 16px; color: #23252a; } .readiness small { margin: 2px 0 0; }
.check-list { display: grid; gap: 10px; }
.check-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.check-item .ic svg { width: 22px; height: 22px; }
.check-item.ok .ic { color: var(--ok); } .check-item.warn .ic { color: var(--warn); } .check-item.bad .ic { color: var(--bad); }
.check-item b { font-size: 15px; } .check-item p { margin: 2px 0 0; font-size: 14px; color: #444b53; }
.check-item details { margin-top: 6px; } .check-item summary { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.check-item code { display: block; margin-top: 4px; padding: 6px 8px; background: #f5f6f8; border-radius: 6px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.queue-table td small { margin-top: 3px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.review-tools { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }
.review-tools .seg { flex-wrap: wrap; }
.review-tools .search { flex: 1; min-width: 220px; margin: 0; }
.price-table th.num, .price-table td.num { text-align: right; white-space: nowrap; }
.price-table td.arrow { color: #9aa0a6; width: 20px; text-align: center; }
.price-table td.strong { font-weight: 700; }
.price-table td.up b { color: #b12735; } .price-table td.down b { color: #247247; }
.price-table td.num small { margin: 0; }
.price-table td.act { text-align: right; white-space: nowrap; }
.price-table td.nowrap { white-space: nowrap; font-size: 13px; color: #4a5056; }
.price-table td small { margin: 3px 0 0; }
.price-table .prod .noimg { width: 44px; height: 44px; display: grid; place-items: center; border: 1px dashed #c3c8ce; border-radius: 6px; color: #9aa0a6; flex: none; }
.price-table .prod .noimg svg { width: 18px; height: 18px; }
.price-table.flat { border: 0; border-radius: 0; }
.price-table a.plain { color: inherit; text-decoration: none; } .price-table a.plain:hover b { color: #a51c58; }
.price-table .tag-off { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: #eef0f2; color: #555f68; font-size: 11px; font-weight: 600; }
.review-table tr.st-matched td { background: #fbfdfb; }
label.toggle-big { cursor: pointer; font-size: 14px; font-weight: 400; }
label.toggle-big input.switch-toggle { margin-left: auto; }
label.toggle-big input.switch-toggle:disabled { cursor: not-allowed; opacity: .6; }
.apply-all { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.apply-all .muted { font-size: 13px; }
.history-cols { margin-top: 4px; }
@media (max-width: 760px) { .check-item { grid-template-columns: 24px minmax(0, 1fr); } .check-item .badge { grid-column: 2; justify-self: start; } .stat-row { grid-template-columns: 1fr; } .two-col { grid-template-columns: 1fr; } }

/* ---------- Banner (live page) ---------- */
.banner-cards .bn-row { grid-template-columns: 30px minmax(0, 1fr); padding: 10px 12px; gap: 8px; }
.banner-cards .bn-link { display: grid; grid-template-columns: 84px minmax(0, 1fr) 30px; gap: 14px; align-items: center; color: inherit; text-decoration: none; min-width: 0; }
.banner-cards .bn-link:hover b { color: #a51c58; }
.banner-cards .bn-text { min-width: 0; }
.banner-cards .bn-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner-cards .ic { color: var(--pink); display: grid; place-items: center; }
.banner-cards .grip { min-height: 44px; width: 30px; padding: 0; border: 0; background: transparent; color: #9aa0a6; cursor: grab; }
.banner-cards .grip:hover { background: #f1f2f4; }
.banner-cards .list-hint { padding: 12px 14px; margin: 0; display: flex; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.banner-cards .list-hint svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.sq-tile.over { outline: 2px dashed var(--pink); outline-offset: 2px; }
.cat-noimg.sq { aspect-ratio: 1; height: 100%; }
.sq-tile .acts label.button { background: #ffffffeb; }
.seg.full .seg-opt { flex: 1; margin: 0; }
.seg-opt { position: relative; display: block; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #4a5056; }
.seg-opt input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #0000001f; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 1px; }
fieldset.field { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.when .dt-row span { display: grid; font-size: 12px; font-weight: 600; color: var(--muted); }
.hint-line.warning { color: #8a5a12; }
small.warning { color: #8a5a12; }

.history-cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.chip-s { white-space: nowrap; }
.price-table.flat .prod b { font-size: 13.5px; }
.when .dt-row { grid-template-columns: 1fr; }
.when .dt-row input { width: 100%; }

/* ---------- Overview to-do ---------- */
.todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.todo { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.todo:hover { border-color: #e7b8cc; background: #fdf7fa; text-decoration: none; }
.todo svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.todo b { display: block; font-size: 14.5px; } .todo small { margin: 3px 0 0; }
.todo.t-warn svg { color: var(--warn); } .todo.t-ok svg { color: var(--ok); } .todo.t-neutral svg { color: #6b7178; }

/* ---------- Banner: chọn nhiều, đổi ảnh nhanh, banner hàng loạt ---------- */
.banner-cards .bn-row { grid-template-columns: 30px 26px minmax(0, 1fr) 40px; }
.banner-cards .bn-row.busy { opacity: .6; pointer-events: none; }
.banner-cards .swap-image { color: #4a5056; }
.banner-cards .swap-image:hover { color: var(--pink); }
.list-select { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.dt-row.plain { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dt-row.plain label { font-size: 13px; }
.seg .seg-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #4a5056; text-decoration: none; }
.seg .seg-link.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #0000001f; }
.seg .seg-link svg { width: 17px; height: 17px; }
.batch-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr) 52px 40px; gap: 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #eef0f2; font-size: 14px; }
.batch-row.head { min-height: 40px; background: #f7f8f9; font-size: 12px; color: var(--muted); font-weight: 600; }
.batch-row.replace { grid-template-columns: minmax(0, 1fr) 96px 150px 90px; }
.batch-row.unmatched { grid-template-columns: 150px minmax(0, 360px); }
.batch-row.has-issue { background: #fff6f6; }
.batch-row img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.batch-row img.old { opacity: .75; }
.batch-row .thumb-cell { display: grid; gap: 4px; }
.batch-row .thumb-cell small, .batch-row .title-cell small { margin: 0; }
.batch-row .title-cell { display: grid; gap: 4px; min-width: 0; }
.batch-row .title-cell b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-row input:not([type=checkbox]), .batch-row select { margin: 0 !important; min-height: 40px !important; padding: 7px 10px !important; font-size: 14px; }
.batch-row input.invalid { border-color: #d0465a !important; }
.batch-row .target-cell { display: grid; gap: 6px; }
small.ok-text { color: var(--ok); }
small.bad { color: #b12735; font-weight: 600; }
.apply-bar.wrap { flex-wrap: wrap; row-gap: 8px; }
.apply-bar .inline-dt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.apply-bar .inline-dt input { margin: 0 !important; min-height: 38px !important; padding: 6px 8px !important; width: auto; }
.unmatched-card { margin-top: 16px; }
.done-list .done-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 24px; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #eef0f2; color: inherit; text-decoration: none; }
.done-list .done-row img, .done-list .done-row .noimg { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.done-list .done-row b { display: block; } .done-list .done-row small { margin: 0; }
.done-list .done-row svg { color: var(--ok); } .done-list .done-row.bad svg { color: var(--bad); }
.big-ok.warn { background: var(--warn-bg); border-color: var(--warn-line); }
@media (max-width: 760px) {
  .batch-row, .batch-row.replace, .batch-row.unmatched { grid-template-columns: 96px minmax(0, 1fr); }
}

/* ---------- Tờ rơi (flyers) ---------- */
.flyer-cards .poster-thumb, .flyer-cards .bn-link img.poster-thumb { width: 63px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.flyer-cards .bn-link { grid-template-columns: 63px minmax(0, 1fr) 30px; }
.flyer-cards .noimg.poster-thumb { display: grid; place-items: center; background: var(--soft); color: #9aa0a6; }
.page-grid { display: grid; gap: 8px; margin-top: 6px; }
.page-row { display: grid; grid-template-columns: 30px 22px 54px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.page-row .no { font-weight: 700; color: #6b7178; text-align: center; }
.page-row .page-thumb, .page-row .page-thumb img { width: 54px; height: 72px; }
.page-row .page-thumb img { object-fit: cover; border-radius: 6px; display: block; }
.page-row .page-name { font-size: 13px; color: #4a5056; }
.page-row .page-acts { display: flex; gap: 4px; }
.page-row .grip { min-height: 40px; width: 30px; padding: 0; border: 0; background: transparent; color: #9aa0a6; cursor: grab; }
.page-drop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; padding: 12px; border: 1.5px dashed #c3c8ce; border-radius: 10px; background: var(--soft); }
.page-drop.over { border-color: var(--pink); background: #fdf0f5; }
.page-drop > svg { width: 24px; height: 24px; color: var(--pink); }
.page-drop > span { flex: 1; min-width: 200px; display: grid; } .page-drop small { margin: 2px 0 0; }
.field-label small.inline { display: inline; margin-left: 6px; font-weight: 400; }
.flyer-preview { display: grid; gap: 6px; }
.phone.small { width: 100%; max-width: 300px; height: 470px; border-radius: 26px; border-width: 7px; background: #3d3a40; position: relative; display: grid; place-items: center; margin: 0 auto; }
.phone.small .pop { position: relative; width: 82%; display: grid; gap: 8px; justify-items: center; }
.phone.small .pop .pages { width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.phone.small .pop .pages img { width: 100%; height: 100%; object-fit: cover; }
.phone.small .pop .pages .empty { color: #9aa0a6; font-size: 13px; }
.phone.small .pop .x { position: absolute; top: -14px; right: -14px; width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: #fff; font-size: 20px; line-height: 1; }
.phone.small .pop .dots { display: flex; gap: 6px; }
.phone.small .pop .dots button { width: 8px; height: 8px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: #ffffff80; }
.phone.small .pop .dots button.on { background: #fff; width: 20px; border-radius: 99px; }
.phone.small .pop .cta { background: #c8296a; color: #fff; font-weight: 700; border-radius: 99px; padding: 10px 22px; font-size: 14px; }

/* ---------- Khuyến mãi (promotions) ---------- */
.promo-switch { display: grid; gap: 10px; margin-bottom: 16px; padding: 14px 16px; }
.promo-switch.on .toggle-big { background: var(--ok-bg); }
.promo-switch .toggle-big .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--pink); flex: none; }
.promo-gates { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.promo-cards .bn-link { grid-template-columns: 48px minmax(0, 1fr) 30px; }
.promo-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: #fdf0f5; color: var(--pink); }
.promo-icon.gift { background: #eef7f1; color: var(--ok); }
.promo-icon svg { width: 24px; height: 24px; }
.promo-layout { grid-template-columns: minmax(0, 1fr) minmax(420px, 540px); }
.pick-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.pick-tools input[type="search"] { grid-column: 1 / -1; }
.qty-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qty-row label { display: grid; gap: 4px; font-size: 13px; }
.pick-tools input[type="search"], .pick-tools select { min-height: 44px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; white-space: nowrap; min-height: 44px; }
.pick-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.pick-list { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pick-row { display: grid; grid-template-columns: 24px 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400; min-height: 56px; }
.pick-row:last-child { border-bottom: 0; }
.pick-row.on { background: #fdf0f5; }
.pick-row input { width: 20px; height: 20px; margin: 0; }
.pick-row img, .pick-row .noimg { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; background: var(--soft); display: grid; place-items: center; color: #9aa0a6; }
.pick-text { display: grid; gap: 2px; min-width: 0; }
.pick-text b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-text small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; color: #6b7178; font-size: 13px; }
.pick-list .hint { padding: 14px; margin: 0; }
.gift-list { display: grid; gap: 8px; }
.gift-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 76px auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.gift-thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; color: var(--ok); position: relative; overflow: hidden; padding: 0; }
.gift-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gift-fields { display: grid; gap: 4px; min-width: 0; }
.gift-fields small { margin: 0; }
.gift-qty { display: grid; gap: 2px; font-size: 13px; font-weight: 600; }
.gift-qty input { width: 76px; min-height: 40px; }
.gift-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gift-add input { flex: 1 1 100%; min-height: 44px; }
.gift-browse { display: grid; max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.gift-browse .pick-row { grid-template-columns: 24px minmax(0, 1fr); }
.radio-list.compact { margin-top: 8px; }
.promo-preview { display: grid; gap: 6px; }
.phone.small.promo-phone { height: auto; min-height: 420px; padding: 16px 12px; place-items: start stretch; gap: 12px; align-content: start; background: #f3f1f3; }
.pp-card { position: relative; background: #fff; border-radius: 14px; padding: 10px; display: grid; gap: 6px; }
.pp-img { height: 120px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; color: #b7b3b8; overflow: hidden; }
.pp-img img { width: 100%; height: 100%; object-fit: contain; }
.pp-badge { position: absolute; top: 14px; left: 14px; background: #c8296a; color: #fff; font-size: 13px; font-weight: 700; border-radius: 99px; padding: 4px 10px; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-card b { font-size: 14px; }
.pp-price { color: #c8296a; font-weight: 700; font-size: 15px; }
.pp-box { background: #fff; border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.pp-box > b { font-size: 15px; }
.pp-opt { display: grid; grid-template-columns: 20px auto minmax(0, 1fr); gap: 8px; align-items: center; font-size: 14px; font-weight: 500; min-height: 44px; border: 1px solid #e5e1e6; border-radius: 10px; padding: 6px 10px; }
.pp-opt:has(.dot:only-child), .pp-opt:not(:has(img)) { grid-template-columns: 20px minmax(0, 1fr); }
.pp-opt img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.pp-opt small { display: block; margin: 2px 0 0; color: #6b676d; font-size: 13px; }
.pp-opt .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c3bec4; }
.pp-opt .dot.on { border-color: #c8296a; box-shadow: inset 0 0 0 4px #fff; background: #c8296a; }
.pp-note { color: #6b676d; font-size: 13px; margin: 0; }
@media (max-width: 1100px) { .promo-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .pick-tools { grid-template-columns: 1fr; }
  .gift-row { grid-template-columns: 56px minmax(0, 1fr); }
  .gift-row .gift-qty, .gift-row .page-acts { grid-column: 2; }
}

/* Status tabs scroll sideways instead of widening the page on a phone (Banner, Tờ rơi, Khuyến mãi). */
.status-tabs { flex-wrap: wrap; }
.status-tabs a, .status-tabs span { flex: none; white-space: nowrap; }
@media (max-width: 760px) { .status-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; } }
.banner-layout > section { min-width: 0; }
@media (max-width: 760px) {
  .page-heading { flex-wrap: wrap; }
  .page-heading > div:first-child { flex: 1 1 220px; min-width: 0; }
  .page-heading .actions { flex-wrap: wrap; min-width: 0; }
  .chip.add { max-width: 100%; min-width: 0; }
  .chip.add select { min-width: 0; max-width: calc(100vw - 90px); }
}
/* Products list on a phone: tick | photo + name across, price and status under the name. */
@media (max-width: 760px) {
  .sel-table .product-row { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; padding: 12px 0; }
  .sel-table .product-row > .product-title { grid-column: 2 / -1; min-width: 0; }
  .sel-table .product-row > .category, .sel-table .product-row > a:last-child { display: none; }
  .sel-table .product-row > .price-cell { grid-column: 2; padding-left: 0; }
  .sel-table .product-row.table-heading { display: none; }
}
/* Banner / Tờ rơi / Khuyến mãi lists on a phone: smaller picture, no chevron, names on two lines. */
@media (max-width: 760px) {
  .banner-cards .bn-row { grid-template-columns: 26px 24px minmax(0, 1fr) auto; gap: 6px; padding: 10px 8px; }
  .banner-cards .grip { width: 26px; }
  .banner-cards .bn-link, .flyer-cards .bn-link, .promo-cards .bn-link { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
  .banner-cards .bn-link .ic { display: none; }
  .banner-cards .bn-link > img, .banner-cards .bn-link > .noimg { width: 52px; height: 52px; }
  .flyer-cards .poster-thumb, .flyer-cards .bn-link img.poster-thumb { width: 42px; height: 56px; }
  .promo-icon { width: 44px; height: 44px; }
  .banner-cards .bn-text b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .bn-row .meta { gap: 4px; }
}

/* ====================================================================================
   Closing block (review 11/2026). Keep it last: it brings every control to the shop's
   rules (touch targets at least 44px, text at least 13px), makes every drag handle work
   on touch screens, stacks the two step-2 lists on phones and styles the helpers added
   in catalog-kit.js. Sizes only; colours and layout stay as they were.
   ==================================================================================== */

/* ---------- Drag handles: the finger drags the row instead of scrolling the page ---------- */
.grip, [data-grip] { touch-action: none; }

/* ---------- Touch targets: at least 44px ---------- */
button, .button { min-height: 44px; }
.button.sm, button.sm { min-height: 44px; padding: 6px 12px; }
button.icon-only, .button.icon-only { width: 44px; min-width: 44px; padding: 0; }
.bulk-bar button, .bulk-bar .button { min-height: 44px; }
.toast button { min-height: 44px; }
.toast .x { min-height: 44px; min-width: 44px; padding: 0; }
.icon-link { width: 44px; height: 44px; }
.menu-toggle { min-width: 44px; min-height: 44px; }
.gallery-row button { width: 44px; min-height: 44px; padding: 8px; }
.media-actions button { width: 44px; height: 44px; padding: 10px; }
.media-pagination .button, .media-pagination button, .pagination .button { min-width: 44px; }
.check { min-height: 44px; }
.back { min-height: 44px; }
.seg span, .seg button, .seg .seg-link, .seg-opt span, .rte-tabs .seg button { min-height: 44px; }
.chip { min-height: 44px; }
.chip .chip-star, .chip .chip-x { min-width: 44px; min-height: 44px; padding: 0; display: inline-grid; place-items: center; border: 0; background: transparent; }
.chip.add select { min-height: 40px; }
.radio-opt { min-height: 44px; align-content: center; }
.facts-box div { min-height: 44px; }
.facts-box a { display: inline-flex; align-items: center; min-height: 44px; }
.product-row > a:last-child { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.result .result-action, a.plain { min-height: 44px; }
/* Selects and text fields that had been made smaller inside tables and tool rows. */
.grid-table input:not([type=checkbox]), .grid-table select,
.apply-bar select, .apply-bar .inline-dt input,
.list-tools input, .list-tools select,
.tile-row input:not([type=checkbox]), .tile-row select,
.radio-opt select, .dt-row input,
.batch-row input:not([type=checkbox]), .batch-row select,
.img-row select, .gift-qty input, .rte-bar select.sel { min-height: 44px !important; }
.rte-bar .sel { height: 44px; }
.rte-bar .b { min-width: 44px; height: 44px; }
/* Tick boxes: the label around the box is the target. */
.cbox-label { min-width: 44px; min-height: 44px; }
.hit-label { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.pick-row { min-height: 56px; }
.list-select { min-height: 44px; }
/* Drag handles and row buttons. */
.tree .grip, .olist .grip, .tile-row .grip, .banner-cards .grip, .page-row .grip { width: 44px; min-height: 44px; }
.tree-list .node { grid-template-columns: 44px 56px minmax(0, 1fr) 44px; }
.tree-list .node .more { width: 44px; min-height: 44px; }
.tree-list .node .pick { min-height: 44px; }
.olist .row { grid-template-columns: 30px 44px 52px minmax(0, 1fr) 104px 92px; }
.olist .qa button { width: 44px; min-height: 44px; }
.bn-row { grid-template-columns: 44px 44px minmax(0, 1fr) 44px; }
.tile-row { grid-template-columns: 44px 60px minmax(0, .9fr) minmax(0, 1.1fr) 52px 44px; }
.page-row { grid-template-columns: 44px 22px 54px minmax(0, 1fr) auto; }
/* Photo tiles: handle, remove and replace. */
.tile .grip, .tile .remove { width: 44px; height: 44px; }
.tile .replace { min-height: 44px; padding: 4px 12px; font-size: 13px; }
.tile img { cursor: pointer; }
.tile.busy, .tile-image.busy { opacity: .55; pointer-events: none; }
/* No hover on a touch screen: buttons that only appeared on hover are always shown there. */
@media (hover: none) {
  .tile .replace { opacity: 1; }
  .thumb-button .swap { opacity: 1; background: #23252a80; }
}
/* The small "bỏ ảnh" cross keeps its look; its touch area is the whole 44px corner. */
.new-thumb { width: 72px; height: 72px; }
.new-thumb .remove { top: 0; right: 0; width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-items: start end; padding: 3px; }
.new-thumb .remove svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #ffffffeb; }
/* Preview dots of the flyer mock-up: small dots, full-size touch area. */
.phone.small .pop .dots { gap: 0; }
.phone.small .pop .dots button { position: relative; width: 28px; height: 44px; background: transparent; }
.phone.small .pop .dots button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #ffffff80; }
.phone.small .pop .dots button.on { width: 44px; background: transparent; }
.phone.small .pop .dots button.on::before { width: 20px; margin-left: -10px; border-radius: 99px; background: #fff; }

/* ---------- Text: at least 13px ---------- */
small, .badge, .table-heading, .plain-table th, .account, .nav-label, .image-unavailable,
.gallery-row input, .media-item small, .media-choice span,
.plain-table.stack-on-mobile td[data-label]::before,
.nav-new, .tiha-facts dt, .fetched, .chip small, .tile .cover, .mini-card s,
.grid-table th, .grid-table .from-tiha, .tiha-browse .row.head,
.status-tabs b, .status-tabs a b, .price-cell small, .rte-foot, .tree .node .n,
.tile-row.th, .cat-table .tr.th, .stat small, .price-table th, .chip-s, .bn-row .link,
.dt-row label, .when .dt-row span, .img-row.head, .thumb-button .swap, .rich figcaption,
.olist .tag-off, .price-table .tag-off, .check-item summary, .check-item code, .batch-row.head { font-size: 13px; }

/* ---------- Phones (up to 760px) ---------- */
@media (max-width: 760px) {
  /* Lists with a handle and a tick box: both keep a 44px column. */
  .banner-cards .bn-row { grid-template-columns: 44px 44px minmax(0, 1fr) auto; gap: 4px; padding: 10px 4px; }
  .banner-cards .grip { width: 44px; }
  .sel-table .product-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); }
  .olist .row { grid-template-columns: 26px 44px 44px minmax(0, 1fr) 92px; gap: 6px; padding: 7px 8px; }
  .tile-row { grid-template-columns: 44px 56px minmax(0, 1fr) 52px 44px; gap: 8px; padding: 8px; }
  .page-row { grid-template-columns: 44px 22px 54px minmax(0, 1fr); }
  .page-row .page-acts { grid-column: 1 / -1; justify-content: flex-end; }
  .tree-list .node.child { padding-left: 22px; }
  /* "Thêm nhiều → Chọn từ hàng TiHa": one stacked card per code instead of six clipped columns. */
  .tiha-browse .row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 2px 10px; align-items: start; }
  .tiha-browse .row.head { display: none; }
  .tiha-browse .row > :nth-child(1) { grid-column: 1; grid-row: 1 / span 4; align-self: center; }
  .tiha-browse .row > :nth-child(2) { grid-column: 2; grid-row: 1; overflow-wrap: anywhere; }
  .tiha-browse .row > :nth-child(5) { grid-column: 3; grid-row: 1; }
  .tiha-browse .row > :nth-child(3) { grid-column: 2 / -1; grid-row: 2; overflow-wrap: anywhere; }
  .tiha-browse .row > :nth-child(4) { grid-column: 2 / -1; grid-row: 3; color: var(--muted); }
  .tiha-browse .row > :nth-child(6) { grid-column: 2 / -1; grid-row: 4; }
  .tiha-browse .row > :nth-child(6):empty { display: none; }
  /* Result lists of "Thêm nhiều" and "Thay ảnh hàng loạt": name on top, status and button under it. */
  .done-list .row { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px; }
  .done-list .row > :nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .done-list .row > :nth-child(2) { grid-column: 2 / -1; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
  .done-list .row > :nth-child(3) { grid-column: 2; grid-row: 2; min-width: 0; overflow-wrap: anywhere; }
  .done-list .row > :nth-child(4) { grid-column: 3; grid-row: 2; justify-self: end; }
  .done-list .row > :nth-child(5) { grid-column: 1 / -1; grid-row: 3; justify-self: end; }
  .done-list .row > :nth-child(5):empty { display: none; }
  .apply-bar select { min-width: 0; max-width: 100%; }
  .savebar { flex-wrap: wrap; }
  dialog.sheet { width: auto; }
}

/* ---------- Helpers added in catalog-kit.js ---------- */
.done-list .row.bad, .done-list .done-row.bad { background: #fff6f6; }
.done-list .row small { margin: 2px 0 0; }
/* How a money or percent field was read, right under the field. */
.num-note { display: block; margin: 4px 0 0; font-size: 13px; font-weight: 600; min-height: 20px; }
.num-note.ok { color: #247247; }
.num-note.bad { color: #b12735; }
.discount-warning { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: #fff7e8; }
.discount-warning span { display: grid; gap: 8px; justify-items: start; }
/* The session ended: stays on the page so typed text can be copied. */
.session-notice { position: sticky; top: 8px; z-index: 40; display: grid; gap: 8px; box-shadow: 0 8px 24px #00000026; }
.session-notice p { margin: 0; font-size: 14px; }
.session-notice .session-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* "Đổi vị trí" dialog opened by a tap on a drag handle. */
dialog.move-sheet { width: 420px; }
dialog.sheet h2 svg { flex: none; }
dialog.move-sheet h2 svg { color: var(--pink); }
.move-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.move-actions button { min-height: 48px; }
.dialog-problem { margin: 12px 0 0; }
/* "Chọn quà từ TiHa" dialog. */
.gift-browse-box { display: grid; gap: 10px; }
.gift-browse-box input[type="search"] { margin: 0; }
.gift-browse-box p { margin: 0; }
.gift-browse .pick-row.dis { color: #8a9097; }
.gift-browse:empty { display: none; }

/* 12/11/2026 (rà soát cuối): vùng bấm tối thiểu 44px cho menu, logo, đường dẫn trong bảng và các dòng "Chi tiết". */
.nav a { min-height: 44px; }
.topbar .brand { min-height: 44px; display: inline-flex; align-items: center; }
main td a:not(.button), main th a:not(.button), main li a:not(.button), main p a:not(.button), main h2 a:not(.button), main h3 a:not(.button), main .panel-heading a:not(.button), main header a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; }
main summary { padding-block: 13px; cursor: pointer; }
main a:not([class]) { display: inline-flex; align-items: center; min-height: 44px; }
main a[class] { min-height: 44px; }
main summary { padding-block: 15px; }
main a[class] { min-width: 44px; }
