/* Agent Video Gbe — giao diện nhân viên (làm lại 21/10/2026 theo Taste Skill, phong cách "achromatic-ledger").
   Nền đá sáng, chữ gần đen; màu CHỈ dành cho dữ liệu / trạng thái (xanh dương = đang chạy, xanh lá = xong, đỏ = lỗi, vàng = chờ).
   Hai bo góc: 8 (khung, ô nhập) và 6 (nút, nhãn). Không đổ bóng, không chuyển sắc, không biểu tượng tô nền. */
:root {
  color-scheme: light;
  /* Bảng màu CAM · ĐEN · TRẮNG (user chọn 21/10/2026). Tên biến --blue* giữ từ bản trước nhưng nay là CAM:
     --primary = cam sáng (nền nút, chấm, thanh tiến độ; chữ trên nền cam là đen cho đủ tương phản)
     --blue = cam đậm (chữ / liên kết trên nền trắng) · --blue-deep = đen (khối chào, chữ mục đang chọn) */
  --bg: #f7f6f5; --surface: #fff; --sunk: #efedeb; --ink: #111; --ink-2: #3f3f3f; --muted: #666360;
  --line: #e7e5e4; --line-2: #d4d1ce;
  --primary: #f97316; --primary-hover: #ea580c; --primary-ink: #111;
  --blue: #c2410c; --blue-soft: #fff1e6; --blue-deep: #111;
  --ok: #047857; --ok-soft: #dcf5ea; --warn: #a16207; --warn-soft: #fef3c7; --bad: #b91c1c; --bad-soft: #fee2e2;
  /* màu theo nhóm việc: video cam · kịch bản đen · đăng bài hổ phách · phân tích nâu xám · khác xám */
  --g: #c2410c; --g-soft: #ffedd5;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 8px; --r-s: 6px; --side: 232px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); font-weight: 600; }
h2 { font-size: 1rem; font-weight: 600; }
h3 { font-size: .9375rem; font-weight: 600; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: var(--r-s); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; }
.i.lg { width: 22px; height: 22px; }

/* ===== khung: thanh bên trái + vùng làm việc ===== */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.shell:has(> #top[hidden]) { grid-template-columns: minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 18px 12px 14px; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; min-width: 0; }
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav { display: grid; gap: 2px; }
.side nav a, .help-link { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-s); color: var(--ink-2); text-decoration: none; font-weight: 500; transition: background-color .12s var(--ease), border-color .12s var(--ease); }
.side nav a:hover, .help-link:hover { background: var(--sunk); }
.side nav a.on, .help-link.on { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 600; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--r-s); background: var(--blue); color: #fff; font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.side nav span.s { display: none; }
.side-foot { margin-top: auto; display: grid; gap: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 8px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.avatar { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: var(--r-s); background: var(--primary); color: #fff; font-size: .8125rem; font-weight: 600; }
.me-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.icon-btn { min-height: 0; width: 32px; height: 32px; padding: 0; background: transparent; color: var(--muted); border: 1px solid transparent; }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 40px 96px; min-width: 0; }
/* bề rộng theo loại trang: danh sách / biểu mẫu / hướng dẫn gọn lại cho dễ đọc, vẫn căn giữa đều hai bên */
.wrap[data-w="m"] { max-width: 1020px; }
.wrap[data-w="s"] { max-width: 860px; }

/* Điện thoại / máy tính bảng: thanh trên mỏng (tên + hướng dẫn + đăng xuất) và thanh dưới 3–5 mục chính */
@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: contents; }
  .brand { position: fixed; z-index: 30; inset: 0 0 auto 0; height: 48px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .side-foot { position: fixed; z-index: 31; top: 0; right: 6px; height: 48px; margin: 0; display: flex; flex-direction: row; align-items: center; gap: 0; }
  .help-link { width: 40px; min-height: 40px; padding: 0; justify-content: center; }
  .help-link > span { display: none; }
  .me { border: 0; margin: 0; padding: 0; }
  .avatar, .me-name { display: none; }
  .icon-btn { width: 40px; height: 40px; }
  .side nav { position: fixed; z-index: 30; inset: auto 0 0 0; display: flex; gap: 0; padding: 4px 16px calc(4px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .side nav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px; font-size: .75rem; text-align: center; position: relative; }
  .side nav a > span:not(.badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* ≥ 4 mục (có "Theo dõi lô" — bản Webinar gỡ mục này; chủ thêm Họp, Quản trị): nhãn ngắn cho vừa (chữ thật vẫn còn cho trình đọc màn hình) */
  #nav:has(#nav-hop:not([hidden])) span.l, #nav:has(#nav-lo) span.l { display: none; }
  #nav:has(#nav-hop:not([hidden])) span.s, #nav:has(#nav-lo) span.s { display: block; }
  .side nav a.on, .help-link.on { background: var(--sunk); border-color: transparent; }
  .badge { position: absolute; top: 2px; left: calc(50% + 4px); right: auto; margin: 0; min-width: 18px; height: 18px; font-size: .6875rem; }
  .wrap { padding: 64px 16px 96px; }
  .toast { bottom: 76px; }
}

@media (min-width: 641px) and (max-width: 900px) { .wrap { padding: 72px 28px 104px; } }

/* ===== nút + ô nhập ===== */
button, .btn { font: 600 .875rem/1 var(--body); border: 1px solid var(--primary); border-radius: var(--r-s); padding: 0 16px; cursor: pointer; background: var(--primary); color: var(--primary-ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; transition: background-color .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease); }
button:hover:not(:disabled), .btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost, .btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
button.ghost:hover:not(:disabled), .btn.ghost:hover { background: var(--sunk); border-color: var(--line-2); }
button.danger { background: var(--surface); color: var(--bad); border-color: #e8c4c0; }
button.danger:hover:not(:disabled) { background: var(--bad-soft); border-color: #e8c4c0; }
button.sm, .btn.sm { min-height: 32px; padding: 0 12px; font-size: .8125rem; }
button.lg, .btn.lg { min-height: 44px; padding: 0 22px; font-size: .9375rem; }
.linkish { background: none; border: 0; color: var(--blue); padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.linkish:hover:not(:disabled) { background: none; color: var(--blue); }
label.f { display: grid; gap: 6px; font-weight: 600; }
label.f > span { color: var(--ink); }
label.f small { font-weight: 400; color: var(--muted); line-height: 1.45; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  font: 400 .9375rem/1.4 var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 0 12px; width: 100%; min-height: 40px;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
textarea { padding: 10px 12px; min-height: 160px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8a8784; }
input:hover, select:hover, textarea:hover { border-color: #b3aea9; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
select { appearance: none; padding-right: 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d6a64' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
@media (max-width: 760px) { input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select { min-height: 44px; } button, .btn { min-height: 44px; } button.sm, .btn.sm { min-height: 36px; } }

/* ===== khung chứa ===== */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 48px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; }
.count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--r-s); background: var(--sunk); color: var(--ink-2); font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.span-all { grid-column: 1 / -1; }
.head, .page-head { display: grid; gap: 4px; margin-bottom: 20px; }
.page-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 24px; }
.page-head .sub { color: var(--muted); }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--sunk); border-radius: var(--r-s); padding: 10px 12px; font-size: .875rem; color: var(--ink-2); }
.note > .i { margin-top: 2px; color: var(--muted); }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.warn > .i { color: var(--warn); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty .i { width: 24px; height: 24px; color: var(--line-2); }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== trạng thái: chấm + chữ, nhãn nhỏ ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.pill.cho::before { background: var(--warn); }
.pill.dang-chay, .pill.kiem-tra { color: var(--blue); }
.pill.dang-chay::before, .pill.kiem-tra::before { background: var(--blue); animation: pulse 1.4s ease-in-out infinite; }
.pill.xong { color: var(--ok); }
.pill.xong::before { background: var(--ok); }
.pill.loi, .pill.het-gio { color: var(--bad); }
.pill.loi::before, .pill.het-gio::before { background: var(--bad); }
.pill.gian-doan { color: var(--warn); }
.pill.gian-doan::before { background: var(--warn); }
@keyframes pulse { 50% { opacity: .35; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; line-height: 1; padding: 5px 8px; border-radius: var(--r-s); background: var(--sunk); color: var(--ink-2); font-weight: 600; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.mono { font-family: var(--mono); font-weight: 500; }
.bar { height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blue); width: 0; border-radius: 3px; transition: width .3s var(--ease); }

/* ===== trang chủ ===== */
.today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 20px; }
.today > a { display: grid; gap: 2px; padding: 14px 18px; color: var(--ink); text-decoration: none; border-left: 1px solid var(--line); transition: background-color .12s var(--ease); }
.today > a:first-child { border-left: 0; border-radius: var(--r) 0 0 var(--r); }
.today > a:last-child { border-radius: 0 var(--r) var(--r) 0; }
.today > a:hover { background: var(--bg); }
.today b { font-size: 1.625rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #8f8e89; }
.today span { color: var(--muted); font-size: .8125rem; }
.today > a.has b { color: var(--ink); }
.today > a.run.has b { color: var(--blue); }
.today > a.ok.has b { color: var(--ok); }
.today > a.err.has b { color: var(--bad); }
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: stretch; margin-bottom: 20px; }
.cols.solo { grid-template-columns: minmax(0, 1fr); }
.col { display: grid; gap: 20px; min-width: 0; }
.cols > .card.flush { display: flex; flex-direction: column; }
.cols > .card.flush > .tl { flex: 1; display: flex; flex-direction: column; }
.cols > .card.flush > .tl > a.tool { flex: 1; }
.col-side { display: grid; min-width: 0; }
.col-side > section { display: flex; flex-direction: column; }
.col-side .empty { flex: 1; align-content: center; padding: 28px 24px; }
.tl.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl.two > a.tool:nth-child(odd) { border-right: 1px solid var(--line); }
@media (max-width: 1040px) { .cols { grid-template-columns: minmax(0, 1fr); } .col-side { order: -1; } }
@media (max-width: 640px) { .col-side .jobs.bare > .job-row:nth-child(n+4) { display: none; } }
@media (max-width: 760px) { .tl.two { grid-template-columns: minmax(0, 1fr); } .tl.two > a.tool:nth-child(odd) { border-right: 0; } }
@media (max-width: 640px) { .today { grid-template-columns: repeat(2, minmax(0, 1fr)); } .today > a:nth-child(3) { border-left: 0; } .today > a:nth-child(n+3) { border-top: 1px solid var(--line); } .today > a:first-child, .today > a:last-child { border-radius: 0; } .page-head { grid-template-columns: minmax(0, 1fr); } }
.search { display: flex; align-items: center; gap: 8px; min-width: min(100%, 320px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 0 10px; color: var(--muted); transition: border-color .12s var(--ease), box-shadow .12s var(--ease); }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.search input { flex: 1; min-width: 0; border: 0; padding: 0; min-height: 38px; background: transparent; box-shadow: none; }
.search input:focus { box-shadow: none; }
.search input::-webkit-search-cancel-button { appearance: none; }
.grp { padding: 10px 16px 6px; color: var(--muted); font-size: .8125rem; font-weight: 600; border-top: 1px solid var(--line); background: var(--bg); }
.tl > a, .tl > .grp { display: grid; }
a.tool { grid-template-columns: 20px minmax(0, 1fr) 16px; gap: 12px; align-items: center; padding: 11px 16px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); transition: background-color .12s var(--ease); }
a.tool:first-child { border-top: 0; }
a.tool:hover { background: var(--bg); }
a.tool .i:first-child { color: var(--ink-2); }
a.tool .go { color: var(--line-2); transition: color .12s var(--ease), transform .12s var(--ease); }
a.tool:hover .go { color: var(--ink); transform: translateX(2px); }
a.tool.main { padding: 14px 16px; }
a.tool .tt { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
a.tool .tt b { font-weight: 600; }
a.tool .tt span { color: var(--muted); font-size: .8125rem; }
.more > summary { cursor: pointer; font-weight: 600; padding: 12px 16px; list-style: none; display: flex; align-items: center; gap: 8px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .12s var(--ease); margin-right: 2px; }
.more[open] > summary::before { transform: rotate(45deg); }
.more[open] > summary { border-bottom: 1px solid var(--line); }
.more .tl { border: 0; }

/* ===== việc: dòng việc, khung theo dõi ===== */
.jobs { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.jobs.bare { border: 0; border-radius: 0; }
.job-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; text-decoration: none; color: inherit; transition: background-color .12s var(--ease); }
.jobs > .job-row { border: 0; border-radius: 0; background: transparent; }
.jobs > .job-row + .job-row { border-top: 1px solid var(--line); }
.job-row:hover { background: var(--bg); }
.job-lead { width: 44px; height: 44px; display: grid; place-items: center; flex: none; border: 1px solid var(--line); border-radius: var(--r-s); color: var(--ink-2); background: var(--surface); overflow: hidden; }
.job-lead img { width: 100%; height: 100%; object-fit: cover; display: block; }
.job-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; min-width: 0; }
.job-title { font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.job-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verdict-line { color: var(--muted); }
.stage-mini { color: var(--blue); font-weight: 500; }
.job-row .bar { margin-top: 4px; }
.job-side { display: grid; justify-items: end; gap: 6px; }
.job-side .row { gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
@media (max-width: 560px) { .job-row { grid-template-columns: 44px minmax(0, 1fr); } .job-side { grid-column: 1 / -1; justify-items: start; } .job-side .row { justify-content: flex-start; } }
.run-note { display: block; margin-bottom: 14px; }
.job-row.bad .verdict-line { color: var(--bad); }
.wide-stack { max-width: none; }
.foot-act { padding: 10px 16px; border-top: 1px solid var(--line); }
.ok-i { color: var(--ok); }
button.ok-btn { color: var(--ok); }
button.ok-btn:hover:not(:disabled) { background: var(--ok-soft); border-color: #cfe8d9; }
.bad-i { color: var(--bad); }
.sub { color: var(--muted); }

.track { gap: 16px; }
.steps4 { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0; }
.steps4 li { display: grid; gap: 8px; font-size: .8125rem; font-weight: 600; color: var(--muted); padding-top: 0; }
.steps4 li::before { content: ""; height: 3px; border-radius: 2px; background: var(--line); }
.steps4 li.done { color: var(--ink-2); }
.steps4 li.done::before { background: var(--ok); }
.steps4 li.now { color: var(--blue); }
.steps4 li.now::before { background: var(--blue); }
.steps4 .dotn { display: flex; align-items: center; gap: 6px; }
.steps4 .dotn .i { width: 14px; height: 14px; color: var(--ok); }
.stage { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.track .bar { height: 8px; border-radius: 4px; }
.track .bar > i { border-radius: 4px; }
.bar.est > i { transition: width 1s linear; }
.bar.indet > i { width: 34%; animation: slide 1.3s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.load { display: grid; gap: 10px; padding: 24px; }
@media (prefers-reduced-motion: reduce) { .bar.indet > i { animation: none; width: 40%; opacity: .6; } }
@media (max-width: 640px) { .steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.verdict { display: flex; gap: 10px; align-items: center; font-weight: 600; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.verdict.xong { color: var(--ok); background: var(--ok-soft); border-color: #cfe8d9; }
.verdict.loi, .verdict.het-gio { color: var(--bad); background: var(--bad-soft); border-color: #f0d2cf; }
.verdict.gian-doan, .verdict.da-huy { color: var(--warn); background: var(--warn-soft); border-color: #f0dfb9; }
.job-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.job-head h1 { margin-bottom: 4px; }
.outs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.out { padding: 12px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 10px; align-content: start; }
.out.wide { grid-column: 1 / -1; }
.out video, .out img { width: 100%; border-radius: var(--r-s); background: #000; display: block; max-height: 420px; object-fit: contain; }
.out audio { width: 100%; }
textarea.edit { min-height: 320px; font: 400 .8125rem/1.55 var(--mono); }
.prompt-box { background: var(--sunk); color: var(--ink); font: 400 .8125rem/1.55 var(--mono); border-radius: var(--r-s); padding: 14px; margin: 0; max-height: 460px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.log { background: #171717; color: #d6d3d1; font: 400 .78rem/1.5 var(--mono); border-radius: var(--r-s); padding: 12px; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
details.logbox > summary { cursor: pointer; font-weight: 600; }

/* ===== form công cụ ===== */
.form-narrow { max-width: none; }
.form-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
.time-hint { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.drop { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 20px 16px; text-align: center; color: var(--muted); cursor: pointer; background: var(--bg); display: grid; gap: 4px; justify-items: center; transition: border-color .12s var(--ease), background-color .12s var(--ease); }
.drop:hover { border-color: var(--primary); background: var(--blue-soft); }
.drop .i { width: 22px; height: 22px; color: var(--muted); }
.drop b { color: var(--ink); }
.drop.over { border-color: var(--blue); background: var(--blue-soft); }
.files { display: grid; gap: 6px; margin-top: 8px; text-align: left; width: 100%; }
.file { display: flex; gap: 10px; align-items: center; font-size: .875rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; color: var(--ink); }
.file .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* tệp bị từ chối ngay ở form (luat-tep.js): lý do dài phải xuống dòng, không đẩy form tràn ngang */
.file .n.ln-tep-loi { white-space: normal; overflow-wrap: anywhere; font-size: .9375rem; min-width: 0; }
.file .bar { width: 90px; flex: none; }
.pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pick-o { display: grid; gap: 8px; padding: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r); font-weight: 600; font-size: .8125rem; min-height: 0; align-content: start; justify-items: stretch; }
.pick-o:hover:not(:disabled) { background: var(--bg); border-color: #b3aea9; }
.pick-o img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-s); background: var(--sunk); }
.pick-o.on, .pick-o.on:hover:not(:disabled) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--blue-soft); }
.pick-o span { text-align: left; font-weight: 500; font-size: .78rem; line-height: 1.35; color: var(--muted); padding: 0 2px 2px; }
.pick-o.on span { color: var(--ink); }
.adv { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 14px; }
.adv > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.adv[open] > summary { margin-bottom: 10px; }
.how { margin-bottom: 16px; padding: 0; display: block; }
.how > summary { cursor: pointer; font-weight: 600; padding: 10px 12px; }
.how p { padding: 0 12px 12px; font-size: .875rem; color: var(--muted); }
.how[open] > summary { padding-bottom: 4px; }

/* ===== thư viện video ===== */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--sunk); border-radius: var(--r); flex-wrap: wrap; }
.seg-o { background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: var(--r-s); padding: 0 12px; min-height: 32px; font-size: .8125rem; font-weight: 600; gap: 8px; }
.seg-o b { font-size: .75rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.seg-o:hover:not(:disabled) { background: transparent; border-color: transparent; color: var(--ink); }
.seg-o.on, .seg-o.on:hover:not(:disabled) { background: var(--surface); border-color: var(--line); color: var(--ink); }
.seg-o.on b { color: var(--ink); }
@media (max-width: 640px) { .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; } .seg::-webkit-scrollbar { display: none; } .seg-o { flex: none; } .search { min-width: 100%; } }
.sel { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); font-weight: 600; }
.sel select { min-height: 34px; padding: 0 30px 0 10px; font-size: .8125rem; width: auto; }
.grid.vids { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.vid { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.vid.removed { opacity: .55; }
.poster { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 0; background: #161616; overflow: hidden; min-height: 0; cursor: pointer; }
.poster:hover:not(:disabled) { background: #161616; }
.poster img { width: 100%; height: 100%; object-fit: contain; display: block; }
.poster.ngang img { object-fit: cover; }
.poster .play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--ink); opacity: 0; transition: opacity .15s var(--ease); }
.poster .play .i { width: 18px; height: 18px; fill: currentColor; stroke: none; margin-left: 2px; }
.poster:hover .play, .poster:focus-visible .play { opacity: 1; }
.badge-br { position: absolute; bottom: 8px; right: 8px; font: 600 .72rem/1 var(--mono); color: #fff; background: rgba(0, 0, 0, .66); padding: 4px 6px; border-radius: 4px; }
.vid-body { display: grid; gap: 8px; padding: 12px 14px 14px; align-content: start; }
.vid h3 { line-height: 1.35; }
.vid-actions { gap: 6px; margin-top: 2px; }
.more-row { grid-column: 1 / -1; display: grid; place-items: center; padding: 6px 0 14px; }

/* ===== hướng dẫn ===== */
.steps { display: grid; gap: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1040px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .step:nth-child(odd) { border-left: 0; } .step:nth-child(n+3) { border-top: 1px solid var(--line); } }
.step { padding: 14px 16px; display: grid; gap: 4px; align-content: start; border-left: 1px solid var(--line); }
.step:first-child { border-left: 0; }
.step b { font-weight: 600; }
.rule { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.rule:first-child { border-top: 0; padding-top: 0; }
.rule b { font-weight: 600; }
@media (max-width: 640px) { .step { border-left: 0; border-top: 1px solid var(--line); } .step:first-child { border-top: 0; } }

.pad { padding: 12px 16px; }
.mb { margin-bottom: 12px; }
.steps + .pad { border-top: 1px solid var(--line); }
.more-rules { border-top: 1px solid var(--line); margin-top: 4px; }
.more-rules > summary { cursor: pointer; font-weight: 600; color: var(--blue); padding: 12px 0; }
.help .more > div.pad .rule:first-child { padding-top: 0; }

/* ===== bảng quản trị ===== */
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8125rem; }
tbody tr:last-child td { border-bottom: 0; }
.scroll { overflow-x: auto; }
.stat { display: grid; gap: 2px; }
.stat b { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ===== đăng nhập ===== */
.login { max-width: 400px; margin: 12vh auto 0; padding: 28px; }
.login .brand { padding: 0; font-size: 1.125rem; margin-bottom: 4px; }
.login .brand .mark { width: 32px; height: 32px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--r); font-weight: 500; z-index: 50; max-width: calc(100% - 32px); animation: rise .2s var(--ease); }
.toast.bad { background: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 6px); } }
@media (max-width: 900px) { .toast { bottom: 76px; } }
dialog { border: 0; padding: 0; background: transparent; max-width: min(960px, 96vw); }
dialog::backdrop { background: rgba(10, 10, 10, .72); }
.dlg { background: var(--surface); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; justify-items: stretch; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dlg-head h2 { font-size: .9375rem; }
.dlg video { width: 100%; max-height: 80vh; border-radius: var(--r-s); background: #000; }

/* ===== giao việc sau họp (web/public/duyet.js) — trạng thái chờ duyệt dùng màu vàng ===== */
:root { --cam: var(--warn); --cam-soft: var(--warn-soft); }
.hop-row.cho .pill { color: var(--warn); }
.viec-card { display: grid; gap: 12px; padding: 16px; }
.viec-card.off { opacity: .6; }
.viec-card .check { font-weight: 600; }
.hai-cot { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: start; }
.hai-cot label.f { align-content: start; }
@media (max-width: 560px) { .hai-cot { grid-template-columns: 1fr; } }
textarea.ngan { min-height: 64px; }
.bang-chung summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: .875rem; }
.trich { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; background: var(--sunk); border-radius: var(--r-s); padding: 8px 10px; }
.trich .btn, .trich button { flex: none; }
.nen-tang { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.nen-tang .check { font-weight: 500; }
.nen-tang .check input { width: 16px; height: 16px; }
.nen-tang .tat { color: var(--muted); }
.thanh-duyet { position: sticky; bottom: 0; z-index: 10; margin: 20px -40px -96px; padding: 12px 40px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.thanh-duyet .in { max-width: 1100px; margin: 0 auto; display: grid; gap: 8px; }
.thanh-duyet .nut-hang { gap: 8px; }
@media (max-width: 900px) { .thanh-duyet { margin: 20px -16px -104px; padding: 10px 16px calc(64px + env(safe-area-inset-bottom)); } .thanh-duyet .nut-hang > button { flex: 1 1 0; } .thanh-duyet .nut-hang > button.nut-duyet { flex: 1 1 100%; } }

/* ===== màu (21/10 lần 2): xanh dương làm màu thương hiệu, mỗi nhóm việc một màu, dải chào đầu trang chủ tô xanh đậm ===== */
.g-video { --g: #c2410c; --g-soft: #ffedd5; }
.g-noi-dung { --g: #111; --g-soft: #e9e7e5; }
.g-dang-bai { --g: #a16207; --g-soft: #fef3c7; }
.g-phan-tich { --g: #78350f; --g-soft: #f3e8dc; }
.g-khac { --g: #57534e; --g-soft: #efedeb; }
.side { background: var(--surface); }
.side nav a:hover, .help-link:hover { background: var(--blue-soft); color: var(--blue-deep); }
.side nav a.on, .help-link.on { background: var(--blue-soft); border-color: transparent; color: var(--blue-deep); font-weight: 600; }
.side nav a.on .i, .help-link.on .i { color: var(--primary); }
.chip-i, a.tool > .chip-i, .job-lead.g { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r); background: var(--g-soft); color: var(--g); border: 0; }
a.tool .chip-i .i { color: var(--g); }
a.tool.main .chip-i { width: 42px; height: 42px; }
a.tool { grid-template-columns: 42px minmax(0, 1fr) 16px; }
a.tool:not(.main) { grid-template-columns: 36px minmax(0, 1fr) 16px; }
a.tool:hover { background: var(--g-soft); }
a.tool:hover .go { color: var(--g); }
.job-lead.g { width: 44px; height: 44px; }
.job-lead.g .i { color: var(--g); }
.grp { display: flex; align-items: center; gap: 8px; color: var(--ink-2); background: var(--sunk); }
.grp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--g); }
.hero { background: var(--blue-deep); color: #fff; border-radius: var(--r); padding: 22px 24px 20px; margin-bottom: 20px; display: grid; gap: 18px; }
.hero .page-head { margin: 0; }
.hero h1 { color: #fff; font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); }
.hero .sub { color: #d6d3d1; }
.hero .search { background: #fff; border-color: transparent; }
.hero .today { background: transparent; border: 0; margin: 0; gap: 12px; }
.hero .today > a { background: #262626; border: 0; border-radius: var(--r); color: #fff; padding: 14px 16px; }
.hero .today > a:first-child, .hero .today > a:last-child { border-radius: var(--r); }
.hero .today > a:hover { background: #333; }
.hero .today span { color: #d6d3d1; }
.hero .today b { color: #8a8784; }
.hero .today > a.has b { color: #fff; }
.hero .today > a.run.has b { color: #fff; }
.hero .today > a.run.has b { color: #fb923c; }
.hero .today > a.ok.has b { color: #86efac; }
.hero .today > a.err.has b { color: #fca5a5; }
.hero .today > a.vid.has b { color: #fff; }
@media (max-width: 640px) { .hero { padding: 18px 16px; } .hero .today { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero .today > a:nth-child(n+3) { border-top: 0; } .hero .today > a:nth-child(3) { border-left: 0; } }
.seg-o.on, .seg-o.on:hover:not(:disabled) { background: var(--surface); color: var(--ink); border-color: var(--line); } /* 28/10: bỏ gạch cam inset (luật button-fx, inspect danh sách dự án) — nền + viền đủ báo đang chọn */
.seg-o.on b { color: var(--blue); }
.badge { background: var(--primary); color: #111; }
.avatar { background: var(--primary); color: #111; }
.count { background: var(--blue-soft); color: var(--blue-deep); }
.panel-head h2 { color: var(--ink); }
.steps4 li.done::before { background: var(--ok); }
.bar > i { background: var(--primary); }
.login { border-top: 3px solid var(--primary); }

/* ===== lần 4 (21/10): bỏ khối đen ở đầu trang; việc chính là thẻ to nổi bật, mỗi khối tách riêng, nền sáng ===== */
:root { --bg: #f5f5f4; --r: 12px; --r-s: 8px; --edge: #e7e5e4; --shadow: 0 1px 2px rgba(17, 17, 17, .06); }
body { font-size: 15px; }
h1 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
.card, .panel, .jobs { border-color: var(--edge); box-shadow: var(--shadow); }
.side { border-right-color: var(--edge); }
.side nav a { min-height: 40px; }
.side nav a:hover:not(.on), .help-link:hover:not(.on) { background: #f3f0ec; }
.side nav a.on, .help-link.on { background: var(--primary); color: #111; font-weight: 600; }
.side nav a.on .i, .help-link.on .i { color: #111; }
.side nav a.on .badge { background: #111; color: #fff; }
.g-video { --g: #f97316; --g-ink: #111; --g-soft: #ffedd5; --gt: #c2410c; }
.g-noi-dung { --g: #292524; --g-ink: #fff; --g-soft: #e7e5e4; --gt: #292524; }
.g-dang-bai { --g: #fbbf24; --g-ink: #111; --g-soft: #fef3c7; --gt: #a16207; }
.g-phan-tich { --g: #fdba74; --g-ink: #7c2d12; --g-soft: #ffedd5; --gt: #9a3412; }
.g-khac { --g: #e7e5e4; --g-ink: #44403c; --g-soft: #efedeb; --gt: #78716c; }
.job-lead.g { background: var(--g); }
.job-lead.g .i { color: var(--g-ink); }
@media (max-width: 900px) {
  .side nav a.on, .help-link.on { background: var(--blue-soft); color: var(--ink); }
  .side nav a.on .i { color: var(--blue); }
  .side nav a.on .badge { background: var(--primary); color: #111; }
}

/* lời chào + ô tìm: nằm thẳng trên nền trang, không đóng khung */
.hello { margin: 2px 0 22px; align-items: center; }
.hello h1 { font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem); }
.hello .sub { font-size: 1rem; margin-top: 2px; }
.hello .search { min-height: 48px; min-width: min(100%, 360px); border-color: #e2ded9; box-shadow: var(--shadow); border-radius: var(--r); }
.hello .search input { min-height: 46px; }

/* 4 con số: thẻ trắng, biểu tượng + số lớn */
.today { background: transparent; border: 0; border-radius: 0; gap: 14px; margin-bottom: 30px; }
.today > a:nth-child(n) { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow); transition: border-color .12s var(--ease), transform .12s var(--ease); }
.today > a:hover { background: #fff; border-color: var(--primary); transform: translateY(-1px); }
.today .si { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--sunk); color: var(--muted); }
.today .sb { display: grid; gap: 0; min-width: 0; }
.today .sb b { font-size: 1.75rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: #a8a29e; }
.today .sb span { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.today > a.has .sb b { color: var(--ink); }
.today > a.run.has .si { background: var(--primary); color: #111; }
.today > a.ok.has .si { background: var(--ok-soft); color: var(--ok); }
.today > a.err.has .si { background: var(--bad-soft); color: var(--bad); }
.today > a.err.has .sb b { color: var(--bad); }
.today > a.vid.has .si { background: #ffedd5; color: #c2410c; }
@media (max-width: 640px) { .today { gap: 10px; } .today > a:nth-child(n) { padding: 12px; gap: 10px; } .today .si { width: 38px; height: 38px; } .today .sb b { font-size: 1.5rem; } }

/* mỗi khối có tiêu đề riêng, thanh cam bên trái */
.sec { margin-bottom: 30px; }
.cols { gap: 28px; align-items: start; margin-bottom: 30px; }
.cols > .sec { margin-bottom: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 1.125rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.sec-head h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--primary); }
.sec-head .muted { font-weight: 500; }

/* thẻ công cụ */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tile { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 12px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--edge); border-radius: var(--r); color: var(--ink); text-decoration: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.tile:hover { border-color: var(--primary); box-shadow: 0 2px 6px rgba(17, 17, 17, .07); transform: translateY(-2px); }
.tile .chip-i { width: 40px; height: 40px; border-radius: 10px; background: var(--g); color: var(--g-ink); }
.tile .chip-i .i { color: var(--g-ink); }
.tile .tt { display: grid; min-width: 0; }
.tile .tt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tt span { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .go { color: #c9c4be; transition: color .15s var(--ease), transform .15s var(--ease); }
.tile:hover .go { color: var(--primary); transform: translateX(2px); }
.tiles.big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile.big { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; gap: 14px; padding: 18px 18px 20px; border-top: 4px solid var(--g); }
.tile.big .chip-i { width: 54px; height: 54px; border-radius: 14px; }
.tile.big .chip-i .i { width: 26px; height: 26px; }
.tile.big .tt { gap: 4px; }
.tile.big .tt b { font-size: 1.0625rem; font-weight: 700; white-space: normal; line-height: 1.3; }
.tile.big .tt span { white-space: normal; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile.big .go { position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; padding: 8px; border-radius: 50%; background: var(--bg); color: #8a8784; }
.tile.big:hover .go { background: var(--primary); color: #111; transform: translateX(0); }
@media (max-width: 700px) {
  .tiles.big { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tile.big { grid-template-columns: 48px minmax(0, 1fr); align-items: center; padding: 14px; border-top: 1px solid var(--edge); border-left: 4px solid var(--g); }
  .tile.big .chip-i { width: 48px; height: 48px; }
  .tile.big .go { display: none; }
}

/* nhóm của "Việc khác": nhãn nhỏ, thẻ gọn hơn hẳn thẻ việc chính */
.grp { display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; padding: 0 2px; background: none; border: 0; color: var(--ink-2); font-size: .875rem; font-weight: 700; }
.sec-head + .grp { margin-top: 0; }
.grp::before { width: 10px; height: 10px; border-radius: 3px; background: var(--gt); }
.more-box { background: #fff; border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 30px; }
.more-box > summary { cursor: pointer; font-weight: 600; padding: 14px 16px; list-style: none; display: flex; align-items: center; gap: 8px; }
.more-box > summary::-webkit-details-marker { display: none; }
.more-box > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .12s var(--ease); margin-right: 2px; }
.more-box[open] > summary::before { transform: rotate(45deg); }
.more-box[open] > summary { border-bottom: 1px solid var(--line); }
.more-box .tiles { padding: 14px; }
.more-box .tile { background: var(--bg); }

/* "Việc của tôi": khối riêng, viền cam trên đầu để không lẫn với thẻ công cụ */
.card.todo { border-top: 4px solid var(--primary); }
.todo .panel-head { padding: 14px 16px; }
.todo .panel-head h2 { font-size: 1.125rem; font-weight: 700; }
.cols { align-items: stretch; }
.cols > .sec { display: flex; flex-direction: column; }
.cols > .sec > .tiles.big { flex: 1; grid-auto-rows: 1fr; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tiles.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .tiles.big { grid-template-columns: minmax(0, 1fr); } }

/* ===== Theo dõi lô (24/10/2026): thẻ lô + thanh xếp chồng đạt / lỗi / đang làm, nền xám = chưa làm ===== */
.lo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }
.lo-card { display: grid; gap: 12px; align-content: start; text-decoration: none; color: inherit; transition: border-color .12s var(--ease), background-color .12s var(--ease); }
.lo-card:hover { border-color: var(--line-2); background: #fffcf9; }
.lo-card.chay { border-color: #fdba74; }
.lo-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.lo-top h2 { min-width: 0; overflow-wrap: anywhere; }
.lo-top .pill { margin-top: 2px; }
.lo-bar { display: flex; height: 8px; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.lo-bar.lg { height: 12px; border-radius: 6px; }
.lo-bar > i { display: block; height: 100%; transition: width .3s var(--ease); }
.lo-bar .s-dat { background: var(--ok); }
.lo-bar .s-loi { background: var(--bad); }
.lo-bar .s-chay { background: var(--primary); }
.lo-dem { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-2); }
.lo-dem > span { display: inline-flex; align-items: center; gap: 4px; }
.lo-dem > span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--line-2); flex: none; }
.lo-dem > .d-dat::before { background: var(--ok); }
.lo-dem > .d-loi { color: var(--bad); }
.lo-dem > .d-loi::before { background: var(--bad); }
.lo-dem > .d-chay::before { background: var(--primary); }
.lo-dem > .d-tong { margin-left: auto; }
.lo-dem > .d-tong::before { display: none; }
.lo-foot { display: flex; align-items: center; gap: 4px; }
.pill.chua { color: var(--muted); }
.lo-tong { display: grid; gap: 16px; }
.lo-tong h2 { font-size: 1.125rem; }
.lo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lo-stat { display: grid; gap: 4px; padding: 12px; border-radius: var(--r-s); background: var(--bg); }
.lo-stat b { font-size: 1.5rem; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.lo-stat span { color: var(--muted); font-weight: 500; }
.lo-stat.dat b { color: var(--ok); }
.lo-stat.loi b { color: var(--bad); }
.lo-stat.chay b { color: var(--blue); }
.lo-stat.zero b { color: var(--muted); }
.lo-head .seg-o.on, .lo-head .seg-o.on:hover:not(:disabled) { box-shadow: none; } /* taste-skill-ignore: GỠ gạch cam dưới nút lọc (luật button-fx) */
.lo-notes { gap: 8px; }
.lo-head { flex-wrap: wrap; }
.lo-videos { display: grid; }
.lo-v { display: grid; grid-template-columns: 8px minmax(0, 1fr) 88px 72px; gap: 12px; align-items: center; padding: 12px 16px; }
.lo-v + .lo-v { border-top: 1px solid var(--line); }
.lo-v-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.v-dat .lo-v-dot { background: var(--ok); }
.v-loi .lo-v-dot { background: var(--bad); }
.v-dang-chay .lo-v-dot { background: var(--primary); animation: pulse 1.4s ease-in-out infinite; }
.lo-v-main { display: grid; gap: 2px; min-width: 0; }
.lo-v-ma { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lo-v-loi { color: var(--bad); overflow-wrap: anywhere; }
.lo-v > .pill { justify-self: start; }
.lo-v > button { justify-self: end; }
.lo-videos > .empty { padding: 24px 16px; }
.lo-thu-muc { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .lo-grid { grid-template-columns: minmax(0, 1fr); }
  .lo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lo-v { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 4px 12px; }
  .lo-v > .pill { grid-column: 2; grid-row: 2; }
  .lo-v > button, .lo-v > .lo-v-trong { grid-column: 3; grid-row: 1 / span 2; }
  .page-head > button { width: 100%; }
  .lo-head .seg { flex-wrap: wrap; overflow: visible; }
}
/* ===== Lượt 4 (26/10/2026): 13 lệnh · dự án · chờ duyệt (web/public/lenh.js) — tiền tố ln- =====
   Màu chỉ cho trạng thái: cam = cần người làm / chờ duyệt, xanh lá = xong, đỏ = lỗi; còn lại đen / xám. Không bóng, không chuyển sắc. */
.ln-hoi { display: grid; gap: 4px; margin: 0 0 20px; }
.ln-hoi .sub { color: var(--muted); font-size: 1rem; }
.ln-tai { display: grid; gap: 8px; padding: 16px 0; max-width: 360px; }
.ln-loi-o { margin-bottom: 16px; }

/* "Bạn có gì?": 9 nút chọn (Tất cả + 8 nguyên liệu) = lưới 3 × 3 */
.ln-nl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 32px; }
.ln-nl-o { justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); font-weight: 500; font-size: .9375rem; line-height: 1.3; text-align: left; }
.ln-nl-o:hover:not(:disabled) { background: var(--surface); border-color: var(--ink); }
.ln-nl-o b { flex: none; font-size: .8125rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.ln-nl-o.on, .ln-nl-o.on:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: #fff; }
.ln-nl-o.on b { color: #d6d3d1; }

/* thẻ lệnh: số cột theo số thẻ (1 / 2 / 3), thẻ lẻ cuối trải hết hàng */
.ln-luoi { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ln-luoi.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ln-luoi.c1 { grid-template-columns: minmax(0, 640px); }
.ln-the { display: grid; align-content: start; gap: 8px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); color: var(--ink); text-decoration: none; transition: border-color .12s var(--ease); }
.ln-the:hover { border-color: var(--ink); }
.ln-the.rong { grid-column: 1 / -1; }
.ln-the-dau { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ln-the-dau b { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.ln-the p { color: var(--ink-2); font-size: .875rem; line-height: 1.5; }
.ln-the .ln-ra { color: var(--muted); font-size: .8125rem; }
.ln-ra span { color: var(--ink); font-weight: 600; }
.ln-tag { flex: none; white-space: nowrap; display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-s); font-size: .75rem; font-weight: 600; line-height: 1; background: var(--sunk); color: var(--ink-2); }
.ln-tag.web, .ln-tag.cho { background: #fff1e6; color: #9a3412; }
.ln-tag.ok { background: var(--ok-soft); color: var(--ok); }
.ln-chan { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.ln-chan a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: none; }
.ln-chan a:hover { color: var(--blue); }
.ln-chan a .i:first-child { color: var(--muted); }
.ln-nhac { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 16px; margin-bottom: 20px; border: 1px solid var(--primary); border-radius: var(--r); background: #fff7ed; color: var(--ink); text-decoration: none; }
.ln-nhac-di { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #9a3412; }

/* trang 1 lệnh: thông tin trái · biểu mẫu phải */
.ln-trang { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; margin-bottom: 32px; }
.ln-info, .ln-claude { display: grid; gap: 12px; padding: 20px; }
.ln-dl { display: grid; margin: 0; }
.ln-dl > div { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.ln-dl > div:first-child { border-top: 0; padding-top: 0; }
.ln-dl dt { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.ln-dl dd { margin: 0; line-height: 1.55; }
.ln-lk { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ln-lk a { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 8px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .875rem; }
.ln-lk a:hover { border-color: var(--ink); }
.ln-form { display: grid; gap: 16px; padding: 20px; }
.ln-f { display: grid; gap: 8px; font-weight: 600; }
.ln-seg { justify-self: start; }
.ln-seg .seg-o { min-height: 36px; }
.ln-cmd { display: flex; min-width: 0; }
.ln-cmd code { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 44px; padding: 0 12px; background: var(--sunk); border: 1px solid var(--line-2); border-right: 0; border-radius: var(--r-s) 0 0 var(--r-s); overflow-x: auto; white-space: nowrap; font-size: .875rem; }
.ln-cmd button { min-height: 44px; border-radius: 0 var(--r-s) var(--r-s) 0; }
.ln-cc { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ln-cc a { display: grid; grid-template-columns: minmax(0, 1fr) 16px; gap: 12px; align-items: center; min-height: 56px; padding: 8px 16px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.ln-cc a:hover { border-color: var(--ink); }
.ln-cc a > .i { color: var(--muted); }
.ln-cc-tt { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ln-cc-tt b { font-weight: 600; }
.ln-cc-tt span { color: var(--muted); font-size: .8125rem; }

/* câu máy trả: cần người = khung cam đậm, lỗi = đỏ nhạt, lưu ý = xám, xong = xanh nhạt */
.ln-cau { display: grid; gap: 8px; }
.ln-cau:empty { display: none; }
.ln-c { display: grid; gap: 4px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--sunk); color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.ln-c > b { font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.ln-c.can { border: 2px solid var(--primary); background: #fff7ed; }
.ln-c.can > b { color: #9a3412; }
.ln-c.loi { border-color: #f0d2cf; background: var(--bad-soft); }
.ln-c.loi > b { color: var(--bad); }
.ln-c.ok { border-color: #cfe8d9; background: var(--ok-soft); }
.ln-c.ok > b { color: var(--ok); }
.ln-mo { justify-self: start; }
/* hộp hỏi có nút (28/10): a nút chọn · b ô thả nổi lên + Thử lại · c Chép lệnh cho Claude — chữ ≥ 15 px */
.ln-c.can { gap: 8px; font-size: .9375rem; line-height: 1.5; }
.ln-c.can > b { font-size: .9375rem; }
.ln-c-can { color: var(--ink-2); }
.ln-c-nut { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.ln-c-nut button { min-height: 40px; font-size: .9375rem; }
.ln-c-nut button.on { outline: 2px solid var(--primary); outline-offset: 2px; }
.ln-c-goi { margin: 0; font-size: .9375rem; color: var(--ink-2); }
.drop.noi, textarea.noi, input.noi { border: 2px solid var(--primary); background: #fff7ed; }

/* danh sách dự án */
.ln-ds { display: grid; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.ln-da { display: grid; grid-template-columns: minmax(0, 1fr) 160px 180px; gap: 16px; align-items: center; min-height: 64px; padding: 12px 16px; color: inherit; text-decoration: none; transition: background-color .12s var(--ease); }
.ln-da + .ln-da { border-top: 1px solid var(--line); }
.ln-da:hover { background: var(--bg); }
.ln-da-main { display: grid; gap: 4px; min-width: 0; }
.ln-da-ten { font-weight: 600; }
.ln-da-phu { color: var(--muted); font-size: .8125rem; }
.ln-tien { display: grid; gap: 4px; }
.ln-tien span { font-size: .8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.ln-da > .ln-tag { justify-self: end; }

/* 1 dự án */
.ln-dau-phai { flex-wrap: nowrap; gap: 8px; }
.ln-gia { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 16px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); }
.ln-gia > div { display: grid; gap: 4px; padding: 12px 16px; border-left: 1px solid var(--line); min-width: 0; }
.ln-gia > div:first-child { border-left: 0; }
.ln-gia dt { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.ln-gia dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ln-gia dd.muted { font-weight: 400; }
.ln-can.co-viec { border-color: var(--primary); }
.ln-can-than { display: grid; }
.ln-can-than > .ln-dvs + .ln-cau { border-top: 1px solid var(--line); }
.ln-can-than > .ln-may + * { border-top: 1px solid var(--line); }
.ln-may { display: grid; gap: 12px; }
.ln-may-chay { display: grid; grid-template-columns: 12px minmax(0, 1fr); align-items: center; gap: 4px 8px; font-weight: 600; }
.ln-may-chay small { grid-column: 2; font-weight: 400; }
.ln-may-chay .spin { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
.ln-may-nut { gap: 8px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .ln-may-chay .spin { animation: none; } }
.ln-goi-hang { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.ln-goi { display: grid; gap: 8px; align-content: start; }
.ln-goi-ten { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.ln-o-hang { display: flex; flex-wrap: wrap; gap: 4px; }
.ln-o { display: inline-grid; place-items: center; min-width: 36px; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ln-o.chua { border-style: dashed; }
.ln-o.xong { background: var(--ok-soft); border-color: #b7dfc8; color: var(--ok); }
.ln-o.loi { background: var(--bad-soft); border-color: #f0c4c0; color: var(--bad); }
.ln-o.cho_nguoi { background: #fff1e6; border-color: var(--primary); color: #9a3412; }
.ln-chu-giai { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: var(--muted); font-size: .8125rem; }
.ln-chu-giai span { display: inline-flex; align-items: center; gap: 8px; }
.ln-chu-giai .ln-o { min-width: 16px; width: 16px; height: 12px; padding: 0; border-radius: 4px; }
.ln-nk { display: grid; }
.ln-nk > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; padding: 8px 16px; border-top: 1px solid var(--line); }
.ln-nk > div:first-child { border-top: 0; }
.ln-nk time { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.ln-nk > div.loi > span { color: var(--bad); }
.ln-tuoi { margin-top: 16px; }

/* chờ duyệt: mỗi dòng = dự án + điểm + file xem + 2 nút ở cột cuối cố định */
.ln-dvs { display: grid; }
.ln-dv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: center; padding: 16px; }
.ln-dv + .ln-dv { border-top: 1px solid var(--line); }
.ln-dv-main { display: grid; gap: 4px; min-width: 0; }
.ln-dv-dau { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.ln-dv-ten { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.ln-dv-ten:hover { text-decoration: underline; }
.ln-dv-phu { color: var(--muted); font-size: .8125rem; }
.ln-dv-phu:empty, .ln-bao:empty { display: none; }
.ln-tep { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ln-xem { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 600; font-size: .875rem; color: var(--blue); text-decoration: none; }
.ln-xem.linkish { text-decoration: none; }
.ln-xem:hover { text-decoration: underline; }
.ln-bao { margin-top: 4px; }
.ln-nut { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.ln-hoi-lai { flex-basis: 100%; text-align: right; font-weight: 600; font-size: .875rem; }

@media (max-width: 1040px) { .ln-trang { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ln-nl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ln-nl > .ln-nl-o:first-child { grid-column: 1 / -1; }
  .ln-nl-o { padding: 8px 12px; font-size: .875rem; }
  .ln-luoi, .ln-luoi.c2, .ln-luoi.c1 { grid-template-columns: minmax(0, 1fr); }
  .ln-the { padding: 16px; }
  .ln-da { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .ln-da > .ln-tien { grid-column: 1 / -1; grid-row: 2; }
  .ln-tien span { text-align: left; }
  .ln-da > .ln-tag { grid-column: 2; grid-row: 1; align-self: start; }
  .ln-gia { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ln-gia > div:nth-child(3) { border-left: 0; }
  .ln-gia > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ln-nk > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ln-dv { grid-template-columns: minmax(0, 1fr); }
  .ln-nut { justify-content: stretch; }
  .ln-nut > button { flex: 1 1 0; }
  .ln-hoi-lai { text-align: left; }
  .ln-dau-phai { flex-wrap: wrap; }
}
/* thanh dưới điện thoại: thêm "Dự án" + "Chờ duyệt" → chủ có 8 mục, cho kéo ngang thay vì bóp chữ */
@media (max-width: 900px) {
  #nav { overflow-x: auto; scrollbar-width: none; }
  #nav::-webkit-scrollbar { display: none; }
  #nav > a { min-width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== Trang "Chuẩn bị nguyên liệu" (web/public/nguyen-lieu.js, 27/10) — theo mockup _out/2026-10-27_quy-tu-ngoc-lieu/mockup/. Tiền tố nl-. ===== */
.side nav .nl-moi { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--blue); }
@media (max-width: 900px) { .side nav .nl-moi { display: none; } }
.nl { --nl-gap: 16px; --warn-line: #f2d77a; --lamp-red: #dc2626; --lamp-yellow: #facc15; --lamp-green: #16a34a; font-size: 15px; line-height: 1.6; }
.nl h1 { font-size: 24px; font-weight: 700; }
.nl h2 { font-size: 17px; font-weight: 600; }
.nl .small { font-size: 13px; line-height: 1.5; }
.nl button, .nl .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.nl button.sm, .nl .btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.nl button.lg, .nl .btn.lg { min-height: 48px; padding: 0 24px; font-size: 16px; }
.nl input[type=text], .nl textarea { font-size: 15px; min-height: 44px; }
.nl textarea { min-height: 72px; }
.nl-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; font-size: 14px; color: var(--muted); }
.nl-st { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.nl-st b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--sunk); color: var(--ink-2); }
.nl-st.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.nl-st.on b { background: var(--ink); color: #fff; }
.nl-st.done b { background: var(--ok-soft); color: var(--ok); }
.nl-may { font-size: 13px; color: var(--muted); }
.nl-head { margin-bottom: 24px; }
.nl-sub { margin-top: 8px; font-size: 15px; color: var(--ink-2); max-width: 66ch; }
.nl-warn { color: var(--warn); }
.nl-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: none; }
.nl-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nl-count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.nl-hint { font-size: 14px; color: var(--muted); margin-top: 4px; }
.nl-stack { display: grid; gap: var(--nl-gap); align-content: start; }
.nl-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--nl-gap); align-items: start; }
.nl-foot { margin-top: 48px; padding-top: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.nl-ai { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 12px; border-radius: var(--r-s); background: var(--warn-soft); color: #78350f; font-size: 14px; }
.nl-ai .i { color: var(--warn); margin-top: 2px; }
.nl-ai-top { margin: 0 0 16px; }
/* màn 1 */
.nl-folders { display: grid; gap: 8px; margin-top: 16px; }
.nl-folder { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 16px; min-height: 56px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.nl-folder:hover { background: var(--bg); }
.nl-folder input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.nl-folder .name { font-weight: 600; }
.nl-folder .meta { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.nl-folder:has(input:checked) { border-color: var(--ink); outline: 1px solid var(--ink); outline-offset: -2px; }
.nl-them { justify-self: start; }
.nl-path { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: var(--r-s); background: var(--sunk); font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.nl-path-t { font-weight: 600; flex: 1; min-width: 0; }
.nl-path button { flex: none; white-space: nowrap; }
.nl-drop { margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--bg); }
.nl-drop.on { border-color: var(--primary); background: var(--blue-soft); }
.nl-drop .txt { flex: 1; min-width: 0; }
.nl-drop > .i { width: 22px; height: 22px; color: var(--muted); }
.nl-note-src { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 8px 12px; border-radius: var(--r-s); background: var(--warn-soft); color: #78350f; font-size: 14px; }
.nl-note-src .i { color: var(--warn); margin-top: 2px; }
.nl-go-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.nl-run-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.nl-legs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
.nl-leg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.nl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--muted); font-size: 13px; font-weight: 700; }
.nl-leg.done .nl-dot { background: var(--ok-soft); color: var(--ok); }
.nl-leg.now .nl-dot { background: var(--ink); color: #fff; }
.nl-leg.loi .nl-dot { background: var(--bad-soft); color: var(--bad); }
.nl-leg .t { font-weight: 600; }
.nl-leg .d { font-size: 14px; color: var(--muted); }
.nl-bar { height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden; margin-top: 8px; }
.nl-bar > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .6s var(--ease); }
.nl-stop { margin-top: 16px; padding: 12px 16px; border-radius: var(--r-s); background: var(--blue-soft); font-size: 14px; color: #7c2d12; }
.nl-stop b { color: var(--ink); }
/* màn 2 */
.nl-unsure { border-color: var(--warn-line); }
.nl-unsure .nl-ph h2 { display: flex; align-items: center; gap: 8px; }
.nl-unsure .nl-ph h2 .i { color: var(--warn); }
.nl-ask-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--nl-gap); margin-top: 16px; }
.nl-ask { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.nl-ask > img, .nl-ask > .nl-th-ten { width: 88px; height: 116px; object-fit: cover; border-radius: var(--r-s); background: var(--sunk); }
.nl-ask .why { font-size: 14px; color: var(--ink-2); }
.nl-ask .guess { font-size: 13px; color: var(--muted); margin-top: 4px; }
.nl-ask .nl-ten { overflow-wrap: anywhere; margin-top: 2px; }
.nl-ask select { margin-top: 8px; width: 100%; min-height: 40px; font-size: 14px; }
.nl-th-ten { display: grid; place-items: center; font: 600 12px var(--body); color: var(--muted); }
.nl-bins { display: grid; gap: 4px; margin-top: 12px; }
.nl-bin { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; }
.nl-bin + .nl-bin { border-top: 1px solid #f0eeec; }
.nl-bin .bn { font-weight: 600; }
.nl-bin .bc { font-size: 13px; color: var(--muted); }
.nl-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.nl .nl-th { position: relative; flex: none; width: 72px; height: 96px; border-radius: var(--r-s); overflow: hidden; background: var(--sunk); border: 0; padding: 0; min-height: 0; cursor: pointer; }
.nl .nl-th:hover { background: var(--sunk); outline: 2px solid var(--ink); outline-offset: 1px; }
.nl-th img, .nl-th .nl-th-ten { width: 100%; height: 100%; object-fit: cover; display: block; }
.nl-th.logo img { object-fit: contain; padding: 4px; }
.nl-th .dur { position: absolute; right: 4px; bottom: 4px; padding: 0 4px; border-radius: 4px; background: rgba(17, 17, 17, .78); color: #fff; font-size: 11px; font-weight: 600; line-height: 16px; font-variant-numeric: tabular-nums; }
.nl .nl-th.more { display: grid; place-items: center; color: var(--ink-2); font: 600 14px var(--body); }
.nl-bin-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.nl-empty-bins { margin-top: 12px; padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); font-size: 14px; color: var(--ink-2); }
.nl-empty-bins b { font-weight: 600; }
.nl-menu { position: absolute; z-index: 40; min-width: 220px; max-height: 70vh; overflow-y: auto; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(17, 17, 17, .12); } /* taste-skill-ignore: menu nổi */
.nl-menu .mh { font-size: 13px; color: var(--muted); padding: 4px 8px 8px; }
.nl .nl-menu button { width: 100%; justify-content: flex-start; background: transparent; border: 0; color: var(--ink); font-weight: 500; font-size: 14px; min-height: 36px; padding: 0 8px; }
.nl .nl-menu button:hover { background: var(--sunk); }
.nl .nl-menu button.cur { font-weight: 700; }
.nl-read { display: grid; gap: 16px; margin-top: 16px; }
.nl-read .row label { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.nl-read .row label span { font-weight: 500; font-size: 13px; color: var(--muted); text-align: right; }
.nl-read .row label span.warn { color: var(--warn); }
.nl-qs { display: grid; gap: 24px; margin-top: 16px; }
.nl-qs .q { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.nl-qs .todo .q::after { content: " · chưa trả lời"; color: var(--warn); font-weight: 500; font-size: 13px; }
.nl-cu { margin-top: 8px; }
.nl-so-lbl { display: block; margin: 12px 0 4px; }
.nl-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; position: relative; }
.nl-choice:hover { background: var(--sunk); }
.nl-choice input { position: absolute; opacity: 0; pointer-events: none; }
.nl-choice:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.nl-choice:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.nl-more summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 36px; }
.nl-more summary::-webkit-details-marker { display: none; }
.nl-more summary .i { transition: transform .15s var(--ease); }
.nl-more[open] summary .i { transform: rotate(90deg); }
.nl-more .nl-qs { margin-top: 12px; }
.nl-dock { position: sticky; bottom: 0; z-index: 10; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 -4px 16px rgba(17, 17, 17, .06); } /* taste-skill-ignore: thanh dính đáy */
.nl-dock .left { display: grid; gap: 2px; }
.nl-dock .left b { font-weight: 600; }
/* màn 3 */
.nl-lamp-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px; }
.nl-lamps { display: flex; flex-direction: column; gap: 12px; padding: 16px 12px; border-radius: 40px; background: #1c1c1c; }
.nl-lamp { width: 52px; height: 52px; border-radius: 50%; background: #3a3a3a; }
.nl-lamp.do.on { background: var(--lamp-red); }
.nl-lamp.vang.on { background: var(--lamp-yellow); }
.nl-lamp.xanh.on { background: var(--lamp-green); }
.nl-verdict .tag { font-size: 14px; font-weight: 600; color: var(--warn); }
.nl-verdict.do .tag { color: var(--bad); }
.nl-verdict.xanh .tag { color: var(--ok); }
.nl-verdict h2 { font-size: 22px; margin-top: 4px; }
.nl-verdict p { margin-top: 8px; color: var(--ink-2); max-width: 60ch; }
.nl-verdict .acts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.nl-gaps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; }
.nl-gap { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 16px 0; }
.nl-gap + .nl-gap { border-top: 1px solid #f0eeec; }
.nl-gap .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 13px; }
.nl-gap.do .n { background: var(--bad-soft); color: var(--bad); }
.nl-gap .what { font-weight: 600; }
.nl-gap .why { font-size: 14px; color: var(--muted); margin-top: 2px; }
.nl-gap .fix { margin-top: 8px; padding: 8px 12px; border-radius: var(--r-s); background: var(--bg); font-size: 14px; color: var(--ink-2); }
.nl-gap .fix b { color: var(--ink); }
.nl-gap-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid #f0eeec; }
.nl-have { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.nl-have li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 14px; color: var(--ink-2); }
.nl-have li .i { color: var(--ok); margin-top: 2px; }
.nl-have li.no .i { color: var(--muted); }
.nl-next-wrap { margin-top: 32px; }
.nl-next { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--nl-gap); margin-top: 16px; }
.nl-nx { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; }
.nl-nx:hover { border-color: var(--ink); }
.nl-nx .t { font-weight: 600; }
.nl-nx .d { font-size: 14px; color: var(--muted); }
.nl-nx .go { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--blue); margin-top: auto; padding-top: 4px; }
.nl-nx.best { border-color: var(--primary); outline: 1px solid var(--primary); outline-offset: -2px; }
.nl-hoan { font-size: 13px; max-width: 360px; }
.nl-hoan summary { cursor: pointer; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.nl-hoan p { margin: 4px 0 8px; }
@media (max-width: 1100px) { .nl-ask-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nl-next { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1040px) { .nl-cols { grid-template-columns: minmax(0, 1fr); } .nl-col-b { display: contents; } }
@media (max-width: 640px) {
  .nl h1 { font-size: 22px; }
  .nl-panel { padding: 16px; }
  .nl-may { display: none; }
  .nl-ask-list { grid-template-columns: minmax(0, 1fr); }
  .nl-bin { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .nl-folder { grid-template-columns: 20px minmax(0, 1fr); }
  .nl-folder .meta { display: none; }
  .nl-path > span:first-child { display: none; }
  #nl-h-chon + .nl-count { display: none; }
  .nl-go-row { position: sticky; bottom: 64px; z-index: 5; margin: 16px -16px -16px; padding: 12px 16px; background: var(--surface); border-radius: 0 0 var(--r) var(--r); }
  .nl-go-row button { width: 100%; }
  .nl-lamp-card { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
  .nl-lamps { flex-direction: row; justify-self: start; padding: 12px 16px; }
  .nl-lamp { width: 40px; height: 40px; }
  .nl-verdict .acts .btn, .nl-verdict .acts button { width: 100%; }
  .nl-next { grid-template-columns: minmax(0, 1fr); }
  .nl-dock { bottom: 64px; padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .nl-dock .left .small { display: none; }
  .nl-dock button { width: 100%; }
}

/* ===== Chọn câu mở đầu bằng hình (web/public/chon-hook.js, 27/10/2026): 5 bước, mỗi bước 1 địa chỉ, ảnh nằm trong thẻ =====
   Nguồn: khối CSS đầu của bản mẫu v2 + 8 sửa giả lập vòng 2 (chữ phụ ≥ 15 px, nút bước 5 theo vai, ảnh thẻ ≥ 160 px trên điện thoại,
   bỏ ô giữ chỗ ảnh, cảnh báo ảnh cũ to rõ) + vòng sửa L1v2 (giả lập web thật L1: chân bước dính đáy, nút nghe đè góc ảnh, chữ phụ
   màu --ink-2, khung lệnh không cuộn riêng, thông báo nổi lên trên không đè khối lệnh). Lớp ch-*; màu lấy từ biến của hệ (--primary, --ink, --warn…). */
.ch-head { margin-bottom: 16px; }
.ch-vn { margin: 6px 0 0; font-size: .9375rem; color: var(--ink-2); overflow-wrap: anywhere; }
.ch-meta { margin: 4px 0 0; font-size: .9375rem; color: var(--ink-2); overflow-wrap: anywhere; }
.ch-buoc { list-style: none; margin: 0 0 20px; padding: 0; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.ch-buoc li { flex: 1 1 0; min-width: 0; display: flex; }
.ch-tab { flex: 1; min-width: 0; justify-content: flex-start; gap: 8px; min-height: 44px; padding: 0 8px; margin-bottom: -1px; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--ink-2); font-weight: 600; font-size: .9375rem; }
.ch-tab:hover:not(:disabled) { background: transparent; color: var(--ink); border-color: transparent; border-bottom-color: var(--line-2); }
.ch-tab.on, .ch-tab.on:hover:not(:disabled) { color: var(--ink); border-bottom-color: var(--ink); }
.ch-so { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sunk); color: var(--ink-2); font-size: .9375rem; }
.ch-tab.on .ch-so { background: var(--ink); color: #fff; }
.ch-tab.qua .ch-so { background: var(--ok-soft); color: var(--ok); }
.ch-tab-ten { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-chinh { gap: 20px; }
.ch-than { gap: 16px; }
.ch-dau { display: grid; gap: 6px; }
.ch-dau h2 { margin: 0; }
.ch-goi { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--ink-2); max-width: 72ch; }
.ch-chinh .note { font-size: .9375rem; }
.ch-chinh button.sm { min-height: 44px; font-size: .9375rem; } /* nút nhỏ của hệ 13 px / 32 px → ≥ 15 px chữ, ≥ 44 px vùng bấm */
.ch-luoi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }

/* ---- thẻ chọn: nút chọn (tên + "Đã chọn") · ảnh 9:16 + nút nghe đè góc · thân (chữ, kiểm) · ô "Sửa câu" trải hết bề ngang ---- */
.ch-the { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; transition: border-color .12s var(--ease); }
.ch-the:hover { border-color: var(--line-2); }
.ch-the.on, .ch-the.on:hover { border-color: var(--primary); outline: 1px solid var(--primary); outline-offset: -2px; }
.ch-the.dang-phat, .ch-the.dang-phat:hover { border-color: var(--ink); outline: 1px solid var(--ink); outline-offset: -2px; }
.ch-chon { display: grid; gap: 10px; width: 100%; min-height: 0; padding: 12px 12px 10px; justify-content: stretch; text-align: left; line-height: 1.4; white-space: normal; background: transparent; border: 0; border-radius: 0; color: var(--ink); font-weight: 400; font-size: .9375rem; }
.ch-chon:hover:not(:disabled) { background: transparent; border-color: transparent; color: var(--ink); }
.ch-chon:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.ch-the.ngang .ch-chon { padding: 16px; }
.ch-the-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.ch-the-ten { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.ch-ct-box { display: contents; }
.ch-ct { font-size: .9375rem; color: var(--ink-2); font-weight: 500; }
.ch-dachon { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: .9375rem; font-weight: 600; padding: 4px 8px; border-radius: var(--r-s); background: var(--blue-soft); color: var(--blue); }
.ch-chuachon { flex: none; font-size: .9375rem; color: var(--ink-2); }
.ch-anh-o { position: relative; display: block; padding: 0 12px; }
.ch-anh { position: relative; display: block; aspect-ratio: 9 / 16; background: var(--sunk); border-radius: var(--r-s); overflow: hidden; }
.ch-anh img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-anh-trong { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 12px; color: var(--ink-2); font-size: .9375rem; line-height: 1.45; text-align: center; }
/* nút nghe đè góc trên phải ảnh: thấy ngay khi thấy thẻ (giả lập L1 s3 e9: iPad phải vuốt qua ảnh 620 px mới tới nút) */
.ch-nghe-o { position: absolute; top: 8px; right: 20px; }
.ch-nghe-o .ch-nghe, .ch-nghe-o .ch-nghe:hover:not(:disabled) { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.ch-nghe-o .ch-nghe.on { border-color: var(--ink); }
.ch-the-than { display: grid; gap: 10px; padding: 12px; align-content: start; flex: 1; min-width: 0; }
.ch-the-than p { margin: 0; }
.ch-noi { display: grid; gap: 8px; }
.ch-loi { color: var(--ink-2); font-size: .9375rem; line-height: 1.5; }
.ch-chu { display: grid; gap: 2px; padding: 8px 12px; background: var(--sunk); border-radius: var(--r-s); font-weight: 700; font-size: .9375rem; line-height: 1.35; }
.ch-mo { color: var(--ink-2); font-size: .9375rem; }
.ch-vi { font-size: .9375rem; color: var(--ink-2); line-height: 1.5; }
.ch-nghe { font-size: .9375rem; min-height: 44px; }
.ch-nghe.on { border-color: var(--ink); }
.ch-canh { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 6px 10px; border-radius: var(--r-s); background: var(--warn-soft); color: var(--ink); font-size: .9375rem; line-height: 1.45; }
.ch-canh .i { color: var(--warn); margin-top: 2px; flex: none; }
/* ảnh xem trước còn là chữ / câu cũ trong khi video dựng ra dùng bản người vừa sửa: to và rõ (vòng 2: dòng xám nhỏ bị bỏ qua) */
.ch-anh-cu { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--warn-soft); color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.45; }
.ch-anh-cu .i { color: var(--warn); margin-top: 3px; flex: none; }
.ch-ok-dong { display: flex; align-items: flex-start; gap: 6px; flex-basis: 100%; margin: 0; font-size: .9375rem; line-height: 1.45; color: var(--ok); font-weight: 600; }
.ch-ok-dong .i { margin-top: 3px; flex: none; }

/* ---- kết quả kiểm luật: đỏ = máy sẽ chặn · vàng = máy chỉ nhắc ---- */
.ch-luat { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ch-luat li { display: flex; align-items: flex-start; gap: 8px; padding: 6px 10px; border-radius: var(--r-s); font-size: .9375rem; line-height: 1.45; }
.ch-luat li .i { flex: none; margin-top: 2px; }
.ch-luat.chan li { background: var(--bad-soft); color: var(--ink); }
.ch-luat.chan li .i { color: var(--bad); }
.ch-luat.nhac li { background: var(--warn-soft); color: var(--ink); }
.ch-luat.nhac li .i { color: var(--warn); }
.ch-gap { border-top: 1px solid var(--line); cursor: auto; }
.ch-gap > summary { padding: 12px; font-weight: 600; font-size: .9375rem; cursor: pointer; color: var(--blue); }
.ch-gap-than { padding: 0 12px 12px; gap: 12px; }
.ch-gap textarea, .ch-duoi textarea, .ch-gop textarea { min-height: 0; resize: vertical; }
.ch-gap small, .ch-duoi small, .ch-gop small { font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }
.ch-kiem { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.ch-kiem .chip, .ch-qua { font-size: .9375rem; line-height: 1.2; padding: 6px 10px; }
.ch-tong-khoi { display: grid; gap: 10px; }
.ch-tong { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; font-size: .9375rem; }
.ch-giu { margin: 0; font-size: .9375rem; }

/* ---- bước 2: chọn câu đang xem kiểu (3 ô đều nhau, không cắt) ---- */
.ch-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; background: var(--sunk); border-radius: var(--r); max-width: 640px; }
.ch-seg-o { display: grid; gap: 2px; justify-items: start; min-width: 0; min-height: 56px; padding: 6px 12px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: var(--r-s); color: var(--ink-2); font-weight: 500; }
.ch-seg-o b { color: var(--ink-2); font-size: .9375rem; }
.ch-seg-o span { font-size: .9375rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-seg-o:hover:not(:disabled) { background: transparent; border-color: transparent; color: var(--ink); }
.ch-seg-o.on, .ch-seg-o.on:hover:not(:disabled) { background: var(--surface); border-color: var(--line); color: var(--ink); }
.ch-seg-o.on b { color: var(--ink); }
.ch-ngucanh { display: grid; gap: 4px; padding: 12px 16px; background: var(--sunk); border-radius: var(--r-s); }
.ch-ngucanh p { margin: 0; }

/* ---- bước 3–4: thẻ ngang (giọng, có / không kêu gọi) ---- */
.ch-ds { display: grid; gap: 12px; }
.ch-the.ngang { flex-direction: row; align-items: center; }
.ch-the.ngang .ch-chon { flex: 1; min-width: 0; }
.ch-the.ngang .ch-the-than { flex: none; padding: 12px 16px; }
.ch-giong { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ch-giong .i { color: var(--ink-2); flex: none; }
.ch-duoi-o .ch-the-dau { flex-wrap: wrap; }
.ch-duoi-ten { display: grid; gap: 2px; min-width: 0; }
.ch-duoi-ten span { color: var(--ink-2); font-size: .9375rem; }
.ch-duoi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ch-duoi.co-anh { grid-template-columns: 140px minmax(0, 1fr); } /* chưa có ảnh câu kêu gọi → không giữ chỗ (vòng 2: ô xám ~280 px) */
.ch-duoi-anh { display: grid; gap: 8px; align-content: start; }
.ch-duoi-anh:empty { display: none; }
.ch-qua { justify-self: start; margin: 0; }
.ch-kiem-duoi { gap: 8px; }

/* ---- bước 5: khối lỗi · tóm tắt · góp ý ---- */
.ch-loi-chan { display: grid; gap: 10px; background: var(--bad-soft); border-color: transparent; }
.ch-loi-chan:focus { outline: 2px solid var(--bad); outline-offset: 2px; }
.ch-loi-chan h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--bad); font-size: 1rem; }
.ch-loi-chan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ch-loi-chan li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9375rem; }
.ch-loi-chan li button { flex: none; white-space: nowrap; }
.ch-tom { display: grid; margin: 0; padding: 4px 16px; }
.ch-tom-dong { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.ch-tom-dong:first-child { border-top: 0; }
.ch-tom dt { color: var(--ink-2); font-size: .9375rem; }
.ch-tom dd { margin: 0; font-weight: 600; min-width: 0; }
.ch-tom-cau { display: grid; gap: 4px; font-weight: 500; }
.ch-tom-nhac dd { font-weight: 400; }
.ch-tom-dong .linkish { white-space: nowrap; font-size: .9375rem; }
.ch-gop { gap: 12px; }
.ch-gop-hd { gap: 12px; }
.ch-gop-hd:empty { display: none; }
.ch-claude { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ch-ok { background: var(--ok-soft); color: var(--ink); font-size: .9375rem; }
.ch-ok > .i { color: var(--ok); }
.ch-da-gui a { font-weight: 700; }
.ch-xem-lenh > summary { cursor: pointer; font-weight: 600; font-size: .9375rem; color: var(--blue); }
/* lệnh đọc trọn không cuộn riêng (giả lập L1 s4 c1: khung 320 px phải cuộn trong khung) */
.ch-xem-lenh pre { margin: 10px 0 0; max-height: none; overflow: visible; font-size: .9375rem; line-height: 1.55; }
button.khoa, button.khoa:hover:not(:disabled) { background: var(--line-2); border-color: var(--line-2); color: var(--ink-2); cursor: not-allowed; }
.ch-an-chep { position: fixed; left: -9999px; top: 0; opacity: 0; }
/* thông báo nổi ("Đã chép lệnh"…) lên trên cùng: không đè chân bước dính đáy, không đè khối lệnh vừa cuộn tới (giả lập L1 s3 e4) */
body:has(.ch-chinh) .toast { top: 16px; bottom: auto; }

/* ---- chân bước DÍNH ĐÁY: Quay lại · (nhắc lỗi đỏ) · Bước x trên 5 · Tiếp. Bước 5: nút chính + nút phụ, nút chính bên phải ----
   Giả lập L1 s3 #1, s1 #2: chân bước nằm cuối trang dài 2–2,5 màn. Đệm cuộn để ô đang gõ / khối vừa cuộn tới không nằm dưới thanh. */
html:has(.ch-chan) { scroll-padding-bottom: 120px; }
.ch-chan { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; box-shadow: 0 -4px 16px rgba(17, 17, 17, .06); } /* taste-skill-ignore: thanh dính đáy */
.ch-chan button { white-space: nowrap; }
.ch-chan-phai { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 16px; margin-left: auto; }
.ch-chan.cuoi .ch-chan-phai { gap: 12px; }
.ch-chan.cuoi .ch-nut-chinh { order: 9; }
.ch-dem { margin: 0; color: var(--ink-2); font-size: .9375rem; white-space: nowrap; }
/* còn lỗi đỏ ở bước đang đứng: vẫn cho "Tiếp", nhắc 1 dòng ngay cạnh nút + nút tới chỗ lỗi (giả lập L1 s1 e7) */
.ch-nhac-tiep { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; margin: 0 0 0 auto; padding: 6px 10px; border-radius: var(--r-s); background: var(--bad-soft); color: var(--ink); font-size: .9375rem; line-height: 1.4; }
.ch-nhac-tiep > .i { color: var(--bad); flex: none; }
.ch-nhac-tiep .linkish { font-size: .9375rem; font-weight: 600; }
.ch-nhac-tiep + .ch-chan-phai { margin-left: 0; }

/* ---- trang kết quả việc có ảnh xem trước (app.js renderJobDetail): khối "Chọn kiểu bằng hình" + góp ý đã lưu + tệp kỹ thuật gập ---- */
.kq-chinh { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; border-top: 4px solid var(--primary); }
.kq-chinh h2 { margin: 0; }
.kq-chinh p { margin: 0; font-size: .9375rem; max-width: 60ch; }
.kq-thumbs { display: flex; gap: 8px; }
.kq-thumbs .ch-anh { width: 72px; }
.kq-thumbs:empty { display: none; }
.kq-gop { display: grid; gap: 10px; }
.kq-gop h2, .kq-gop p { margin: 0; }
.kq-gop p { font-size: .9375rem; }
.kq-gop blockquote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--primary); background: var(--sunk); border-radius: 0 var(--r-s) var(--r-s) 0; font-size: .9375rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.kq-mota { margin: 0; font-size: .9375rem; color: var(--ink-2); line-height: 1.45; }
.kq-cu > summary { cursor: pointer; font-weight: 600; font-size: .9375rem; color: var(--ink-2); }
.kq-cu[open] > summary { margin-bottom: 12px; }

@media (max-width: 1100px) { .ch-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* thanh tab đáy của app (≤ 900 px, cao 61 px + vùng an toàn) → chân bước dính ngay trên nó; thông báo nổi dưới thanh đầu trang */
@media (max-width: 900px) {
  .ch-chan { bottom: calc(61px + env(safe-area-inset-bottom)); }
  html:has(.ch-chan) { scroll-padding-bottom: 200px; }
  body:has(.ch-chinh) .toast { top: 60px; }
}
@media (max-width: 640px) {
  .ch-buoc { gap: 0; }
  .ch-buoc li:has(.on) { flex: 3 1 0; }
  .ch-tab { justify-content: center; padding: 0 4px; }
  .ch-tab:not(.on) .ch-tab-ten { display: none; }
  .ch-luoi { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* thẻ có ảnh: cột trái = tên + ảnh (≥ 160 px bề ngang), cột phải = chữ; ô Sửa câu nằm dưới, trải hết bề ngang */
  .ch-the:not(.ngang) { display: grid; grid-template-columns: 172px minmax(0, 1fr); align-items: start; }
  .ch-the:not(.ngang) > .ch-chon { grid-column: 1; padding: 12px 0 8px 12px; gap: 8px; }
  .ch-the:not(.ngang) > .ch-anh-o { grid-column: 1; padding: 0 0 12px 12px; }
  .ch-the:not(.ngang) .ch-the-dau { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ch-the:not(.ngang) > .ch-the-than { grid-column: 2; grid-row: 1 / span 2; padding: 12px 12px 12px 10px; }
  .ch-the:not(.ngang) > .ch-gap { grid-column: 1 / -1; }
  /* ảnh hẹp: nút nghe thành thanh ngang đè đáy ảnh (không che chữ giữa ảnh) */
  .ch-nghe-o { top: auto; right: 8px; bottom: 20px; left: 20px; }
  .ch-nghe-o .ch-nghe { width: 100%; justify-content: center; padding: 0 8px; }
  /* thẻ ngang (giọng, kêu gọi): xếp dọc để chữ không gãy từng chữ */
  .ch-the.ngang { flex-direction: column; align-items: stretch; }
  .ch-the.ngang .ch-the-than { padding: 0 16px 16px; }
  .ch-the.ngang .ch-chon { padding: 16px 16px 12px; }
  .ch-the.ngang .ch-the-dau { flex-direction: column; align-items: flex-start; }
  .ch-duoi.co-anh { grid-template-columns: minmax(0, 1fr); }
  .ch-duoi-anh { max-width: 160px; }
  .ch-seg-o { padding: 6px 8px; }
  .ch-tom-dong { grid-template-columns: minmax(0, 1fr) auto; }
  .ch-tom-dong dt { grid-column: 1 / -1; }
  .ch-loi-chan li { flex-direction: column; align-items: flex-start; }
  .ch-an-dt { display: none; }
  .ch-dem { display: none; } /* tab bước đã hiện số bước đang ở */
  .ch-chan { padding: 10px 12px; gap: 8px; }
  .ch-chan-phai { gap: 12px; }
  .ch-nhac-tiep { order: -1; flex: 1 1 100%; margin: 0; }
  /* bước 5 trên điện thoại: nút chính 1 hàng trên cùng; nút phụ + "Quay lại" chia đôi hàng dưới (tối đa 3 hàng — thanh dính đáy không chiếm nửa màn) */
  html:has(.ch-chan.cuoi) { scroll-padding-bottom: 260px; }
  .ch-chan.cuoi { align-items: stretch; }
  .ch-chan.cuoi .ch-chan-phai { display: contents; }
  .ch-chan.cuoi .ch-nut-chinh { order: 0; flex: 1 1 100%; }
  .ch-chan.cuoi .ch-nut-phu { order: 1; flex: 1 1 40%; }
  .ch-chan.cuoi > button { order: 2; flex: 1 1 40%; }
  .ch-chan.cuoi button { white-space: normal; text-align: center; justify-content: center; line-height: 1.3; }
  .kq-chinh { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .kq-chinh .btn.lg { width: 100%; justify-content: center; }
  .kq-thumbs .ch-anh { width: 64px; }
}

/* ===== Chọn câu mở đầu — vòng sửa L3 F1–F6 (27/10/2026). DÁN VÀO CUỐI web/public/style.css (sau khối ch-* hiện có).
   Bản vá này chỉ THÊM luật; dòng cũ ".ch-seg-o span { … white-space: nowrap; }" bị luật dưới ghi đè, không cần xoá.
   F1 tab câu lỗi có dấu đỏ + thẻ kiểu thiếu dòng mờ · F2 khối trích góp ý người khác · F4 nhiều ô "Chữ trên hình" ·
   F6 tên kiểu trên tab câu xuống dòng (không cắt "Nhãn dán x…") + đầu trang gọn ≤ 640 px. */
.ch-seg-o > span { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: break-word; line-height: 1.3; }
.ch-seg-o b { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.ch-seg-o b .ch-seg-do { display: inline-flex; align-items: center; gap: 4px; color: var(--bad); font-weight: 600; font-size: .9375rem; max-width: none; overflow: visible; white-space: nowrap; }
.ch-seg-o.loi:not(.on) { border-color: var(--bad-soft); }
.ch-the.ch-thieu .ch-anh, .ch-the.ch-thieu .ch-the-than > p:not(.ch-thieu-dong) { opacity: .5; }
/* thẻ chưa chọn: dòng nhắc trung tính (chưa phải lỗi) · thẻ người ĐÃ chọn mà thiếu dòng: đỏ như lỗi */
.ch-thieu-dong { display: flex; align-items: flex-start; gap: 8px; padding: 6px 10px; border-radius: var(--r-s); background: var(--sunk); color: var(--ink); font-size: .9375rem; font-weight: 600; line-height: 1.45; }
.ch-thieu-dong .i { color: var(--ink-2); margin-top: 2px; flex: none; }
.ch-the.ch-thieu.on .ch-thieu-dong { background: var(--bad-soft); }
.ch-the.ch-thieu.on .ch-thieu-dong .i { color: var(--bad); }
.ch-gap div.f { display: grid; gap: 6px; font-weight: 600; }
.ch-gap div.f small { font-weight: 400; }
.ch-dong-ds { display: grid; gap: 8px; }
.ch-them-dong { justify-self: start; }
.ch-trich { display: grid; gap: 6px; }
.ch-trich p { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.ch-trich blockquote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--primary); background: var(--sunk); border-radius: 0 var(--r-s) var(--r-s) 0; font-size: .9375rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .ch-head { margin-bottom: 8px; }
  .ch-head h1 { font-size: 1.375rem; line-height: 1.25; }
  .ch-vn { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin-top: 4px; }
  .ch-meta { margin-top: 2px; }
  .ch-meta-tep { display: none; }
  .ch-buoc { margin-bottom: 12px; }
  .ch-seg-o { min-height: 0; }
}
