:root {
  --bg: #f7fafd; --panel: #ffffff; --ink: #344054; --muted: #4e6a80; --line: #dceaf4; --line2: #edf3f8;
  --brand: #1e86d0; --brand-2: #39a4e8; --brand-soft: #e7f2fc; --side: #16284a; --side-ink: #a9b8d4; --side-hi: #ffffff;
  --green: #067647; --green-soft: #e4f4ea; --amber: #b45309; --amber-soft: #fbf1dc; --red: #b42318; --red-soft: #fbe6e3;
  --blue: #0e72ae; --blue-soft: #e4eefa; --purple: #6250d6; --purple-soft: #eee8fb; --gray-soft: #eef0f3;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 20px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Layout */
#app { display: flex; min-height: 100vh; }
.side { width: 256px; flex: none; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; color: var(--side-hi); font-weight: 700; }
.side .brand .logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #29abe2, #0e72ae);
  display: grid; place-items: center; font-size: 13px; color: #fff; }
.side .brand small { display: block; font-weight: 400; font-size: 11px; color: var(--side-ink); }
.side .search { margin: 0 12px 8px; }
.side .search input { width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid #2c426e; background: #1f3360; color: #fff; }
.nav-group { padding: 10px 16px 4px; font-size: 10.5px; letter-spacing: .08em; color: #7f98a2; font-weight: 600; }
.nav-mod > button { width: 100%; text-align: left; background: none; border: 0; color: var(--side-ink); padding: 7px 16px;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-radius: 0; }
.nav-mod > button:hover { background: #163942; color: #fff; }
.nav-mod.open > button { color: #fff; }
.nav-mod .items { display: none; padding: 0 0 6px; }
.nav-mod.open .items { display: block; }
.nav-mod .items a { display: block; padding: 5px 16px 5px 30px; color: #a9bcc4; font-size: 13px; }
.nav-mod .items a:hover { color: #fff; text-decoration: none; background: #163942; }
.nav-mod .items a.active { color: #fff; background: #1b4752; box-shadow: inset 3px 0 0 #29abe2; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 54px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: 20; }
.top .crumb { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .icon-btn { position: relative; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.top .icon-btn .dot { position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff; font-size: 10px;
  border-radius: 10px; padding: 1px 5px; }
.top .menu-btn { display: none; }
.content { padding: 20px; max-width: 1500px; width: 100%; }

/* Components */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card > h3:first-child, .card > h4:first-child { margin-top: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; }
.btn:hover { border-color: #c9d0da; background: #f7fafd; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { color: var(--red); border-color: #f0c7c1; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.input, select.input, textarea.input { width: 100%; padding: 7px 10px; border: 1px solid #d5dbe3; border-radius: 8px; background: #fff; }
.input:focus { outline: 2px solid #9cc6e4; border-color: var(--brand); }
textarea.input { min-height: 74px; resize: vertical; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.tag, .badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--gray-soft); color: #4e6a80; white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 8px 14px; }
.kv > div { overflow-wrap: anywhere; min-width: 0; }
.kv > div:nth-child(odd) { color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Table */
.tbl-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); background: #f7fafd; padding: 9px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: #f5f9fd; }
.tbl td.right, .tbl th.right { text-align: right; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; color: var(--muted); }

/* Status tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs > button { border: 0; background: none; padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs > button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs > button .n { margin-left: 5px; font-size: 11px; background: var(--gray-soft); border-radius: 9px; padding: 0 6px; }

/* Form */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form .fsec { grid-column: 1 / -1; font-weight: 600; color: var(--brand); border-bottom: 1px solid var(--line); padding: 8px 0 4px; margin-top: 4px; }
.form .fld.wide { grid-column: 1 / -1; }
.form label { display: block; font-size: 12.5px; color: #475262; margin-bottom: 4px; font-weight: 500; }
.form label .req { color: var(--red); }
.form .help { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.form .chk { display: flex; align-items: center; gap: 8px; padding-top: 22px; }
.ref { position: relative; }
.ref .dd { position: absolute; z-index: 60; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); max-height: 260px; overflow-y: auto; }
.ref .dd div { padding: 7px 10px; cursor: pointer; }
.ref .dd div:hover, .ref .dd div.hi { background: var(--brand-soft); }

/* Modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 32, .45); z-index: 100; display: flex; align-items: flex-start;
  justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 760px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.sm { max-width: 460px; }
.modal .mh { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal .mh h3 { margin: 0; }
.modal .mb { padding: 16px 18px; max-height: 70vh; overflow-y: auto; }
.modal .mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal .x { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #1f2933; color: #fff; padding: 10px 14px; border-radius: 9px; max-width: 420px; box-shadow: var(--shadow); }
.toast.error { background: #a5281b; } .toast.ok { background: #17663b; }

/* Stats & charts */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); cursor: default; }
.stat.link { cursor: pointer; }
.stat.link:hover { border-color: #b9e1dd; }
.stat .l { color: var(--muted); font-size: 12.5px; }
.stat .v { font-size: 24px; font-weight: 700; margin: 4px 0 2px; }
.stat .s { font-size: 12px; color: var(--muted); }
.stat.green .v { color: var(--green); } .stat.amber .v { color: var(--amber); } .stat.red .v { color: var(--red); } .stat.blue .v { color: var(--blue); }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Workflow */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.step .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--gray-soft); color: var(--muted); }
.step.approve .dot { background: var(--green-soft); color: var(--green); }
.step.reject .dot, .step.return .dot { background: var(--red-soft); color: var(--red); }
.step.current .dot { background: var(--amber-soft); color: var(--amber); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tpl { border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; background: #fff; cursor: pointer; }
.tpl:hover { border-color: var(--brand); background: #f5f9fd; }
.tpl .n { font-weight: 600; }
.tpl .d { color: var(--muted); font-size: 12px; margin-top: 3px; }
.lines-tbl input { width: 100%; padding: 5px 7px; border: 1px solid #d5dbe3; border-radius: 6px; }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.timeline .it { margin-bottom: 10px; }
.timeline .it .t { font-size: 12px; color: var(--muted); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cal .cal-h { background: #f7fafd; padding: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.cal .cal-day { background: #fff; min-height: 92px; padding: 5px 6px; font-size: 12px; }
.cal .cal-day.off { background: #f7fafd; color: #a0a8b3; }
.cal .cal-day.today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal .cal-day .d { font-weight: 600; margin-bottom: 3px; }
.cal .ev { display: block; background: var(--brand-soft); color: var(--brand); border-radius: 5px; padding: 1px 5px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }

/* Kanban */
.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; }
.kanban .col { background: #edf3f8; border-radius: 10px; width: 280px; flex: none; padding: 8px; }
.kanban .col h4 { display: flex; justify-content: space-between; padding: 4px 6px; margin: 0 0 6px; }
.kanban .kc { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; cursor: grab; }
.kanban .col.drop { outline: 2px dashed var(--brand); }

/* Notifications panel */
.notif { position: fixed; top: 54px; right: 12px; width: 380px; max-width: calc(100vw - 24px); max-height: 70vh; overflow-y: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .15); z-index: 90; }
.notif .it { padding: 10px 14px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.notif .it.unread { background: #f3fbfa; }
.notif .it .t { font-weight: 600; }
.notif .it small { color: var(--muted); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(140deg, #16284a 0%, #1e86d0 100%); padding: 16px; width: 100%; }
.login .box { background: #fff; border-radius: 14px; padding: 30px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.login .box h1 { color: var(--brand); }
.login .box .f { margin-bottom: 12px; }

/* Portal (mobile first) */
.portal-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.portal-actions a, .portal-actions button { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; color: var(--ink); text-align: left; }
.big-btn { font-size: 18px; padding: 16px 22px; border-radius: 12px; }

@media (max-width: 1100px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .side { position: fixed; left: -270px; transition: left .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.nav-open .side { left: 0; }
  .top .menu-btn { display: inline-block; }
  .content { padding: 14px 16px; }
  .grid2, .grid3, .grid4, .form { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv > div:nth-child(even) { margin-bottom: 8px; }
}
@media print { .side, .top, .toolbar, .no-print { display: none !important; } .content { padding: 0; } .card { box-shadow: none; } }

/* ===== Giao diện 2.0: sidebar có biểu tượng, thanh trên, tổng quan điều hành ===== */
.side { background: linear-gradient(180deg, #16284a 0%, #1b3160 58%, #16284a 100%); width: 268px; }
.side .brand { padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.side .brand .logo { width: 40px; height: 40px; border-radius: 11px; border: 1px solid rgba(255,255,255,.25); background: rgba(20,184,166,.18); font-weight: 800; }
.side .brand .bt { font-size: 18px; letter-spacing: -.01em; }
.side .brand small { letter-spacing: .14em; text-transform: uppercase; font-size: 9.5px; margin-top: 2px; }
.side .search { margin: 12px 14px 6px; }
.nav-group { padding: 16px 20px 6px; font-size: 10.5px; letter-spacing: .16em; }
.nav-mod > button { padding: 9px 16px 9px 18px; gap: 10px; border-radius: 9px; margin: 1px 8px; width: calc(100% - 16px); }
.nav-mod > button .ic { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-mod > button .lb { flex: 1; text-align: left; }
.nav-mod.open > button { background: rgba(20,184,166,.12); }
.nav-mod .items a { padding: 6px 16px 6px 48px; font-size: 13px; border-radius: 7px; margin: 0 8px; }
.nav-mod .items a.active { box-shadow: inset 3px 0 0 #29abe2; background: rgba(45,212,191,.14); }
.side .foot { margin-top: auto; padding: 12px 18px; font-size: 11.5px; color: #8fb0b8; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 7px; }
.side .foot i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; display: inline-block; }
.top { height: 62px; gap: 14px; }
.top .crumb small { color: var(--muted); font-weight: 400; margin-right: 6px; }
.gsearch { position: relative; width: 300px; }
.gsearch input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f7fafd; }
.gsearch .dd { position: absolute; top: 110%; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.14); max-height: 420px; overflow-y: auto; z-index: 70; }
.gsearch .dd a { display: block; padding: 8px 12px; color: var(--ink); border-bottom: 1px solid var(--line2); }
.gsearch .dd a:hover { background: var(--brand-soft); text-decoration: none; }
.gsearch .dd small { color: var(--muted); display: block; font-size: 11px; }
.who { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.who:hover { background: #f4f6f9; }
.who .nm { text-align: right; line-height: 1.25; }
.who .nm b { display: block; font-size: 13.5px; }
.who .nm span { font-size: 12px; color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.hero { border-radius: 16px; padding: 26px 30px; color: #fff; margin-bottom: 18px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: radial-gradient(circle at 90% 15%, rgba(130,205,255,.28), transparent 46%), linear-gradient(120deg, #16284a 0%, #1e5296 52%, #2f86cf 100%); box-shadow: 0 10px 30px rgba(22,40,74,.26); }
.hero .eyebrow { font-size: 11px; letter-spacing: .2em; font-weight: 700; opacity: .85; }
.hero h1 { font-size: 30px; margin: 6px 0 8px; color: #fff; letter-spacing: -.02em; }
.hero p { margin: 0; opacity: .9; }
.hero .hs { display: flex; gap: 0; align-items: stretch; }
.hero .hs div { padding: 4px 24px; border-left: 1px solid rgba(255,255,255,.25); min-width: 120px; }
.hero .hs b { display: block; font-size: 30px; }
.hero .hs span { font-size: 12.5px; opacity: .9; }
.kpi { position: relative; overflow: hidden; }
.kpi .kh { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi .kic { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.kpi .kic svg { width: 19px; height: 19px; }
.kpi .v { font-size: 30px; margin: 10px 0 4px; }
.kpi .more { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--brand); }
.kpi::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #1e86d0, rgba(30,134,208,.05)); }
.stat.amber .kic { background: var(--amber-soft); color: var(--amber); } .stat.red .kic { background: var(--red-soft); color: var(--red); }
.stat.green .kic { background: var(--green-soft); color: var(--green); } .stat.blue .kic { background: var(--blue-soft); color: var(--blue); }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 180px; }
.donut-legend div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.donut-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
/* Đăng nhập dạng chia đôi */
.login2 { display: grid; grid-template-columns: 1.08fr 1fr; min-height: 100vh; width: 100%; }
.login2 .art { position: relative; overflow: hidden; color: #fff; padding: 56px 64px; display: flex; flex-direction: column;
  background: radial-gradient(circle at 78% 18%, rgba(255,255,255,.18), transparent 42%), radial-gradient(circle at 12% 95%, rgba(255,255,255,.12), transparent 40%), linear-gradient(150deg, #1869b6 0%, #1e86d0 55%, #2f9fe6 100%); }
.login2 .art .lg { display: flex; align-items: center; gap: 14px; }
.login2 .art .lg .logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); font-weight: 800; }
.login2 .art .lg b { font-size: 24px; letter-spacing: -.01em; }
.login2 .art .lg span { border-left: 1px solid rgba(255,255,255,.3); padding-left: 14px; font-size: 11px; letter-spacing: .22em; opacity: .85; }
.login2 .art .mid { margin-top: auto; }
.login2 .art .eyebrow { letter-spacing: .24em; font-size: 12px; font-weight: 700; opacity: .85; }
.login2 .art h2 { font-size: 54px; line-height: 1.04; margin: 18px 0; letter-spacing: -.03em; color: #fff; }
.login2 .art p { font-size: 17px; opacity: .88; max-width: 560px; line-height: 1.55; }
.login2 .art .chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.login2 .art .chips span { border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.login2 .art .ft { margin-top: 34px; font-size: 12.5px; letter-spacing: .06em; opacity: .7; }
.login2 .art svg.deco { position: absolute; right: -60px; top: 120px; width: 520px; opacity: .35; }
.login2 .pane { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.login2 form { width: 100%; max-width: 420px; }
.login2 .welcome { letter-spacing: .2em; font-size: 12px; font-weight: 700; color: var(--brand); }
.login2 h1 { font-size: 34px; margin: 10px 0 6px; letter-spacing: -.02em; }
.login2 .f { margin-bottom: 16px; }
.login2 .f label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.login2 .f input { padding: 12px 14px; border-radius: 10px; }
.login2 .go { width: 100%; justify-content: center; padding: 13px; border-radius: 10px; font-size: 15px; margin-top: 6px; }
.login2 .note { display: flex; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 18px; }
@media (max-width: 900px) { .login2 { grid-template-columns: 1fr; } .login2 .art { display: none; } .gsearch { display: none; } .who .nm { display: none; } .hero .hs div { padding: 4px 14px; min-width: 0; } }
.top .icon-btn { white-space: nowrap; }
@media (max-width: 820px) {
  .top { gap: 6px; padding: 0 10px; }
  .top .crumb small { display: none; }
  .top .icon-btn { padding: 6px 8px; }
}
.chart svg { max-width: 100%; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 230px) 1fr 54px; gap: 12px; align-items: center; color: var(--ink); font-size: 13.5px; padding: 3px 4px; border-radius: 6px; }
a.hbar:hover { background: #f4f8fb; text-decoration: none; }
.hbar .hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .ht { height: 12px; background: #edf3f8; border-radius: 6px; overflow: hidden; }
.hbar .ht i { display: block; height: 100%; border-radius: 6px; }
.hbar .hv { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .hbar { grid-template-columns: 110px 1fr 40px; gap: 8px; } }
/* KPI: một dòng, tự co chữ; bảng số liệu không bóp chữ */
.stat .v { white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .v.pair { white-space: normal; display: flex; flex-direction: column; line-height: 1.15; }
.stat .v.pair .v1, .stat .v.pair .v2 { white-space: nowrap; }
.stat .v.pair .v2 { font-size: .62em; color: var(--muted); font-weight: 600; }
.stat .s { overflow-wrap: anywhere; }
.tbl td { min-width: 0; }
.tbl th { white-space: nowrap; }
.tbl td.right, .tbl th.right { white-space: nowrap; }
.tbl-wrap { -webkit-overflow-scrolling: touch; }
.tbl td:first-child { min-width: 140px; }
.quick { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
.quick .qt { font-weight: 700; margin-bottom: 10px; }
.quick .qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.quick .qa a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 500; }
.quick .qa a:hover { border-color: var(--brand); background: #f5f9fd; text-decoration: none; }
.quick .qi { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.quick .qi svg { width: 18px; height: 18px; }
/* ===== Biểu mẫu chuẩn E-Office ===== */
.form { gap: 14px 18px; }
.form.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form .fsec { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); border-bottom: 1px dashed #cfe3e1; padding: 12px 0 6px; }
.form .fsec:first-child { padding-top: 0; }
.form label { font-size: 12.5px; color: #3c4756; }
.form .input { min-height: 38px; }
.form-card { padding: 20px 22px; }
.formbar { position: sticky; bottom: 0; z-index: 15; display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 14px; box-shadow: 0 -4px 18px rgba(16,24,40,.06); }
.formbar .grow { flex: 1; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 28px 34px 26px; max-width: 980px; margin: 0 auto; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.doc-head { display: flex; justify-content: space-between; gap: 16px; text-align: center; font-size: 13px; margin-bottom: 18px; }
.doc-head .dh-org { font-weight: 700; letter-spacing: .04em; }
.doc-head .dh-co { font-weight: 600; text-transform: uppercase; font-size: 12px; }
.doc-head .dh-br { color: var(--muted); font-size: 12px; }
.doc-head .dh-qh { font-weight: 700; font-size: 12.5px; }
.doc-head .dh-tn { font-weight: 600; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.doc-title { text-align: center; font-size: 19px; font-weight: 800; letter-spacing: .02em; margin: 8px 0 2px; color: #0b4f7a; }
.doc-no { text-align: center; color: var(--muted); font-size: 13px; }
.doc-subject { text-align: center; font-style: italic; margin-top: 4px; }
.doc-meta { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.doc-meta b { color: var(--ink); font-weight: 600; }
.doc-desc { background: #f6f9fb; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #475262; margin-top: 12px; }
.doc-sec { margin-top: 20px; }
.doc-sec .ds-t { font-weight: 700; font-size: 14px; color: #0b4f7a; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #e3f3f2; }
.doc-title-in { font-size: 15px; font-weight: 600; }
.doc-foot { margin-top: 18px; font-size: 12.5px; border-top: 1px dashed var(--line); padding-top: 10px; }
.flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 14px 0 4px; }
.flow .fl-s { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f3f7fa; color: #4e6a80; border: 1px solid #dceaf4; }
.flow .fl-s.done { background: var(--green-soft); color: var(--green); border-color: #c8e8d4; }
.flow .fl-s.cur { background: var(--amber-soft); color: var(--amber); border-color: #f0dcae; font-weight: 600; }
.flow .fl-a { color: #b0b8c4; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks label { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
table.doc-kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc-kv th { width: 34%; text-align: left; font-weight: 500; color: var(--muted); background: #f7fafd; border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.doc-kv td { border: 1px solid var(--line); padding: 8px 10px; white-space: pre-wrap; }
.sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.sig { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; min-height: 140px; display: flex; flex-direction: column; gap: 4px; }
.sig .sg-r { font-size: 11.5px; font-weight: 700; color: #475262; letter-spacing: .03em; }
.sig .sg-m { flex: 1; display: grid; place-items: center; min-height: 54px; }
.sig .sg-m img { max-height: 54px; max-width: 100%; }
.sig .sg-n { font-weight: 600; font-size: 13px; }
.sig .sg-t { font-size: 11.5px; color: var(--muted); }
.sig .sg-note { font-size: 12px; font-style: italic; color: #475262; }
.stamp { display: inline-block; border: 2px solid; border-radius: 6px; padding: 2px 10px; font-weight: 800; font-size: 12px; letter-spacing: .06em; transform: rotate(-4deg); }
.stamp.ok { color: var(--green); } .stamp.no { color: var(--red); } .stamp.wait { color: var(--amber); transform: none; border-style: dashed; }
@media (max-width: 1100px) { .doc-layout { grid-template-columns: 1fr; } .form.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .doc { padding: 18px 14px; } .doc-head { flex-direction: column; } .form.c3 { grid-template-columns: 1fr; } }
@media print { .doc { border: 0; box-shadow: none; max-width: none; padding: 0; } .doc-layout { display: block; } .formbar { display: none; } }
.hero .hs > a { padding: 4px 24px; border-left: 1px solid rgba(255,255,255,.25); min-width: 120px; display: block; }
.hero .hs > a b { display: block; font-size: 30px; } .hero .hs > a span { font-size: 12.5px; opacity: .9; }
.hero .hs > a:hover { background: rgba(255,255,255,.08); border-radius: 8px; }

/* office news */
.nw-page { max-width: 1180px; margin: 0 auto; }
.nw-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.nw-head h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; } .nw-head p { margin: 2px 0 0; color: var(--muted); }
.nw-search { max-width: 360px; border-radius: 999px !important; padding-left: 14px !important; }
.nw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.nw-feed { display: flex; flex-direction: column; gap: 16px; }
.nw-av { width: 42px; height: 42px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; letter-spacing: .02em; }
.nw-av.sm { width: 32px; height: 32px; font-size: 12px; }
.nw-composer { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; cursor: pointer; box-shadow: var(--shadow); }
.nw-composer .fake { flex: 1; background: #f3f5f8; border-radius: 999px; padding: 10px 16px; color: var(--muted); }
.nw-composer:hover .fake { background: #eceff3; } .nw-composer .acts { display: flex; gap: 12px; color: var(--muted); font-size: 13px; }
.nw-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.nw-pill { --c: var(--brand); border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13px; color: var(--ink); }
.nw-pill:hover { border-color: var(--c); } .nw-pill.on { background: var(--c); border-color: var(--c); color: #fff; font-weight: 600; }
.nw-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.04); position: relative; }
.nw-card.pinned { border-color: #f1d48a; box-shadow: 0 0 0 3px #fdf4dc, 0 4px 16px rgba(16,24,40,.05); }
.nw-card.unread::before { content: ""; position: absolute; left: -1px; top: 22px; width: 4px; height: 34px; border-radius: 0 4px 4px 0; background: var(--brand); }
.nw-card .nw-hd { display: flex; gap: 12px; align-items: center; }
.nw-card .nw-hd .nw-who { flex: 1; min-width: 0; display: block; } .nw-card .nw-hd .ttl, .nw-byline .ttl { color: var(--muted); font-size: 13px; }
.nw-card .nw-hd .meta, .nw-byline .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nw-aud { background: #eef4f7; color: #335; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.nw-pin { background: #fdf4dc; color: #a16207; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.nw-new { background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.nw-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 6px; }
.nw-cat { --c: var(--brand); color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.nw-must { background: var(--red-soft); color: var(--red); border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.nw-title { font-size: 19px; line-height: 1.35; margin: 4px 0 10px; cursor: pointer; color: var(--ink); } .nw-title:hover { color: var(--brand); }
.nw-cover { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #edf3f8; margin-bottom: 12px; cursor: pointer; }
.nw-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; } .nw-cover:hover img { transform: scale(1.015); }
.nw-ex { margin: 0 0 10px; color: #3d4756; line-height: 1.55; } .nw-ex .more { font-weight: 600; white-space: nowrap; }
.nw-atts { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.nw-att { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px 7px 7px; background: #f7fafd; max-width: 100%; color: var(--ink); text-decoration: none !important; }
.nw-att:hover { border-color: var(--brand); background: #fff; }
.nw-att .ic { width: 34px; height: 34px; border-radius: 7px; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; flex: none; }
.nw-att .nm { display: flex; flex-direction: column; min-width: 0; } .nw-att .nm b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.nw-att .nm small { color: var(--muted); font-size: 11.5px; }
.nw-ack { border: 1px solid #fde2b5; background: linear-gradient(180deg, #fffaf0, #fff6e5); border-radius: 12px; padding: 12px 14px; margin: 6px 0 10px; }
.nw-ack.done { border-color: #bfe8cf; background: #f0fbf4; }
.nw-ack .row { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 7px; flex-wrap: wrap; }
.nw-ack .due { color: #a16207; font-weight: 600; font-size: 12.5px; } .nw-ack .due.late { color: var(--red); }
.nw-ack .ok { color: var(--green); font-weight: 600; margin-top: 9px; font-size: 13.5px; }
.nw-ackbtn { margin-top: 10px; width: 100%; justify-content: center; padding: 11px !important; font-size: 15px !important; border-radius: 10px !important; }
.nw-ack.big { padding: 16px 18px; } .nw-ack.big .nw-ackbtn { font-size: 16px !important; padding: 13px !important; }
.nw-prog { height: 8px; background: #e9edf2; border-radius: 99px; overflow: hidden; } .nw-prog > div { height: 100%; background: linear-gradient(90deg, #0e72ae, #29abe2); border-radius: 99px; }
.nw-prog.sm { height: 5px; margin: 6px 0 3px; }
.nw-card .nw-ft, .nw-react-sec { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line2); padding-top: 9px; margin-top: 4px; flex-wrap: wrap; }
.nw-card .nw-ft .sp, .nw-react-sec .sp { flex: 1; } .nw-card .nw-ft .st, .nw-react-sec .st { color: var(--muted); font-size: 13px; }
.nw-rx { display: flex; gap: 6px; flex-wrap: wrap; }
.nw-rx button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 15px; display: inline-flex; gap: 5px; align-items: center; transition: transform .1s; }
.nw-rx button span { font-size: 12.5px; color: var(--muted); font-weight: 600; } .nw-rx button:hover { transform: translateY(-1px); border-color: #c7d0db; }
.nw-rx button.on { background: var(--brand-soft); border-color: var(--brand); } .nw-rx button.on span { color: var(--brand); }
.nw-more { text-align: center; margin: 16px 0; } .nw-empty { color: var(--muted); font-size: 13px; padding: 4px 0; }
.nw-empty-big { text-align: center; padding: 40px 20px; }
.nw-rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
.nw-rail-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.nw-rail-card h4 { margin: 0 0 10px; font-size: 14px; }
.nw-ri { display: block; padding: 8px 0; border-bottom: 1px dashed var(--line); color: var(--ink); text-decoration: none !important; }
.nw-ri:last-child { border-bottom: 0; } .nw-ri b { font-size: 13px; line-height: 1.35; display: block; } .nw-ri small, .nw-ev small, .nw-bd small, .nw-pop small { color: var(--muted); font-size: 12px; display: block; }
.nw-ev { display: flex; gap: 10px; align-items: center; padding: 6px 0; color: var(--ink); text-decoration: none !important; }
.nw-ev .d { width: 42px; height: 46px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.nw-ev .d b { font-size: 17px; line-height: 1; } .nw-ev .d small { color: var(--brand); font-size: 10.5px; } .nw-ev b { font-size: 13px; }
.nw-bd { display: flex; gap: 10px; align-items: center; padding: 5px 0; } .nw-bd b { font-size: 13px; } .nw-bd.today b { color: #be185d; }
.nw-pop { display: flex; gap: 10px; padding: 7px 0; color: var(--ink); text-decoration: none !important; border-bottom: 1px dashed var(--line); }
.nw-pop:last-child { border-bottom: 0; } .nw-pop .no { font-weight: 800; color: #c3cad4; font-size: 18px; width: 20px; } .nw-pop b { font-size: 13px; line-height: 1.35; }
.nw-link { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; }
.nw-article-wrap { display: flex; justify-content: center; }
.nw-article { width: 100%; max-width: 780px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px 36px 30px; box-shadow: 0 4px 24px rgba(16,24,40,.05); }
.nw-crumb { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.nw-article h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.015em; margin: 4px 0 14px; }
.nw-byline { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line2); margin-bottom: 18px; }
.nw-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin-bottom: 18px; display: block; }
.nw-lead { font-size: 17px; line-height: 1.6; color: #2f3a48; font-weight: 500; border-left: 4px solid var(--brand); padding: 2px 0 2px 14px; margin: 0 0 18px; }
.nw-body { font-size: 15.5px; line-height: 1.75; color: #222c38; word-wrap: break-word; }
.nw-body p { margin: 0 0 12px; } .nw-body h3 { font-size: 18px; margin: 22px 0 8px; color: #0b4f4f; } .nw-body h4 { font-size: 16px; margin: 18px 0 6px; }
.nw-body ul, .nw-body ol { margin: 0 0 14px; padding-left: 24px; } .nw-body li { margin: 4px 0; } .nw-body b { color: #0b1f33; }
.nw-body a { text-decoration: underline; } .nw-mt { background: var(--blue-soft); color: var(--blue); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.nw-tbl { overflow-x: auto; margin: 6px 0 16px; border: 1px solid var(--line); border-radius: 10px; }
.nw-tbl table { border-collapse: collapse; width: 100%; font-size: 14px; } .nw-tbl th { background: #f2f7f7; text-align: left; color: #0b4f4f; }
.nw-tbl th, .nw-tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; } .nw-tbl tr:last-child td { border-bottom: 0; }
.nw-files, .nw-ack-sec { margin-top: 22px; } .nw-files h4, .nw-ack-sec h4 { margin: 0 0 8px; }
.nw-react-sec { margin-top: 22px; padding-top: 14px; }
.nw-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 14px; flex-wrap: wrap; }
.nw-tabs button { border: 0; background: none; padding: 9px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.nw-tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.nw-cm { display: flex; gap: 10px; margin-bottom: 12px; } .nw-cm.child { margin-left: 42px; }
.nw-cm .bub { background: #f3f5f8; border-radius: 4px 14px 14px 14px; padding: 8px 12px; max-width: 100%; min-width: 0; }
.nw-cm .hd { display: flex; gap: 8px; align-items: baseline; } .nw-cm .hd small { color: var(--muted); font-size: 12px; }
.nw-cm .tx { font-size: 14px; line-height: 1.5; margin-top: 2px; } .nw-cm .ac { display: flex; gap: 12px; font-size: 12.5px; margin-top: 4px; }
.nw-cm-new { display: flex; gap: 10px; margin-top: 14px; } .nw-reply-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.nw-rd-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.nw-rd-sum div { background: #f7fafd; border-radius: 10px; padding: 10px; text-align: center; } .nw-rd-sum b { display: block; font-size: 20px; } .nw-rd-sum small { color: var(--muted); }
.nw-br { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 16px; margin: 14px 0; }
.nw-br .it { cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 8px; } .nw-br .it:hover { background: #f7fafd; } .nw-br .it small { color: var(--muted); }
.nw-rd-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .nw-rd-bar .input { width: auto; flex: 1; min-width: 150px; }
.nw-rd-list .row { display: flex; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line2); }
.nw-rd-list .nm { flex: 1; min-width: 0; } .nw-rd-list .nm small { display: block; color: var(--muted); font-size: 12px; }
.nw-st { font-size: 12px; border-radius: 999px; padding: 2px 9px; white-space: nowrap; } .nw-st.ok { background: var(--green-soft); color: var(--green); }
.nw-st.rd { background: var(--blue-soft); color: var(--blue); } .nw-st.no { background: var(--red-soft); color: var(--red); }
.nw-related { margin-top: 26px; border-top: 1px solid var(--line2); padding-top: 16px; } .nw-related .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.nw-related .rc { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none !important; }
.nw-related .rc img, .nw-related .rc .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; }
.nw-related .rc .ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #fff; background: linear-gradient(135deg, #1e5296, #2f9fe6); }
.nw-related .rc .ph .ph-logo { font-size: 30px; font-weight: 800; letter-spacing: 1px; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.nw-related .rc .ph em { font-size: 9.5px; font-style: normal; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; opacity: .78; }
.nw-related .rc b { font-size: 14px; line-height: 1.35; } .nw-related .rc small { color: var(--muted); }
.nw-comp { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; } .nw-comp .main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nw-comp aside { display: flex; flex-direction: column; gap: 8px; background: #f7fafd; border-radius: 12px; padding: 12px; } .nw-comp label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.nw-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .nw-row { display: flex; gap: 8px; align-items: center; }
.nw-modal { width: min(1120px, 96vw) !important; max-width: none !important; }
.nw-cover-up { height: 120px; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--muted); cursor: pointer; overflow: hidden; }
.nw-cover-up img { width: 100%; height: 100%; object-fit: cover; } .nw-cover-up:hover { border-color: var(--brand); color: var(--brand); }
.nw-tb { display: flex; gap: 4px; flex-wrap: wrap; } .nw-tb button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.nw-tb button:hover { border-color: var(--brand); color: var(--brand); }
.nw-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .nw-ed { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px !important; min-height: 280px; }
.nw-prev { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; max-height: 420px; overflow: auto; font-size: 14px; background: #fff; }
.nw-tgt-list { max-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: 3px; font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.nw-chk { display: flex !important; gap: 6px; align-items: center; color: var(--ink) !important; font-weight: 500 !important; font-size: 13px !important; margin-top: 4px; }
@media (max-width: 1080px) { .nw-grid { grid-template-columns: minmax(0, 1fr) 280px; } }
@media (max-width: 900px) {
  .nw-grid { grid-template-columns: 1fr; } .nw-rail { position: static; } .nw-comp, .nw-split { grid-template-columns: 1fr; }
  .nw-article { padding: 18px 16px 22px; border-radius: 14px; } .nw-article h1 { font-size: 22px; } .nw-body { font-size: 15px; }
}
@media (max-width: 560px) {
  .nw-card { padding: 14px 14px 10px; border-radius: 14px; } .nw-title { font-size: 17px; } .nw-composer .acts { display: none; }
  .nw-search { max-width: none; width: 100%; } .nw-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .nw-pill { white-space: nowrap; } .nw-rd-sum { grid-template-columns: repeat(2, 1fr); } .nw-related .grid { grid-template-columns: 1fr; }
  .nw-card .nw-ft .st { font-size: 12px; } .nw-cm.child { margin-left: 22px; } .nw-att .nm b { max-width: 200px; } .nw-row2 { grid-template-columns: 1fr; }
}

/* payroll ===================================================================== (phân hệ Lương: phiếu lương A4, bảng lương, tham số) */
.ps { --ps-ink: #344054; --ps-line: #dfe4ea; --ps-soft: #f7fafd; background: #fff; color: var(--ps-ink); max-width: 210mm; margin: 0 auto 18px;
  border: 1px solid var(--ps-line); border-radius: 12px; box-shadow: 0 2px 10px rgba(16,24,40,.06); padding: 28px 32px 22px; font-size: 13.5px; line-height: 1.45; }
.ps .num, .ps-tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--brand); }
.ps-brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ps-logo { width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(135deg, #29abe2, #0e72ae); letter-spacing: .02em; }
.ps-co { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .01em; }
.ps-co-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ps-title { text-align: right; flex: none; }
.ps-kicker { font-size: 11px; letter-spacing: .14em; font-weight: 700; color: var(--brand); }
.ps-kicker.draft { color: var(--amber); }
.ps-title h2 { font-size: 22px; margin: 2px 0 4px; letter-spacing: .02em; }
.ps-code { font-size: 12px; color: var(--muted); }
.ps-dot { margin: 0 6px; }
.ps-status { margin-top: 6px; display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.ps-emp { padding: 14px 0 6px; }
.ps-emp dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.ps-emp dl > dt, .ps-emp dl > dd { margin: 0; padding: 6px 0; border-bottom: 1px dashed var(--ps-line); }
.ps-emp dl { grid-template-columns: 150px minmax(0,1fr) 150px minmax(0,1fr); }
.ps-emp dt { color: var(--muted); font-size: 12.5px; }
.ps-emp dd { font-weight: 500; overflow-wrap: anywhere; }
.ps-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.ps-sec-h h3 { margin: 0; font-size: 13.5px; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.ps-roman { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: 0; }
.ps-att h3 { font-size: 13.5px; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.ps-src { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--gray-soft); color: #4e6a80; }
.ps-src.green { background: var(--green-soft); color: var(--green); } .ps-src.blue { background: var(--blue-soft); color: var(--blue); }
.ps-src.amber { background: var(--amber-soft); color: var(--amber); } .ps-src.purple { background: var(--purple-soft); color: var(--purple); } .ps-src.red { background: var(--red-soft); color: var(--red); }
.ps-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--ps-line); border-radius: 10px; overflow: hidden; }
.ps-tile { padding: 9px 10px; border-right: 1px solid var(--ps-line); background: #fff; min-width: 0; }
.ps-tile:last-child { border-right: 0; }
.ps-tile span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.25; min-height: 2.5em; }
.ps-tile b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.ps-tile b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.ps-tile.hl { background: var(--brand-soft); } .ps-tile.hl b { color: var(--brand); }
.ps-tile.warn b { color: var(--amber); }
.ps-formula { margin-top: 8px; font-size: 12px; color: #4e6a80; background: var(--ps-soft); border-radius: 8px; padding: 8px 12px; display: grid; gap: 2px; }
.ps-tbl-wrap { border: 1px solid var(--ps-line); border-radius: 10px; overflow: hidden; }
.ps-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ps-tbl th { background: var(--ps-soft); color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--ps-line); }
.ps-tbl td { padding: 8px 12px; border-bottom: 1px solid #edf3f8; vertical-align: top; overflow-wrap: anywhere; }
.ps-tbl .c { text-align: center; color: var(--muted); }
.ps-tbl td.sub { color: var(--muted); font-size: 12px; }
.ps-tbl tr.ot td .nm { color: #2b4c7e; }
.ps-tbl .nm { font-weight: 500; } .ps-tbl .nm-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ps-tbl tfoot td { background: var(--brand-soft); font-weight: 700; border-bottom: 0; padding: 10px 12px; }
.ps-tbl tfoot td.num { color: var(--brand); font-size: 14.5px; }
.ps-link { border: 0; background: none; color: var(--brand); cursor: pointer; padding: 0; font-size: 12px; font-weight: 600; }
.ps-taxrow { display: none; } .ps-taxrow.open { display: table-row; }
.ps-taxrow > td { background: #fbfcfd; padding: 4px 12px 12px; }
.ps-tax { border: 1px solid var(--ps-line); border-radius: 8px; padding: 10px 14px; background: #fff; max-width: 620px; margin-left: auto; }
.ps-tax .tx-m { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ps-tax .tx-l { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 12.5px; }
.ps-tax .tx-l b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-tax .tx-l.sub { color: #4e6a80; padding-left: 12px; } .ps-tax .tx-l.sub b { font-weight: 500; }
.ps-tax .tx-l.eq { border-top: 1px solid var(--ps-line); margin-top: 3px; padding-top: 5px; }
.ps-tax .tx-l.total { color: var(--brand); font-size: 13.5px; }
.ps-tax table.tx-b { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12px; }
.ps-tax table.tx-b th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--ps-line); }
.ps-tax table.tx-b td { padding: 4px 6px; border-bottom: 1px dashed #edf3f8; }
.ps-tax table.tx-b .num { text-align: right; }
.ps-net { margin: 18px 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px 20px; border-radius: 12px;
  color: #fff; background: linear-gradient(120deg, #0a6399 0%, #0e72ae 75%, #1683c4 100%); }
.ps-net-l { flex: 1 1 320px; min-width: 0; }
.ps-net-v { flex: 0 0 auto; margin-left: auto; }
.ps-net-k { font-size: 13.5px; font-weight: 700; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.ps-net .ps-roman { background: rgba(255,255,255,.2); }
.ps-words { margin-top: 6px; font-size: 13px; opacity: .92; max-width: 560px; }
.ps-net-v { text-align: right; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.ps-net-v small { display: block; font-size: 11.5px; font-weight: 500; opacity: .85; letter-spacing: 0; }
.ps-cost { text-align: right; margin-top: 6px; font-size: 12.5px; color: #4e6a80; }
.ps-notes, .ps-confirm { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ps-line); }
.ps-notes h4, .ps-confirm h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.ps-notes ul { margin: 0; padding-left: 18px; color: #4e6a80; font-size: 12.5px; } .ps-notes li { margin: 2px 0; }
.ps-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ps-step { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--ps-line); border-radius: 10px; }
.ps-step i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #c5ccd6; flex: none; margin-top: 2px; }
.ps-step.done i { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 2px #fff; }
.ps-step.bad i { background: var(--red); border-color: var(--red); }
.ps-step b { display: block; font-size: 12.5px; } .ps-step small { color: var(--muted); font-size: 11.5px; }
.ps-fb { margin-top: 10px; display: grid; gap: 8px; }
.ps-fb-it { border-left: 3px solid var(--amber); background: #fffaf0; padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 12.5px; display: grid; gap: 3px; }
.ps-fb-r { color: var(--green); }
.ps-sign { display: none; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: center; margin-top: 22px; min-height: 90px; }
.ps-sign b { display: block; font-size: 12.5px; } .ps-sign span { font-size: 11px; color: var(--muted); font-style: italic; }
.ps-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--ps-line); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ps-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 210mm; margin: 0 auto 12px; }
.ps-actions .grow { flex: 1; }
.modal.ps-modal { max-width: 940px; }
.modal.ps-modal .mb { background: #edf3f8; max-height: 78vh; padding: 14px; }
.modal.ps-modal .ps { margin-bottom: 0; }
.ps-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ps-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); box-shadow: var(--shadow); }
.ps-card:hover { border-color: var(--brand); text-decoration: none; }
.ps-card.need { border-color: #f1d49a; box-shadow: inset 3px 0 0 var(--amber), var(--shadow); }
.ps-card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ps-card-kind { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ps-card-v { font-size: 24px; font-weight: 800; color: var(--brand); margin-top: 10px; font-variant-numeric: tabular-nums; }
.ps-card-k { font-size: 12px; color: var(--muted); }
.ps-card-f { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.ps-card-f b { color: var(--ink); font-weight: 600; }
.ps-card-d { margin-top: 8px; font-size: 12px; color: var(--amber); font-weight: 600; }
/* Bảng lương: luồng, nguồn công, bảng dòng lương cuộn ngang có cột cố định */
.pr-head { align-items: flex-start; }
.pr-head .pr-actions { margin: 0; justify-content: flex-end; }
.pr-flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.pr-fs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; position: relative; padding-right: 8px; min-width: 0; }
.pr-fs:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line); margin-left: 4px; min-width: 8px; }
.pr-fs i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--gray-soft); flex: none; }
.pr-fs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-fs.done { color: var(--green); } .pr-fs.done i { background: var(--green); color: #fff; } .pr-fs.done::after { background: var(--green); }
.pr-fs.cur { color: var(--brand); font-weight: 700; } .pr-fs.cur i { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.pr-src { display: flex; gap: 12px; align-items: flex-start; background: #f2f8fc; border: 1px solid #d6e6f5; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.pr-src-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; font-weight: 800; }
.pr-src-ic svg { width: 17px; height: 17px; }
.pr-src-t { font-weight: 600; font-size: 13px; } .pr-src-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pr-warn { background: var(--amber-soft); border: 1px solid #f1d49a; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; color: #7a4f0f; }
.pr-warn ul { margin: 4px 0 0; padding-left: 18px; }
.pr-filters { display: grid; grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto; gap: 8px; align-items: center; margin-bottom: 10px; }
.pr-count { font-size: 12px; white-space: nowrap; }
.pr-scroll { overflow: auto; max-height: 68vh; background: #fff; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
table.pr-tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.pr-tbl th { position: sticky; top: 0; z-index: 2; background: #f7fafd; color: var(--muted); font-weight: 600; font-size: 11.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
.pr-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; background: #fff; }
.pr-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.pr-tbl th.num { text-align: right; }
.pr-tbl .stk { position: sticky; left: 0; z-index: 1; min-width: 210px; max-width: 260px; box-shadow: 1px 0 0 var(--line); }
.pr-tbl th.stk { z-index: 3; }
.pr-tbl td.hl { background: #f7fbfb; } .pr-tbl th.hl { color: var(--brand); }
.pr-tbl tbody tr.click { cursor: pointer; }
.pr-tbl tbody tr.click:hover td { background: #eef8f7; }
.pr-tbl tfoot td { position: sticky; bottom: 0; background: #eef5f5; font-weight: 700; border-top: 1px solid var(--line); z-index: 1; }
.pr-tbl tfoot td.stk { z-index: 3; }
.pr-emp { display: flex; flex-direction: column; min-width: 0; }
.pr-emp b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .pr-emp small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.pr-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 6px; vertical-align: 1px; background: #9aa5b1; }
.pr-dot.green { background: var(--green); } .pr-dot.blue { background: var(--blue); } .pr-dot.amber { background: #d69e2e; } .pr-dot.purple { background: var(--purple); } .pr-dot.red { background: var(--red); }
.pr-legend { font-size: 12px; margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pr-legend span { display: inline-flex; align-items: center; gap: 2px; } .pr-legend .pr-dot { margin: 0 4px 0 0; }
table.pr-mini { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pr-mini th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pr-mini td { padding: 5px 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.pr-mini .num, .pr-mini th.num { text-align: right; }
/* Tham số lương & thuế */
.cfg-top { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 12px; margin-bottom: 12px; }
.cfg-view, .cfg-save { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.cfg-view label, .cfg-save label { font-size: 12px; font-weight: 600; color: #475262; display: block; margin-bottom: 4px; }
.cfg-save { border-color: #b9e1dd; background: #f5f9fd; }
.cfg-save-f { display: flex; gap: 10px; align-items: flex-end; } .cfg-save-f .grow { flex: 1; } .cfg-save-f input[type=month] { width: 170px; }
.cfg-save-b { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.cfg-dirty { font-size: 12px; color: var(--muted); } .cfg-dirty.on { color: var(--amber); font-weight: 600; }
.cfg-note { font-size: 12.5px; color: #6b5413; background: var(--amber-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }
.cfg-grp { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.cfg-grp-h { padding: 12px 16px; background: #f7fafd; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cfg-grp-h h3 { margin: 0; font-size: 14.5px; } .cfg-grp-h p { margin: 0; flex: 1; font-size: 12.5px; color: var(--muted); min-width: 240px; }
.cfg-info { margin: 10px 16px 0; padding: 8px 12px; border-radius: 8px; background: var(--blue-soft); color: #234e7d; font-size: 12.5px; }
.cfg-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line2); align-items: center; }
.cfg-row:last-child { border-bottom: 0; }
.cfg-row.wide { grid-template-columns: minmax(0, 1fr); }
.cfg-lbl { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cfg-rev { font-size: 10.5px; font-weight: 700; color: var(--amber); background: var(--amber-soft); border-radius: 999px; padding: 1px 8px; text-transform: uppercase; letter-spacing: .04em; }
.cfg-basis { font-size: 12px; color: #4e6a80; margin-top: 2px; } .cfg-help { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cfg-ctl { min-width: 0; }
.cfg-in { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cfg-in .input { max-width: 200px; } .cfg-in.wide .input { max-width: none; }
.cfg-in .input.num, .cfg-regions .input, .cfg-brk .input.num, .cfg-map .input.num { text-align: right; font-variant-numeric: tabular-nums; }
.cfg-unit { color: var(--muted); font-size: 12.5px; white-space: nowrap; } .cfg-fmt { color: var(--muted); font-size: 11.5px; }
.cfg-sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.cfg-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.cfg-sw span { width: 38px; height: 22px; border-radius: 999px; background: #cfd6df; position: relative; transition: background .15s; flex: none; }
.cfg-sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.cfg-sw input:checked + span { background: var(--brand); } .cfg-sw input:checked + span::after { left: 19px; }
.cfg-sw input:disabled + span { opacity: .6; } .cfg-sw em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.cfg-regions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.cfg-regions label span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.cfg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cfg-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; background: #fff; }
.cfg-brk { max-width: 760px; } .cfg-brk .input { padding: 5px 8px; max-width: 180px; } .cfg-brk-b { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cfg-brk .cfg-in .input { max-width: 90px; }
.cfg-map { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.cfg-map .pr-mini th { position: sticky; top: 0; background: #f7fafd; }
.cfg-map .input { max-width: 160px; padding: 5px 8px; }
.cfg-vers { padding: 10px 16px 14px; display: grid; gap: 8px; }
.cfg-ver { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; display: grid; gap: 4px; font-size: 12.5px; }
.cfg-ver.cur { border-color: #9cc8ec; background: #f5faff; }
.cfg-ver-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .cfg-ver-h .muted { margin-left: auto; font-size: 12px; }
.cfg-ver-k { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 1100px) {
  .ps-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ps-tile:nth-child(4n) { border-right: 0; } .ps-tile { border-bottom: 1px solid var(--ps-line); }
  .pr-filters { grid-template-columns: 1fr 1fr; } .pr-filters input[type=search] { grid-column: 1 / -1; }
  .pr-flow { overflow-x: auto; grid-template-columns: repeat(6, minmax(110px, 1fr)); }
}
@media (max-width: 820px) {
  .ps { padding: 16px 14px; border-radius: 10px; font-size: 13px; }
  .ps-head { flex-direction: column; gap: 10px; } .ps-title { text-align: left; } .ps-status { justify-content: flex-start; }
  .ps-title h2 { font-size: 19px; }
  .ps-emp dl { grid-template-columns: 130px minmax(0, 1fr); gap: 0 10px; }
  .ps-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-tile { border-right: 1px solid var(--ps-line); } .ps-tile:nth-child(2n) { border-right: 0; } .ps-tile:nth-child(4n) { border-right: 0; }
  .ps-tile:nth-child(odd) { border-right: 1px solid var(--ps-line); }
  .ps-tile span { min-height: 0; }
  .ps-tbl { table-layout: auto; } .ps-tbl colgroup { display: none; } .ps-tbl .c { width: 22px; }
  .ps-tbl td, .ps-tbl th { padding: 7px 8px; }
  .ps-tbl tfoot td[colspan] { font-size: 12.5px; }
  .ps-net { padding: 14px; } .ps-net-v { font-size: 24px; text-align: left; white-space: normal; margin-left: 0; }
  .ps-steps { grid-template-columns: 1fr; }
  .ps-tax { margin-left: 0; }
  .ps-actions .btn { flex: 1 1 auto; justify-content: center; } .ps-actions .grow { display: none; }
  .pr-filters { grid-template-columns: 1fr; } .pr-head .pr-actions { justify-content: flex-start; }
  .pr-tbl .stk { min-width: 150px; max-width: 170px; }
  .cfg-top, .cfg-row { grid-template-columns: minmax(0, 1fr); } .cfg-save-f { flex-direction: column; align-items: stretch; } .cfg-save-f input[type=month] { width: 100%; }
  .cfg-regions { grid-template-columns: 1fr 1fr; }
  .modal.ps-modal .mb { padding: 6px; }
}
.print-only { display: none; }
#ps-print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm 12mm 14mm; }
  body.ps-printing { background: #fff !important; }
  body.ps-printing > *:not(#ps-print-root) { display: none !important; }
  body.ps-printing #ps-print-root { display: block !important; }
  .ps-print-target { max-width: none; margin: 0; border: 0; box-shadow: none; padding: 0; font-size: 11.5px; }
  .ps-print-target .no-print, .ps-print-target .ps-link { display: none !important; }
  .ps-print-target .ps-sign { display: grid !important; }
  .ps-print-target .ps-taxrow.open { display: table-row !important; }
  .ps-print-target .ps-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
  .ps-print-target .ps-net { background: #fff !important; color: #000 !important; border: 2px solid #0e72ae; }
  .ps-print-target .ps-roman, .ps-print-target .ps-logo, .ps-print-target .ps-tbl tfoot td, .ps-print-target .ps-tile.hl, .ps-print-target .ps-tbl th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ps-print-target section, .ps-print-target .ps-tbl tr { break-inside: avoid; }
}
/* end payroll */

/* ---- core: bàn phím, tìm kiếm chung, luồng duyệt nâng cao, thông báo đẩy ---- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.input:focus-visible { outline: 2px solid #9cc6e4; outline-offset: 0; }
.linkbtn { border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; }
.linkbtn:hover { color: var(--red); }
.btn.ghost { background: transparent; border-style: dashed; color: var(--muted); }
.gsearch .dd { left: auto; right: 0; width: min(520px, calc(100vw - 24px)); max-height: min(70vh, 560px); }
.gsearch .dd .grp + .grp { border-top: 1px solid var(--line); }
.gsearch .dd .gh { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px 3px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; background: #fff; }
.gsearch .dd .gh .n { font-weight: 500; background: var(--gray-soft); border-radius: 99px; padding: 0 7px; }
.gsearch .dd a[role=option] { display: block; padding: 7px 12px; border-bottom: 0; }
.gsearch .dd a[role=option].hi { background: var(--brand-soft); text-decoration: none; }
.gsearch .dd a .gl { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch .dd .gfoot { padding: 6px 12px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); background: #f7fafd; position: sticky; bottom: 0; }
.gsearch .dd .empty { padding: 14px 12px; }
.gsearch input::-webkit-search-cancel-button { cursor: pointer; }
.conds { margin: -2px 0 10px 36px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cond-row { display: grid; grid-template-columns: 34px minmax(140px, 1.4fr) 120px minmax(120px, 1.4fr) auto; gap: 6px; align-items: center; width: 100%; }
.tier-row { display: grid; grid-template-columns: 150px 170px minmax(0, 1fr) auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.tier-row.tier-head { font-size: 12px; margin-bottom: 2px; }
.chips-inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-inline select { width: auto; min-width: 150px; }
.consult-it { padding: 8px 0; border-bottom: 1px solid var(--line2); display: flex; flex-direction: column; gap: 3px; }
.consult-it:last-child { border-bottom: 0; }
.consult-it .ans { background: var(--brand-soft); border-radius: 8px; padding: 6px 9px; white-space: pre-wrap; }
.timeline .it.consult { background: var(--blue-soft); border-radius: 8px; padding: 6px 8px; margin-left: -8px; }
.push-box { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f7fafd; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.push-l { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.push-l input { width: 18px; height: 18px; }
.sig .sg-t[title] { cursor: help; }
@media (max-width: 820px) {
  .cond-row { grid-template-columns: 30px 1fr 1fr; } .cond-row > :nth-child(4) { grid-column: 1 / 3; }
  .tier-row { grid-template-columns: 1fr 1fr auto; } .tier-row .chips-inline { grid-column: 1 / -1; grid-row: 2; }
  .conds { margin-left: 0; }
}
.modal .mf { flex-wrap: wrap; }
/* end core */

/* payroll filings */
/* Báo cáo thuế & BHXH (payroll.filings), rà soát bất thường bảng lương, bảng công giải thích theo ngày (me/time) */
.pf-rev { border: 1px dashed #d79a3a; background: var(--amber-soft); color: #7a4f0f; border-radius: 10px; padding: 8px 12px; margin: 8px 0 12px; font-size: 13px; }
.pf-ctl { flex-wrap: wrap; align-items: center; }
.pf-locked { font-size: 12px; margin: 2px 0 10px; }
.pf-note { margin: 2px 0; font-size: 12.5px; }
.pf-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 10px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel, #fff); }
.pf-head h2 { margin: 4px 0 2px; font-size: 17px; }
.pf-form { display: inline-block; border: 1px solid var(--ink); border-radius: 4px; padding: 0 6px; font-size: 12px; font-weight: 700; }
.pf-per { text-align: right; font-weight: 600; }
.pf-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 0 18px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; margin-bottom: 12px; background: var(--panel, #fff); }
.pf-f { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--line2); font-size: 13px; }
.pf-f b { font-variant-numeric: tabular-nums; }
.pf-code { color: var(--brand); font-weight: 700; font-size: 12px; }
.pf-sec { margin: 14px 0; }
.pf-sec h3 { font-size: 14px; margin: 0 0 6px; }
.pf-tbl td, .pf-tbl th { white-space: nowrap; }
.pf-json { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; width: 100%; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.pf-anom td { vertical-align: top; }
.pf-anom tr.pf-ok { background: var(--green-soft); }
.pf-anom .pf-ack small { display: block; }
.pf-stale { color: var(--red); font-size: 12px; margin-top: 3px; }
.pf-ackbar { margin-top: 10px; flex-wrap: wrap; align-items: center; }
.pf-anom-bar a { font-weight: 600; }
.ts-grp td { background: var(--brand-soft); font-weight: 700; color: var(--brand); }
.ds-only { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.ds-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ds-day { border: 1px solid var(--line); border-radius: 10px; background: var(--panel, #fff); padding: 8px 10px; }
.ds-day.warn { border-left: 4px solid var(--red); }
.ds-day.ds-off, .ds-day.ds-holiday { background: #f7fafd; }
.ds-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 84px auto; gap: 10px; align-items: center; }
.ds-date b { display: block; font-size: 15px; }
.ds-date small, .ds-num small { display: block; color: var(--muted); font-size: 11px; }
.ds-num { text-align: right; }
.ds-num b { font-size: 15px; }
.ds-sum { font-size: 13px; color: var(--ink); }
.ds-warn { color: var(--red); font-size: 12.5px; margin-top: 3px; }
.ds-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; padding-left: 68px; }
.ds-det { display: none; margin-top: 8px; padding: 8px 10px 4px 68px; border-top: 1px dashed var(--line2); }
.ds-det.open { display: block; }
.ds-shift { margin-bottom: 8px; }
.ds-sh-h { margin-bottom: 3px; }
.ds-kv { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.ds-small { font-size: 12.5px; color: var(--muted); margin: 3px 0; }
.ds-ex { margin: 6px 0 4px; padding-left: 18px; font-size: 12.5px; }
.ds-ex li { margin: 2px 0; }
.ds-rule { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 4px; padding: 0 5px; margin-right: 2px; cursor: help; }
.ds-pick .form { min-width: 320px; }
@media (max-width: 720px) {
  .ds-row { grid-template-columns: 46px minmax(0, 1fr) 60px; }
  .ds-row .ds-why { grid-column: 1 / -1; justify-self: start; }
  .ds-acts, .ds-det { padding-left: 0; }
  .pf-fields { grid-template-columns: 1fr; }
}

/* ---------- biểu đồ tương tác & dashboard theo vai trò ---------- */
.chart-tip { position: fixed; z-index: 3000; display: none; pointer-events: none; min-width: 150px; max-width: 320px; background: #344054; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); }
.chart-tip .tt { font-weight: 600; margin-bottom: 4px; }
.chart-tip .tr { display: flex; justify-content: space-between; gap: 14px; padding: 1px 0; }
.chart-tip .tr i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.chart-tip .tr b { font-variant-numeric: tabular-nums; }
.chart-tip .tf { margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255, 255, 255, .18); color: #c3d7e6; font-size: 11.5px; }
.chart rect.bar { transition: opacity .12s; }
.chart svg:hover rect.bar { opacity: .55; }
.chart svg rect.bar:hover { opacity: 1; }
.donut-legend a.lk, .donut-legend div.lk { color: inherit; cursor: pointer; border-radius: 6px; padding-left: 4px; padding-right: 4px; }
.donut-legend a.lk:hover, .donut-legend div.lk:hover { background: #f4f8fb; text-decoration: none; }
.stat .kd { font-size: 12px; font-weight: 600; margin: 0 0 2px; }
.stat .kd.up { color: var(--green); } .stat .kd.down { color: var(--red); }
.stat .kd span { color: var(--muted); font-weight: 400; }
.stat svg.spark { display: block; width: 100%; height: 28px; margin-top: 6px; }
.stat.link:focus-visible { outline: 2px solid var(--brand, #0e72ae); outline-offset: 2px; }
.meters { display: flex; flex-direction: column; gap: 12px; }
.meter { display: block; color: var(--ink); }
a.meter:hover { text-decoration: none; } a.meter:hover .mh span { color: var(--brand, #0e72ae); }
.meter .mh { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.meter .mt { height: 8px; background: #edf3f8; border-radius: 6px; overflow: hidden; }
.meter .mt i { display: block; height: 100%; border-radius: 6px; }
.meter .ms { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.dash-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.dash-tabs a { padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; margin-bottom: -1px; }
.dash-tabs a.on { color: var(--brand, #0e72ae); border-bottom-color: var(--brand, #0e72ae); }
.dash-tabs a:hover { text-decoration: none; color: var(--ink); }
.dash-sec { margin: 6px 0 18px; }
.dash-sec > h2 { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; font-size: 17px; }
.dash-sec > h2 .ic { width: 20px; height: 20px; color: var(--brand, #0e72ae); }
.dash-sec > h2 a { margin-left: auto; font-size: 13px; font-weight: 500; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.dash-grid .card { min-width: 0; margin: 0; }
.dash-grid .card.span2 { grid-column: span 2; }
@media (max-width: 900px) { .dash-grid .card.span2 { grid-column: auto; } }
.dash-grid .card h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dash-grid .card h3 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.dash-alerts { display: flex; flex-direction: column; gap: 8px; }
.dash-alerts a, .dash-alerts div { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.dash-alerts a:hover { text-decoration: none; border-color: #b9e1dd; }
.dash-alerts .red { background: var(--red-soft, #fdecea); border-color: transparent; }
.dash-alerts .amber { background: var(--amber-soft, #fff4e0); border-color: transparent; }
.dash-alerts .blue { background: var(--blue-soft, #e8f1fb); border-color: transparent; }
.dash-alerts b { margin-left: auto; white-space: nowrap; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 7px 4px; border-bottom: 1px solid var(--line2); }
.dash-table td.n, .dash-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.dash-table tr.lk { cursor: pointer; } .dash-table tr.lk:hover td { background: #f4f8fb; }
.dash-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dash-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.dash-hero h1 { margin: 0; }
.dash-hero .sub { color: var(--muted); }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; font-size: 12.5px; }
.fchip { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 10px; }
.dash-alerts .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.dash-alerts .red .ic { color: var(--red); } .dash-alerts .amber .ic { color: var(--amber); }
.dash-grid .card.alerts { grid-column: 1 / -1; }
.dash-grid .card.alerts .dash-alerts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.page-head .dash-filters { flex-wrap: nowrap; }
@media (max-width: 760px) { .page-head .dash-filters { flex-wrap: wrap; } }
.donut-legend > a, .donut-legend > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line2); font-size: 13px; color: var(--ink); }
.donut-legend > a > span, .donut-legend > div > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-grid .hbar { grid-template-columns: minmax(110px, 210px) 1fr minmax(54px, max-content); }
.dash-hero .dash-filters { flex-wrap: nowrap; }
@media (max-width: 760px) { .dash-hero .dash-filters { flex-wrap: wrap; } }
@media (max-width: 600px) {
  .dash-grid .hbar { grid-template-columns: 1fr auto; grid-template-areas: "l v" "t t"; row-gap: 4px; }
  .dash-grid .hbar .hl { grid-area: l; } .dash-grid .hbar .hv { grid-area: v; } .dash-grid .hbar .ht { grid-area: t; }
  .dash-grid .card h3 { flex-wrap: wrap; }
}

/* ---------- logo thương hiệu 315 Medical (bản trắng trên nền tối) ---------- */
.side .brand .brand-logo { height: 52px; width: auto; max-width: 100%; display: block; }
.login2 .art .lg { align-items: center; }
.login2 .art .lg .brand-logo { height: 62px; width: auto; display: block; }
@media (max-width: 560px) { .login2 .art .lg .brand-logo { height: 50px; } .side .brand .brand-logo { height: 46px; } }

/* ---------- Trang đăng nhập phong cách 315 (panel trái xanh + danh sách tính năng) ---------- */
.login2 .art .lg { align-items: center; }
.login2 .art .lg .brand-logo { height: 62px; width: auto; display: block; }
.login2 .art .mid { margin: auto 0; }
.login2 .art .pill { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 7px 16px; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.login2 .art h2 { font-size: 42px; line-height: 1.08; margin: 18px 0 6px; letter-spacing: -.02em; }
.login2 .art .features { display: flex; flex-direction: column; gap: 18px; margin-top: 30px; max-width: 480px; }
.login2 .art .feat { display: flex; gap: 14px; align-items: flex-start; }
.login2 .art .feat .fi { width: 38px; height: 38px; border-radius: 10px; flex: none; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.login2 .art .feat .fi svg { width: 19px; height: 19px; stroke: #fff; }
.login2 .art .feat b { display: block; font-size: 15.5px; margin-bottom: 2px; }
.login2 .art .feat p { margin: 0; font-size: 13.5px; opacity: .85; line-height: 1.45; }
.login2 .art .ft { margin-top: 30px; }
@media (max-width: 1100px) { .login2 .art { padding: 44px 44px; } .login2 .art h2 { font-size: 36px; } }
@media (max-width: 560px) { .login2 .art .lg .brand-logo { height: 50px; } }
.login2 .pane-logo { display: none; }
@media (max-width: 900px) { .login2 .pane-logo { display: block; height: 58px; width: auto; margin: 0 auto 22px; } .login2 form { text-align: left; } }

/* =================================================================
   Mẫu "A2 – tông trang đăng nhập" (đồng bộ HIS 315, CIO duyệt 11/11/2026)
   Sidebar gradient 175° xanh logo, khối logo trong suốt liền sidebar; thanh trên 90°;
   nội dung nền #F3F8FC, tiêu đề #0B4F7A, chữ #344054, số liệu #0A6399; nút chính gradient.
   Chữ trắng thường chỉ đặt từ vùng #0E72AE trở xuống (≥ 4,5:1); vùng sáng nhất chỉ có logo / ô tìm nền trắng.
   ================================================================= */
:root {
  --bg: #f3f8fc; --panel: #ffffff; --ink: #344054; --muted: #4e6a80; --line: #dceaf4; --line2: #eaf3fa;
  --heading: #0b4f7a; --figure: #0a6399;
  --brand: #0e72ae; --brand-2: #0a6399; --brand-soft: #eaf7fd; --brand-315: #29abe2;
  --green: #067647; --green-soft: #e7f6ec; --amber: #92400e; --amber-soft: #fef3c7; --red: #b42318; --red-soft: #fdecec;
  --blue: #08669a; --blue-soft: #eaf7fd;
  --side: #0e72ae; --side-ink: #ffffff; --side-hi: #ffffff;
  --side-bg: linear-gradient(175deg, #2aa3dd 0px, #1e96d3 32px, #1683c4 56px, #0e72ae 112px, #0a6399 100%);
  --side-hover: rgba(255,255,255,.08); --side-active: rgba(255,255,255,.24);
  --top-bg: linear-gradient(90deg, #29abe2 0%, #1e96d3 25%, #1683c4 45%, #0e72ae 100%);
  --top-chip: rgba(255,255,255,.18); --top-chip-line: rgba(255,255,255,.45);
  --btn-pri: linear-gradient(90deg, #1e96d3 0%, #1279b8 18%, #0e72ae 100%);
  --btn-pri-hover: linear-gradient(90deg, #1683c4 0%, #0e72ae 18%, #0a6399 100%);
}
body { color: var(--ink); }
h1, h2, h3, h4, .page-head h1, .page-head h2, .card > h3, .card > h4, .dash-grid .card h3 { color: var(--heading); }
.stat .v, .kpi .v { color: var(--figure); }
.kpi::after { background: linear-gradient(90deg, var(--brand-315), rgba(41,171,226,.05)); }

/* Sidebar */
.side { background: var(--side-bg); width: 268px; }
.side .brand { height: 56px; padding: 0 22px; background: transparent; border-bottom: 1px solid rgba(255,255,255,.22); justify-content: flex-start; flex: none; }
.side .brand .brand-logo { width: 104px; height: auto; }
.side .search { margin: 10px 12px 8px; }
.side .search input { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 6px; color: #fff; font-weight: 600; }
.side .search input:hover, .side .search input:focus { border-color: #fff; outline: none; }
.side .search input::placeholder { color: #fff; opacity: 1; font-weight: 600; }
.nav-group { color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.nav-mod > button { color: #fff; font-weight: 500; text-shadow: 0 1px 1px rgba(6,60,95,.25); }
.nav-mod > button .ic { opacity: 1; }
.nav-mod > button:hover { background: var(--side-hover); color: #fff; }
.nav-mod.open > button { background: transparent; color: #fff; font-weight: 600; }
.nav-mod .items a { color: #fff; font-weight: 500; text-shadow: 0 1px 1px rgba(6,60,95,.25); }
.nav-mod .items a:hover { background: var(--side-hover); color: #fff; }
.nav-mod .items a.active { color: #fff; font-weight: 700; background: var(--side-active); box-shadow: inset 4px 0 0 #fff; }
.side .foot { color: #fff; border-top: 1px solid rgba(255,255,255,.22); }

/* Thanh trên (ô tìm kiếm nền trắng nằm ở đầu – vùng sáng nhất không đặt chữ trắng) */
.top { background: var(--top-bg); border-bottom: 0; color: #fff; }
.top .crumb { color: #fff; font-weight: 600; }
.top .crumb small { color: #fff; opacity: .9; }
.top .gsearch { flex: none; }
.top .gsearch input { background: #fff; border: 1px solid transparent; color: var(--ink); }
.top .gsearch input:hover, .top .gsearch input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.4); outline: none; }
.top .icon-btn { color: #fff; background: var(--top-chip); border: 1px solid var(--top-chip-line); font-weight: 600; }
.top .icon-btn:hover { background: rgba(255,255,255,.28); text-decoration: none; }
.top .icon-btn svg { stroke: currentColor; }
.top .who { color: #fff; border: 1px solid transparent; }
.top .who:hover { background: rgba(255,255,255,.18); border-color: var(--top-chip-line); }
.top .who .nm b { font-weight: 600; }
.top .who .nm span { color: #fff; }
.top .avatar { background: #fff; color: #1683c4; }

/* Nút: chính gradient, phụ nền trắng viền xanh, nguy hiểm viền đỏ; cao ≥ 40 px (trừ nút nhỏ) */
.btn { min-height: 40px; border-color: #1683c4; color: var(--brand); background: #fff; }
.btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn.primary { background: var(--btn-pri); border-color: transparent; color: #fff; }
.btn.primary:hover { background: var(--btn-pri-hover); }
.btn.danger { color: var(--red); border-color: var(--red); background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { min-height: 30px; }
.input:focus { outline: 2px solid rgba(14,114,174,.2); border-color: var(--brand); }
.input, select.input, textarea.input { border-color: #c3d7e6; }

/* Nhãn trạng thái theo màu nghiệp vụ */
.badge.amber { color: #92400e; }

/* Trang đăng nhập: giữ bố cục, đồng bộ màu trang đăng nhập HIS */
.login2 .art { background: radial-gradient(circle at 85% 12%, rgba(255,255,255,.22), transparent 32%), radial-gradient(circle at 10% 90%, rgba(255,255,255,.14), transparent 38%), linear-gradient(150deg, #29abe2 0%, #1f93d0 45%, #0b6fa8 100%); }
.login2 .pane { background: #f4f9fd; }
.login2 h1 { color: var(--heading); }
.login2 .welcome, .login2 .pane a { color: #0b6fa8; }
.login2 .go { background: linear-gradient(90deg, #29abe2, #0b6fa8); border-color: transparent; min-height: 46px; font-weight: 600; }
.login2 .go:hover { background: linear-gradient(90deg, #3bb6ea, #0a6399); }
.login2 .go.sso { display: flex; align-items: center; text-decoration: none; margin-top: 10px; }
.login2 .go.alt, .login2 .go.sso:not(.primary) { background: #fff; color: #0b6fa8; border: 1px solid #9cc9e6; }
.login2 .go.alt:hover, .login2 .go.sso:not(.primary):hover { background: #f2f8fd; }
.login2 .f input:focus { border-color: #0b6fa8; outline: 2px solid rgba(11,111,168,.18); }
/* Khối chào mừng trang làm việc: cùng họ màu A2 (phía chữ đậm #0A6399/#0E72AE ≥ 5:1, sáng dần về phải như trang đăng nhập) */
.hero { background: radial-gradient(circle at 92% 15%, rgba(255,255,255,.20), transparent 34%), linear-gradient(100deg, #0a6399 0%, #0e72ae 38%, #1683c4 62%, #1e96d3 82%, #29abe2 100%); box-shadow: 0 8px 24px rgba(10,99,153,.18); }

/* =================================================================
   Chữ & bố cục phong cách doanh nghiệp (gọn, thoáng, phẳng) – chỉ ERP; tông xanh giữ đồng bộ HIS
   ================================================================= */
@font-face { font-family: "Inter ERP"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-vietnamese-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Inter ERP"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter ERP"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root { font-family: "Inter ERP", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss03";
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 42, 67, .04); --shadow-hover: 0 4px 14px rgba(16, 42, 67, .08); }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.015em; }
h2 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; }
b, strong { font-weight: 600; }
.content { padding: 24px 28px; }
.page-head { margin-bottom: 18px; }
.page-head .sub { font-size: 13px; }

/* Thẻ phẳng: viền mảnh, bóng rất nhẹ, khoảng trắng rộng */
.card, .stat, .quick { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card { padding: 20px; margin-bottom: 18px; }
.card > h3:first-child, .dash-grid .card h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.stat { padding: 18px 20px; transition: box-shadow .15s, border-color .15s; }
a.stat:hover, .stat.clickable:hover, .stat[onclick]:hover { box-shadow: var(--shadow-hover); border-color: #c3d7e6; }
.stat .l { font-size: 13px; font-weight: 500; color: var(--muted); }
.stat .v, .kpi .v { font-size: 28px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; margin: 10px 0 4px; }
.kpi::after { display: none; }
.kpi .kic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }

/* Thao tác nhanh */
.quick { padding: 18px 20px; }
.quick .qt { font-weight: 600; font-size: 15px; color: var(--heading); margin-bottom: 12px; }
.quick .qa { gap: 12px; }
.quick .qa a { padding: 12px 14px; border-radius: 10px; font-weight: 500; transition: border-color .15s, background .15s; }
.quick .qa a:hover { border-color: #9cc6e4; background: var(--brand-soft); }

/* Bảng */
.tbl-wrap { border-radius: var(--radius); box-shadow: var(--shadow); }
.tbl th { background: #f7fafd; color: #4e6a80; font-size: 12.5px; font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid #edf3f8; }
.tbl tbody tr:hover td { background: #f5f9fd; }
.tbl tbody tr.click:hover td { background: #eef6fc; }
.tbl td.right, .tbl th.right { font-variant-numeric: tabular-nums; }

/* Tab */
.tabs { gap: 2px; margin-bottom: 16px; }
.tabs > button { padding: 10px 14px; font-weight: 500; color: #4e6a80; }
.tabs > button:hover { color: var(--brand); }
.tabs > button.active { font-weight: 600; border-bottom-width: 2px; }

/* Nhãn trạng thái: chấm màu + chữ, góc bo vừa */
.tag, .badge { font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; line-height: 1.6; }

/* Ô nhập */
.input, select.input, textarea.input { padding: 8px 12px; min-height: 38px; border-radius: 8px; }
.btn { border-radius: 8px; padding: 8px 16px; font-weight: 500; }

/* Biểu đồ: chữ cùng font, trục và lưới mờ, chú giải gọn */
.chart svg text, .donut-wrap svg text { font-family: inherit; font-variant-numeric: tabular-nums; }
.chart svg .bar { transition: opacity .12s; }
.chart svg .bar:hover { opacity: .85; }
.legend { gap: 16px; font-size: 12.5px; color: #4e6a80; margin-top: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.hbar { font-size: 13.5px; }
.hbar .ht { height: 8px; border-radius: 4px; background: #edf3f8; }
.hbar .ht i { border-radius: 4px; }
.hbar .hv { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--figure); }
.donut-legend > a, .donut-legend > div { padding: 8px 4px; border-bottom-color: #edf3f8; }
.donut-legend b { color: var(--figure); font-weight: 600; }
@media (max-width: 820px) { .content { padding: 16px; } }

/* Trung tâm cấu hình */
.cc-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.cc-nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.cc-nav a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.cc-nav a:hover { background: var(--brand-soft); text-decoration: none; color: var(--brand); }
.cc-nav .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cc-body { min-width: 0; }
.cc-sec { scroll-margin-top: 80px; }
.cc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 24px; padding: 14px 0; border-top: 1px solid #edf3f8; align-items: start; }
.cc-sec h3 + .cc-row { border-top: 0; padding-top: 4px; }
.cc-row.dirty { background: linear-gradient(90deg, rgba(41,171,226,.07), transparent 70%); box-shadow: inset 3px 0 0 var(--brand-315); padding-left: 10px; margin-left: -10px; }
.cc-t { font-weight: 600; color: var(--ink); }
.cc-h { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.cc-c { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.cc-c > .input, .cc-c textarea { width: 100%; }
.cc-num { display: flex; align-items: center; gap: 8px; }
.cc-num .input { width: 160px; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: #fff; }
.cc-chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.cc-chip input { margin: 0; }
.cc-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; width: 100%; }
.cc-map label > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.cc-map .input { width: 100px; }
.cc-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cc-switch span { width: 40px; height: 22px; border-radius: 999px; background: #c3d7e6; position: relative; transition: background .15s; flex: none; }
.cc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.cc-switch input:checked + span { background: var(--brand); }
.cc-switch input:checked + span::after { transform: translateX(18px); }
.cc-switch input:focus-visible + span { outline: 2px solid var(--brand-315); outline-offset: 2px; }
.cc-switch b { font-weight: 500; font-size: 13px; color: var(--muted); }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
textarea.bad { border-color: var(--red); outline-color: var(--red); }
.cc-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cc-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.cc-link:hover { border-color: #9cc6e4; background: var(--brand-soft); text-decoration: none; }
.cc-link span { font-size: 12.5px; color: var(--muted); }
.cc-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 16px rgba(16,42,67,.08); z-index: 5; }
.cc-bar > span { margin-right: auto; }
@media (max-width: 900px) { .cc-wrap { grid-template-columns: 1fr; } .cc-nav { position: static; flex-direction: row; flex-wrap: wrap; } .cc-row { grid-template-columns: 1fr; gap: 10px; } }
.cc-bar[hidden], .cc-row[hidden], .cc-sec[hidden] { display: none; }

/* ---------- Form đề xuất: bố cục 2 cột + khung đối chiếu tự động ---------- */
.wf-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; max-width: 1400px; margin: 0 auto; }
.wf-wrap .doc { max-width: none; margin: 0; }
.wf-aside { position: sticky; top: 78px; }
.eq-aside { padding: 0; overflow: hidden; }
.eq-aside-h { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #f7fafd; }
.eq-aside-h b { color: var(--heading); font-size: 14.5px; }
.eq-aside-h small { color: var(--muted); font-size: 12px; }
.eq-aside .eq-panel { padding: 16px 18px 18px; }
@media (max-width: 1100px) { .wf-wrap { grid-template-columns: 1fr; } .wf-aside { position: static; } }

/* Khung lỗi gửi duyệt (thay cho thông báo đỏ tự tắt) */
.form-alert { border: 1px solid #f3c2bd; background: #fdf2f1; color: #7a1d14; border-radius: 10px; padding: 14px 16px; margin: 4px 0 18px; }
.form-alert .fa-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.form-alert .fa-h b { color: var(--red); font-size: 14.5px; }
.form-alert .fa-rule { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--red); background: #fff; border: 1px solid #f3c2bd; border-radius: 999px; padding: 1px 8px; }
.form-alert ul { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; line-height: 1.5; }

/* Kết quả đối chiếu định mức */
.eq-panel { display: flex; flex-direction: column; gap: 16px; }
.eq-state { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #f7fafd; }
.eq-state b { display: block; font-size: 14.5px; }
.eq-state div > div { color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.45; }
.eq-ico { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: #9cb3c7; }
.eq-state.ok { background: var(--green-soft); border-color: #b9e3c8; } .eq-state.ok b { color: var(--green); } .eq-state.ok .eq-ico { background: var(--green); }
.eq-state.bad { background: #fdf2f1; border-color: #f3c2bd; } .eq-state.bad b { color: var(--red); } .eq-state.bad .eq-ico { background: var(--red); }
.eq-sec { display: flex; flex-direction: column; gap: 10px; }
.eq-t { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #4e6a80; }
.eq-grade { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 10px; font-weight: 600; }
.eq-note { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; color: #92400e; background: var(--amber-soft); border-radius: 999px; padding: 1px 8px; cursor: help; }
.eq-n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.eq-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.eq-kv span { color: var(--muted); } .eq-kv b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.eq-meter { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.eq-mh { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.eq-mh b { color: var(--ink); }
.eq-bar { height: 8px; border-radius: 4px; background: #edf3f8; overflow: hidden; }
.eq-bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .2s; }
.eq-meter.over { border-color: #f3c2bd; background: #fdf7f6; } .eq-meter.over .eq-bar i { background: var(--red); } .eq-meter.over .eq-mh span:last-child { color: var(--red); font-weight: 600; }
.eq-issues { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; color: #7a1d14; }
.eq-list { display: flex; flex-direction: column; gap: 8px; }
.eq-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; }
.eq-item.warn { border-color: #f1d9a6; background: #fffaf0; }
.eq-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.eq-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-item code, .eq-main code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--brand); font-weight: 600; }
.eq-main small { color: var(--muted); font-size: 11.5px; }
.eq-item > span { flex: 1; margin-left: 8px; color: var(--ink); }
.eq-item .btn.sm { min-height: 30px; padding: 4px 10px; flex: none; }
.eq-empty { color: var(--muted); font-size: 13px; }
.eq-hint { font-size: 12.5px; color: var(--brand); background: var(--brand-soft); border-radius: 8px; padding: 8px 12px; }
.eq-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.eq-form { display: flex; flex-direction: column; gap: 14px; }
.eq-form h3 { margin: 0; }
.eq-fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); }
.eq-fld small { color: var(--muted); font-weight: 400; font-size: 12px; }
@media (max-width: 900px) { .eq-layout { grid-template-columns: 1fr; } }

/* =================================================================
   BỘ CHUẨN GIAO DIỆN ERP 315 (v3) – áp cho mọi phân hệ, giữ tông xanh A2 đồng bộ HIS.
   Nguyên tắc: phẳng, viền mảnh, khoảng cách theo bậc 4/8/12/16/24, trạng thái tương tác rõ (rê / nhấn / focus / tắt),
   chữ & số dễ đọc (tabular-nums), tương phản đạt chuẩn.
   ================================================================= */
:root { --ring: 0 0 0 3px rgba(14,114,174,.22); --ease: cubic-bezier(.2,.7,.3,1); --r-sm: 8px; --r-md: 10px; --r-lg: 12px; }
::selection { background: rgba(41,171,226,.25); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* Nút bấm */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: var(--r-sm);
  font-weight: 500; font-size: 13.5px; line-height: 1; border: 1px solid #c3d7e6; background: #fff; color: var(--brand);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s, box-shadow .15s, transform .05s; text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--brand-soft); border-color: #9cc6e4; text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--btn-pri); color: #fff; border-color: transparent; box-shadow: 0 1px 2px rgba(10,99,153,.25); }
.btn.primary:hover:not(:disabled) { background: var(--btn-pri-hover); color: #fff; }
.btn.danger { color: var(--red); border-color: #efc3bd; background: #fff; }
.btn.danger:hover:not(:disabled) { background: #fdf2f1; border-color: var(--red); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn .ic { width: 16px; height: 16px; }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font: inherit; }
.toolbar { gap: 8px; }

/* Ô nhập */
.input, select.input, textarea.input { min-height: 38px; padding: 8px 12px; border: 1px solid #c9dbe8; border-radius: var(--r-sm); background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; font-size: 13.5px; }
.input:hover:not(:disabled) { border-color: #9cc6e4; }
.input:focus, select.input:focus, textarea.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input::placeholder { color: #8aa0b3; }
.input:disabled { background: #f3f7fa; color: var(--muted); }
select.input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234e6a80' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; }
.form label { font-size: 12.5px; font-weight: 600; color: #344054; margin-bottom: 6px; }
.form .help { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.form .fld.invalid .input, .form .fld.invalid .ref .input, .form .fld.invalid select { border-color: var(--red); box-shadow: 0 0 0 3px rgba(180,35,24,.12); }
.form .fld.invalid label { color: var(--red); }
.form .fld.invalid::after { content: "Bắt buộc nhập"; display: block; font-size: 12px; color: var(--red); margin-top: 4px; }
.form .fsec { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--heading); border-bottom: 1px solid var(--line); padding: 14px 0 8px; }
.ref .dd { border-radius: var(--r-sm); box-shadow: 0 12px 32px rgba(16,42,67,.14); border-color: var(--line); padding: 4px; max-height: 300px; overflow-y: auto; }
.ref .dd div { border-radius: 6px; padding: 8px 10px; }
.formbar { border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(16,42,67,.06); padding: 12px 20px; border-radius: 0; }

/* Thanh tìm kiếm & bộ lọc danh sách */
.filterbar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; gap: 10px; margin-bottom: 14px; }
.filterbar .input, .filterbar select.input { min-height: 36px; }
.searchbox { position: relative; flex: 1 1 260px; max-width: 360px; display: flex; align-items: center; }
.searchbox .ic { position: absolute; left: 11px; width: 16px; height: 16px; color: #6b8196; pointer-events: none; }
.searchbox .input { width: 100%; padding-left: 34px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: 13px; }
.fchip { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 10px; font-weight: 500; }

/* Tab trạng thái */
.tabs { border-bottom: 1px solid var(--line); gap: 0; margin-bottom: 14px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.tabs > button { padding: 10px 14px; color: #4e6a80; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s; }
.tabs > button:hover { color: var(--brand); background: transparent; }
.tabs > button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs > button .n { margin-left: 6px; font-size: 11.5px; font-weight: 600; background: #edf3f8; color: #4e6a80; border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.tabs > button.active .n { background: var(--brand-soft); color: var(--brand); }

/* Bảng */
.tbl-wrap { border-radius: var(--r-lg); overflow: auto; }
.list-body .tbl-wrap { max-height: calc(100vh - 250px); }
.tbl thead th { position: sticky; top: 0; z-index: 2; background: #f7fafd; color: #4e6a80; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: none; border-bottom: 1px solid var(--line); }
.tbl td { color: var(--ink); }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: #eef6fc; }
.tbl tbody tr.click:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand-315); }
.tbl td.right, .tbl th.right { text-align: right; }
.loading .tbl-wrap { opacity: .55; transition: opacity .15s; }
.pager { padding: 12px 2px; font-size: 13px; }
.pager .pg { display: flex; gap: 4px; align-items: center; }
.pager .pg .btn.sm { min-width: 32px; padding: 0 8px; }
.pg-gap { color: var(--muted); padding: 0 4px; }

/* Nhãn trạng thái: chấm màu + chữ */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 10px 2px 8px; border-radius: 999px; line-height: 1.6;
  background: #eef2f6; color: #475467; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; flex: none; }
.badge.gray::before { opacity: .5; }

/* Thẻ & tiêu đề trang */
.page-head { align-items: flex-end; margin-bottom: 18px; gap: 16px; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head .sub { margin-top: 4px; max-width: 72ch; line-height: 1.5; }
.page-head .muted a { color: var(--muted); } .page-head .muted a:hover { color: var(--brand); }
.card { transition: box-shadow .15s, border-color .15s; }
.card > h3:first-child { display: flex; align-items: center; gap: 8px; }
.kv { grid-template-columns: minmax(140px, 200px) 1fr; gap: 10px 18px; font-size: 13.5px; }
.kv > div:nth-child(odd) { color: #4e6a80; }
.kv > div:nth-child(even) { color: var(--ink); font-weight: 500; }

/* Thẻ số liệu (KPI) & dashboard */
.stats { gap: 16px; margin-bottom: 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { position: relative; display: flex; flex-direction: column; gap: 2px; }
.stat.link { cursor: pointer; }
.stat.link:hover { border-color: #9cc6e4; box-shadow: var(--shadow-hover); transform: translateY(-1px); transition: transform .15s var(--ease), box-shadow .15s; }
.stat .kh { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.stat .s { font-size: 12.5px; color: var(--muted); }
.stat .more { margin-top: 8px; font-size: 12.5px; color: var(--brand); font-weight: 500; }
.stat .kd { margin-top: 2px; }
.stat.red .v { color: var(--red); } .stat.amber .v { color: #b45309; } .stat.green .v { color: var(--green); }
.stat.red { border-top: 3px solid var(--red); } .stat.amber { border-top: 3px solid #e0a43b; } .stat.green { border-top: 3px solid #2f9e6a; }
.dash-hero h1 { color: var(--heading); }
.dash-filters .input, .dash-filters select.input { min-height: 36px; }
.chart { position: relative; }
.chart svg { overflow: visible; }

/* Hộp thoại */
.modal-bg { background: rgba(10, 30, 48, .42); backdrop-filter: blur(2px); animation: fadeIn .15s var(--ease); }
.modal { border-radius: 14px; box-shadow: 0 24px 64px rgba(10,30,48,.28); animation: popIn .18s var(--ease); overflow: hidden; }
.modal .mh { padding: 16px 20px; background: #fff; }
.modal .mh h3 { font-size: 16px; color: var(--heading); }
.modal .mb { padding: 18px 20px; }
.modal .mf { padding: 12px 20px; background: #f7fafd; }
.modal .x { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.modal .x:hover { background: #eef3f8; color: var(--ink); }
.modal-err { margin-top: 0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* Thông báo nhỏ */
#toasts { gap: 10px; right: 20px; bottom: 20px; }
.toast { display: flex; align-items: flex-start; gap: 10px; min-width: 280px; max-width: 440px; padding: 12px 12px 12px 14px; border-radius: 12px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(16,42,67,.16); font-size: 13.5px; line-height: 1.45;
  opacity: 0; transform: translateY(8px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast .ti { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); }
.toast.ok .ti { background: var(--green); } .toast.error .ti { background: var(--red); } .toast.warn .ti { background: #e0a43b; }
.toast.error { border-color: #f3c2bd; background: #fff; } .toast.ok { border-color: #b9e3c8; background: #fff; } .toast.warn { background: #fff; }
.toast .tm { flex: 1; padding-top: 2px; }
.toast .tx { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.toast .tx:hover { color: var(--ink); background: #eef3f8; }

/* Trạng thái trống / đang tải / lỗi trang */
.empty { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); }
.empty-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%230e72ae' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7l9-4 9 4v10l-9 4-9-4zM3 7l9 4 9-4M12 11v10'/%3E%3C/svg%3E") center no-repeat; }
.empty-ico.err { background: #fdecec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23b42318' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 3l10 18H2zM12 10v5M12 18h.01'/%3E%3C/svg%3E") center no-repeat; }
.empty-t { font-size: 13.5px; }
.page-error { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.skel-wrap { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #edf3f8 25%, #f6f9fc 37%, #edf3f8 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.view-enter { animation: viewIn .18s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view-enter, .modal, .modal-bg, .skel, .toast { animation: none !important; transition: none !important; } }

/* Biểu mẫu đề xuất & duyệt */
.tpl { border-radius: var(--r-md); padding: 14px 16px; transition: border-color .15s, box-shadow .15s, transform .1s; }
.tpl:hover { border-color: #9cc6e4; background: #fff; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.tpl .n { color: var(--heading); }
.doc { border-radius: var(--r-lg); }
.doc-title { color: var(--heading); }
.flow .fl-s { background: #f3f7fa; color: #4e6a80; border-color: var(--line); }
.flow .fl-s.cur { background: var(--brand-soft); color: var(--brand); border-color: #9cc6e4; }
.timeline { border-left-color: #d6e4ef; }
.timeline .it { position: relative; }
.timeline .it::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-315); }
@media (max-width: 820px) { .filterbar { padding: 8px; } .searchbox { max-width: none; } .tbl-wrap { max-height: none; } }

/* =================================================================
   Dashboard chuẩn (kiểu Base.vn): thẻ số liệu gọn, đều nhau, cả thẻ bấm được; thao tác nhanh dạng nút gọn;
   "Cần chú ý" dạng danh sách đọc đủ chữ.
   ================================================================= */
.stats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.stat, .stat.kpi { min-height: 128px; padding: 16px 18px; border: 1px solid var(--line); border-top-width: 1px; border-radius: 12px; background: #fff;
  box-shadow: none; display: flex; flex-direction: column; gap: 4px; position: relative; }
.stat.red, .stat.amber, .stat.green { border-top: 1px solid var(--line); }
.stat .kh { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; }
.stat .l { font-size: 13px; font-weight: 500; color: #4e6a80; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kpi .kic { width: 30px; height: 30px; border-radius: 8px; flex: none; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.kpi .kic svg { width: 16px; height: 16px; }
.stat.red .kic { background: #fdecec; color: var(--red); } .stat.amber .kic { background: #fef3c7; color: #b45309; } .stat.green .kic { background: #e7f6ec; color: var(--green); }
.stat .v, .kpi .v { font-size: 26px; font-weight: 650; margin: 8px 0 0; letter-spacing: -.02em; color: var(--heading); line-height: 1.15; }
.stat.red .v { color: var(--red); } .stat.amber .v { color: #b45309; } .stat.green .v { color: var(--green); }
.stat .s { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.stat .kd { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 4px; }
.stat .kd span { font-weight: 400; }
.stat .more { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  color: var(--brand); background: var(--brand-soft); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; margin: 0; }
.stat.link:hover .more, .stat.link:focus-visible .more { opacity: 1; transform: none; }
.stat.link:hover { border-color: #9cc6e4; box-shadow: 0 6px 18px rgba(16,42,67,.08); transform: translateY(-1px); }
.stat svg.spark { margin-top: auto; }

/* Thao tác nhanh */
.quick { padding: 16px 18px; }
.quick .qt { font-size: 14px; font-weight: 600; color: var(--heading); margin-bottom: 12px; }
.quick .qa { display: flex; flex-wrap: wrap; gap: 10px; }
.quick .qa a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: border-color .15s, background .15s, box-shadow .15s; }
.quick .qa a:hover { border-color: #9cc6e4; background: var(--brand-soft); box-shadow: 0 2px 8px rgba(16,42,67,.06); text-decoration: none; }
.quick .qi { width: 30px; height: 30px; border-radius: 8px; }
.quick .qi svg { width: 16px; height: 16px; }

/* Cần chú ý */
.card.alerts h3 { margin-bottom: 10px; }
.dash-alerts { display: flex !important; flex-direction: column; gap: 8px; grid-template-columns: none !important; }
.dash-alerts a, .dash-alerts div { display: flex !important; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 13.5px; width: 100%; max-width: none; white-space: normal; overflow: visible; }
.dash-alerts .al-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #eef6fc; color: var(--brand); }
.dash-alerts .red .al-ic { background: #fdecec; color: var(--red); } .dash-alerts .amber .al-ic { background: #fef3c7; color: #b45309; }
.dash-alerts .red, .dash-alerts .amber, .dash-alerts .blue { background: #fff; border-color: var(--line); }
.dash-alerts .red { box-shadow: inset 3px 0 0 var(--red); } .dash-alerts .amber { box-shadow: inset 3px 0 0 #e0a43b; } .dash-alerts .blue { box-shadow: inset 3px 0 0 var(--brand-315); }
.dash-alerts .al-t { flex: 1; min-width: 0; line-height: 1.45; }
.dash-alerts b { margin-left: auto; flex: none; font-weight: 600; font-size: 12.5px; color: var(--brand); padding: 4px 10px; border-radius: 7px; background: var(--brand-soft); }
.dash-alerts a:hover { border-color: #9cc6e4; text-decoration: none; }

/* Khung dashboard */
.dash-grid { gap: 16px; }
.dash-grid .card { padding: 18px 20px; }
.dash-grid .card h3 { font-size: 14.5px; font-weight: 600; color: var(--heading); padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid #edf3f8; }
.dash-hero { margin-bottom: 16px; }
.dash-hero h1, .dash-hero h2 { font-size: 20px; }

/* =================================================================
   Vòng 2 – thanh trên, thẻ số liệu gọn, menu trái, nhịp khoảng cách chặt hơn
   ================================================================= */
/* Thanh trên */
.top { height: 60px; gap: 10px; padding: 0 20px; }
.top .crumb { font-size: 15px; }
.top .crumb small { font-weight: 500; font-size: 12.5px; }
.top .gsearch { width: 340px; }
.top .gsearch input { min-height: 38px; border-radius: 10px; padding-left: 14px; box-shadow: 0 1px 2px rgba(6,60,95,.12); }
.top .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.top .icon-btn.round { width: 38px; height: 38px; padding: 0; border-radius: 10px; background: transparent; border: 1px solid transparent; color: #fff; }
.top .icon-btn.round:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.25); }
.top .icon-btn.round svg { width: 18px; height: 18px; }
.top .icon-btn .dot { top: -3px; right: auto; left: calc(50% + 3px); min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px;
  font-weight: 700; line-height: 16px; text-align: center; border-radius: 8px; letter-spacing: -.2px; pointer-events: none;
  background: #e5483d; border: 2px solid #1683c4; box-sizing: content-box; white-space: nowrap; z-index: 1; }
.top-cta { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 0; cursor: pointer;
  background: #fff; color: #0e72ae; font-weight: 600; font-size: 13.5px; box-shadow: 0 2px 6px rgba(6,60,95,.18); transition: transform .1s, box-shadow .15s; }
.top-cta:hover { box-shadow: 0 4px 12px rgba(6,60,95,.25); transform: translateY(-1px); }
.top-cta svg { width: 16px; height: 16px; }
.top-sep { width: 1px; height: 24px; background: rgba(255,255,255,.3); margin: 0 4px; }
.top .who { padding: 4px 8px 4px 10px; border-radius: 12px; }
.top .avatar { width: 34px; height: 34px; font-size: 12.5px; }
@media (max-width: 1100px) { .top-cta span, .top-cta { padding: 0 12px; } .top .gsearch { width: 240px; } }

/* Menu trái */
.side { width: 256px; }
.side .search { margin: 10px 12px 6px; }
.side .search input { min-height: 36px; font-size: 13px; }
.nav-group { padding: 14px 20px 6px; font-size: 10.5px; letter-spacing: .1em; opacity: .85; }
.nav-mod > button { padding: 8px 14px; margin: 1px 10px; width: calc(100% - 20px); border-radius: 8px; font-size: 13.5px; min-height: 38px; }
.nav-mod > button .ic { width: 17px; height: 17px; }
.nav-mod .items a { padding: 7px 14px 7px 44px; margin: 1px 10px; border-radius: 8px; font-size: 13px; }
.nav-mod .items a.active { box-shadow: inset 3px 0 0 #fff; }

/* Nội dung: nhịp khoảng cách */
.content { padding: 20px 24px 32px; }
.card { padding: 18px 20px; margin-bottom: 16px; }
.quick { margin-bottom: 16px; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 20px; }

/* Thẻ số liệu gọn */
.stats { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat, .stat.kpi { min-height: 0; padding: 14px 16px 12px; gap: 2px; }
.stat .kh { gap: 8px; }
.kpi .kic { width: 26px; height: 26px; border-radius: 7px; }
.kpi .kic svg { width: 14px; height: 14px; }
.stat .l { font-size: 12.5px; -webkit-line-clamp: 1; white-space: nowrap; text-overflow: ellipsis; display: block; }
.stat .v, .kpi .v { font-size: 22px; margin: 6px 0 0; }
.stat .s { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .kd { font-size: 11.5px; margin-top: 2px; }
.stat .more { top: 10px; right: 10px; width: 24px; height: 24px; }

/* Tab phân hệ trên dashboard */
.tabs { margin-bottom: 16px; }
.dash-hero { align-items: center; }
.dash-hero h1, .dash-hero h2 { font-size: 18px; margin: 0; }
/* Vòng 2 – sửa sau khi soi màn thật */
.top .menu-btn { display: none !important; }
@media (max-width: 1100px) { .top .menu-btn { display: inline-flex !important; } }
.top .crumb { flex: 1 1 160px; min-width: 120px; }
.stat .l { -webkit-line-clamp: 2; display: -webkit-box; white-space: normal; min-height: calc(1.35em * 2); }
.stat .kh { align-items: flex-start; }
.stat .v.txt { white-space: normal; font-size: 15px !important; font-weight: 600; line-height: 1.35; margin-top: 8px; }
.dash-filters .ref, .dash-filters .ref .input { min-width: 220px; }
/* Danh sách: mỗi bản ghi một dòng, chữ dài cắt "…"; bộ lọc gọn */
.list-body .tbl td { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.list-body .tbl td:first-child { font-weight: 600; color: var(--brand); }
.list-body .tbl th { white-space: nowrap; }
.list-body .tbl td:nth-child(2) { font-weight: 500; color: var(--heading); }
.filterbar .flt { flex: 0 1 190px; min-width: 150px; }
.filterbar .flt.ref, .filterbar select.flt { max-width: 220px !important; }
.filterbar .flt-more { display: none !important; }
.filterbar.show-more .flt-more { display: flex !important; }
.filterbar.show-more select.flt-more { display: block !important; }
.flt-toggle { margin-left: auto; }
/* Phần đầu trang chi tiết */
.rec-head { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; align-items: center; }
.rh-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.rh-av { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 16px;
  color: #fff; background: linear-gradient(135deg, #29abe2, #0e72ae); }
.rh-crumb { font-size: 12.5px; margin-bottom: 2px; }
.rec-head h1 { font-size: 19px; }
.rh-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; }
.rh-facts span { display: flex; gap: 6px; align-items: baseline; font-size: 13px; }
.rh-facts small { color: var(--muted); font-size: 12px; }
.rh-facts b { font-weight: 600; color: var(--ink); }
.rec-head .toolbar { flex-wrap: wrap; justify-content: flex-end; }
.wf-aside { max-height: calc(100vh - 96px); overflow-y: auto; scrollbar-width: thin; }
.eq-t { flex-wrap: wrap; }
/* Điện thoại */
@media (max-width: 820px) {
  .top { padding: 0 10px; gap: 4px; height: 56px; }
  .top-cta { width: 38px; padding: 0; justify-content: center; }
  .top-cta .lbl, .top-sep { display: none; }
  .top .icon-btn.round { width: 34px; height: 34px; }
  .top #chat-btn, .top a[href="#/v/office.mail"] { display: none; }
  .top .crumb { font-size: 14px; }
  .hero { padding: 20px; }
  .hero h1 { font-size: 22px; }
  .hero .hs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .hero .hs div, .hero .hs > a { padding: 4px 10px; min-width: 0; }
  .hero .hs b, .hero .hs > a b { font-size: 22px; }
  .hero .hs span { font-size: 11.5px; line-height: 1.3; display: block; }
  .quick .qa a { flex: 1 1 calc(50% - 10px); min-width: 0; white-space: normal; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rec-head { flex-direction: column; align-items: stretch; }
}
/* Số đếm trên nút tròn: chừa chỗ để "99+" không chạm nút kế bên */
.top .icon-btn.round:has(.dot) { margin-right: 10px; }
/* Định biên: thanh lấp đầy */
.hc-bar { position: relative; width: 120px; height: 18px; border-radius: 9px; background: var(--line); overflow: hidden; }
.hc-bar i { position: absolute; inset: 0 auto 0 0; background: var(--brand); border-radius: 9px; }
.hc-bar.over i { background: var(--red); }
.hc-bar span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 18px; font-weight: 600; color: var(--ink); }
/* Bật / tắt phân hệ */
.mod-g { margin: 18px 0 10px; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mod-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.mod-card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(14,114,174,.08); }
.mod-card.off { background: var(--bg); }
.mod-card.off .mod-b b, .mod-card.off .mod-ic { opacity: .55; }
.mod-card.locked { cursor: default; }
.mod-ic { flex: 0 0 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #e8f2fa; color: var(--brand); }
.mod-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mod-b b { color: var(--heading); font-size: 14px; }
.mod-b small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.mod-keep { color: var(--brand) !important; }
.switch { position: relative; flex: 0 0 38px; height: 22px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 11px; background: #c5d5e2; transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:disabled + i { opacity: .5; }
.mod-foot { position: sticky; bottom: 0; margin-top: 18px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -2px 12px rgba(16,40,60,.06); }
/* Hướng dẫn / SOP trên danh sách và form */
.guide-box { margin: 0 0 14px; border: 1px solid #cfe3f1; background: #f2f8fd; border-radius: 12px; padding: 0 14px; }
.guide-box summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; font-weight: 600; color: var(--heading); list-style: none; }
.guide-box summary::-webkit-details-marker { display: none; }
.guide-box summary a { margin-left: auto; font-weight: 500; font-size: 13px; }
.guide-text { padding: 0 0 12px; color: var(--ink); font-size: 13.5px; line-height: 1.55; }
.guide-text p { margin: 0 0 4px; }
/* Tùy chỉnh biểu mẫu & danh mục */
.cu-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.cu-nav { position: sticky; top: 76px; padding: 12px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; gap: 10px; }
.cu-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.cu-mod { margin: 10px 4px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.cu-item { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.cu-item span:first-child { flex: 1; min-width: 0; }
.cu-item:hover { background: var(--bg); }
.cu-item.on { background: #e8f2fa; color: var(--brand); font-weight: 600; }
.cu-n, .cu-c { min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.cu-c { margin-left: 6px; background: #dceaf4; color: var(--heading); }
.cu-sop { font-size: 10px; font-weight: 700; color: #067647; border: 1px solid #a6e3c4; border-radius: 6px; padding: 0 4px; }
.cu-pane { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cu-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cu-head h2 { margin: 2px 0 0; font-size: 19px; color: var(--heading); }
.cu-hint { margin: 0 0 10px; font-size: 13px; }
.cu-tbl td { vertical-align: middle; }
.cu-tbl .input { min-width: 120px; padding: 6px 8px; font-size: 13px; }
.cu-tbl td.c { text-align: center; }
.cu-mv { white-space: nowrap; }
.cu-mv .btn { padding: 2px 6px; }
.cu-type { display: block; font-size: 11.5px; }
tr.cu-off td, .cu-off { opacity: .6; }
tr.cu-sys td:nth-child(2) b { color: var(--muted); }
.cu-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.cu-ocard { display: flex; flex-direction: column; gap: 8px; }
.cu-oh { display: flex; justify-content: space-between; align-items: baseline; }
.cu-orows { display: flex; flex-direction: column; gap: 6px; }
.cu-orow { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 8px; align-items: center; }
.cu-orow code { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-hid { font-size: 12.5px; white-space: nowrap; }
.cu-tag { font-size: 11px; }
.cu-oadd { display: flex; gap: 8px; }
.cu-xcard { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cu-xh { display: flex; align-items: center; gap: 10px; }
.cu-xh b { color: var(--heading); }
.cu-xh .switch { margin-left: auto; }
.cu-xgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cu-fld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cu-fld > span { font-weight: 600; color: var(--heading); font-size: 12.5px; }
.cu-fld.wide { grid-column: 1 / -1; }
.cu-flags { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.cu-guide { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .cu-layout { grid-template-columns: 1fr; } .cu-nav { position: static; max-height: 320px; } .cu-opts { grid-template-columns: 1fr; } }
.seg { display: flex; background: var(--bg); border-radius: 9px; padding: 3px; gap: 3px; }
.seg-b { flex: 1; border: 0; background: transparent; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; font-weight: 600; }
.seg-b.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(16,40,60,.1); }
.cu-sec h3 { margin: 0 0 4px; font-size: 15px; color: var(--heading); }
.cu-wrow { display: grid; grid-template-columns: minmax(160px, 1.4fr) 150px minmax(140px, 1.2fr) auto auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 900px) { .cu-wrow { grid-template-columns: 1fr 1fr; } }
/* Quy tắc vận hành */
.rl-editor { display: flex; flex-direction: column; gap: 14px; }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rl-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.rl-conds { display: flex; flex-direction: column; gap: 8px; }
.rl-cond { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; display: flex; flex-direction: column; gap: 8px; }
.rl-cond.count { background: #f4f9fd; border-color: #cfe3f1; }
.rl-row, .rl-wrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rl-row .input, .rl-wrow .input { width: auto; min-width: 120px; flex: 1 1 140px; }
.rl-row > b { min-width: 30px; color: var(--brand); }
.rl-where { display: flex; flex-direction: column; gap: 6px; padding-left: 38px; }
.rl-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.rl-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 16px; font-size: 12.5px; cursor: pointer; background: #fff; }
.rl-chip.sp { border-color: #cfe3f1; background: #f2f8fd; }
.rl-chip:has(input:checked) { border-color: var(--brand); background: #e8f2fa; color: var(--brand); }
.cu-fld[hidden], .rl-sec [hidden] { display: none !important; }
.switch { display: inline-block; width: 38px; vertical-align: middle; }
.cu-tbl td:nth-child(2) { min-width: 170px; }
/* Chuỗi chứng từ liên quan */
.rel-card { margin-top: 16px; }
.rel-card h3 { margin: 0 0 12px; font-size: 15px; color: var(--heading); }
.rel-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 18px; }
.rel-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 8px; }
.rel-it { display: block; padding: 5px 0; font-size: 13.5px; text-decoration: none; color: var(--ink); border-bottom: 1px dashed var(--line); }
.rel-it small { display: block; color: var(--muted); font-size: 11.5px; }
a.rel-it:hover { color: var(--brand); }
.rel-g { margin-bottom: 12px; }
.rel-gh { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.rel-n { margin-left: auto; font-size: 12px; }
@media (max-width: 900px) { .rel-grid { grid-template-columns: 1fr; } }
/* Service Desk CNTT */
.sd-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.sd-layout > div:first-child { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 76px; }
.sd-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.sd-q { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.sd-q:hover { background: var(--bg); }
.sd-q.on { background: #e8f2fa; color: var(--brand); font-weight: 600; }
.sd-q b { min-width: 22px; padding: 0 7px; border-radius: 10px; background: #dceaf4; color: var(--heading); font-size: 12px; text-align: center; line-height: 20px; }
.sd-q.hot b { background: var(--red); color: #fff; }
.sd-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sd-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.sd-card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(14,114,174,.08); }
.sd-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.sd-top .grow { flex: 1; }
.sd-title { font-weight: 600; color: var(--heading); font-size: 14.5px; }
.sd-meta { font-size: 12.5px; color: var(--muted); }
.sd-sla { display: flex; align-items: center; gap: 10px; }
.sd-sla small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sd-bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.sd-bar i { display: block; height: 100%; background: var(--green, #1baf7a); }
.sd-sla.risk .sd-bar i { background: #eda100; } .sd-sla.risk small { color: #b54708; }
.sd-sla.over .sd-bar i { background: var(--red); } .sd-sla.over small { color: var(--red); font-weight: 600; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.svc { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--ink); }
.svc:hover { border-color: var(--brand); color: var(--brand); }
.svc svg { color: var(--brand); flex: 0 0 auto; }
.kb-sug:empty { display: none; }
.kb-sug { border: 1px solid #cfe3f1; background: #f2f8fd; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.kb-h { font-weight: 600; color: var(--heading); font-size: 13px; }
.kb-it a { font-size: 13.5px; }
.kb-sol { margin: 6px 0 4px 10px; font-size: 13px; }
.kb-sol p { margin: 0 0 4px; }
.stars { display: flex; gap: 4px; margin-top: 8px; }
.star { border: 0; background: none; font-size: 28px; color: #dceaf4; cursor: pointer; padding: 0; }
.star.on { color: #eda100; }
.sd-rep { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 14px; }
.sd-bars { display: flex; flex-direction: column; gap: 8px; }
.sd-br { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.sd-br span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-bt { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.sd-bt i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.sd-br b { text-align: right; }
@media (max-width: 900px) { .sd-layout { grid-template-columns: 1fr; } .sd-layout > div:first-child { position: static; } }
.kb-it summary { cursor: pointer; color: var(--brand); font-size: 13.5px; }
/* ===== Form chuẩn v4 (kiểu Base): nút chọn nhanh, khoảng thời gian, công tắc, tệp kéo thả ===== */
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-b { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13.5px; cursor: pointer; transition: all .12s; }
.choice-b:hover { border-color: var(--brand); color: var(--brand); }
.choice-b.on { background: #e8f2fa; border-color: var(--brand); color: var(--brand); font-weight: 600; box-shadow: inset 0 0 0 1px var(--brand); }
.fld.invalid .choice-b { border-color: #f3c2bd; }
.fld.rng .rng-l { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.fld.rng .rng-l > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rng-arrow { color: var(--muted); padding-bottom: 10px; }
.rng-chip { align-self: end; margin-bottom: 7px; padding: 4px 10px; border-radius: 999px; background: #e8f2fa; color: var(--brand); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rng-chip:empty { display: none; }
.rng-chip.bad { background: #fde8e6; color: var(--red); }
.fld.chk { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.fld.chk .switch { margin-top: 2px; }
.money-hint { font-size: 12px; color: var(--brand); font-weight: 600; min-height: 0; }
.money-hint:empty { display: none; }
.form .fsec { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 8px 0 -2px; font-size: 12.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--heading); }
.form .fsec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form textarea.input { resize: vertical; min-height: 74px; line-height: 1.5; }
.filedrop { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed #b9d3e6; border-radius: 12px; background: #f6fafd; cursor: pointer; transition: all .12s; }
.filedrop:hover, .filedrop.over { border-color: var(--brand); background: #eef6fc; }
.filedrop.has { border-style: solid; border-color: #a6e3c4; background: #f0fbf5; }
.fd-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(16,40,60,.08); flex: 0 0 auto; }
.fd-t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fd-t b { font-size: 13.5px; color: var(--heading); font-weight: 600; }
.fd-t small { font-size: 12px; color: var(--muted); }
.fd-name { font-size: 12.5px; color: #067647; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.form input[type=file]:not([hidden]) { padding: 8px; border: 1.5px dashed #b9d3e6; border-radius: 10px; background: #f6fafd; width: 100%; font-size: 13px; }
.form input[type=file]::file-selector-button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; margin-right: 10px; cursor: pointer; font: inherit; color: var(--brand); }
/* Hộp thoại đơn: form + khung tóm tắt bên phải */
.req-dlg { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; align-items: start; }
.req-aside { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: linear-gradient(180deg, #f2f8fd, #fff); border: 1px solid #dceaf4; }
.ra-h { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.ra-big { font-size: 28px; font-weight: 700; color: var(--heading); line-height: 1.1; }
.ra-big small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.ra-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ra-row:last-child { border-bottom: 0; }
.ra-row b { color: var(--heading); }
.ra-row b.neg { color: var(--red); }
.ra-flow { display: flex; flex-direction: column; gap: 6px; }
.ra-step { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ra-step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #e8f2fa; color: var(--brand); font-style: normal; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.ra-note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.ra-meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ra-meter i { display: block; height: 100%; background: var(--brand); }
.ra-meter.warn i { background: #eda100; } .ra-meter.over i { background: var(--red); }
@media (max-width: 860px) { .req-dlg { grid-template-columns: 1fr; } .req-aside { position: static; } .fld.rng .rng-l { grid-template-columns: 1fr; } .rng-arrow { display: none; } }
.form .fsec { border-bottom: 0; padding: 12px 0 0; }
/* ===== Trang của tôi v2 (kiểu Base) ===== */
.me-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: center; padding: 20px 22px; border-radius: 16px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #3aa0d8 0%, #0e72ae 45%, #0b4f7a 100%); box-shadow: 0 8px 24px rgba(14,114,174,.18); margin-bottom: 14px; }
.me-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.me-av { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: 0 0 auto; }
.me-greet { font-size: 13px; opacity: .85; }
.me-name { font-size: 21px; font-weight: 700; line-height: 1.2; }
.me-sub { font-size: 13px; opacity: .85; margin-top: 2px; }
.me-clock { display: flex; flex-direction: column; align-items: flex-end; }
.me-clock b { font-size: 30px; font-weight: 700; letter-spacing: .5px; line-height: 1; }
.me-clock span { font-size: 12.5px; opacity: .85; margin-top: 4px; text-transform: capitalize; }
.me-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.me-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff; text-decoration: none; font-size: 13px; }
.me-link:hover { background: rgba(255,255,255,.24); }
.me-dot { min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e5483d; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.me-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; scrollbar-width: none; }
.me-tabs::-webkit-scrollbar { display: none; }
.me-tabs button { border: 0; background: transparent; padding: 9px 16px; border-radius: 9px; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.me-tabs button.on { background: #e8f2fa; color: var(--brand); font-weight: 600; }
.me-tabs .n { min-width: 18px; padding: 0 6px; border-radius: 9px; background: #eb6834; color: #fff; font-size: 11px; line-height: 18px; }
.me-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.me-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.me-face:empty { display: none; }
.me-punch-card { display: flex; flex-direction: column; gap: 12px; }
.mpc-h { display: flex; justify-content: space-between; align-items: center; }
.mpc-h b { font-size: 16px; color: var(--heading); }
.mpc-msg { color: var(--ink); font-size: 14px; }
.mpc-queue { margin-top: 8px; font-size: 13px; color: var(--muted, #667); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mpc-shift { padding: 10px 12px; border-radius: 10px; background: #f2f8fd; font-size: 13.5px; }
.me-punch { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 18px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #1baf7a, #0e8f63); color: #fff; font: inherit; font-size: 18px; font-weight: 700; box-shadow: 0 6px 18px rgba(27,175,122,.28); transition: transform .1s; }
.me-punch:active { transform: scale(.98); }
.me-punch.out { background: linear-gradient(135deg, #eb6834, #c9531f); box-shadow: 0 6px 18px rgba(235,104,52,.28); }
.me-punch:disabled { opacity: .7; }
.mp-ic { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.mpc-note { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.me-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.me-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.me-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .12s; }
.me-kpi:hover { border-color: var(--brand); }
.me-kpi span { font-size: 12.5px; color: var(--muted); }
.me-kpi b { font-size: 24px; color: var(--heading); line-height: 1.2; }
.me-kpi small { font-size: 11.5px; color: var(--muted); }
.me-kpi.green b { color: #067647; } .me-kpi.amber b { color: #b54708; }
.mq-h { font-size: 12.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--heading); margin-bottom: 10px; }
.mq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mq { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 12.5px; text-align: center; }
.mq:hover { background: #f2f8fd; color: var(--brand); }
.mq-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #e8f2fa; color: var(--brand); }
.me-shifts { margin-top: 14px; }
.me-tl { display: flex; flex-direction: column; gap: 8px; }
.me-tl-it { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.me-tl-it.now { border-color: #a6e3c4; background: #f0fbf5; }
.tl-d { display: flex; flex-direction: column; min-width: 86px; } .tl-d b { color: var(--heading); font-size: 13.5px; } .tl-d span { font-size: 12px; color: var(--muted); }
.tl-b { display: flex; flex-direction: column; flex: 1; min-width: 0; } .tl-b b { font-size: 14px; } .tl-b span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .me-grid { grid-template-columns: 1fr; } .me-hero { grid-template-columns: 1fr; } .me-clock { align-items: flex-start; } }
/* ===== Webapp điện thoại: thanh điều hướng dưới, đầu trang gọn ===== */
.mnav { display: none; }
@media (max-width: 760px) {
  .mnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; justify-content: space-around; align-items: flex-end;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16,40,60,.06); }
  .mn-i { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border: 0; background: none; color: var(--muted); text-decoration: none; font: inherit; font-size: 11px; cursor: pointer; }
  .mn-i.on { color: var(--brand); font-weight: 600; }
  .mn-add { flex: 0 0 64px; }
  .mn-plus { width: 50px; height: 50px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; line-height: 1; color: #fff;
    background: linear-gradient(135deg, #3aa0d8, #0e72ae); box-shadow: 0 6px 16px rgba(14,114,174,.35); border: 3px solid #fff; }
  .content { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
  .top .gsearch, .top .top-sep, .top #chat-btn, .top a[href="#/v/office.mail"], .top .top-cta { display: none !important; }
  .top .crumb { font-size: 15px; }
  .modal { width: 100% !important; max-width: 100% !important; margin: 0 !important; border-radius: 18px 18px 0 0 !important; align-self: flex-end; max-height: 92vh; }
  .modal-bg { align-items: flex-end !important; padding: 0 !important; }
  .form { grid-template-columns: minmax(0, 1fr) !important; }
  .me-hero { padding: 16px; border-radius: 14px; }
  .me-clock b { font-size: 24px; }
  .mq-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .me-punch { padding: 20px; font-size: 19px; }
  .btn, .input, .choice-b { min-height: 42px; }
  .req-dlg { gap: 14px; }
}
.mob-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.mob-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.mob-qr-img { width: 240px; height: 240px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.mob-qr-img svg { width: 100%; height: 100%; }
.mob-url { font-family: ui-monospace, monospace; font-size: 13px; color: var(--heading); word-break: break-all; }
@media (max-width: 860px) { .mob-grid { grid-template-columns: 1fr; } }

/* Đợt F – lịch trực */
.rs-grid th, .rs-grid td { white-space: nowrap; vertical-align: top; font-size: 12.5px; }
.rs-grid .rs-sticky { position: sticky; left: 0; background: var(--card, #fff); z-index: 1; }
.rs-grid tr.rs-we td { background: color-mix(in srgb, var(--amber, #f59e0b) 6%, transparent); }
.rs-chip { display: block; margin: 2px 0; color: inherit; text-decoration: none; }
.rs-chip.draft { opacity: .6; font-style: italic; }

.json-list{margin:0;padding-left:18px}.json-list li{margin:2px 0}

.ops-banner{position:sticky;top:0;z-index:300;padding:8px 16px;font-weight:600;font-size:13.5px;text-align:center}.ops-banner.warn{background:#fef3c7;color:#7c4a03}.ops-banner.err{background:#fde2e1;color:#8a1c14}
