/* ==========================================================
   TTHT · Điểm khuyến khích — design tokens
   Navy + VNPT blue, teal cho khen thưởng, coral cho giảm trừ
   ========================================================== */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef1f7;
  --ink: #0d1628;
  --ink-2: #3a4559;
  --muted: #6b768a;
  --line: #e3e7ef;
  --line-strong: #cfd6e3;

  --primary: #1a5cff;
  --primary-ink: #ffffff;
  --primary-soft: #e8efff;
  --primary-strong: #0f47d6;

  --good: #0e9f8a;
  --good-soft: #e1f6f2;
  --bad: #e2453c;
  --bad-soft: #fdecea;
  --warn: #c98200;
  --warn-soft: #fff4dc;
  --violet: #6d4cff;
  --violet-soft: #efeaff;

  --side-bg: #0a1430;
  --side-ink: #c4cde3;
  --side-ink-strong: #ffffff;
  --side-hover: rgba(255,255,255,.06);
  --side-active: linear-gradient(90deg, rgba(26,92,255,.95), rgba(76,130,255,.85));

  --shadow-sm: 0 1px 2px rgba(13,22,40,.05);
  --shadow: 0 1px 2px rgba(13,22,40,.04), 0 6px 24px -8px rgba(13,22,40,.10);
  --shadow-lg: 0 24px 60px -20px rgba(13,22,40,.35);
  --radius: 14px;
  --radius-sm: 9px;

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070c19; --surface: #0e1629; --surface-2: #111b31; --surface-3: #17223b;
    --ink: #e8ecf5; --ink-2: #b8c1d4; --muted: #8592ab; --line: #1e2a44; --line-strong: #2a3854;
    --primary: #4d82ff; --primary-soft: rgba(77,130,255,.14); --primary-strong: #6f9bff;
    --good: #2ec4ab; --good-soft: rgba(46,196,171,.13); --bad: #ff6b61; --bad-soft: rgba(255,107,97,.13);
    --warn: #f0b23a; --warn-soft: rgba(240,178,58,.13); --violet: #9b85ff; --violet-soft: rgba(155,133,255,.14);
    --side-bg: #050a17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px -10px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070c19; --surface: #0e1629; --surface-2: #111b31; --surface-3: #17223b;
  --ink: #e8ecf5; --ink-2: #b8c1d4; --muted: #8592ab; --line: #1e2a44; --line-strong: #2a3854;
  --primary: #4d82ff; --primary-soft: rgba(77,130,255,.14); --primary-strong: #6f9bff;
  --good: #2ec4ab; --good-soft: rgba(46,196,171,.13); --bad: #ff6b61; --bad-soft: rgba(255,107,97,.13);
  --warn: #f0b23a; --warn-soft: rgba(240,178,58,.13); --violet: #9b85ff; --violet-soft: rgba(155,133,255,.14);
  --side-bg: #050a17;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px -10px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
[hidden] { display: none !important; }

/* ---------- Icons ---------- */
i[data-ico] { display: inline-flex; width: 18px; height: 18px; flex: none; }
i[data-ico] svg { width: 100%; height: 100%; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 18px 14px;
  background-image: radial-gradient(120% 50% at 0% 0%, rgba(26,92,255,.22), transparent 60%);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 6px 8px 22px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #1a5cff, #00b2ff); box-shadow: 0 8px 20px -6px rgba(26,92,255,.7);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: var(--side-ink-strong); font-size: 15px; font-weight: 700; }
.brand-text span { font-size: 11.5px; color: #8d99b8; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #5f6c8c; padding: 16px 12px 6px; font-weight: 600; }
.nav a, .foot-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--side-ink); font-weight: 500; font-size: 13.5px; border: 0; background: none; cursor: pointer; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav a:hover, .foot-link:hover { background: var(--side-hover); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; box-shadow: 0 6px 18px -8px rgba(26,92,255,.8); }
.nav-badge { margin-left: auto; background: #ff6b61; color: #fff; font-size: 11px; border-radius: 99px; padding: 1px 7px; font-weight: 700; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.07); padding-top: 10px; margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 16px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 20px; font-weight: 700; }
.topbar-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.month-pick {
  display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; height: 38px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
}
.month-pick select { border: 0; background: transparent; height: 36px; font-weight: 600; color: var(--ink); outline: none; cursor: pointer; }
.status-pill {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.status-pill.live .dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.status-pill.err .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.view { padding: 26px 32px 60px; max-width: 1480px; width: 100%; }
.mobile-only, .icon-btn.mobile-only { display: none; }

/* ---------- Primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-h h3 { font-size: 15px; font-weight: 700; }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-h .spacer { flex: 1; }
.card-b { padding: 18px 20px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px var(--primary); }
.btn.primary:hover { background: var(--primary-strong); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field > small { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  height: 40px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 0 12px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search { position: relative; flex: 1; min-width: 200px; }
.search i { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search .input { padding-left: 38px; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.blue { background: var(--primary-soft); color: var(--primary); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }

/* ---------- KPI ---------- */
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .k-label { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .k-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.kpi .k-ico i { width: 16px; height: 16px; }
.kpi .k-val { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin-top: 12px; line-height: 1.1; }
.kpi .k-val small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi .k-foot { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.delta { font-weight: 700; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.kpi.hero { background: linear-gradient(140deg, #0f2a7a 0%, #1a5cff 60%, #2fa6ff 100%); color: #fff; border: 0; }
.kpi.hero .k-label, .kpi.hero .k-foot, .kpi.hero .k-val small { color: rgba(255,255,255,.78); }
.kpi.hero .k-ico { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700;
  padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-strong); }
.tbl td.reason { max-width: 520px; color: var(--ink-2); }
.person { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none;
  background: var(--primary-soft); color: var(--primary);
}
.person b { font-weight: 600; display: block; line-height: 1.25; }
.person small { color: var(--muted); font-size: 11.5px; }
.heat { display: block; text-align: right; padding: 4px 8px; border-radius: 6px; font-weight: 600; }
.bar-cell { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 7px; background: var(--surface-3); border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #3fb6ff); }
.bar.over > span { background: linear-gradient(90deg, var(--warn), var(--bad)); }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty i { width: 40px; height: 40px; color: var(--line-strong); margin-bottom: 8px; }

/* ---------- Charts ---------- */
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 230px; }

/* ---------- Ranking ---------- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.podium .pod { padding: 22px; text-align: left; position: relative; overflow: hidden; }
.pod .rank { position: absolute; right: 16px; top: 8px; font-size: 64px; font-weight: 800; line-height: 1; opacity: .09; }
.pod .medal { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 16px; }
.pod.r1 .medal { background: linear-gradient(135deg, #f7b500, #ff8a00); }
.pod.r2 .medal { background: linear-gradient(135deg, #9aa7bd, #6b7a94); }
.pod.r3 .medal { background: linear-gradient(135deg, #d98c5f, #b0603a); }
.pod h4 { margin-top: 14px; font-size: 17px; }
.pod .team { color: var(--muted); font-size: 12.5px; }
.pod .stats { display: flex; gap: 18px; margin-top: 14px; }
.pod .stats div b { display: block; font-size: 19px; font-weight: 800; }
.pod .stats div span { font-size: 11.5px; color: var(--muted); }
.spark { display: inline-flex; gap: 3px; align-items: flex-end; height: 22px; }
.spark span { width: 6px; border-radius: 2px; background: var(--primary); opacity: .85; }
.spark span.zero { background: var(--line-strong); height: 3px !important; }

/* ---------- Duplicates ---------- */
.dup { padding: 16px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
.dup:last-child { border-bottom: 0; }
.dup-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.dup-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.dup-item .meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.dup-sim { display: grid; place-items: center; text-align: center; min-width: 64px; }
.dup-sim b { font-size: 18px; font-weight: 800; }
.dup-sim small { font-size: 11px; color: var(--muted); }
mark.hl { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- Document preview ---------- */
.doc-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.doc-side { position: sticky; top: 90px; }
.paper-wrap { background: var(--surface-3); border-radius: var(--radius); padding: 20px; overflow: auto; border: 1px solid var(--line); }
.paper {
  background: #fff; color: #000; width: 210mm; max-width: 100%; margin: 0 auto; padding: 17mm 23mm 16mm 25mm;
  font-family: "Times New Roman", Times, serif; font-size: 13pt; line-height: 1.35; box-shadow: var(--shadow-lg);
}
.paper table { border-collapse: collapse; width: 100%; }
.paper .bordered td, .paper .bordered th { border: 1px solid #000; padding: 3pt 5pt; font-size: 12pt; vertical-align: middle; }
.paper .bordered th { font-weight: bold; text-align: center; }
.paper p { margin: 0 0 5pt; text-align: justify; }
.paper [contenteditable]:hover { outline: 1px dashed #7aa2ff; }
.paper [contenteditable]:focus { outline: 2px solid #1a5cff; background: #f2f6ff; }

/* ---------- Upload ---------- */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 34px; text-align: center; background: var(--surface-2);
  transition: all .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone i { width: 38px; height: 38px; color: var(--primary); }
.dropzone h4 { margin-top: 10px; font-size: 15px; }
.file-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; flex: none; }
.file-ico.docx { background: #2b6cf6; } .file-ico.pdf { background: #e2453c; } .file-ico.xlsx { background: #12a05c; } .file-ico.other { background: #6b768a; }

/* ---------- Alerts / misc ---------- */
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: 11px; font-size: 13px; align-items: flex-start; }
.alert i { margin-top: 1px; }
.alert.warn { background: var(--warn-soft); color: var(--ink); } .alert.warn i { color: var(--warn); }
.alert.info { background: var(--primary-soft); } .alert.info i { color: var(--primary); }
.alert.bad { background: var(--bad-soft); } .alert.bad i { color: var(--bad); }
.alert.good { background: var(--good-soft); } .alert.good i { color: var(--good); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; gap: 12px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.rank-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-3); color: var(--ink-2); flex: none; }
.rank-n.top { background: var(--primary); color: #fff; }

.suggest { display: flex; flex-direction: column; gap: 8px; }
.suggest .s-item { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; background: var(--surface-2); }

/* ---------- Toast & modal ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 11px; box-shadow: var(--shadow-lg); font-weight: 500; font-size: 13px; max-width: 380px; animation: tin .25s ease; display: flex; gap: 10px; align-items: center; }
.toast.err { background: var(--bad); color: #fff; } .toast.ok { background: var(--good); color: #fff; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }
.modal { border: 0; border-radius: 16px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(5,10,23,.55); backdrop-filter: blur(3px); }
.modal-inner { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-inner h3 { font-size: 17px; }
.scrim { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .doc-layout { grid-template-columns: 1fr; }
  .doc-side { position: static; }
  .dup { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 270px; transform: translateX(-100%); transition: transform .25s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(5,10,23,.5); z-index: 50; }
  .mobile-only, .icon-btn.mobile-only { display: grid; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar-title p { display: none; }
  .view { padding: 18px 16px 50px; }
  .g-3, .g-2, .podium { grid-template-columns: 1fr; }
  .dup-pair { grid-template-columns: 1fr; }
  .paper-wrap { padding: 10px; }
  .paper { padding: 12mm 10mm; font-size: 11pt; }
}
@media (max-width: 520px) {
  .g-4 { grid-template-columns: 1fr; }
  .status-pill #status-text { display: none; }
}
@media print {
  body * { visibility: hidden; }
  .paper, .paper * { visibility: visible; }
  .paper { position: absolute; left: 0; top: 0; box-shadow: none; width: auto; padding: 0; }
}
#c-ded th, #c-ded td { padding: 6px 4px; }
#c-ded input { padding: 0 6px; }
.best-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.best-grid li { border-right: 1px solid var(--line); }
@media (max-width: 1100px) { .best-grid { grid-template-columns: 1fr; } }
.person b { white-space: nowrap; }
.pdf-frame { display: block; width: 100%; height: 82vh; min-height: 520px; border: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface-3); }

/* ---------- Tờ trình đã ký ---------- */
.month-folders { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.folder-chip { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); cursor: pointer; text-align: left; flex: none; }
.folder-chip i { color: var(--warn); }
.folder-chip span { display: flex; flex-direction: column; line-height: 1.3; }
.folder-chip b { font-size: 13px; color: var(--ink); }
.folder-chip small { font-size: 11.5px; color: var(--muted); }
.folder-chip:hover { border-color: var(--primary); }
.folder-chip.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.folder-chip:focus-visible, .signed-file:focus-visible, .linkish:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.signed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.signed-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.signed-card.done { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.signed-team { font-size: 14px; }
.signed-file { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; color: inherit; }
.signed-file:hover { border-color: var(--primary); }
.signed-file span:last-child { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.signed-file small { color: var(--muted); font-size: 11.5px; }
.linkish { display: block; border: 0; background: none; color: var(--primary); cursor: pointer; padding: 4px 0; font-size: 12.5px; text-align: left; }
details summary { cursor: pointer; color: var(--muted); }
.img-frame { background: var(--surface-3); padding: 16px; text-align: center; border-radius: 0 0 var(--radius) var(--radius); max-height: 82vh; overflow: auto; }
.img-frame img { max-width: 100%; height: auto; box-shadow: var(--shadow); }
