:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #dee2e6;
  --text: #24292f;
  --muted: #6c757d;
  --accent: #0056b3;
  --blue: #1F497D;
  --green: #198754;
  --red: #dc3545;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 13px/1.45 "Segoe UI", Roboto, Arial, sans-serif; }
[hidden] { display: none !important; }

/* ---- header & tabs ---- */
.topbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px; }
.brand { font-weight: 700; font-size: 16px; color: var(--accent); }
.brand .ver { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.author { color: var(--accent); font-weight: 600; font-size: 12px; }
.host-info { margin-left: auto; font-size: 12px; color: var(--muted); }
.host-info code { background: #eef3fb; color: var(--accent); padding: 1px 6px; border-radius: 4px; font-weight: 700; cursor: pointer; }
.maintabs { display: flex; gap: 2px; padding: 8px 16px 0; background: var(--bg); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.maintabs button, .subtabs button { border: 1px solid var(--line); border-bottom: none; background: #e1e6ed; color: #495057;
  font: 600 13px "Segoe UI", sans-serif; padding: 8px 16px; border-radius: 6px 6px 0 0; cursor: pointer; }
.maintabs button.active, .subtabs button.active { background: #fff; color: var(--accent); }
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.subtabs button { padding: 6px 14px; font-size: 12.5px; }
main { padding: 12px 16px 40px; }
.tab, .subtab { display: none; }
.tab.active, .subtab.active { display: block; }

.page-title { text-align: center; font-size: 17px; margin: 4px 0 10px; }
.page-title.blue { color: var(--blue); }
.page-title.nomargin { margin: 0; text-align: left; }

/* ---- cards & layout ---- */
.card { background: var(--card); border: 1px solid #cfd6de; border-radius: 6px; padding: 8px 12px 10px; margin: 0 0 10px; }
.card legend { font-weight: 700; color: var(--accent); padding: 0 6px; }
.card.inner { background: #fbfcfd; margin-top: 6px; }
.row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.row.nomargin { margin: 0 0 4px; }
.row.right { justify-content: flex-end; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 120px; }
.full { width: 100%; display: block; margin: 3px 0 8px; }
.split { display: flex; gap: 10px; align-items: stretch; }
.split.nomargin > .card { margin: 0; }
.split.three > .card { flex: 1; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 170px 1fr; gap: 6px 10px; align-items: center; margin: 8px 0; max-width: 900px; }
.narrow { max-width: 820px; margin: 0 auto; }
.narrow > b { display: block; margin-top: 10px; }
.btngrid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.sticky-head { position: sticky; top: 38px; background: var(--bg); z-index: 5; padding: 4px 0; }
@media (max-width: 1100px) { .split { flex-direction: column; } .btngrid { grid-template-columns: repeat(3, 1fr); } }

/* ---- inputs ---- */
input, select, textarea { font: inherit; border: 1px solid #b9c2cc; border-radius: 4px; padding: 5px 7px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid #9ec5fe; border-color: #6ea8fe; }
input[readonly] { background: #f8f9fa; }
textarea { resize: vertical; width: 100%; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.area-tall { height: 380px; }
.area-xtall { height: 520px; }
.area-mid { height: 230px; }
.green { color: var(--green); }
.red { color: var(--red); }
.muted { color: var(--muted); }
label.radio, label.chk { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; cursor: pointer; }
.hint-blue { color: #0000cc; font-size: 12px; margin: 0 0 6px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid #adb5bd; background: #e9ecef; color: #212529;
  font: 600 12.5px "Segoe UI", sans-serif; padding: 6px 12px; border-radius: 4px; cursor: pointer; white-space: nowrap; user-select: none; }
.btn:hover { filter: brightness(0.95); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.solid, .btn.bigbtn { color: #fff; border-color: transparent; }
.btn.bigbtn { font-size: 14px; padding: 9px 20px; min-width: 240px; }
.btn.bigpad { padding: 10px; font-size: 14px; margin: 4px 0; }
.btn.xs { padding: 3px 8px; font-size: 11.5px; }
.btn.primary { background: #0d6efd; color: #fff; border-color: transparent; }
.btn.big { width: 100%; font-size: 15px; padding: 11px; margin: 4px 0 6px; }

/* ---- progress ---- */
.progress { height: 14px; background: #e9ecef; border-radius: 7px; overflow: hidden; margin: 6px 0; position: relative; border: 1px solid #d0d7de; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, #22a35a, #2fbf71); transition: width .25s; }
.progress.labeled { height: 20px; border-radius: 4px; }
.progress.labeled span { position: absolute; inset: 0; text-align: center; font-size: 12px; font-weight: 700; line-height: 18px; }

/* ---- logs ---- */
.log { margin: 0; padding: 8px; border-radius: 4px; white-space: pre-wrap; word-break: break-word; overflow: auto; font-family: var(--mono); font-size: 12px; min-height: 120px; }
.log.light { background: #fff; border: 1px solid #ced4da; color: #111; }
.log.dark { background: #1e1e1e; color: #00ff00; border: 1px solid #333; }
.log.tall { height: 300px; }
.log.xtall { height: 640px; }
.calc-result { background: #f8f9fa; border: 1px solid #ced4da; padding: 6px; margin: 6px 0; min-height: 56px; white-space: pre; overflow: auto; font-size: 11.5px; }

/* ---- grid tables ---- */
.grid-block { margin: 6px 0 10px; }
.grid-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.grid-title { font-weight: 700; font-size: 13.5px; }
.grid-wrap { overflow: auto; border: 1px solid #c8d0d8; background: #fff; border-radius: 3px; }
table.grid { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 12.5px; }
table.grid th { position: sticky; top: 0; background: #f1f3f5; text-align: left; padding: 5px 10px; border-bottom: 1px solid #c8d0d8; border-right: 1px solid #e3e7eb; cursor: pointer; white-space: nowrap; font-weight: 600; }
table.grid th:hover { background: #e2e6ea; }
table.grid td { padding: 4px 10px; border-bottom: 1px solid #eef0f2; border-right: 1px solid #f1f3f5; white-space: nowrap; max-width: 520px; overflow: hidden; text-overflow: ellipsis; }
table.grid tr:hover td { background: #f3f8ff; }
table.grid tr.sel td { background: #cfe2ff; }
table.grid td.empty { color: var(--muted); text-align: center; font-style: italic; }

/* ---- misc ---- */
.statusbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 10px;
  background: #f1f3f5; border-top: 1px solid #c8d0d8; padding: 3px 12px; font-size: 12px; z-index: 30; }
.statusbar b { color: var(--blue); }
#tab-bts { padding-bottom: 20px; }
.mt-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); padding: 6px 10px; border-radius: 6px; margin-bottom: 8px; }
.author-mini { color: var(--accent); font-weight: 700; font-size: 12px; }
.chrome-badge { font-weight: 700; color: #0d6efd; }
.safe-note { color: var(--red); font-style: italic; }
.notice-box { background: #fff8e1; border: 1px solid #ffe08a; color: #7a5b00; padding: 8px 12px; border-radius: 6px; margin: 6px 0; }

.ctx { position: fixed; z-index: 1000; background: #fff; border: 1px solid #b9c2cc; border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 3px 0; min-width: 260px; }
.ctx.hidden { display: none; }
.ctx-item { padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.ctx-item:hover { background: #e7f1ff; }

.overlay { position: fixed; inset: 0; background: rgba(20,25,35,.35); display: flex; align-items: center; justify-content: center; z-index: 1300; }
.modal { background: #fff; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.25); width: min(520px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.modal.wide { width: min(900px, 96vw); }
.mhead { padding: 10px 14px; font-weight: 700; border-bottom: 1px solid var(--line); }
.mbody { padding: 12px 14px; overflow: auto; }
.mbody .msg { white-space: pre-wrap; word-break: break-word; }
.mfoot { padding: 8px 14px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 6px; }
.mbody table { border-collapse: collapse; width: 100%; }
.mbody th, .mbody td { border: 1px solid #dee2e6; padding: 5px 8px; text-align: left; font-size: 12.5px; }
.mbody th { background: #f1f3f5; }
.mbody pre.help { white-space: pre-wrap; font: 13px/1.55 "Segoe UI", sans-serif; margin: 0; }

#toast-root { position: fixed; right: 16px; bottom: 34px; display: flex; flex-direction: column; gap: 6px; z-index: 1100; }
.toast { background: #212529; color: #fff; padding: 8px 14px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.25); max-width: 420px; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; }

/* ---- bản chạy trong trình duyệt (GitHub Pages) ---- */
.pyboot { position: sticky; top: 38px; z-index: 19; background: #fff8e1; border-bottom: 1px solid #ffe08a; padding: 6px 16px; font-size: 12.5px; color: #7a5b00; }
.pyboot .progress { margin: 4px 0 0; height: 8px; }
.helper-ok { color: var(--green); font-weight: 700; }
.helper-off { color: #7a5b00; font-weight: 600; }
.mbody ol { padding-left: 20px; } .mbody li { margin: 4px 0; }

/* ---- tab Mô phỏng trạm BTS (nhúng simulator/web/app.html) ---- */
.sim-tab.active { display: flex; flex-direction: column; gap: 8px; }
.sim-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sim-bar .grow { flex: 1 1 320px; }
#sim-frame { width: 100%; height: calc(100vh - 150px); min-height: 520px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 700px) { #sim-frame { height: calc(100vh - 120px); } .maintabs { overflow-x: auto; } .maintabs button { white-space: nowrap; } }

/* ---- đăng nhập & phân quyền ---- */
.auth-box { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-left: auto; }
#tab-admin fieldset { min-width: 0; }
.auth-box .avatar, .u-cell .avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
.auth-box .who { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-btn { background: #fff; border-color: #c6ccd3; gap: 8px; }
.role-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #e7f1ff; color: var(--accent); }
.role-badge.admin { background: #fff3cd; color: #8a6100; }
.role-badge.pending { background: #f1f3f5; color: var(--muted); }
.role-badge.blocked { background: #f8d7da; color: var(--red); }
.auth-err { color: var(--red); font-weight: 600; }
.maintabs button[data-tab="admin"] { color: #8a6100; }
main { position: relative; }
.tab.teaser { filter: blur(2.5px) saturate(.8); opacity: .55; pointer-events: none; user-select: none; max-height: 1100px; overflow: hidden; }
#tab-locked.over.active { position: absolute; inset: 0; z-index: 6; background: linear-gradient(to bottom, transparent 0, var(--bg, #f4f6f9) 85%); }
#tab-locked.over .locked-card { position: sticky; top: 24px; box-shadow: 0 12px 40px rgba(15, 23, 42, .18); }
.pro-pill { display: inline-block; background: linear-gradient(90deg, #f59e0b, #ef4444); color: #fff; font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; letter-spacing: .5px; }
.locked-what { color: var(--text, #1f2937) !important; text-align: left; }
.locked-feats { text-align: left; margin: 0 0 14px; padding-left: 20px; font-size: 13.5px; }
.locked-feats li { margin: 4px 0; }
.locked-feats li::marker { content: "✨ "; }
.locked-why { font-weight: 600; }
.locked-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.pro-btn { background: linear-gradient(90deg, #f59e0b, #ef4444) !important; color: #fff !important; border: 0 !important; text-decoration: none; }
.locked-free { font-size: 12.5px; margin: 6px 0 0 !important; }
.maintabs button.locked, .tooltabs button.locked { color: inherit; opacity: .78; }
.maintabs button.locked::after, .tooltabs button.locked::after { content: "PRO"; font-size: 9px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #f59e0b, #ef4444); border-radius: 6px; padding: 1px 5px; margin-left: 5px; vertical-align: 2px; }
.plan-badge { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #e0f2fe; color: #075985; white-space: nowrap; }
.plan-badge.soon { background: #fef3c7; color: #92400e; }
.plan-badge.exp { background: #fee2e2; color: #991b1b; }
.exp-cell { white-space: nowrap; }
.exp-cell input[type=date] { width: 132px; }
.buy-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.buy-plan { display: block; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; position: relative; }
.buy-plan input { position: absolute; top: 12px; right: 10px; }
.buy-plan:has(input:checked) { border-color: #f59e0b; background: #fffbeb; }
.buy-plan.hot::before { content: "Phù hợp"; position: absolute; top: -9px; left: 10px; font-size: 10.5px; background: #ef4444; color: #fff; padding: 1px 7px; border-radius: 6px; }
.bp-head { display: flex; flex-direction: column; gap: 2px; padding-right: 22px; }
.bp-price { font-size: 18px; font-weight: 700; color: #c2410c; }
.bp-tools { font-size: 12px; margin-top: 6px; color: var(--muted); }
.pay-box { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.pay-qr { width: 260px; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pay-info { flex: 1; min-width: 260px; }
.pay-tbl td { padding: 4px 8px 4px 0; vertical-align: middle; }
.pay-st { padding: 8px 10px; border-radius: 8px; background: #e0f2fe; color: #075985; font-weight: 600; }
.pay-st.bad { background: #fee2e2; color: #991b1b; }
.pay-intl { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border, #cbd5e1); }
.pay-intl .intl-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.pay-intl .intl-pay { font-weight: 600; }
.pay-intl #intl-st { min-height: 16px; }
.shop-row label { display: inline-flex; flex-direction: column; font-size: 12.5px; gap: 2px; }
.trial-btn { background: linear-gradient(90deg, #10b981, #0ea5e9) !important; color: #fff !important; border: 0 !important; }
.trial-cfg { border: 1px dashed #10b981; border-radius: 8px; padding: 8px 10px; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.trial-cfg .tool-chips { flex-basis: 100%; }
.trial-info { font-size: 12px; margin-top: 3px; }
.trial-ph { display: block; margin: 10px 0; }
.trial-ph input { display: block; width: 100%; max-width: 260px; margin-top: 4px; font-size: 16px; padding: 6px 8px; }
.locked-card { max-width: 560px; margin: 48px auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; text-align: center; }
.locked-card h2 { margin: 0 0 10px; font-size: 18px; }
.locked-card p { color: var(--muted); font-size: 14px; margin: 0 0 16px; white-space: pre-line; }
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; background: #fff; }
.adm-tbl { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.adm-tbl th { position: sticky; top: 0; background: #eef2f7; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-tbl td { padding: 6px 8px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.adm-tbl .c { text-align: center; }
.adm-tbl tr.dirty td { background: #fffbea; }
.adm-tbl tr.st-pending td:first-child { box-shadow: inset 3px 0 0 #f0ad4e; }
.adm-tbl tr.st-blocked td { color: #9aa3ad; }
.adm-tbl .nowrap { white-space: nowrap; }
.u-cell { display: flex; gap: 8px; align-items: center; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-width: 520px; }
.tool-chips .chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; cursor: pointer; background: #f8f9fa; font-size: 12px; }
.tool-chips .chip.on { background: #e7f1ff; border-color: #9ec5fe; color: var(--accent); }
.tool-chips .chip input { margin: 0; }
@media (max-width: 700px) { .auth-box { width: 100%; flex-wrap: wrap; } }

/* ---- hướng dẫn & chú thích nhanh ---- */
#qtip { position: fixed; z-index: 2000; background: #1f2937; color: #fff; font-size: 12.5px; line-height: 1.45; padding: 7px 10px;
  border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.25); pointer-events: none; white-space: pre-line; }
.help-top { margin-left: 4px; }
#help-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 900; width: 44px; height: 44px;
  border-radius: 50%; border: 0; background: var(--accent); color: #fff; font: 700 20px/44px "Segoe UI", sans-serif; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#help-fab:hover { filter: brightness(1.1); }
.help .help-sec { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 8px; background: #fff; }
.help .help-sec > summary { cursor: pointer; font-weight: 700; padding: 8px 12px; color: var(--accent); }
.help .help-sec[open] > summary { border-bottom: 1px solid var(--line); }
.help .help-sec > p, .help .help-sec > ol, .help .help-sec > ul { margin: 8px 12px; }
.help ol li, .help ul li { margin: 3px 0; }
.help .help-notes { color: var(--muted); }

/* ---- điện thoại & màn hình hẹp ---- */
img, svg, video, canvas { max-width: 100%; }
@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  .btngrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  html, body { font-size: 14px; }
  .topbar { padding: 6px 10px; gap: 6px 10px; }
  .author { display: none; }
  .host-info { margin-left: 0; width: 100%; }
  .maintabs { padding: 6px 8px 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .maintabs::-webkit-scrollbar { display: none; }
  .maintabs button, .subtabs button { white-space: nowrap; flex: none; padding: 9px 12px; }
  .subtabs { overflow-x: auto; scrollbar-width: none; }
  main { padding: 10px 10px 80px; }
  .page-title { font-size: 15px; }
  /* bỏ độ rộng cố định viết trong HTML (style="width:…") để không tràn màn hình */
  main input:not([type=checkbox]):not([type=radio]):not([type=number]), main select, main textarea { max-width: 100%; }
  main input[style*="width"], main select[style*="width"] { width: auto !important; flex: 1 1 140px; min-width: 0; }
  .row > * { min-width: 0; }
  .btn { padding: 8px 12px; }
  .btn.bigbtn, .btn.big { width: 100%; }
  .split, .split.three { flex-direction: column; }
  .card { padding: 8px; }
  fieldset { min-width: 0; }
  .sticky-head { position: static; }
  pre.log, .log { max-width: 100%; overflow: auto; }
  .statusbar { flex-wrap: wrap; }
  .modal, .modal.wide { width: calc(100vw - 20px) !important; max-width: none !important; }
  /* tránh iOS tự phóng to khi chạm ô nhập (cỡ chữ < 16px) */
  input, select, textarea { font-size: 16px; }
}

/* ---- thông báo phiên bản thử nghiệm (BETA) ---- */
.beta-badge { margin-left: 6px; font: 700 11px "Segoe UI", sans-serif; color: #7a4d00; background: #ffe8a3; border: 1px solid #f0c64a;
  border-radius: 10px; padding: 1px 8px; cursor: pointer; vertical-align: middle; }
.beta-badge:hover { background: #ffdc73; }
.welcome { font-size: 13.5px; line-height: 1.6; }
.welcome .lead { font-size: 14.5px; margin: 0 0 10px; }
.welcome ul { margin: 6px 0 10px; padding-left: 20px; }
.welcome li { margin: 3px 0; }
.welcome .free { background: #e8f5e9; border: 1px solid #b7dfb9; color: #1b5e20; border-radius: 6px; padding: 8px 12px; margin: 10px 0; font-weight: 600; }
.welcome .contact { background: #f1f5fb; border: 1px solid #d3deee; border-radius: 6px; padding: 8px 12px; margin-top: 10px; }
.welcome .contact a { color: var(--accent); font-weight: 700; }
.welcome .noshow { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 12.5px; cursor: pointer; }

/* ---- RAML Compiler: mẫu thật ---- */
.raml-note { margin: 0 0 8px; font-size: 12.5px; }
.raml-note code { background: #fff3cd; padding: 0 4px; border-radius: 3px; }
details.raml-more { margin: 2px 0 8px; }
details.raml-more summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 4px; }

/* ---- Báo cáo tiến độ thông minh ---- */
.sr-panel { max-width: 1180px; margin: 12px auto; }
.sr-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin: 8px 0; }
.sr-roles label { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; color: var(--muted); }
.sr-roles select { font-weight: 400; }
.sr-ms select { padding: 2px 4px; }
.sr-ms td.c { text-align: center; }
.sr-ms tr.off td { color: var(--muted); }
.sr-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.sr-kpi { border: 1px solid #d8e2ee; border-radius: 8px; padding: 8px 10px; background: #f8fbff; }
.sr-kpi .t { font-size: 12px; color: var(--muted); font-weight: 600; }
.sr-kpi .v { font-size: 20px; font-weight: 700; color: var(--accent); }
.sr-kpi .s { font-size: 12px; color: #2e7d32; font-weight: 600; }
.sr-kpi .bar { height: 5px; background: #e3e9f1; border-radius: 3px; margin-top: 5px; overflow: hidden; }
.sr-kpi .bar i { display: block; height: 100%; background: var(--accent); }
.sr-kpi.warn { background: #fff5f5; border-color: #f3c4c4; }
.sr-kpi.warn .v { color: #c62828; }
.sr-narr { margin: 4px 0 10px; padding-left: 18px; }
.sr-narr li { margin: 2px 0; }
.sr-sub { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 4px; }
.sr-sub button { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 3px 12px; cursor: pointer; font-size: 12.5px; }
.sr-sub button.on { background: #e7f1ff; border-color: #9ec5fe; color: var(--accent); font-weight: 700; }
.sr-dash table.grid td.n, .sr-dash table.grid th.n { text-align: right; }
.sr-dash table.grid tr.tot td { font-weight: 700; background: #fff8e1; }
.sr-dash table.grid td.bad { background: #fde2e1; }
.sr-dash table.grid td.good { background: #e3f6e8; }
.sr-chart { width: 100%; height: auto; display: block; }

/* ---- Link tải phần mềm trạm (SW) ---- */
.sw-card { border: 1px solid #b7dfc0; background: #f3fbf5; border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
.sw-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sw-note { color: var(--muted); font-size: 12px; }
#sw-list table { margin-top: 6px; }
.adm-sw input { width: 100%; box-sizing: border-box; }
.adm-sw td { vertical-align: middle; }
.sr-panel fieldset { min-width: 0; }
.sr-chart { max-height: 320px; }

/* ---- Điều hướng 2 tầng: cụm (RAN / NETWORK / DATACENTER) → tool ---- */
.maintabs .nav-sep { width: 1px; background: var(--line); margin: 4px 8px 6px; flex: none; }
.maintabs button[data-domain] { letter-spacing: .3px; }
.maintabs button[data-domain].active { box-shadow: inset 0 3px 0 var(--accent); }
.tooltabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px 16px; background: #fff;
  border-bottom: 1px solid var(--line); position: sticky; top: 38px; z-index: 19; }
.tooltabs button { border: 1px solid #cdd6e1; background: #f4f7fb; color: #3d4a5a; border-radius: 18px; padding: 6px 14px;
  font: 600 13px "Segoe UI", sans-serif; cursor: pointer; }
.tooltabs button:hover { background: #e9f1fc; }
.tooltabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tool-intro { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; }
.tool-intro a { font: 700 13px "Segoe UI", sans-serif; color: #fff; text-decoration: none; padding: 8px 15px; border: 0; border-radius: 18px;
  background: linear-gradient(135deg, #12b3a6, #0d9488); box-shadow: 0 3px 11px rgba(13,148,136,.38); white-space: nowrap; }
.tool-intro a:hover { filter: brightness(1.07); text-decoration: none; }
.tool-intro .intro-copy { border: 1px solid #9fd8d1; background: #e6f7f4; color: #0b7a70; border-radius: 18px; padding: 8px 13px;
  font: 700 13px "Segoe UI", sans-serif; cursor: pointer; white-space: nowrap; }
.tool-intro .intro-copy:hover { background: #d4f0ec; }
.tool-intro .intro-home { font: 700 13px "Segoe UI", sans-serif; color: #fff; padding: 8px 16px; border: 0; border-radius: 18px; cursor: pointer;
  background: linear-gradient(135deg, #12b3a6, #0d9488); box-shadow: 0 3px 11px rgba(13,148,136,.38); white-space: nowrap; }
.tool-intro .intro-home:hover { filter: brightness(1.07); }
.tool-intro .intro-data { font: 700 13px "Segoe UI", sans-serif; color: #fff; padding: 8px 15px; border: 0; border-radius: 18px; cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 3px 11px rgba(79,70,229,.34); white-space: nowrap; }
.tool-intro .intro-data:hover { filter: brightness(1.07); }
@media (max-width: 640px) { .tool-intro { margin-left: 0; } }
/* Bảng "Cách lấy dữ liệu" (tab theo vendor + chép lệnh) */
.dc-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(10,20,40,.55); display: flex; align-items: center; justify-content: center;
  padding: 18px; overflow-y: auto; }
.dc-card { position: relative; background: #fff; border-radius: 16px; width: 640px; max-width: 100%; max-height: 92vh; overflow-y: auto;
  padding: 18px 20px 16px; box-shadow: 0 24px 70px rgba(8,18,40,.4); }
.dc-x { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e3e8f1; background: #fff; color: #475467; font-size: 15px; cursor: pointer; line-height: 1; }
.dc-x:hover { background: #f1f3f5; }
.dc-h { margin: 0 0 10px; font: 700 18px system-ui; color: #0e1726; }
.dc-needs { font: 400 13px/1.55 system-ui; color: #344054; background: #eef5ff; border: 1px solid #dbe8ff; border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; }
.dc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.dc-tab { font: 600 12.5px system-ui; color: #475467; background: #f1f3f7; border: 1px solid #e3e8f1; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.dc-tab.on { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.dc-pane { display: none; }
.dc-pane.on { display: block; }
.dc-item { border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 12px; margin-bottom: 9px; }
.dc-it-h { font: 700 13px system-ui; color: #16324f; margin-bottom: 6px; }
.dc-cmd { display: flex; align-items: center; gap: 8px; background: #0e1726; border-radius: 8px; padding: 8px 10px; }
.dc-cmd code { flex: 1; font: 500 13px/1.5 ui-monospace, "Cascadia Code", Consolas, monospace; color: #e8eefc; white-space: pre-wrap; word-break: break-word; }
.dc-copy { flex: none; background: #273043; border: 0; color: #cdd6ea; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 13px; }
.dc-copy:hover { background: #38435c; color: #fff; }
.dc-note { font: 400 12px/1.5 system-ui; color: #667085; margin-top: 6px; }
.dc-note.dc-ptop { margin: 0 0 9px; background: #f7f9fc; border: 1px solid #eef1f6; border-radius: 8px; padding: 8px 10px; }
.dc-foot { margin-top: 10px; font: 400 11.5px/1.5 system-ui; color: #98a2b3; text-align: center; }
.dc-note.dc-vernote { background: #fff8ec; border: 1px solid #f6e3bf; border-radius: 9px; padding: 8px 11px; margin: -4px 0 12px; color: #7a5b17; }
.dc-ver { background: #f4f0ff; border: 1px solid #e2d8ff; border-radius: 10px; padding: 9px 11px; margin-bottom: 11px; }
.dc-ver-h { font: 700 12px system-ui; color: #5b3fb0; margin-bottom: 6px; }
.dc-ver-doc { font: 400 12px/1.5 system-ui; color: #475467; margin-top: 6px; }
.dc-ver-doc a { color: #4f46e5; font-weight: 600; }
/* ⌘K Command palette */
.cp-open { font: 700 11px ui-monospace, Consolas, monospace; color: #475467; background: #eef1f7; border: 1px solid #d7dde7; border-radius: 7px; padding: 3px 8px; cursor: pointer; margin-left: 4px; }
.cp-open:hover { background: #e2e8f2; color: #0e1726; }
.cp-ov { position: fixed; inset: 0; z-index: 1200; background: rgba(10,18,38,.5); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; animation: cpF .12s ease; }
@keyframes cpF { from { opacity: 0 } to { opacity: 1 } }
.cp-box { width: 600px; max-width: 100%; background: #fff; border-radius: 14px; box-shadow: 0 24px 70px rgba(8,18,40,.45); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.cp-inp-row { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid #eef1f6; }
.cp-mag { font-size: 16px; opacity: .7; }
.cp-inp { flex: 1; border: 0; outline: none; font: 400 16px system-ui; color: #0e1726; padding: 0; background: transparent; }
.cp-list { overflow-y: auto; padding: 6px; }
.cp-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; cursor: pointer; }
.cp-item.on { background: #eef2ff; }
.cp-ic { width: 22px; text-align: center; font-size: 15px; }
.cp-nm { flex: 1; font: 500 14px system-ui; color: #16324f; }
.cp-grp { font: 600 10.5px system-ui; color: #8a93a3; background: #f1f3f7; padding: 2px 8px; border-radius: 999px; }
.cp-item.on .cp-grp { background: #dde6ff; color: #4f46e5; }
.cp-empty { padding: 22px; text-align: center; color: #8a93a3; font: 400 13.5px system-ui; }
.cp-foot { padding: 8px 14px; border-top: 1px solid #eef1f6; font: 400 11.5px system-ui; color: #98a2b3; display: flex; justify-content: space-between; }
.cp-foot kbd { font: 600 10.5px ui-monospace, monospace; background: #f1f3f7; border: 1px solid #e3e8f1; border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: #475467; }
.flow-strip { background: #eef5ff; border: 1px solid #cfe0f7; border-radius: 6px; padding: 6px 12px; margin: 0 0 8px; font-size: 13px; }
.flow-strip i { color: var(--muted); }
.dc-card { max-width: 640px; }
.dc-card h2 { font-size: 22px; }
@media (max-width: 700px) {
  .tooltabs { padding: 6px 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; top: 40px; }
  .tooltabs button { white-space: nowrap; flex: none; }
  .maintabs .nav-sep { margin: 4px 4px 6px; }
}
#tab-mt > .subtabs { display: none; }   /* tool NETWORK chọn ở thanh tool phía trên */
.preview-pre { max-height: 60vh; overflow: auto; white-space: pre; font-size: 12.5px; }
.preview-tbl { max-height: 60vh; }
.preview-tbl th { position: static; cursor: default; }

/* ---- DATACENTER (thử nghiệm) ---- */
.trial-badge { font-size: 11px; font-weight: 700; background: #fff3cd; color: #8a6100; border: 1px solid #f2d27a; border-radius: 10px; padding: 1px 8px; vertical-align: middle; }
table.grid td.good { background: #e3f6e8; } table.grid td.bad { background: #fde2e1; } table.grid td.warnc { background: #fff4d6; }
table.grid td.n, table.grid th.n { text-align: right; }
.dc-bar { position: relative; height: 16px; min-width: 90px; background: #eef1f5; border-radius: 3px; overflow: hidden; }
.dc-bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.dc-bar span { position: relative; font-size: 11px; font-weight: 700; padding-left: 4px; color: #222; }
.dc-racks { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 12px; align-items: flex-start; }
.dc-rack { flex: none; width: 200px; background: #fff; border: 1px solid #c9d1db; border-radius: 6px; box-shadow: 0 1px 2px #0001; }
.dc-rack .rh { padding: 6px 8px; border-bottom: 1px solid #e3e7eb; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.dc-rack .rh span { color: var(--muted); }
.dc-rack .rb { display: flex; padding: 4px; background: #2b2f36; border-radius: 0 0 6px 6px; }
.dc-rack .ul { display: grid; width: 22px; }
.dc-rack .ul .u { font-size: 9px; color: #9aa3ad; text-align: right; padding-right: 3px; line-height: 15px; }
.dc-rack .slots { display: grid; flex: 1; gap: 0; background: repeating-linear-gradient(#3a3f47 0 14px, #2b2f36 14px 15px); }
.dc-rack .dev { color: #fff; font-size: 10px; font-weight: 600; border: 1px solid #0006; border-radius: 2px; padding: 0 4px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; cursor: default; }
.dc-rack .dev.dim { opacity: .25; } .dc-rack .dev.hit { outline: 2px solid #ffd54f; z-index: 1; }
.dc-leg { font-size: 12px; margin-left: 10px; white-space: nowrap; } .dc-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.dc-h3 { font-size: 15px; margin: 14px 0 6px; color: var(--accent); }
.dc-findings { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 6px; }
.dc-f { border: 1px solid #dfe3e8; border-left: 4px solid #adb5bd; border-radius: 4px; padding: 6px 8px; font-size: 12.5px; background: #fff; }
.dc-f.bad { border-left-color: #c62828; background: #fff7f7; } .dc-f.warnc { border-left-color: #f0a400; background: #fffbf0; } .dc-f.good { border-left-color: #2e7d32; }
.dc-f .d { color: #555; margin-top: 2px; } .dc-f .fix { margin: 4px 0 0; background: #f4f6f9; padding: 4px 6px; font-size: 11.5px; white-space: pre-wrap; }
@media (max-width: 700px) { .dc-findings { grid-template-columns: 1fr; } }
.tag { font-size: 10.5px; font-weight: 700; border-radius: 8px; padding: 0 6px; margin-left: 4px; }
.tag.ok { background: #e3f6e8; color: #2e7d32; } .tag.guess { background: #fff4d6; color: #8a6100; }
.tag.hand { background: #e7f1ff; color: var(--accent); } .tag.none { background: #f1f3f5; color: #868e96; }

/* ---- Thanh "Dùng thử dữ liệu mẫu" ---- */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: #f3f0ff; border: 1px dashed #b9a7f5;
  border-radius: 8px; padding: 6px 10px; margin: 0 0 10px; font-size: 12.5px; }
.demo-btn { background: #6f42c1 !important; color: #fff !important; border-color: #6f42c1 !important; font-weight: 700; }
.demo-btn:disabled { opacity: .6; }
.demo-files a { color: #5a32a3; } .demo-txt { flex: 1 1 380px; }

/* ---------- NETWORK: kiểm tra cổng / LLDP / so sánh / sinh cấu hình / IP toolbox ---------- */
.area-short { height: 90px; }
.tag.bad { background: #fde2e2; color: #c62828; }
.port-mx td.c, .port-mx th.c { text-align: center; padding: 3px 5px; }
.port-mx th.c { font-size: 11.5px; line-height: 1.15; }
.port-mx th.c .muted { font-size: 10px; font-weight: 400; }
.port-mx td.good { background: #e3f6e8; color: #1b5e20; font-weight: 700; }
.port-mx td.warnc { color: #8a6100; }
.lldp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; margin: 8px 0 4px; }
.lldp-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lldp-canvas { border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; background-image: radial-gradient(#dde3ea 1px, transparent 1px); background-size: 20px 20px; touch-action: none; }
.lldp-canvas svg { width: 100%; height: auto; display: block; max-height: 72vh; user-select: none; }
:root[data-theme="dark"] .lldp-canvas { background: #0f1620; background-image: radial-gradient(#263142 1px, transparent 1px); }
.diff-blocks { display: flex; flex-direction: column; gap: 6px; max-height: 620px; overflow: auto; }
.diff-b { border: 1px solid #dfe3e8; border-radius: 6px; background: #fff; overflow: hidden; }
.diff-b .bh { background: #f4f6f9; padding: 4px 8px; font-size: 12.5px; border-bottom: 1px solid #e5e8ec; }
.df { font-family: Consolas, 'Courier New', monospace; font-size: 12px; padding: 1px 8px; white-space: pre-wrap; word-break: break-all; }
.df.add { background: #e6ffec; } .df.del { background: #ffebe9; }
.df .sg { display: inline-block; width: 14px; font-weight: 700; } .df.add .sg { color: #1a7f37; } .df.del .sg { color: #cf222e; }
.df .pth { color: #6e7781; }
.diff-script, .gen-prev { max-height: 560px; overflow: auto; white-space: pre; font-size: 12px; }
.udiff { max-height: 520px; overflow: auto; font-size: 12px; }
.udiff .a { background: #e6ffec; color: #116329; display: inline-block; width: 100%; } .udiff .d { background: #ffebe9; color: #82071e; display: inline-block; width: 100%; }
.udiff .h { color: #8250df; font-weight: 700; }
.gen-prev mark { background: #ffd8d8; color: #b00020; border-radius: 3px; }

/* ---------- 📍 dẫn tới vị trí: nháy viền + dòng/ô được chọn ---------- */
@keyframes ntFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); } 15%, 60% { box-shadow: 0 0 0 4px rgba(220, 53, 69, .55); } }
.nt-flash { animation: ntFlash 1.3s ease-in-out 2; outline: 2px solid #dc3545 !important; outline-offset: 2px; }
tr.nt-hl > td { background: #ffe3e3 !important; }
tr.nt-hl > td:first-child { box-shadow: inset 4px 0 0 #dc3545; }
.nt-go { cursor: pointer; }
td.nt-cell { outline: 3px solid #dc3545 !important; outline-offset: -3px; font-weight: 700; background: #ffd6d6 !important; }
.dc-f.nt-hl, .ptp-tn.nt-hl, .nt-hl.dc-f { outline: 3px solid #dc3545; outline-offset: 1px; }
.ptp-tn.nt-hl { background: #ffe3e3; border-radius: 4px; }
.bp-site.nt-hl { outline: 3px solid #dc3545; outline-offset: 2px; border-radius: 6px; }
.iss-detail { margin: 8px 0; display: grid; gap: 4px; border-width: 2px; }
.iss-detail code { background: rgba(0,0,0,.06); padding: 0 4px; border-radius: 3px; }
.iss-detail .row .btn { margin: 2px 4px 2px 0; }
.iss-where { overflow-wrap: anywhere; }
.nt-go:hover { filter: brightness(.97); box-shadow: 0 0 0 2px #9ec5fe; }
.nt-go .go-hint { float: right; font-size: 11px; color: #0d6efd; font-weight: 600; }
.dc-rack.nt-hl { outline: 3px solid #dc3545; outline-offset: 3px; border-radius: 6px; }
.dc-rack .dev.nt-hl { outline: 3px solid #ffd400; z-index: 2; box-shadow: 0 0 0 3px #dc3545; }
.cfg-view { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; font-family: Consolas, 'Courier New', monospace; font-size: 12px; }
.cfg-view .ln { display: flex; white-space: pre; }
.cfg-view .ln i { flex: 0 0 48px; text-align: right; padding-right: 8px; color: #8c959f; font-style: normal; user-select: none; border-right: 1px solid #e5e8ec; margin-right: 6px; }
.cfg-view .ln.hit { background: #ffe3e3; } .cfg-view .ln.hit i { color: #c62828; font-weight: 700; }

.helper-steps { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 10px; padding: 10px 12px; background: #f6faff; border: 1px solid #d8e2ee; border-radius: 8px; }
.helper-steps a.btn { color: #fff; text-decoration: none; display: inline-block; }

.hs-status { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 8px; background: #f0f6ff; border: 1px solid #c9dcf5; font-size: 14.5px; margin-bottom: 8px; }
.hs-status .hs-ic { font-size: 26px; line-height: 1; }
.spin { display: inline-block; animation: hsSpin 1.4s linear infinite; } @keyframes hsSpin { to { transform: rotate(360deg); } }
.hs-trouble { margin-top: 10px; padding: 10px 14px; border-radius: 8px; background: #fff8e6; border: 1px solid #f1d38a; font-size: 13.5px; }
.hs-trouble ol { margin: 6px 0 8px 18px; padding: 0; } .hs-trouble li { margin: 4px 0; }
.hs-allow { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #fff; border: 2px dashed #f0ad4e; font-size: 13.5px; font-weight: normal; }
.sr-kpi.bad { background: #fff0f0; border-color: #f1aeb5; } .sr-kpi.bad .v { color: #c62828; }
.sr-kpi.good .v { color: #2e7d32; }
.ptp-tree { padding: 6px 4px; } .ptp-tn { padding: 3px 6px; cursor: pointer; border-left: 2px solid #d0d7e2; font-size: 13.5px; } .ptp-tn:hover { background: #f0f6ff; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 12px; margin-bottom: 6px; }
.cr-grid label, label.full { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: #34495e; }
.cr-grid input, .cr-grid select, label.full input, label.full textarea { font-weight: normal; }
label.full { margin: 6px 0; }
.cr-mail { white-space: pre-wrap; background: #f8fafc; border: 1px solid #d0d7e2; border-radius: 6px; padding: 10px; font-size: 13px; max-height: 420px; overflow: auto; }
.cr-node { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 10px; background: #e8f0fe; cursor: pointer; font-size: 12.5px; }
.cr-node.sel { background: #0d6efd; color: #fff; }
.cr-pre { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .cr-pre pre { margin: 0; max-height: 360px; overflow: auto; background: #0f172a; color: #e2e8f0; padding: 8px; border-radius: 6px; font-size: 12px; }
.kpi-chart { background: #fff; border: 1px solid #d0d7e2; border-radius: 6px; padding: 6px; overflow-x: auto; }
.kpi-chart svg { width: 100%; min-width: 600px; height: 280px; }
.tk-cmd { background: #0f172a; color: #e2e8f0; padding: 8px 10px; border-radius: 6px; font-size: 12.5px; white-space: pre-wrap; }
.tk-admin table input { width: 100%; box-sizing: border-box; font-size: 12.5px; }
@media (max-width: 760px) { .cr-pre { grid-template-columns: 1fr; } }
.bp-cats { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.bp-cat { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid #d0d7e2; border-radius: 6px; background: #f8fafc; font-size: 13px; }
.bp-site > summary { font-size: 13px; }
.bp-df { padding: 6px 8px; border: 1px solid #d0d7e2; border-radius: 6px; margin: 4px 0; background: #fbfcfe; }
.bp-df.need { border-color: #dc3545; background: #fff5f5; }
.bp-df .row { flex-wrap: wrap; gap: 6px; }
.bp-filter .row { flex-wrap: wrap; gap: 6px; }
.bp-vals { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 160px; overflow: auto; padding: 4px 2px; border: 1px dashed #d0d7e2; border-radius: 6px; margin: 4px 0; }
.bp-cond { border-left: 3px solid #0d6efd; padding-left: 8px; margin: 4px 0; }

/* ⏳ khung "đang chạy" nổi góc dưới trái */
.busy { position: fixed; left: 16px; bottom: 16px; z-index: 9000; width: min(380px, calc(100vw - 32px)); background: #fff; border: 1px solid #b6d4fe;
  border-left: 4px solid #0d6efd; border-radius: 8px; box-shadow: 0 6px 24px rgba(13,110,253,.18); padding: 8px 12px; font-size: 12.5px; display: grid; gap: 4px; }
.busy-h { display: flex; align-items: center; gap: 8px; }
.busy-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0a3d91; }
.busy-t { font-variant-numeric: tabular-nums; color: #0d6efd; font-weight: 700; }
.busy-d { color: #333; overflow-wrap: anywhere; }
.busy-tip { color: #6c757d; font-size: 11.5px; }
.busy .spin { width: 14px; height: 14px; border: 2px solid #cfe2ff; border-top-color: #0d6efd; border-radius: 50%; animation: busySpin .8s linear infinite; flex: none; }
.busy-bar { height: 5px; background: #e7f1ff; border-radius: 3px; overflow: hidden; position: relative; }
.busy-bar i { display: block; height: 100%; background: #0d6efd; border-radius: 3px; transition: width .4s; }
.busy-bar.ind i { position: absolute; animation: busyInd 1.3s ease-in-out infinite; }
@keyframes busySpin { to { transform: rotate(360deg); } }
@keyframes busyInd { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .busy .spin, .busy-bar.ind i { animation-duration: 3s; } }
.busy-btn { position: relative; opacity: .85; }
.busy-btn::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 6px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busySpin .8s linear infinite; }
.cfg-view.ok .ln.hit { background: #d1f2db; } .cfg-view.ok .ln.hit i { color: #198754; }
.dc-f.good.nt-go .go-hint { color: #198754; }
tr.ok-hl > td { background: #d1f2db !important; } tr.ok-hl > td:first-child { box-shadow: inset 4px 0 0 #198754; }
.ok-hl:not(tr) { outline: 3px solid #198754; outline-offset: 1px; }

/* ---------- v1.9.30: cài ứng dụng · kéo thả file · lịch sử · xuất báo cáo · thống kê quản trị */
.pwa-btn { margin-left: 8px; background: #e8f1ff; border-color: #9ec5fe; color: #0b5ed7; font-weight: 600; }
#smart-drop { position: fixed; inset: 0; z-index: 9000; background: rgba(13, 110, 253, .12); border: 4px dashed #0d6efd; display: grid; place-items: center; pointer-events: none; }
#smart-drop[hidden] { display: none; }
#smart-drop > div { background: #fff; padding: 22px 30px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.18); text-align: center; line-height: 1.7; font-size: 15px; max-width: 520px; }
#smart-drop b { font-size: 19px; color: #0b5ed7; }
.smart-pick { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.smart-pick .btn { text-align: left; justify-content: flex-start; }
.smart-toast { display: flex; align-items: center; gap: 8px; }
.smart-toast .btn { background: #fff; color: #0b5ed7; }
.smart-bar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin: 6px 0; }
.smart-bar[hidden] { display: none; }
.hs { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 12px; background: #f1f3f5; }
.hs.bad { background: #fde8e8; color: #b42318; } .hs.warn { background: #fff4e5; color: #9a6700; } .hs.good { background: #e7f6ec; color: #1a7f37; }
.cmp-head { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cmp-list { max-height: 30vh; overflow: auto; margin: 4px 0 10px; padding-left: 18px; font-size: 13px; }
.cmp-list li { margin: 2px 0; }
.hist-view { max-height: 65vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 8px; }
.hist-view button, .hist-view .go-hint { pointer-events: none; opacity: .5; }
.rank-list { margin: 4px 0 10px; font-size: 13px; }
.rank-row { display: grid; grid-template-columns: 26px minmax(140px, 260px) 1fr auto; gap: 8px; align-items: center; margin: 3px 0; }
.rank-n { color: #6c757d; text-align: right; }
.rank-bar { background: #eef2f7; border-radius: 4px; height: 10px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #0d6efd, #6ea8fe); }
.rank-v { color: #495057; white-space: nowrap; }
tr.err-hot td { background: #fff5f5; }
@media (max-width: 700px) { .rank-row { grid-template-columns: 22px 1fr auto; } .rank-bar { display: none; } .pwa-btn { margin: 4px 0 0; } }
/* xóa người dùng (Quản Trị) */
.btn.danger { background: #dc3545; border-color: #dc3545; color: #fff; }
.btn.danger:disabled { opacity: .45; cursor: not-allowed; }
.del-user { margin-left: 6px; color: #b42318; }
.del-info > div { margin: 6px 0; }
.del-warn { background: #fff4e5; border: 1px solid #ffc078; border-radius: 8px; padding: 8px 10px; color: #7a4b00; }
.del-warn .adm-tbl { margin-top: 6px; background: #fff; }
.del-confirm { display: block; margin-top: 10px; padding: 8px 10px; border: 1px solid #f1aeb5; border-radius: 8px; background: #fff5f5; }
/* 📡 Soát PCI · 📐 máy tính viễn thông */
.pci-tbl tr { cursor: pointer; }
.pci-tbl tr.pci-bad td { background: #fff5f5; } .pci-tbl tr.pci-warn td { background: #fffaf0; }
.pci-tbl td.bad { color: #b42318; } .pci-tbl td.warnc { color: #9a6700; } .pci-tbl td.good { color: #1a7f37; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; margin: 6px 0; }
.calc-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #495057; }
.calc-grid input, .calc-grid select { width: 100%; }
.calc-out { margin-top: 8px; }
.calc-tbl { max-width: 720px; } .calc-tbl td:first-child { color: #495057; width: 46%; }
.calc-tbl td.good b { color: #1a7f37; } .calc-tbl td.bad b { color: #b42318; } .calc-tbl td.warnc b { color: #9a6700; }
/* 🌐 đổi ngôn ngữ */
html.i18n-wait body { visibility: hidden; }
.lang-pick { margin-left: 8px; padding: 2px 6px; border: 1px solid var(--line, #d0d7de); border-radius: 6px; background: #fff; font-size: 12.5px; cursor: pointer; }
@media (max-width: 700px) { .lang-pick { margin: 4px 0 0; } }
.calc-grid label[hidden] { display: none; }
/* 📍 drive-test */
.dt-dist { margin-top: 6px; }
.dt-bar { display: grid; grid-template-columns: 14px 70px 1fr auto; gap: 6px; align-items: center; margin: 3px 0; font-size: 12.5px; }
.dt-c { width: 12px; height: 12px; border-radius: 3px; }
.dt-l { color: #495057; white-space: nowrap; }
.dt-g { background: #eef2f7; border-radius: 4px; height: 12px; overflow: hidden; }
.dt-g i { display: block; height: 100%; }
.dt-v { color: #495057; white-space: nowrap; }

/* ======================= 🏠 Màn hình giới thiệu (trang chủ) ======================= */
#nt-landing { position: fixed; inset: 0; z-index: 1000; overflow-y: auto; background: #eef2f8; color: #0e1726;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
html.nt-app #nt-landing { display: none; }
#nt-landing h1, #nt-landing h2 { letter-spacing: -.01em; }
.lx-top { display: flex; align-items: center; gap: 14px; padding: 14px 24px; max-width: 1180px; margin: 0 auto; }
.lx-brand { font-weight: 800; font-size: 18px; color: #fff; cursor: pointer; }
.lx-tr { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lx-lang { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; border-radius: 9px; padding: 7px 10px; font: 600 13px system-ui; cursor: pointer; }
.lx-lang option { color: #0e1726; }
.lx-hero { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; padding: 26px 24px 56px; }
#nt-landing .lx-top, #nt-landing .lx-hero { position: relative; z-index: 1; }
#nt-landing::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 520px; z-index: 0; pointer-events: none;
  background: radial-gradient(900px 380px at 82% -10%, rgba(23,162,198,.25), transparent 60%), radial-gradient(640px 320px at 8% 120%, rgba(139,92,246,.2), transparent 60%), linear-gradient(160deg, #0a1424, #13243f); }
.lx-hero-txt h1 { color: #fff; font-size: 40px; line-height: 1.1; margin: 0 0 14px; font-weight: 800; }
.lx-lede { color: #b9c8dc; font-size: 17px; line-height: 1.6; max-width: 560px; margin: 0 0 22px; }
.lx-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.lx-btn { display: inline-flex; align-items: center; gap: 7px; padding: 12px 22px; border-radius: 11px; border: 0; cursor: pointer;
  font: 700 15px system-ui; color: #fff; background: linear-gradient(135deg, #12b3a6, #0d9488); box-shadow: 0 7px 18px rgba(13,148,136,.4); }
.lx-btn:hover { filter: brightness(1.07); }
.lx-btn.ghost { background: transparent; color: #cfe6f3; border: 1px solid rgba(207,230,243,.45); box-shadow: none; }
.lx-btn.sm { padding: 8px 14px; font-size: 13.5px; }
.lx-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lx-chip { font: 600 12.5px system-ui; color: #cfe0f0; border: 1px solid rgba(183,208,232,.28); border-radius: 999px; padding: 4px 11px; }
.lx-chip.on { color: #0a1424; background: #8fe3c6; border-color: #8fe3c6; }
.lx-hero-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 40px rgba(0,0,0,.4)); }
.lx-sweep { transform-origin: 150px 168px; animation: lxsweep 7s linear infinite; }
@keyframes lxsweep { to { transform: rotate(360deg); } }
#lx-body { max-width: 1180px; margin: 0 auto; padding: 8px 24px 48px; }
.lx-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.lx-w { background: #fff; border: 1px solid #e3e8f1; border-radius: 14px; padding: 16px; }
.lx-wic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: #eef5fb; margin-bottom: 9px; }
.lx-w b { display: block; font-size: 15px; margin-bottom: 3px; }
.lx-w span { color: #5a6882; font-size: 13.5px; }
.lx-explore { font-size: 22px; margin: 30px 0 4px; }
.lx-cat { margin-top: 20px; }
.lx-cat h2 { font-size: 18px; margin: 0 0 12px; color: #16324f; }
.lx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 13px; }
.lx-tile { text-align: left; background: #fff; border: 1px solid #e3e8f1; border-radius: 13px; overflow: visible; position: relative; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; transition: transform .14s, box-shadow .14s; }
.lx-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(14,30,55,.13); z-index: 60; }
.lx-prev { position: relative; height: 72px; border-bottom: 1px solid #e3e8f1; border-radius: 12px 12px 0 0; overflow: hidden; }
/* thẻ mô tả hiện khi rê chuột vào tool (desktop): hình xem trước + tên + mô tả ngắn lấy từ chính tool */
.lx-tip { display: none; position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%); width: 270px; max-width: 86vw;
  background: #fff; border: 1px solid #e3e8f1; border-radius: 12px; box-shadow: 0 18px 44px rgba(14,30,55,.24); padding: 10px; z-index: 50; pointer-events: none; }
.lx-tip::before { content: ""; position: absolute; top: -7px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: #fff; border-left: 1px solid #e3e8f1; border-top: 1px solid #e3e8f1; }
.lx-tile:hover .lx-tip { display: block; }
.lx-tip-h { display: flex; align-items: center; gap: 6px; font: 700 13.5px system-ui; color: #0e1726; margin-bottom: 5px; }
.lx-tip-d { display: block; font: 400 12.5px/1.55 system-ui; color: #475467; max-height: 132px; overflow: hidden; }
.lx-tip-art { display: block; height: 86px; border-radius: 8px; overflow: hidden; margin-top: 9px; background: #f6f8fc; }
.lx-tip-art svg { width: 100%; height: 100%; display: block; }
@media (hover: none) { .lx-tip { display: none !important; } }
/* Lớp giới thiệu tool (bấm tile → trình bày tính năng trước khi mở) */
.lx-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(10,20,40,.55); display: flex; align-items: center; justify-content: center;
  padding: 18px; overflow-y: auto; animation: lxFade .14s ease; }
@keyframes lxFade { from { opacity: 0; } to { opacity: 1; } }
.lx-modal-card { position: relative; background: #fff; border-radius: 16px; width: 480px; max-width: 100%; max-height: 92vh; overflow-y: auto;
  padding: 18px 20px 20px; box-shadow: 0 24px 70px rgba(8,18,40,.4); }
.lx-modal-x { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e3e8f1; background: #fff;
  color: #475467; font-size: 15px; cursor: pointer; line-height: 1; }
.lx-modal-x:hover { background: #f1f3f5; }
.lx-modal-art { position: relative; height: 136px; border-radius: 12px; overflow: hidden; background: #f6f8fc; border: 1px solid #e3e8f1; margin-bottom: 12px; }
.lx-modal-art svg { width: 100%; height: 100%; display: block; }
.lx-modal-h { margin: 0 0 8px; font: 700 19px system-ui; color: #0e1726; }
.lx-modal-what { margin: 0 0 12px; font: 400 14px/1.6 system-ui; color: #344054; }
.lx-modal-steps { background: #f7f9fc; border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.lx-modal-steps > b { display: block; font: 700 12.5px system-ui; color: #16324f; margin-bottom: 6px; }
.lx-modal-steps ul { margin: 0; padding-left: 18px; }
.lx-modal-steps li { font: 400 12.8px/1.55 system-ui; color: #475467; margin: 5px 0; }
.lx-modal-foot { display: flex; gap: 10px; flex-wrap: wrap; }
.lx-modal-open { flex: 1; min-width: 160px; font: 700 14.5px system-ui; color: #fff; border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer;
  background: linear-gradient(135deg, #12b3a6, #0d9488); box-shadow: 0 4px 14px rgba(13,148,136,.4); }
.lx-modal-open:hover { filter: brightness(1.07); }
.lx-modal-data { font: 700 13.5px system-ui; color: #fff; border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 4px 14px rgba(79,70,229,.34); }
.lx-modal-data:hover { filter: brightness(1.07); }
.lx-modal-close { font: 600 13.5px system-ui; color: #475467; background: #fff; border: 1px solid #d7dde7; border-radius: 12px; padding: 12px 16px; cursor: pointer; }
.lx-modal-close:hover { background: #f1f3f5; }
.lx-modal-note { margin-top: 12px; font: 400 11.8px system-ui; color: #8a93a3; text-align: center; }
.lx-prev svg { width: 100%; height: 100%; display: block; }
.lx-pill { position: absolute; right: 9px; top: 9px; font: 700 10.5px system-ui; padding: 2px 8px; border-radius: 999px; }
.lx-pill.free { background: #e3f6ec; color: #15854a; }
.lx-pill.pro { background: #eae6fe; color: #6b43d6; }
.lx-name { padding: 11px 13px; font: 600 14px system-ui; color: #0e1726; line-height: 1.3; }
@media (max-width: 820px) { .lx-hero { grid-template-columns: 1fr; } .lx-hero-art { order: -1; max-width: 360px; } .lx-hero-txt h1 { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { .lx-sweep { animation-duration: 14s; } }
.lx-foot { margin-top: 34px; padding: 22px 0 6px; border-top: 1px solid #dde4ee; color: #5a6882; font-size: 13.5px; }
.lx-foot .lx-cr { font-weight: 600; color: #334155; }
.lx-foot .lx-sub { margin-top: 5px; }
.lx-foot a { color: #0e7fb0; }
.lx-explore-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 30px 0 4px; }
.lx-explore-row .lx-explore { margin: 0; }
.lx-search { margin-left: auto; min-width: 220px; flex: 0 1 300px; padding: 9px 14px; border: 1px solid #cdd6e1; border-radius: 10px; font: 500 14px system-ui; background: #fff; color: #0e1726; }
.lx-search:focus { outline: 2px solid #12b3a6; border-color: #12b3a6; }
@media (max-width: 560px) { .lx-search { margin-left: 0; flex-basis: 100%; } }
/* 🩺 Bảng sức khỏe hệ thống (Quản Trị) */
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.hl-card { background: #f6f9fd; border: 1px solid var(--line); border-left: 4px solid #0e7fb0; border-radius: 10px; padding: 12px 14px; }
.hl-card.warn { border-left-color: #f59e0b; background: #fff8ec; }
.hl-card.bad { border-left-color: #e23b3b; background: #fef0f0; }
.hl-card .hl-t { font-size: 12.5px; color: #5a6882; font-weight: 600; }
.hl-card .hl-v { font-size: 26px; font-weight: 800; line-height: 1.2; color: #0e1726; }
.hl-card .hl-s { font-size: 12px; color: #5a6882; margin-top: 2px; }

/* ======================= 🌙 DARK MODE ======================= */
.theme-tgl { font-size: 14px; line-height: 1; background: #eef1f7; border: 1px solid #d7dde7; border-radius: 7px; padding: 3px 7px; cursor: pointer; margin-left: 2px; }
.theme-tgl:hover { filter: brightness(.96); }
:root[data-theme="dark"] {
  --bg: #0f141c; --card: #1a2231; --line: #2c3645; --text: #e6edf6; --muted: #98a6ba;
  --accent: #6ea8fe; --blue: #9ec5fe; --green: #4ade80; --red: #f87171;
}
:root[data-theme="dark"] .theme-tgl, :root[data-theme="dark"] .cp-open { background: #222c3a; border-color: #3a475c; color: #cdd8e6; }
:root[data-theme="dark"] .topbar { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] .host-info code { background: #243247; color: var(--accent); }
:root[data-theme="dark"] .maintabs { background: var(--bg); border-color: var(--line); }
:root[data-theme="dark"] .maintabs button, :root[data-theme="dark"] .subtabs button { background: #222c3a; color: #aeb9c8; border-color: var(--line); }
:root[data-theme="dark"] .maintabs button.active, :root[data-theme="dark"] .subtabs button.active { background: var(--card); color: var(--accent); }
:root[data-theme="dark"] .card { border-color: var(--line); }
:root[data-theme="dark"] .card.inner { background: #141b26; }
:root[data-theme="dark"] .mt-header { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #111823; border-color: #333f52; color: var(--text); }
:root[data-theme="dark"] input[readonly] { background: #171f2b; }
:root[data-theme="dark"] input:focus, :root[data-theme="dark"] select:focus, :root[data-theme="dark"] textarea:focus { outline-color: #2d5fa8; border-color: #3b6fc0; }
:root[data-theme="dark"] .hint-blue { color: #86b7ff; }
:root[data-theme="dark"] .hint-blue b { color: #b7d3ff; }
:root[data-theme="dark"] .btn { background: #2a3546; color: #dfe7f1; border-color: #3a475c; }
:root[data-theme="dark"] .btn:hover { filter: brightness(1.12); }
:root[data-theme="dark"] .progress { background: #2a3546; border-color: #3a475c; }
:root[data-theme="dark"] .log.light { background: #0f1620; color: #d7e0ea; border-color: #2c3645; }
:root[data-theme="dark"] .calc-result { background: #0f1620; border-color: #2c3645; color: var(--text); }
:root[data-theme="dark"] .grid-wrap { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] table.grid th { background: #202a39; border-color: #2c3645; color: #cdd8e6; }
:root[data-theme="dark"] table.grid th:hover { background: #27344a; }
:root[data-theme="dark"] table.grid td { border-color: #222c3a; }
:root[data-theme="dark"] table.grid tr:hover td { background: #1c2838; }
:root[data-theme="dark"] table.grid tr.sel td { background: #24405f; color: #eaf2ff; }
:root[data-theme="dark"] .statusbar { background: #141b26; border-color: #2c3645; }
:root[data-theme="dark"] .sticky-head { background: var(--bg); }
/* bảng quản trị + badge */
:root[data-theme="dark"] .adm-tbl th { background: #202a39; color: #cdd8e6; }
:root[data-theme="dark"] .adm-tbl td, :root[data-theme="dark"] .adm-tbl th { border-color: #2c3645; }
:root[data-theme="dark"] .role-badge { background: #243247; color: #9ec5fe; }
:root[data-theme="dark"] .tbl-wrap { border-color: var(--line); }
/* khối sức khỏe hệ thống */
:root[data-theme="dark"] .hl-card { background: #141b26; border-color: #2c3645; }
:root[data-theme="dark"] .hl-card.warn { background: #2a2410; }
:root[data-theme="dark"] .hl-card.bad { background: #2a1414; }
/* landing */
:root[data-theme="dark"] #nt-landing { background: #0d1320; color: #e6edf6; }
:root[data-theme="dark"] #nt-landing::before { opacity: .35; }
:root[data-theme="dark"] .lx-cat h2, :root[data-theme="dark"] .lx-name, :root[data-theme="dark"] .lx-explore { color: #e6edf6; }
:root[data-theme="dark"] .lx-tile { background: #1a2231; border-color: #2c3645; }
:root[data-theme="dark"] .lx-prev { background: #141b26; border-color: #2c3645; }
:root[data-theme="dark"] .lx-why .lx-w, :root[data-theme="dark"] .lx-w { background: #1a2231; border-color: #2c3645; }
:root[data-theme="dark"] .lx-search { background: #111823; border-color: #333f52; color: #e6edf6; }
:root[data-theme="dark"] .lx-tip { background: #1a2231; border-color: #2c3645; }
:root[data-theme="dark"] .lx-tip::before { background: #1a2231; border-color: #2c3645; }
:root[data-theme="dark"] .lx-tip-h { color: #e6edf6; }
:root[data-theme="dark"] .lx-tip-art, :root[data-theme="dark"] .lx-modal-art { background: #141b26; }
/* modal lớp giới thiệu + lấy dữ liệu + palette */
:root[data-theme="dark"] .lx-modal-card, :root[data-theme="dark"] .dc-card, :root[data-theme="dark"] .cp-box { background: #1a2231; color: #e6edf6; }
:root[data-theme="dark"] .lx-modal-h, :root[data-theme="dark"] .dc-h, :root[data-theme="dark"] .cp-nm { color: #e6edf6; }
:root[data-theme="dark"] .lx-modal-what, :root[data-theme="dark"] .lx-modal-steps li { color: #c3cfde; }
:root[data-theme="dark"] .lx-modal-steps { background: #141b26; border-color: #2c3645; }
:root[data-theme="dark"] .lx-modal-x, :root[data-theme="dark"] .dc-x { background: #222c3a; border-color: #3a475c; color: #cdd8e6; }
:root[data-theme="dark"] .lx-modal-close { background: #222c3a; border-color: #3a475c; color: #cdd8e6; }
:root[data-theme="dark"] .dc-needs { background: #11233a; border-color: #244063; color: #cfe0f5; }
:root[data-theme="dark"] .dc-note.dc-vernote { background: #2a2410; border-color: #4a3f1a; color: #e6d08a; }
:root[data-theme="dark"] .dc-tab { background: #222c3a; border-color: #3a475c; color: #aeb9c8; }
:root[data-theme="dark"] .dc-item { border-color: #2c3645; }
:root[data-theme="dark"] .dc-it-h { color: #cfe0f5; }
:root[data-theme="dark"] .dc-ver { background: #1b1830; border-color: #342c5a; }
:root[data-theme="dark"] .dc-note.dc-ptop { background: #141b26; border-color: #2c3645; }
:root[data-theme="dark"] .cp-inp-row, :root[data-theme="dark"] .cp-foot { border-color: #2c3645; }
:root[data-theme="dark"] .cp-inp { color: #e6edf6; }
:root[data-theme="dark"] .cp-item.on { background: #22304a; }
:root[data-theme="dark"] .cp-grp { background: #222c3a; color: #9aa7b8; }
:root[data-theme="dark"] .cp-foot kbd { background: #222c3a; border-color: #3a475c; color: #cdd8e6; }
/* dark: hộp thoại app + menu chuột phải + popup nạp tool + link */
:root[data-theme="dark"] .modal { background: #1a2231; color: #e6edf6; }
:root[data-theme="dark"] .mhead, :root[data-theme="dark"] .mfoot { border-color: #2c3645; }
:root[data-theme="dark"] .mbody th { background: #202a39; }
:root[data-theme="dark"] .mbody th, :root[data-theme="dark"] .mbody td { border-color: #2c3645; }
:root[data-theme="dark"] .ctx { background: #1a2231; border-color: #333f52; color: #e6edf6; }
:root[data-theme="dark"] .ctx .item:hover, :root[data-theme="dark"] .ctx div:hover { background: #22304a; }
:root[data-theme="dark"] .tbl-wrap { background: #1a2231; }
:root[data-theme="dark"] .busy { background: #141b26; border-color: #244063; }
:root[data-theme="dark"] .busy-h b { color: #9ec5fe; }
:root[data-theme="dark"] .busy-d { color: #cfd9e6; }
:root[data-theme="dark"] #terms-link, :root[data-theme="dark"] .lx-foot a { color: #86b7ff; }
:root[data-theme="dark"] .welcome .free { background: #102417; border-color: #1f5131; color: #8fe3a6; }
:root[data-theme="dark"] .welcome .contact { background: #11233a; border-color: #244063; }
:root[data-theme="dark"] .notice-box, :root[data-theme="dark"] .pyboot { background: #2a2410; border-color: #4a3f1a; color: #e6d08a; }
/* Drive-Test: bản đồ phủ sóng canvas tương tác */
.dt-map-ctrls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.dt-map-ctrls .btn.xs.on { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.dt-map-wrap { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#dt-cv { display: block; width: 100%; background: #eef3f8; cursor: grab; }
.dt-tip { position: absolute; display: none; pointer-events: none; background: rgba(16,22,34,.92); color: #fff; font-size: 11.5px; padding: 5px 8px; border-radius: 6px; z-index: 5; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.dt-tip .muted { color: #aab4c4; }
:root[data-theme="dark"] #dt-cv { background: #0f1620; }
/* nút ⌘K + 🌙 trên header trang chủ */
.lx-icbtn { font: 700 12px ui-monospace, Consolas, monospace; color: #334155; background: #fff; border: 1px solid #d7dde7; border-radius: 8px; padding: 6px 9px; cursor: pointer; line-height: 1; }
.lx-icbtn:hover { background: #f1f3f7; }
:root[data-theme="dark"] .lx-icbtn { background: #1a2231; border-color: #333f52; color: #cdd8e6; }
/* 📰 Bài viết & tin ngành trên trang chủ */
.lx-news { max-width: 1120px; margin: 26px auto 0; padding: 0 16px; }
.lx-news-sub { color: var(--muted); margin: 2px 0 16px; font-size: 14px; }
.lx-news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .lx-news-grid { grid-template-columns: 1fr; } }
.lx-news-col { min-width: 0; }
.lx-news-h { font-size: 15px; margin: 0 0 12px; color: var(--text); }
.lx-art-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, box-shadow .15s; }
.lx-art-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.lx-art-k { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.lx-art-card h4 { margin: 3px 0 4px; font-size: 15px; line-height: 1.3; color: var(--text); }
.lx-art-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.lx-news-it { display: block; padding: 10px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.lx-news-it:last-of-type { border-bottom: 0; }
.lx-news-it:hover .lx-news-t { color: var(--accent); }
.lx-news-src { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.lx-news-t { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text); }
.lx-news-d { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.lx-news-more { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }
.lx-news-more:hover { text-decoration: underline; }
.lx-news-cred { margin-top: 12px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
/* 📰 Quản trị nguồn tin */
.news-src-list { display: grid; gap: 5px; margin: 8px 0; }
.news-src { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); flex-wrap: wrap; }
.news-src-n { font-weight: 600; }
.news-tag { font-size: 11px; color: var(--muted); background: rgba(0,86,179,.09); padding: 1px 7px; border-radius: 10px; }
.news-src-u { margin-left: auto; font-size: 12px; color: var(--accent); text-decoration: none; }
.news-src-u:hover { text-decoration: underline; }
.news-fld { display: flex; flex-direction: column; gap: 3px; font-size: 13px; margin-top: 8px; }
.news-fld > span { color: var(--muted); }
.news-fld textarea, .news-fld input { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); }
.news-opts { align-items: flex-end; gap: 12px; flex-wrap: wrap; }
