/* Trang hướng dẫn sử dụng (/huong-dan/nhanh, /huong-dan/chi-tiet) */
:root { --fg: #1e293b; --muted: #64748b; --line: #e2e8f0; --soft: #f1f5f9; --bg: #f8fafc; --card: #fff; --accent: #1e3a8a; --blue: #1d4ed8; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Be Vietnam Pro", system-ui, sans-serif; color: var(--fg); background: var(--bg); line-height: 1.65; font-size: 15.5px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--accent); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; }
.brand { color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a { color: #dbeafe; padding: 6px 10px; border-radius: 8px; font-size: .9rem; }
.top nav a.on, .top nav a:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
h1 { font-size: 1.8rem; margin: 28px 0 4px; color: var(--accent); }
h2 { font-size: 1.25rem; margin: 0 0 10px; color: var(--accent); }
h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.lead { color: var(--muted); margin-top: 0; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 16px 0; }
.box > h2 i { margin-right: 6px; }
ol, ul { padding-left: 22px; }
li { margin: 4px 0; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.pick a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .92rem; }
.pick a:hover { border-color: var(--blue); text-decoration: none; }
.k { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #cbd5e1; background: #fff; border-radius: 7px; padding: 0 7px; font-size: .86em; font-weight: 600; white-space: nowrap; line-height: 1.7; }
.k.primary { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.k.ok { background: #059669; border-color: #059669; color: #fff; }
.k.bad { background: #e11d48; border-color: #e11d48; color: #fff; }
.k.on { background: #eff6ff; border-color: #2563eb; color: #1e40af; }
.note, .tip, .warn { border-radius: 10px; padding: 9px 14px; margin: 10px 0; font-size: .94rem; }
.note { background: #eff6ff; border: 1px solid #bfdbfe; }
.tip { background: #ecfdf5; border: 1px solid #a7f3d0; }
.warn { background: #fffbeb; border: 1px solid #fde68a; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .88rem; margin-top: 10px; }
.flow .sep { margin-left: 10px; color: var(--muted); }
.st { display: inline-block; padding: 1px 9px; border-radius: 999px; font-weight: 600; font-size: .82rem; white-space: nowrap; }
.st.draft { background: #e2e8f0; color: #334155; } .st.cho { background: #e0f2fe; color: #075985; }
.st.pending { background: #fef3c7; color: #92400e; } .st.ok { background: #d1fae5; color: #065f46; } .st.back { background: #ffe4e6; color: #9f1239; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 8px 0; }
.tbl-wrap { overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
th { background: var(--soft); }
td.c, th.c { text-align: center; }
figure { margin: 12px 0; }
figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 10px rgba(15,23,42,.06); }
figcaption { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.toc { columns: 2; column-gap: 28px; padding-left: 20px; }
.toc li { break-inside: avoid; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 8px 0; background: #fff; }
summary { cursor: pointer; font-weight: 600; }
.foot { color: var(--muted); font-size: .9rem; margin: 24px 0 40px; }
@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  .box { padding: 14px 14px; }
  .toc { columns: 1; }
}
@media print {
  .top, .pick { display: none; }
  body { background: #fff; font-size: 12.5px; }
  .box { break-inside: avoid; border-color: #ccc; }
  a { color: inherit; }
}
.box b, .box code { overflow-wrap: anywhere; }

/* Sơ đồ quy trình (/huong-dan/nhap-lieu) */
.role { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; line-height: 1.7; }
.role.ad { background: #fee2e2; color: #991b1b; } .role.ld { background: #ede9fe; color: #5b21b6; }
.role.cs { background: #dbeafe; color: #1e40af; } .role.nl { background: #dcfce7; color: #166534; }
.stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 12px 0; counter-reset: st; }
.stage { position: relative; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.stage h3 { margin: 0 0 6px; font-size: .95rem; color: var(--accent); }
.stage h3::before { counter-increment: st; content: counter(st) ". "; }
.stage ul { margin: 0; padding-left: 16px; } .stage li { margin: 2px 0; }
.stage:not(:last-child)::after { content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: -10px; top: 46%; color: var(--muted); font-size: .8rem; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 12px; }
.chain .n { background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 4px 10px; font-size: .88rem; }
.chain .n.dm { background: #fff7ed; border-color: #fed7aa; } .chain .n.ch { background: #eff6ff; border-color: #bfdbfe; }
.chain .n.tk { background: #f5f3ff; border-color: #ddd6fe; } .chain .n.go { background: #ecfdf5; border-color: #a7f3d0; font-weight: 600; }
.chain .ar { color: var(--muted); font-size: .8rem; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; border: 1px solid #cbd5e1; }
.legend .dm::before { background: #fff7ed; border-color: #fed7aa; } .legend .ch::before { background: #eff6ff; border-color: #bfdbfe; }
.legend .tk::before { background: #f5f3ff; border-color: #ddd6fe; } .legend .go::before { background: #ecfdf5; border-color: #a7f3d0; }
.mod { border-left: 4px solid var(--blue); }
.mod.mhs { border-left-color: #0891b2; } .mod.cdh { border-left-color: #16a34a; } .mod.ttn { border-left-color: #ea580c; }
.mod.tk26 { border-left-color: #7c3aed; } .mod.knd { border-left-color: #e11d48; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 > div { min-width: 0; }
.check { list-style: none; padding-left: 0; } .check li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #059669; margin-right: 6px; }
@media (max-width: 860px) {
  .stages { grid-template-columns: 1fr; }
  .stage:not(:last-child)::after { content: "\f078"; right: auto; left: 50%; top: auto; bottom: -15px; }
  .grid2 { grid-template-columns: 1fr; }
}

/* Sơ đồ luồng dữ liệu (/huong-dan/nhap-lieu mục 2) */
svg.luong { display: block; width: 100%; min-width: 760px; height: auto; margin: 10px 0; font-family: inherit; }
.luong .cot { font-size: 12px; font-weight: 700; letter-spacing: .08em; fill: var(--muted); }
.luong .o { fill: #fff; stroke: #cbd5e1; stroke-width: 1.2; }
.luong .o.ad { fill: #fef2f2; stroke: #fecaca; } .luong .o.cs { fill: #eff6ff; stroke: #bfdbfe; } .luong .o.nl { fill: #f0fdf4; stroke: #bbf7d0; }
.luong .o.db { fill: #f8fafc; }
.luong .o.tra { fill: #fff1f2; stroke: #fecdd3; }
.luong .o.ok-vien { stroke: #6ee7b7; stroke-width: 1.5; }
.luong .nhom { fill: var(--soft); stroke: var(--line); stroke-dasharray: 5 4; }
.luong .t { font-size: 14px; font-weight: 700; fill: var(--fg); }
.luong .s { font-size: 12px; fill: #475569; }
.luong .ok-chu { fill: #047857; font-weight: 600; }
.luong .nhan { font-size: 11.5px; fill: #64748b; font-style: italic; }
.luong .mui { stroke: #64748b; stroke-width: 1.5; fill: none; }
.luong .mui.do { stroke: #be123c; } .luong .mui.net { stroke-dasharray: 4 3; }
.luong .tt.draft { fill: #e2e8f0; } .luong .tt.cho { fill: #e0f2fe; } .luong .tt.pending { fill: #fef3c7; } .luong .tt.ok { fill: #d1fae5; }
.luong .tt-c { font-size: 13.5px; font-weight: 700; text-anchor: middle; fill: #1e293b; }
.luong .tra-c { font-size: 12px; font-weight: 700; text-anchor: middle; fill: #9f1239; }
.luong .tra-s { font-size: 10.5px; text-anchor: middle; fill: #9f1239; }
@media print { svg.luong { min-width: 0; } }
.goi-y-cuon { display: none; font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 800px) { .goi-y-cuon { display: block; } }
