/* ============================================================
   THEME - nạp SAU site.css/mvc.css/app.css.
   1) Bảng màu theo theme (thẻ <html data-theme="...">, quản trị chọn ở Hệ thống > Thiết lập):
        do    : đỏ son đậm ngả nâu (mặc định)      xanh  : xanh dương đậm
      Mọi màu thương hiệu trong CSS khác đều đọc từ các biến này (var(--brand)...).
   2) Nền: hoa văn mặt trống đồng (img/trong-dong.svg, tự thiết kế) dùng làm mặt nạ (mask) → tô bằng màu theme.
   3) Độ rõ nét: chữ, viền ô nhập, nút, nhãn, bảng, trạng thái đậm hơn (tương phản ≥ 4.5:1 với chữ, ≥ 3:1 với viền).
   ============================================================ */

:root,
:root[data-theme="do"] {
  --brand: #9b1b1f;        /* đỏ son đậm (trước: #c8102e) */
  --brand-dark: #6e1215;   /* đỏ nâu */
  --brand-mid: #b8322a;
  --brand-soft: #f6e7e3;
  --brand-tint: #fbf4f1;
  --brand-line: #e2b9b1;
  --brand-rgb: 155 27 31;
  --app-bg: #f7f4ef;       /* nền giấy ấm */
  --gold: #d4a73c;         /* vàng đồng - hoa văn trống đồng */
  --gold-soft: #f3dc9b;
}
:root[data-theme="xanh"] {
  --brand: #123c6e;        /* xanh dương đậm */
  --brand-dark: #0a2547;
  --brand-mid: #2a5d9f;
  --brand-soft: #e5edf7;
  --brand-tint: #f3f7fc;
  --brand-line: #b6c9e2;
  --brand-rgb: 18 60 110;
  --app-bg: #f2f5f9;
  --gold: #d4a73c;
  --gold-soft: #f3dc9b;
}
:root {
  --ink: #0f172a;          /* chữ chính */
  --ink-2: #1e293b;        /* nhãn, chữ phụ quan trọng */
  --muted: #475569;        /* chữ phụ (trước #6b7280 quá nhạt) */
  --line: #cbd5e1;         /* đường kẻ bảng, khung */
  --line-strong: #64748b;  /* viền ô nhập (≥ 3:1 trên nền trắng) */
}

/* ---------------- Nền phần mềm ---------------- */
body { background: var(--app-bg); color: var(--ink); }
.shell:not(.shell--bare) .shell__main { position: relative; isolation: isolate; }
/* Hoa văn trống đồng mờ ở CHÍNH GIỮA vùng nội dung (cố định khi cuộn; trừ thanh trên 60px và menu trái 250px khi mở) */
.shell:not(.shell--bare) .shell__main::before {
  content: "";
  position: fixed;
  left: 50%;
  top: calc(50% + 30px);
  z-index: -1;
  width: min(760px, 86vmin);
  height: min(760px, 86vmin);
  transform: translate(-50%, -50%);
  background: var(--brand);
  -webkit-mask: url("../img/trong-dong.svg") center / contain no-repeat;
  mask: url("../img/trong-dong.svg") center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}
@media (min-width: 901px) { .sb-open .shell:not(.shell--bare) .shell__main::before { left: calc(50% + 125px); } }

/* Thanh trên: trắng → màu theme, nửa mặt trống đồng vàng đồng ở mép phải */
.shell__header { background: linear-gradient(90deg, #fff 0%, #fff 44%, var(--brand-mid) 72%, var(--brand-dark) 100%); }
.shell__ornament { position: absolute; top: 0; right: 0; width: 520px; height: 100%; overflow: hidden; pointer-events: none; z-index: 0; }
.shell__ornament::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -150px;
  width: 440px;
  height: 440px;
  transform: translateY(-50%);
  background: var(--gold);
  -webkit-mask: url("../img/trong-dong.svg") center / contain no-repeat;
  mask: url("../img/trong-dong.svg") center / contain no-repeat;
  opacity: 0.32;
}
.shell__header > :not(.shell__ornament):not(.shell__progress) { position: relative; z-index: 1; }
@media (max-width: 600px) { .shell__ornament { width: 260px; } }

/* Thanh bên */
.shell__sidebar { border-right: 1px solid var(--line); }
.shell__group { color: var(--brand-dark); font-weight: 700; letter-spacing: .02em; }
.shell__link { color: var(--ink-2); font-weight: 500; }
.shell__link .shell__icon { color: var(--brand); }
.shell__link.is-active .shell__icon { color: #fff; }

/* ---------------- Trang đăng nhập ---------------- */
.shell--bare .shell__main { padding: 0; }
.login {
  padding: 84px 16px 40px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 38%, rgb(255 255 255 / 10%) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 40%, var(--brand-mid) 0%, var(--brand) 45%, var(--brand-dark) 100%);
}
.login::before, .login::after { /* dải hoa văn răng cưa vàng đồng trên, dưới */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background:
    linear-gradient(135deg, var(--gold) 25%, transparent 25%) 0 0 / 14px 14px repeat-x,
    linear-gradient(225deg, var(--gold) 25%, transparent 25%) 0 0 / 14px 14px repeat-x;
  opacity: .55;
  z-index: 0;
}
.login::before { top: 0; }
.login::after { bottom: 0; transform: scaleY(-1); }
.login__drum {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: max(120vmin, 860px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: var(--gold);
  -webkit-mask: url("../img/trong-dong.svg") center / contain no-repeat;
  mask: url("../img/trong-dong.svg") center / contain no-repeat;
  opacity: 0.2;
  animation: trong-dong-xoay 480s linear infinite;
}
@keyframes trong-dong-xoay { to { transform: translate(-50%, -50%) rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .login__drum { animation: none; } }
.login__wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 440px; }
.login__brand { text-align: center; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / 35%); }
.login__emblem {
  display: inline-flex; align-items: center; justify-content: center;
  width: 78px; height: 78px; margin-bottom: 10px;
  border-radius: 50%;
  background: #c8102e;     /* nền đỏ sao vàng - giữ màu cờ ở mọi theme */
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 6px rgb(255 255 255 / 12%), 0 6px 18px rgb(0 0 0 / 30%);
  color: #ffdd55;
  font-size: 40px;
  line-height: 1;
}
.login__org { color: var(--gold-soft); font-size: .92rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.login__app { margin-top: 4px; font-size: 1.12rem; font-weight: 800; line-height: 1.35; letter-spacing: .02em; text-transform: uppercase; }
.login__box { max-width: none; border-top: 5px solid var(--gold); box-shadow: 0 24px 60px rgb(0 0 0 / 35%); }
.login__box h1 { color: var(--brand-dark); }
.login__foot { color: rgb(255 255 255 / 80%); font-size: .8rem; text-align: center; }

/* ---------------- Độ rõ nét: ô nhập, nút, nhãn ---------------- */
.muted { color: var(--muted); }
.input {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-weight: 500;
  background: #fff;
}
.input:hover:not(:disabled):not(:focus) { border-color: #334155; }
.input:focus { outline: 3px solid rgb(var(--brand-rgb) / 0.22); outline-offset: 0; border-color: var(--brand); }
.input::placeholder { color: #9aa5b4; font-weight: 400; }
/* Ô đã khóa (hồ sơ đã nộp...) vẫn đọc rõ số liệu */
.input:disabled, .input[readonly] {
  background: #eef1f5;
  border-color: #94a3b8;
  color: var(--ink-2);
  -webkit-text-fill-color: var(--ink-2);
  opacity: 1;
}
/* Chữ gợi ý trong ô khóa: nhạt hẳn để không lẫn với số liệu thật (text-fill-color ở trên áp cả vào placeholder) */
.input:disabled::placeholder, .input[readonly]::placeholder { color: #b8c0cc; -webkit-text-fill-color: #b8c0cc; }
.input--error, .input-validation-error, .input[aria-invalid="true"] { border-color: #b91c1c !important; border-width: 2px; }
.field > span, .field-label { color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.check-line { color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--brand); }

.btn { font-weight: 600; }
.btn:focus-visible { outline: 3px solid rgb(var(--brand-rgb) / 0.35); outline-offset: 2px; }
.btn--primary { background: var(--brand); box-shadow: 0 1px 2px rgb(15 23 42 / 20%); }
.btn--primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn--outline { border-width: 1.5px; }
.btn--ghost { color: var(--ink); border-color: #94a3b8; }
.btn--ghost:hover:not(:disabled) { border-color: #475569; background: #eef1f5; }
.btn--danger { color: #991b1b; border-color: #f87171; }
.btn:disabled { opacity: .6; }
.link-btn { font-weight: 600; }

/* ---------------- Thông tin quan trọng: bảng, thẻ số liệu, trạng thái ---------------- */
.panel { border-color: #d5dbe3; box-shadow: 0 1px 2px rgb(15 23 42 / 5%); }
.panel h2 { color: var(--brand-dark); }
.page-head h1 { color: var(--ink); }
.table th { background: #e9edf2; color: var(--ink); border-bottom: 2px solid var(--brand-line); }
.table th, .table td { border-bottom-color: #d5dbe3; }
.table td { color: var(--ink); }
.table tbody tr:hover { background: var(--brand-tint); }
.stat { border-color: #d5dbe3; border-left-color: var(--brand); }
.stat__value { color: var(--brand); }
.stat__label { color: var(--ink-2); font-weight: 500; }
.status { font-weight: 700; box-shadow: inset 0 0 0 1px currentColor; }
.status--ok, .status--published { background: #dcfce7; color: #14532d; }
.status--wait { background: #dbeafe; color: #1e3a8a; }
.status--draft { background: #fef3c7; color: #78350f; }
.status--off { background: #fee2e2; color: #7f1d1d; }
/* Nút mở khóa (tài khoản đang khóa / tạm khóa): luôn hiện màu xanh để thấy ngay trạng thái */
.icon-btn--ok { color: #15803d; }
.icon-btn--ok:hover { background: #dcfce7; color: #14532d; }
.table tr.is-tam-khoa > td { background: #fffbeb; }
.table .status { white-space: nowrap; }
.tabs { border-bottom-color: var(--line); }
.tabs__item { color: #334155; }
.tabs__item.is-active { font-weight: 700; }
.seg { border-color: #94a3b8; }
.seg__btn { color: var(--ink-2); font-weight: 500; }
.seg__btn.is-active { background: var(--brand); font-weight: 700; }
.alert--error { border-width: 1px; font-weight: 500; }
.chart__tick { fill: #475569; }
.chart__label { fill: var(--ink-2); }

/* Chấm điểm: kết quả, điểm, nhãn tiêu chí */
.cd-leaf { border-color: #d5dbe3; }
.cd-block__title { color: #334155; }
.cd-kq.is-ok { color: #14532d; }
.cd-kq.is-err { color: #7f1d1d; }
.cd-kq.is-warn, .cd-chip.is-warn { color: #7c2d12; }
.cd-chip { box-shadow: inset 0 0 0 1px rgb(15 23 42 / 12%); }
.cd-max { color: #475569; }
.cd-save { color: #475569; }
.cd-save.is-ok { color: #15803d; font-weight: 600; }
.cd-save.is-err { color: #b91c1c; font-weight: 600; }
/* Mục cấp 1 (A, B): màu theme sáng dần sang phải - không quá tối */
.cd-sec--c1 > .cd-sec__head { background: linear-gradient(90deg, var(--brand) 0%, var(--brand-mid) 100%); }
.cd-sec--c2 > .cd-sec__head { background: var(--brand-soft); color: var(--brand-dark); }
.cd-sum__label { color: #334155; }
.tk-table--heat td.tk-heat { font-weight: 600; }

/* Cấu hình bộ tiêu chí: xem trước các bậc / các mức quy ra điểm */
.thang-xem { margin: 6px 0 0; padding: 0; list-style: none; font-size: .85rem; }
.thang-xem li { padding: 2px 0 2px 16px; position: relative; color: #14532d; }
.thang-xem li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; }
.thang-xem li.is-err { color: #b91c1c; font-weight: 600; }
.thang-xem li.is-err::before { content: "✗"; }
.thang-xem li.is-note { color: var(--brand-dark); font-weight: 600; }
.thang-xem li.is-note::before { content: "ℹ"; }

/* Báo cáo hồ sơ (cột phải trang chấm điểm) */
.cd-bc h2 { font-size: 1rem; }
.cd-bc__ghi { margin: 2px 0 6px; }
.cd-bc__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.cd-bc__list li a { font-weight: 600; word-break: break-word; }
.cd-bc__buoc { margin: 8px 0 0; padding-left: 18px; }
.check-line.is-locked { cursor: default; }
.check-line.is-locked input { opacity: 1; }

/* Đếm ngược hạn (thanh trên + trên trang) */
.hanchot { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgb(255 255 255 / 92%); color: var(--ink); font-size: .82rem; white-space: nowrap; box-shadow: 0 1px 4px rgb(0 0 0 / 18%); }
.hanchot__tg { font-variant-numeric: tabular-nums; font-size: .9rem; }
.hanchot--warn { background: #fef3c7; color: #78350f; }
.hanchot--danger { background: #fee2e2; color: #7f1d1d; animation: hanchot-nhay 2s ease-in-out infinite; }
.hanchot--het { background: #e5e7eb; color: #374151; }
@keyframes hanchot-nhay { 50% { box-shadow: 0 0 0 4px rgb(220 38 38 / 25%); } }
@media (prefers-reduced-motion: reduce) { .hanchot--danger { animation: none; } }
@media (max-width: 700px) { .hanchot__nhan { display: none; } .hanchot { padding: 4px 8px; } }
.dem { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-style: normal; font-size: .76rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dem--info { background: #e0f2fe; color: #075985; }
.dem--warn { background: #fef3c7; color: #78350f; }
.dem--danger { background: #fee2e2; color: #991b1b; }
.dem--het { background: #e5e7eb; color: #374151; }
.bell__item--nhacnho .bell__text::before { content: "⏰ "; }
.bell__foot--mt { justify-content: center; padding-top: 6px; }

/* Nộp kết quả, mở lại / gia hạn */
.hint-bar { margin: 0 0 14px; padding: 9px 14px; border-radius: 6px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-weight: 500; }
#nutNop:disabled { background: #94a3b8; border-color: #94a3b8; color: #fff; opacity: 1; cursor: not-allowed; }
.molai { position: relative; }
.molai > summary { list-style: none; cursor: pointer; }
.molai > summary::-webkit-details-marker { display: none; }
.molai__form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(380px, 90vw); margin: 0; box-shadow: 0 10px 30px rgb(15 23 42 / 18%); }
.timeline li.is-giahan strong { color: var(--brand-dark); }

/* Phân công thẩm định */
.pc-chon { max-width: 720px; }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pc-nhanh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 6px 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--brand-tint); border: 1px solid var(--brand-line); }
.pc-nhanh .check-line { margin: 0; }
.pc-nhanh .input { width: auto; max-width: 320px; }
.pc-bo { margin: 18px 0 8px; font-size: 1rem; color: var(--brand-dark); }
.pc-table select { min-width: 260px; }
.pc-table tr.is-trong td { background: #fff7ed; }
.pc-cuatoi > summary { cursor: pointer; }
.pc-cuatoi__ds { margin: 10px 0 0; padding-left: 18px; columns: 2; font-size: .9rem; }
@media (max-width: 900px) { .pc-cuatoi__ds { columns: 1; } }
.tag-giahan { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px; background: #fef3c7; color: #78350f; font-size: .76rem; font-weight: 700; }

/* Trang Thiết lập: mẫu màu theme */
.theme-sw { display: flex; height: 54px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(15 23 42 / 12%); }
.theme-sw i { flex: 1; }

/* ---------------- Chân trang ---------------- */
.footer { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 36px; padding: 14px 0 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; line-height: 1.45; }
.footer__logo { flex: none; width: 48px; height: 48px; object-fit: contain; }
.footer strong { color: var(--ink-2); }
.footer__meta { font-size: .8rem; }
.footer--dark { margin-top: 4px; border-top-color: rgb(255 255 255 / 25%); color: rgb(255 255 255 / 88%); text-shadow: 0 1px 2px rgb(0 0 0 / 30%); }
.footer--dark strong { color: #fff; }
.footer--dark .footer__logo { padding: 3px; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 25%); }
.login__remember { margin: 2px 0 16px; font-size: .9rem; }
@media (max-width: 600px) { .footer { flex-direction: column; text-align: center; } }

@media print {
  .footer--dark { display: none; }
  .shell__main::before, .shell__ornament, .login__drum { display: none !important; }
  body { background: #fff; }
}

.cd-bc__khoa { margin: 8px 0 0; padding: 8px 10px; border-radius: 6px; background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; }

/* ---------------- Văn bản - Tài liệu ---------------- */
.vb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vb { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vb.is-ghim { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); }
.vb.is-an { opacity: .65; background: #f8fafc; }
.vb__icon { flex: none; display: grid; place-items: center; width: 46px; height: 54px; border-radius: 6px; background: #64748b; color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .02em; text-decoration: none; }
.vb__icon--pdf { background: #b91c1c; }
.vb__icon--w { background: #1d4ed8; font-size: 1.1rem; }
.vb__icon--x { background: #15803d; font-size: 1.1rem; }
.vb__icon--p { background: #c2410c; font-size: 1.1rem; }
.vb__icon--img { background: #7c3aed; }
.vb__icon--zip { background: #92400e; }
.vb__body { flex: 1; min-width: 0; }
.vb__title { display: block; font-weight: 700; font-size: 1rem; color: var(--ink); text-decoration: none; line-height: 1.4; }
.vb__title:hover { color: var(--brand); text-decoration: underline; }
.vb__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 5px; font-size: .86rem; color: var(--ink-2); }
.vb__mota { margin: 6px 0 0; font-size: .9rem; color: var(--ink-2); white-space: pre-line; }
.vb__file { margin-top: 6px; overflow-wrap: anywhere; }
.vb__actions { flex: none; display: flex; gap: 6px; align-items: center; }
.tag--ghim { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.tag--an { margin-left: 6px; border-color: #cbd5e1; background: #f1f5f9; color: #475569; }
.vb-trong { text-align: center; }
@media (max-width: 700px) {
  .vb { flex-wrap: wrap; }
  .vb__actions { width: 100%; justify-content: flex-end; }
}

/* ---------------- Trợ lý ảo (js/trogiup.js) ---------------- */
.tl-nut { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 10px;
  border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgb(15 23 42 / 28%); transition: transform .15s, background .15s; }
.tl-nut:hover { transform: translateY(-2px); background: var(--brand-dark); }
.tl-nut:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }
.tl-nut__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--brand); font-weight: 800; }
.tl-nut.is-mo { opacity: .85; }
.tl { position: fixed; right: 18px; bottom: 74px; z-index: 900; display: flex; flex-direction: column; width: min(400px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 110px)); border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 16px 40px rgb(15 23 42 / 28%); overflow: hidden; }
.tl[hidden] { display: none; }
.tl__dau { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--brand); color: #fff; }
.tl__tieude { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.tl__phu { font-size: .78rem; opacity: .9; }
.tl__dong { border: 0; background: transparent; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.tl__dong:hover { background: rgb(255 255 255 / 18%); }
.tl__than { flex: 1; overflow-y: auto; padding: 12px; background: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.tl-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.tl-msg p { margin: 0 0 6px; } .tl-msg p:last-child { margin-bottom: 0; }
.tl-msg ul { margin: 4px 0 6px; padding-left: 18px; }
.tl-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.tl-msg--toi { align-self: flex-end; background: var(--brand); color: #fff; }
.tl-tl__hoi { margin-bottom: 6px; font-weight: 700; color: var(--brand-dark); }
.tl-han { margin-top: 8px; padding: 6px 8px; border-radius: 6px; background: #fef3c7; color: #78350f; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tl-chips__tieude { width: 100%; font-size: .78rem; color: var(--muted); }
.tl-chip { padding: 5px 10px; border: 1px solid var(--brand); border-radius: 999px; background: #fff; color: var(--brand-dark); font: inherit; font-size: .8rem; text-align: left; cursor: pointer; }
.tl-chip:hover { background: var(--brand-soft); }
.tl__form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.tl__o { flex: 1; min-width: 0; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
.tl__o:focus { outline: none; border-color: var(--brand); }
.tl__gui { padding: 8px 14px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 600px) { .tl-nut__chu { display: none; } .tl-nut { padding: 8px; } .tl { right: 12px; bottom: 66px; } }

/* ---------------- Trang Hướng dẫn sử dụng ---------------- */
.hd__nut { display: flex; gap: 8px; }
.hd-in-tieude { display: none; }
.hd-phan h2, .hd-hoidap h2 { margin: 0 0 10px; font-size: 1.1rem; color: var(--brand-dark); }
.hd-buoc { margin: 0; padding-left: 22px; display: grid; gap: 8px; line-height: 1.55; }
.hd-hoidap__dau { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.hd-tim { min-width: min(420px, 100%); }
.hd-nhom h3 { margin: 16px 0 6px; font-size: .95rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .02em; }
.hd-muc { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: #fff; }
.hd-muc > summary { padding: 9px 12px; cursor: pointer; font-weight: 600; color: var(--ink); }
.hd-muc[open] > summary { color: var(--brand-dark); border-bottom: 1px solid var(--line); }
.hd-muc__dap { padding: 8px 14px 4px; line-height: 1.55; }
.hd-muc__dap p { margin: 0 0 8px; } .hd-muc__dap ul { margin: 0 0 8px; padding-left: 20px; }
.hd-lienhe { margin-top: 14px; }
@media print {
  .tl-nut, .tl, .hd__nut, .hd-tim, .shell__sidebar, .shell__header, .toast-container { display: none !important; }
  .hd-in-tieude { display: block; margin: 0 0 10px; font-weight: 700; font-size: 1rem; text-align: center; }
  .hd .page__head { display: none; }
  .hd-muc { break-inside: avoid; border: 0; border-bottom: 1px solid #ddd; border-radius: 0; }
  .hd-muc > summary { padding: 6px 0; list-style: none; } .hd-muc > summary::-webkit-details-marker { display: none; }
  .hd-muc__dap { padding: 0 0 6px; }
  .panel { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
}

/* ---------------- Minh chứng nhiều tệp, giải trình dài, chọn giao diện ---------------- */
.cd-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 6px; border-radius: 999px; background: #e0f2fe; color: #075985;
  font-size: .78rem; font-weight: 700; white-space: nowrap; }
.cd-badge[hidden] { display: none; }
.cd-badge svg { width: 13px; height: 13px; }
.cd-leaf__head .cd-badge { margin-left: auto; }
.cd-files__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 4px; }
.cd-files__title { font-weight: 700; font-size: .86rem; color: var(--ink-2); }
.cd-files__list { list-style: decimal; padding-left: 22px; }
.cd-file { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed #e2e8f0; }
.cd-file:last-child { border-bottom: 0; }
.cd-files__list { counter-reset: mc; list-style: none; padding-left: 0; }
.cd-file { counter-increment: mc; }
.cd-file::before { content: counter(mc) "."; flex: none; min-width: 22px; text-align: right; color: var(--muted); font-size: .82rem; }
.cd-file__ten { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cd-file__kt { white-space: nowrap; }
.cd-file__nut { display: inline-flex; gap: 2px; }
.cd-file__nut .link-btn { min-width: 24px; padding: 0 4px; font-weight: 700; }
.cd-files.is-sua .cd-file { cursor: grab; }
.cd-file.is-keo { opacity: .45; background: var(--brand-soft); }
.cd-files__list:has(li) + .cd-files__trong { display: none; }
.cd-files__trong { margin: 4px 0; }
/* Icon kiểu tệp */
.ft { flex: none; display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 4px; border-radius: 4px; background: #64748b;
  color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.ft--pdf { background: #b91c1c; } .ft--w { background: #1d4ed8; font-size: .8rem; } .ft--x { background: #15803d; font-size: .8rem; }
.ft--p { background: #c2410c; font-size: .8rem; } .ft--img { background: #7c3aed; } .ft--zip { background: #92400e; } .ft--txt { background: #475569; }
/* Nút tóm tắt minh chứng trên trang */
.cd-mc { margin-top: 8px; }
.cd-mc__nut { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; max-width: 100%; padding: 6px 12px; border: 1.5px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: .86rem; cursor: pointer; text-align: left; }
.cd-mc__nut:hover, .cd-mc__nut:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.cd-mc__nut svg { width: 16px; height: 16px; color: var(--brand); }
.cd-mc__chu { font-weight: 700; }
.cd-mc__so { color: var(--muted); }
.cd-mc__loai { display: inline-flex; gap: 3px; }
.cd-mc__loai .ft { min-width: 22px; height: 18px; font-size: .55rem; }
.cd-mc__loai .ft--w, .cd-mc__loai .ft--x, .cd-mc__loai .ft--p { font-size: .7rem; }
.mc-modal { width: min(760px, calc(100vw - 32px)); }
.mc-modal .cd-files__head { justify-content: space-between; align-items: center; }
.cd-drop { display: block; margin-top: 6px; padding: 10px 12px; border: 2px dashed #cbd5e1; border-radius: 8px; background: #f8fafc; cursor: pointer; line-height: 1.45; }
.cd-drop:hover, .cd-drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.cd-drop strong { color: var(--brand-dark); }
.cd-drop__tiendo { display: block; font-size: .8rem; color: #075985; font-weight: 600; }
.cd-files.is-busy .cd-drop { pointer-events: none; opacity: .7; }
.cd-gt__dem { font-weight: 400; font-size: .76rem; color: var(--muted); }
.cd-gt__dem.is-gan { color: #b45309; font-weight: 700; }
.cd-gt textarea { resize: vertical; min-height: 56px; max-height: 480px; overflow-y: auto; }
.cd-ui-chon { display: inline-flex; align-items: center; gap: 0; margin-right: auto; }
.cd-ui-chon > span { margin-right: 6px; }
.cd-ui-chon__nut { padding: 4px 10px; border: 1.5px solid var(--brand); background: #fff; color: var(--brand-dark); font: inherit; font-size: .82rem; cursor: pointer; }
.cd-ui-chon__nut:first-of-type { border-radius: 6px 0 0 6px; }
.cd-ui-chon__nut:last-of-type { border-radius: 0 6px 6px 0; border-left: 0; }
.cd-ui-chon__nut.is-active { background: var(--brand); color: #fff; font-weight: 700; }
@media (max-width: 700px) { .cd-ui-chon { width: 100%; } .cd-ui-chon__nut { flex: 1; } }

/* Phân công thẩm định - xem theo người (cây tiêu chí trong hộp thoại) */
.pc-kieu { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.pc-kieu .seg__btn { text-decoration: none; }
.pc-canhbao ul { margin: 6px 0 0; padding-left: 18px; }
.pcn-ds { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.pcn-the { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pcn-the:hover { border-color: var(--brand); box-shadow: 0 4px 12px rgb(0 0 0 / 8%); }
.pcn-the__ten { font-weight: 700; }
.pcn-the__so { color: #4b5563; font-size: .9rem; }
.pcn-the__nut { margin-top: 6px; }
.pcn-chua { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; }
.pcn-chua > summary { cursor: pointer; }
.pcn-chua ul { margin: 8px 0 0; padding-left: 18px; columns: 2; font-size: .9rem; }
@media (max-width: 900px) { .pcn-chua ul { columns: 1; } }
.pcn-modal { width: min(1100px, calc(100vw - 32px)); height: calc(100vh - 48px); }
.pcn-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 18px; border-bottom: 1px solid #f3f4f6; background: #fafafa; }
.pcn-loc .input { width: 300px; max-width: 100%; }
.pcn-loc .check-line { margin: 0; }
.pcn-chu { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.pcn-cay, .pcn-cay ul { list-style: none; margin: 0; padding: 0; }
.pcn-cay ul { padding-left: 22px; border-left: 1px dashed #e5e7eb; margin-left: 11px; }
.pcn-cay + .pcn-cay { margin-top: 8px; }
.pcn-muc:not(.is-mo) > ul { display: none; }
.pcn-dong { display: flex; align-items: flex-start; gap: 4px; padding: 3px 0; }
.pcn-dong label, .pcn-la label { display: flex; align-items: baseline; gap: 6px; flex: 1; cursor: pointer; line-height: 1.45; }
.pcn-dong label { font-weight: 600; }
.pcn-muc--bo > .pcn-dong label { color: var(--brand-dark); font-size: 1rem; }
.pcn-mo { flex: none; width: 22px; height: 22px; border: 0; border-radius: 4px; background: transparent; color: #6b7280; cursor: pointer; transition: transform .15s; }
.pcn-mo:hover { background: #f3f4f6; }
.pcn-muc.is-mo > .pcn-dong .pcn-mo { transform: rotate(90deg); }
.pcn-la { padding: 3px 6px 3px 26px; border-radius: 6px; }
.pcn-la:hover { background: #f9fafb; }
.pcn-la input, .pcn-dong input { flex: none; position: relative; top: 2px; }
.pcn-ma { flex: none; font-weight: 700; color: var(--brand-dark); }
.pcn-ten { flex: 1; min-width: 0; }
.pcn-diem { flex: none; color: #6b7280; font-size: .85rem; }
.pcn-la.is-khac .pcn-ten { color: #6b7280; }
.pcn-tag:empty { display: none; }
.pcn-tag { flex: none; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; background: #f3f4f6; color: #374151; }
.pcn-tag--moi { background: #dcfce7; color: #166534; }
.pcn-tag--khac { background: #fef3c7; color: #92400e; }
.pcn-tag--chuyen { background: #fee2e2; color: #991b1b; }
.pcn-tag--bo { background: #e5e7eb; color: #374151; text-decoration: line-through; }
.pcn-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid #f3f4f6; }
.pcn-canh { color: #b91c1c; font-weight: 600; }
@media (max-width: 700px) { .pcn-chu { display: none; } .pcn-la { padding-left: 8px; } .pcn-tag { white-space: normal; } }

/* Hộp thoại chấm có 2 cột (tự chấm | thẩm định): mở rộng để người thẩm định đọc đủ số liệu, giải trình bên tự chấm cạnh phần thẩm định */
.cd-modal:has(.cd-cols--2) { width: min(1400px, calc(100vw - 32px)); }
.cd-modal .cd-cols--2 .cd-gt textarea { max-height: 55vh; }

/* Khung báo lỗi tải tệp (cố định đến khi đóng; kèm cách giảm dung lượng) */
.tep-loi { margin-top: 8px; padding: 10px 12px; border: 1px solid #fecaca; border-left: 4px solid #dc2626; border-radius: 8px; background: #fef2f2; color: #7f1d1d; font-size: .88rem; line-height: 1.5; }
.tep-loi__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tep-loi ul { margin: 6px 0 0; padding-left: 18px; }
.tep-loi li + li { margin-top: 6px; }
.tep-loi__goiy { margin-top: 2px; color: #374151; }
.tep-loi__nen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.tep-loi__tt { color: #1f2937; }
.tep-loi li.is-xong > strong { text-decoration: line-through; opacity: .7; }
