@import url("fonts.css");
/* CSS dùng chung cho mọi màn mock. Theo mock/DESIGN_STANDARD.html: đổi tiêu chuẩn thì sửa ở đây. */
:root {
  --red:#EE0033; --red-ink:#C8002B; --red-tint:#FDECEE;
  --black:#000; --ink:#1A1D1F; --gray-900:#44494D; --gray-600:#5F6469; --gray-400:#B5B4B4; --gray-100:#F2F2F2; --head:#E4E7EB; --head-line:#9AA0A5;
  --ok:#157F3B; --ok-tint:#E6F5EC; --warn:#9A5B00; --warn-tint:#FFF3DC;
  --font:"Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  --font-head:"Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  --nav-w:208px;
}
* { box-sizing:border-box; }
body { margin:0; font:16px/1.6 var(--font); color:var(--gray-900); background:var(--gray-100); }
code { background:#E6E7E9; padding:1px 6px; border-radius:4px; font-size:14px; color:var(--black); white-space:nowrap; }
a { color:var(--ink); text-underline-offset:3px; }
:focus-visible { outline:3px solid var(--ink); outline-offset:2px; }
.ico { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex:none; }

/* Khung ứng dụng: thanh điều hướng trái + thanh trên + nội dung */
.nav { position:fixed; inset:0 auto 0 0; width:var(--nav-w); background:var(--ink); color:#C9CCCF; display:flex; flex-direction:column; z-index:20; overflow:auto; }
.brand { padding:18px 20px; border-bottom:1px solid #2E3235; }
.brand b { display:block; color:#fff; font:700 17px var(--font-head); white-space:nowrap; }
.brand span { font-size:13px; color:#9AA0A5; }
.brand i { display:inline-block; width:10px; height:10px; background:var(--red); border-radius:50%; margin-right:8px; }
.nav a { display:flex; align-items:center; gap:10px; padding:10px 20px; color:#C9CCCF; text-decoration:none; font-size:15px; border-left:3px solid transparent; }
.nav a:hover { background:#24282B; color:#fff; }
.nav a.on { background:#24282B; color:#fff; border-left-color:var(--red); font-weight:700; }
.nav a.dis { opacity:.5; pointer-events:none; }
.nav small { padding:14px 20px 4px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:#8A9096; }
.nav .foot { margin-top:auto; padding:14px 20px; font-size:13px; color:#8A9096; border-top:1px solid #2E3235; }
.menu-btn { display:none; position:fixed; top:10px; left:10px; z-index:30; background:var(--ink); color:#fff; border:0; padding:8px 12px; border-radius:6px; }
.app { margin-left:var(--nav-w); min-height:100vh; }
.topbar { background:#fff; border-bottom:1px solid #E3E5E8; height:56px; padding:0 24px; display:flex; align-items:center; justify-content:space-between; font-size:14px; }
.crumbs { color:var(--gray-600); } .crumbs b { color:#000; }
.mocknote { background:#FFF3C4; color:#5B4300; font-size:13px; padding:6px 24px; display:flex; gap:16px; align-items:center; flex-wrap:wrap; border-bottom:1px solid #EBD98F; }
.mocknote b { color:#5B4300; } .mocknote label { cursor:pointer; } .mocknote button { background:#fff; border:1px solid #D9C36A; border-radius:4px; padding:1px 8px; cursor:pointer; font:13px var(--font); } .mocknote button:hover { background:#FFE9A0; }
.page { padding:20px 24px 0; }   /* KHÔNG giới hạn bề rộng: bảng giãn hết màn */
.page h1 { font:700 28px/1.3 var(--font-head); color:#000; margin:0 0 8px; }
.page .sub { color:var(--gray-600); margin:0 0 20px; max-width:880px; }
.card { background:#fff; border:1px solid #E3E5E8; border-radius:8px; padding:20px 24px; margin-bottom:16px; }
.card h2 { font:700 18px var(--font-head); color:#000; margin:0 0 16px; }
.row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.between { justify-content:space-between; }
.hint { color:var(--gray-600); font-size:14px; }
.screen { display:none; } .screen.on { display:block; }

/* Nút */
.btn { font:600 15px var(--font); height:40px; padding:0 20px; border-radius:6px; border:1px solid transparent; cursor:pointer; display:inline-flex; align-items:center; gap:8px; text-decoration:none; }
.btn-primary { background:var(--red); color:#fff; } .btn-primary:hover { background:var(--red-ink); }
.btn-secondary { background:#fff; color:#000; border-color:var(--ink); } .btn-secondary:hover { background:var(--gray-100); }
.btn-text { background:transparent; color:var(--ink); padding:0 8px; text-decoration:underline; text-underline-offset:3px; } .btn-text:hover { background:#E6E7E9; }
.btn-back { background:transparent; color:var(--gray-900); padding:0 12px 0 4px; height:36px; margin-bottom:4px; } .btn-back:hover { background:#E6E7E9; color:#000; }
.btn-danger-confirm { background:var(--red); color:#fff; }
.btn:disabled { opacity:.45; cursor:not-allowed; }

/* Ô nhập */
input[type=text], select { height:40px; padding:0 12px; border:1px solid #9AA0A5; border-radius:6px; font:16px var(--font); background:#fff; color:#000; }

input.edited { border-color:#D99A00; background:#FFFBE9; }

/* Nhãn, bảng, thông báo, hộp thoại */
.badge { display:inline-flex; padding:3px 12px; border-radius:999px; font:700 13px var(--font); white-space:nowrap; }
.b-create { background:var(--ink); color:#fff; } .b-exist { background:var(--warn-tint); color:var(--warn); } .b-ok { background:var(--ok-tint); color:var(--ok); }
.b-skip { background:#E6E7E9; color:var(--gray-900); } .b-err { background:var(--red-tint); color:var(--red-ink); }
table.data { width:100%; border-collapse:collapse; font-size:15px; background:#fff; }
table.data th { background:var(--head); color:#000; text-align:left; padding:14px 16px; font-size:14px; font-weight:700; border-bottom:2px solid var(--head-line); }
table.data td { padding:14px 16px; border-bottom:1px solid #E3E5E8; vertical-align:middle; }
table.data tr:hover td { background:#FAFAFA; } table.data tr.off td { opacity:.5; } table.data tr.sel td { background:var(--red-tint); }
.stat { background:#fff; border:1px solid #E3E5E8; border-radius:8px; padding:14px 18px; cursor:pointer; min-width:140px; }
.stat.on { border-color:var(--ink); box-shadow:0 0 0 1px var(--ink); }
.stat .num { font:700 32px/1.1 var(--font-head); color:#000; } .stat.hot .num { color:var(--red); }
.stat .lbl { color:var(--gray-600); font-size:14px; }
.alert { display:flex; gap:12px; padding:14px 16px; border-radius:6px; font-size:15px; border:1px solid; }
.a-info { background:#EEF0F2; border-color:#D5D9DD; } .a-ok { background:var(--ok-tint); border-color:#BFE3CB; color:#0F5B2A; }
.a-warn { background:var(--warn-tint); border-color:#F1D9A6; color:#6B4300; } .a-err { background:var(--red-tint); border-color:#F4C5CB; color:#7A0F20; }
.alert b { white-space:nowrap; }
.overlay { position:fixed; inset:0; background:rgba(16,24,40,.5); display:none; align-items:center; justify-content:center; padding:16px; z-index:50; }
.overlay.show { display:flex; }
.modal { background:#fff; border-radius:12px; max-width:640px; width:100%; max-height:85vh; overflow:auto; padding:24px 28px; }
.modal h3 { margin:0 0 10px; font:700 20px var(--font-head); color:#000; }
.modal ul { padding-left:20px; margin:6px 0 12px; }
.modal .actions { display:flex; justify-content:space-between; gap:8px; margin-top:20px; }
.spinner { display:inline-block; width:14px; height:14px; border:2px solid #cfd6e4; border-top-color:var(--red); border-radius:50%; animation:sp .8s linear infinite; vertical-align:-2px; margin-right:6px; }
@keyframes sp { to { transform:rotate(360deg); } }
.cards { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); }
.tile { display:block; background:#fff; border:1px solid #E3E5E8; border-radius:8px; padding:18px; text-decoration:none; color:var(--gray-900); }
a.tile:hover { border-color:var(--ink); }
.tile .ic { width:40px; height:40px; border-radius:10px; background:var(--ink); color:#fff; display:flex; align-items:center; justify-content:center; margin-bottom:10px; }
.tile .ic .ico { width:22px; height:22px; } .tile b { display:block; color:#000; font-size:18px; }
.tile.todo { opacity:.6; }

@media (max-width:1279px) { :root { --nav-w:60px; } .nav a span, .nav small, .brand span, .nav .foot { display:none; } .nav a { padding:12px 20px; } .brand b { font-size:0; } .brand i { margin:0; } }
@media (max-width:760px) { .menu-btn { display:none; } :root { --nav-w:0px; } .nav { display:none; } .page { padding:16px 16px 0; } .stickybar { margin:24px -16px 0; padding:12px 16px; } .topbar { padding:0 16px; } }

/* Combobox: danh sách lấy từ nguồn dữ liệu; mục không chọn được thì xám + tooltip nêu lý do */
.combo { position:relative; display:inline-block; }
.combo-btn { height:40px; min-width:260px; padding:0 12px; border:1px solid #9AA0A5; border-radius:6px; background:#fff; font:16px var(--font); color:#000; display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; }
.combo-btn:hover { border-color:var(--ink); }
.combo-list { position:absolute; z-index:30; top:44px; left:0; min-width:100%; background:#fff; border:1px solid #9AA0A5; border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.14); list-style:none; margin:0; padding:6px; display:none; }
.combo.open .combo-list { display:block; }
.combo-list li { position:relative; padding:10px 14px; border-radius:6px; font-size:16px; display:flex; justify-content:space-between; gap:14px; align-items:center; cursor:pointer; white-space:nowrap; }
.combo-list li:hover, .combo-list li:focus { background:var(--gray-100); outline:none; }
.combo-list li.sel { font-weight:700; }
.combo-list li[aria-disabled=true] { color:var(--gray-400); cursor:not-allowed; background:#FAFAFA; }
.combo-list li[aria-disabled=true] .badge { background:#E6E7E9; color:var(--gray-600); }
.tip { position:absolute; left:8px; top:calc(100% + 4px); width:340px; white-space:normal; background:var(--ink); color:#fff; font-size:14px; line-height:1.45; padding:12px 14px; border-radius:8px; display:none; z-index:40; font-weight:400; }
.combo-list li:hover .tip, .combo-list li:focus .tip { display:block; }
.combo-list li[aria-disabled=true] .tip { color:#fff; }

/* ---- v1.3 ---- */
input[type=checkbox] { width:20px; height:20px; accent-color:var(--ink); cursor:pointer; vertical-align:middle; }
textarea.name { width:100%; min-height:40px; padding:9px 12px; border:1px solid #9AA0A5; border-radius:6px; font:16px/1.4 var(--font); color:#000; background:#fff; resize:none; field-sizing:content; display:block; }
textarea.name.edited { border-color:#D99A00; background:#FFFBE9; }

.sumbar { background:#fff; border:1px solid #E3E5E8; border-radius:8px; padding:14px 20px; margin:16px 0; }
.sumbar b { color:#000; }
.chipbar { display:flex; gap:8px 10px; flex-wrap:wrap; align-items:center; margin:16px 0; }
.chipbtn { height:40px; padding:0 16px; border:1px solid #9AA0A5; background:#fff; border-radius:999px; font:15px var(--font); color:var(--gray-900); cursor:pointer; }
.chipbtn b { color:#000; } .chipbtn[aria-pressed=true] { background:var(--ink); color:#fff; border-color:var(--ink); } .chipbtn[aria-pressed=true] b { color:#fff; }
.chipbtn.attn b { color:var(--red-ink); } .chipbtn.attn[aria-pressed=true] b { color:#fff; }
/* danh sách cụm dạng lưới: không cuộn ngang, tự chuyển thẻ khi hẹp */
.clist { background:#fff; border:1px solid #E3E5E8; border-radius:8px; overflow:hidden; }
.crow { display:grid; grid-template-columns:32px minmax(196px,1.5fr) 128px 134px 140px 100px minmax(180px,1.6fr); gap:0 10px; align-items:center; padding:14px 12px; border-bottom:1px solid #E3E5E8; }
.crow:last-child { border-bottom:0; }
.crow.head { background:var(--head); color:#000; font-weight:700; font-size:14px; padding:12px 12px; border-bottom:2px solid var(--head-line); }
.crow.off { background:#FAFAFA; } .crow.off .name { opacity:.6; }
.crow .desc { font-size:15px; color:var(--gray-900); }
.crow .note { font-size:14px; color:var(--gray-600); margin-top:2px; } .crow .note.warn { color:var(--warn); font-weight:700; } .crow .note.bad { color:var(--red-ink); font-weight:700; }
.crow select { width:100%; }
.crow select.need { border-color:var(--red-ink); background:var(--red-tint); }
.panel { background:#fff; border:1px solid var(--ink); border-radius:8px; padding:20px 24px; margin:16px 0; }
.panel h2 { font:700 18px var(--font-head); color:#000; margin:0 0 8px; }
.panel h3 { font:700 16px var(--font-head); color:#000; margin:12px 0 4px; }
.panel ul { margin:4px 0 8px; padding-left:20px; }
.stickybar { position:sticky; bottom:0; background:#fff; border-top:1px solid #D5D9DD; padding:14px 24px; display:flex; gap:12px; align-items:center; justify-content:flex-end; flex-wrap:wrap; margin:24px -24px 0; box-shadow:0 -4px 12px rgba(0,0,0,.05); }
@media (max-width:1199px) {
  .crow { grid-template-columns:44px 1fr; gap:8px 12px; padding:16px; }
  .crow.head { display:none; }
  .crow > * { grid-column:2; } .crow > .c-chk { grid-column:1; grid-row:1 / span 6; align-self:start; padding-top:8px; }
  .crow .c-code::before { content:"Mã chức năng: "; color:var(--gray-600); font-family:var(--font); }
  .crow .c-due::before { content:"Hạn PTYC: "; color:var(--gray-600); }
  .crow .c-partner { max-width:260px; }
}
.warnbox { border-left:6px solid var(--warn); font-size:16px; padding:16px 20px; margin:16px 0; }
.warnbox > div { flex:1; } .warnbox ul { margin:6px 0 6px; padding-left:20px; } .warnbox b { white-space:normal; }

/* Thanh bước: hình trước, chữ sau */
.stepper { display:flex; align-items:center; list-style:none; margin:8px 0 20px; padding:0; max-width:560px; }
.stepper li { display:flex; align-items:center; gap:10px; color:var(--gray-600); font-size:16px; white-space:nowrap; }
.stepper li + li::before { content:""; display:block; width:56px; height:2px; background:var(--gray-400); margin:0 14px 0 4px; }
.stepper li.done + li::before, .stepper li.cur + li::before { background:var(--gray-400); }
.stepper li.done + li.cur::before { background:var(--ink); }
.stepper .dot { width:32px; height:32px; border-radius:50%; border:2px solid var(--gray-400); background:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; flex:none; color:var(--gray-600); }
.stepper li.done { color:var(--gray-900); } .stepper li.done .dot { border-color:var(--ink); color:var(--ink); }
.stepper li.cur { color:#000; font-weight:700; } .stepper li.cur .dot { background:var(--ink); border-color:var(--ink); color:#fff; box-shadow:0 0 0 4px #D5D9DD; }
@media (max-width:600px) { .stepper li .lbl { display:none; } .stepper li.cur .lbl { display:inline; } .stepper li + li::before { width:24px; margin:0 8px 0 2px; } }

/* ---- Sắp xếp ---- */
.sortbtn { background:none; border:0; padding:0; margin:0; font:inherit; color:inherit; cursor:pointer; display:inline-flex; align-items:center; gap:6px; text-align:left; }
.sortbtn:hover { text-decoration:underline; text-underline-offset:3px; }
.sortbtn .arr { font-size:12px; color:var(--gray-600); } .sortbtn.on .arr { color:#000; }
.sortsel { display:none; align-items:center; gap:8px; margin-left:auto; font-size:15px; }
.sortsel select { height:40px; }
@media (max-width:1199px) { .sortsel { display:flex; } }

.crow .c-due { font-size:15px; white-space:nowrap; }

.crow select { font-size:15px; padding:0 8px 0 10px; }
.crow.head .sortbtn { white-space:nowrap; }
.modal ul ul { margin:4px 0 6px; padding-left:20px; list-style:circle; } .modal ul ul li { margin:2px 0; }

a.sortbtn { text-decoration:none; } a.sortbtn:hover { text-decoration:underline; text-underline-offset:3px; }
.chipbtn { text-decoration:none; display:inline-flex; align-items:center; gap:6px; }

/* ---- Màn Chuyển cụm sang milestone mới (spec 0006) ---- */
.mv .crow { grid-template-columns:32px minmax(170px,1.4fr) 140px minmax(140px,1fr) 150px minmax(160px,1.2fr); }
.mv .duein { width:100%; font-size:15px; padding:0 8px; } .mv .duein.edited { border-color:#D99A00; background:#FFFBE9; }
.srcrow { display:flex; gap:12px; align-items:center; padding:10px 12px; border-bottom:1px solid #E3E5E8; min-height:44px; }
.srcrow:last-child { border-bottom:0; } .srcrow label { flex:1; cursor:pointer; display:flex; gap:12px; align-items:center; }
.srclist { border:1px solid #E3E5E8; border-radius:8px; overflow:hidden; max-width:640px; }
.field { display:flex; flex-direction:column; gap:6px; } .field > label, .field > .lab { font:700 14px var(--font); color:#000; }
.fields { display:flex; gap:24px; flex-wrap:wrap; align-items:flex-start; margin-top:20px; }
input.bad { border-color:var(--red-ink); background:var(--red-tint); } .err { color:var(--red-ink); font-weight:700; font-size:14px; max-width:420px; }
@media (max-width:1199px) { .mv .crow { grid-template-columns:44px 1fr; } .mv .c-ms::before { content:"Milestone hiện tại: "; color:var(--gray-600); } .mv .duein { width:auto; } }

/* Gán assignee theo cụm (spec 0007): bảng thật, nhóm milestone, ô chọn nhiều người */
.tblwrap { background:#fff; border:1px solid #E3E5E8; border-radius:8px; }
table.cl { table-layout:fixed; } table.cl th, table.cl td { border-right:1px solid #E3E5E8; word-wrap:break-word; } table.cl th:last-child, table.cl td:last-child { border-right:0; }
table.cl thead th:first-child { border-radius:8px 0 0 0; } table.cl thead th:last-child { border-radius:0 8px 0 0; }
table.cl tr.gh td { background:#F7F8F9; font-size:16px; border-right:0; padding:10px 16px; } table.cl tr.off td { background:#FAFAFA; } table.cl tr.off td b { opacity:.7; }
table.cl .mc .combo { display:block; } table.cl .mc .combo-btn { min-width:0; width:100%; height:40px; font-size:15px; } table.cl td .combo-list { min-width:240px; }
.mc .combo-btn { min-width:300px; } .mc .combo-btn[disabled] { opacity:.45; cursor:not-allowed; } .combo-btn .mc-val { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mc li { justify-content:flex-start; padding:0; } .mc li label { display:flex; align-items:center; gap:10px; padding:10px 14px; width:100%; cursor:pointer; } .mc li[aria-disabled=true] { padding:10px 14px; }
.mc li input { width:20px; height:20px; }
.pill { display:inline-flex; padding:2px 10px; margin:2px 4px 2px 0; border-radius:999px; background:#fff; border:1px solid #9AA0A5; font-size:14px; font-weight:600; color:#000; white-space:nowrap; }
.pill.none { border-style:dashed; color:var(--gray-600); font-weight:400; }
.seg { display:flex; gap:8px; flex-wrap:wrap; } .seg label { height:40px; padding:0 16px; border:1px solid #9AA0A5; background:#fff; border-radius:6px; display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-size:15px; }
.seg label:has(input:checked) { background:var(--ink); color:#fff; border-color:var(--ink); font-weight:600; } .seg input { accent-color:#fff; }
.tools { display:flex; gap:24px; flex-wrap:wrap; align-items:flex-end; }
@media (max-width:1199px) { table.cl, table.cl tbody, table.cl tr, table.cl td { display:block; } table.cl colgroup, table.cl thead { display:none; } table.cl tr:not(.gh) { padding:12px 16px; border-bottom:1px solid #E3E5E8; } table.cl td { border:0; padding:4px 0; } table.cl td.c-ms::before { content:"Đối tác: "; color:var(--gray-600); } table.cl td.c-code::before { content:"Mã chức năng: "; color:var(--gray-600); } }

/* Thanh tiến độ của lượt ghi lên GitHub (DESIGN mục 15) và thanh chạy liên tục khi đọc nguồn */
.pbar { height:12px; border-radius:999px; background:#E3E5E8; overflow:hidden; position:relative; } .pbar i { display:block; height:100%; width:0; background:var(--ink); border-radius:999px; transition:width .3s ease; }
.pbar.ind i { position:absolute; width:35%; animation:pind 1.2s ease-in-out infinite; } @keyframes pind { 0% { left:-35%; } 100% { left:100%; } }
.pcount { margin:12px 0 8px; font-size:16px; } .pcount .spinner { margin-right:8px; }
.plist { list-style:none; margin:12px 0 0; padding:0; border:1px solid #E3E5E8; border-radius:8px; max-height:420px; overflow:auto; }
.plist li { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:10px 16px; border-bottom:1px solid #E3E5E8; font-size:15px; min-height:44px; } .plist li:last-child { border-bottom:0; }
.plist li[data-state=waiting] .pname { color:var(--gray-600); } .plist li[data-state=running] { background:#FFFBE9; } .plist li[data-state=running] .pname { font-weight:700; color:#000; }
@media (prefers-reduced-motion:reduce) { .pbar i { transition:none; } .pbar.ind i { animation:none; width:100%; position:static; } }
