:root {
  --brand: #00a651;
  --brand-dark: #008a43;
  --brand-soft: #e6f7ee;
  --accent: #ff7a1a;
  --accent-soft: #fff1e6;
  --ink: #17212b;
  --ink-2: #4a5866;
  --muted: #7b8794;
  --line: #e4e8ec;
  --bg: #f5f7f8;
  --card: #ffffff;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warn: #d98e04;
  --warn-soft: #fff6dd;
  --info: #2f6fed;
  --info-soft: #e9f0fe;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand-tld { color: var(--brand); }
.top-links { margin-left: auto; display: flex; gap: 4px; }
.top-links a { text-decoration: none; padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.top-links a:hover { background: var(--bg); color: var(--brand-dark); }
.portal-label { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--brand-soft); color: var(--brand-dark); white-space: nowrap; }
.top-user { margin-left: auto; font-size: 13px; font-weight: 600; opacity: .8; }

/* Cổng nền tảng: thanh trên tối để phân biệt với site khách */
.portal-platform .topbar { background: #14212b; border-bottom-color: #14212b; color: #fff; }
.portal-platform .portal-label { background: rgba(255,255,255,.12); color: #fff; }
/* ===== Cổng vận hành: bố cục menu trái + nội dung ===== */
.portal-platform { background: #f4f5f7; }
.portal-platform .topbar { position: sticky; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.top-site { margin-left: auto; color: #cfd6dd; font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.top-site:hover { background: rgba(255,255,255,.1); color: #fff; }
.portal-platform .top-user { margin-left: 0; display: inline-flex; align-items: center; gap: 8px; opacity: 1; color: #e6ebf0; }
.top-avatar { width: 30px; height: 30px; border-radius: 50%; background: #c8682c; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.adm { max-width: 1320px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 24px; align-items: start; }
.adm-nav { position: sticky; top: 72px; padding: 16px 0; display: flex; flex-direction: column; gap: 2px; }
.adm-group { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 14px 12px 6px; }
.adm-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.adm-link:hover { background: #e9ecef; color: var(--ink); }
.adm-link.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.adm-link.on i { background: #fff1e6; }
.adm-link i { font-style: normal; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; flex: none; }
.adm-link span { flex: 1; }
.adm-link em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
/* Thẻ "Tải ứng dụng" dưới menu trái cổng xưởng */
.ws-app { box-sizing: border-box; width: 100%; min-width: 0; margin: 18px 0 0; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 4px; font-size: 13.5px; overflow: hidden; }
.ws-app .small { font-size: 12px; line-height: 1.4; }
.ws-app-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; min-width: 0; }
.ws-app .vqr { flex: none; padding: 5px; border-radius: 10px; border: 1px solid var(--line); background: #fff; box-sizing: border-box; }
.ws-app .vqr img, .ws-app .vqr canvas { width: 100% !important; height: 100% !important; }
.ws-app-btns { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 10px; min-width: 0; }
.wsa-btn { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 8px; border-radius: 10px; background: #111827; color: #fff; text-decoration: none; transition: transform .15s, background .15s; }
.wsa-btn:hover { background: #000; transform: translateY(-1px); }
.wsa-btn svg { width: 16px; height: 16px; flex: none; }
.wsa-btn span { display: grid; min-width: 0; line-height: 1.15; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsa-btn small { font-size: 9px; font-weight: 500; opacity: .75; }
.wsa-btn.soon { background: #374151; }
.ws-app-hint { font-size: 12px; line-height: 1.45; color: var(--muted); min-width: 0; }
@media (max-width: 900px) { .ws-app { display: none; } } /* điện thoại: menu là thanh ngang → ẩn thẻ */
/* Ô menu bị cảnh báo (Công nợ 5%): nền đỏ nhạt + viền đỏ nhấp nháy để xưởng chú ý */
.adm-link.warn { background: #fdecec; color: #b4232a; box-shadow: inset 0 0 0 1.5px #f3b5b7; animation: warnPulse 1.4s ease-in-out infinite; }
.adm-link.warn i { background: #fff; }
.adm-link.warn.on { background: #fff; box-shadow: inset 0 0 0 1.5px #e5484d, var(--shadow); }
.adm-link .warn-dot { animation: warnDot 1.4s ease-in-out infinite; }
@keyframes warnPulse { 0%, 100% { box-shadow: inset 0 0 0 1.5px #f3b5b7, 0 0 0 0 rgba(229, 72, 77, 0); }
  50% { box-shadow: inset 0 0 0 1.5px #e5484d, 0 0 0 5px rgba(229, 72, 77, .22); background-color: #fbd9da; } }
@keyframes warnDot { 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .adm-link.warn, .adm-link .warn-dot { animation: none; } }
.adm-main { min-width: 0; padding: 20px 0 8px; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.adm-head h1 { font-size: 24px; margin: 0; }
.adm-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.seg-chips { display: flex; gap: 4px; background: #e9ecef; padding: 4px; border-radius: 10px; }
.seg-chips button { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.seg-chips button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
/* Cần xử lý */
.todo-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }
.todo-item.warn { background: #fff4e5; } .todo-item.info { background: #eef3fe; }
.todo-item i { font-style: normal; font-size: 18px; }
.todo-item span { flex: 1; min-width: 0; }
/* Phễu & hạng mục */
.funnel, .toplist { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.fn-row, .tp-row { display: grid; grid-template-columns: 140px 1fr auto auto; gap: 10px; align-items: center; font-size: 13.5px; }
.tp-row { grid-template-columns: 170px 1fr auto; }
.tp-row span small { display: block; color: var(--muted); font-size: 12px; }
.fn-bar { height: 10px; border-radius: 999px; background: #eef0f2; overflow: hidden; }
.fn-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #2fc27a); transition: width .5s; }
.toplist .fn-bar i { background: linear-gradient(90deg, #c8682c, #e9a06c); }
.fn-row small { color: var(--muted); min-width: 36px; text-align: right; }
/* Đơn hàng */
.ord-tools { display: flex; flex-direction: column; gap: 10px; }
.ord-search { max-width: 460px; }
.chip-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: rgba(0,0,0,.08); font-size: 11.5px; }
.chip.active .chip-n { background: rgba(255,255,255,.25); }
.tbl-click tbody tr { cursor: pointer; }
.tbl-click tbody tr:hover td { background: #f7faff; }
.row-warn td { background: #fff8ec; }
.row-lead td { background: #fffaf3; }
/* Chi tiết đơn / khách */
.od h4 { margin: 16px 0 8px; font-size: 14px; }
.od-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-right: 40px; }
.od-head h2 { margin: 0; }
.od-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0; }
.od-steps div { text-align: center; font-size: 12.5px; color: var(--muted); position: relative; }
.od-steps i { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 4px; border-radius: 50%; background: #eef0f2; font-style: normal; font-weight: 800; }
.od-steps .on { color: var(--ink); font-weight: 600; }
.od-steps .on i { background: var(--brand); color: #fff; }
.od-steps small { display: block; color: var(--muted); font-weight: 400; }
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.od-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.od-box h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.od-items { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.od-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.od-item:first-child { border-top: 0; }
.od-item small { display: block; color: var(--muted); font-size: 12px; }
.od-link { cursor: pointer; } .od-link:hover { background: #f7faff; }
.od-assign { margin-top: 16px; padding: 12px; border-radius: 12px; background: #fff4e5; }
.od-assign h4 { margin-top: 0; }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; gap: 0; }
  .adm-nav { position: sticky; top: 56px; z-index: 20; flex-direction: row; overflow-x: auto; gap: 6px; padding: 10px 16px; margin: 0 -16px; background: #f4f5f7; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-group { display: none; }
  .adm-link { width: auto; flex: none; white-space: nowrap; padding: 6px 12px 6px 8px; background: #fff; border: 1px solid var(--line); }
  .adm-link i { width: 22px; height: 22px; font-size: 13px; }
  .adm-main { padding-top: 14px; }
}
@media (max-width: 640px) {
  .top-site { display: none; }
  .portal-platform .top-user { display: none; }
  .portal-platform .topbar-inner { flex-wrap: nowrap; }
  .portal-platform .portal-label { margin-left: auto; font-size: 12px; padding: 4px 10px; }
  .portal-platform .brand { min-width: 0; font-size: 15px; }
  .portal-platform .brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portal-platform .adm-nav { top: 54px; }
  .portal-platform .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .portal-platform .kpi { padding: 12px; }
  .portal-platform .kpi .value { font-size: 17px; }
  .portal-platform .kpi .label, .portal-platform .kpi .sub { font-size: 12px; }
  .adm-head h1 { font-size: 20px; }
  .seg-chips { width: 100%; } .seg-chips button { flex: 1; padding: 6px 4px; }
  .fn-row { grid-template-columns: 110px 1fr auto; } .fn-row small { display: none; }
  .tp-row { grid-template-columns: 120px 1fr auto; }
  .todo-item { flex-wrap: wrap; } .todo-item .btn { margin-left: 28px; }
  .od-grid { grid-template-columns: 1fr; }
  .od-steps span { font-size: 11px; }
}

/* =========================================================
   CỔNG VẬN HÀNH – giao diện hiện đại (màu thương hiệu cam gỗ + nền xám sáng)
   ========================================================= */
.portal-platform {
  --line: #e8eaee; --muted: #8b94a3; --ink: #111827; --ink-2: #4b5563;
  --p-accent: #c8682c; --p-accent-2: #e08a4f; --p-accent-soft: #fdf1e7; --p-green: #10a35a;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.05);
  --ease: cubic-bezier(.22,.61,.36,1);
  background: #f4f5f7;
}
.portal-platform ::-webkit-scrollbar { width: 10px; height: 10px; }
.portal-platform ::-webkit-scrollbar-thumb { background: #d3d7de; border-radius: 10px; border: 2px solid #f4f5f7; }
/* Thanh đầu trang */
.portal-platform .topbar { background: linear-gradient(90deg, #14171c, #232831); border-bottom: 1px solid rgba(255,255,255,.06); box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.portal-platform .brand-tld { color: #f6b47f; }
.portal-platform .portal-label { background: rgba(200,104,44,.2); color: #f6b47f; border: 1px solid rgba(246,180,127,.25); }
/* Menu trái */
.portal-platform .adm-link { position: relative; transition: background .2s var(--ease), color .2s, transform .15s; }
.portal-platform .adm-link:hover { background: #eceef2; transform: translateX(2px); }
.portal-platform .adm-link i { background: #eceef2; transition: background .2s; }
.portal-platform .adm-link.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.portal-platform .adm-link.on i { background: var(--p-accent-soft); }
.portal-platform .adm-link.on::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--p-accent); }
/* Nội dung hiện dần khi đổi trang */
.portal-platform .adm-main.anim > * { animation: admIn .4s var(--ease) both; }
.portal-platform .adm-main.anim > *:nth-child(2) { animation-delay: .04s; }
.portal-platform .adm-main.anim > *:nth-child(3) { animation-delay: .08s; }
.portal-platform .adm-main.anim > *:nth-child(4) { animation-delay: .12s; }
.portal-platform .adm-main.anim > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes admIn { from { opacity: 0; transform: translateY(8px); } }
.portal-platform .adm-head h1 { font-size: 26px; letter-spacing: -.4px; }
/* Thẻ, bảng */
.portal-platform .card, .portal-platform .table-wrap, .portal-platform .kpi { border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.portal-platform .card { transition: box-shadow .25s var(--ease); }
.portal-platform .card:hover { box-shadow: 0 2px 4px rgba(16,24,40,.04), 0 10px 26px rgba(16,24,40,.07); }
.portal-platform .card h3 { font-size: 15px; letter-spacing: -.1px; }
.portal-platform th { background: #f9fafb; color: #6b7280; font-size: 11.5px; }
.portal-platform td { border-bottom-color: #f0f1f4; }
.portal-platform tbody tr { transition: background .15s; }
.portal-platform tbody tr:hover td { background: #fafbff; }
.portal-platform .section-title h2 { font-size: 18px; letter-spacing: -.2px; }
/* KPI */
.portal-platform .kpi { position: relative; overflow: hidden; padding: 16px 16px 14px; transition: transform .25s var(--ease), box-shadow .25s; }
.portal-platform .kpi:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,.04), 0 12px 28px rgba(16,24,40,.08); }
.portal-platform .kpi .label { display: flex; align-items: center; gap: 8px; color: #6b7280; }
.kpi-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: #f1f3f6; flex: none; }
.portal-platform .kpi .value { font-size: 25px; letter-spacing: -.6px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.portal-platform .kpi.hl { background: radial-gradient(120% 140% at 100% 0%, rgba(224,138,79,.45) 0%, transparent 55%), linear-gradient(135deg, #1b1f26, #2c2219); border-color: transparent; }
.portal-platform .kpi.hl .kpi-ic { background: rgba(255,255,255,.12); }
.portal-platform .kpi.accent .value { color: var(--p-accent); }
.portal-platform .kpi.accent .kpi-ic { background: var(--p-accent-soft); }
/* Nút & lựa chọn */
.portal-platform .btn { background: var(--ink); border-radius: 10px; transition: background .2s, transform .1s, box-shadow .2s; }
.portal-platform .btn:hover { background: #000; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.portal-platform .btn-accent { background: var(--p-accent); }
.portal-platform .btn-accent:hover { background: #ad5520; }
.portal-platform .btn-ghost { background: #fff; color: var(--ink); }
.portal-platform .btn-ghost:hover { background: #f3f4f6; box-shadow: none; }
.portal-platform .btn-danger { background: #fff; color: var(--danger); }
.portal-platform .btn-danger:hover { background: var(--danger-soft); box-shadow: none; }
.portal-platform .chip { transition: all .2s var(--ease); }
.portal-platform .chip:hover { border-color: #c5cad3; }
.portal-platform .chip.active { background: var(--ink); border-color: var(--ink); }
.portal-platform input:focus, .portal-platform select:focus, .portal-platform textarea:focus { outline: 3px solid rgba(200,104,44,.18); border-color: var(--p-accent); }
.portal-platform .seg-chips { background: #e9ebef; }
.portal-platform .seg-chips button { transition: background .2s, color .2s, box-shadow .2s; }
/* Biểu đồ: cột mọc lên mượt */
.portal-platform .bar { background: linear-gradient(180deg, #34c47c, var(--p-green)); border-radius: 8px 8px 4px 4px; transform-origin: bottom; }
.portal-platform .adm-main.anim .bar { animation: barUp .7s var(--ease) both; }
.portal-platform .adm-main.anim .bar-col:nth-child(2) .bar { animation-delay: .04s; } .portal-platform .adm-main.anim .bar-col:nth-child(3) .bar { animation-delay: .08s; }
.portal-platform .adm-main.anim .bar-col:nth-child(4) .bar { animation-delay: .12s; } .portal-platform .adm-main.anim .bar-col:nth-child(5) .bar { animation-delay: .16s; }
.portal-platform .adm-main.anim .bar-col:nth-child(6) .bar { animation-delay: .2s; } .portal-platform .adm-main.anim .bar-col:nth-child(7) .bar { animation-delay: .24s; }
.portal-platform .bar .comm { background: linear-gradient(180deg, var(--p-accent-2), var(--p-accent)); }
.portal-platform .bar-col:hover .bar { filter: brightness(1.08); }
@keyframes barUp { from { transform: scaleY(0); } }
.portal-platform .fn-bar { height: 8px; background: #eef0f3; }
.portal-platform .fn-bar i { background: linear-gradient(90deg, var(--p-green), #34c47c); transform-origin: left; }
.portal-platform .adm-main.anim .fn-bar i { animation: barGrow .8s var(--ease) both; }
.portal-platform .toplist .fn-bar i { background: linear-gradient(90deg, var(--p-accent), var(--p-accent-2)); }
@keyframes barGrow { from { transform: scaleX(0); } }
/* Cần xử lý */
.portal-platform .todo-item { background: #fff; border: 1px solid var(--line); border-left: 3px solid #93b4f5; transition: transform .2s var(--ease), box-shadow .2s; }
.portal-platform .todo-item.warn { background: #fffaf3; border-left-color: var(--p-accent); }
.portal-platform .todo-item:hover { transform: translateX(2px); box-shadow: var(--shadow); }
/* Cửa sổ chi tiết */
.portal-platform .modal-backdrop { background: rgba(17,24,39,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeInP .25s ease; }
.portal-platform .modal-card { border-radius: 20px; animation: popInP .3s var(--ease); }
@keyframes fadeInP { from { opacity: 0; } }
@keyframes popInP { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.portal-platform .alert { border-radius: 12px; }
.portal-platform .footer { background: transparent; border-top: 1px solid var(--line); }
/* Chân trang cùng khung 1320px với thanh đầu trang & nội dung → lề trái thẳng hàng logo / menu */
.portal-platform .footer .container { max-width: 1320px; }
@media (max-width: 640px) {
  .portal-platform .kpi { padding: 12px; }
  .portal-platform .kpi .label { font-size: 12px; gap: 6px; align-items: flex-start; }
  .portal-platform .kpi-ic { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
  .portal-platform .kpi .value { font-size: 16px; letter-spacing: -.3px; margin-top: 6px; white-space: nowrap; }
  .portal-platform .kpi .sub { font-size: 11.5px; }
  .portal-platform .adm-head h1 { font-size: 21px; }
  .portal-platform .adm-link.on::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-platform *, .portal-platform *::before { animation: none !important; transition: none !important; }
}

/* ===== Cổng xưởng: đăng nhập, cảnh báo khoá, yêu cầu cải thiện, báo giá chốt ===== */
.ws-auth { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 28px 16px; }
.ws-auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 50px rgba(16,24,40,.10); padding: 24px; animation: admIn .4s ease both; }
.ws-auth-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.ws-auth-head img { border-radius: 12px; }
.ws-auth-head b { display: block; font-size: 19px; }
.ws-auth-head span { font-size: 13px; color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #eef0f3; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 9px; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.auth-err { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.ws-demo { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ws-demo-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.ws-demo-list button { text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 44px; }
.ws-demo-list button:hover { border-color: #c8682c; background: #fdf1e7; }
.ws-demo-list small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.ws-me { display: flex; align-items: center; gap: 10px; padding: 10px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.ws-me b { display: block; font-size: 14px; line-height: 1.25; }
.ws-me small { color: var(--muted); font-size: 12px; }
.ws-logout { margin-top: 10px; color: var(--muted) !important; }
.ws-alert { border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; font-size: 14px; animation: admIn .35s ease both; }
.ws-alert ul { margin: 6px 0 8px; padding-left: 20px; }
.ws-alert.lock { background: #fdecec; border: 1px solid #f5c2c4; color: #8f1d22; }
.ws-alert.warn { background: #fff6e5; border: 1px solid #f6d79a; color: #7a5003; }
.req-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.req { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.req.lock { background: #fff5f5; border-color: #f5c2c4; } .req.must { background: #fffaf0; border-color: #f6d79a; }
.req .badge { flex: none; }
.rules { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 8px; }
.review-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.stars { color: #f5b301; letter-spacing: 1px; }
/* Khung sửa báo giá (PC): cột cố định, ô nhập vừa khít cột, không bị cắt chữ */
.qe-table { table-layout: fixed; width: 100%; min-width: 860px; }
.portal-workshop .modal-card:has(.qe) { max-width: 1140px; }
.qe-table col.c-name { width: 34%; } .qe-table col.c-desc { width: 26%; } .qe-table col.c-qty { width: 76px; }
.qe-table col.c-unit { width: 64px; } .qe-table col.c-price { width: 118px; } .qe-table col.c-amt { width: 112px; } .qe-table col.c-del { width: 48px; }
.qe-table td.qe-ops { text-align: right; }
/* Tay nắm kéo thả đổi thứ tự dòng */
.qe-grip { flex: none; width: 18px; display: grid; place-items: center; color: #b3b9c2; font-size: 15px; cursor: grab; touch-action: none; user-select: none; border-radius: 6px; line-height: 30px; }
.qe-grip:hover { color: var(--ink); background: #eef0f2; }
.qe-grip.off { cursor: default; visibility: hidden; }
.qe-table tr.qe-dragging td { background: #fff7ef; }
.qe-table tr.qe-dragging { box-shadow: 0 6px 18px rgba(0, 0, 0, .14); position: relative; z-index: 2; }
body.qe-drag-on, body.qe-drag-on * { cursor: grabbing !important; user-select: none !important; }
.qe-table td { padding: 5px 5px; vertical-align: middle; }
.qe-table input { width: 100%; min-width: 0; padding: 7px 8px; font-size: 13.5px; text-overflow: ellipsis; }
.qe-table input.num { text-align: right; } .qe-table input.unit { text-align: center; }
.qe-name { display: flex; gap: 6px; align-items: center; }
.qe-name input { flex: 1; font-weight: 600; }
.qe-table td.qe-amt { font-weight: 700; padding-right: 8px; }
.qe-table td:last-child .btn { padding: 5px 8px; }
/* Nhóm theo phòng trong khung sửa báo giá xưởng */
.qe-table tr.qe-room td { background: #f6f1ea; padding: 7px 10px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.qe-table tr.qe-room small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 4px; }
@media (min-width: 641px) { .qe-table .qe-room-sel { display: none; } } /* PC: bỏ ô chọn phòng cho gọn (phòng tự nhận theo hạng mục) */
.qe-table .qe-room-sel { flex: none; width: 92px; min-width: 0; padding: 6px 4px; font-size: 12px; border-radius: 8px; color: var(--ink-2); background: #fafbfc; }
/* Nút lưu luôn ở đáy khung (cả PC & điện thoại) */
.qe > .row.mt { position: sticky; bottom: -24px; z-index: 3; background: #fff; margin: 14px -24px -24px; padding: 12px 24px 16px; border-top: 1px solid var(--line); box-shadow: 0 -8px 16px -12px rgba(0, 0, 0, .18); }
.qe-foot { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin-top: 14px; align-items: start; }
.qe-sum { background: #f9fafb; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.qe-sum .money-line { align-items: center; }
.qe-sum .total { padding-top: 8px; border-top: 1px dashed var(--line); }
.qe-sum .total strong { font-size: 20px; color: #c8682c; }
.portal-workshop .modal-card { max-width: 980px; }
/* Chọn hạng mục từ bảng đơn giá hệ thống (trong báo giá chốt) */
.qp { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fafbfc; }
.qp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qp-head b { font-size: 14.5px; }
/* Máy tính tủ bếp chữ I / chữ L trong báo giá xưởng */
.qb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.qb-in { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; align-content: start; }
.qb-in .qb-shape { grid-column: 1 / -1; margin-bottom: 10px; }
.qb-in .field { margin-bottom: 8px; }
.qb-in .field:last-child { grid-column: 1 / -1; }
.qb-res { display: grid; gap: 6px; align-content: start; }
.qb-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; align-items: baseline; }
.qb-line small { display: block; color: var(--muted); font-size: 12px; }
.qb-line > b { white-space: nowrap; }
.qb-sum { border-top: 1px dashed var(--line); padding-top: 6px; font-weight: 700; }
.qb-addon > span > b { font-weight: 600; }
.qb-adds { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.qb-adds-title { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.qb-add { display: grid; gap: 6px; background: #fafbfc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.qb-add label { display: flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.qb-add label input { width: auto; margin: 0; }
.qb-add small { color: var(--muted); font-weight: 400; }
.qb-add select { font-size: 12.5px; padding: 6px 8px; }
.qb-add.off { opacity: .55; }
@media (max-width: 760px) { .qb-adds { grid-template-columns: 1fr; } }
.qb-sum b { color: var(--accent, #c8682c); font-size: 15px; }
@media (max-width: 640px) { .qb { grid-template-columns: 1fr; } }
.qp-x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #eef0f2; cursor: pointer; font-size: 13px; }
.qp-tools { display: grid; gap: 8px; margin-bottom: 10px; }
.qp-tools input { padding: 8px 12px; border-radius: 10px; }
.qp-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.qp-chips button { flex: none; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.qp-chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.qp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; padding: 2px; }
.qp-prod { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.qp-prod:hover { border-color: var(--p-accent); box-shadow: 0 2px 10px rgba(200,104,44,.12); }
.qp-thumb { width: 56px; height: 42px; flex: none; border-radius: 8px; overflow: hidden; background: var(--brand-soft); }
.qp-thumb img { width: 100%; height: 100%; object-fit: cover; } .qp-thumb .img-fallback { font-size: 22px; }
.qp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qp-info small { font-size: 11px; color: var(--muted); } .qp-info b { font-size: 13.5px; line-height: 1.3; }
.qp-info em { font-style: normal; font-size: 12px; color: #b45309; font-weight: 700; }
.qp-go { color: var(--muted); font-size: 20px; }
.qp-empty { padding: 20px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.qp-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.qp-table td, .qp-table th { padding: 7px 10px; }
.qp-price { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; white-space: nowrap; transition: all .15s; }
.qp-price i { font-style: normal; color: var(--p-accent); font-weight: 800; }
.qp-price:hover { border-color: var(--p-accent); background: var(--p-accent-soft); }
@media (max-width: 760px) { .qe-foot { grid-template-columns: 1fr; } .ws-demo-list { grid-template-columns: 1fr; } }
/* Trang "Báo giá cho khách": nút + ô hướng dẫn (thu gọn được) */
.qt-top { display: flex; gap: 10px; align-items: flex-start; flex-direction: row-reverse; }
.qt-top > .btn { flex: none; }
.alert.qt-help { flex: 1; margin: 0; display: block; }
.qt-help summary { display: none; }
@media (max-width: 640px) {
  .qt-top { flex-direction: column; align-items: stretch; }
  .qt-top > .btn { width: 100%; justify-content: center; padding: 12px; }
  .qt-help { padding: 10px 12px; font-size: 13px; }
  .qt-help summary { display: list-item; cursor: pointer; font-weight: 700; }
  .qt-help[open] summary { margin-bottom: 6px; }
  /* Danh sách báo giá → thẻ */
  .table-wrap.qt-wrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  .qt-table, .qt-table tbody { display: block; }
  .qt-table thead { display: none; }
  .qt-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
  .qt-table td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; }
  .qt-table td.qt-code, .qt-table td.qt-upd, .qt-table td.qt-act { grid-column: 1 / -1; }
  .qt-table td.qt-code .small { margin-top: 4px; }
  .qt-table td.qt-cust { grid-column: 1 / -1; font-weight: 600; }
  .qt-table td.qt-n::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
  .qt-table td.qt-n { font-size: 15px; }
  .qt-table td.qt-upd { color: var(--muted); }
  .qt-table td.qt-act { display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
  .qt-table td.qt-act .btn { flex: 1; justify-content: center; padding: 9px; }

  /* Khung sửa báo giá: mỗi dòng thành 1 thẻ nhập liệu */
  .qe .table-wrap.mt { border: 0; box-shadow: none; background: none; overflow: visible; }
  .qe-table, .qe-table tbody { display: block; min-width: 0; }
  .qe-table thead, .qe-table colgroup { display: none; }
  .qe-table tr { display: grid; grid-template-columns: 1fr 72px 1.3fr; gap: 6px 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; }
  .qe-table tr.qe-room { display: flex; justify-content: space-between; padding: 0; border: 0; background: none; margin: 14px 0 6px; }
  .qe-table tr.qe-room td { display: block; background: none; padding: 0; border: 0; }
  .qe-table tr.qe-room td:last-child { display: none; }
  .qe-table tr.qe-room td[data-room-sub] { color: #c8682c; font-weight: 800; }
  .qe-table td { display: block; padding: 0; border: 0; }
  .qe-table td:nth-child(1), .qe-table td:nth-child(2) { grid-column: 1 / -1; }
  .qe-table .qe-room-sel { width: 96px; padding: 8px 4px; }
  .qe-grip { width: 24px; font-size: 18px; line-height: 40px; }
  .qe-table tr.qe-dragging { outline: 2px solid #f0b48a; }
  .qe-table td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
  .qe-table input, .qe-table input.num, .qe-table input.unit { width: 100%; font-size: 15px; }
  .qe-table td.qe-amt { grid-column: 1 / 3; align-self: center; text-align: left; font-weight: 800; font-size: 15px; }
  .qe-table td.qe-amt::before { content: 'Thành tiền: '; font-weight: 500; font-size: 12px; color: var(--muted); }
  .qe-table td:last-child { justify-self: end; }
  .qe .od-head h2 { font-size: 19px; }
  .qe-sum .money-line input { max-width: 120px; }
  .qe > .row.mt { bottom: -18px; margin: 12px -18px -18px; padding: 10px 18px 14px; flex-wrap: nowrap; gap: 8px; }
  .qe .row.mt .btn { flex: 1 1 0; justify-content: center; padding: 11px 6px; font-size: 13.5px; white-space: nowrap; }
  .qe .row.mt .btn-ghost { display: none; } /* đã có nút ✕ đóng ở góc trên */
}
@media (max-width: 900px) {
  .ws-me { flex: none; border: 0; padding: 0 4px 0 0; margin: 0; gap: 0; }
  .ws-me div { display: none; } /* điện thoại: chỉ giữ vòng điểm uy tín đầu thanh menu */
  .ws-logout { margin-top: 0; }
}

/* Chuông thông báo – góc trên bên phải (cổng xưởng) */
.ws-bell { position: relative; }
.bell-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: rgba(255,255,255,.85); cursor: pointer; transition: background .2s, color .2s; }
.bell-btn:hover, .bell-btn[aria-expanded="true"] { background: rgba(255,255,255,.08); color: #fff; }
.bell-btn svg { width: 20px; height: 20px; }
.bell-btn em { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #111419; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 120; width: 380px; max-height: min(70vh, 520px); overflow: auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(16,24,40,.22); animation: popInP .2s ease; }
.bell-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.bell-head b { font-size: 15px; }
.bell-head button { border: 0; background: none; color: var(--info); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.bell-head button:hover { background: var(--info-soft); }
.bell-item { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #f1f2f4; font-size: 13.5px; line-height: 1.45; }
.bell-item:last-child { border-bottom: 0; }
.bell-item .dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #d4d8de; }
.bell-item.new { background: #fff8f1; }
.bell-item.new .dot { background: var(--accent); }
.bell-item time { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.bell-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .bell-btn { width: 38px; height: 38px; }
  .bell-panel, .acc-menu { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; }
}

/* Ảnh đại diện & hồ sơ xưởng */
.ws-avatar { display: block; flex: none; border-radius: 50%; object-fit: cover; background: #2a2f38; }
.ws-avatar-txt { display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: .3px; background: linear-gradient(135deg, #c8682c, #8a4a22); }
.acc-av .ws-avatar-txt { background: #2a2f38; }
.acc-head { display: flex; align-items: center; gap: 10px; }
.verified { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #2f6fed; color: #fff; font-size: 10px; font-weight: 900; vertical-align: 1px; }
.acc-verify { margin: 4px 4px 6px; padding: 10px 12px; border-radius: 12px; background: #f6f7f9; }
.acc-verify .fn-bar { margin: 8px 0 6px; }
.acc-verify p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.acc-verify.approved { background: #eef4ff; } .acc-verify.rejected { background: #fff1f1; } .acc-verify.submitted { background: #fff8eb; }
.acc-verify .badge { font-size: 11px; }
.acc-menu .acc-main { color: var(--ink); font-weight: 700; }
.acc-menu .acc-main span { background: none; color: var(--muted); font-size: 18px; padding: 0; }
.acc-menu button .badge { padding: 2px 8px; font-size: 11px; color: inherit; }
.acc-menu button span.b-done { background: #e7f7ee; color: #0b7a43; } .acc-menu button span.b-pending { background: #fff3db; color: #9a6503; }
.acc-menu button span.b-unpaid { background: #fdecec; color: #c0262c; } .acc-menu button span.b-inactive { background: #eef0f2; color: var(--ink-2); }
.ws-cell { display: flex; align-items: center; gap: 10px; }
.ws-pf-btn { margin-top: 4px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 12px; font-weight: 700; color: var(--info); cursor: pointer; white-space: nowrap; }
.ws-pf-btn:hover { background: var(--info-soft); }
.ws-pf-btn.hot { background: var(--p-accent); border-color: var(--p-accent); color: #fff; }
/* Khung duyệt hồ sơ tick xanh (cổng vận hành) */
.verify-box .row { flex-wrap: wrap; gap: 8px; }
.vb-stat { padding: 4px 10px; border-radius: 999px; background: #f4f5f7; font-size: 12.5px; color: var(--ink-2); }
.vb-stat b { font-size: 13.5px; } .vb-stat.wait { background: #fff3db; color: #9a6503; } .vb-stat.ok { background: #eef4ff; color: #2b4fa8; }
.vb-list { display: grid; gap: 8px; margin-top: 12px; }
.vb-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #fde3c4; border-radius: 12px; background: #fffaf3; }
.vb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; } .vb-info small { color: var(--muted); font-size: 12.5px; }
.ws-onboard { max-width: 1320px; padding-top: 22px; padding-bottom: 30px; }
.ws-onboard-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.ws-onboard-head h1 { margin: 0 0 2px; font-size: 20px; } .ws-onboard-head p { margin: 0; color: var(--ink-2); font-size: 14px; }
.ws-onboard-head > div { flex: 1; }
.pf-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.pf-side { position: sticky; top: 80px; display: grid; gap: 14px; }
.pf-avatar-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 22px 18px; }
.pf-avatar { position: relative; margin-bottom: 8px; }
.pf-avatar .ws-avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 6px #f0d8c4; }
.pf-avatar-btn { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 36px; height: 36px; margin: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 16px; cursor: pointer; box-shadow: 0 0 0 3px #fff; transition: transform .2s; }
.pf-avatar-btn:hover { transform: scale(1.08); }
.pf-name { font-size: 16px; }
.link-btn { border: 0; background: none; padding: 4px; font: inherit; font-size: 13px; font-weight: 600; color: var(--info); cursor: pointer; }
.link-btn.danger { color: var(--danger); }
.pf-status { display: grid; gap: 10px; }
.pf-meter { display: flex; align-items: center; gap: 10px; } .pf-meter .fn-bar { flex: 1; } .pf-meter b { font-size: 14px; }
.pf-note { padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.pf-note.info { background: #fff6e5; color: #7a5003; } .pf-note.ok { background: #e7f7ee; color: #0b6b3b; } .pf-note.bad { background: #fdecec; color: #8f1d22; }
.pf-missing { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-missing small { width: 100%; color: var(--muted); font-weight: 700; }
.pf-missing span { padding: 3px 9px; border-radius: 999px; background: #f4f5f7; border: 1px dashed #d4d8de; font-size: 12px; color: var(--ink-2); }
.pf-status .btn[disabled] { opacity: .5; cursor: not-allowed; }
.pf-form h3 { margin: 0 0 12px; font-size: 16px; }
.pf-form input[readonly] { background: #f6f7f9; color: var(--muted); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip { position: relative; margin: 0; cursor: pointer; }
.pf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-chip span { display: inline-block; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: #fff; transition: all .15s; }
.pf-chip input:checked + span { border-color: var(--p-accent); background: var(--p-accent-soft); color: #9a4a17; }
.pf-chip input:focus-visible + span { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.pf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pf-photo { position: relative; aspect-ratio: 4 / 3; margin: 0; border-radius: 12px; overflow: hidden; background: #f4f5f7; border: 1px solid var(--line); display: block; }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-photo button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; cursor: pointer; }
.pf-photo.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px dashed #d4d8de; color: var(--muted); font-size: 26px; cursor: pointer; transition: border-color .2s, color .2s; }
.pf-photo.add small { font-size: 12.5px; font-weight: 700; }
.pf-photo.add:hover { border-color: var(--p-accent); color: var(--p-accent); }
.pf-photo.wide { width: 260px; max-width: 100%; aspect-ratio: 3 / 2; }
.pf-license { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pf-savebar { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -4px 20px rgba(16,24,40,.06); }
.pfv-head { display: flex; align-items: center; gap: 14px; }
.pfv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.pfv-grid > div { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid #f1f2f4; }
.pfv-grid span { font-size: 12px; color: var(--muted); } .pfv-grid b { font-size: 14px; font-weight: 600; }
.pfv-intro { white-space: pre-line; color: var(--ink-2); font-size: 14px; }
.pf-photos.view { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pfv-actions { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-side { position: static; }
  .pfv-grid { grid-template-columns: 1fr; }
  .ws-onboard-head { flex-wrap: wrap; }
}

/* Tỉ lệ chốt khách bắt buộc */
.sc-close { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f6f7f9; border: 1px solid var(--line); }
.sc-close strong { font-size: 20px; }
.sc-close small { color: var(--ink-2); }
.sc-close.ok strong { color: #10a35a; } .sc-close.bad { background: #fff1f1; border-color: #f7c6c7; } .sc-close.bad strong { color: var(--danger); }
.close-bar { position: relative; height: 8px; border-radius: 999px; background: var(--line); margin: 8px 0 6px; }
.close-bar i { display: block; height: 100%; border-radius: 999px; background: #10a35a; }
.sc-close.bad .close-bar i { background: var(--danger); }
.close-bar span { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--ink); border-radius: 2px; }
/* Thanh tỉ lệ chốt: cùng kiểu với 3 thanh điểm còn lại + vạch mốc bắt buộc */
.fn-bar.close-mark { position: relative; overflow: visible; }
.fn-bar.close-mark span { position: absolute; top: -3px; width: 2px; height: calc(100% + 6px); margin-left: -1px; background: var(--ink); border-radius: 2px; }
.sc-close-part.bad > .row b { color: var(--danger); }
.portal-platform .sc-close-part.bad .fn-bar i { background: linear-gradient(90deg, var(--danger), #f07a7e); }
.close-cell b.bad { color: var(--danger); } .close-cell b.ok { color: #10a35a; }

/* Hộp xác nhận riêng của web */
.ask-box { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; }
.ask-backdrop { position: absolute; inset: 0; background: rgba(17,24,39,.45); backdrop-filter: blur(3px); animation: fadeInP .2s ease; }
.ask-card { position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: popInP .25s ease; }
.ask-card h3 { margin: 0 0 6px; font-size: 17px; }
.ask-card p { margin: 0 0 16px; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ask-actions .btn { min-height: 44px; min-width: 96px; }
.btn-danger-solid { background: var(--danger) !important; color: #fff !important; }
.btn-danger-solid:hover { background: #c93035 !important; }
@keyframes fadeInP { from { opacity: 0; } }
@keyframes popInP { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* Thanh toán phí bằng VietQR */
.pay-card { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: center; }
.pay-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 13px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, #fff8f1, #fff); border: 1px solid #f3dcc6; }
.vqr { padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; }
.vqr img, .vqr canvas { display: block; }
.pay-lines { display: grid; gap: 6px; margin-top: 10px; font-size: 14px; }
.pay-lines > div { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pay-lines span { color: var(--muted); font-size: 13px; }
.pay-amt { font-size: 20px; color: #c8682c; }
.ref-code { font-family: ui-monospace, Consolas, monospace; background: #f3f4f6; padding: 2px 7px; border-radius: 6px; font-size: 13px; }
.copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 8px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.copy:hover { background: #f3f4f6; }
.opay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.opay { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.opay.late { border-color: #f5c2c4; box-shadow: 0 0 0 3px #fdecec; }
.opay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.opay-head b { display: block; font-size: 15px; }
.opay-head small { color: var(--muted); font-size: 12px; }
.opay-body { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.opay-info { display: grid; gap: 8px; font-size: 13px; }
.opay-info span { display: block; color: var(--muted); font-size: 12px; }
.opay-info small { display: block; color: var(--muted); font-size: 11.5px; }
.opay-info .pay-amt { font-size: 19px; }
.opay-actions { justify-content: flex-end; gap: 6px; }
.pay-combined { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.pay-combined summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 4px 0; }
.pay-combined .pay-card { box-shadow: none; border: 0; padding: 8px 0 0; margin: 0; }
@media (max-width: 420px) { .opay-grid { grid-template-columns: 1fr; } .opay-body { grid-template-columns: 1fr; justify-items: center; } .opay-info { width: 100%; } }
.pay-modal { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
@media (max-width: 760px) {
  .pay-card { grid-template-columns: 1fr; } .pay-preview { order: -1; }
  .pay-modal { grid-template-columns: 1fr; justify-items: center; } .pay-modal .pay-lines { width: 100%; }
  .pay-lines > div { grid-template-columns: 100px 1fr; } .pay-lines .copy { grid-column: 2; justify-self: start; }
}

/* File PDF báo giá (dựng trang A4 ẩn rồi xuất file) – dùng chung trang khách & cổng xưởng */
.pdf-holder { position: fixed; left: -10000px; top: 0; z-index: -1; pointer-events: none; }
.pdf-sheet { width: 718px; padding: 4px 2px; background: #fff; color: #111; font-family: "Be Vietnam Pro", Arial, sans-serif; font-size: 12px; line-height: 1.45; }
.pdf-sheet .pq-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 14px; }
.pdf-sheet .pq-brand { font-size: 17px; font-weight: 800; } .pdf-sheet .pq-brand span { color: #c8682c; }
.pdf-sheet .pq-sub { font-size: 10.5px; color: #555; }
.pdf-sheet .pq-meta { text-align: right; font-size: 11px; } .pdf-sheet .pq-meta b { font-size: 15px; display: block; }
.pdf-sheet .pq-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; font-size: 11.5px; line-height: 1.55; }
.pdf-sheet .pq-table { width: 100%; border-collapse: collapse; }
.pdf-sheet .pq-table th, .pdf-sheet .pq-table td { border: 1px solid #9a9a9a; padding: 5px 7px; text-align: left; font-size: 11px; vertical-align: top; }
.pdf-sheet .pq-table th { background: #f1ece4; color: #111; font-weight: 700; text-transform: none; letter-spacing: 0; white-space: normal; }
.pdf-sheet .pq-table .r { text-align: right; white-space: nowrap; }
.pdf-sheet .pq-table tfoot td { font-weight: 800; background: #faf7f2; }
.pdf-sheet .pq-table tr { page-break-inside: avoid; }
.pdf-sheet .pq-note { font-size: 10px; color: #666; }
/* Không để bảng / đầu trang phình quá khổ A4 (chữ to hơn trên một số máy → bị cắt bên phải) */
.pdf-sheet .pq-table.pq-fixed { table-layout: fixed; }
.pdf-sheet .pq-table.pq-fixed th, .pdf-sheet .pq-table.pq-fixed td { overflow-wrap: anywhere; white-space: normal; }
.pdf-sheet .pq-table.pq-fixed .r, .pdf-sheet .pq-table.pq-fixed .c { white-space: nowrap; overflow-wrap: normal; }
.pdf-sheet .pq-head { gap: 12px; }
.pdf-sheet .pq-meta { flex: none; white-space: nowrap; }
/* Báo giá khách: nhóm theo phòng – dòng tên phòng, dòng cộng từng phòng, cột ĐVT/KL canh giữa */
.pdf-sheet .pq-table .c { text-align: center; white-space: nowrap; }
.pdf-sheet .pq-rooms td { vertical-align: middle; }
.pdf-sheet .pq-rooms sup { color: #c8682c; font-weight: 700; margin-left: 1px; }
.pdf-sheet .pq-room td { background: #f6efe5; font-weight: 800; font-size: 11.5px; letter-spacing: .2px; }
.pdf-sheet .pq-subtot td { font-weight: 700; background: #fcfaf6; color: #333; }
.pdf-sheet .pq-subtot td:nth-child(2) { text-align: right; font-style: italic; }
.pdf-sheet .pq-foot { margin-top: 12px; font-size: 11px; color: #333; } .pdf-sheet .pq-foot p { margin: 3px 0; }
.pdf-sheet .pq-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; text-align: center; font-size: 11px; height: 110px; page-break-inside: avoid; }
.pdf-sheet .pq-sign span { display: block; color: #666; font-style: italic; }

/* In báo giá (PDF) – dùng chung cho trang khách & cổng xưởng */
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; color: #000; font-size: 12px; font-family: "Be Vietnam Pro", Arial, sans-serif; }
  .pq-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 12px; }
  .pq-brand { font-size: 17px; font-weight: 800; } .pq-sub { font-size: 10.5px; color: #555; }
  .pq-meta { text-align: right; font-size: 11px; } .pq-meta b { font-size: 15px; display: block; }
  .pq-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; font-size: 11.5px; line-height: 1.5; }
  .pq-table { width: 100%; border-collapse: collapse; }
  .pq-table th, .pq-table td { border: 1px solid #999; padding: 5px 7px; text-align: left; font-size: 11px; }
  .pq-table th { background: #f1ece4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #000; text-transform: none; letter-spacing: 0; }
  .pq-table .r { text-align: right; white-space: nowrap; }
  .pq-table tfoot td { font-weight: 800; }
  .pq-foot { margin-top: 12px; font-size: 11px; }
  .pq-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; text-align: center; font-size: 11px; height: 110px; }
  .pq-sign span { display: block; color: #666; font-style: italic; }
  @page { margin: 12mm; }
}

/* Cổng xưởng: thanh đầu trang tối, mảnh, căn thẳng với nội dung */
.portal-platform .topbar { background: rgba(17,20,25,.96); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid rgba(255,255,255,.06); box-shadow: 0 8px 24px rgba(0,0,0,.10); }
.portal-platform .topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(232,122,48,.75) 25%, rgba(232,122,48,.75) 75%, transparent); pointer-events: none; }
.portal-platform .topbar-inner { max-width: 1320px; height: 60px; padding: 0 16px; flex-wrap: nowrap; gap: 14px; }
.portal-platform .brand { color: #fff; font-size: 17px; letter-spacing: -.2px; min-width: 0; }
.portal-platform .brand-logo { width: 32px; height: 32px; }
.portal-platform .portal-label { margin-left: 0; padding: 2px 0 2px 14px; border: 0; border-left: 1px solid rgba(255,255,255,.16); border-radius: 0; background: none; color: rgba(255,255,255,.72); font-size: 13px; font-weight: 600; letter-spacing: .2px; }
.ws-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ws-sep { width: 1px; height: 28px; background: rgba(255,255,255,.12); margin: 0 4px; }
/* Tài khoản xưởng */
.ws-acc-wrap { position: relative; }
.ws-acc { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border: 0; border-radius: 12px; background: transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; transition: background .2s; }
.ws-acc:hover, .ws-acc[aria-expanded="true"] { background: rgba(255,255,255,.08); }
.acc-av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.14) 0); }
.acc-av i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #2a2f38; font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .3px; }
.acc-txt { min-width: 0; }
.acc-txt b { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; line-height: 1.25; }
.acc-txt small { display: flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(255,255,255,.6); }
.acc-txt small i { width: 6px; height: 6px; border-radius: 50%; }
.acc-chev { width: 16px; height: 16px; opacity: .55; transition: transform .2s; }
.ws-acc[aria-expanded="true"] .acc-chev { transform: rotate(180deg); }
.acc-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 120; width: 260px; padding: 6px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(16,24,40,.22); animation: popInP .18s ease; }
.acc-head { padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.acc-head b { display: block; font-size: 14px; }
.acc-head small { color: var(--muted); font-size: 12px; }
.acc-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-align: left; cursor: pointer; }
.acc-menu button:hover { background: #f4f5f7; color: var(--ink); }
.acc-menu button span { padding: 1px 8px; border-radius: 999px; background: var(--p-accent); color: #fff; font-size: 12px; font-weight: 800; }
.acc-menu .acc-out { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: var(--danger); }
.acc-menu .acc-out:hover { background: #fff1f1; color: var(--danger); }
/* Máy tính: tên & điểm xưởng đã ở thanh đầu trang → ẩn khối trùng ở menu trái */
@media (min-width: 901px) { .portal-workshop .ws-me { display: none; } .portal-platform .adm-nav { top: 76px; } }
@media (max-width: 760px) {
  .portal-platform .topbar-inner { height: 56px; gap: 10px; }
  .acc-txt, .acc-chev, .ws-sep { display: none; }
  .ws-acc { padding: 2px; border-radius: 50%; }
  .portal-platform .adm-nav { top: 56px; }
  .acc-menu, .bell-panel { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; }
}
@media (max-width: 480px) { .portal-platform .portal-label { display: none; } }
/* Cổng vận hành: phần phải thanh đầu trang giống cổng xưởng – nút xem trang khách | vạch ngăn | tài khoản quản trị */
body.portal-platform:not(.portal-workshop) .top-site { margin-left: auto; display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 12px; color: rgba(255,255,255,.85); font-size: 13.5px; font-weight: 600; transition: background .2s, color .2s; }
body.portal-platform:not(.portal-workshop) .top-site:hover { background: rgba(255,255,255,.08); color: #fff; }
body.portal-platform:not(.portal-workshop) .top-user { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-left: 13px; padding: 4px 12px 4px 4px; border-radius: 12px; color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
body.portal-platform:not(.portal-workshop) .top-user::before { content: ''; position: absolute; left: -9px; top: 6px; bottom: 6px; width: 1px; background: rgba(255,255,255,.12); }
body.portal-platform:not(.portal-workshop) .top-avatar { width: 36px; height: 36px; font-size: 12.5px; box-shadow: 0 0 0 2px rgba(255,255,255,.14); background: linear-gradient(135deg, #e08a4f, #c8682c); }
@media (max-width: 640px) {
  body.portal-platform:not(.portal-workshop) .top-site { display: none; }
  body.portal-platform:not(.portal-workshop) .top-user { display: inline-flex; margin-left: auto; padding: 2px; font-size: 0; gap: 0; }
  body.portal-platform:not(.portal-workshop) .top-user::before { display: none; }
}

/* Buttons & form */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--brand); color: #fff; text-decoration: none; transition: background .15s, transform .05s; }
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #e9650a; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f5c2c4; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0, 166, 81, .25); border-color: var(--brand); }
textarea { resize: vertical; min-height: 70px; }
.field { margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card h3 { font-size: 16px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 14px; flex-wrap: wrap; }
.section-title h2 { font-size: 22px; margin: 0; }
.page-head { padding: 22px 0 6px; display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* Hero */
.hero { background: linear-gradient(135deg, #00a651 0%, #00804a 60%, #0b5d3b 100%); color: #fff; }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 44px 16px 52px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -.5px; }
.hero p { font-size: 17px; opacity: .92; max-width: 560px; }
/* Hero gọn cho khách từ quảng cáo */
.hero-compact .container { padding-top: 28px; padding-bottom: 30px; text-align: center; }
.hero-compact h1 { font-size: 34px; margin-bottom: 6px; }
.hero-compact p { margin: 0 auto; font-size: 17px; }
.hero-compact .hero-badges { justify-content: center; margin-top: 14px; }
.btn-cta { margin-top: 18px; font-size: 17px; padding: 14px 26px; border-radius: 12px; }
.mobile-bar { display: none; }
.dims-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; }
.dims-row input { font-size: 16px; }
details summary { cursor: pointer; padding: 4px 0; }
.hero-kicker { display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.hero p b { color: #ffe2b8; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.hero-badges span { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.steps { display: grid; gap: 10px; }
.step { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; }
.step b { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--brand-dark); display: grid; place-items: center; flex: none; font-size: 20px; }
.step div { font-size: 14px; }
.step strong { display: block; font-size: 15px; }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.product:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16,24,40,.12); }
.product-img { aspect-ratio: 4 / 3; background: var(--brand-soft); position: relative; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.img-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 64px; background: linear-gradient(135deg, #e6f7ee, #fff1e6); }
.product-tag { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.95); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--brand-dark); }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body h3 { margin: 0; font-size: 16px; }
.product-body p { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.price { font-weight: 800; color: var(--accent); font-size: 17px; }
.price small { font-weight: 600; color: var(--muted); font-size: 12px; }

/* Quote modal */
.quote-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.quote-img { border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--brand-soft); }
.quote-img img { width: 100%; height: 100%; object-fit: cover; }
.quote-total { background: var(--accent-soft); border: 1px dashed #ffc499; border-radius: 12px; padding: 14px; margin: 10px 0 14px; }
.quote-total .big { font-size: 26px; font-weight: 800; color: var(--accent); }
.formula { font-size: 13px; color: var(--ink-2); }

/* Cart */
.cart-fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; box-shadow: 0 8px 24px rgba(255,122,26,.4); border-radius: 999px; padding: 12px 20px; }
.cart-fab .count { background: #fff; color: var(--accent); border-radius: 999px; padding: 0 8px; font-size: 13px; font-weight: 800; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.cart-item:last-child { border-bottom: 0; }
.cart-item .info { flex: 1; min-width: 0; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 24px; font-weight: 800; margin-top: 4px; letter-spacing: -.3px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.hl { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-color: transparent; }
.kpi.hl .label, .kpi.hl .sub { color: rgba(255,255,255,.85); }
.kpi.warn .value { color: var(--warn); }
.kpi.accent .value { color: var(--accent); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.tab .badge { margin-left: 4px; }

/* Table */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #fafbfc; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfd; }
td input { padding: 6px 8px; min-width: 110px; }
tfoot td { font-weight: 800; background: #fafbfc; }
/* Điểm uy tín xưởng & đơn ưu tiên */
.score-card { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 18px; align-items: center; }
.sc-main { display: flex; gap: 14px; align-items: center; }
.sc-ring { --p: 0; width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center; align-content: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), #eef0f2 0); position: relative; }
.sc-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.sc-ring b, .sc-ring small { position: relative; line-height: 1; }
.sc-ring b { font-size: 26px; font-weight: 800; }
.sc-ring small { font-size: 11px; color: var(--muted); }
.sc-block { margin-top: 8px; font-size: 13px; color: var(--danger); background: var(--danger-soft); border-radius: 8px; padding: 6px 10px; }
.sc-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.sc-part { font-size: 13px; }
.sc-part em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.sc-part .fn-bar { margin: 5px 0 3px; }
.sc-part small { color: var(--muted); font-size: 12px; }
.sc-tips { grid-column: 1 / -1; font-size: 13px; background: var(--info-soft); color: #1e4fb8; border-radius: 10px; padding: 8px 12px; }
.order-card.is-offer { border-color: #f5b301; box-shadow: 0 0 0 3px #fff3cd; }
.offer-banner { margin: -16px -16px 4px; padding: 8px 14px; background: linear-gradient(90deg, #fff3cd, #ffe8b0); color: #7a5003; font-size: 13px; border-radius: 14px 14px 0 0; }
.offer-tag { display: inline-block; font-weight: 700; color: #7a5003; background: #fff3cd; border-radius: 6px; padding: 1px 6px; }
.offer-tag.open { color: var(--danger); background: var(--danger-soft); }
.crit { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.crit div { font-size: 13px; padding-left: 10px; border-left: 3px solid #f0c9a8; }
.crit b { display: block; font-size: 13.5px; }
.crit span { color: var(--ink-2); }
.dispatch-form .field { margin-bottom: 8px; }
.score-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.score-pill i { font-style: normal; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; }
@media (max-width: 760px) { .score-card { grid-template-columns: 1fr; } .sc-parts { grid-template-columns: 1fr; } }
.ref-tag { display: inline-block; font-size: 12px; font-weight: 700; color: #9a6503; background: var(--warn-soft); border-radius: 6px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }
/* Lịch khảo sát & ảnh hiện trạng trên đơn (cổng xưởng / nền tảng) */
.survey-tag { color: #9a6503; background: var(--warn-soft); display: inline-block; padding: 2px 8px; border-radius: 8px; margin-top: 4px; }
.photo-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.photo-row img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--line); transition: transform .15s; }
.photo-row img:hover { transform: scale(1.06); }
.photo-big { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #000; }

/* Bảng giá có ảnh sản phẩm */
.pt-prod { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.pt-thumb { position: relative; width: 56px; height: 56px; flex: none; border-radius: 10px; overflow: hidden; background: var(--brand-soft); border: 2px dashed transparent; transition: border-color .2s, transform .2s; }
.pt-thumb label { display: block; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-thumb .img-fallback { font-size: 26px; }
.pt-cam { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 18px; opacity: 0; transition: opacity .2s; }
.pt-thumb:hover .pt-cam { opacity: 1; }
.pt-thumb.drag { border-color: var(--brand); transform: scale(1.06); }
.pt-img-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.pt-img-actions button { border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--info); cursor: pointer; }
.pt-img-actions button.danger { color: var(--danger); }
.no-img-tag { font-size: 11.5px; font-weight: 700; color: #9a6503; background: var(--warn-soft); border-radius: 6px; padding: 1px 6px; }
.pt-help { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--info-soft); color: #1e4fb8; font-size: 13.5px; }
.pt-meter { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ink-2); }
.pt-meter .meter { width: 100px; }

/* Bảng báo giá hệ thống – bố cục ngang, ảnh mẫu lớn */
.pt-head { padding: 16px 18px; }
.pt-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pt-head h3 { margin: 0 0 2px; font-size: 18px; }
.pt-head p { margin: 0; }
.pt-rate { display: flex; align-items: center; gap: 8px; background: #f6f7f9; border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; }
.pt-rate label { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.pt-rate-in { display: flex; align-items: center; gap: 4px; }
.pt-rate-in input { width: 64px; min-width: 0; padding: 6px 8px; text-align: right; }
.pt-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pt-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; min-width: 0; max-width: 100%; }
.pt-tools > * { max-width: 100%; }
.pt-chips::-webkit-scrollbar { display: none; }
.pt-chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.pt-chip span { margin-left: 4px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.pt-chip:hover { border-color: #c9ced6; }
.pt-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pt-chip.active span { color: rgba(255,255,255,.7); }
.pt-search { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-search input[type=search] { width: 230px; min-width: 0; padding: 8px 12px; border-radius: 10px; }
.pt-noimg { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: #9a6503; background: var(--warn-soft); border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.pt-noimg input { width: auto; min-width: 0; margin: 0; }
.pt-rule { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); line-height: 1.55; }

.pt-wrap { max-height: calc(100vh - 150px); overflow: auto; }
.pt-table { font-size: 13.5px; }
.pt-table thead th { position: sticky; top: 0; z-index: 2; background: #f6f7f9; vertical-align: bottom; line-height: 1.3; box-shadow: inset 0 -1px 0 var(--line); white-space: normal; min-width: 96px; text-transform: none; font-size: 12.5px; letter-spacing: 0; color: var(--ink-2); }
.pt-table thead th small { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.pt-table thead th small input { width: 58px; min-width: 0; padding: 3px 6px; font-size: 12px; margin-left: 2px; }
.pt-table thead th.pt-prod-cell { min-width: 260px; }
.pt-table td { padding: 9px 10px; }
.pt-table th { padding: 10px 10px; }
.pt-table td:first-child, .pt-table th:first-child { padding-left: 14px; }
.pt-table tbody tr:hover td { background: transparent; }
.pt-item:hover td { background: #fbfaf8; }
.pt-item tr:not(.pt-last) td:not(.pt-prod-cell) { border-bottom: 1px dashed #edf0f3; }
.pt-item td.pt-prod-cell { vertical-align: top; border-right: 1px solid var(--line); width: 272px; min-width: 260px; }
.pt-info { flex: 1; }
.pt-group td { background: #fff7ef; color: var(--brand-dark); font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; padding: 9px 14px; border-top: 1px solid var(--line); }
.pt-group td span { margin-left: 8px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.pt-empty td { text-align: center; color: var(--muted); padding: 30px; }
.pt-table .pt-prod { align-items: flex-start; gap: 10px; min-width: 236px; }
.pt-table .pt-thumb { width: 104px; height: 78px; border-radius: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.pt-table .pt-thumb[onclick] { cursor: zoom-in; }
.pt-table .pt-thumb .img-fallback { font-size: 40px; }
.pt-table .pt-thumb:hover img { transform: scale(1.04); }
.pt-table .pt-thumb img { transition: transform .3s var(--ease); }
.pt-cam small { display: block; font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.pt-table .pt-cam { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 20px; }
.pt-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pt-info b { font-size: 14.5px; line-height: 1.35; }
.pt-code { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 6px; padding: 1px 7px; }
.pt-unit { font-size: 12.5px; color: var(--muted); }
.pt-pixel { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #f3f6ff; border: 1px solid #d6e0fb; }
.pt-pixel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.pt-pixel-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-pixel-row input[name=id] { flex: 1 1 260px; min-width: 0; padding: 8px 12px; border-radius: 10px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .3px; }
.pt-pixel-on { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.pt-pixel-on input { width: auto; min-width: 0; margin: 0; }
.pt-pixel-ev { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pt-ev { padding: 2px 9px; border-radius: 999px; background: #fff; border: 1px solid #d6e0fb; font-size: 12px; font-weight: 600; color: #2b4fa8; }
.pt-adlink { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 8px 12px; border-radius: 12px; background: #fff8f1; border: 1px solid #fed7aa; font-size: 13px; }
.pt-adlink code { background: #fff; border: 1px solid #fed7aa; border-radius: 6px; padding: 2px 8px; font-size: 12.5px; word-break: break-all; }
.pt-flags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pt-new { font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f97316, #e5484d); border-radius: 6px; padding: 1px 7px; box-shadow: 0 2px 6px rgba(229,72,77,.3); }
.pt-new-toggle { border: 1px dashed #f0b27a; background: #fff8f1; color: #c2410c; border-radius: 6px; padding: 1px 7px; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.pt-new-toggle:hover { background: #ffedd5; }
.pt-new-toggle.on { border-color: var(--line); background: #fff; color: var(--muted); }
.pt-item.is-new td.pt-prod-cell { box-shadow: inset 3px 0 0 #f97316; }
.pt-chip-new { border-color: #fed7aa; color: #c2410c; background: #fff8f1; }
.pt-chip-new.active { background: linear-gradient(135deg, #f97316, #e5484d); border-color: transparent; color: #fff; }
.pt-ok { font-size: 11.5px; font-weight: 700; color: #11804a; }
/* Thêm / sửa sản phẩm (cổng vận hành) */
.pt-add { flex: none; align-self: center; }
.pt-edit { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 6px; padding: 0 7px; font: inherit; font-size: 11.5px; font-weight: 600; line-height: 19px; cursor: pointer; }
.pt-edit:hover { border-color: var(--ink); color: var(--ink); }
.pt-group-add { margin-left: 12px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--brand-dark); cursor: pointer; opacity: .75; }
.pt-group-add:hover { opacity: 1; text-decoration: underline; }
.pe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pe-wide { grid-column: 1 / -1; }
.pe-dim-row { display: flex; gap: 8px; }
.pe-dim-row label { flex: 1; margin: 0; }
.pe-dim-row small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.pe-h { margin: 14px 0 8px; font-size: 14.5px; }
.pe-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pe-mode { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; font-size: 13.5px; transition: border-color .15s, background .15s; }
.pe-mode input { display: none; }
.pe-mode small { color: var(--muted); font-size: 12px; line-height: 1.4; font-weight: 400; }
.pe-mode.on { border-color: var(--brand); background: #fff7ef; box-shadow: inset 0 0 0 1px var(--brand); }
.pe-rows { display: grid; gap: 6px; }
.pe-row { display: grid; grid-template-columns: 1.3fr 1.3fr 150px 40px; gap: 6px; align-items: center; }
.pe-row.no-note { grid-template-columns: 2fr 150px 40px; }
.pe-row-h { font-size: 12px; color: var(--muted); font-weight: 700; }
.pe-rows:has(.no-note) .pe-row-h { grid-template-columns: 2fr 150px 40px; }
.pe-row input { min-width: 0; }
.pe-row .pt-money, .pe .pt-money { text-align: right; font-weight: 700; }
.pe-rows > .btn { justify-self: start; }
.pe-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-del { color: var(--danger) !important; }
@media (max-width: 640px) {
  .pe-grid, .pe-modes { grid-template-columns: 1fr; }
  .pe-row, .pe-row.no-note { grid-template-columns: 1fr 120px 36px; }
  .pe-row input:nth-child(2):not(.pt-money) { grid-column: 1 / -1; order: 5; }
  .pe-row-h { display: none; }
}
/* Ảnh theo kiểu & vật liệu (cổng vận hành) */
.pt-img-actions button.pt-var-btn { color: #8a4a12; font-weight: 600; }
.vi-row-title { margin: 14px 0 8px; font-size: 14px; }
.vi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.vi-cell { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; transition: border-color .15s, transform .15s; }
.vi-cell.drag { border-color: var(--brand); transform: scale(1.03); }
.vi-img { display: block; aspect-ratio: 4 / 3; margin: 0; cursor: pointer; background: #f6f7f9; }
.vi-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vi-add { height: 100%; display: grid; place-content: center; text-align: center; color: var(--muted); font-size: 22px; }
.vi-add small { display: block; font-size: 12px; font-weight: 600; }
.vi-cell:hover .vi-add { color: var(--brand-dark); }
.vi-cap { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 10px; font-size: 13px; }
.vi-cap button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.vi-cap button:hover { color: var(--danger); }
/* Ô sản phẩm gọn: mã + đơn vị cùng hàng, tên đậm, thao tác ảnh chữ nhỏ màu xám (đậm lên khi rê chuột) */
.pt-img-actions { margin-top: 2px; gap: 2px 10px; }
.pt-img-actions button { padding: 1px 0; border-radius: 0; color: var(--muted); font-weight: 500; font-size: 12px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; transition: color .15s, text-decoration-color .15s; }
.pt-img-actions button:hover { background: none; color: var(--info); text-decoration-color: currentColor; }
.pt-img-actions button.danger { color: var(--muted); }
.pt-img-actions button.danger:hover { background: none; color: var(--danger); }
.pt-spec { color: var(--ink-2); min-width: 112px; max-width: 200px; line-height: 1.4; font-size: 13px; }
.pt-head-top > div:first-child { flex: 1 1 320px; }
.pt-table td.pt-base, .pt-table th.pt-base { background: #fcfbf7; }
.pt-table thead th.pt-base { background: #f3f1ea; }
.pt-table td.pt-base b { font-size: 14px; }
.pt-table td.pt-base input { width: 106px; min-width: 0; text-align: right; font-weight: 700; padding: 6px 8px; }
.pt-fee { color: #b45309; font-weight: 700; }
.pt-savebar { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -4px 20px rgba(16,24,40,.06); }
@media (max-width: 760px) {
  .pt-head { padding: 14px; }
  .pt-tools { flex-direction: column; align-items: stretch; }
  .pt-search input[type=search] { width: 100%; flex: 1; }
  .pt-wrap { max-height: none; }
  .pt-table thead th.pt-prod-cell, .pt-item td.pt-prod-cell { min-width: 170px; width: 170px; }
  .pt-table .pt-prod { flex-direction: column; min-width: 150px; gap: 8px; }
  .pt-table .pt-thumb { width: 148px; height: 111px; }
  .pt-info b { font-size: 13.5px; }
  .pt-savebar { justify-content: stretch; } .pt-savebar .btn { flex: 1; }
}

/* Ảnh sản phẩm (cổng nền tảng) */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.img-card { background: #fff; border: 2px dashed transparent; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: border-color .2s, transform .2s; }
.img-card.drag { border-color: var(--brand); transform: scale(1.02); }
.img-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--brand-soft); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-thumb .img-fallback { font-size: 48px; }
.no-img { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.img-meta { padding: 10px 12px 12px; font-size: 14px; }
.img-meta label.btn { margin: 0; color: #fff; font-size: 13px; }
.meter { width: 180px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; }
.group-row td { background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; padding: 8px 14px; }
.opt-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding: 2px 0; white-space: nowrap; }
.opt-line span { color: var(--ink-2); }
.opt-line input { width: 120px; min-width: 0; }

/* Badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-new { background: var(--accent-soft); color: #c2560a; }
.b-accepted { background: var(--info-soft); color: var(--info); }
.b-producing { background: var(--warn-soft); color: #9a6503; }
.b-done { background: var(--brand-soft); color: var(--brand-dark); }
.b-cancelled { background: #eef0f2; color: var(--muted); }
.b-active { background: var(--brand-soft); color: var(--brand-dark); }
.b-pending { background: var(--warn-soft); color: #9a6503; }
.b-inactive { background: #eef0f2; color: var(--muted); }
.b-unpaid { background: var(--danger-soft); color: var(--danger); }
.b-reported { background: var(--warn-soft); color: #9a6503; }
.b-paid { background: var(--brand-soft); color: var(--brand-dark); }
.b-count { background: var(--danger); color: #fff; }

/* Order cards */
.order-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.order-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.order-card.is-new { border-color: #ffc499; box-shadow: 0 0 0 3px var(--accent-soft); }
.order-card .head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.order-card .code { font-weight: 800; }
.order-card ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.commission-note { background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.commission-note b { color: #9a6503; }
.money-line { display: flex; justify-content: space-between; font-size: 14px; }
/* Giá trị báo giá → phí nền tảng → còn lại */
.money-break { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #fafbfc; border: 1px solid var(--line); }
.money-break > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.money-break b { white-space: nowrap; font-size: 15px; }
.money-break .fee span, .money-break .fee b { color: #b45309; }
.money-break .rest { margin-top: 2px; padding-top: 8px; border-top: 1px dashed #d4d8de; }
.money-break .rest span { font-weight: 700; } .money-break .rest b { font-size: 17px; color: #10a35a; }
.money-line strong { font-size: 16px; }

/* Chart */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar { width: 100%; max-width: 54px; background: var(--brand); border-radius: 8px 8px 3px 3px; position: relative; min-height: 3px; }
.bar .comm { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 0 0 3px 3px; }
.bar-val { font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.bar-lbl { font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.feed { display: flex; flex-direction: column; gap: 0; max-height: 420px; overflow: auto; }
.feed-item { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; gap: 10px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; flex: none; }
.feed-item.unread .dot { background: var(--accent); }
.feed-item time { display: block; color: var(--muted); font-size: 12px; }

.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: var(--info-soft); color: #1e4fb8; }
.alert-warn { background: var(--warn-soft); color: #7a5003; }
.alert-ok { background: var(--brand-soft); color: var(--brand-dark); }
/* Nhãn "Xưởng tự lập": báo giá xưởng tự tạo cho khách riêng (vẫn tính phí nền tảng) */
.src-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #6b3fa0; background: #f1eafb; border-radius: 6px; padding: 1px 6px; vertical-align: middle; white-space: nowrap; }
.alert-danger { background: #fdecec; color: #8f1d22; border: 1px solid #f3b5b7; }
/* Nền tảng báo chưa nhận được khoản chuyển (cổng xưởng) */
.pay-issue > div { display: grid; gap: 6px; }
.pay-issue .pi-row { background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13.5px; color: var(--ink); }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .icon { font-size: 40px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 32, .55); }
.modal-card { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 880px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-card.sm { max-width: 520px; }
.modal-close { position: absolute; right: 14px; top: 14px; border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; z-index: 2; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 200; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }

.footer { border-top: 1px solid var(--line); background: #fff; margin-top: 48px; padding: 20px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

.ws-switch { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-left: auto; }
.ws-switch select { width: auto; min-width: 220px; padding: 6px 10px; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 32px 16px; }
  .hero h1 { font-size: 28px; }
  .quote-layout, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top-links a { padding: 6px 8px; font-size: 13px; }
  .brand { font-size: 16px; }
  .top-user { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .order-cards { grid-template-columns: 1fr; }
  .ws-switch { margin-left: 0; width: 100%; }
  .ws-switch select { flex: 1; min-width: 0; }
  .modal-card { padding: 18px; }
  .kpi .value { font-size: 20px; }

  /* Khách hàng trên điện thoại (traffic quảng cáo Facebook) */
  .top-links { display: none; }
  .hero-compact .container { padding-top: 20px; padding-bottom: 22px; }
  .hero-compact h1 { font-size: 26px; }
  .hero-compact p { font-size: 15px; }
  .hero-compact .hero-badges { gap: 6px; margin-top: 10px; }
  .hero-compact .hero-badges span { padding: 4px 9px; font-size: 12px; }
  .btn-cta { width: 100%; }
  .section-title { margin: 20px 0 10px; }
  .section-title h2 { font-size: 19px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; }
  .chip { white-space: nowrap; padding: 6px 12px; font-size: 13px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-body { padding: 10px; gap: 4px; }
  .product-body h3 { font-size: 14px; }
  .product-body p { display: none; }
  .product-body .row .btn, .product-body .spacer { display: none; }
  .price { font-size: 15px; }
  .product-tag { font-size: 11px; left: 6px; top: 6px; padding: 2px 8px; }
  .quote-img { aspect-ratio: 21 / 9; }
  .quote-layout { gap: 12px; }
  .quote-layout > div:first-child p.muted, .quote-layout > div:first-child .price { display: none; }
  .quote-layout h2.mt { margin-top: 10px; font-size: 19px; }
  input, select { font-size: 16px; }
  .quote-sticky { position: sticky; bottom: -18px; background: #fff; padding: 8px 0 12px; margin: 0 -2px; }
  .quote-total { margin: 0 0 8px; padding: 10px 12px; }
  .quote-total .big { font-size: 22px; }
  .quote-actions .btn { flex: 1; padding: 12px 8px; }
  .mobile-bar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
  .mobile-bar .btn { flex: 1; padding: 12px; }
  .portal-customer .footer { padding-bottom: 84px; }
  .cart-fab { bottom: 76px; right: 12px; }
}

/* Sao lưu dữ liệu (cổng vận hành) */
.bk-list { display: grid; gap: 8px; }
.bk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.bk-row b { display: block; font-size: 14px; } .bk-row small { color: var(--muted); font-size: 12.5px; }

/* Hộp "Thanh toán phí đơn": rộng hơn, mỗi dòng 1 hàng ngang, chữ gọn không xuống dòng */
.modal-card.sm:has(.pay-modal) { max-width: 660px; }
#modal-body:has(.pay-modal) h2 { font-size: 21px; margin: 0 40px 16px 0; }
.pay-modal { gap: 20px; }
.pay-modal .vqr { padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pay-modal .pay-lines { margin-top: 0; gap: 0; }
.pay-modal .pay-lines > div { grid-template-columns: 104px 1fr; padding: 9px 0; }
.pay-modal .pay-lines span { font-size: 13px; white-space: nowrap; }
.pay-modal .pay-lines b { font-size: 15px; font-weight: 700; white-space: nowrap; text-align: right; justify-self: end; }
.pay-modal .pay-amt { font-size: 20px; }
.pay-modal .ref-code { font-size: 13px; white-space: nowrap; }
@media (max-width: 640px) {
  .pay-modal .pay-lines > div { grid-template-columns: 96px 1fr; }
  .pay-modal .pay-lines b { white-space: normal; }
}

/* ---------- Tin tức & hoạt động (cổng xưởng + cổng vận hành) ---------- */
.portal-platform .photo-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.portal-platform .pp-item { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; }
.portal-platform .pp-item img { width: 100%; height: 100%; object-fit: cover; }
.portal-platform .pp-item button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; cursor: pointer; }
.portal-platform .pp-add { width: 84px; height: 84px; margin: 0; border: 2px dashed #cbd5e1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); }
.portal-platform .pp-add:hover { border-color: var(--accent); }
.portal-platform .pp-add span { font-size: 22px; line-height: 1; } .portal-platform .pp-add small { font-size: 10.5px; }
.news-intro-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.news-intro-row > div { flex: 1; min-width: 220px; }
.news-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.news-stats > div { background: var(--bg, #f4f5f7); border-radius: 12px; padding: 10px 12px; }
.news-stats b { display: block; font-size: 20px; } .news-stats span { font-size: 12px; color: var(--muted); }
.news-todo .row { padding: 8px 0; border-top: 1px solid var(--line, #eef0f3); } .news-todo .row:first-child { border-top: 0; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.news-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.08); display: flex; flex-direction: column; }
.news-cover { position: relative; aspect-ratio: 4 / 3; background: #eef0f3; }
.news-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-cover .img-fallback.small { font-size: 13px; color: var(--muted); background: #eef0f3; }
.news-kind { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 11.5px; font-weight: 700; }
.news-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.news-body small { color: var(--muted); font-size: 12px; }
.kind-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.kind-pick label { margin: 0; cursor: pointer; }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid #d6dbe3; font-weight: 600; font-size: 14px; }
.kind-pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: #9a3f06; }
.kind-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.news-review { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.news-review img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
@media (max-width: 600px) {
  .news-stats { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .news-body .row { flex-wrap: wrap; }
}
