/* Content Factory, giao diện kem cam (Founder chốt 21/11/2026): nền kem, chữ nâu đen, nhấn cam, tiêu đề to đậm có dòng màu cam.
   Cam #FF5A36 chỉ dùng cho nét nhấn, chấm, số to; nút dùng cam đậm #D63D16 để chữ trắng đạt mức dễ đọc AA (4,6:1);
   chữ cam cỡ nhỏ dùng #C2410C (4,7:1 trên nền kem). Thẻ nền trắng để chữ dày dễ đọc. Mọi thứ bấm được có chuyển động 150ms. */
:root {
  --bg: #F8F4EE; --bg2: #F2ECE3; --card: #FFFFFF; --card2: #FBF8F3; --ink: #1C1917; --muted: #57534E; --dim: #6B6560;
  --line: rgba(28,25,23,.09); --line2: rgba(28,25,23,.16);
  --cam: #FF5A36; --cam-nut: #D63D16; --cam-nut2: #C2340F; --cam-chu: #C2410C; --cam-nhe: #FFE9E2; --cam-vien: rgba(255,90,54,.35);
  --dark: #1C1917; --dark2: #292524;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --info: #1d4ed8;
  --ok-bg: #E7F5EC; --warn-bg: #FDF1DC; --bad-bg: #FCE8E6; --info-bg: #E6EDFD;
  --shadow: 0 1px 2px rgba(28,25,23,.05), 0 10px 30px -12px rgba(28,25,23,.14);
  --r: 16px; --rb: 12px; --t: 150ms cubic-bezier(.4,0,.2,1);
  --sans: "Be Vietnam Pro", -apple-system, "Segoe UI", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--cam-chu); text-decoration: none; transition: color var(--t); } a:hover { color: var(--cam-nut2); text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; }
h2 { font-size: 1.15rem; margin: 0 0 12px; font-weight: 700; letter-spacing: -.01em; } h3 { font-size: 1rem; margin: 14px 0 6px; font-weight: 700; }
p { margin: 6px 0; } .muted { color: var(--muted); } .small { font-size: .875rem; }
.mono, .num, code { font-family: var(--mono); font-variant-numeric: tabular-nums; } code { font-size: .875rem; background: var(--bg2); padding: 1px 6px; border-radius: 6px; }
.grad { color: var(--cam); } /* dòng nhấn của tiêu đề lớn: cam đặc, chữ ≥40px đạt mức tương phản cho chữ lớn */
:focus-visible { outline: 3px solid var(--cam); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--card); padding: 8px 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Thanh đầu trang: dính trên đầu, nền kem mờ */
.top { position: sticky; top: 0; z-index: 30; background: #F8F4EE; border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { color: var(--ink); text-decoration: none; } .brand small { font-weight: 500; color: var(--muted); font-size: .8125rem; letter-spacing: 0; margin-left: 2px; }
.account a, .account .btn { white-space: nowrap; }
.mark { width: 34px; height: 34px; border-radius: 10px; background: var(--cam); display: grid; place-items: center; box-shadow: 0 6px 16px -4px rgba(255,90,54,.55); }
.mark svg { width: 19px; height: 19px; stroke: #fff; }
.topnav { display: flex; gap: 2px; margin: 0 auto; }
.topnav a { white-space: nowrap; position: relative; color: var(--muted); padding: 8px 14px; border-radius: 10px; font-size: .9375rem; font-weight: 600; transition: color var(--t), background-color var(--t); }
.topnav a:hover, .topnav a[aria-current] { color: var(--ink); background: rgba(28,25,23,.05); text-decoration: none; }
.topnav a[aria-current]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--cam); }
.account { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: .9375rem; } .account form { margin: 0; } .who { color: var(--muted); }
.account > a:not(.btn) { color: var(--ink); font-weight: 600; padding: 8px 12px; border-radius: 10px; transition: background-color var(--t); } .account > a:not(.btn):hover { background: rgba(28,25,23,.05); text-decoration: none; }

/* Nút: cam đậm chữ trắng, nhấc nhẹ khi rê chuột */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: var(--rb); border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); font: 700 .9375rem/1.2 var(--sans); cursor: pointer; text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), background-color var(--t), border-color var(--t), color var(--t); }
.btn:hover { transform: translateY(-2px); border-color: var(--ink); color: var(--ink); text-decoration: none; box-shadow: 0 8px 18px -10px rgba(28,25,23,.35); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.primary { background: var(--cam-nut); border-color: var(--cam-nut); color: #fff; box-shadow: 0 10px 24px -10px rgba(214,61,22,.7); }
.btn.primary:hover { background: var(--cam-nut2); border-color: var(--cam-nut2); color: #fff; box-shadow: 0 14px 28px -10px rgba(214,61,22,.8); }
.btn.dark { background: var(--dark); border-color: var(--dark); color: #fff; } .btn.dark:hover { background: #000; color: #fff; }
.btn.danger { color: var(--bad); border-color: rgba(185,28,28,.35); } .btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: .875rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
button.link { background: none; border: 0; padding: 8px 4px; color: var(--muted); font: 600 .9375rem var(--sans); cursor: pointer; transition: color var(--t); } button.link:hover { color: var(--ink); }
form.inline { display: inline; margin: 0; } .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }

/* Thẻ, viên trạng thái, thông báo */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card.lift { transition: transform var(--t), border-color var(--t), box-shadow var(--t); }
.card.lift:hover { transform: translateY(-4px); border-color: var(--cam-vien); box-shadow: 0 22px 40px -22px rgba(214,61,22,.45); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line2); color: var(--ink); font-size: .875rem; font-weight: 600; box-shadow: var(--shadow); }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .8125rem; font-weight: 700; background: var(--bg2); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok, .badge.done, .badge.chosen { background: var(--ok-bg); color: var(--ok); } .badge.warn, .badge.wait { background: var(--warn-bg); color: var(--warn); }
.badge.cam { background: var(--cam-nhe); color: var(--cam-chu); }
.badge.bad, .badge.fail { background: var(--bad-bg); color: var(--bad); } .badge.info, .badge.busy { background: var(--info-bg); color: var(--info); } .badge.muted, .badge.idle, .badge.dim, .badge.skip { color: var(--muted); }
.flash { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(21,128,61,.25); border-radius: var(--rb); padding: 10px 14px; margin: 0 0 16px; font-weight: 500; }
.flash.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(185,28,28,.3); }
.sim { background: var(--warn-bg); color: #8a4b0a; border: 1px solid rgba(180,83,9,.25); border-radius: var(--rb); padding: 10px 14px; margin: 12px 0; font-size: .9375rem; }
.tag-demo { display: inline-block; font-size: .8125rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; border: 1px dashed var(--line2); color: var(--muted); }

/* Biểu mẫu: ô cao 46px, có nhãn, focus viền cam, lỗi ngay dưới ô */
.field { display: block; margin: 14px 0; } .field > span, .field label > span { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin-top: 6px; font-size: .875rem; } .field .err { color: var(--bad); font-weight: 600; }
input:not([type=radio]):not([type=hidden]):not([type=checkbox]), select { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--rb); border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); font: inherit; transition: border-color var(--t), box-shadow var(--t); }
input:hover, select:hover { border-color: rgba(28,25,23,.3); }
input:focus, select:focus { outline: none; border-color: var(--cam); box-shadow: 0 0 0 4px rgba(255,90,54,.18); }
input[aria-invalid=true] { border-color: var(--bad); }
select { width: auto; }
.pw { position: relative; } .pw input { padding-right: 76px; }
.pw button { position: absolute; right: 7px; top: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--bg2); color: var(--ink); font: 600 .8125rem var(--sans); cursor: pointer; transition: background-color var(--t); }
.pw button:hover { background: var(--cam-nhe); }
fieldset.pick { border: 1px solid var(--line); border-radius: var(--r); margin: 12px 0; padding: 10px 16px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; background: var(--card2); }
fieldset.pick legend { font-weight: 700; padding: 0 6px; } fieldset.pick label { padding: 8px 6px; border-radius: 8px; cursor: pointer; transition: background-color var(--t); } fieldset.pick label:hover { background: var(--cam-nhe); }
fieldset.pick .muted { display: block; margin-left: 26px; font-size: .875rem; }
input[type=radio] { accent-color: var(--cam-nut); width: 16px; height: 16px; vertical-align: -2px; margin-right: 6px; }

/* Bảng: số canh phải, chữ mono */
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: .8125rem; color: var(--muted); font-weight: 700; letter-spacing: .02em; background: var(--card2); }
tbody tr { transition: background-color var(--t); } tbody tr:hover { background: #FFFAF5; } tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; } .table-wrap { overflow-x: auto; }
table.kv th { width: 220px; color: var(--muted); font-weight: 600; font-size: .9375rem; background: none; } table.kv tr:last-child > * { border-bottom: 0; }
ul.tags { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; } ul.tags li { border: 1px solid var(--line2); border-radius: 8px; padding: 4px 10px; font-size: .875rem; background: var(--card); } ul.tags.bad li { border-color: rgba(185,28,28,.3); color: var(--bad); background: #FFF7F6; }
ul.plain { padding-left: 20px; } ul.plain li { margin: 6px 0; }
ul.ticks { list-style: none; padding: 0; margin: 14px 0; } ul.ticks li { position: relative; padding: 5px 0 5px 30px; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--cam-nhe) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23C2410C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }

/* Trang chủ */
.hero { position: relative; padding: 76px 0 64px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -200px -10% auto; height: 700px; pointer-events: none; background: radial-gradient(520px 340px at 78% 34%, rgba(255,90,54,.16), transparent 70%), radial-gradient(420px 300px at 12% 70%, rgba(255,180,120,.18), transparent 70%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4vw, 3.3rem); line-height: 1.08; letter-spacing: -.04em; margin: 22px 0 18px; font-weight: 800; }
.hero .lead { font-size: 1.125rem; color: var(--muted); max-width: 34rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.stats { display: flex; flex-wrap: wrap; gap: 24px 40px; } .stats > div { border-left: 3px solid var(--cam); padding-left: 14px; }
.stats b { display: block; font: 800 1.75rem/1.15 var(--mono); letter-spacing: -.03em; } .stats span { color: var(--muted); font-size: .9375rem; }
section.block { padding: 80px 0; }
section.block.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-block; font-size: .8125rem; font-weight: 800; color: var(--cam-chu); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 40px; } .sec-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -.035em; line-height: 1.15; margin-bottom: 12px; font-weight: 800; } .sec-head p { color: var(--muted); font-size: 1.0625rem; }
.sec-head h2 .grad { display: block; }
.grid { display: grid; gap: 18px; } .cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feat .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--cam-nhe); margin-bottom: 16px; }
.feat .ico svg { width: 24px; height: 24px; stroke: var(--cam-nut); } .feat h3 { margin: 0 0 6px; font-size: 1.0625rem; } .feat p { color: var(--muted); margin: 0; font-size: .9375rem; }
.feat .n { float: right; font: 700 .8125rem var(--mono); color: var(--dim); }

/* Dải số liệu nền nâu đen: điểm nhấn của trang chủ */
.numbers { background: var(--dark); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.numbers::before { content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,90,54,.35), transparent); pointer-events: none; }
.numbers .wrap { position: relative; }
.numbers h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -.03em; font-weight: 800; margin: 0 0 6px; } .numbers .sub { color: #D6D3D1; margin: 0 0 32px; }
.numbers .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.12); }
.numbers .cell { padding: 24px 20px 6px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.numbers .cell b { display: block; font: 800 clamp(2rem, 4vw, 3rem)/1.05 var(--mono); letter-spacing: -.04em; color: var(--cam); }
.numbers .cell span { display: block; font-weight: 700; margin-top: 8px; } .numbers .cell small { display: block; color: #D6D3D1; font-size: .875rem; margin: 4px 0 18px; }

/* Thẻ sản phẩm sống (minh hoạ) */
.live { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 30px 60px -30px rgba(28,25,23,.35), 0 0 0 6px rgba(255,255,255,.6); min-width: 0; }
.live-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; } .live-head .muted { font-size: .875rem; } .live-head b { font: 700 1.15rem/1.3 var(--mono); }
.mini { list-style: none; padding: 0; margin: 20px 0 6px; display: grid; grid-template-columns: repeat(8, 1fr); position: relative; }
.mini::before { content: ""; position: absolute; left: 6%; right: 6%; top: 9px; height: 2px; background: var(--line2); }
.mini li { position: relative; text-align: center; font-size: .8125rem; color: var(--muted); padding-top: 26px; font-weight: 500; }
.mini li::before { content: ""; position: absolute; left: 50%; top: 2px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ok); border: 2px solid var(--ok); }
@keyframes step { 0% { border-color: var(--line2); background: var(--card); box-shadow: none; } 4% { border-color: var(--cam); background: var(--cam); box-shadow: 0 0 0 6px rgba(255,90,54,.2); } 12%, 100% { border-color: var(--ok); background: var(--ok); box-shadow: none; } }
.mini li:nth-child(1) { --i: 0; } .mini li:nth-child(2) { --i: 1; } .mini li:nth-child(3) { --i: 2; } .mini li:nth-child(4) { --i: 3; } .mini li:nth-child(5) { --i: 4; } .mini li:nth-child(6) { --i: 5; } .mini li:nth-child(7) { --i: 6; } .mini li:nth-child(8) { --i: 7; }
.rows { display: grid; gap: 10px; margin-top: 18px; }
.row { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; transition: border-color var(--t), background-color var(--t); }
.row:hover { border-color: var(--cam-vien); background: #FFFAF5; } .row > div { min-width: 0; }
.row .tile { width: 42px; height: 42px; border-radius: 10px; background: var(--dark); display: grid; place-items: center; font: 700 .8125rem var(--mono); color: #fff; }
.row b { display: block; font-weight: 700; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .row .muted { font-size: .8125rem; }
.row .r { text-align: right; } .row .r .mono { display: block; font-size: .875rem; color: var(--ink); font-weight: 600; }

/* Tab ngành: gạch chân cam chạy theo tab đang chọn */
.tabs { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line2); margin-bottom: 28px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; background: none; border: 0; color: var(--muted); font: 600 .9375rem var(--sans); padding: 12px 16px; cursor: pointer; border-radius: 10px 10px 0 0; transition: color var(--t), background-color var(--t); }
.tabs button:hover { color: var(--ink); background: rgba(28,25,23,.04); } .tabs button[aria-selected=true] { color: var(--ink); }
.tabs .ink { position: absolute; bottom: -1px; left: 0; height: 3px; width: 0; border-radius: 3px; background: var(--cam); transition: transform 250ms cubic-bezier(.4,0,.2,1), width 250ms cubic-bezier(.4,0,.2,1); }
.tabpanel[hidden] { display: none; } .tabpanel { animation: fade 200ms ease; } @keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.sample { white-space: pre-wrap; font-size: .9375rem; background: var(--card2); border: 1px solid var(--line); border-left: 3px solid var(--cam); border-radius: 10px; padding: 12px 16px; margin: 0 0 10px; }

/* Bảng giá 3 gói */
.price { display: flex; flex-direction: column; } .price .amt { font-size: 1.3rem; font-weight: 800; margin: 8px 0 2px; letter-spacing: -.02em; } .price .btn { margin-top: auto; }
.price.hot { background: var(--dark); color: #fff; border-color: var(--dark); transform: translateY(-10px); box-shadow: 0 30px 60px -30px rgba(28,25,23,.6); }
.price.hot:hover { transform: translateY(-13px); border-color: var(--cam); } .price.hot ul.ticks li { color: #F5F5F4; } .price.hot ul.ticks li::before { background-color: rgba(255,90,54,.25); }
.price.hot .btn:disabled { background: #44403C; border-color: #44403C; color: #E7E5E4; opacity: 1; }
.price .tag-hot { align-self: flex-start; font-size: .8125rem; font-weight: 800; color: #fff; background: var(--cam-nut); padding: 3px 10px; border-radius: 99px; }

/* Chân trang */
.foot { background: var(--dark); color: #E7E5E4; padding: 56px 0 28px; }
.foot .cols { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 28px; } .foot h4 { margin: 0 0 14px; font-size: .9375rem; color: #fff; }
.foot .brand { color: #fff; } .foot .muted { color: #D6D3D1; }
.foot ul { list-style: none; padding: 0; margin: 0; } .foot li { margin: 8px 0; font-size: .9375rem; color: #D6D3D1; } .foot li a { color: #D6D3D1; } .foot li a:hover { color: #fff; }
.foot .legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; color: #D6D3D1; font-size: .875rem; }

/* Đăng nhập, đăng ký: chia đôi màn hình */
.auth { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 64px; position: relative; }
.auth::before { content: ""; position: absolute; inset: 0 -20% auto 30%; height: 520px; pointer-events: none; background: radial-gradient(480px 300px at 60% 40%, rgba(255,90,54,.14), transparent 70%); }
.auth .card { position: relative; padding: 32px; } .auth h1 { font-size: 1.85rem; } .auth .side-info { position: relative; }
.auth .btn.primary { width: 100%; margin-top: 8px; }

/* Ứng dụng: thanh bên có biểu tượng */
.wrap.app { max-width: 1480px; } .app { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 28px; align-items: start; }
.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 24px 0; }
.side a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: .9375rem; transition: color var(--t), background-color var(--t); }
.side a svg { width: 18px; height: 18px; stroke: currentColor; flex: 0 0 auto; } .side a:hover { color: var(--ink); background: rgba(28,25,23,.05); text-decoration: none; }
.side a[aria-current] { color: var(--ink); background: var(--card); box-shadow: var(--shadow); } .side a[aria-current] svg { stroke: var(--cam-nut); }
.side a[aria-current]::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 4px; border-radius: 4px; background: var(--cam); }
.side .sep { height: 1px; background: var(--line); margin: 10px 12px; }
main { padding: 28px 0 56px; min-width: 0; } main.bare { padding: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; } .head h1, .head h2 { margin: 0; } .right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumb { font-size: .875rem; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; position: relative; overflow: hidden; } .kpi .k { color: var(--muted); font-size: .875rem; font-weight: 600; } .kpi .v { font: 800 1.85rem/1.25 var(--mono); letter-spacing: -.03em; margin-top: 4px; } .kpi .s { font-size: .8125rem; color: var(--dim); }
.kpi.hot { background: var(--dark); color: #fff; border-color: var(--dark); } .kpi.hot .k, .kpi.hot .s { color: #D6D3D1; } .kpi.hot .v { color: var(--cam); }
section { margin: 0 0 20px; }
.review { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.narrow { max-width: 520px; margin: 40px auto; } .setup { max-width: 880px; margin: 0 auto; }
ol.steps { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
ol.steps li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line2); border-radius: 99px; font-size: .875rem; color: var(--muted); background: var(--card); font-weight: 600; }
ol.steps .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg2); font: 700 .8125rem var(--mono); }
ol.steps li.now { border-color: var(--cam); color: var(--ink); } ol.steps li.now .n { background: var(--cam-nut); color: #fff; } ol.steps li.done { color: var(--ok); } ol.steps li.done .n { background: var(--ok-bg); color: var(--ok); }
ol.ideas { padding-left: 22px; } ol.ideas li { margin: 12px 0; } ol.ideas span { display: block; }
.preview { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; margin: 10px 0; } .preview img { width: 160px; height: auto; border-radius: 12px; border: 1px solid var(--line); }
pre { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
pre.caption { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.group { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 6px; } .feedback { border-top: 1px solid var(--line); margin-top: 12px; }
.req { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin: 12px 0; background: var(--card2); }
details.scen { border: 1px dashed var(--line2); border-radius: 12px; padding: 10px 14px; margin: 14px 0 6px; background: var(--card2); } details.scen summary { cursor: pointer; color: var(--muted); font-size: .9375rem; font-weight: 600; transition: color var(--t); } details.scen summary:hover { color: var(--ink); }

/* Khung Telegram giả lập: bong bóng chat */
.tg { padding: 0; overflow: hidden; } .tg-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--card2); }
.tg-head .av { width: 38px; height: 38px; border-radius: 50%; background: var(--cam); display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .9375rem; }
.tg-head b { display: block; font-size: .9375rem; } .tg-head span { font-size: .8125rem; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 620px; overflow-y: auto; padding: 16px; background: #F3EEE6; }
.msg { align-self: flex-start; max-width: 92%; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 12px 6px; font-size: .9375rem; box-shadow: 0 1px 2px rgba(28,25,23,.06); }
.msg img { display: block; border-radius: 10px; margin-bottom: 8px; }
.msg .at { display: block; text-align: right; font: .8125rem var(--mono); color: var(--dim); margin-top: 4px; }
.msg .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 2px; } .msg .actions form { display: block; } .msg .actions .btn { width: 100%; min-height: 38px; padding: 6px 10px; font-size: .875rem; background: var(--cam-nhe); border-color: var(--cam-vien); color: var(--cam-nut2); }
.tg .note { padding: 10px 16px 14px; font-size: .875rem; color: var(--muted); border-top: 1px solid var(--line); margin: 0; }

/* Sơ đồ tiến trình phân nhánh (SVG) và sơ đồ dữ liệu */
.graph-wrap { overflow-x: auto; margin: 6px 0 8px; }
svg.graph { display: block; width: 100%; height: auto; min-width: 1000px; font-family: var(--sans); }
svg.erd { min-width: 1000px; }
.edge { fill: none; stroke: rgba(28,25,23,.28); stroke-width: 1.6; }
.edge.idle, .edge.dim { stroke: rgba(28,25,23,.14); } .edge.dim { stroke-dasharray: 3 5; }
.edge.done { stroke: var(--ok); opacity: .75; } .edge.live { stroke: var(--cam); stroke-dasharray: 6 6; animation: flow 1.1s linear infinite; }
.edge.fail { stroke: var(--bad); stroke-dasharray: 5 5; } .edge.back { stroke: #d97706; stroke-dasharray: 4 6; } .edge.back.idle { stroke: rgba(28,25,23,.14); } .edge.back.done { opacity: .75; }
.edge.back.live { stroke: #d97706; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.runner { fill: var(--cam); filter: drop-shadow(0 0 4px rgba(255,90,54,.8)); } .runner.back { fill: #d97706; }
.join { fill: rgba(28,25,23,.25); } .join.done { fill: var(--ok); } .join.wait { fill: var(--warn); }
.node rect { fill: #fff; stroke: rgba(28,25,23,.18); stroke-width: 1.4; transition: stroke var(--t), fill var(--t); }
.node text { fill: var(--muted); font-size: 14px; } .node .title { fill: var(--ink); font-weight: 700; font-size: 15.5px; } .node .time { font-family: var(--mono); font-size: 14px; fill: var(--dim); }
.node.done rect { stroke: rgba(21,128,61,.6); } .node.done .state { fill: var(--ok); }
.node.chosen rect { stroke: var(--ok); stroke-width: 2.2; fill: var(--ok-bg); } .node.chosen .state { fill: var(--ok); font-weight: 700; }
.node.busy rect { stroke: var(--cam); stroke-width: 2.2; fill: #FFF3EE; filter: drop-shadow(0 0 6px rgba(255,90,54,.45)); } .node.busy .state { fill: var(--cam-chu); font-weight: 700; }
.node.wait rect { stroke: var(--warn); stroke-width: 2.2; fill: #FFF7E8; } .node.wait .state { fill: var(--warn); font-weight: 700; }
.node.fail rect { stroke: var(--bad); stroke-width: 2.2; fill: var(--bad-bg); } .node.fail .state { fill: var(--bad); font-weight: 700; }
.node.dim { opacity: .45; } .node.skip { opacity: .55; } .node.skip rect { stroke-dasharray: 4 4; }
.node:hover rect, .node:focus-visible rect { stroke: var(--ink); } .node:focus { outline: none; }
@keyframes breathe { 0%, 100% { filter: drop-shadow(0 0 1px rgba(255,90,54,.25)); } 50% { filter: drop-shadow(0 0 10px rgba(255,90,54,.75)); } }
.lane-label { fill: var(--dim); font-size: 14px; font-weight: 700; letter-spacing: .08em; } .back-label { fill: #a35207; font-size: 14px; font-weight: 600; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 6px 0 12px; font-size: .875rem; color: var(--muted); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 2px solid rgba(28,25,23,.2); margin-right: 8px; vertical-align: -1px; background: #fff; }
.sw.busy { border-color: var(--cam); } .sw.wait { border-color: var(--warn); } .sw.done { border-color: var(--ok); } .sw.chosen { border-color: var(--ok); background: var(--ok-bg); } .sw.fail { border-color: var(--bad); background: var(--bad-bg); }
.node-details { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.node-detail { display: none; } .node-detail:target, .node-detail.open { display: block; } .node-details:has(.node-detail:target) .node-hint, .node-details:has(.node-detail.open) .node-hint { display: none; }
.node-detail pre { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; max-height: 360px; overflow: auto; }
.flow-list { display: none; list-style: none; padding: 0; margin: 4px 0 10px; }
.fl-group { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line2); margin-left: 6px; } .fl-group:last-child { border-left-color: transparent; }
.fl-group::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--line2); }
.fl-title { display: block; font-size: .875rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.fl-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.fl-node { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(28,25,23,.16); background: var(--card); color: var(--muted); font-size: .8125rem; transition: border-color var(--t); }
.fl-node:hover { text-decoration: none; border-color: var(--ink); } .fl-node b { color: var(--ink); font-size: .9375rem; } .fl-node .mono { font-size: .8125rem; color: var(--dim); }
.fl-node.done { border-color: rgba(21,128,61,.55); } .fl-node.chosen { border-color: var(--ok); background: var(--ok-bg); } .fl-node.busy { border-color: var(--cam); background: #FFF3EE; }
.fl-node.wait { border-color: var(--warn); background: #FFF7E8; } .fl-node.fail { border-color: var(--bad); background: var(--bad-bg); } .fl-node.dim, .fl-node.skip { opacity: .5; }
.ent .head { fill: var(--bg2); stroke: rgba(28,25,23,.18); } .ent .body { fill: #fff; stroke: rgba(28,25,23,.18); }
.ent text { font-size: 14.5px; font-family: var(--mono); } .ent .name { fill: var(--ink); font-weight: 800; font-family: var(--sans); font-size: 15.5px; }
.ent .note { fill: var(--cam-chu); font-size: 14.5px; font-family: var(--sans); font-weight: 600; } .ent .k { fill: var(--cam-chu); font-weight: 700; } .ent .fk { fill: var(--ink); } .ent .f { fill: var(--muted); } .ent .tag { fill: var(--dim); font-size: 14.5px; }
.rel { fill: none; stroke: rgba(28,25,23,.35); stroke-width: 1.4; } .rel-dot { fill: rgba(28,25,23,.45); }

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } .runner { display: none; } }

/* Màn hình vừa và nhỏ */
@media (max-width: 1080px) { .topnav { display: none; } .hero .wrap { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .review { grid-template-columns: 1fr; } .foot .cols { grid-template-columns: repeat(3, 1fr); } .cols4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; gap: 0; } .side { position: static; flex-direction: row; overflow-x: auto; padding: 12px 0 0; scrollbar-width: none; } .side a { flex: 0 0 auto; } .side a[aria-current]::before { display: none; } .side .sep { display: none; } .topnav { display: none; } .auth { grid-template-columns: 1fr; gap: 32px; } .cols3, .cols2 { grid-template-columns: 1fr; } .price.hot { transform: none; } .price.hot:hover { transform: translateY(-3px); } .numbers .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) {
  .wrap { padding: 0 16px; } h1 { font-size: 1.65rem; } .hero { padding: 40px 0 40px; } .hero .wrap { gap: 32px; }
  .graph-wrap:has(svg.flow) { display: none; } .flow-list { display: block; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 14px; } .kpi .v { font-size: 1.35rem; }
  .cols4 { grid-template-columns: 1fr; } .foot .cols { grid-template-columns: 1fr 1fr; } section.block { padding: 52px 0; } .numbers { padding: 48px 0; }
  .account .who { display: none; } .account > a:not(.btn) { padding: 8px 6px; }
  .preview { grid-template-columns: 1fr; } .card { padding: 18px; } .auth { padding-top: 28px; padding-bottom: 32px; } .auth .card { padding: 22px; }
  table.cards thead { display: none; } table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; background: var(--card); }
  table.cards td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; } table.cards td::before { content: attr(data-label); color: var(--muted); text-align: left; font-family: var(--sans); font-weight: 600; }
  table.kv th { width: auto; } .hide-sm { display: none; } .brand-name { font-size: .95rem; } .brand small { display: none; }
  .bar { gap: 8px; } .account { gap: 4px; } .top .btn.small { padding: 6px 12px; } .mark { width: 30px; height: 30px; }
  .mini { grid-template-columns: repeat(4, 1fr); row-gap: 14px; } .mini::before { display: none; }
}
@media (max-width: 520px) {
  .numbers .grid { grid-template-columns: 1fr 1fr; column-gap: 16px; } .numbers .cell { padding-right: 0; } .numbers .cell b { font-size: 1.75rem; }
  .brand { gap: 8px; } .brand-name { font-size: .875rem; } .mark { width: 28px; height: 28px; } .mark svg { width: 16px; height: 16px; }
  .account > a:not(.btn) { padding: 6px 6px; font-size: .875rem; } .top .btn.small { padding: 6px 10px; font-size: .8125rem; min-height: 36px; }
}

/* Hộp thư tự trả lời (trang /hop-thu). Các khung dùng chung với hộp thư chạy riêng (src/hop-thu/giao-dien.js). */
.hop-thu .head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hop-thu .head-row h1 { margin: 0 0 4px; }
.hop-thu .head-row form { display: flex; align-items: center; gap: 10px; }
.hop-thu .luoi { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 16px; align-items: start; }
.hop-thu .cot-trai, .hop-thu .cot-phai, .hop-thu .kien-thuc { padding: 18px; }
.hop-thu h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 12px; }
.hop-thu h2 small { font-size: .8125rem; color: var(--muted); background: var(--bg2); border-radius: 99px; padding: 1px 9px; }
.hop-thu .ds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 620px; overflow: auto; }
.hop-thu .ds a { display: grid; gap: 2px; padding: 11px 13px; border-radius: 12px; text-decoration: none; color: inherit; border: 1px solid transparent; }
.hop-thu .ds a:hover { background: var(--bg); }
.hop-thu .ds a.on { background: var(--cam-nhe); border-color: var(--cam-vien); }
.hop-thu .ten { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hop-thu .kenh { font-size: .8125rem; color: var(--muted); }
.hop-thu .cuoi { font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hop-thu .nhan { font-style: normal; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--cam-nut); color: #fff; }
.hop-thu .trong { color: var(--muted); margin: 4px 2px; }
.hop-thu .thu { background: var(--cam-nhe); border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.hop-thu .thu label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 8px; }
.hop-thu .thu label b { display: block; color: var(--cam-chu); font-size: .9375rem; }
.hop-thu .thu-dong { display: flex; gap: 8px; }
.hop-thu .thu-dong input { flex: 1; min-width: 0; }
.hop-thu .nut { appearance: none; border: 0; background: var(--cam-nut); color: #fff; font: 700 .9375rem/1 var(--sans); padding: 11px 16px; border-radius: 10px; cursor: pointer; }
.hop-thu .nut:hover { background: var(--cam-nut2); }
.hop-thu .nut-xoa { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.hop-thu .nut-xoa:hover { background: var(--bad-bg); }
.hop-thu .cuoc-dau { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.hop-thu .cuoc-dau h3 { margin: 0; }
.hop-thu .cuoc-trong { text-align: center; padding: 24px 8px; color: var(--muted); }
.hop-thu .canh { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: .9375rem; }
.hop-thu .tin { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hop-thu .tin li { max-width: 80%; display: grid; gap: 3px; }
.hop-thu .tin p { margin: 0; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hop-thu .tin span { font-size: .75rem; color: var(--muted); }
.hop-thu .tin .khach p { background: var(--bg2); border-bottom-left-radius: 4px; }
.hop-thu .tin .ai, .hop-thu .tin .chu { justify-self: end; text-align: right; }
.hop-thu .tin .ai p, .hop-thu .tin .chu p { background: var(--cam-nut); color: #fff; border-bottom-right-radius: 4px; text-align: left; }
.hop-thu .tin .he-thong { justify-self: center; max-width: 100%; }
.hop-thu .tin .he-thong p { background: var(--warn-bg); color: var(--warn); font-size: .875rem; }
.hop-thu .xoa { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.hop-thu .xoa label { font-size: .875rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.hop-thu .kien-thuc { margin-top: 16px; }
.hop-thu .kien-thuc textarea { width: 100%; min-height: 260px; line-height: 1.6; }
@media (max-width: 860px) { .hop-thu .luoi { grid-template-columns: 1fr; } .hop-thu .cot-phai { order: -1; } .hop-thu .ds { max-height: none; } }
@media (max-width: 480px) { .hop-thu .thu-dong { flex-direction: column; } .hop-thu .tin li { max-width: 92%; } }

/* Trang pháp lý */
.legal-page h2 { font-size: 1.1rem; margin: 22px 0 6px; } .legal-page ul { padding-left: 20px; } .legal-page li { margin: 4px 0; }

/* Điện thoại: tắt hiệu ứng chạy liên tục trên sơ đồ cho nhẹ máy. */
@media (max-width: 720px) { .edge.live, .edge.back.live { animation: none; } .runner { display: none; } }

/* Danh sách Fanpage và nút cấp gói ở trang người vận hành */
.goi-ds { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.goi-ds li { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.goi-dau { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.goi-nut { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
