/* SPEC 34 (2026-10-21): template nudges / tips under an answer, "Mẫu đề xuất" for admins.
   Colours come from tokens.css only, so light and dark both work. */

/* ------------------------------------------------------------------ hint under an answer */
.hint-card { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); max-width: 720px; }
.hint-card.nudge { border-color: var(--honey-line); background: var(--honey-soft); }
.hint-card.tip { background: var(--sunken); }
.hint-ico { flex: none; display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center;
  justify-content: center; color: var(--honey-ink); background: var(--surface); border: 1px solid var(--honey-line); }
.hint-card.tip .hint-ico { color: var(--info); border-color: var(--border); }
.hint-main { min-width: 0; flex: 1 1 auto; }
.hint-title { margin: 3px 0 2px; font-weight: 600; font-size: 14px; color: var(--ink); }
.hint-tag { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: var(--r-pill); font-size: 11px;
  font-weight: 600; letter-spacing: .02em; color: var(--honey-ink); background: var(--surface); border: 1px solid var(--honey-line); vertical-align: 1px; }
.hint-card.tip .hint-tag { color: var(--info); border-color: var(--border); }
.hint-text { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--body); }
.hint-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------------ Mẫu đề xuất (#/goi-y-mau) */
.gm-page .page-head .acts { flex-wrap: wrap; }
.gm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2fr); gap: 12px; margin-bottom: 16px; }
.gm-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--r-card); background: var(--surface); }
.gm-tile b { font-size: 22px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.gm-tile span { font-size: 13px; color: var(--body); }
.gm-tile small { font-size: 12px; color: var(--muted); }
.gm-reasons { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.gm-reasons .k { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.gm-rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-rchip { display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--sunken); font-size: 12px; color: var(--body); }
.gm-rchip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.gm-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.gm-list { display: grid; gap: 12px; }
.gm-card { padding: 16px 18px; }
.gm-head { display: flex; gap: 16px; align-items: flex-start; }
.gm-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.gm-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.gm-score { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gm-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.gm-sum { margin: 0 0 4px; font-size: 13px; color: var(--body); }
.gm-facts { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.gm-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gm-people { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--body); }
.gm-people > span:last-child { margin-left: 4px; }
.gm-card .note-box { margin-top: 10px; }
.gm-foot { margin-top: 8px; margin-left: -8px; }
.gm-details { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 14px; }
.gm-sec h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.gm-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.gm-sec li { font-size: 13px; line-height: 1.5; color: var(--body); }
.gm-sec q { color: var(--ink); quotes: "“" "”"; }
.gm-who { color: var(--muted); font-size: 12px; margin-left: 6px; }
.gm-set { display: grid; gap: 12px; padding: 14px; width: min(340px, calc(100vw - 32px)); }
.gm-chk { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.gm-chk input { margin-top: 3px; }
.gm-chk span { display: grid; gap: 2px; font-size: 13px; }
.gm-chk small { color: var(--muted); }
.lb-page .page-head .acts .btn .cnt { margin-left: 6px; min-width: 18px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--honey); color: var(--honey-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

@media (max-width: 900px) {
  .gm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-reasons { grid-column: 1 / -1; }
  .gm-head { flex-direction: column; }
  .gm-acts { justify-content: flex-start; }
}

/* Tự động › Lịch chạy: tìm, lọc, sắp xếp và kiểu xem "Gọn" (2026-10-21) */
.td-schtab { gap: 14px; }
.td-lichnote:empty, .td-warnwrap:empty { display: none; }
.td-ftb { display: flex; flex-direction: column; gap: 10px; }
.td-ftb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.td-fsearch { flex: 1 1 260px; width: auto; min-width: 0; }
.td-fsearch .input { height: 36px; }
.td-fmore { display: contents; }
.td-fmore-btn { display: none; height: 36px; min-height: 36px; padding: 0 12px; gap: 6px; }
.td-fmore-btn .cnt { min-width: 18px; padding: 0 6px; border-radius: var(--r-pill); background: var(--primary-bg); color: var(--primary-fg); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.td-fsel { min-width: 0; max-width: 100%; }
.td-fsel select { min-width: 0; max-width: 180px; text-overflow: ellipsis; }
.td-fchips { flex: 0 1 auto; gap: 6px; }
.td-fcount { margin: -4px 0 -6px; }
.td-fcount .btn-link { font-size: 12px; }
.td-slist { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.td-slist.compact { gap: 8px; }
.td-crow-name { display: inline-flex; align-items: flex-start; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.td-crow-name > svg { flex: 0 0 auto; margin-top: .2em; color: var(--muted); }
.td-crow-name:hover > span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.td-crow { display: grid; grid-template-columns: minmax(0, 1fr) 210px 150px 170px auto; align-items: center; gap: 8px 20px; padding: 12px 16px; }
.td-crow.off { background: var(--surface); }
.td-crow.off h2 { color: var(--muted); }
.td-crow-main { min-width: 0; }
.td-crow h2 { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); min-width: 0; }
.td-crow .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 3px; padding-left: 22px; font-size: 12.5px; color: var(--muted); }
.td-crow .meta b { color: var(--body); font-weight: 600; }
.td-crow-when { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.td-crow-when .k { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.td-crow-when .v { white-space: nowrap; }
.td-crow-when .v.muted { color: var(--muted); }
.td-crow-when .pill { max-width: 100%; }
.td-crow-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

@media (max-width: 1100px) {
  .td-crow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .td-crow-main { grid-column: 1 / -1; }
  .td-crow-acts { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .td-fsearch { flex: 1 1 150px; }
  .td-fmore-btn { display: inline-flex; }
  .td-fmore { display: none; flex: 1 1 100%; flex-direction: column; gap: 8px; }
  .td-fmore.open { display: flex; }
  .td-fsel { flex: 1 1 100%; }
  .td-fsel.sort { flex: 1 1 160px; }
  .td-fsel select { flex: 1 1 auto; max-width: none; }
  .td-ftb-row > .grow { display: none; }
  .td-crow { padding: 12px 14px; }
  .td-crow .meta { padding-left: 0; }
}

/* AI trực ca › "Chạy bằng" (SPEC 37, 2026-10-22): chip, inline switcher, route of a run, Máy chạy tab */
.td-runwrap { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; max-width: 100%; }
.td-run { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; max-width: 100%; box-sizing: border-box; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.td-run > span { overflow: hidden; text-overflow: ellipsis; }
button.td-run { cursor: pointer; }
button.td-run:hover { border-color: var(--ink); }
button.td-run[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--focus); }
.td-run.system, .td-run.api { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }
.td-run.api { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--info); }
.td-run.pool { background: var(--honey-soft); border-color: var(--honey-line); color: var(--honey-ink); }
.td-run.none { background: var(--sunken); border-color: transparent; color: var(--muted-2); }
.td-runsub { font-size: 12px; color: var(--muted); }
.td-runsub.bad { color: var(--danger); }
.td-runsub.warn { color: var(--warning); }
.td-switch { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.td-swhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.td-swhead b { font-size: 13px; color: var(--ink); }
.td-swhead span { font-size: 12px; color: var(--muted); }
.td-swgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.td-swopt, .td-swm { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; text-align: left; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--body); font: inherit; cursor: pointer; }
.td-swopt:hover:not(:disabled), .td-swm:hover { border-color: var(--border-strong); }
.td-swopt.on, .td-swm.on { border: 2px solid var(--ink); padding: 9px 11px; }
.td-swopt:disabled { cursor: not-allowed; background: var(--bg); opacity: .7; }
.td-swopt .mark, .td-swm .mark { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--switch-off); }
.td-swopt.on .mark, .td-swm.on .mark { border-color: var(--ink); background: radial-gradient(circle, var(--ink) 0 3.5px, transparent 4px); }
.td-swopt .txt, .td-swm .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.td-swopt b, .td-swm b { font-size: 13px; color: var(--ink); }
.td-swopt .d { font-size: 12px; color: var(--muted); line-height: 1.45; }
.td-swopt .n { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.td-swopt .n.ok { color: var(--success); }
.td-swopt .n.bad { color: var(--danger); }
.td-swopt .n.info { color: var(--info); }
.td-swopt .n.pool { color: var(--honey-ink); }
.td-swmach { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.td-swmach .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.td-swmach .list { display: flex; flex-wrap: wrap; gap: 6px; }
.td-swm { padding: 6px 12px 6px 8px; align-items: center; }
.td-swm.on { padding: 5px 11px 5px 7px; }
.td-swm .mark { width: 14px; height: 14px; margin-top: 0; }
.td-swm .st { font-size: 11.5px; color: var(--muted); }
.td-swm .st.ok { color: var(--success); }
.td-swm .st.bad { color: var(--danger); }
.td-swm .st.warn { color: var(--warning); }
.td-swfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.td-swmore { font-size: 13px; font-weight: 600; }
.td-crow-sw { grid-column: 1 / -1; }
.td-crow-run { min-width: 0; }
.td-fscope { flex: 0 0 auto; }
.td-fscope button { white-space: nowrap; }
.td-scopenote { align-items: center; }
.td-ranon { display: flex; flex-direction: column; font-size: 13px; }
.td-ranon b { font-weight: 600; color: var(--ink); }
.td-ranon span { font-size: 12px; color: var(--warning); }
.td-route { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.td-route li { position: relative; display: grid; grid-template-columns: 14px 110px minmax(0, 1fr); gap: 0 10px; padding: 0 0 10px; font-size: 13px; color: var(--body); }
.td-route li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--border); }
.td-route li:last-child::before { display: none; }
.td-route .dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--switch-off); }
.td-route .at { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.td-route li.give .dot { background: var(--honey); }
.td-route li.give .tx { font-weight: 600; color: var(--ink); }
.td-route li.bad .dot { background: var(--danger); }
.td-route li.bad .tx { color: var(--danger); }
.td-route li.good .dot, .td-route li.sys .dot { background: var(--success); }
.td-route li.good .tx { color: var(--success); font-weight: 600; }
.td-route li.sys .tx { font-weight: 600; color: var(--ink); }
.td-mtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.td-mtile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.td-mtile .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.td-mtile b { font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.td-mtile .s { font-size: 12px; color: var(--muted); }
.td-mme { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.td-mhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.td-mhead .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--sunken); color: var(--body); display: inline-flex; align-items: center; justify-content: center; }
.td-mhead h2 { font-size: 17px; font-weight: 600; color: var(--ink); }
.td-mhead .sub { font-size: 13px; color: var(--muted); }
.td-mst { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--sunken); color: var(--muted-2); }
.td-mst.on { background: var(--success-soft); color: var(--success); }
.td-mst.busy { background: var(--warning-soft); color: var(--warning); }
.td-mshare { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: 10px; background: var(--bg); }
.td-mshare .ws-switch { margin-top: 2px; }
.td-mshare b { color: var(--ink); }
.td-mshare p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--body); }
.td-mshare p.muted, .td-mme p.muted { color: var(--muted); font-size: 12.5px; }
.td-mset { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 20px; }
.td-mset .f { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.td-mset .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.td-mchk { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.td-mchk input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.td-mchk > span { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.td-mchk b { font-size: 13px; color: var(--ink); }
.td-mruns { display: flex; flex-direction: column; gap: 8px; }
.td-mruns > b { font-size: 13px; color: var(--ink); }
.td-mruns ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.td-mruns li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; }
.td-mruns li:first-child { border-top: 0; }
.td-mruns .at { width: 130px; color: var(--muted); font-variant-numeric: tabular-nums; }
.td-mruns .nm { flex: 1 1 240px; min-width: 0; color: var(--ink); }
.td-mruns .by { color: var(--muted); }
.td-mruns .err { flex-basis: 100%; font-size: 12px; color: var(--danger); }
.td-mall { display: flex; flex-direction: column; gap: 10px; }
.td-mallhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.td-mallhead h2 { font-size: 17px; font-weight: 600; color: var(--ink); }
.td-mallhead span { font-size: 13px; color: var(--muted); }
.td-mtable { overflow-x: auto; padding: 0; }
.td-mtable .inner { min-width: 860px; }
.td-mrow { display: grid; grid-template-columns: minmax(0, 1.5fr) 130px 170px 90px minmax(0, 1.3fr) 140px; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.td-mrow.head { border-top: 0; background: var(--table-head); font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 16px; }
.td-mrow .who { display: flex; flex-direction: column; min-width: 0; }
.td-mrow .who b { color: var(--ink); }
.td-mrow .who span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-mrow .sh { color: var(--muted); font-weight: 600; }
.td-mrow .sh.on { color: var(--success); }
.td-mrow .num { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .td-route li { grid-template-columns: 14px minmax(0, 1fr); }
  .td-route .at { grid-column: 2; }
  .td-route .tx { grid-column: 2; }
  .td-mshare { flex-direction: column; }
}
.td-eddetail { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--bg); }
.td-eddetail .help { margin: 0; }
.td-edrows { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 20px; }
.td-edrow { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.td-edrow .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.td-edflow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.td-edflow .arr { display: flex; align-items: center; color: var(--placeholder); }
.td-edstep { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; background: var(--honey-soft); color: var(--body); font-size: 12.5px; }
.td-edstep .n { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--honey-ink); }
.td-edstep b { font-size: 13px; color: var(--ink); }
.td-edstep.ok { background: var(--success-soft); }
.td-edstep.ok .n { color: var(--success); }
.td-edstep.bad { background: var(--danger-soft); }
.td-edstep.bad .n { color: var(--danger); }
.td-edready { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.td-edready .k { font-size: 12px; font-weight: 600; color: var(--muted); }
/* Đặt lịch › Chia sẻ (SPEC 37.2) */
.td-sharepill { display: inline-flex; align-items: center; gap: 4px; }
