/* KODS – giao diện quản lý. Màu thép mạ kẽm, điểm nhấn đỏ cửa ngăn cháy. */

@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format('woff2'); 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: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/be-vietnam-pro-latin-ext-400-normal.woff2) format('woff2'); 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: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/be-vietnam-pro-latin-400-normal.woff2) format('woff2'); 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; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/be-vietnam-pro-vietnamese-500-normal.woff2) format('woff2'); 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: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/be-vietnam-pro-latin-ext-500-normal.woff2) format('woff2'); 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: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/be-vietnam-pro-latin-500-normal.woff2) format('woff2'); 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; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format('woff2'); 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: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/be-vietnam-pro-latin-ext-600-normal.woff2) format('woff2'); 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: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/be-vietnam-pro-latin-600-normal.woff2) format('woff2'); 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; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/be-vietnam-pro-vietnamese-700-normal.woff2) format('woff2'); 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: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/be-vietnam-pro-latin-ext-700-normal.woff2) format('woff2'); 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: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/be-vietnam-pro-latin-700-normal.woff2) format('woff2'); 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; }

/* Montserrat — chữ tiêu đề theo bộ nhận diện Köd's (1.8.0); Light 300 cho dòng website */
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 300; src: url(/fonts/montserrat-vietnamese-300-normal.woff2) format('woff2'); 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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 300; src: url(/fonts/montserrat-latin-ext-300-normal.woff2) format('woff2'); 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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 300; src: url(/fonts/montserrat-latin-300-normal.woff2) format('woff2'); 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; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/montserrat-vietnamese-700-normal.woff2) format('woff2'); 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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/montserrat-latin-ext-700-normal.woff2) format('woff2'); 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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/montserrat-latin-700-normal.woff2) format('woff2'); 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; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 800; src: url(/fonts/montserrat-vietnamese-800-normal.woff2) format('woff2'); 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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 800; src: url(/fonts/montserrat-latin-ext-800-normal.woff2) format('woff2'); 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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 800; src: url(/fonts/montserrat-latin-800-normal.woff2) format('woff2'); 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 {
  --bg: #F3F1EE;
  --surface: #FFFFFF;
  --surface-2: #F6F4F1;
  --surface-3: #EFEBE5;
  --ink: #2B2B2E; /* chữ chính theo bộ nhận diện */
  --ink-2: #4A443D;
  --muted: #6C655E;
  --line: #E2DDD6;
  --line-2: #ECE8E2;
  --brand: #BE202F;
  --brand-dark: #981824;
  --brand-soft: #FBE9EA; /* nền nhấn nhẹ theo bộ nhận diện */
  --steel: #2D3E4A;
  --focus: #BE202F;
  --green: #1D7447; --green-bg: #E5F3EB;
  --blue: #22598A; --blue-bg: #E6EFF7;
  --amber: #8A5200; --amber-bg: #FDF0DC;
  --red: #B3401A; --red-bg: #FBE5DC; /* cảnh báo khẩn: cam đất — KHÔNG trùng đỏ thương hiệu */
  --grey: #56626C; --grey-bg: #EDEAE5;
  --violet: #57479A; --violet-bg: #EEEAF9;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(24, 34, 42, .06), 0 2px 8px rgba(24, 34, 42, .05);
  --nav-w: 232px;
  --font: 'Be Vietnam Pro', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 21px; line-height: 1.3; }
h2 { font-size: 16px; }
h3 { font-size: 14.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Khởi động ── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { font-weight: 700; letter-spacing: .3em; color: var(--brand); font-size: 22px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .boot-mark { animation: none; } }

/* ── Khung ứng dụng ── */
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; }
.nav {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 16px 16px 12px; }
.brand-logo { height: 34px; width: auto; max-width: 160px; display: block; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark img { width: 34px; height: 34px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .02em; line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.login-logo { height: 46px; width: auto; display: block; }

/* ── Tôn chỉ công ty — banner lộng lẫy (hiện sau đăng nhập) ── */
.creed-card { background: var(--surface); border-radius: 16px; width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.4); }
.creed-hero { position: relative; background: linear-gradient(155deg, #241412, #5a1620 50%, #BE202F 125%); color: #fff; padding: 26px 28px 22px; overflow: hidden; }
.creed-hero .slats { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, rgba(255,255,255,.05) 0 13px, rgba(0,0,0,.05) 13px 15px); -webkit-mask: linear-gradient(90deg, transparent, #000 48%); mask: linear-gradient(90deg, transparent, #000 48%); }
.creed-hero .slats::after { content: ''; position: absolute; left: 28px; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #f5b9b0, transparent); }
.creed-hero > .creed-top { position: relative; }
.creed-logo { height: 40px; width: auto; display: block; margin-bottom: 14px; }
.creed-eyebrow { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.72); font-weight: 600; }
.creed-title { font-size: 25px; font-weight: 800; line-height: 1.12; margin: 4px 0 0; }
.creed-list { list-style: none; margin: 0; padding: 10px 12px; overflow-y: auto; }
.creed-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; }
.creed-item:nth-child(odd) { background: var(--surface-2); }
.creed-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; box-shadow: 0 2px 7px rgba(190,32,47,.4); }
.creed-h { font-weight: 700; color: var(--ink); line-height: 1.3; }
.creed-d { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.creed-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.creed-foot .btn { min-width: 280px; min-height: 46px; font-size: 15px; }
@media (max-width: 520px) { .creed-title { font-size: 21px; } .creed-hero { padding: 22px 20px 18px; } .creed-foot .btn { min-width: 0; width: 100%; } }
.nav-group { padding: 6px 8px 4px; }
.nav-group > .nav-title {
  font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px 4px; display: flex; align-items: center; gap: 8px;
}
.nav a.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--ink-2);
  font-size: 13.5px; text-decoration: none; border-left: 3px solid transparent;
}
.nav a.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav a.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); border-left-color: var(--brand); font-weight: 500; }
.nav-foot { margin-top: auto; padding: 12px 16px 16px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-2); }
.demo-flag { margin: 0 12px 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--amber-bg); color: var(--amber); font-size: 12px; font-weight: 500; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; background: rgba(236, 239, 242, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line-2);
}
.menu-btn { display: none; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.back-btn svg { width: 18px; height: 18px; color: var(--brand); }
.back-btn[hidden] { display: none; }
@media (max-width: 600px) { .back-btn span { display: none; } .back-btn { padding: 6px 8px; } }
.gsearch { position: relative; flex: 1; max-width: 460px; }
.gsearch input[type=search] { width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.gsearch svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.gsearch .menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); }
.top-user { margin-left: auto; position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 1px solid transparent; background: none; padding: 4px 8px; border-radius: 999px; cursor: pointer; }
.user-btn:hover { background: var(--surface); border-color: var(--line); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--steel); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.user-meta { text-align: left; line-height: 1.25; }
.user-meta b { display: block; font-size: 13px; font-weight: 600; }
.user-meta span { font-size: 11.5px; color: var(--muted); }
.view { padding: 20px 24px 64px; max-width: 1480px; width: 100%; }

/* ── Nút ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; white-space: nowrap; font-weight: 500; font-size: 13.5px; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.dark { background: var(--steel); border-color: var(--steel); color: #fff; }
.btn.dark:hover { background: #1F2D37; }
.btn.danger { color: var(--red); border-color: #EBC4BF; }
.btn.danger:hover { background: var(--red-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { min-height: 28px; padding: 3px 10px; font-size: 12.5px; }
.btn.icon { padding: 6px; min-width: 34px; }
.btn svg { flex: none; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Đầu trang ── */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-head .crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.page-head .crumb a { color: var(--muted); }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ── Thẻ, khối ── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel + .panel, .panel + .section, .section + .section, .section + .panel { margin-top: 16px; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.section-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.section-head h2, .section-head h3 { flex: 1; }
.section-body { padding: 16px; }
.section-note { font-size: 12.5px; color: var(--muted); padding: 0 16px 12px; margin-top: -4px; }

/* ── Chip trạng thái ── */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 20px; background: var(--grey-bg); color: var(--grey); }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.blue { background: var(--blue-bg); color: var(--blue); }
.chip.amber { background: var(--amber-bg); color: var(--amber); }
.chip.red { background: var(--red-bg); color: var(--red); }
.chip.violet { background: var(--violet-bg); color: var(--violet); }
.chip.plain::before { display: none; }

/* ── Thanh công cụ danh sách ── */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { position: relative; flex: 1 1 240px; max-width: 360px; }
.toolbar .search input { width: 100%; padding-left: 32px; }
.toolbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar select, .toolbar input[type=date] { width: auto; max-width: 210px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; cursor: pointer; background: var(--surface); user-select: none; }
.toggle input { margin: 0; }
.toggle.on { background: var(--blue-bg); border-color: #B9D0E6; color: var(--blue); }
.date-range { display: inline-flex; align-items: center; gap: 4px; }
.toolbar .filters { display: contents; }
.toolbar .filter-btn { display: none; }
.toolbar .ref-filter { min-width: 200px; flex: 0 1 240px; }
.date-range span { color: var(--muted); font-size: 12px; }

/* ── Bảng ── */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
table.grid th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
table.grid th.sortable { cursor: pointer; }
table.grid th.sortable:hover { color: var(--ink); }
table.grid th .arrow { font-size: 10px; margin-left: 3px; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover td { background: #F8FAFB; }
table.grid tbody tr.static { cursor: default; }
table.grid td.code { font-weight: 600; white-space: nowrap; }
table.grid td.wrap { max-width: 360px; }
table.grid tfoot td { font-weight: 600; background: var(--surface-2); border-bottom: none; }
table.grid tr.warn td { background: #FFFBF2; }
table.grid td.tog { color: var(--muted); cursor: pointer; text-align: center; padding-left: 8px; padding-right: 0; }
table.grid.prod td { white-space: nowrap; }
table.grid.prod td.name { white-space: normal; min-width: 240px; max-width: 340px; }
table.grid.prod td.name .small { white-space: normal; }
table.grid.prod tr.detail > td { white-space: normal; }
table.grid tr.detail > td { background: var(--surface-2); padding-top: 4px; padding-bottom: 12px; }
table.grid.sub { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
table.grid.sub th { background: var(--surface); position: static; }
table.grid.sub td, table.grid.sub th { padding: 6px 10px; font-size: 13px; }
table.grid tr.bad td { background: #FFF6F5; }
.late { color: var(--red); font-weight: 500; }
.neg { color: var(--red); }
.pos { color: var(--green); }
.bar { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.bar i { display: block; height: 6px; flex: 1; background: var(--line-2); border-radius: 3px; overflow: hidden; position: relative; }
.bar i b { position: absolute; inset: 0 auto 0 0; background: var(--blue); border-radius: 3px; }
.bar.done i b { background: var(--green); }
.bar span { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 34px; text-align: right; }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.pager .grow { flex: 1; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

/* ── Biểu mẫu ── */
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(190, 32, 47, .16); }
input[readonly], textarea[readonly] { background: var(--surface-2); color: var(--ink-2); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-2); opacity: 1; -webkit-text-fill-color: var(--ink-2); }
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
input.money, input.number { text-align: right; font-variant-numeric: tabular-nums; }
.fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field > label .req { color: var(--brand); margin-left: 2px; }
.field .help { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.field.w2 { grid-column: span 2; } .field.w3 { grid-column: span 3; } .field.w4 { grid-column: span 4; }
.field.err input, .field.err select, .field.err textarea, .field.err .ref-box { border-color: var(--red); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 0; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.switch-row { min-height: 34px; display: flex; align-items: center; }
.form-error { margin-bottom: 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--red-bg); color: var(--red); border: 1px solid #EFC7C2; }
.form-error:empty { display: none; }
.meta-line { font-size: 12px; color: var(--muted); margin-top: 16px; }

/* Ô chọn tham chiếu */
.ref-box { position: relative; display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); min-height: 34px; }
.ref-box:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(190, 32, 47, .16); }
.ref-box input.ref-text { border: none; box-shadow: none !important; min-height: 32px; background: transparent; flex: 1; min-width: 0; padding-right: 4px; }
.ref-box .ref-btn { border: none; background: none; color: var(--muted); padding: 0 8px; cursor: pointer; display: grid; place-items: center; }
.ref-box .ref-btn:hover { color: var(--ink); }
.ref-box.disabled { background: var(--surface-2); }
.ref-box.disabled .ref-btn.clear { display: none; }
.menu { position: absolute; z-index: 60; left: 0; top: calc(100% + 4px); min-width: 100%; max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(24, 34, 42, .14); padding: 4px; }
.menu .opt { padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; line-height: 1.35; }
.menu .opt .sub { display: block; font-size: 12px; color: var(--muted); }
.menu .opt.active, .menu .opt:hover { background: var(--blue-bg); }
.menu .grp { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 8px 10px 2px; }
.menu .none { padding: 8px 10px; color: var(--muted); font-size: 13px; }
.dropdown { position: relative; }
.dropdown .menu { left: auto; right: 0; min-width: 220px; }
.dropdown .menu a, .dropdown .menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: none; background: none; text-align: left; cursor: pointer; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.dropdown .menu a:hover, .dropdown .menu button:hover { background: var(--surface-2); }
.dropdown .menu .danger { color: var(--red); }
.dropdown .menu hr { border: none; border-top: 1px solid var(--line-2); margin: 4px 0; }

/* Lưới dòng chi tiết */
.cgrid-wrap { overflow-x: auto; }
table.cgrid { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
table.cgrid input[type=number] { -moz-appearance: textfield; appearance: textfield; }
table.cgrid input[type=number]::-webkit-inner-spin-button, table.cgrid input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
table.cgrid input, table.cgrid select { padding-left: 7px; padding-right: 7px; }
table.cgrid select { appearance: none; -webkit-appearance: none; padding-right: 18px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2366727C' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 6px center; }
table.cgrid select:disabled { background-color: var(--surface-2); }
table.cgrid .ref-box .ref-btn { display: none; }
table.cgrid .ref-box:focus-within .ref-btn.clear:not([hidden]) { display: grid; }
table.cgrid th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
table.cgrid th:first-child, table.cgrid td:first-child { padding-left: 12px; }
table.cgrid td { padding: 4px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.cgrid td.idx { color: var(--muted); font-size: 12px; text-align: right; width: 32px; }
table.cgrid td.ro { font-variant-numeric: tabular-nums; text-align: right; padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
table.cgrid input, table.cgrid select { min-height: 32px; padding: 4px 8px; }
table.cgrid .ref-box { min-height: 32px; }
table.cgrid .ref-box input.ref-text { min-height: 30px; }
table.cgrid tfoot td { font-weight: 600; padding: 8px 10px; border-bottom: none; }
table.cgrid td.acts { white-space: nowrap; padding-right: 6px; }
table.cgrid td.acts .btn.icon { min-width: 26px; padding: 4px; }
.child-foot { display: flex; gap: 8px; padding: 10px 12px; flex-wrap: wrap; align-items: center; }
.child-foot .grow { flex: 1; }

/* Khối tổng tiền */
.totals { display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 16px; padding: 16px; }
.totals .words { color: var(--ink-2); font-size: 13px; align-self: end; font-style: italic; }
.totals dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; }
.totals dt { color: var(--ink-2); font-size: 13px; }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; min-width: 150px; }
.totals dd input, .totals dd select { width: 170px; text-align: right; }
.totals dt.big, .totals dd.big { font-size: 16px; font-weight: 700; color: var(--ink); padding-top: 6px; border-top: 1px solid var(--line-2); }

/* Tiến trình đơn hàng */
.flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.flow .step { position: relative; padding: 12px 14px 12px 22px; min-width: 0; border-right: 1px solid var(--line-2); }
.flow .step:last-child { border-right: none; }
.flow .step::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line-2); }
.flow .step.done::before { background: var(--green); }
.flow .step.active::before { background: var(--blue); }
.flow .step.skip { opacity: .55; }
.flow .step .lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.flow .step .val { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow .step.done .val { color: var(--green); }
.flow .step.active .val { color: var(--blue); }
.flow .step a { color: inherit; }
.flow .step .mini { height: 4px; border-radius: 2px; background: var(--line-2); margin-top: 6px; overflow: hidden; }
.flow .step .mini b { display: block; height: 100%; background: var(--blue); }
.flow .step.done .mini b { background: var(--green); }

/* Tệp đính kèm */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.file { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.file .thumb { width: 44px; height: 44px; border-radius: 4px; background: var(--surface-3); flex: none; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 600; }
.file .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file .info { min-width: 0; flex: 1; }
.file .info a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--ink); }
.file .info span { font-size: 11.5px; color: var(--muted); }
.dropzone { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 14px; text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
.dropzone.over { border-color: var(--focus); background: var(--blue-bg); }
@media (hover: none) { .dropzone { display: none; } }

/* Liên quan */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; margin-top: 16px; }
.related .section-head h3 { font-size: 13.5px; }
.related table.grid th, .related table.grid td { padding: 6px 12px; font-size: 13px; }

/* ── Tổng quan ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; position: relative; }
a.card:hover { border-color: #B8C3CC; text-decoration: none; }
.card .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.card .v { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.card .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.card .n { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card.red .n { color: var(--red); }
.card.amber .n { color: var(--amber); }
.card.red { border-left: 3px solid var(--red); }
.card.amber { border-left: 3px solid #E0A23A; }
.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.alist { list-style: none; margin: 0; padding: 4px 0; }
.alist li a { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 9px 16px; color: var(--ink); text-decoration: none; }
.alist li a:hover { background: var(--surface-2); }
.alist .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--amber); }
.alist .dot.red { background: var(--red); }
.alist .dot.blue { background: var(--blue); }
.alist .dot.green { background: var(--green); }
.alist .t { font-weight: 500; line-height: 1.35; }
.alist .s { font-size: 12.5px; color: var(--muted); }
.alist .kind { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 14px 16px 16px; }
.pipe .p { padding: 6px 12px; border-left: 3px solid var(--line-2); }
.pipe .p:nth-child(1) { border-color: #C9D3DB; }
.pipe .p:nth-child(2) { border-color: #9DB4C7; }
.pipe .p:nth-child(3) { border-color: #5F86A6; }
.pipe .p:nth-child(4) { border-color: var(--steel); }
.pipe .p b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.pipe .p span { font-size: 12.5px; color: var(--muted); }
.chart { padding: 8px 16px 16px; }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); padding: 0 16px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* Lịch tiến độ */
.gantt { overflow-x: auto; }
.gantt table { border-collapse: collapse; min-width: 900px; width: 100%; table-layout: fixed; }
.gantt th, .gantt td { border-bottom: 1px solid var(--line-2); padding: 0; height: 38px; }
.gantt th { font-size: 11.5px; color: var(--muted); font-weight: 500; text-align: left; padding: 6px 4px; background: var(--surface-2); border-left: 1px solid var(--line-2); }
.gantt td.lbl { width: 300px; min-width: 240px; padding: 6px 12px; font-size: 13px; vertical-align: middle; }
.gantt td.lbl a { font-weight: 600; color: var(--ink); }
.gantt td.lbl .s { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.gantt td.track { position: relative; }
.gantt .bgcol { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-2); }
.gantt .today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand); opacity: .7; z-index: 2; }
.gantt .bar-g { position: absolute; top: 10px; height: 18px; border-radius: 4px; background: #BFD3E4; overflow: hidden; z-index: 1; min-width: 6px; }
.gantt .bar-g b { position: absolute; inset: 0 auto 0 0; background: var(--blue); }
.gantt .bar-g.production { background: #C9D9C9; } .gantt .bar-g.production b { background: var(--green); }
.gantt .bar-g.design { background: #E6DCF5; } .gantt .bar-g.design b { background: var(--violet); }
.gantt .bar-g.late { outline: 2px solid var(--red); outline-offset: 1px; }

/* ── Hộp thoại, thông báo ── */
.overlay { position: fixed; inset: 0; background: rgba(24, 34, 42, .38); z-index: 100; display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--surface); border-radius: 10px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.dialog.wide { width: min(860px, 100%); }
.dialog header { padding: 16px 20px 8px; }
.dialog .body { padding: 8px 20px 16px; overflow-y: auto; }
.dialog footer { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line-2); }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--steel); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: 13.5px; max-width: min(560px, 92vw); pointer-events: auto; }
.toast.red { background: var(--red); }
.toast.green { background: var(--green); }

/* ── Đăng nhập ── */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }
.login-art { background: linear-gradient(155deg, #241412 0%, #5a1620 50%, #BE202F 125%); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; }
.login-art .slats { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, rgba(255,255,255,.045) 0 13px, rgba(0,0,0,.05) 13px 15px); -webkit-mask: linear-gradient(90deg, transparent, #000 42%); mask: linear-gradient(90deg, transparent, #000 42%); }
.login-art .slats::after { content: ''; position: absolute; left: 44px; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #f5b9b0, transparent); }
.login-lock { position: relative; display: flex; align-items: center; gap: 10px; }
.login-lock svg { width: 34px; height: 32px; flex: none; }
.login-lock b { font-weight: 700; letter-spacing: .01em; font-size: 19px; line-height: 1; }
.login-art h2 { position: relative; font-size: 30px; font-weight: 800; line-height: 1.2; max-width: 520px; letter-spacing: -.01em; }
.login-art p { position: relative; color: rgba(255,255,255,.75); max-width: 480px; margin: 12px 0 0; }
.login-form { background: var(--surface); display: flex; flex-direction: column; justify-content: center; padding: 48px 40px; gap: 14px; }
.login-form .brand { padding: 0 0 12px; }
.login-form h1 { font-size: 20px; }
.login-form .btn { width: 100%; min-height: 40px; }
.login-note { font-size: 12.5px; color: var(--muted); }
.login-hint { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--blue-bg); color: #1B4A73; font-size: 13px; line-height: 1.5; }
.login-help { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.login-help ol { margin: 6px 0 0; padding-left: 20px; }
.login-help li { margin-bottom: 4px; }
.login-hint code, .login-help code, .cred code { background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 12.5px; }
.kbd-warn { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--amber-bg); color: var(--amber); font-size: 13px; font-weight: 500; }
.field input[type=password][readonly] { background: var(--surface); color: var(--ink); }
.cred { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; line-height: 1.8; white-space: pre-wrap; font-family: inherit; margin: 0; }

/* ── Trang in ── */
.print-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.paper { background: #fff; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 14mm 14mm 16mm; box-shadow: var(--shadow); color: #111; font-size: 12.5px; line-height: 1.45; }
.paper .ph { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; border-bottom: 2px solid var(--brand); padding-bottom: 10px; }
.paper .ph img { max-height: 54px; max-width: 150px; }
.paper .ph .logo-text { font-weight: 700; font-size: 22px; color: var(--brand); letter-spacing: .08em; }
.paper .ph b { font-size: 14px; display: block; }
.paper .doc-title { text-align: center; font-size: 19px; font-weight: 700; margin: 18px 0 2px; letter-spacing: .02em; }
.paper .doc-sub { text-align: center; font-size: 12px; color: #444; margin-bottom: 14px; }
.paper .kv { display: grid; grid-template-columns: 150px 1fr; gap: 3px 10px; margin-bottom: 12px; }
.paper .kv dt { color: #444; }
.paper .kv dd { margin: 0; font-weight: 500; }
.paper table.pt { width: 100%; border-collapse: collapse; margin: 8px 0; }
.paper table.pt th, .paper table.pt td { border: 1px solid #888; padding: 4px 6px; vertical-align: top; }
.paper table.pt th { background: #F1F3F5; font-weight: 600; font-size: 11.5px; text-align: center; }
.paper table.pt td.num { text-align: right; }
.paper table.pt tfoot td { font-weight: 600; }
.paper .words { font-style: italic; margin: 6px 0 10px; }
.paper .terms { white-space: pre-wrap; margin: 8px 0; }
.paper .signs { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 12px; text-align: center; margin-top: 22px; }
.paper .signs b { display: block; }
.paper .signs i { display: block; font-size: 11px; color: #555; margin-bottom: 64px; }
.paper .center { text-align: center; }

/* ── Màn hình hẹp ── */
/* ── Trợ lý tự động ── */
.cards.c5 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.asst-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; border: 1px solid #EBD7A6; background: var(--amber-bg); color: var(--amber); border-radius: var(--radius); font-size: 13.5px; }
.asst-jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; padding: 16px; }
.asst-job { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.asst-job:hover { border-color: #B8C3CC; }
.asst-job.on { border-color: var(--steel); box-shadow: inset 0 0 0 1px var(--steel); background: var(--surface-2); }
.asst-job.disabled { opacity: .6; cursor: not-allowed; }
.asst-job input[type=checkbox] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.asst-job b { display: block; margin-bottom: 2px; }
.asst-job span { color: var(--muted); font-size: 13px; }
.asst-file { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asst-file span.small { color: var(--ink); }
.asst-run { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 16px 16px; }
.asst-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.asst-apply { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius); background: var(--blue-bg); border: 1px solid #B9D0E6; color: var(--blue); }
.asst-apply > div { flex: 1 1 280px; }
.asst-apply.done { background: var(--green-bg); border-color: #B5DCC6; color: var(--green); }
.asst-more { padding: 10px 16px; }
.asst-line h3 { font-size: 13.5px; padding: 12px 16px 6px; border-top: 1px solid var(--line-2); }
table.grid.asst td { font-size: 13.5px; }
table.grid.asst td.name { min-width: 200px; }
.chg { display: grid; gap: 2px; font-size: 13px; }
.chg .f { color: var(--muted); }
.chg s { color: var(--muted); }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 16px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.notes li:first-child { border-top: none; }
.notes .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--grey); }
.notes .dot.red { background: var(--red); } .notes .dot.amber { background: #D99A1E; } .notes .dot.blue { background: var(--blue); } .notes .dot.green { background: var(--green); }
.cfg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.cfg-block { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.cfg-block h3 { font-size: 14px; margin-bottom: 4px; }
.cfg-block p { margin: 0 0 8px; }
.cfg-block table.grid { margin-top: 8px; }
.cfg-block table.grid td { vertical-align: middle; }
.cfg-block table.people .checks { padding: 0; gap: 4px 12px; }
.cap-shared { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cfg-foot { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 14px 16px; }
.cfg-foot .form-error { flex: 1; margin: 0; }
.gantt .bar-g.plan { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.0) 0 6px, rgba(255,255,255,.35) 6px 9px); }
.gantt .deadline { position: absolute; top: 4px; bottom: 4px; width: 0; border-left: 2px dashed var(--red); opacity: .7; }

/* ── Quy trình đơn hàng ── */
.flowbox { margin-bottom: 16px; }
.flowbox .section-head { gap: 6px 10px; }
.flowbox .section-head h2 { flex: 0 0 auto; }
.cards.flow-tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (max-width: 640px) {
  .flowbox .section-head .grow { display: none; }
  .flowbox .section-head .fh-wait { flex: 1 1 100%; order: 3; }
  .flowbox .section-head .fh-board { margin-left: auto; }
  .cards.flow-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cards.flow-tiles .card { padding: 8px 10px; }
  .cards.flow-tiles .card .k { font-size: 11.5px; }
  .cards.flow-tiles .card .v { font-size: 18px; }
  .cards.flow-tiles .card .n { display: none; }
}
.flow-note { margin: 10px 16px 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: 12.5px; }
.stepper { list-style: none; margin: 0; padding: 14px 16px 6px; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.stepper .st { position: relative; padding: 8px 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-2); cursor: pointer; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stepper .st:hover { border-color: #B8C3CC; }
.stepper .st.sel { box-shadow: inset 0 0 0 2px var(--steel); }
.stepper .st .no { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--line); color: var(--ink-2); }
.stepper .st b { font-size: 12.5px; line-height: 1.25; }
.stepper .st small { font-size: 11.5px; color: var(--muted); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stepper .st .mini { display: block; height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; margin-top: 4px; }
.stepper .st .mini u { display: block; height: 100%; background: var(--blue); }
.stepper .st.done { background: var(--green-bg); border-color: #B5DCC6; }
.stepper .st.done .no { background: var(--green); color: #fff; }
.stepper .st.active { background: var(--blue-bg); border-color: #9FBEDC; }
.stepper .st.active .no { background: var(--blue); color: #fff; }
.stepper .st.blocked { background: var(--surface); border-style: dashed; }
.stepper .st.blocked .no { background: var(--red-bg); color: var(--red); }
.stepper .st.override { background: var(--amber-bg); border-color: #EBD7A6; }
.stepper .st.override .no { background: #D99A1E; color: #fff; }
.stepper .st.skip, .stepper .st.legacy { opacity: .6; }
.stepper .st.todo { background: var(--surface); }
.flow-detail { margin: 6px 16px 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-size: 13.5px; display: grid; gap: 4px; }
.flow-lines { margin: 2px 0 0; padding-left: 18px; font-size: 13px; }
.flow-need { margin-top: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--amber-bg); border: 1px solid #EBD7A6; display: grid; gap: 6px; font-size: 13px; }
.flow-need.wait { background: var(--surface-2); border-color: var(--line); }
.flow-need.legacy { background: var(--surface-2); border-color: var(--line-2); color: var(--muted); }
.flow-need .fn-head { font-weight: 600; color: var(--amber); }
.flow-need.wait .fn-head { color: var(--ink-2); }
.flow-need .fn-list { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.flow-need .fn-how { color: var(--ink-2); }
.flow-need .fn-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.flow-need .fn-acts .btn.locked { color: var(--muted); border-style: dashed; background: var(--surface-2); }
.flow-need .fn-next { color: var(--muted); font-size: 12.5px; }
.flowbox .fh-wait a { color: inherit; }
.flowbox .fh-wait a:hover { color: var(--blue); }
.fb-need { color: var(--amber); margin-top: 2px; }
.flow-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; }
.flow-actions .btn.locked { color: var(--muted); border-style: dashed; background: var(--surface-2); }
.flowbox .table-wrap { margin: 10px 16px 0; }
table.grid.batches td .ok { color: var(--green); font-weight: 500; }
.flow-pay { padding: 0 16px 10px; }
.flow-log { padding: 0 16px 12px; font-size: 13px; }
.flow-log summary { cursor: pointer; color: var(--blue); font-size: 13px; padding: 4px 0; }
.flow-log ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.flow-log li { padding: 4px 0; border-top: 1px solid var(--line-2); }
.fgrid.flow-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fgrid.flow-form .field.w4 { grid-column: 1 / -1; }
@media (max-width: 640px) { .fgrid.flow-form { grid-template-columns: 1fr; } }
table.grid.fboard td.name { min-width: 220px; }
.dots { display: flex; gap: 3px; margin-bottom: 4px; }
.dots i { width: 16px; height: 8px; border-radius: 3px; background: var(--line-2); }
.dots i.done { background: var(--green); }
.dots i.active { background: var(--blue); }
.dots i.blocked { background: #E7B3AE; }
.dots i.override { background: #D99A1E; }
.dots i.skip, .dots i.legacy { background: #CFD6DC; }
@media (max-width: 640px) {
  table.grid.fboard thead { display: none; }
  table.grid.fboard, table.grid.fboard tbody, table.grid.fboard tr, table.grid.fboard td { display: block; width: 100%; }
  table.grid.fboard tr { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
  table.grid.fboard td { padding: 2px 0; border: 0; }
  table.grid.fboard td.name { min-width: 0; }
  table.grid.fboard td.nowrap { white-space: normal; }
  table.grid.fboard td.nowrap > * { display: inline; margin-right: 6px; }
}
.cards .card.sel { box-shadow: inset 0 0 0 2px var(--steel); }
@media (max-width: 1100px) {
  .stepper { display: flex; overflow-x: auto; padding-bottom: 10px; }
  .stepper .st { flex: 0 0 132px; }
}

@media (max-width: 1100px) {
  .dash { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flow .step { border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 300px); transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .shell.nav-open .nav { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(24,34,42,.35); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .top { padding: 8px 12px; }
  .view { padding: 14px 12px 64px; }
  .user-meta { display: none; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field.w3, .field.w4 { grid-column: span 2; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .totals { grid-template-columns: 1fr; }
  .related { grid-template-columns: minmax(0, 1fr); }
  .related > .section { min-width: 0; }
}
@media (max-width: 640px) {
  .fgrid { grid-template-columns: 1fr; }
  .field.w2, .field.w3, .field.w4 { grid-column: span 1; }
  h1 { font-size: 18px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .search { max-width: none; flex: 1 1 60%; }
  .toolbar .filter-btn { display: inline-flex; }
  .toolbar .filters { display: none; }
  .toolbar.open .filters { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
  .toolbar .filters select, .toolbar .filters .ref-filter { flex: 1 1 100%; max-width: none; }
  .toolbar .filters .date-range { flex: 1 1 100%; }
  .toolbar .filters .date-range input { flex: 1; }
  /* Danh sách thành thẻ trên điện thoại */
  table.grid.cards-sm thead { display: none; }
  table.grid.cards-sm, table.grid.cards-sm tbody, table.grid.cards-sm tr, table.grid.cards-sm td { display: block; width: 100%; }
  table.grid.cards-sm tr { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
  table.grid.cards-sm td { border: none; padding: 1px 0; text-align: left; }
  table.grid.cards-sm td[data-l]:not(.code)::before { content: attr(data-l) ': '; color: var(--muted); font-size: 12px; }
  table.grid.cards-sm td.num { text-align: left; }
  table.grid.cards-sm td.tog { display: none; }
  table.grid.prod td, table.grid.prod td.name { white-space: normal; max-width: none; min-width: 0; }
  table.grid.cards-sm tr.detail > td { padding: 0; }
  table.grid.cards-sm tr.detail table.sub thead { display: none; }
  table.grid.cards-sm tfoot { display: block; }
  .pipe { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dialog footer { flex-wrap: wrap; }
}

/* ── In ấn ── */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .nav, .top, .print-bar, #toasts { display: none !important; }
  .shell { display: block; }
  .view { padding: 0; max-width: none; }
  .paper { box-shadow: none; margin: 0; width: auto; min-height: auto; }
  .paper table.pt tr { break-inside: avoid; }
}

/* Danh sách gợi ý của ô chọn (tìm khách hàng…) nổi trên cả hộp thoại */
.menu.float { z-index: 150; }
/* Nhập file báo giá */
.qi-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-top: 12px; display: grid; gap: 8px; }
.qi-card.done { border-color: #9CCBA9; background: #F4FAF5; }
.qi-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qi-head select { width: auto; max-width: 100%; }
.dialog.xwide { width: min(1180px, 100%); }
.qi-items tr:not(.qi-group) td:nth-child(3) { min-width: 260px; }
.qi-items tr.qi-group td { background: var(--surface-3); color: var(--ink-2); }
.qi-items tr.qi-group.warn td { background: #FFF6E5; }
.qi-mismatch { border: 1px solid #E8B4AE; background: var(--red-bg); color: var(--red); border-radius: var(--radius-sm); padding: 8px 10px; display: grid; gap: 6px; }
.qi-mismatch .check { color: var(--ink); }
.qi-mismatch ul { margin: 0; padding-left: 18px; }
.qi-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2, var(--muted)); }
.qi-items { max-height: 260px; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.qi-items table.grid th, .qi-items table.grid td { padding: 5px 8px; font-size: 12.5px; }
.qi-items tr.warn td { background: #FFF6E5; }
.qi-totals { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.qi-totals .ok { color: var(--green); }
.qi-warn { margin: 0; padding-left: 18px; color: var(--amber); }
.qi-form { margin-top: 2px; }
.qi-ok { color: var(--green); }
.qi-target { padding: 8px 0; }
/* Định mức – giá thành */
.cost-grid { display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); gap: 16px; padding: 16px; align-items: start; }
.cost-form { display: grid; gap: 12px; position: sticky; top: 12px; }
.cost-form h4 { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.cost-form h4 .small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.cost-fg { display: grid; gap: 10px; }
.cost-fg.two { grid-template-columns: 1fr 1fr; }
.cost-def { font-size: 11px; font-weight: 500; color: var(--blue); background: var(--blue-bg); border-radius: 999px; padding: 0 6px; margin-left: 4px; cursor: help; }
.cost-res { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; transition: opacity .15s; }
.cost-res > * { min-width: 0; }
.cost-res.busy { opacity: .55; }
.cost-res .cards, .cp-cards { margin-bottom: 0; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.cp-cards { padding: 12px 12px 4px; }
.card .v.sm { font-size: 17px; }
.cp-rev input { font-size: 18px; font-weight: 700; padding: 2px 8px; min-height: 32px; margin-top: 2px; }
table.grid.cost-lines th, table.grid.cost-lines td { padding: 6px 10px; font-size: 13px; }
table.grid.cost-sum td { padding: 6px 12px; font-size: 13px; }
table.grid.cost-sum tr.cost-strong td { font-weight: 600; }
.cost-note { padding: 10px 16px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.cost-note a { font-weight: 600; }
.cp-tools .cp-src { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cp-tools .cp-src .ref-box { width: 190px; }
.cp-tools .cp-common { display: inline-flex; align-items: center; gap: 6px; }
.cp-tools .cp-common select { width: auto; }
#cbody > .section, #cbody .cost-file > .section, #cbody > section { border-radius: 0; border-left: 0; border-right: 0; margin: 0; }
#cbody > section + section { border-top: 0; }
.cp-table { min-width: 1000px; }
.cp-table.with-rev { min-width: 1130px; }
.cp-table .cp-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.cp-table tr.warn td { background: #FFFBF2; }
.cp-err { color: var(--red); line-height: 1.3; margin-top: 2px; }
.cp-busy .cp-cards .v, .cp-busy [data-c], .cp-busy [data-t], .cp-busy #cp-mats { opacity: .45; transition: opacity .15s; }
.cp-err:empty { display: none; }
.cp-others .cp-name { white-space: normal; }
.cp-mats, .cp-ref { max-height: 520px; overflow: auto; }
.cost-steps { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 380px; }
.cs-list { border-right: 1px solid var(--line-2); padding: 8px; display: flex; flex-direction: column; gap: 2px; max-height: 72vh; overflow: auto; }
.cs-kind { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 10px 10px 2px; text-transform: uppercase; letter-spacing: .03em; }
.cs-item { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; display: grid; gap: 1px; color: var(--ink); }
.cs-item:hover { background: var(--surface-2); }
.cs-item.on { background: var(--blue-bg); color: var(--blue); }
.cs-item .t { font-weight: 500; }
.cs-item .s { font-size: 12px; color: var(--muted); }
.cs-edit { min-width: 0; }
.cs-table td.cs-bad, .cs-bad { color: var(--amber); }
.cs-table tfoot td.cs-note { font-weight: 400; font-size: 12px; color: var(--muted); white-space: normal; }
.cf-dl { margin: 0 0 12px; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; }
.cf-dl dt { color: var(--muted); font-size: 13px; }
.cf-dl dd { margin: 0; }
@media (max-width: 900px) {
  .cost-grid, .cost-steps { grid-template-columns: minmax(0, 1fr); }
  .cost-form { position: static; }
  .cs-list { border-right: 0; border-bottom: 1px solid var(--line-2); max-height: 240px; }
  .cf-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cf-dl dd { margin-bottom: 8px; }
}


/* ════════════════════════════════════════════════════════════════════
   GIAO DIỆN 1.8.0 — hướng A «Xưởng thép» (đã chốt với chủ 04/11/2026)
   Menu than + vân nan cửa cuốn · đỏ thương hiệu chỉ cho nút chính & mục đang chọn
   · cảnh báo dùng cam đất / vàng đậm · tiêu đề Montserrat.
   ════════════════════════════════════════════════════════════════════ */
:root { --nav-w: 256px; --nav-bg: #1E1B1C; --nav-ink: #D9D4D0; --nav-muted: #8E8782; --head: 'Montserrat', var(--font); --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(35,32,34,.05); }
a { color: var(--brand); }
h1 { font-family: var(--head); font-weight: 700; font-size: 28px; letter-spacing: -0.01em; } /* thang chữ màn hình 48/28/20/16/13 */
.page-head { margin-bottom: 18px; align-items: flex-end; }
.page-head .crumb { font-size: 13px; }

/* Menu trái */
.shell { grid-template-columns: var(--nav-w) 1fr; transition: grid-template-columns .18s ease; }
.nav { background: var(--nav-bg); background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0 1px, transparent 1px 9px); border-right: 0; color: var(--nav-ink); padding: 14px 10px 0; gap: 4px; scrollbar-width: thin; scrollbar-color: #3a3436 transparent; }
.nav-brand { display: flex; align-items: center; gap: 8px; padding: 6px 6px 14px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav .brand { padding: 0; gap: 6px; flex: 1; min-width: 0; text-decoration: none; }
.nav .brand-logo { height: 30px; max-width: 150px; }
.nav .brand-mark-sm { display: none; width: 34px; height: auto; }
.nav .brand-sub { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--nav-muted); }
.nav-rail-btn { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 0; background: rgba(255,255,255,.06); color: var(--nav-ink); display: grid; place-items: center; cursor: pointer; }
.nav-rail-btn:hover { background: rgba(255,255,255,.12); }
.nav .demo-flag { margin: 0 4px 8px; }
.nav a.nav-item { color: var(--nav-ink); border-left: 0; padding: 8px 12px 8px 42px; border-radius: 9px; font-size: 13.5px; gap: 12px; }
.nav a.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.nav-item.active { background: var(--brand); color: #fff; font-weight: 600; }
.nav a.nav-home { padding-left: 12px; font-weight: 600; margin-bottom: 4px; }
.nav-groups { display: flex; flex-direction: column; gap: 2px; }
.nav-group { padding: 0; }
.nav-group > .nav-title { width: 100%; border: 0; background: transparent; color: var(--nav-ink); font-size: 13.5px; font-weight: 600; padding: 9px 12px; border-radius: 9px; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; }
.nav-group > .nav-title:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-group .chev { margin-left: auto; display: inline-flex; color: var(--nav-muted); transition: transform .15s ease; }
.nav-group .nav-items { display: none; padding: 2px 0 6px; }
.nav-group.open .nav-items, .nav-group.current .nav-items { display: block; }
.nav-group.open .chev, .nav-group.current .chev { transform: rotate(90deg); }
.nav-group.current > .nav-title { color: #fff; }
.nav-item .nav-badge { margin-left: auto !important; background: #F5A524 !important; color: #1E1B1C !important; }
.nav-foot { border-top: 1px solid rgba(255,255,255,.08); color: var(--nav-muted); margin-top: auto; padding: 12px 8px 16px; }
.nav-foot a { color: var(--nav-ink); }
/* Thu gọn thành cột biểu tượng */
.shell.rail { --nav-w: 72px; }
.shell.rail .nav { padding: 14px 8px 0; align-items: stretch; }
.shell.rail .nav-brand { flex-direction: column; padding: 4px 0 12px; }
.shell.rail .nav .brand-logo, .shell.rail .nav .brand-sub, .shell.rail .lbl, .shell.rail .chev, .shell.rail .nav-items, .shell.rail .nav-foot, .shell.rail .demo-flag { display: none !important; }
.shell.rail .nav .brand-mark-sm { display: block; margin: 0 auto; }
.shell.rail .nav-title, .shell.rail a.nav-home { justify-content: center; padding: 11px 0; }
.shell.rail .nav-group.current > .nav-title { background: var(--brand); color: #fff; }

/* Thanh trên */
.top { background: #fff; backdrop-filter: none; border-bottom: 1px solid var(--line); padding: 12px 28px; min-height: 64px; }
.gsearch { max-width: 540px; }
.gsearch input[type=search] { border-radius: 10px; background: var(--surface-2); min-height: 40px; padding-right: 64px; }
.kbd-hint { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px ui-monospace, Menlo, Consolas, monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: #fff; pointer-events: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-actions .top-user { margin-left: 0; }
.top-propose { min-height: 40px; border-radius: 10px; font-weight: 600; }
.top-propose svg { color: var(--brand); }
.avatar { background: #2B2B2E; width: 36px; height: 36px; font-size: 13px; }
.view { padding: 26px 28px 72px; }

/* Nút, ô nhập */
.btn { border-radius: 10px; min-height: 38px; padding: 7px 15px; font-weight: 600; }
.btn.sm { min-height: 30px; border-radius: 8px; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea { border-radius: 9px; min-height: 38px; }

/* Thẻ & khối */
.panel, .section { border-radius: var(--radius); border-color: #E5E0DA; box-shadow: var(--shadow); }
.section-head { padding: 14px 18px; }
.section-head h2 { font-size: 16px; font-weight: 700; }
.cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { border-radius: var(--radius); padding: 16px 18px; border-color: #E5E0DA; }
a.card:hover { border-color: #CFC7BE; box-shadow: 0 4px 14px rgba(35,32,34,.06); }
.card .k { font-size: 13px; }
.card .v { font-family: var(--head); font-size: 26px; font-weight: 700; margin-top: 4px; }
.card.red { border-left: 1px solid #E5E0DA; }
.card.red .n, .card.amber .n { font-weight: 600; }
.card.red .n::before, .card.amber .n::before { content: '● '; }

/* Tổng quan: 3 việc nên xử lý trước */
.decide { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.decide-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid #E5E0DA; border-radius: var(--radius); padding: 16px 18px; color: var(--ink); text-decoration: none; }
.decide-card:hover { text-decoration: none; border-color: #CFC7BE; box-shadow: 0 4px 14px rgba(35,32,34,.06); }
.decide-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--amber-bg); color: var(--amber); }
.decide-card.red .decide-ic { background: var(--red-bg); color: var(--red); }
.decide-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.decide-tx .kind { font-size: 12px; font-weight: 700; color: var(--amber); }
.decide-card.red .decide-tx .kind { color: var(--red); }
.decide-tx b { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.decide-tx .s { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pipe .p:nth-child(1) { border-color: #CFC9C2; } .pipe .p:nth-child(2) { border-color: #A6A7AB; }
.pipe .p:nth-child(3) { border-color: var(--brand); } .pipe .p:nth-child(4) { border-color: #6C6E72; }
.pipe .p b { font-family: var(--head); font-weight: 700; }
.alist .dot.blue { background: #6C6E72; }
.bar i b { background: var(--brand); }

/* Bảng danh sách */
table.grid th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; background: #F7F5F3; padding: 10px 14px; }
table.grid td { padding: 11px 14px; border-bottom-color: #F0ECE7; }
table.grid tbody tr:hover td { background: #FBF9F7; }
table.grid td.code a { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; color: var(--ink); }
table.grid tbody tr:hover td.code a { color: var(--brand); }
.dash-head h1 { font-size: 28px; line-height: 1.25; }
.dash-head .titles { flex: 1 1 520px; }
.dash-head .btn-group select { width: auto; min-width: 160px; }
.page-head .btn-group select { width: auto; }
table.grid td .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 340px; }
.toolbar { padding: 14px; gap: 10px; }
.toggle { padding: 7px 12px; }
.toggle.on { background: #2B2B2E; border-color: #2B2B2E; color: #fff; }
.chip { font-weight: 600; }

/* Đăng nhập: khối đỏ có vân nan cửa cuốn + dải xám ghi website (bố cục chuẩn Köd's) */
.login { grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); background: #fff; }
.login-art { background: none; padding: 0; justify-content: stretch; }
.login-red { flex: 1; background: #BE202F; background-image: repeating-linear-gradient(180deg, rgba(0,0,0,.10) 0 2px, transparent 2px 26px); padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-red .login-logo { height: 52px; align-self: flex-start; }
.login-red .arttext { max-width: 540px; display: flex; flex-direction: column; gap: 16px; }
.login-red .eyebrow { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.82); font-weight: 600; }
.login-red h2 { margin: 0; font-family: var(--head); font-size: 48px; line-height: 1.1; font-weight: 700; color: #fff; }
.login-red p { margin: 0; color: rgba(255,255,255,.9); font-size: 16px; line-height: 1.6; max-width: 500px; }
.steps-bar { display: flex; gap: 6px; margin-top: 4px; }
.steps-bar i { width: 40px; height: 6px; border-radius: 3px; background: #fff; }
.steps-bar i:nth-child(2) { opacity: .75; } .steps-bar i:nth-child(3) { opacity: .55; } .steps-bar i:nth-child(4) { opacity: .4; } .steps-bar i:nth-child(5) { opacity: .28; } .steps-bar i:nth-child(6) { opacity: .18; }
.login-band { height: 120px; flex: none; background: #6C6E72; display: flex; align-items: center; justify-content: space-between; padding: 0 64px; color: #fff; }
.login-band .site { font-family: var(--head); font-weight: 300; font-size: 18px; letter-spacing: .3em; }
.login-band .contact { font-size: 13px; color: rgba(255,255,255,.88); }
.login-form { max-width: 440px; width: 100%; margin: 0 auto; gap: 16px; padding: 48px 40px; }
.login-form .brand-logo { height: 36px; max-width: none; }
.login-form h1 { font-size: 28px; }
.login-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.login-form input { min-height: 46px; font-size: 15px; }
.login-form .btn { min-height: 50px; font-size: 16px; }
.login-note { border-top: 1px solid var(--line-2); padding-top: 14px; line-height: 1.6; }

/* Tạo nhanh (điện thoại) */
.quick-list { display: flex; flex-direction: column; gap: 8px; }
.quick-list .btn { justify-content: flex-start; min-height: 48px; font-size: 15px; }

/* Thanh dưới — chỉ trên điện thoại */
.tabbar { display: none; }
@media (max-width: 900px) {
  .shell, .shell.rail { --nav-w: 0px; grid-template-columns: 1fr; }
  .shell.rail .lbl, .shell.rail .nav-items, .shell.rail .chev, .shell.rail .nav-foot, .shell.rail .nav .brand-logo, .shell.rail .nav .brand-sub { display: revert !important; }
  .shell.rail .nav-group .nav-items { display: none !important; }
  .shell.rail .nav-group.open .nav-items, .shell.rail .nav-group.current .nav-items { display: block !important; }
  .shell.rail .nav .brand-mark-sm { display: none; }
  .nav { width: min(86vw, 310px); }
  .nav-rail-btn { display: none; }
  .top { padding: 8px 12px; min-height: 56px; }
  .kbd-hint, .top-propose span { display: none; }
  .top-propose { padding: 7px 10px; }
  .view { padding: 16px 12px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tabbar .tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 11px; color: #6C6E72; min-height: 48px; justify-content: center; text-decoration: none; cursor: pointer; }
  .tabbar .tab.on { color: var(--brand); font-weight: 600; }
  .tabbar .tab-plus { align-self: center; justify-self: center; width: 52px; height: 52px; min-height: 0; border-radius: 16px; background: var(--brand); color: #fff; margin-top: -22px; box-shadow: 0 6px 16px rgba(190,32,47,.35); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 12px 14px; }
  .card .v { font-size: 20px; }
  .card .n { font-size: 11.5px; }
  .decide { grid-template-columns: 1fr; gap: 10px; }
  h1 { font-size: 20px; }
  .login { grid-template-columns: 1fr; }
  .login-form { padding: 32px 20px; max-width: none; }
  .login-form h1 { font-size: 26px; }
  .dash-head h1 { font-size: 22px; }
  .dash-head .titles { flex: 1 1 100%; }
}
@media (max-width: 380px) { .cards { grid-template-columns: 1fr; } }
@media print { .tabbar, .nav, .top { display: none !important; } }

/* 1.9.0 — dải quy trình 15 bước: cuộn ngang, mỗi bước rộng cố định */
.stepper { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 10px; scrollbar-width: thin; }
.stepper .st { flex: 0 0 122px; }
.flow-var { background: var(--amber-bg); color: var(--amber); }
.flow-var a { color: var(--amber); text-decoration: underline; }

/* 1.9.3 — đề xuất #2: tiêu đề khối to hơn nội dung, khối có màu để phân biệt */
.section { overflow: hidden; }
.section-head { background: #F6F2EE; border-bottom: 1px solid #E5E0DA; position: relative; padding: 14px 18px 14px 22px; }
.section-head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--brand); }
.section-head h2 { font-family: var(--head); font-size: 19px; line-height: 1.3; font-weight: 700; color: var(--ink); }
.section-head h3 { font-family: var(--head); font-size: 16px; font-weight: 700; color: var(--ink); }
.section + .section { margin-top: 18px; }
.field > label { font-size: 13px; font-weight: 600; color: #57514A; }
table.grid thead th { background: #EFEAE4; color: var(--ink); font-weight: 700; }
.related .section-head { background: #F3F5F7; }
.related .section-head::before { background: #6C6E72; }
@media (max-width: 640px) {
  .section-head h2 { font-size: 18px; }
  .field > label { font-size: 13.5px; }
}
/* 1.9.7 — báo giá mới: nhập từ file Excel thay vì gõ tay */
.qi-callout { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; background: #FBE9EA; border: 1px solid #F1C9CD; border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.qi-callout b { font-family: var(--head); font-size: 16px; }
/* 1.9.8 — Hôm nay tôi làm */
.hn-list { display: flex; flex-direction: column; gap: 8px; }
.hn-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.hn-row.on { border-color: var(--brand); background: #FBE9EA; }
.hn-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; flex: 1 1 260px; font-size: 15px; }
.hn-check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--brand); }
.hn-more { display: none; flex-direction: column; gap: 6px; flex: 1 1 100%; padding-left: 34px; }
.hn-row.on .hn-more { display: flex; }
.hn-lines { display: flex; flex-direction: column; gap: 6px; }
.hn-line { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.hn-line select[data-k=contract_id] { flex: 1 1 260px; max-width: 420px; }
.hn-line select[data-k=production_order_id] { flex: 0 1 200px; }
.hn-qty { display: inline-flex; align-items: center; gap: 6px; }
.hn-qty input { width: 96px; }
.hn-qty b { font-size: 13px; color: var(--muted); min-width: 2.5em; }
.hn-line .bad { border-color: var(--brand) !important; box-shadow: 0 0 0 2px rgba(190, 32, 47, .18); }
.hn-more .hn-add { align-self: flex-start; }
.hn-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.hn-tab { border: 1px solid var(--line); background: var(--surface, #fff); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer; min-height: 36px; }
.hn-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
@media (max-width: 600px) { .hn-more { padding-left: 0; } .hn-line select[data-k=contract_id] { flex-basis: 100%; max-width: none; } }
/* 1.9.8 — ảnh đại diện */
.avatar.has-img { padding: 0; overflow: hidden; background: #ddd; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.avatar.big { width: 96px; height: 96px; font-size: 30px; border-radius: 999px; display: inline-grid; place-items: center; background: #2B2B2E; color: #fff; flex: none; }

/* ── 2.0.5 Thiệp chúc mừng ── */
.kd-ov { overflow: hidden; }
.kd-card { position: relative; z-index: 2; width: min(440px, calc(100vw - 32px)); background: var(--panel, #fff); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: kd-pop .45s cubic-bezier(.2,1.4,.4,1); }
.kd-hero { background: linear-gradient(135deg, #8E0B20, #C8102E 55%, #E2334D); color: #fff; text-align: center; padding: 18px 20px 20px; }
.kd-card.big .kd-hero { background: linear-gradient(135deg, #7A5200, #C99A06 50%, #F2B705); }
.kd-logo { height: 26px; opacity: .95; }
.kd-eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .85; margin-top: 8px; font-weight: 700; }
.kd-icon { font-size: 54px; line-height: 1.1; margin: 8px 0 4px; animation: kd-bounce 1.6s ease-in-out infinite; }
.kd-title { font-size: 21px; font-weight: 800; line-height: 1.3; }
.kd-body { padding: 18px 22px 6px; text-align: center; }
.kd-line { font-weight: 600; margin-bottom: 10px; white-space: pre-line; }
.kd-cheer { color: var(--muted, #6b6b6b); font-style: italic; line-height: 1.55; }
.kd-sign { margin-top: 12px; font-weight: 700; color: #C8102E; }
.kd-foot { padding: 14px 22px 20px; display: flex; justify-content: center; }
.kd-conf { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; z-index: 1; animation: kd-fall linear forwards; opacity: .95; }
@keyframes kd-fall { to { top: 105%; transform: rotate(720deg) translateX(40px); opacity: .7; } }
@keyframes kd-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes kd-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .kd-card, .kd-icon, .kd-conf { animation: none; } .kd-conf { display: none; } }

/* ── 2.0.7 Ai đang online ── */
.pres { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; }
.pres i { width: 9px; height: 9px; border-radius: 50%; background: #B9B9B9; flex: none; }
.pres.online i { background: #1F9D55; box-shadow: 0 0 0 3px rgba(31,157,85,.18); }
.pres.away i { background: #E0A100; }
.pres.online { color: #136B3A; font-weight: 600; }
.pres-wrap { display: grid; gap: 10px; }
.pres-list { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px; }
.pres-list .pres { padding: 4px 10px; border-radius: 999px; background: var(--bg-soft, #F4F2EE); color: inherit; text-decoration: none; }
.pres-list .pres.online { background: #E8F6EE; }
.pres-list .pres.away { background: #FFF6DE; }
/* 2.0.8 lời chào / lời cảm ơn */
.kd-hero.greet-morning { background: linear-gradient(135deg, #C8102E, #E2334D 45%, #F2A33A); }
.kd-hero.greet-evening { background: linear-gradient(135deg, #1B2A4A, #3A3F7A 55%, #8E0B20); }
/* v2.0.12 Hôm nay tôi làm: việc tự thêm + tự đánh giá */
.hn-own input[data-k=note] { flex: 2 1 260px; min-width: 0; }
.hn-own select[data-k=contract_id] { flex: 1 1 220px; max-width: 360px; }
.hn-qty input.hn-unit { width: 76px; }
.hn-q { margin: 0 0 14px; }
.hn-q > b { display: block; margin-bottom: 6px; font-size: 14px; }
.hn-q .req { color: var(--brand); }
.hn-q.bad > b { color: var(--brand); }
.hn-q.bad .hn-chips { outline: 2px solid rgba(190, 32, 47, .35); outline-offset: 4px; border-radius: 10px; }
.hn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hn-chip { border: 1px solid var(--line); background: var(--surface, #fff); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 14px; cursor: pointer; min-height: 38px; }
.hn-chip:hover { border-color: var(--brand); }
.hn-chip.on { background: var(--brand-soft, #FBE9EA); border-color: var(--brand); color: var(--brand); font-weight: 600; }
/* v2.0.13 Bộ cửa & tiến độ từng phần */
.dr-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.dr-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.dr-bar { position: relative; flex: 1 1 200px; height: 26px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 160px; }
.dr-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #BE202F, #e0505c); transition: width .4s; }
.dr-bar b { position: relative; display: block; text-align: center; line-height: 26px; font-size: 13px; color: var(--fg); mix-blend-mode: normal; }
.dr-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
.dr-tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.dr-tbl th, .dr-tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.dr-tbl th { background: var(--raise, #f6f4f1); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dr-tbl .dr-name { text-align: left; min-width: 180px; }
.dr-tbl .dr-name span { display: block; }
.dr-tbl td.num { text-align: right; white-space: nowrap; }
.dr-tbl tr.full td { background: #EAF5EE; }
.dr-c input, .dr-all input { width: 22px; height: 22px; accent-color: var(--brand); cursor: pointer; }
.dr-c label { display: inline-flex; padding: 4px; cursor: pointer; }
.dr-all { display: block; margin-top: 4px; }
.dr-add { margin-top: 10px; }
.dr-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dr-tbl td.dr-name, .dr-tbl th.dr-name { position: sticky; left: 0; z-index: 1; background: var(--surface, #fff); }
.dr-tbl th.dr-name { background: var(--raise, #f6f4f1); }
.dr-tbl tr.full td.dr-name { background: #EAF5EE; }
@media (max-width: 600px) { .dr-tbl { min-width: 620px; font-size: 13px; } .dr-tbl .dr-name { min-width: 130px; max-width: 150px; } }

/* v2.0.20 — Tiền hợp đồng: Đã ký · Đã thu · Công nợ */
.msum-wrap { margin-bottom: 16px; }
.msum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.msum-c { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; border-top: 4px solid var(--grey, #6C6E72); }
.msum-c.ok { border-top-color: var(--green, #1f7a46); }
.msum-c.bad { border-top-color: var(--brand, #BE202F); }
.msum-c .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.msum-c b { font-size: 24px; line-height: 1.2; }
.msum-c b small { font-size: 13px; margin-left: 3px; color: var(--muted); font-weight: 500; }
.msum-c .n { font-size: 12px; color: var(--muted); }
.msum-c.bad .n { color: var(--brand, #BE202F); font-weight: 600; }
.msum-bar { height: 8px; border-radius: 6px; background: var(--line); margin-top: 10px; overflow: hidden; }
.msum-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand, #BE202F), #e0525f); transition: width .6s; }
@media (max-width: 640px) { .msum { grid-template-columns: 1fr; } .msum-c b { font-size: 22px; } }
.msum-wrap .section-head { flex-wrap: wrap; gap: 8px; }
.msum-wrap .section-head h2 { white-space: nowrap; }
.qi-exist { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--brand, #BE202F); border-left-width: 4px; border-radius: 10px; background: var(--brand-soft, #f7e3e5); line-height: 1.6; }
.qi-exist .check { margin-top: 6px; display: flex; gap: 6px; align-items: center; }

/* v2.0.29 — Bảng nhắc nhân sự */
.hrb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.hrb-box { padding: 14px; }
.hrb-box h3 { margin: 0 0 10px; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.hrb-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); }
.hrb-row:first-of-type { border-top: 0; }
.hrb-row .hrb-d { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 13px; }
.hrb-row.late .hrb-d { color: var(--brand, #BE202F); font-weight: 700; }

/* ── v2.0.31 «Bảng của tôi»: thẻ Kaizen / 5S, màu theo 7 dòng chảy ── */
:root { --f0: #8E8782; --f1: #BE202F; --f2: #2f5d8a; --f3: #b07a12; --f4: #6d4aa6; --f5: #1f7a46; --f6: #c4581a; --f7: #13807d; }
.kb-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.kb-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; }
.kb-chip i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.kb-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.kb { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.kb.hide { display: none; }
.kb-col { background: var(--surface-3); border-radius: 12px; padding: 10px; min-height: 120px; transition: box-shadow .15s; }
.kb-col.over { box-shadow: inset 0 0 0 2px var(--brand); }
.kb-col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.kb-col h2 span { background: var(--surface); border-radius: 999px; padding: 0 9px; font-size: 12px; color: var(--muted); }
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-empty { text-align: center; color: var(--muted); padding: 14px 0; }
.kc { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer; }
.kc[draggable="true"] { cursor: grab; }
.kc.drag { opacity: .45; }
.kc.late { border-color: #e9b9a6; background: linear-gradient(var(--red-bg), var(--surface) 60%); }
.kc-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.kc-kind { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kc-code { font-variant-numeric: tabular-nums; white-space: nowrap; }
.kc-title { display: block; color: var(--ink); font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.kc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.kc-late { color: var(--red); font-weight: 600; }
.kc-next { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 4px 8px; }
.kc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kc-acts .btn { min-height: 36px; }
.nav-quick .nav-title { color: #fff; }
@media (max-width: 900px) { .kb { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kb { grid-template-columns: 1fr; } .kb-col { min-height: 0; } }

/* ── v2.0.32 «Bảng 5S – thẻ đỏ» ── */
.fs-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.fs-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.fs-stats b { display: block; font-size: 22px; color: var(--f7); font-variant-numeric: tabular-nums; }
.fs-stats span { font-size: 12.5px; color: var(--muted); }
.fs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fs-card { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--f7); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.fs-card.fs-bad { border-top-color: var(--red); background: linear-gradient(var(--red-bg), var(--surface) 45%); }
.fs-card.fs-mid { border-top-color: var(--f3); }
.fs-card.fs-none { border-top-color: var(--line); }
.fs-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fs-top h3 { font-size: 15px; }
.fs-red { font-size: 12.5px; font-weight: 600; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: 1px 9px; }
.fs-score { display: flex; align-items: baseline; gap: 4px; color: var(--ink); text-decoration: none !important; }
.fs-score b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.fs-bad .fs-score b { color: var(--red); }
.fs-score span { color: var(--muted); }
.fs-score em { font-style: normal; font-size: 12.5px; margin-left: 8px; font-weight: 600; }
.fs-score em.up { color: var(--green); } .fs-score em.down { color: var(--red); }
.fs-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; height: 54px; }
.fs-bars > div { position: relative; background: var(--surface-3); border-radius: 5px; overflow: hidden; display: flex; align-items: flex-end; }
.fs-bars i { display: block; width: 100%; background: var(--f7); opacity: .85; }
.fs-bad .fs-bars i { background: var(--red); }
.fs-bars span { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--ink-2); font-weight: 600; }
.fs-meta { font-size: 12.5px; color: var(--muted); }
.fs-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.fs-acts .btn { min-height: 36px; }
a.kc { display: block; text-decoration: none !important; color: inherit; }
@media (max-width: 700px) { .fs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── v2.0.33 «Duyệt mua – chi» ── */
.kb.kb6 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.p2p-amt { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.p2p-sums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.p2p-sums > div { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--f3); border-radius: 10px; padding: 8px 12px; }
.p2p-sums span { display: block; font-size: 12.5px; color: var(--muted); }
.p2p-sums b { font-size: 16px; font-variant-numeric: tabular-nums; }
.kc.focus { box-shadow: 0 0 0 3px var(--brand); }
.kc-next small { color: var(--muted); }
@media (max-width: 700px) { .kb.kb6 { grid-template-columns: 1fr; } .p2p-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kb-col:has(> .kb-list > .kb-empty) { display: none; } }

/* ── v2.0.34 «Bảng 7 dòng chảy» ── */
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.fl-card { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--c); border-radius: 12px; padding: 12px 14px 14px; box-shadow: var(--shadow); }
.fl-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fl-card header h3 { font-size: 15.5px; }
.fl-card header small { color: var(--muted); font-size: 12px; }
.fl-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; }
.fl-dot { margin-left: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--green); flex: none; }
.fl-warn .fl-dot { background: #d99a1e; } .fl-bad .fl-dot { background: var(--red); }
.fl-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fl-kpi { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); border-left: 4px solid var(--line); color: var(--ink); text-decoration: none !important; min-height: 64px; }
.fl-kpi span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.fl-kpi b { font-size: 19px; font-variant-numeric: tabular-nums; }
.fl-kpi small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.fl-kpi.t-good { border-left-color: var(--green); }
.fl-kpi.t-warn { border-left-color: #d99a1e; background: var(--amber-bg); }
.fl-kpi.t-bad { border-left-color: var(--red); background: var(--red-bg); }
.fl-kpi.t-bad b { color: var(--red); }
.fl-kpi:hover { filter: brightness(.97); }
@media (max-width: 420px) { .fl-grid { grid-template-columns: 1fr; } }

/* ── v2.0.36 Trợ lý Claude: thẻ mức điều phối ── */
.cl-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cl-tier { border: 1px solid var(--line); border-top: 5px solid var(--tc); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.cl-tier b { color: var(--tc); font-size: 15px; }
.ai-sample { white-space: normal; text-align: left; max-width: 100%; }

/* v2.0.37 (5S – Sạch sẽ): thẻ gọn — tên tối đa 2 dòng, việc tiếp theo 2 dòng; bấm thẻ để xem đủ */
.kc-title, .kc-next { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.kc-title { -webkit-line-clamp: 2; }
.kc-next { -webkit-line-clamp: 2; }
@media (max-width: 560px) { .kb-col[data-col="done"] .kc:nth-child(n+4) { display: none; } }

/* v2.0.38 Nhật ký cập nhật gộp theo ngày */
.cl-days { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.cl-day { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.cl-day.now { border-left-color: var(--brand); }
.cl-day > summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; padding: 2px 0; }
.cl-day > summary::-webkit-details-marker { display: none; }
.cl-day > summary::after { content: '▾'; color: var(--muted); }
.cl-day > summary span { color: var(--muted); font-size: 13px; margin-left: auto; }
.cl-day[open] > summary { margin-bottom: 4px; }
.cl-day ul { margin: 0; padding: 0; list-style: none; }
.cl-day li { display: flex; gap: 8px; padding: 3px 0; font-size: 14px; border-top: 1px dashed var(--line); }
.cl-day li:first-child { border-top: 0; }
.cl-v { flex: none; min-width: 44px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.cl-more { margin-top: 6px; font-size: 13px; }
.cl-more > summary { cursor: pointer; color: var(--muted); }
.cl-det { margin-top: 8px; white-space: pre-wrap; line-height: 1.55; }

/* v2.0.38 — 5S: thanh bên gom thành KHU màu; trang khu = các ô mục */
.nav-khu-title { padding: 14px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--nav-muted, rgba(255,255,255,.5)); }
.nav a.nav-khu { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 1px 0; border-radius: 10px; color: var(--nav-ink, #fff); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a.nav-khu:hover, .nav a.nav-khu.active { background: rgba(255,255,255,.09); }
.khu-chip { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.shell.rail .nav-khu-title { display: none; }
.shell.rail .nav a.nav-khu { justify-content: center; padding: 8px 0; }
.khu-page { max-width: 1100px; }
.khu-head { display: flex; align-items: center; gap: 16px; color: #fff; border-radius: 16px; padding: 18px 22px; margin-bottom: 18px; }
.khu-head h1 { margin: 0; font-size: 26px; color: #fff; }
.khu-sub { font-size: 13px; opacity: .85; }
.khu-chip.big { width: 52px; height: 52px; font-size: 26px; border-radius: 12px; background: rgba(255,255,255,.18) !important; }
.khu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.khu-tile { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-top: 4px solid; border-radius: 12px; color: var(--fg, #1f1d1b); text-decoration: none; font-weight: 600; font-size: 15px; }
.khu-tile:hover { box-shadow: 0 10px 24px -14px rgba(31,35,40,.45); transform: translateY(-1px); }
.khu-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
@media (max-width: 600px) { .khu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .khu-tile { min-height: 72px; font-size: 14px; } }
.nav-khu-more { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 6px; padding: 8px 10px; background: none; border: 0; border-radius: 10px; color: var(--nav-muted, rgba(255,255,255,.6)); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nav-khu-more:hover { background: rgba(255,255,255,.06); }
.nav-khu-more[aria-expanded="true"] .chev svg { transform: rotate(90deg); }
.nav-khu-other a.nav-khu { opacity: .85; }
.shell.rail .nav-khu-more { display: none; }
.khu-sec { margin: 18px 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6c655e); }
.khu-head + .khu-sec { margin-top: 4px; }
.nav a.nav-khu.nav-sys { margin-top: auto; opacity: .75; font-size: 13px; }
.nav a.nav-khu.nav-sys + .nav-foot { margin-top: 0; }

/* ═══ v2.0.38 — GIAO DIỆN TRẮNG · ĐỎ · XÁM (chủ chốt 07/11): nền trắng, đỏ Kodsdoor #BE202F làm điểm nhấn, xám #6C6E72 cho khung ═══ */
:root {
  --bg: #F4F4F5; --surface: #FFFFFF; --surface-2: #F7F7F8; --surface-3: #EEEEF0;
  --ink: #2B2B2E; --ink-2: #45474C; --muted: #6C6E72; --line: #E2E2E5; --line-2: #ECECEE;
  --brand: #BE202F; --brand-dark: #981824; --brand-soft: #FBE9EA; --focus: #BE202F; --steel: #6C6E72;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(43,43,46,.05), 0 8px 24px -14px rgba(43,43,46,.18);
  --nav-bg: #5E6064; --nav-ink: #FFFFFF; --nav-muted: #D3D4D6;
}
body { background: var(--bg); }
.nav { background-color: var(--nav-bg); background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.05) 0 1px, transparent 1px 9px); border-right: 0; }
.nav a.nav-item:hover, .nav a.nav-khu:hover, .nav a.nav-khu.active { background: rgba(255,255,255,.14); }
.nav a.nav-item.active { background: var(--brand); color: #fff; }
.nav-foot { border-top-color: rgba(255,255,255,.18); }
.top { background: #FFFFFF; border-bottom: 3px solid var(--brand); }
.btn.primary, .btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover, .btn-primary:hover { background: var(--brand-dark); }
.khu-tile { background: #FFFFFF; }
.khu-head { box-shadow: 0 12px 30px -18px rgba(43,43,46,.5); }
.khu-chip { box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }

/* ── v2.0.38 · ĐỘ BÓNG MƯỢT (chủ: «như đêm mờ 3D hành tinh, cần độ bóng mượt mà») — vẫn trắng · đỏ · xám ── */
:root {
  --gloss: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.78) 100%);
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(43,43,46,.06), 0 14px 34px -18px rgba(43,43,46,.32);
  --shadow-up: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 4px rgba(43,43,46,.06), 0 22px 44px -18px rgba(43,43,46,.38);
}
body {
  background-color: #EFEFF1;
  background-image:
    radial-gradient(760px 520px at -6% -10%, rgba(190,32,47,.16), rgba(190,32,47,0) 70%),
    radial-gradient(640px 560px at 108% 12%, rgba(108,110,114,.20), rgba(108,110,114,0) 70%),
    radial-gradient(900px 600px at 60% 120%, rgba(190,32,47,.07), rgba(190,32,47,0) 70%),
    linear-gradient(180deg, #F7F7F8 0%, #ECECEE 100%);
  background-attachment: fixed;
}
/* thẻ, khung: nền kính trắng bóng, viền sáng, bóng đổ mềm nhiều lớp */
.panel, .card, .kc, .fl-card, .khu-tile, .fl-kpi, .dialog {
  background: var(--gloss); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-color: rgba(255,255,255,.9); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover, .kc:hover, .khu-tile:hover, .fl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.kb-col { background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.top { background: rgba(255,255,255,.72); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
/* thanh menu xám: ánh kim loại */
.nav { background-image: linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.10)), repeating-linear-gradient(180deg, rgba(255,255,255,.05) 0 1px, transparent 1px 9px); box-shadow: inset -1px 0 0 rgba(255,255,255,.08), 6px 0 24px -12px rgba(43,43,46,.5); }
.nav a.nav-item.active { background: linear-gradient(135deg, #D02A3A, #9E1A27); box-shadow: 0 8px 20px -8px rgba(190,32,47,.8), inset 0 1px 0 rgba(255,255,255,.25); }
/* ô số khu: viên ngọc 3D */
.khu-chip { background-image: radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), rgba(255,255,255,0) 55%), linear-gradient(160deg, rgba(255,255,255,.18), rgba(0,0,0,.22)) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 10px -3px rgba(0,0,0,.45); }
.khu-head { background-image: radial-gradient(520px 220px at 12% -30%, rgba(255,255,255,.35), rgba(255,255,255,0) 70%), linear-gradient(135deg, rgba(255,255,255,.10), rgba(0,0,0,.18)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 18px 40px -20px rgba(43,43,46,.7); }
.khu-dot { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 12px currentColor; }
/* nút: đỏ bóng */
.btn { transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn.primary, .btn-primary { background: linear-gradient(180deg, #D3303F 0%, #B01D2B 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 18px -8px rgba(190,32,47,.75); }
.btn.primary:hover, .btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 24px -10px rgba(190,32,47,.85); }
.btn:not(.primary):not(.btn-primary) { background: linear-gradient(180deg, #FFFFFF, #F3F3F5); box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(43,43,46,.08); }
input, select, textarea { background: rgba(255,255,255,.85); box-shadow: inset 0 1px 2px rgba(43,43,46,.06); }
.chip { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(43,43,46,.06); }
@media (prefers-reduced-motion: reduce) { .card:hover, .kc:hover, .khu-tile:hover, .fl-card:hover, .btn:hover { transform: none; } }

/* ── v2.0.38 · GHI SÁNG (chủ: «không phải đen mà ghi sáng») — thanh menu bạc sáng, chữ đậm, điểm nhấn đỏ ── */
:root { --nav-bg: #ECEDEF; --nav-ink: #2B2B2E; --nav-muted: #6C6E72; }
.nav { background-color: var(--nav-bg); background-image: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0) 40%, rgba(108,110,114,.08)), repeating-linear-gradient(180deg, rgba(108,110,114,.07) 0 1px, transparent 1px 9px); border-right: 1px solid #DCDDE0; box-shadow: inset -1px 0 0 #fff, 6px 0 22px -14px rgba(43,43,46,.35); color: var(--nav-ink); }
.nav a.nav-item, .nav a.nav-khu, .nav .nav-title { color: var(--nav-ink); }
.nav a.nav-item:hover, .nav a.nav-khu:hover, .nav a.nav-khu.active { background: rgba(255,255,255,.85); box-shadow: 0 1px 0 #fff inset, 0 4px 12px -8px rgba(43,43,46,.35); }
.nav a.nav-item.active { color: #fff; }
.nav-rail-btn { background: #fff; color: var(--nav-ink); box-shadow: 0 1px 2px rgba(43,43,46,.12); }
.nav-foot { border-top-color: #DCDDE0; color: var(--nav-muted); }
.nav-foot a { color: var(--nav-ink); }
.nav-khu-more { color: var(--nav-muted); }
.nav-khu-more:hover { background: rgba(255,255,255,.7); }
.nav .brand-sub { color: var(--nav-muted); }
.avatar { background: linear-gradient(160deg, #8A8C90, #6C6E72); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }

/* ── v2.0.38 · Trang khu: mỗi mục là một THẺ như thẻ Kaizen / 5S (dải màu có lỗ treo, mã thẻ, tên to) ── */
.khu-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.khu-card { position: relative; display: flex; flex-direction: column; min-height: 132px; border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, #FFFFFF, #F8F8F9); border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(43,43,46,.06), 0 14px 30px -18px rgba(43,43,46,.38); transition: transform .18s ease, box-shadow .18s ease; }
.khu-card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 1px 0 #fff inset, 0 2px 4px rgba(43,43,46,.08), 0 24px 40px -20px rgba(43,43,46,.5); }
.kcard-band { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px 9px 14px; color: #fff;
  background: var(--kc); background-image: radial-gradient(160px 60px at 15% -20%, rgba(255,255,255,.45), rgba(255,255,255,0) 70%), linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.14)); box-shadow: inset 0 -1px 0 rgba(0,0,0,.12); }
.kcard-hole { width: 14px; height: 14px; border-radius: 50%; background: #F1F1F3; box-shadow: inset 0 2px 3px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.4); }
.kcard-code { font-family: var(--head, inherit); font-weight: 800; font-size: 12px; letter-spacing: .12em; opacity: .95; }
.kcard-title { flex: 1; padding: 14px 16px 6px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.kcard-foot { padding: 0 16px 12px; font-size: 12px; font-weight: 700; color: var(--kc); letter-spacing: .02em; }
.khu-card::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 34px; border-top: 1px dashed #E2E2E5; }
.khu-head { background-image: radial-gradient(620px 240px at 10% -40%, rgba(255,255,255,.45), rgba(255,255,255,0) 70%), linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.22)); }
@media (max-width: 600px) { .khu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .khu-card { min-height: 118px; } .kcard-title { font-size: 14px; padding: 10px 12px 4px; } .kcard-foot { padding: 0 12px 10px; } }
@media (prefers-reduced-motion: reduce) { .khu-card:hover { transform: none; } }
.kcard-band { color: var(--kc-on, #fff); }
.kcard-foot { color: var(--kc-ink, var(--kc)); }
.khu-card { border-left: 0; }
.khu-card .kcard-title { color: var(--ink); }

/* ── v2.0.38 · THEO MẪU THIẾT KẾ CHỦ DUYỆT (23:22 07/11) — đầu khu khối đa giác, dải 7 màu, nhóm đánh số, thẻ có biểu tượng + mô tả ── */
.khu-head { position: relative; overflow: hidden; gap: 0; padding: 22px 26px; border-radius: 16px; margin-bottom: 0;
  background: var(--kh); background-image: linear-gradient(115deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 45%), linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.10));
  box-shadow: 0 16px 34px -18px rgba(43,43,46,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.khu-head::before, .khu-head::after { content: ""; position: absolute; top: 0; bottom: 0; pointer-events: none; }
.khu-head::before { right: 0; width: 46%; background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.04)); clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%, 55% 45%); }
.khu-head::after { right: 0; width: 30%; background: linear-gradient(200deg, rgba(255,255,255,.28), rgba(0,0,0,.12)); clip-path: polygon(40% 0, 100% 0, 100% 70%, 70% 100%, 15% 60%); }
.khu-head-ico { position: relative; z-index: 1; display: flex; align-items: center; padding-right: 22px; margin-right: 22px; border-right: 2px solid rgba(255,255,255,.75); color: #fff; }
.khu-head > div { position: relative; z-index: 1; }
.khu-head h1 { font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
.khu-sub { font-size: 15px; opacity: .95; margin-top: 2px; }
.khu-stripe { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: 8px; border-radius: 9999px; overflow: hidden; margin: 10px 0 20px; box-shadow: 0 2px 6px -2px rgba(43,43,46,.3); }
.khu-sec { display: flex; align-items: center; gap: 14px; margin: 22px 0 14px; font-size: 20px; font-weight: 800; letter-spacing: .02em; color: var(--ink); text-transform: uppercase; }
.khu-sec::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, #D6D7DA, rgba(214,215,218,0)); }
.khu-sec-n { background: linear-gradient(180deg, #D3303F, #A81B28); color: #fff; font-size: 16px; padding: 3px 10px; border-radius: 8px; box-shadow: 0 4px 10px -4px rgba(190,32,47,.8); letter-spacing: .04em; }
.khu-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.khu-card { min-height: 150px; border-left: 4px solid var(--kc) !important; border-radius: 12px; }
.khu-card::after { bottom: 40px; left: 18px; right: 18px; }
.kcard-band { padding: 9px 14px 9px 14px; border-radius: 0 10px 0 0; }
.kcard-hole { display: none; }
.kcard-ico { display: inline-flex; filter: drop-shadow(0 1px 0 rgba(0,0,0,.15)); }
.kcard-code { font-size: 15px; letter-spacing: .06em; }
.kcard-title { flex: none; padding: 12px 18px 0; font-size: 19px; font-weight: 800; line-height: 1.25; }
.kcard-desc { flex: 1; padding: 3px 18px 10px; font-size: 13.5px; color: var(--muted); }
.kcard-foot { padding: 8px 18px 12px; font-size: 14px; font-weight: 800; }
/* thanh menu theo mẫu: ô số đặc, mục đang mở nền đỏ, kẻ mảnh giữa các mục */
.nav a.nav-khu, .nav a.nav-item.nav-home { border-bottom: 1px solid #E1E2E5; border-radius: 0; margin: 0; padding: 10px 8px; }
.nav a.nav-khu.active { background: linear-gradient(180deg, #D3303F, #A81B28); color: #fff; border-radius: 10px; border-bottom-color: transparent; box-shadow: 0 8px 18px -10px rgba(190,32,47,.9); }
.nav a.nav-khu.active .khu-chip { background: transparent !important; background-image: none !important; box-shadow: none; }
.khu-chip { width: 30px; height: 30px; border-radius: 7px; font-size: 15px; background-image: linear-gradient(180deg, rgba(255,255,255,.18), rgba(0,0,0,.12)) !important; box-shadow: 0 2px 4px -1px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.3); }
.nav a.nav-khu { font-size: 15px; font-weight: 600; }
.nav a.nav-item.nav-home.active { border-radius: 10px; border-bottom-color: transparent; }
@media (max-width: 600px) { .khu-head h1 { font-size: 24px; } .khu-head-ico { padding-right: 14px; margin-right: 14px; } .khu-head-ico svg { width: 30px; height: 30px; } .kcard-title { font-size: 16px; } .khu-sec { font-size: 16px; } }

/* v2.0.38 gọn: quy trình 1 dòng, gợi ý (i), mục liên quan rỗng gom 1 dòng */
.flowbox.fb-slim { padding: 0; }
.fb-line { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.fb-no { width: 34px; height: 34px; border-radius: 10px; background: var(--brand, #BE202F); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 3px 8px rgba(190,32,47,.3); }
.fb-no.ok { background: #1E7445; box-shadow: 0 3px 8px rgba(30,116,69,.3); }
.fb-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.fb-txt b { font-size: 15px; }
.fb-txt small { color: var(--muted); font-size: 12.5px; }
.fb-bar { width: 140px; height: 6px; border-radius: 3px; background: var(--line, #E2E4E7); overflow: hidden; flex: none; }
.fb-bar u { display: block; height: 100%; background: linear-gradient(90deg, #BE202F, #E0525F); text-decoration: none; }
.help-i { display: inline-flex; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #A6A9AE; color: #6C6E72; font: 700 10px/1 Georgia, serif; font-style: italic; align-items: center; justify-content: center; cursor: help; vertical-align: 1px; margin-left: 3px; }
.help-i:hover, .help-i:focus { border-color: var(--brand, #BE202F); color: var(--brand, #BE202F); outline: none; }
.rel-empty { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
@media (max-width: 640px) { .fb-bar { display: none; } }
.related > .rel-empty { grid-column: 1 / -1; margin: 0; }

/* v2.0.38 Đợt 1 — hồ sơ 6 ngăn thẻ Kaizen (hợp đồng) */
.ktabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.ktab { padding: 0; border: 1px solid #E1E3E6; border-radius: 14px; overflow: hidden; background: #fff; cursor: pointer; font: inherit; text-align: left; box-shadow: 0 4px 12px rgba(30,35,40,.06); transition: transform .12s, box-shadow .12s; }
.ktab:hover { transform: translateY(-1px); }
.ktab.on { border-color: var(--kc); transform: translateY(-2px); box-shadow: 0 12px 24px -10px var(--kc), 0 0 0 2px var(--kc3); }
.ktab-band { display: flex; align-items: center; justify-content: space-between; padding: 6px 11px; color: #fff; background: linear-gradient(135deg, var(--kc), var(--kc2)); }
.ktab-band b { font-weight: 800; font-size: 13px; }
.ktab-band i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.ktab-body { display: flex; flex-direction: column; padding: 8px 11px 10px; line-height: 1.3; }
.ktab-body b { font-size: 14px; color: var(--fg, #1F2328); }
.ktab-body small { font-size: 12px; color: var(--muted, #6C6E72); margin-top: 2px; }
.ktab-head { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; padding: 10px 14px; background: #fff; border: 1px solid #E1E3E6; border-top: 4px solid var(--kc, #BE202F); border-radius: 14px; }
.ktab-head > b { font-size: 17px; }
.ktab-chip { width: 28px; height: 28px; border-radius: 9px; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
#frm > section[hidden], #related > [hidden], #related .rel-empty > [hidden], #doorsbox[hidden], #files[hidden], .handoff[hidden] { display: none !important; }
.ph-value { display: flex; flex-direction: column; align-items: flex-end; padding: 0 14px; margin-left: auto; border-right: 1px solid #E1E3E6; line-height: 1.2; }
.ph-value small { font-size: 12px; color: var(--muted, #6C6E72); }
.ph-value b { font-size: 22px; font-weight: 800; }
.ph-value .ph-vat { font-size: 12px; color: var(--muted, #6C6E72); white-space: nowrap; }
/* chỉ xem: ô nhập trông như chữ, ô thiếu tô vàng, ẩn nút lưu/thêm */
.vmode .hdr input:not([type=hidden]), .vmode .hdr select, .vmode .hdr textarea, .vmode .cgrid input, .vmode .cgrid select { border-color: transparent !important; background: transparent !important; box-shadow: none !important; pointer-events: none; -webkit-appearance: none; appearance: none; color: var(--fg, #1F2328); font-weight: 600; padding-left: 0; }
.vmode .hdr .field { background: #F7F8F9; border: 1px solid #ECEDEF; border-radius: 12px; padding: 8px 12px; }
.vmode .hdr .field.kt-empty { background: #FFF6E0; border-color: #F0D9A0; }
.vmode .hdr .field.kt-empty label::after { content: ' · cần điền'; color: #9A6A0C; font-weight: 700; }
.vmode .ref-btn, .vmode .child-foot, .vmode .cgrid td:last-child button, .vmode .help-i, .vmode > .row { display: none !important; }
.vmode-on .page-head [data-save] { display: none; }
/* dải 5 chặng trên hồ sơ */
.fb-phases { display: flex; gap: 6px; padding: 0 16px 12px; }
.fbp { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 11px; background: #fff; border: 1px solid #E1E3E6; color: #6C6E72; }
.fbp > span { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--pc); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.fbp b { font-size: 13px; color: inherit; display: block; white-space: nowrap; }
.fbp small { font-size: 11.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbp.now { flex: 2; background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc) 70%, #fff)); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px var(--pc); }
.fbp.now > span { background: rgba(255,255,255,.25); }
.fbp.done { background: color-mix(in srgb, var(--pc) 12%, #fff); color: #1F2328; }
@media (max-width: 900px) { .ktabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fbp:not(.now) small { display: none; } .ph-value { display: none; } }
@media (max-width: 520px) { .ktabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fb-phases { flex-wrap: wrap; } }
.vmode .ref-box { border-color: transparent !important; background: transparent !important; box-shadow: none !important; }
.vmode input::placeholder, .vmode textarea::placeholder { color: transparent; }
.vmode input::-webkit-calendar-picker-indicator, .vmode input::-webkit-inner-spin-button { display: none; }
.vmode textarea { resize: none; }

/* v2.0.38 Đợt 1 — Phễu kinh doanh */
.pheu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pcol { background: linear-gradient(180deg, #fff, #F7F8F9); border: 1px solid #E1E3E6; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 24px rgba(30,35,40,.07); }
.pcol-head { display: flex; align-items: center; gap: 10px; padding: 11px 13px; color: #fff; background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc) 70%, #fff)); }
.pcol-head b { display: block; font-size: 15px; } .pcol-head small { display: block; font-size: 12px; opacity: .92; }
.pno { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.pn { font-weight: 800; font-size: 22px; }
.pcol-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; max-height: 70vh; overflow-y: auto; }
.pcard { display: block; background: #fff; border: 1px solid #E6E8EA; border-radius: 12px; padding: 10px 11px; color: inherit; text-decoration: none; box-shadow: 0 2px 6px rgba(30,35,40,.05); }
.pcard:hover { border-color: var(--pc); }
.pcard.warn { border-color: #F3B7BD; }
.pc-top { display: flex; gap: 8px; align-items: flex-start; }
.pc-top b { display: block; font-size: 14px; line-height: 18px; } .pc-top small { display: block; font-size: 12px; color: #6C6E72; margin-top: 2px; }
.pv { font-weight: 800; font-size: 14px; white-space: nowrap; }
.lamp { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; display: block; }
.lamp.r { background: #E5363F; box-shadow: 0 0 8px #E5363F; } .lamp.y { background: #F2B705; box-shadow: 0 0 8px #F2B705; } .lamp.g { background: #2BB05F; box-shadow: 0 0 8px #2BB05F; }
.pc-bot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.pch { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: color-mix(in srgb, var(--pc) 14%, #fff); color: var(--pc); }
.pnote { font-size: 12px; color: #6C6E72; } .pnote.r { color: #C4202F; font-weight: 700; }
.pempty { text-align: center; color: #A0A3A8; padding: 14px; }
.pheu-foot { margin-top: 14px; font-size: 12.5px; color: #3A3D42; background: #fff; border: 1px solid #E1E3E6; border-radius: 12px; padding: 10px 14px; }
.pheu-foot b { color: #BE202F; margin-right: 8px; }
.btn.danger-soft { background: #FDECEE; color: #C4202F; border-color: #F3B7BD; }
.seg { display: inline-flex; gap: 2px; }
@media (max-width: 1000px) { .pheu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pheu { grid-template-columns: minmax(0, 1fr); } }
.pc-top small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* v2.0.38 Đợt 3 — Nhập dữ liệu 2026 */
.nh-step, .nh-go { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid #E1E3E6; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.nh-step select { min-width: 280px; }
.nh-no { width: 28px; height: 28px; border-radius: 9px; background: #BE202F; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.nh-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.nh-card { background: #fff; border: 1px solid #E1E3E6; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 12px rgba(30,35,40,.06); }
.nh-band { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #fff)); color: #fff; font-weight: 800; font-size: 13px; padding: 6px 11px; }
.nh-card b { font-size: 24px; font-weight: 800; padding: 6px 11px 0; } .nh-card small { font-size: 12px; color: #6C6E72; padding: 0 11px 10px; }
.nh-del { background: #FDECEE; border: 1px solid #F3B7BD; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.nh-del .small { flex-basis: 100%; color: #3A3D42; }
.nh-warn { background: #FFF6E0; border: 1px solid #F0D9A0; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.nh-done { background: #E3F4EA; border: 1px solid #A7D9B9; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.nh-go { margin-top: 14px; border-color: #F3B7BD; }
@media (max-width: 900px) { .nh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v2.0.38 Đợt 3 — Khu Tài chính: 7 ngăn thẻ Kaizen */
.tc-tabs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.tc-tab { text-align: left; background: #fff; border: 1px solid #E1E3E6; border-top: 5px solid var(--c); border-radius: 12px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; color: inherit; min-height: 54px; }
.tc-tab b { font-size: 13px; } .tc-tab small { color: #6C6E72; font-size: 11.5px; }
.tc-tab.on { background: var(--c); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 30%, transparent); } .tc-tab.on small { color: #fff; }
.tc-red { color: #BE202F; font-weight: 700; } .tc-tab.on .tc-red { color: #fff; }
.tc-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.tc-kpi div { background: #fff; border: 1px solid #E1E3E6; border-radius: 10px; padding: 8px 11px; } .tc-kpi small { display: block; color: #6C6E72; font-size: 11.5px; } .tc-kpi b { font-size: 16px; }
.tc-due { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 10px; }
.tc-dcard { background: #fff; border: 1px solid #E1E3E6; border-radius: 12px; overflow: hidden; }
.tc-dband { background: var(--c); color: #fff; display: flex; justify-content: space-between; gap: 8px; padding: 5px 10px; font-size: 12.5px; }
.tc-dbody { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.tc-dfoot { display: flex; justify-content: space-between; color: #6C6E72; font-size: 12.5px; } .tc-dfoot b { color: var(--c); }
.tc-dbody details summary { cursor: pointer; color: #6C6E72; font-size: 12px; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tc-chip { background: #fff; border: 1px solid #E1E3E6; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tc-chip small { color: #6C6E72; } .tc-chip.on { border-color: #BE202F; color: #BE202F; font-weight: 700; }
.tc-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; } .tc-bar input { margin-left: auto; width: 220px; }
.tc-table { max-height: 70vh; } .tc-table td { white-space: nowrap; max-width: 380px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .tc-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tc-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tc-bar input { width: 100%; margin-left: 0; } }

/* v2.0.38 Đợt 2 — Tủ hồ sơ · Theo dõi xe · Kho 5S (thẻ màu Kaizen) */
.d2-seg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.d2-seg button:not(.btn) { background: #fff; border: 1px solid #E1E3E6; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.d2-seg button.on { background: var(--c, #BE202F); border-color: var(--c, #BE202F); color: #fff; font-weight: 700; }
.d2-seg.zones button { border-left: 4px solid var(--c); }
.d2-pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; background: #F1F2F4; color: #3A3D42; }
.d2-pill.red { background: #FBE5E7; color: #BE202F; } .d2-pill.amber { background: #FBF0D9; color: #8A5A00; } .d2-pill.green { background: #E2F2E8; color: #1E7445; }
.d2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.d2-grid.four { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.d2-card { display: block; text-align: left; background: #fff; border: 1px solid #E1E3E6; border-radius: 12px; overflow: hidden; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.d2-card.on { outline: 3px solid var(--c); outline-offset: 1px; }
.d2-band { background: var(--c); color: #fff; display: flex; justify-content: space-between; gap: 8px; padding: 6px 11px; font-size: 12.5px; align-items: center; } .d2-band b { font-size: 15px; }
.d2-body { padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; } .d2-body b { font-size: 14px; } .d2-body small { font-size: 12px; color: #4A4D52; }
.d2-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.d2-hint { color: #6C6E72; font-size: 13px; padding: 6px 2px; }
.d2-list { border-top: 5px solid var(--c); } .d2-lhead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; } .d2-lhead .btn, .d2-lhead a.small { margin-left: auto; }
.d2-people th.c, .d2-people td.c { text-align: center; } .d2-people th.c { font-size: 11.5px; }
.d2-dot { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; text-decoration: none; }
.d2-dot.ok { background: #E2F2E8; color: #1E7445; } .d2-dot.no { background: #FBE5E7; color: #BE202F; }
.d2-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; } .d2-kpi small { display: block; color: #6C6E72; font-size: 11px; } .d2-kpi b { font-size: 16px; }
.d2-rules { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; } .d2-rules span { background: #fff; border: 1px dashed #C9CCD1; border-radius: 8px; padding: 4px 10px; font-size: 12px; color: #4A4D52; }
.d2-two { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; } @media (max-width: 900px) { .d2-two { grid-template-columns: 1fr; } }
.d2-trips { display: flex; flex-direction: column; gap: 6px; } .d2-trip { display: block; border: 1px solid #E1E3E6; border-radius: 10px; padding: 7px 10px; color: inherit; text-decoration: none; font-size: 13px; }
.d2-warn { background: #FBE5E7; color: #8E1621; border-radius: 6px; padding: 5px 8px; margin-top: 4px; font-size: 12.5px; white-space: pre-line; }
.d2-bins { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-bottom: 14px; }
.d2-bin { display: flex; gap: 8px; background: #fff; border: 1px solid #E1E3E6; border-left: 5px solid #BE202F; border-radius: 10px; padding: 7px; } .d2-bin > div > b { font-size: 15px; display: block; } .d2-bin small { color: #6C6E72; }
.d2-qr svg { width: 64px; height: 64px; display: block; }
.d2-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .d2-row input:not([style]) { flex: 1; min-width: 180px; }
.d2-assign { margin-top: 4px; }

/* Soát sai lệch Khu Tài chính */
.tc-soat-head { background: #fff; border: 1px solid #E1E3E6; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.55; margin-bottom: 10px; } .tc-soat-head .muted { display: block; font-size: 12px; }
.tc-soat { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.tc-scard { background: #fff; border: 1px solid #E1E3E6; border-radius: 12px; overflow: hidden; --c: #9A6A0C; } .tc-scard.do { --c: #BE202F; }
.tc-sband { background: var(--c); color: #fff; display: flex; justify-content: space-between; gap: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.tc-sbody { padding: 9px 11px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.tc-sbody ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: #3A3D42; } .tc-sbody summary { cursor: pointer; color: #6C6E72; font-size: 12.5px; }
/* Chăm sóc khách hàng */
.cs-list { display: flex; flex-direction: column; gap: 8px; }
.cs-card { display: flex; gap: 12px; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #E1E3E6; border-left: 5px solid var(--c); border-radius: 12px; padding: 9px 12px; flex-wrap: wrap; }
.cs-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; } .cs-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.cs-btns { display: flex; gap: 6px; } .cs-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.cs-chk { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13.5px; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; } .cs-form { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.cs-tag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; }
.cs-form input, .cs-form textarea, .cs-form select { width: 100%; border: 1px solid #D5D8DC; border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; box-sizing: border-box; } .cs-form input:focus, .cs-form textarea:focus { outline: none; border-color: #BE202F; box-shadow: 0 0 0 3px rgba(190,32,47,.12); }

/* Góc riêng */
.goc-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); } @media (max-width: 700px) { .goc-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.goc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 12px; }
.goc-box { background: #fff; border: 1px solid #E1E3E6; border-top: 5px solid var(--c); border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; gap: 6px; }
.goc-bh { font-weight: 700; font-size: 13.5px; color: var(--c); display: flex; gap: 8px; align-items: center; } .goc-box .btn { align-self: flex-start; }
.goc-flags { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; } .goc-flag { border-radius: 8px; padding: 6px 10px; font-size: 13px; background: #F1F2F4; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.goc-flag.do { background: #FBE5E7; color: #8E1621; } .goc-flag.vang { background: #FBF0D9; color: #7A4F00; }
.goc-tick { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; } .goc-tick input { width: 18px; height: 18px; accent-color: #1E7445; }
.goc-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px dashed #E1E3E6; font-size: 13px; } .goc-row:last-of-type { border-bottom: 0; }
.goc-spark { width: 100%; height: 46px; display: block; } .goc-sp-lbl { display: flex; justify-content: space-between; font-size: 11px; color: #6C6E72; }
.goc-hf { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.goc-note { background: #E2F2E8; color: #1E5C38; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.goc-menu td { vertical-align: top; } .goc-cell { all: unset; cursor: pointer; display: block; width: 100%; font-size: 13px; padding: 2px 0; } .goc-cell:hover { color: #BE202F; }
.goc-today { background: #FFF7F7; } .goc-today td:first-child b { color: #BE202F; }
.goc-streak { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 10px; font-size: 13px; } .goc-streak b { font-size: 20px; color: #2A5A8C; }
.goc-dot { width: 12px; height: 12px; border-radius: 3px; background: #E1E3E6; display: inline-block; } .goc-dot.on { background: #1E7445; }
.goc-box input, .goc-box select { border: 1px solid #D5D8DC; border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 13px; min-width: 0; flex: 1; } .goc-box .d2-row input:not([style]) { min-width: 120px; }

/* v2.0.40 Bóc tách – trúng/trượt */
.bt-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid var(--line)}
.btn.bt-win{background:#1E7445!important;color:#fff!important;border-color:#1E7445}.btn.bt-lose{background:#BE202F!important;color:#fff!important;border-color:#BE202F}
.btn.bt-x{background:#6C6E72!important;color:#fff!important;border-color:#6C6E72}.btn.bt-wait{background:var(--raise,#f6f4f1)}
tr.bt-late td{background:color-mix(in srgb,#BE202F 6%,transparent)}
.bt-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:0 0 14px}
.bt-tile{background:var(--surface,#fff);border:1px solid var(--line);border-top:4px solid var(--c);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column}
.bt-tile b{font-size:28px;color:var(--c);line-height:1.1}.bt-tile span{font-weight:600}.bt-tile small{color:var(--muted)}
.tc-green{color:#1E7445;font-weight:600}

/* v2.0.42 Tồn kho 5S */
.st-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;padding:12px}
.st-tile{display:grid;grid-template-columns:1fr auto;gap:4px 8px;text-align:left;background:var(--surface,#fff);border:1px solid var(--line);border-top:5px solid var(--c);border-radius:12px;padding:10px 12px;cursor:pointer;color:var(--fg)}
.st-tile b{font-size:14px}.st-tile .st-n{font-size:22px;font-weight:800;color:var(--c);grid-row:span 2;align-self:center}
.st-tile .st-bar{display:flex;gap:6px;flex-wrap:wrap;font-size:12px}.st-tile .st-bar i{font-style:normal;font-weight:700;padding:1px 7px;border-radius:999px}
.st-tile.on{outline:2px solid var(--c);outline-offset:1px}
i.st-bad{background:#f7e3e5;color:#BE202F}i.st-warn{background:#f8eed7;color:#9a6b12}i.st-ok{background:#e3f1e8;color:#1f7a46}
.st-legend{display:flex;gap:14px;flex-wrap:wrap;padding:0 12px 8px;font-size:12px;align-items:center}
.st-dot{display:inline-block;width:11px;height:11px;border-radius:50%;vertical-align:-1px;margin-right:5px;background:#c8c4be}
.st-dot.st-bad{background:#BE202F}.st-dot.st-warn{background:#d9a21b}.st-dot.st-ok{background:#1f7a46}.st-dot.st-none{background:#c8c4be}
.st-group{margin:8px 12px;border:1px solid var(--line);border-left:6px solid var(--c);border-radius:10px;background:var(--surface,#fff)}
.st-group summary{display:flex;gap:10px;align-items:center;padding:10px 12px;cursor:pointer;list-style:none}
.st-group summary::-webkit-details-marker{display:none}
.st-group summary::after{content:"▸";margin-left:auto;color:var(--muted)}.st-group[open] summary::after{content:"▾"}
.st-sw{width:14px;height:14px;border-radius:4px;background:var(--c)}
table.st5s tr.st-bad td:first-child{box-shadow:inset 3px 0 #BE202F}table.st5s tr.st-warn td:first-child{box-shadow:inset 3px 0 #d9a21b}
.st-total{padding:10px 14px;text-align:right}

.st-view{display:inline-flex;gap:3px;margin:0 12px 4px;background:var(--raise,#f6f4f1);border:1px solid var(--line);border-radius:9px;padding:3px}
.st-view button{border:0;background:transparent;font:600 13px inherit;padding:5px 12px;border-radius:7px;cursor:pointer;color:inherit}
.st-view button.on{background:#BE202F;color:#fff}
.st-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;padding:4px 12px 12px}
.st-card{display:flex;flex-direction:column;gap:4px;padding:9px 10px;border:1px solid var(--line);border-left:5px solid var(--c);border-radius:10px;background:var(--surface,#fff);color:inherit;text-decoration:none;min-width:0}
.st-card:hover,.st-card:hover *{border-color:var(--c);text-decoration:none}
.st-card .st-top{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted)}
.st-card .st-top .code{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:85%}
.st-card .st-name{font-size:13px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.st-card .st-q b{font-size:20px}.st-card .st-q small{color:var(--muted)}
.st-card.st-bad{background:color-mix(in srgb,#BE202F 7%,var(--surface,#fff))}.st-card.st-bad .st-q b{color:#BE202F}
.st-card.st-warn{background:color-mix(in srgb,#d9a21b 9%,var(--surface,#fff))}.st-card.st-warn .st-q b{color:#9a6b12}
.st-card.st-ok .st-q b{color:#1f7a46}

/* v2.0.43 — Khuôn thẻ Kaizen cho mọi danh mục */
.kz-view{margin:0 0 0 auto}
.kz-tiles{display:flex;flex-wrap:wrap;gap:8px;padding:12px 12px 4px}
.kz-tile{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:118px;padding:7px 11px 8px;border:1px solid var(--line);border-top:4px solid var(--c,#8a8f96);border-radius:10px;background:var(--surface,#fff);font:inherit;color:inherit;cursor:pointer;text-align:left}
.kz-tile span{font-size:12.5px;font-weight:600;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kz-tile b{font-size:22px;line-height:1.1;color:var(--c,inherit)}
.kz-tile small{font-size:11.5px;font-weight:700}.kz-tile small.r{color:var(--red)}.kz-tile small.w{color:var(--amber)}
.kz-tile.on{outline:2px solid var(--c,#BE202F);outline-offset:1px;background:var(--raise,#f6f4f1)}
.kz-tile.kz-alert{--c:#BE202F;background:color-mix(in srgb,#BE202F 8%,var(--surface,#fff))}
.kz-tile.kz-alert small{color:var(--red)}
.kz-group{margin:8px 12px;border:1px solid var(--line);border-left:5px solid var(--c);border-radius:10px;background:var(--surface,#fff)}
.kz-group>summary{display:flex;align-items:center;gap:8px;padding:9px 12px;cursor:pointer;list-style:none}
.kz-group>summary::-webkit-details-marker{display:none}
.kz-group>summary::after{content:'▸';margin-left:auto;color:var(--muted)}.kz-group[open]>summary::after{content:'▾'}
.kz-sw{width:12px;height:12px;border-radius:3px;background:var(--c)}
.kz-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;padding:2px 12px 12px}
.kz-card{display:flex;flex-direction:column;gap:3px;padding:9px 10px;border:1px solid var(--line);border-left:5px solid var(--c);border-radius:10px;background:var(--surface,#fff);color:inherit;text-decoration:none;min-width:0}
.kz-card:hover{border-color:var(--c)}.kz-card,.kz-card:hover,.kz-card:hover *{text-decoration:none!important}
.kz-top{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted)}
.kz-top .code{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:85%}
.kz-dot{width:10px;height:10px;border-radius:50%;background:var(--c);flex:none}
.kz-t{font-size:13.5px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.kz-s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kz-b{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;margin-top:auto}
.kz-b b{font-size:18px}.kz-b small{color:var(--muted);font-size:12px}
.kz-why{font-style:normal;font-size:11.5px;font-weight:700;border-radius:6px;padding:1px 6px;margin-left:auto}
.kz-card.kz-red{background:color-mix(in srgb,#BE202F 7%,var(--surface,#fff));border-color:color-mix(in srgb,#BE202F 35%,var(--line))}
.kz-card.kz-red .kz-dot{background:var(--red)}.kz-card.kz-red .kz-why{background:var(--red);color:#fff}.kz-card.kz-red .kz-b b{color:var(--red)}
.kz-card.kz-warn{background:color-mix(in srgb,#d9a21b 9%,var(--surface,#fff))}
.kz-card.kz-warn .kz-dot{background:var(--amber)}.kz-card.kz-warn .kz-why{background:var(--amber-bg);color:var(--amber)}
.kz-card.kz-blue .kz-why{background:var(--blue-bg);color:var(--blue)}
.kz-card.kz-grey{opacity:.7}.kz-card.kz-grey .kz-why{background:var(--raise);color:var(--muted)}
.kz-card.kz-done{opacity:.72}.kz-card.kz-done .kz-dot{background:var(--green)}
.kz-more{margin:0 12px 12px}
@media (max-width:640px){.kz-cards{grid-template-columns:1fr 1fr}.kz-tile{min-width:0;flex:1 1 40%}}
/* v2.0.43 — nhập nhanh từ file */
.ti-in{display:grid;grid-template-columns:1fr auto 1.3fr;gap:10px;align-items:stretch}
.ti-drop{display:flex;flex-direction:column;justify-content:center;gap:3px;border:2px dashed var(--line);border-radius:12px;padding:14px;cursor:pointer;background:var(--raise,#f6f4f1);text-align:center}
.ti-drop b{font-size:15px}.ti-drop span{font-size:12.5px;color:var(--muted)}.ti-drop em{font-style:normal;font-weight:700;color:var(--green);font-size:13px}
.ti-drop.over,.ti-drop.on{border-color:#BE202F;background:color-mix(in srgb,#BE202F 6%,var(--surface,#fff))}
.ti-or{align-self:center;color:var(--muted);font-size:13px}
.ti textarea{width:100%;min-height:100px;font:inherit;padding:8px 10px;border:1px solid var(--line);border-radius:10px;resize:vertical}
.ti-act{display:flex;align-items:center;gap:12px;margin:10px 0}
.ti-table{max-height:52vh;overflow:auto;border:1px solid var(--line);border-radius:10px}
.ti-table input[type=text]{width:100%;min-width:220px}.ti-table select{max-width:230px}
.ti-table tr.ti-miss td{background:var(--amber-bg)}
.ti-who{display:block;color:var(--amber);font-size:11.5px}
.ti-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px}
.fp-list{display:grid;gap:10px}
.fp-opt{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:12px 14px;border:1px solid var(--line);border-left:5px solid #BE202F;border-radius:12px;background:var(--surface,#fff);font:inherit;color:inherit;cursor:pointer}
.fp-opt b{font-size:15.5px}.fp-opt span{font-size:13px;color:var(--muted)}.fp-opt:hover{background:var(--raise,#f6f4f1)}
.quick-list .qc-file{justify-content:flex-start}
@media (max-width:640px){.ti-in{grid-template-columns:1fr}.ti-or{text-align:center}.kz-tile{flex:1 1 28%;padding:5px 8px}.kz-tile b{font-size:18px}}
.kz-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.kz-act{font-size:12.5px;font-weight:700;padding:5px 10px;border-radius:8px;border:1px solid var(--line);background:var(--raise,#f6f4f1);cursor:pointer;min-height:30px;display:inline-flex;align-items:center}
.kz-act:hover{border-color:#BE202F;color:#BE202F}
.kz-act[data-v="Chờ duyệt"],.kz-act[data-v="Đã duyệt"]{background:#1f7a46;border-color:#1f7a46;color:#fff}

/* v2.0.43 — Tổng quan 5S */
.d5-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:10px 16px;margin-bottom:14px}
.d5-head .crumb{font-size:13px;color:var(--muted)}
.d5-head h1{margin:2px 0 0;font-size:24px;display:flex;align-items:center;gap:10px}
.d5-badge{display:inline-grid;place-items:center;min-width:38px;height:38px;padding:0 8px;border-radius:12px;color:#fff;font-size:20px;font-weight:800}
.d5-badge.red{background:#BE202F}.d5-badge.amber{background:#C77700}.d5-badge.green{background:#1E7445}
.d5-quick{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:2px}
.d5-quick>*{flex:none}
.d5-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr);gap:12px;margin-bottom:12px}
.d5-box{background:var(--surface,#fff);border:1px solid var(--line);border-radius:14px;padding:12px 14px;min-width:0}
.d5-h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;list-style:none;cursor:default}
.d5-h b{font-size:15px}
details.d5-box>summary.d5-h{cursor:pointer;margin:0}details.d5-box[open]>summary.d5-h{margin-bottom:8px}
details.d5-box>summary::-webkit-details-marker{display:none}
.d5-seg{display:inline-flex;background:var(--raise,#f6f4f1);border:1px solid var(--line);border-radius:8px;padding:2px}
.d5-seg button{border:0;background:transparent;font:600 12.5px inherit;padding:3px 10px;border-radius:6px;cursor:pointer;color:inherit}
.d5-seg button.on{background:#BE202F;color:#fff}
.d5-money{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.d5-money a{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border-radius:10px;background:var(--raise,#f6f4f1);border-top:4px solid #4A5260;color:inherit;text-decoration:none;min-width:0}
.d5-money a.ok{border-top-color:#1E7445}.d5-money a.bad{border-top-color:#BE202F}
.d5-money span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d5-money b{font-size:22px;line-height:1.15;white-space:nowrap}
.d5-money a.ok b{color:#1E7445}.d5-money a.bad b{color:#BE202F}
.d5-bar{height:6px;border-radius:4px;background:var(--line);margin-top:8px;overflow:hidden}.d5-bar i{display:block;height:100%;background:#1E7445}
.d5-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;align-content:start}
.d5-tile{display:flex;flex-direction:column;gap:2px;padding:9px 11px;border-radius:12px;background:var(--surface,#fff);border:1px solid var(--line);border-top:5px solid var(--c);color:inherit;text-decoration:none;min-width:0}
.d5-tile span{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d5-tile b{font-size:24px;line-height:1.15;color:var(--c)}
.d5-tile i{font-style:normal;font-size:11.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d5-tile.red{background:color-mix(in srgb,#BE202F 7%,var(--surface,#fff))}.d5-tile.red i{color:var(--red)}
.d5-tile.amber{background:color-mix(in srgb,#d9a21b 9%,var(--surface,#fff))}.d5-tile.amber i{color:var(--amber)}
.d5-tile:hover{border-color:var(--c)}
.d5-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}
.d5-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.d5-list li a{display:flex;align-items:center;gap:8px;padding:7px 2px;border-top:1px solid var(--line);color:inherit;text-decoration:none;min-width:0}
.d5-list li:first-child a{border-top:0}
.d5-list .dot{width:10px;height:10px;border-radius:50%;flex:none;background:var(--blue)}
.d5-list .dot.red{background:var(--red)}.d5-list .dot.amber{background:var(--amber)}.d5-list .dot.green{background:var(--green)}
.d5-list .t{flex:1;min-width:0;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d5-list em{font-style:normal;font-size:11.5px;color:var(--muted);background:var(--raise,#f6f4f1);border-radius:6px;padding:1px 7px;white-space:nowrap;max-width:40%;overflow:hidden;text-overflow:ellipsis}
.d5-more summary{cursor:pointer;font-size:12.5px;color:var(--muted);padding:6px 2px}
.d5-empty{color:var(--muted);font-size:13.5px;padding:6px 2px}
.d5-pipe{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.d5-pipe span{display:flex;flex-direction:column;align-items:flex-start;padding:7px 10px;border-radius:10px;border-left:5px solid var(--c);background:var(--raise,#f6f4f1);font-size:12.5px;color:var(--muted)}
.d5-pipe b{font-size:22px;color:var(--c)}
.d5-chart{margin-top:12px}
section.d5-box+section.d5-box,.d5-two+section.d5-box{margin-top:0}
@media (max-width:900px){.d5-grid,.d5-two{grid-template-columns:1fr}}
@media (max-width:640px){.d5-head h1{font-size:20px}.d5-money b{font-size:17px}.d5-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.d5-tile b{font-size:20px}.d5-pipe b{font-size:18px}}
.d5-quick select{width:auto!important;max-width:170px;flex:none}.d5-quick .btn{white-space:nowrap}
@media (max-width:640px){.d5-tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.d5-tile{padding:6px 8px;border-top-width:4px}.d5-tile span{font-size:11px;white-space:normal;line-height:1.2;min-height:2.4em}.d5-tile b{font-size:17px}.d5-tile i{display:none}.d5-money{gap:6px}.d5-money a{padding:6px 7px}.d5-money span{font-size:11px}}
/* v2.0.45 — nhận / trả xe bằng ảnh */
.xa{display:flex;flex-direction:column;gap:10px}
.xa-mode{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:12px;color:#fff}
.xa-mode.nhan{background:#2A5A8C}.xa-mode.tra{background:#B8511A}
.xa-mode b{font-size:18px;letter-spacing:.04em}.xa-mode span{font-size:13px;opacity:.92}
.xa-shot{display:flex;flex-direction:column;align-items:center;gap:2px;padding:18px 12px;border:2px dashed #BE202F;border-radius:14px;cursor:pointer;background:color-mix(in srgb,#BE202F 5%,var(--surface,#fff));font-size:22px}
.xa-shot b{font-size:16px}.xa-shot span{font-size:12.5px;color:var(--muted)}
.xa-photos{display:flex;flex-direction:column;gap:6px}
.xa-ph{display:flex;align-items:center;gap:10px;padding:6px;border:1px solid var(--line);border-left:5px solid var(--green);border-radius:10px;font-size:13.5px}
.xa-ph.warn{border-left-color:var(--amber);background:var(--amber-bg)}
.xa-ph img{width:56px;height:56px;object-fit:cover;border-radius:8px;flex:none}
.xa-ph span{flex:1;min-width:0}.xa-ph small{color:var(--amber)}
.xa-ph button{border:0;background:transparent;font-size:20px;cursor:pointer;color:var(--muted);padding:4px 8px}
.xa-form{display:flex;flex-direction:column;gap:8px}.xa-form input,.xa-form select{width:100%}
.xa-form input[data-k=km]{font-size:22px;font-weight:700}
.xa-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.xa-chk{display:flex;align-items:center;gap:8px;font-size:14px}
.xa-bad{color:var(--red);font-weight:600}
.kz-rep{margin:0 0 8px auto;display:flex;width:max-content}
.kz-chips{display:flex;flex-wrap:wrap;gap:3px;margin-top:3px}
.kz-chips i{font-style:normal;font-size:10.5px;font-weight:700;padding:1px 5px;border-radius:5px}
.kz-chips i.ok{background:var(--green-bg);color:var(--green)}.kz-chips i.no{background:var(--red-bg);color:var(--red)}
.kz-board{padding:0 0 6px}
.d5-money.r5{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin-bottom:12px}
.d5-money.r5 a{background:var(--surface,#fff);border:1px solid var(--line);border-top:4px solid #4A5260}
.d5-money.r5 a.ok{border-top-color:#1E7445}.d5-money.r5 a.bad{border-top-color:#BE202F}.d5-money.r5 a.warn{border-top-color:#C77700}
.d5-money a.warn b{color:#C77700}
.section-head .kz-rep{margin:0 0 0 auto}
.toolbar .kz-rep{margin:0 0 0 auto}
/* v2.0.45 — QUY CHUẨN 5S cho mọi ô số (.card) trên các trang: viền màu trên, số to, chú thích 1 dòng */
.cards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.card { padding: 10px 12px; border-top: 4px solid #4A5260; border-radius: 12px; }
.card.red { border-top-color: #BE202F; background: color-mix(in srgb, #BE202F 6%, var(--surface)); }
.card.amber { border-top-color: #C77700; background: color-mix(in srgb, #d9a21b 8%, var(--surface)); }
.card.green, .card.ok { border-top-color: #1E7445; }
.card .k { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .v { font-size: 24px; margin-top: 2px; }
.card .n { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .card .v { font-size: 19px; } }
/* v2.0.46 — kiểm kê */
.kk-zones{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 10px}
.kk-z{display:flex;flex-direction:column;align-items:center;min-width:58px;padding:6px 8px;border-radius:10px;border:1px solid var(--line);border-top:4px solid #8a8f96;background:var(--surface,#fff);cursor:pointer;font:inherit;color:inherit}
.kk-z b{font-size:18px}.kk-z small{font-size:11px;color:var(--muted)}
.kk-z.red{border-top-color:#BE202F}.kk-z.amber{border-top-color:#C77700}.kk-z.green{border-top-color:#1E7445}
.kk-z.on{outline:2px solid #BE202F;outline-offset:1px}
.kk-hint{font-size:13px;color:var(--muted);margin:10px 0 6px}
.kk-rows{display:flex;flex-direction:column;gap:6px}
.kk-row{display:grid;grid-template-columns:70px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-left:5px solid #2A5A8C;border-radius:10px;background:var(--surface,#fff)}
.kk-row.kk-again{border-left-color:#BE202F;background:color-mix(in srgb,#BE202F 7%,var(--surface,#fff))}
.kk-bin{font:700 13px var(--mono,ui-monospace);color:#2A5A8C}
.kk-name{min-width:0}.kk-name b{display:block;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kk-name small{color:var(--muted);font-size:12px}
.kk-in{display:flex;align-items:center;gap:6px}
.kk-in input{width:84px;text-align:right;font-size:17px;font-weight:700;padding:6px 8px}
.kk-in .kk-r2{border-color:#BE202F}
.kk-det{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
@media (max-width:640px){.kk-row{grid-template-columns:52px minmax(0,1fr)}.kk-in{grid-column:1/-1;justify-content:flex-end}}
/* v2.0.47 tải hồ sơ có sẵn */
.hi-pick{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:14px;border:2px dashed var(--line);border-radius:12px;margin-bottom:10px}
.hi-pick.over{border-color:var(--brand);background:var(--brand-soft,#f7e3e5)}
.hi-pick label.btn{cursor:pointer}
.hi-chips{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 6px}
.hi-chip{display:inline-flex;gap:6px;align-items:center;border-left:5px solid var(--c);background:var(--raise,#f6f4f1);padding:4px 10px;border-radius:8px;font-size:13px}
.hi-chip b{color:var(--c);font-size:15px}
.hi-stat{font-size:13px;margin-bottom:8px}
.hi-table{max-height:52vh;overflow:auto;border:1px solid var(--line);border-radius:10px}
.hi-table input[type=text]{width:100%;min-width:220px}.hi-table select{min-width:150px;max-width:210px}.hi-table td.hi-dr select{min-width:175px}
.hi-table td.hi-dr{border-left:5px solid var(--c)}
.hi-table tr.hi-warn td{background:var(--amber-bg)}
.hi-table tr.hi-off td{opacity:.45}
.hi-table tr.hi-done td{opacity:.6;background:var(--green-bg,#e8f4ec)}
.hi-src{display:block;color:var(--muted);font-size:11px;max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* v2.0.47 đặt xe kiểu Grab */
.dx{display:flex;flex-direction:column;gap:10px}
.dx .field{margin:0}
.dx-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.dx-chip{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:6px 12px;font:inherit;font-size:13px;cursor:pointer;color:inherit}
.dx-chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
.dx-chips input[type=date]{width:auto}
.dx input#dx-dest{margin-top:6px;width:100%}
.dx-row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.dx-row .field{flex:1;min-width:110px}
.dx-step{display:flex;align-items:center;gap:10px;height:38px}
.dx-step button{width:38px;height:38px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-size:18px;cursor:pointer;color:inherit}
.dx-step b{min-width:18px;text-align:center;font-size:16px}
.dx-share{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:var(--blue-bg,#e3ebf4);border-left:4px solid #2A5A8C;border-radius:10px;padding:8px 10px;font-size:13.5px}
.dx-share .btn{margin-left:auto}
.dx-cars{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.dx-carb{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;border:2px solid var(--line);background:var(--surface);border-radius:12px;padding:9px 11px;cursor:pointer;font:inherit;color:inherit}
.dx-carb small{color:var(--muted);font-size:12px}.dx-carb em{font-style:normal;font-size:12px;color:var(--green,#1f7a46);font-weight:600}
.dx-carb.on{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft,#f7e3e5)}
.dx-carb.off{opacity:.55;cursor:not-allowed}.dx-carb.off em{color:var(--muted);font-weight:400}
.dx-carb.small em{color:var(--amber,#9a6b12)}
.dx-warn{background:var(--amber-bg);border-radius:10px;padding:8px 10px;font-size:13px;font-weight:600}
.dx-ok{background:var(--green-bg,#e3f1e8);color:var(--green,#1f7a46);border-radius:10px;padding:8px 10px;font-size:13px;font-weight:600}
.dx-car{display:flex;gap:10px;align-items:center;background:var(--raise,#f6f4f1);border-radius:12px;padding:10px}
.dx-car>div:nth-child(2){flex:1;min-width:0}.dx-car b{display:block}.dx-car small{color:var(--muted)}
.dx-ic{width:44px;height:44px;border-radius:10px;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:800}
.dx-plate{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;border:1px solid var(--line);border-radius:5px;padding:0 5px;background:var(--surface)}
.dx-steps{list-style:none;margin:0;padding:0;font-size:13.5px}
.dx-steps li{display:flex;gap:9px;align-items:center;padding:6px 0;border-bottom:1px dashed var(--line);color:var(--muted)}
.dx-steps li span{width:10px;height:10px;border-radius:50%;background:var(--line);flex:none}
.dx-steps li.ok{color:inherit}.dx-steps li.ok span{background:var(--green,#1f7a46)}
.dx-steps li.cur{color:inherit;font-weight:700}.dx-steps li.cur span{background:var(--brand);box-shadow:0 0 0 4px var(--brand-soft,#f7e3e5)}
.dx-big{display:flex;gap:8px}.dx-big div{flex:1;background:var(--raise,#f6f4f1);border-radius:10px;padding:8px;text-align:center}
.dx-big b{display:block;font-size:22px}.dx-big small{color:var(--muted);font-size:12px}
.dx-stars{display:flex;justify-content:center;gap:4px}
.dx-stars button{background:none;border:0;font-size:32px;line-height:1;cursor:pointer;color:var(--line)}
.dx-stars button.on{color:#e0a100}
.xb{margin-bottom:14px}
.xb-days{display:flex;gap:4px}.xb-days button{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:3px 10px;font:inherit;font-size:12.5px;cursor:pointer;color:inherit}
.xb-days button.on{background:var(--brand);color:#fff;border-color:var(--brand)}
.xb-wait{display:flex;flex-direction:column;gap:6px;margin:8px 0}
.xb-wait>div{display:flex;flex-wrap:wrap;gap:6px;align-items:center;background:var(--amber-bg);border-radius:8px;padding:6px 8px;font-size:13px}
.xb-acts{margin-left:auto;display:flex;gap:6px}
.xb-scroll{overflow-x:auto}.xb-tl{min-width:640px}
.xb-hd,.xb-ln{display:grid;grid-template-columns:150px 1fr;align-items:center}
.xb-hd>div{display:grid;grid-template-columns:repeat(14,1fr);font-size:11px;color:var(--muted)}.xb-hd i{font-style:normal}
.xb-ln{border-top:1px solid var(--line);padding:7px 0}
.xb-nm b{display:block;font-size:13.5px}.xb-nm small{color:var(--muted);font-size:11.5px}
.xb-track{position:relative;height:30px;border-radius:6px;background:repeating-linear-gradient(90deg,var(--raise,#f6f4f1) 0 calc(100%/14 - 1px),var(--line) calc(100%/14 - 1px) calc(100%/14))}
.xb-bk{position:absolute;top:3px;bottom:3px;border-radius:7px;font-size:11.5px;color:#fff!important;padding:0 7px;display:flex;align-items:center;white-space:nowrap;overflow:hidden;font-weight:600;text-decoration:none!important}
.xb-bk.book,.xb-lg .book::before{background:#9a6b12}.xb-bk.wait,.xb-lg .wait::before{background:repeating-linear-gradient(45deg,#c99a2e 0 6px,#b38420 6px 12px)}
.xb-bk.go,.xb-lg .go::before{background:var(--brand)}.xb-bk.done,.xb-lg .done::before{background:#1f7a46}.xb-bk.bad,.xb-lg .bad::before{background:#7a1520}
.xb-bk.off{background:var(--muted);z-index:0}
.xb-bk.late{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--brand);animation:xbp 1.6s ease-in-out infinite}
@keyframes xbp{50%{opacity:.7}}
@media (prefers-reduced-motion:reduce){.xb-bk.late{animation:none}}
.xb-now{position:absolute;top:-4px;bottom:-4px;width:2px;background:var(--fg,#1f1d1b);z-index:2}
.xb-lg{display:flex;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:8px}
.xb-lg span::before{content:"";display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:4px;vertical-align:-1px}
/* v2.0.47 lịch xe */
.lx-now{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin-bottom:14px}
.lx-car{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.lx-band{display:flex;flex-direction:column;gap:1px;padding:9px 12px;color:#fff;background:#1f7a46}
.lx-band span{font-size:12px;opacity:.9}
.lx-car.go .lx-band{background:var(--brand)}.lx-car.lock .lx-band{background:#6C6E72}
.lx-body{padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.lx-body small{color:var(--muted);font-size:12.5px}
.lx-st{font-weight:800;font-size:17px;color:#1f7a46}
.lx-car.go .lx-st{color:var(--brand)}.lx-car.lock .lx-st{color:var(--muted)}
.lx-plan{margin-top:2px}
.lx-day+.lx-day{margin-top:10px}
.lx-dh{font-weight:700;font-size:13.5px;padding:6px 0;border-bottom:2px solid var(--line)}
.lx-row{display:grid;grid-template-columns:96px 140px 1fr auto;gap:10px;align-items:center;padding:7px 4px;border-bottom:1px dashed var(--line);color:inherit;text-decoration:none!important;font-size:13.5px}
.lx-row:hover{background:var(--raise,#f6f4f1)}
.lx-row.mine{background:var(--brand-soft,#f7e3e5)}
.lx-t{font-variant-numeric:tabular-nums;font-weight:600}
.lx-c{font-weight:600}
@media (max-width:640px){.lx-row{grid-template-columns:72px 1fr auto;grid-template-areas:'t c s' 't w w';row-gap:2px}.lx-t{grid-area:t}.lx-c{grid-area:c}.lx-w{grid-area:w}.lx-row .chip{grid-area:s}.lx-now{grid-template-columns:1fr 1fr}}
.dx-cal{font-size:13px;font-weight:600;color:var(--brand)!important}
.lx-office{margin-top:18px;padding-top:12px;border-top:3px solid var(--line)}.lx-oacts{display:flex;gap:6px}
.gtabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px;padding-bottom:10px;border-bottom:1px solid var(--line)}.gtab{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:6px 14px;font-size:13.5px;font-weight:600;color:inherit!important;text-decoration:none!important;white-space:nowrap}.gtab.on{background:var(--brand);border-color:var(--brand);color:#fff!important}@media (max-width:640px){.gtabs{flex-wrap:nowrap;overflow-x:auto}}
.d5-mine{display:block;color:inherit!important;text-decoration:none!important}.d5-mine:hover{border-color:var(--brand)}

/* v2.0.50 Tủ hồ sơ 3D */
.cab-room { display: flex; flex-wrap: wrap; gap: 26px 22px; justify-content: center; padding: 18px 8px 26px; perspective: 1400px; background: linear-gradient(#f3f1ee, #e4e0da 78%, #d6d1c9 78%); border-radius: 14px; margin-bottom: 14px; }
.cab { position: relative; width: 210px; transform: rotateY(-14deg) rotateX(4deg); transform-style: preserve-3d; transition: transform .3s; }
.cab:hover { transform: rotateY(-6deg) rotateX(3deg); }
.cab-top { position: relative; background: linear-gradient(#55585d, #3a3d42); color: #fff; font-weight: 800; letter-spacing: .08em; text-align: center; padding: 6px 0; border-radius: 6px 6px 0 0; font-size: 13px; }
.cab-top::after { content: ''; position: absolute; left: 6px; right: -12px; top: -10px; height: 10px; background: #6c6e72; transform: skewX(-50deg); transform-origin: bottom; border-radius: 3px 3px 0 0; }
.cab-body { position: relative; background: #4a4d52; padding: 6px; display: flex; flex-direction: column; gap: 6px; transform-style: preserve-3d; box-shadow: 14px 10px 22px rgba(0,0,0,.28); }
.cab-body::after { content: ''; position: absolute; top: 0; right: -14px; width: 14px; height: 100%; background: linear-gradient(90deg, #2e3034, #3c3f44); transform: skewY(-35deg); transform-origin: left; }
.cab-feet { height: 8px; margin: 0 10px; background: repeating-linear-gradient(90deg, #2e3034 0 14px, transparent 14px calc(100% - 14px), #2e3034 calc(100% - 14px)); }
.cab-dr { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 8px;
  min-height: calc(var(--h) * 62px + (var(--h) - 1) * 6px); padding: 8px 10px 8px 14px; border-radius: 4px; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 88%, #fff) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 78%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.25), 0 2px 0 rgba(0,0,0,.35); transition: transform .25s, box-shadow .25s; transform: translateZ(0); }
.cab-dr:hover { transform: translateZ(10px) translateY(-1px); }
.cab-dr.on { transform: translateZ(26px) translateY(3px); box-shadow: 0 14px 22px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.35); z-index: 2; outline: 3px solid #fff; }
.cab-dr:focus-visible { outline: 3px solid #fff; }
.cab-no { grid-row: 1 / 3; font: 800 12px var(--mono, monospace); background: rgba(0,0,0,.25); border-radius: 4px; padding: 3px 6px; }
.cab-nm { font-weight: 700; font-size: 13px; line-height: 1.2; }
.cab-n { grid-row: 1 / 3; grid-column: 3; font-size: 20px; font-weight: 800; }
.cab-hd { grid-column: 2; width: 46px; height: 7px; border-radius: 4px; background: linear-gradient(#e9eaec, #9a9ca0); box-shadow: 0 1px 1px rgba(0,0,0,.4); }
.cab-al { grid-column: 1 / 4; display: flex; flex-wrap: wrap; gap: 4px; }
.cab-al i { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #fff; }
.cab-al i.r { color: #BE202F; } .cab-al i.a { color: #9A6A0C; }
@media (max-width: 560px) { .cab { width: calc(50% - 16px); transform: none; } .cab:hover { transform: none; } .cab-room { gap: 16px 10px; } .cab-nm { font-size: 12px; } .cab-hd { display: none; } }

/* v2.0.50 Sơ đồ quản lý */
.og-tree { padding: 6px 0 12px; }
.og-top { display: flex; justify-content: center; }
.og-box { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 10px 12px; border-radius: 10px; background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-top: 6px solid var(--c); box-shadow: 0 2px 6px rgba(0,0,0,.06); text-align: center; }
.og-box:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.1); }
.og-box.lead { background: var(--c); color: #fff; border: 0; min-width: 260px; } .og-box.lead small { opacity: .9; }
.og-box small { font-size: 12px; color: inherit; } .og-cnt { font-size: 12px; color: var(--muted, #6c655e); }
.og-line { width: 2px; height: 16px; background: var(--line, #ccc); margin: 0 auto; }
.og-row { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 16px; border-top: 2px solid var(--line, #ccc); }
.og-blk { border-left: 6px solid var(--c); scroll-margin-top: 70px; }
.og-bh { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 4px 2px 8px; } .og-bh b:first-child { color: var(--c); font-size: 15px; }
.og-sep td { background: var(--raise, #f6f4f1); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #6c655e); }
.og-lv0 .og-name, .og-lv1 .og-name { padding-left: 0; } .og-lv2 .og-name { padding-left: 14px; } .og-lv3 .og-name { padding-left: 28px; } .og-lv4 .og-name { padding-left: 42px; }
.og-name { display: inline-block; }
.og-nl { font-size: 10.5px; padding: 0 6px; border-radius: 8px; background: var(--raise, #eee); color: var(--muted, #666); border: 1px solid var(--line, #ddd); }
@media (max-width: 560px) { .og-box { min-width: calc(50% - 6px); } .og-box.lead { min-width: 100%; } }
.d2-list { overflow-x: auto; }

/* v2.0.51 Đi xe: quét QR VETC → chụp đồng hồ */
.xq-steps { display: flex; gap: 6px; margin-bottom: 10px; } .xq-steps span { flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px; background: var(--raise, #f2f0ec); font-size: 12.5px; font-weight: 700; color: var(--muted, #6c655e); }
.xq-steps span.on { background: #BE202F; color: #fff; } .xq-steps span.ok { background: #E2F2E8; color: #1E7445; }
.xq-cam { position: relative; aspect-ratio: 4 / 3; background: #111; border-radius: 12px; overflow: hidden; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
.xq-cam video { width: 100%; height: 100%; object-fit: cover; } .xq-cam.off video { display: none; } .xq-cam.off .xq-frame { display: none; }
.xq-frame { position: absolute; inset: 18% 22%; border: 3px solid #fff; border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.xq-cam small { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: #fff; font-size: 12.5px; }
.xq-err { background: #FBE5E7; color: #BE202F; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.xq-pick { display: flex; flex-direction: column; gap: 8px; } .xq-cars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .xq-cars .btn { justify-content: center; min-height: 48px; flex-direction: column; white-space: normal; min-width: 0; text-align: center; }
.xq-car { background: #1f1d1b; color: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; } .xq-car b { font-size: 16px; }
.xq-km { color: #1E7445; } .lx-vetc { margin: 4px 0; }
/* v2.0.53 Tin VETC */
.lx-vt { margin-top: 14px; } .vt-set { margin: 8px 0 12px; background: var(--raise, #f6f4f1); border-radius: 10px; padding: 8px 12px; } .vt-set summary { cursor: pointer; font-weight: 700; }
.vt-steps { margin: 8px 0; padding-left: 20px; font-size: 13.5px; } .vt-steps li { margin: 3px 0; }
.vt-kv { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; align-items: center; margin: 6px 0; } .vt-kv code { font-family: var(--mono, monospace); font-size: 12px; background: #fff; border: 1px solid var(--line, #ddd); border-radius: 6px; padding: 6px 8px; word-break: break-all; }
.vt-fees { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 10px; } .vt-fees span { background: var(--raise, #f2f0ec); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
@media (max-width: 560px) { .vt-kv { grid-template-columns: 1fr auto; } .vt-kv span { grid-column: 1 / 3; font-size: 12px; } }
.xq-chon { display: grid; gap: 10px; } .xq-opt { all: unset; box-sizing: border-box; cursor: pointer; display: grid; width: 100%; min-width: 0; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 14px; border-radius: 12px; border: 2px solid var(--line, #e2ddd6); background: var(--surface, #fff); }
.xq-opt:first-child { border-color: #BE202F; } .xq-opt i { grid-row: 1 / 3; font-style: normal; font-size: 30px; text-align: center; } .xq-opt b { font-size: 16px; } .xq-opt span { font-size: 12.5px; color: var(--muted, #6c655e); white-space: normal; } .xq-chon { min-width: 0; }
.xq-opt:hover, .xq-opt:focus-visible { border-color: #BE202F; background: var(--raise, #f6f4f1); }
.vt-tbl { overflow-x: auto; max-width: 100%; } .vt-tbl td { white-space: nowrap; }
.cab-al i.t { color: #2A5A8C; }
.hs-tasks { background: var(--raise, #f6f4f1); border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.hs-th { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; } .hs-th .btn { margin-left: auto; }
.hs-task { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; text-decoration: none; color: inherit; background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-radius: 8px; padding: 6px 10px; }
.hs-task.late { border-color: #BE202F; }
/* v2.0.56 Pháp lý */
.pl-ask label { display: block; margin-bottom: 6px; } .pl-row { display: flex; gap: 8px; align-items: stretch; } .pl-row textarea { flex: 1; min-width: 0; }
.pl-ans { margin-top: 10px; background: var(--raise, #f6f4f1); border-radius: 10px; padding: 10px 12px; line-height: 1.55; display: flex; flex-direction: column; gap: 8px; }
.pl-src { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; } .pl-src a { color: #BE202F; word-break: break-word; }
.pl-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pl-it { background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-top: 5px solid var(--c); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pl-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .pl-no { font-family: var(--mono, monospace); font-size: 12.5px; }
.pl-tag { font-size: 11px; font-weight: 700; color: #fff; background: var(--c); border-radius: 10px; padding: 1px 8px; }
.pl-ten { font-weight: 700; } .pl-viec { background: #FBE5E7; color: #BE202F; border-radius: 6px; padding: 4px 8px; font-size: 13px; font-weight: 600; }
@media (max-width: 560px) { .pl-row { flex-direction: column; } }
/* v2.0.57 Chấm công + Bảng lương */
.cc-mon { display: flex; align-items: center; gap: 8px; }
.cc-today { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-left: 6px solid #BE202F; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.cc-today.done { border-left-color: #1E7445; }
.cc-tbox { display: flex; flex-direction: column; min-width: 70px; } .cc-tbox small { color: var(--muted, #6c655e); font-size: 12px; } .cc-tbox b { font-size: 24px; font-variant-numeric: tabular-nums; }
.cc-big { margin-left: auto; font-size: 17px; min-height: 52px; padding: 0 22px; } .cc-ok { margin-left: auto; color: #1E7445; font-weight: 800; }
.cc-flag { width: 100%; background: #FBF0D9; color: #7a5410; border-radius: 8px; padding: 6px 10px; font-size: 13px; margin: 4px 0; }
.cc-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 4px; }
.cc-d { display: flex; flex-direction: column; align-items: center; border-radius: 8px; padding: 4px 0; background: var(--raise, #f6f4f1); font-size: 12px; }
.cc-d small { font-size: 10px; color: var(--muted, #6c655e); } .cc-d i { font-style: normal; font-weight: 800; min-height: 15px; } .cc-d.sun { opacity: .55; }
.cc-d.ok, .cc-c.ok { background: #E2F2E8; color: #1E7445; } .cc-d.late, .cc-c.late { background: #FBF0D9; color: #9a6b12; } .cc-d.half, .cc-c.half { background: #E6EEF7; color: #2A5A8C; }
.cc-d.leave, .cc-c.leave { background: #EFE8F7; color: #6A4AA0; } .cc-d.off, .cc-c.off { background: #FBE5E7; color: #BE202F; } .cc-d.trip, .cc-c.trip { background: #E0F2F1; color: #127A77; }
.cc-d.hol, .cc-c.hol { background: #ECECEC; color: #555; } .cc-d.miss, .cc-c.miss { background: #FFE9D6; color: #B8511A; }
.cc-slips { display: flex; flex-wrap: wrap; gap: 8px; } .cc-slip { all: unset; cursor: pointer; display: flex; flex-direction: column; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line, #e2ddd6); background: var(--raise, #f6f4f1); }
.cc-slip b { color: #1E7445; font-size: 16px; } .cc-slipbox { display: flex; flex-direction: column; gap: 4px; }
.cc-sl { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line, #e2ddd6); font-variant-numeric: tabular-nums; }
.cc-sl.sum { font-weight: 800; } .cc-sl.net { font-size: 18px; color: #1E7445; border-bottom: 0; padding-top: 8px; }
.cc-p { display: flex; flex-direction: column; gap: 10px; } .cc-img { width: 140px; border-radius: 10px; } .cc-pos { font-size: 13px; color: var(--muted, #6c655e); }
.cc-ph { display: flex; gap: 8px; } .cc-thumb { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }
.cc-pt { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cc-scroll { overflow-x: auto; max-width: 100%; }
.cc-grid { border-collapse: collapse; font-size: 12px; } .cc-grid th, .cc-grid td { border: 1px solid var(--line, #e2ddd6); padding: 3px 4px; text-align: center; min-width: 24px; }
.cc-grid th small { display: block; font-size: 9.5px; color: var(--muted, #6c655e); } .cc-grid th.sun, .cc-grid th.hol { background: var(--raise, #f2f0ec); }
.cc-grid .nm { text-align: left; min-width: 150px; position: sticky; left: 0; background: var(--surface, #fff); z-index: 1; } .cc-grid .nm small { display: block; color: var(--muted, #6c655e); font-size: 10.5px; }
.cc-c { cursor: pointer; font-weight: 800; } .cc-c:hover { outline: 2px solid #BE202F; } .cc-c.fl { box-shadow: inset 0 -3px 0 #BE202F; }
.cc-lg { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12px; } .cc-lg span { display: inline-flex; gap: 4px; align-items: center; background: none; } .cc-lg i { font-style: normal; font-weight: 800; padding: 0 5px; border-radius: 4px; }
.cc-lg .ok i { background: #E2F2E8; color: #1E7445; } .cc-lg .late i { background: #FBF0D9; color: #9a6b12; } .cc-lg .half i { background: #E6EEF7; color: #2A5A8C; } .cc-lg .leave i { background: #EFE8F7; color: #6A4AA0; } .cc-lg .off i { background: #FBE5E7; color: #BE202F; } .cc-lg .trip i { background: #E0F2F1; color: #127A77; } .cc-lg .hol i { background: #ECECEC; } .cc-lg .miss i { background: #FFE9D6; color: #B8511A; } .cc-lg .fl i { color: #BE202F; }
.cc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bl-t td.ed { text-decoration: underline dotted; } .bl-t tr:not(.static) { cursor: pointer; }
@media (max-width: 560px) { .cc-big { width: 100%; margin-left: 0; } }
.cc-c sup { font-size: 9px; color: #2A5A8C; margin-left: 1px; }
.cc-today-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.cc-tl { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line, #e2ddd6); border-left: 5px solid #1E7445; border-radius: 10px; padding: 8px; min-width: 0; }
.cc-tl.bad { border-left-color: #BE202F; background: #fdf3f4; } .cc-tl.late { border-left-color: #9a6b12; }
.cc-tl-ph img, .cc-tl-ph span { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; background: var(--raise, #f2f0ec); color: var(--muted, #6c655e); }
.cc-tl-tx { display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
.pv-scroll { overflow-x: auto; } .pv-t th.c { font-size: 11.5px; min-width: 86px; text-align: center; } .pv-t td.c { text-align: center; } .pv-t input { width: 20px; height: 20px; accent-color: #BE202F; }
/* v2.0.61 Phân quyền theo phòng */
.pq { display: flex; flex-direction: column; gap: 10px; background: var(--raise, #f6f4f1); border-radius: 12px; padding: 12px; }
.pq-step { display: flex; flex-direction: column; gap: 6px; } .pq-step > b { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #6c655e); }
.pq-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pq-pill { all: unset; cursor: pointer; padding: 7px 12px; border-radius: 20px; border: 2px solid var(--c); color: var(--c); font-weight: 700; font-size: 13.5px; background: var(--surface, #fff); }
.pq-pill.on { background: var(--c); color: #fff; } .pq-pill:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.pq-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pq-opt { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line, #e2ddd6); background: var(--surface, #fff); cursor: pointer; font-weight: 600; }
.pq-opt.on { border-color: #BE202F; box-shadow: inset 0 0 0 1px #BE202F; } .pq-opt small { display: block; font-weight: 400; color: var(--muted, #6c655e); font-size: 12px; }
.pq-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; } .pq-chk { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.pq-scope { font-size: 13.5px; color: var(--muted, #6c655e); }

/* v2.0.62 Chuẩn hóa hợp đồng cũ (Khu Tài chính) */
.cz-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 10px 0; }
.cz-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-steps span { border-left: 4px solid var(--c); background: #fff; border-radius: 8px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.cz-pct { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cz-pct b { font-size: 20px; color: #1E7445; } .cz-pct i { width: 120px; height: 8px; background: #E1E3E6; border-radius: 4px; overflow: hidden; }
.cz-pct u { display: block; height: 100%; background: linear-gradient(90deg, #127A77, #1E7445); } .cz-pct small { color: #6C6E72; }
.cz-f { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cz-f button { border: 1px solid #E1E3E6; background: #fff; border-radius: 20px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.cz-f button.on { background: #127A77; color: #fff; border-color: #127A77; }
.cz-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 8px; }
.cz-it { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid #E1E3E6; border-top: 4px solid var(--c); border-radius: 10px; padding: 8px 10px; color: inherit; text-decoration: none; min-width: 0; }
.cz-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cz-st { font-size: 12px; font-weight: 700; color: var(--c); } .cz-red { font-size: 12px; font-weight: 700; color: #BE202F; }
.cz-name { color: #6C6E72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-parts { display: flex; flex-wrap: wrap; gap: 4px; }
.cz-parts span { font-size: 11.5px; border: 1px solid #E1E3E6; border-radius: 12px; padding: 0 7px; color: #6C6E72; }
.cz-parts span.ok { background: var(--c); border-color: var(--c); color: #fff; } .cz-parts span.back { border-color: #BE202F; color: #BE202F; font-weight: 700; }
.cz-back { color: #BE202F; }
.cz-flags { display: flex; flex-wrap: wrap; gap: 4px; } .cz-flags span { font-size: 11.5px; background: #FBF0D9; color: #9A6B12; border-radius: 6px; padding: 0 6px; }
.cz-parts span.cz-nc { border-style: dashed; color: #B8511A; }

/* v2.0.64 Giao đội · chỉ huy */
.gc-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.gc-f { border: 1px solid #E1E3E6; background: #fff; border-radius: 20px; padding: 5px 14px; font: inherit; font-size: 13px; cursor: pointer; } .gc-f.on { background: #1E7445; border-color: #1E7445; color: #fff; }
.gc-bar input { flex: 1; min-width: 160px; height: 36px; border: 1px solid #E1E3E6; border-radius: 8px; padding: 0 10px; font: inherit; }
.gc-list { display: grid; gap: 8px; }
.gc-it { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.2fr); gap: 10px; align-items: center; background: #fff; border: 1px solid #E1E3E6; border-left: 6px solid #BE202F; border-radius: 10px; padding: 8px 12px; }
.gc-it.ok { border-left-color: #1E7445; }
.gc-name { min-width: 0; } .gc-name a { color: inherit; text-decoration: none; } .gc-name small { display: block; color: #6C6E72; font-size: 12px; }
.gc-it label { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .gc-it label span { font-size: 11.5px; color: #6C6E72; font-weight: 600; }
.gc-it input, .gc-it select { height: 38px; border: 1px solid #E1E3E6; border-radius: 8px; padding: 0 8px; font: inherit; width: 100%; min-width: 0; background: #fff; }
.gc-pick { display: grid; gap: 6px; } .gc-pick a { display: block; padding: 10px 12px; border: 1px solid #E1E3E6; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 600; } .gc-pick a.mine { border-color: #1E7445; background: #e2f2e8; }
@media (max-width: 700px) { .gc-it { grid-template-columns: 1fr; } }

/* v2.0.65 Cài Kods lên màn hình chính */
.cai-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; gap: 10px; align-items: center; background: #fff; border-top: 3px solid #BE202F; box-shadow: 0 -6px 20px rgba(0,0,0,.12); padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.cai-ic { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.cai-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; } .cai-txt b { display: inline; } .cai-txt > b:first-child { display: block; } .cai-txt small { display: block; color: #6C6E72; font-size: 12.5px; }
.cai-btns { display: flex; flex-direction: column; gap: 4px; flex: none; }
@media (max-width: 820px) { .cai-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; } }

/* v2.0.66 Phần mềm tự ghi việc ngày */
.ba .section-body { display: grid; gap: 6px; }
.ba-row { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 10px; padding: 8px 10px; border: 1px solid #E1E3E6; border-left: 4px solid #1E7445; border-radius: 10px; background: #fff; }
.ba-row.flag { border-left-color: #C2410C; }
.ba-who b { display: block; } .ba-who small { color: #6C6E72; }
.ba-what { display: flex; flex-wrap: wrap; gap: 4px 6px; min-width: 0; } .ba-what span { font-size: 13px; background: #F3F4F6; border-radius: 6px; padding: 1px 7px; }
.ba-what .ba-self { background: #FBF0D9; color: #7a5a12; } .ba-what .ba-flag { background: #FDEEE4; color: #9A3412; font-weight: 600; }
.ba-team summary { cursor: pointer; padding: 6px 0; } .ba-team { display: grid; gap: 6px; } .ba-depts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
@media (max-width: 600px) { .ba-row { grid-template-columns: 1fr; } }

/* v2.0.67 chấm công công trình */
.cc-pos.ok { color: var(--ok, #1f7a46); } .cc-pos.warn { color: var(--warn, #9a6b12); }
.cc-set { display: flex; gap: 6px; flex-wrap: wrap; } .cc-set select { flex: 1; min-width: 140px; }
.cc-row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.cc-kt { background: var(--brand-soft, #f7e3e5); border: 1px solid var(--brand, #BE202F); border-radius: 10px; padding: 10px 12px; margin: 10px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cc-acts small { align-self: center; color: var(--muted, #6c655e); }
.cc-st { font-size: 12px; padding: 1px 7px; border-radius: 9px; background: var(--raise, #f6f4f1); border: 1px solid var(--line, #e2ddd6); }
.cc-st.ok { color: var(--ok, #1f7a46); } .cc-st.no { color: var(--brand, #BE202F); }
.cc-dy { margin-top: 10px; } .cc-dyg { padding: 6px 12px 10px; } .cc-dyg > small { display: block; color: var(--muted, #6c655e); margin: 4px 0; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.cc-dyr { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line, #e2ddd6); align-items: flex-start; }
.cc-dyr.flag { background: linear-gradient(90deg, var(--brand-soft, #f7e3e5), transparent); }
.cc-yn { display: flex; gap: 4px; flex-shrink: 0; } .cc-red { color: var(--brand, #BE202F); }
.cc-ph { display: flex; gap: 6px; margin-top: 4px; } .cc-ph img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cc-wifi { border-top: 1px solid var(--line, #e2ddd6); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }

/* v2.0.68 chủ số tài chính */
.tc-chu { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0; font-size: 13px; } .tc-chu span { background: var(--raise, #f6f4f1); border: 1px solid var(--line, #e2ddd6); border-radius: 9px; padding: 2px 8px; }
.tc-who { font-style: normal; font-size: 11px; margin-left: 6px; color: var(--muted, #6c655e); }
.pq-more { border: 1px dashed var(--line, #e2ddd6); background: transparent; color: var(--muted, #6c655e); border-radius: 9px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.pq-tags { display: flex; flex-wrap: wrap; gap: 6px; } .pq-tags span { font-size: 12.5px; background: var(--raise, #f6f4f1); border: 1px solid var(--line, #e2ddd6); border-radius: 9px; padding: 2px 8px; color: var(--ok, #1f7a46); }
.tc-lock { font-size: 12.5px; color: var(--muted, #6c655e); margin: 4px 0 6px; }
.tc-note { font-size: 12.5px; color: var(--muted, #6c655e); margin: 4px 0 6px; }
.tc-table tr.tc-adv td { background: rgba(42,90,140,.10); }
.tc-table tr.tc-old td { background: rgba(184,81,26,.12); }

/* v2.0.68 Tài chính · tổng quan 5S · Kaizen */
.tq { display: flex; flex-direction: column; gap: 12px; }
.tq-hello { font-size: 17px; font-weight: 700; }
.tq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tq-grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tq-box { background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tq-h { display: flex; align-items: center; gap: 8px; }
.tq-s { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #fff; background: #BE202F; border-radius: 6px; padding: 2px 7px; }
.tq-pages { display: flex; flex-wrap: wrap; gap: 8px; }
.tq-page { border: 0; border-top: 4px solid var(--c); background: var(--raise, #f6f4f1); border-radius: 10px; padding: 8px 12px; text-align: left; cursor: pointer; font: inherit; color: inherit; min-width: 96px; }
.tq-page b { display: block; font-size: 22px; line-height: 1.1; } .tq-page small { color: var(--muted, #6c655e); }
.tq-nums { display: flex; gap: 10px; } .tq-nums span { display: flex; align-items: baseline; gap: 4px; color: var(--muted, #6c655e); }
.tq-nums b { font-size: 26px; } .tq-nums .r b { color: #BE202F; } .tq-nums .y b { color: #9a6b12; }
.tq-item { text-align: left; border: 0; border-left: 3px solid #9a6b12; background: var(--raise, #f6f4f1); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 12.5px; color: inherit; cursor: pointer; }
.tq-item.do { border-left-color: #BE202F; }
.tq-k { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.tq-spark { display: inline-flex; align-items: flex-end; gap: 3px; height: 36px; }
.tq-spark i { width: 9px; background: #c9c3bb; border-radius: 3px 3px 0 0; } .tq-spark i.now { background: #BE202F; }
.tq-delta { font-size: 12.5px; font-weight: 600; color: var(--muted, #6c655e); } .tq-delta.up { color: #1f7a46; } .tq-delta.down { color: #BE202F; }
.tq-lich { font-weight: 600; }
.tq-week { display: flex; flex-wrap: wrap; gap: 6px; } .tq-week span { font-size: 12px; background: var(--raise, #f6f4f1); border-radius: 8px; padding: 2px 8px; color: var(--muted, #6c655e); } .tq-week b { color: var(--fg, #1f1d1b); }
.tq-team { display: flex; flex-direction: column; gap: 8px; }
.tq-mem { display: grid; grid-template-columns: minmax(150px, 1.3fr) 90px 90px minmax(200px, 2fr); gap: 10px; align-items: center; background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-left: 5px solid #1f7a46; border-radius: 12px; padding: 10px 12px; }
.tq-mem.warn { border-left-color: #9a6b12; } .tq-mem.bad { border-left-color: #BE202F; }
.tq-who b { display: block; } .tq-who small, .tq-c small { color: var(--muted, #6c655e); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.tq-c b { display: block; font-size: 20px; line-height: 1.1; } .tq-c span { font-size: 12px; color: var(--muted, #6c655e); }
@media (max-width: 720px) { .tq-mem { grid-template-columns: 1fr 1fr; } .tq-who, .tq-c.wide { grid-column: 1 / -1; } }
.pq-luong { margin-top: 8px; } .pq-luong small { color: var(--muted, #6c655e); }

/* v2.0.68 nút trợ lý AI nổi */
#ai-fab { position: fixed; right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: 6px; background: #1f1d1b; color: #fff; border-radius: 999px; padding: 9px 14px 9px 11px; font-size: 18px; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
#ai-fab span { font-size: 13px; } #ai-fab:hover { background: #BE202F; }
@media (max-width: 760px) { #ai-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 10px; } #ai-fab span { display: none; } }
.ai-ph #ai-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; margin-bottom: 10px; }
.ai-m { background: var(--raise, #f6f4f1); border-radius: 12px; padding: 8px 12px; white-space: pre-wrap; max-width: 92%; } .ai-m.me { align-self: flex-end; background: var(--brand-soft, #f7e3e5); }
.ai-m b { font-size: 12px; color: var(--muted, #6c655e); display: block; }
.ai-samples { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } .ai-row { display: flex; gap: 8px; } .ai-row input { flex: 1; min-width: 0; }

/* v2.0.68 Tiến độ sản xuất · 5S Kaizen */
.px-tq { padding: 10px 0; }
.px-flags { display: flex; flex-wrap: wrap; gap: 8px; }
.px-flag { border: 0; border-left: 4px solid #9a6b12; background: var(--raise, #f6f4f1); border-radius: 10px; padding: 8px 12px; font: inherit; color: inherit; cursor: pointer; display: flex; align-items: baseline; gap: 6px; }
.px-flag b { font-size: 20px; } .px-flag.do { border-left-color: #BE202F; } .px-flag.do b { color: #BE202F; }
.px-lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .px-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .px-lanes { grid-template-columns: 1fr; } }
.px-lane { background: var(--raise, #f6f4f1); border-radius: 12px; border-top: 5px solid var(--c); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.px-lh { font-weight: 800; display: flex; justify-content: space-between; color: var(--c); } .px-lh span { background: var(--c); color: #fff; border-radius: 9px; padding: 0 8px; font-size: 12px; }
.px-card { background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-radius: 10px; padding: 8px 10px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; }
.px-card.late { border-color: #BE202F; box-shadow: inset 3px 0 0 #BE202F; } .px-card b { font-size: 13px; line-height: 1.3; } .px-card small { color: var(--muted, #6c655e); font-size: 12px; }
.px-bar { height: 6px; background: var(--line, #e2ddd6); border-radius: 3px; overflow: hidden; } .px-bar i { display: block; height: 100%; background: linear-gradient(90deg, #BE202F, #e0574f); }
.px-lead { display: flex; flex-direction: column; padding: 6px 0; border-top: 1px solid var(--line, #e2ddd6); } .px-lead:first-of-type { border-top: 0; } .px-lead span { font-size: 12.5px; color: var(--muted, #6c655e); } .px-lead em { font-style: normal; font-weight: 700; }
.px-ship { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; } .px-ship b { min-width: 74px; }
.px-kz { display: flex; align-items: flex-end; gap: 6px; height: 82px; } .px-kz div { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; } .px-kz i { width: 100%; max-width: 22px; background: #c9c3bb; border-radius: 3px 3px 0 0; } .px-kz i.now { background: #BE202F; } .px-kz small { font-size: 10px; color: var(--muted, #6c655e); }
.toolbar .btn-group .btn.dark { background: #1f1d1b !important; border-color: #1f1d1b !important; color: #fff !important; }

/* v2.0.69 Công nợ theo năm · cần đòi */
.nn { display: flex; flex-direction: column; gap: 12px; }
.nn-years { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; align-items: start; }
.nn-year { text-align: left; border: 1px solid var(--line, #e2ddd6); border-top: 5px solid #BE202F; background: var(--surface, #fff); border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.nn-year.unk { border-top-color: #9a6b12; } .nn-year.on { box-shadow: 0 0 0 2px #BE202F; }
.nn-yh { display: flex; justify-content: space-between; align-items: baseline; } .nn-yh b { font-size: 18px; } .nn-yh span { color: var(--muted, #6c655e); }
.nn-yg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; } .nn-yg span { display: flex; flex-direction: column; } .nn-yg small { color: var(--muted, #6c655e); font-size: 11px; } .nn-yg .red b { color: #BE202F; }
.nn-yf { font-size: 12.5px; color: var(--muted, #6c655e); } .nn-yf em { font-style: normal; color: #BE202F; font-weight: 700; }
.nn-warn { background: #fbf0d9; color: #7a5410; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.nn-chase { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.nn-c { background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-left: 4px solid #9a6b12; border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nn-c.due { border-left-color: #BE202F; } .nn-c.bad { border-left-color: #1f1d1b; }
.nn-ch { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .nn-cn { font-weight: 600; }
.nn-cm { display: flex; gap: 12px; font-size: 13px; } .nn-cm .red, td.red { color: #BE202F; }
.nn-tag { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; color: #fff; background: #9a6b12; } .nn-tag.due { background: #BE202F; } .nn-tag.bad { background: #1f1d1b; }
.nn-all summary { cursor: pointer; font-weight: 600; padding: 6px 0; } tr.nn-hl td { background: #fdf3f3; }
/* v2.0.73 trợ lý trong màn đang xem */
button#ai-fab { border: 0; cursor: pointer; }
.ai-dock { position: fixed; right: 16px; bottom: 16px; z-index: 70; width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--surface, #fff); border: 1px solid var(--line, #e2ddd6); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.25); overflow: hidden; }
.ai-dock[hidden] { display: none; }
.ad-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #1f1d1b; color: #fff; }
.ad-head .ad-where { flex: 1; min-width: 0; font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-close { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; min-width: 36px; min-height: 36px; }
.ad-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ad-hello { color: var(--muted, #6c655e); font-size: 13.5px; line-height: 1.5; }
.ad-m { background: var(--raise, #f6f4f1); border-radius: 12px; padding: 8px 12px; max-width: 92%; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ad-m.me { align-self: flex-end; background: var(--brand-soft, #f7e3e5); }
.ad-m small { display: block; font-size: 11px; color: var(--muted, #6c655e); }
.ad-m img { max-width: 100%; max-height: 160px; border-radius: 8px; display: block; margin-bottom: 4px; }
.ad-samples { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.ad-img { position: relative; padding: 0 12px 8px; } .ad-img img { max-height: 90px; border-radius: 8px; border: 1px solid var(--line, #e2ddd6); }
.ad-img .ad-x { position: absolute; top: -6px; left: 8px; border: 0; border-radius: 50%; width: 24px; height: 24px; background: #1f1d1b; color: #fff; cursor: pointer; }
.ad-row { display: flex; gap: 6px; padding: 8px 12px 12px; border-top: 1px solid var(--line, #e2ddd6); align-items: flex-end; }
.ad-row textarea { flex: 1; min-width: 0; resize: none; min-height: 40px; max-height: 120px; padding: 9px 10px; border: 1px solid var(--line, #e2ddd6); border-radius: 10px; font: inherit; }
.ad-cam { min-width: 44px; min-height: 40px; justify-content: center; font-size: 18px; cursor: pointer; }
@media (max-width: 760px) { .ai-dock { left: 0; right: 0; bottom: 0; width: 100%; height: 78vh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); } }
/* v2.0.76 định mức: giấy kiểm định PCCC · đơn giá có hiệu lực · ban hành */
.cost-pccc { margin-bottom: 12px; padding: 9px 14px; border-radius: 10px; font-size: 13.5px; border: 1px solid var(--line); border-left: 5px solid var(--grey, #6C6E72); background: var(--surface); }
.cost-pccc.bad { border-left-color: #BE202F; background: #fbeeee; } .cost-pccc.ok { border-left-color: #1f7a46; color: #1f7a46; } .cost-pccc.none { color: var(--muted); }
.cost-pccc ul { margin: 4px 0 0; padding-left: 18px; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 14px 16px; }
.pc-card { text-align: left; padding: 0; border: 1px solid var(--line); border-left: 5px solid #6C6E72; border-radius: 12px; background: var(--surface); cursor: pointer; overflow: hidden; font: inherit; color: inherit; }
.pc-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.pc-card.ok { border-left-color: #1f7a46; } .pc-card.bad { border-left-color: #BE202F; } .pc-card.none { border-left-color: #c9a227; }
.pc-band { display: flex; justify-content: space-between; gap: 8px; padding: 5px 12px; font-size: 11.5px; font-weight: 700; color: #fff; background: #6C6E72; }
.pc-card.ok .pc-band { background: #1f7a46; } .pc-card.bad .pc-band { background: #BE202F; } .pc-card.none .pc-band { background: #c9a227; }
.pc-body { padding: 10px 12px 12px; display: grid; gap: 4px; font-size: 13px; } .pc-body > b { font-size: 14.5px; }
.pc-row { display: flex; gap: 10px; flex-wrap: wrap; } .pc-lock { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.pc-lock span { font-size: 11.5px; background: var(--surface-2, #f6f4f1); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.pc-sel { margin: 12px 0; } .pc-sr { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2, #eee); flex-wrap: wrap; }
.pc-sr > span { flex: 0 0 200px; font-size: 13.5px; } .pc-sr > div { display: flex; gap: 14px; flex-wrap: wrap; }
.cp-edit-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line-2, #eee); font-size: 13.5px; }
.cp-in { width: 120px; text-align: right; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-variant-numeric: tabular-nums; background: var(--surface); }
.cp-in:focus { outline: 2px solid rgba(190,32,47,.35); border-color: #BE202F; } .cp-in.chg { border-color: #BE202F; background: #fbeeee; }
tr.cp-chg td { background: rgba(190,32,47,.04); } .cp-log { padding: 10px 16px; font-size: 13px; } .cp-log ul { padding-left: 18px; margin: 6px 0 0; }
.rl-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; } .rl-form .field { margin: 0; min-width: 140px; } .rl-form .rl-note { flex: 1; min-width: 200px; }
.pc-form input, .pc-sel + .field input, .rl-form input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); }
.pc-form input:focus, .rl-form input:focus { outline: 2px solid rgba(190,32,47,.35); border-color: #BE202F; }
/* v2.0.77 lối tắt của tôi trên Bảng của tôi */
.sc-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.sc-tile { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; background: var(--surface, #fff); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; color: inherit; text-decoration: none; font-weight: 600; font-size: 13.5px; line-height: 1.25; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.sc-tile:hover { box-shadow: 0 5px 14px rgba(0,0,0,.10); transform: translateY(-1px); } .sc-ico { font-size: 20px; flex: none; }
@media (max-width: 600px) { .sc-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; } .sc-tile { min-height: 48px; padding: 6px 10px; font-size: 13px; } }
/* v2.0.81: khu không thuộc phòng mình — mờ, vẫn bấm được */
.nav-khu.dim { opacity: .5; } .nav-khu.dim:hover, .nav-khu.dim.active { opacity: 1; }

/* v2.0.85 — kho: tổng quan, chi tiết N-X, N-X-T, bảo hành, chấn gấp */
.k2-top{margin-bottom:14px}
.k2-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:12px}
.k2-tile{display:flex;flex-direction:column;gap:2px;padding:12px 14px;background:var(--surface,#fff);border:1px solid var(--line);border-top:4px solid var(--grey,#6C6E72);border-radius:10px;color:inherit;text-decoration:none}
.k2-tile span{font-size:12px;color:var(--muted)} .k2-tile b{font-size:26px;line-height:1.1} .k2-tile small{font-size:11px;color:var(--muted)}
.k2-tile.bad{border-top-color:var(--red)} .k2-tile.bad b{color:var(--red)} .k2-tile.warn{border-top-color:#C79A1B}
.k2-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}
.k2-card{background:var(--surface,#fff);border:1px solid var(--line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:4px;max-height:330px;overflow:auto}
.k2-card>b{margin-bottom:4px}
.k2-line{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:6px 8px;border-radius:6px;border-left:3px solid var(--line);color:inherit;text-decoration:none;font-size:13px}
.k2-line:hover{background:var(--raise,#f6f4f1)} .k2-line.neg{border-left-color:var(--red)} .k2-line.neg b{color:var(--red)} .k2-line.low{border-left-color:#C79A1B}
.k2-kind{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}
.k2-kind.kin{background:var(--green-bg);color:var(--green)} .k2-kind.kout{background:var(--red-bg);color:var(--red)} .k2-kind.kmv{background:#E8EEF7;color:#2A5A8C}
.k2-sum{display:flex;flex-wrap:wrap;gap:18px;padding:10px 12px;border-bottom:1px solid var(--line);align-items:baseline}
.k2-sum b{font-size:16px;margin-left:4px}
.k2-grp td{background:var(--raise,#f6f4f1);font-weight:700;font-size:13px}
.k2-neg td{background:var(--red-bg)} .k2-done td{opacity:.6}
/* v2.0.87 kho chấn gấp */
.cg-warn{padding:10px 14px;border-left:4px solid var(--red);margin-bottom:12px}.cg-warn ul{margin:4px 0 0 18px;font-size:13px}
.cg-pend{margin:0 12px 10px;border:1px solid var(--line);border-radius:8px;padding:6px 10px}.cg-pend summary{cursor:pointer}
.cg-order{margin:8px 0;padding:8px;background:var(--raise,#f6f4f1);border-radius:8px}.cg-lines{margin-top:6px;font-size:13px}
.link-btn{background:none;border:1px solid var(--line);border-radius:6px;padding:2px 8px;cursor:pointer;font-weight:600;color:inherit}
.k2-price{width:9rem;text-align:right}
.k2-scan{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.k2-scan-head{display:flex;gap:12px;align-items:center}.k2-scan-head img{width:84px;height:84px;object-fit:cover;border-radius:10px;border:1px solid var(--line)}
.k2-scan-head h1{margin:2px 0;font-size:20px}
.k2-scan-stock{display:flex;flex-direction:column;align-items:center;padding:16px;border-radius:12px;background:var(--surface,#fff);border:1px solid var(--line);border-top:5px solid var(--green)}
.k2-scan-stock b{font-size:34px}.k2-scan-stock.neg{border-top-color:var(--red)}.k2-scan-stock.neg b{color:var(--red)}.k2-scan-stock.low{border-top-color:#C79A1B}
.k2-scan-btns{display:grid;grid-template-columns:1fr 1fr;gap:10px}.btn.big{min-height:56px;font-size:18px;font-weight:700}
/* v2.0.88 đấu nối hồ sơ cũ */
.dn-prog{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px;padding:12px 14px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:10px}
.dn-bar{flex:1 1 220px;height:12px;background:var(--line);border-radius:99px;overflow:hidden}.dn-bar i{display:block;height:100%;background:linear-gradient(90deg,#1f7a46,#2ea063)}
.dn-prog b{font-size:20px}
.dn-list{display:flex;flex-direction:column;gap:8px;padding:10px}
.dn-row{display:flex;gap:12px;justify-content:space-between;align-items:flex-start;padding:10px 12px;border:1px solid var(--line);border-left:5px solid var(--grey,#6C6E72);border-radius:10px;background:var(--surface,#fff);flex-wrap:wrap}
.dn-row.red{border-left-color:var(--red)}.dn-row.amber{border-left-color:#C79A1B}.dn-row.green{border-left-color:var(--green)}
.dn-main{flex:1 1 320px;display:flex;flex-direction:column;gap:3px}
.dn-act{display:flex;flex-direction:column;gap:6px;align-items:stretch;min-width:220px}
.dn-tag{font-size:11px;font-weight:700;padding:1px 8px;border-radius:99px;background:var(--raise,#f6f4f1)}.dn-tag.red{color:var(--red)}.dn-tag.amber{color:#9a6b12}.dn-tag.green{color:var(--green)}
.dn-chips{display:flex;gap:4px;flex-wrap:wrap}.dn-chip{font-size:11px;padding:1px 7px;border-radius:6px}.dn-chip.red{background:var(--red-bg);color:var(--red)}.dn-chip.amber{background:#fbf1d9;color:#9a6b12}
.dn-wait{display:flex;flex-direction:column;font-size:13px;color:var(--green)}
.dn-act-day{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:8px;padding:8px 12px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:10px}
.dn-act-day details{flex-basis:100%}.dn-chip.green{background:var(--green-bg);color:var(--green)}
.dn-note{background:#fbf1d9;border-left:3px solid #C79A1B;padding:4px 8px;border-radius:6px;font-size:13px}

/* v2.0.98: phần mềm Kho hiện trong Kods */
.view:has(.kho-frame) { max-width: none; padding: 8px 10px 0; }
.kho-frame { display: block; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
