:root {
  /* Ba màu của logo GrantAIlor: xanh navy (Grant), xanh ngọc (lor, thước dây), vàng cam (AI). */
  --navy: #0d3c70; --navy-2: #0a2f58; --teal: #007a7e; --teal-2: #00676a; --accent: #029fa4;
  --gold: #de9f38; --gold-2: #c9892a; --gold-ink: #8f5c0c;
  --ink: #1b2a3a; --muted: #5d6f82; --rule: #d3dde8; --zebra: #f3f7fa; --bg: #e8eef5; --card: #ffffff;
  --note-bg: #fdf3e1; --note-bd: #de9f38; --side-hover: #f1f5f9; --side-on: #e1f3f3; --tint: #eef3f9;
  --shadow: 0 1px 2px rgba(13, 60, 112, .06);
  --good: #1f7a4d; --warn: #a8650f; --bad: #b83232; --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Be Vietnam Pro", "Segoe UI", "Liberation Sans", Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
/* Dải ba màu của logo trên cùng trang */
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 10;
  background: linear-gradient(90deg, var(--navy) 0 45%, var(--accent) 45% 80%, var(--gold) 80% 100%); }
/* Menu: nền trắng (logo đúng màu gốc), tách khỏi nội dung nền xanh xám bằng viền và bóng */
.side { background: var(--card); color: var(--ink); padding: 22px 14px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--rule); box-shadow: 4px 0 18px rgba(13, 60, 112, .07); z-index: 3; }
.brand { display: block; font-weight: 700; color: var(--navy); font-size: 17px; line-height: 1.2; margin: 0 6px 20px; text-decoration: none; }
.brand img { display: block; width: 196px; max-width: 100%; height: auto; }
.menu-toggle { display: none; }   /* nút ☰ Menu: chỉ hiện trên điện thoại */
/* Chọn ngôn ngữ ngay dưới logo */
.lang-switch { display: inline-flex; margin: 0 6px 16px; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--card); }
.lang-switch a { padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang-switch a + a { border-left: 1px solid var(--rule); }
.lang-switch a:hover { background: var(--side-hover); color: var(--navy); text-decoration: none; }
.lang-switch a.on { background: var(--navy); color: #fff; }
.demo-tag { margin: -8px 6px 16px; color: var(--gold-ink); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.login-logo { display: block; width: 260px; max-width: 100%; height: auto; margin: 6px 0 18px; }
.brand small { display: block; color: var(--gold-ink); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.nav a { display: flex; justify-content: space-between; align-items: center; color: #2a3c50; font-weight: 500; padding: 8px 10px; border-radius: 8px; margin-bottom: 2px; }
.nav a:hover { background: var(--side-hover); color: var(--navy); text-decoration: none; }
.nav a.on { background: var(--side-on); color: var(--teal); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); text-decoration: none; }
.nav .sep { border-top: 1px solid var(--rule); margin: 12px 4px; }
.nav-group { margin: 8px 0 4px; }
.nav-group > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  color: #4f6b8c; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 6px 10px;
  border-top: 1px solid var(--rule); }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: "▸"; margin-left: auto; padding-left: 6px; font-size: 11px; }
.nav-group[open] > summary::after { content: "▾"; }
.nav-group[open] > summary .badge { display: none; }
.nav-group > a { padding-left: 16px; }
/* Mục chính: Cơ hội tài trợ */
.nav-main-box { background: var(--tint); border: 1px solid #dbe5f0; border-left: 4px solid var(--gold); border-radius: 8px; padding: 4px; margin-bottom: 14px; }
.nav .nav-main-box a { color: var(--navy); margin: 0; }
.nav .nav-main-box a:hover { background: #fff; color: var(--navy); }
.nav .nav-main-box a.on { background: #fff; color: var(--teal); box-shadow: none; }
.nav a.nav-main { font-weight: 700; padding: 9px 10px; }
.nav a.nav-sub { font-weight: 600; font-size: 13.5px; padding: 7px 10px; border-top: 1px solid #dbe5f0; border-radius: 0 0 6px 6px; }
.badge { background: var(--gold); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; min-width: 20px; text-align: center; }
.badge:empty, .badge[data-zero] { display: none; }
.push-box { margin-top: 18px; padding: 10px; border-radius: 8px; background: var(--tint); border: 1px solid #dbe5f0; }
.push-box .small { color: var(--ink); margin-bottom: 6px; }
.small-btn { font-size: 12px; padding: 5px 10px; background: var(--gold); border-color: var(--gold); color: #fff; }
.small-btn:hover { background: var(--gold-2); border-color: var(--gold-2); }
.bar { height: 8px; background: var(--zebra); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--teal); }
.fb { display: flex; gap: 6px; flex-wrap: wrap; }
.fb button.on { background: var(--teal); color: #fff; }
.me { margin-top: 22px; padding: 12px 10px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.me b { color: var(--navy); display: block; }
.me button { margin-top: 8px; }
.main { padding: 26px 30px 60px; max-width: 1800px; width: 100%; min-width: 0; box-sizing: border-box; }
.layout > * { min-width: 0; }
h1 { color: var(--navy); font-size: 24px; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { color: var(--teal); font-size: 17px; margin: 26px 0 10px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-chat { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stat .v { font-size: 26px; font-weight: 700; color: var(--navy); }
.stat .l { color: var(--muted); font-size: 12px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th { background: var(--navy); color: #fff; text-align: left; font-size: 12px; padding: 9px 10px; font-weight: 600; }
td { padding: 9px 10px; border-top: 1px solid var(--rule); vertical-align: top; }
tr:nth-child(even) td { background: var(--zebra); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; border: 1px solid var(--rule); color: var(--muted); background: #fff; white-space: nowrap; }
.tag.Fresh, .tag.Healthy, .tag.verified, .tag.approved { color: var(--good); border-color: #b7dcc8; background: #eef8f2; }
.tag.Aging, .tag.Warning, .tag.candidate, .tag.open { color: var(--warn); border-color: #ecd3a2; background: var(--note-bg); }
.tag.Stale, .tag.Failed, .tag.Unknown, .tag.rejected, .tag.critical { color: var(--bad); border-color: #efc2c2; background: #fdf1f1; }
.dl-soon { color: var(--bad); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.note { background: var(--note-bg); border-left: 3px solid var(--gold); padding: 10px 14px; border-radius: 6px; margin: 10px 0 16px; }
.btn, button { font: inherit; border: 1px solid var(--teal); background: var(--teal); color: #fff; padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.btn:hover, button:hover { background: var(--teal-2); border-color: var(--teal-2); }
.btn.ghost, button.ghost { background: #fff; color: var(--teal); }
.btn.ghost:hover, button.ghost:hover { background: var(--side-on); }
.btn.danger, button.danger { background: #fff; color: var(--bad); border-color: #e3b1b1; }
button.link, button.link:hover { background: none; border: none; color: var(--teal); padding: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
form.inline { display: inline; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #c9d5e2; border-radius: 8px; background: #fff; color: var(--ink); }
label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 3px; }
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fields input, .fields select { width: 100%; }
.quote { font-style: italic; background: var(--zebra); border-radius: 6px; padding: 6px 9px; margin: 4px 0; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 7px 0; border-top: 1px solid var(--rule); }
/* chat */
.chat { display: flex; flex-direction: column; height: 62vh; min-height: 360px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.chat .msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 12px; background: var(--zebra); white-space: pre-wrap; word-wrap: break-word; }
.msg .who { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.msg.mine { align-self: flex-end; background: #e3f0ec; }
.msg.bot { background: var(--note-bg); border-left: 3px solid var(--gold); max-width: 92%; }
.chat form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--rule); }
.chat textarea { flex: 1; resize: none; height: 42px; }
.empty { color: var(--muted); padding: 20px; text-align: center; }
.login { max-width: 380px; margin: 10vh auto; }
.login.card { box-shadow: 0 8px 30px rgba(13, 60, 112, .10); border-top: 4px solid var(--accent); }
.login input { width: 100%; }
.flash { background: #eef8f2; border: 1px solid #b7dcc8; color: var(--good); padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; }
.error { background: #fdf1f1; border: 1px solid #efc2c2; color: var(--bad); padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--rule); box-shadow: 0 4px 14px rgba(13, 60, 112, .08); }
  .brand { margin: 0; } .brand img { width: 124px; } .brand small, .demo-tag { display: none; }
  .lang-switch { margin: 0 0 0 auto; } .lang-switch a { padding: 3px 7px; font-size: 11.5px; }
  .menu-toggle { margin-left: 6px; padding: 5px 9px; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--navy); border-color: var(--rule); font-weight: 600; }
  .menu-toggle:hover { background: var(--side-hover); border-color: var(--rule); }
  .side .nav, .side .push-box { display: none; flex-basis: 100%; }
  .side.open .nav { display: flex; margin-top: 10px; }
  .side.open .push-box:not([hidden]) { display: block; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav .sep, .me { display: none; }
  .nav-group { margin: 0; } .nav-group > summary { border-top: 0; padding: 6px 8px; }
  .nav-group[open] { display: contents; } .nav-group[open] > summary { display: none; }
  .nav-main-box { margin-bottom: 0; display: flex; flex-wrap: wrap; gap: 2px; }
  .nav a.nav-sub { border-top: 0; border-left: 1px solid #dde7ea; border-radius: 6px; }
  .push-box { margin-top: 8px; }
  .main { padding: 16px; }
  .g4, .fields { grid-template-columns: 1fr 1fr; }
  .g2, .g-chat { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
  .kv { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
/* thêm/đề xuất nguồn */
form.stack input[type=url], form.stack > label > input:not([type=checkbox]) { width: 100%; box-sizing: border-box; }
form.stack .row label { flex: 1; min-width: 180px; }
form.stack .row label input:not([type=checkbox]) { width: 100%; box-sizing: border-box; }
form.stack button { margin-top: 10px; }
details > summary { cursor: pointer; }
/* trạng thái theo dõi nguồn */
.tag.on { background: #e3f3ea; color: #1d6b43; border-color: #b9dfc9; font-weight: 700; }
.tag.off { background: #f1f1f1; color: #6b6b6b; border-color: #d9d9d9; }
/* bảng nguồn: vừa màn hình, chữ dài (URL) tự xuống dòng */
table.src-table { table-layout: fixed; width: 100%; }
table.src-table td, table.src-table th { overflow-wrap: anywhere; word-break: break-word; vertical-align: top; }
.src-actions { margin-top: 6px; font-size: 12.5px; line-height: 1.6; display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; }
.src-actions form.inline { display: inline; }
.src-actions button, .src-actions a { background: none; border: none; padding: 0; font: inherit; color: var(--teal);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.src-actions button.danger { color: var(--bad); }
#source-filter select { max-width: 260px; }
#source-filter input[name=q] { min-width: 160px; flex: 1; }
.card, .note, .flash, .error { overflow-wrap: anywhere; }
.review-title { font-size: 16px; font-weight: 600; margin: 6px 0 2px; overflow-wrap: anywhere; }
.review-advice { margin: 6px 0; padding: 6px 10px; border-radius: 6px; border-left: 3px solid var(--warn); background: var(--bg); }
.review-advice.verified { border-left-color: var(--good); }
.review-advice.critical { border-left-color: var(--bad); }
.review-facts { gap: 6px 14px; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.review-facts form.inline { display: inline; }
.review-more { margin: 6px 0; }
.review-more summary { cursor: pointer; color: var(--muted); }
.suspicious-quote { margin: 6px 0; padding: 6px 8px; border-left: 3px solid var(--bad); background: var(--bg); overflow-wrap: anywhere; }
.assist { border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-radius: 6px; padding: 8px 12px; margin: 8px 0; background: var(--card); }
.assist > div { margin: 3px 0; }
.assist .row { gap: 6px; }
.ai-line { padding: 5px 10px; border: 1px solid var(--rule); border-left: 3px solid var(--gold); background: var(--card); border-radius: 4px; line-height: 1.7; }
/* Mỗi cơ hội là một khối (tbody): hàng chính + nhận định AI; các khối xen kẽ màu nền. */
table.opps tbody:nth-of-type(odd) td { background: #ffffff; }
table.opps tbody:nth-of-type(even) td { background: #f3f7fb; }
table.opps tbody + tbody tr:first-child td { border-top: 1px solid #d3dee5; }
table.opps tbody:nth-of-type(odd):hover td { background: #f8fbfc; }
table.opps tbody:nth-of-type(even):hover td { background: #eaf1f5; }
table.opps tr.has-ai td { padding-bottom: 6px; }
table.opps .ai-row td { border-top: none; padding: 0 14px 12px; }
.ai-note { display: flex; gap: 14px; border-top: 1px dashed #ecd9b4; padding-top: 8px; font-size: 13px; line-height: 1.6; color: #3a4d5e; }
.ai-note .lbl { flex: 0 0 96px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gold-ink); padding-top: 3px; }
.ai-note .txt { min-width: 0; }
.ai-note .tag { font-size: 10.5px; margin-right: 2px; }
.ai-note .meta { font-size: 11.5px; color: var(--muted); }
.ai-line .tag { margin-right: 3px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 4px; }
.tab-group { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tab-label { color: var(--muted); font-size: 12px; margin-right: 2px; }
.tab { padding: 5px 11px; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); color: var(--ink); font-size: 13px; text-decoration: none; white-space: nowrap; }
.tab:hover { border-color: var(--accent); }
.tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab .n { font-size: 11px; opacity: .75; }
.ai-title { color: var(--gold-ink); font-size: 12px; margin-right: 4px; }
.check-inline { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 6px; font-weight: normal; }
.check-inline input { width: auto; margin: 0; }
input:disabled { background: #eef1f3; color: var(--muted); cursor: not-allowed; }
/* Lưới ô nhập: nhãn ở trên, ô nhập rộng hết cột, các cột thẳng hàng theo mép trên */
.form-grid { display: grid; gap: 4px 14px; align-items: start; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.g2e { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.form-grid > label > input:not([type=checkbox]), .form-grid > label > select { display: block; width: 100%; box-sizing: border-box; margin-top: 3px; }
@media (max-width: 860px) { .form-grid.g3, .form-grid.g2e { grid-template-columns: 1fr; } }
.form-grid > label > input:not([type=checkbox]), .form-grid > label > select, .fields input, .fields select { height: 38px; }
.fields { align-items: start; }

/* Điện thoại: danh sách cơ hội thành thẻ xếp dọc, ô lọc rộng hết màn hình */
@media (max-width: 860px) {
  body { overflow-x: hidden; }
  .main { padding: 14px 12px 40px; }
  h1 { font-size: 21px; }
  form.row > select, form.row > input:not([type=hidden]) { flex: 1 1 100%; width: 100%; box-sizing: border-box; }
  form.row > button { flex: 0 0 auto; }
  .tabs { gap: 6px; }
  .tab { font-size: 12.5px; padding: 4px 9px; }
  table.opps { display: block; overflow: visible; border: none; background: none; }
  table.opps thead { display: none; }
  table.opps tbody { display: block; margin-bottom: 10px; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
  table.opps tr { display: flex; flex-wrap: wrap; }
  table.opps td, table.opps tbody + tbody tr:first-child td { display: block; border-top: none; padding: 4px 12px; }
  table.opps tr:first-child td:first-child { flex: 1 1 100%; padding-top: 10px; font-size: 15px; }
  table.opps td[data-label] { flex: 1 1 45%; font-size: 13px; }
  table.opps td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.opps td.col-fresh { display: none !important; }
  table.opps .ai-row td { flex: 1 1 100%; padding: 4px 12px 10px; }
  .ai-note { display: block; }
  .ai-note .lbl { margin-bottom: 4px; }
  .nav a { white-space: nowrap; }
  pre, code { white-space: pre-wrap; word-break: break-word; }
}
.bulk-bar { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 8px 0; gap: 8px; }
.tag.new { background: var(--gold); border-color: var(--gold); color: #fff; }
.tag.coconut { background: #eef6e8; border-color: #b9d8a4; color: #3d6b1f; }
table.opps tbody.is-new tr:first-child td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.nav a.nav-main .badge { margin-left: 6px; }
.nav a.nav-main .badge.new { margin-left: 3px; background: var(--teal); }

/* Cập nhật cho tôi (hồ sơ nghiên cứu) */
.tag.mine { background: #e6e9f7; color: #33408a; }
.profile-topics { width: 100%; min-height: 380px; font: 13.5px/1.7 "Inter", "Segoe UI", "Liberation Sans", Arial, sans-serif; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.topic-chips span { background: #eef4f5; border-radius: 12px; padding: 2px 10px; font-size: 12.5px; }
/* Ô chọn có lựa chọn dài (VD lý do loại) không được làm tràn ngang trên điện thoại. */
select { max-width: 100%; }
/* Dòng trạng thái quét: tóm tắt dài tự xuống hàng trong khung, không đẩy lệch bố cục khi cập nhật. */
#scan-status { overflow-wrap: anywhere; min-height: 1.4em; }

/* Việc cần làm */
.nav-today { font-weight: 600; }
.today-h { margin: 18px 0 6px; }
.today-h.urgent { color: var(--bad); }
.today-item { border-left: 4px solid var(--rule); }
.today-item.urgent { border-left-color: var(--bad); }
.today-item.daily { border-left-color: var(--accent); }
.today-item .row { flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.today-count { font-size: 22px; min-width: 2.2em; text-align: center; }
.today-main { display: flex; gap: 12px; align-items: center; flex: 1 1 320px; min-width: 0; }
.today-text { flex: 1; min-width: 0; }

/* Theo dõi hằng ngày (trang Chất lượng) */
.daily-filter { gap: 8px 16px; flex-wrap: wrap; align-items: center; }
.daily-cmp .stat .v { font-size: 22px; }
.trend { display: inline-block; margin-top: 2px; font-weight: 600; color: var(--muted); }
.trend.good { color: var(--good); }
.trend.bad { color: var(--bad); }
.grid.g3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.spark { margin: 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; }
.spark figcaption { font-size: 13px; margin-bottom: 6px; }
.spark svg { width: 100%; height: 64px; display: block; }
.spark-bar { fill: var(--accent); }
.spark-hit { fill: transparent; }
.spark-hit:hover + .spark-bar, .spark-bar:hover { fill: var(--teal); }
.spark-base { stroke: var(--rule); stroke-width: 1; }
.spark-axis { display: flex; justify-content: space-between; margin-top: 2px; }
.table-scroll { overflow-x: auto; }
.daily-table { font-size: 12px; white-space: nowrap; }
.daily-table td, .daily-table th { padding: 4px 6px; text-align: right; }
.daily-table td:first-child, .daily-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--card); }

/* Bảng phạm vi theo nước trên thẻ review */
.scope-panel { margin: 10px 0; }
.scope-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 4px; }
.scope-cell { padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; }
.scope-cell > span { display: block; font-size: 13px; margin-bottom: 2px; }
.scope-cell select { width: 100%; }
.scope-cell.look { border-color: var(--warn); background: var(--note-bg); }

input:focus, select:focus, textarea:focus { outline: 2px solid rgba(2, 159, 164, .35); border-color: var(--accent); }
/* Thanh "Xem cho": ô chọn tên dài không tràn khung */
.fitbar label { min-width: 0; max-width: 100%; }
.fitbar select { min-width: 0; max-width: 100%; }
@media (max-width: 860px) { .fitbar label { flex: 1 1 100%; } .fitbar select { flex: 1 1 auto; width: 100%; } }

/* Hàng đợi duyệt: thẻ được chọn hàng loạt nổi rõ; thông báo kết quả chọn */
.card.picked { outline: 3px solid var(--teal); outline-offset: 2px; }
.tier-msg { color: var(--teal-2); font-weight: 600; }
