:root {
  --nav-h: 58px;
  --sb-w: 248px;
  --c-brand: #1d4ed8;
  --c-brand-dark: #1e3a8a;
  --c-nav: #0f172a;
  --c-bg: #f1f5f9;
  --c-surface: #fff;
  --c-border: #e2e8f0;
  --c-text: #0f172a;
  --c-muted: #64748b;
  --c-danger: #e11d48;
  --c-ok: #059669;
  --c-gold: #d97706;
  --r: 12px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --font-stack: "Times New Roman", Times, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html, body, button, input, select, textarea {
  font-family: var(--font-stack);
}
body {
  color: var(--c-text);
  background: var(--c-bg);
}
a { color: var(--c-brand); }
code { font-size: 12px; color: #444; font-family: Consolas, "Courier New", monospace; }

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(29, 78, 216, 0.45), transparent 55%),
    linear-gradient(160deg, #0f172a 0%, #1e3a8a 58%, #0f172a 100%);
  padding: 28px 16px 40px;
}
.login-shell {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.32);
}
.login-aside {
  background: linear-gradient(165deg, #0f172a 0%, #1e3a8a 70%, var(--c-brand) 140%);
  color: #f8fafc;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
}
.login-mark { width: 44px; height: 44px; font-size: 15px; margin-bottom: 18px; }
.login-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.login-aside h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.login-aside-lead { margin: 0 0 20px; opacity: 0.8; font-size: 14px; }
.login-points {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  opacity: 0.92;
}
.login-points li {
  padding: 8px 0 8px 18px;
  position: relative;
  border-top: 1px solid rgba(255,255,255,.12);
}
.login-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 15px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #93c5fd;
}
.login-card {
  width: auto;
  padding: 36px 32px;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card h2 { margin: 0 0 8px; font-size: 22px; }
.login-card .muted { font-size: 13px; }
.login-form label {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
}
.login-form input:focus {
  outline: 2px solid #93c5fd;
  border-color: var(--c-brand);
}
.login-pw { display: flex; align-items: stretch; gap: 8px; margin-top: 6px; }
.login-pw input { margin-top: 0; flex: 1; }
.login-pw-toggle {
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--c-muted);
  font-size: 13px;
  cursor: pointer;
}
.login-pw-toggle:hover { color: var(--c-text); background: #fff; }
.login-submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
}
.login-err {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  font-size: 13px;
}
.login-foot {
  margin: 18px 0 0;
  text-align: center;
  color: rgba(248, 250, 252, 0.55);
  font-size: 12px;
}
@media (max-width: 720px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { min-height: 0; padding: 24px 22px 20px; }
  .login-aside h1 { font-size: 22px; }
  .login-card { padding: 24px 22px 28px; }
}

.login button, .bar button, button { padding: 8px 14px; cursor: pointer; }

/* App shell */
.app { min-height: 100vh; }
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: var(--sb-w) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: var(--c-nav);
  color: #f8fafc;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}
.topbar a { color: inherit; text-decoration: none; }
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px; min-width: 0;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--c-brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; flex: 0 0 auto;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.brand-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tag { display: block; font-size: 10px; opacity: 0.65; letter-spacing: .06em; text-transform: uppercase; }
.sb-search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
}
.sb-search input {
  flex: 1; border: 0; outline: 0; background: transparent; color: #f8fafc; font-size: 13px; min-width: 0;
}
.top-user { display: flex; align-items: center; gap: 10px; padding-right: 12px; }
.bell, .hamburger {
  position: relative; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
}
.badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  background: var(--c-danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}
.badge.is-zero { display: none; }
.who { text-align: right; }
.who-name { display: block; font-size: 13px; font-weight: 600; }
.who-role { display: block; font-size: 11px; opacity: .7; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #1d4ed8; display: grid; place-items: center; font-weight: 700;
}
.alert-pop {
  display: none; position: absolute; right: 12px; top: calc(var(--nav-h) - 6px);
  width: 280px; background: #fff; color: var(--c-text); border-radius: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--c-border); z-index: 50;
}
.alert-pop.open { display: block; }
.alert-pop a { display: flex; justify-content: space-between; padding: 10px 12px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--c-border); }
.alert-pop .empty { padding: 12px; color: var(--c-muted); font-size: 13px; }

.sidebar {
  position: fixed; top: var(--nav-h); left: 0; bottom: 0; z-index: 30;
  width: var(--sb-w); background: var(--c-nav); color: #e2e8f0;
  display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar nav { flex: 1; overflow: auto; padding: 8px 0 12px; }
.sb-head {
  padding: 10px 16px 4px; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: #94a3b8;
}
.sb-link {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 16px; color: #cbd5e1; text-decoration: none; font-size: 13px;
}
.sb-num {
  flex: 0 0 18px; text-align: right; font-size: 11px; font-weight: 600;
  color: #64748b; font-variant-numeric: tabular-nums;
}
.sb-txt { flex: 1 1 auto; }
.sb-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-link:hover .sb-num { color: #94a3b8; }
.sb-link.on { background: #1d4ed8; color: #fff; }
.sb-link.on .sb-num { color: rgba(255,255,255,.7); }
.sb-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.sb-foot .tier {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  background: #1d4ed8; color: #fff; padding: 3px 8px; border-radius: 6px; margin-bottom: 8px;
}
.sb-foot button {
  width: 100%; background: #9f1239; color: #fff; border: 0; border-radius: 8px; padding: 10px;
}
.stage { margin-left: var(--sb-w); padding-top: var(--nav-h); min-height: 100vh; }
.main { padding: 20px 24px 40px; max-width: 1280px; }
.main.wide { max-width: 1540px; }
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--c-border);
}
.tabs a { text-decoration: none; color: #334155; font-size: 14px; }
.tabs a.on { font-weight: 600; color: var(--c-brand); }
.tabs.sub {
  counter-reset: subtab;
  position: sticky;
  top: var(--nav-h);
  z-index: 18;
  gap: 4px;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.tabs.sub a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.2;
  transition: background .15s, color .15s, box-shadow .15s;
}
.tabs.sub a::before {
  counter-increment: subtab;
  content: counter(subtab, decimal-leading-zero);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.tabs.sub a:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.tabs.sub a:hover::before { color: #60a5fa; }
.tabs.sub a.on {
  background: var(--c-brand);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
}
.tabs.sub a.on::before { color: rgba(255, 255, 255, 0.75); }
.tabs.sub a:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
}

h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; }
.muted { color: var(--c-muted); margin: 0 0 16px; }
.err { color: #9f1239; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grid { width: 100%; border-collapse: collapse; background: #fff; }
.grid th, .grid td { text-align: left; padding: 8px; border-bottom: 1px solid #e5e5e5; font-size: 14px; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.grid input, .grid select { width: 100%; max-width: 160px; padding: 4px; }
.form label { display: block; margin: 0 0 12px; }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 4px; padding: 8px; }
.form textarea { min-height: 72px; }
.form button, .inline button { padding: 8px 14px; margin: 4px 8px 4px 0; }
.inline { display: inline; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cards a { display: block; padding: 12px; background: #fff; border: 1px solid #ddd; text-decoration: none; color: inherit; border-radius: 8px; }
.cards strong { float: right; }

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
  color: #fff; border-radius: 16px; padding: 24px 28px; margin-bottom: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22); position: relative; overflow: hidden;
}
.hero h2 { font-size: 26px; text-transform: uppercase; margin: 0 0 8px; letter-spacing: -0.02em; }
.hero p { margin: 0 0 12px; opacity: .85; }
.live {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; padding: 6px 14px; font-size: 13px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
.note { font-size: 12px; color: var(--c-muted); margin: 0 0 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chip {
  display: inline-block; padding: 8px 12px; border-radius: 8px; text-decoration: none;
  font-size: 13px; font-weight: 600; color: #fff;
}
.chip.blue { background: #1d4ed8; }
.chip.red { background: #be123c; }
.chip.green { background: #047857; }
.chip.gold { background: #b45309; }
.chip.dark { background: #0f172a; }
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}
.kpi {
  display: block; background: #fff; border-radius: 12px; padding: 16px;
  text-decoration: none; color: inherit; border: 1px solid var(--c-border);
  border-left: 4px solid #94a3b8; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.kpi.blue { border-left-color: #2563eb; }
.kpi.green { border-left-color: #059669; }
.kpi.gold { border-left-color: #d97706; }
.kpi.red { border-left-color: #e11d48; }
.kpi.gray { border-left-color: #64748b; }
.k-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.k-val { font-size: 26px; font-weight: 700; margin: 6px 0; }
.k-val.blue { color: #2563eb; }
.k-val.green { color: #059669; }
.k-val.gold { color: #d97706; }
.k-val.red { color: #be123c; }
.k-sub { font-size: 13px; color: var(--c-muted); }
.k-row { display: flex; justify-content: space-between; font-size: 13px; margin-top: 4px; }
.overlay { display: none; }
.hamburger { display: none; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr auto; padding-left: 8px; }
  .brand { display: none; }
  .hamburger { display: grid; place-items: center; }
  .sidebar { transform: translateX(-110%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .stage { margin-left: 0; }
  .overlay.show {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 25;
  }
  .sb-search { display: none; }
}

.crumb { font-size: 12px; color: var(--c-muted); margin: 0 0 10px; }
.crumb a { color: inherit; text-decoration: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.page-head h2 { margin: 0; font-size: 22px; }
.page-head .lead { margin: 4px 0 0; color: var(--c-muted); font-size: 13px; }
.page-head .lead a { color: inherit; font-weight: 600; }
.page-head .lead a:hover { color: var(--c-brand); }
.btn {
  display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--c-border);
  background: #fff; color: var(--c-text); text-decoration: none; font-size: 13px; cursor: pointer;
}
.btn.primary { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.btn.ghost { background: transparent; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 8px; }
.stat-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.stat-n { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat-n.blue { color: #2563eb; }
.stat-n.green { color: #059669; }
.stat-n.red { color: #be123c; }
.stat-n.gold { color: #b45309; }
.stat-l { margin-top: 4px; font-size: 13px; color: var(--c-muted); }
.callout {
  background: #fff7ed; border: 1px solid #fed7aa; border-left: 4px solid #ea580c;
  border-radius: 8px; padding: 10px 12px; font-size: 13px; margin: 0 0 14px;
}
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  padding: 12px; margin: 0 0 16px;
}
.filter-bar input, .filter-bar select {
  padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 8px; font-size: 13px;
}
.filter-bar input[type="search"] { flex: 1 1 220px; min-width: 180px; }
#yc-vt-q {
  display: block; width: 100%; margin: 0 0 6px;
  padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 8px; font-size: 13px;
}
.empty-board {
  background: #fff; border: 1px dashed var(--c-border); border-radius: 12px;
  padding: 28px; text-align: center; color: var(--c-muted);
}
.da-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.da-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); display: flex; flex-direction: column; gap: 10px;
}
.da-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.da-card h3 { margin: 0; font-size: 14px; line-height: 1.35; }
.da-card h3 a { color: inherit; text-decoration: none; }
.da-code { font-size: 11px; color: var(--c-muted); margin-top: 2px; font-family: Consolas, "Courier New", monospace; }
.tag {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: #e2e8f0; color: #334155; white-space: nowrap;
}
.tag.blue { background: #dbeafe; color: #1d4ed8; }
.tag.gold { background: #fef3c7; color: #b45309; }
.tag.green { background: #d1fae5; color: #047857; }
.tag.red { background: #ffe4e6; color: #be123c; }
.tag.gray { background: #e2e8f0; color: #475569; }
.da-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475569; }
.da-prog-lab { display: flex; justify-content: space-between; font-size: 12px; color: var(--c-muted); margin-bottom: 4px; }
.bar-track { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: #2563eb; border-radius: 99px; }
.da-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid #f1f5f9; }
.da-counts { display: flex; gap: 10px; font-size: 12px; color: var(--c-muted); }
.da-counts a { color: inherit; text-decoration: none; }
.da-counts .warn { color: #be123c; font-weight: 600; }
.da-acts { display: flex; gap: 6px; }
.ico {
  font-size: 12px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--c-border);
  text-decoration: none; color: #334155; background: #f8fafc;
}
.link-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 16px; font-size: 13px; }
.head-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.panel {
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 14px;
}
.panel h3 { margin: 0 0 12px; font-size: 14px; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.panel-h h3 { margin: 0; }
.panel-h a { font-size: 12px; }
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 14px; margin: 16px 0; }
.stack { display: flex; flex-direction: column; gap: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.kv span { color: var(--c-muted); }
.kv a { color: inherit; }
.plain { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.plain li { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.stat-card { text-decoration: none; color: inherit; }
.da-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
  color: #fff; border-radius: 16px; padding: 20px 24px; margin-bottom: 14px;
}
.da-hero-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.da-hero .k-label { color: rgba(255,255,255,.72); letter-spacing: .08em; }
.da-hero-pct { font-size: 36px; font-weight: 700; line-height: 1; margin-top: 4px; }
.da-hero-pct.is-code { font-size: 26px; letter-spacing: -0.02em; }
.da-hero-meta { font-size: 13px; opacity: .9; text-align: right; line-height: 1.5; }
.da-hero .bar-track { background: rgba(255,255,255,.2); }
.da-hero .bar-track i { background: #93c5fd; }
.da-hero-note { margin: 8px 0 0; font-size: 11px; opacity: .7; }
.da-hero code { color: #bfdbfe; }
.bar-track.lg { height: 10px; }
.bar-track.sm { height: 4px; margin-top: 4px; }
.gate-steps {
  list-style: none; padding: 0; margin: 0 0 14px; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.gate-steps li {
  background: #fff; border: 1px solid var(--c-border); border-radius: 10px;
  padding: 10px 12px; font-size: 12px; color: var(--c-muted);
}
.gate-steps li b { display: block; font-size: 13px; color: var(--c-text); }
.gate-steps li.on { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.gate-steps li.on b { color: #1d4ed8; }
.gate-steps li.done { border-color: #059669; background: #ecfdf5; }
.gate-steps li.done b { color: #047857; }
.gate-steps li.off { opacity: .55; }
.grid.compact th, .grid.compact td { padding: 6px 8px; font-size: 13px; }
.grid.zebra tbody tr:nth-child(odd) {
  background: rgba(191, 219, 254, 0.7);
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
}
.pager .info { color: var(--c-muted); flex: 1 1 200px; }
.pager .now { font-weight: 600; }
.pager a, .pager .pg {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.pager a:hover { border-color: var(--c-brand); color: var(--c-brand); }
.ton-chart { display: flex; flex-direction: column; gap: 8px; }
.ton-bar-row {
  display: grid;
  grid-template-columns: minmax(88px, 30%) 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.ton-bar-row .lab {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ton-hbar {
  height: 12px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.ton-hbar i {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: 99px;
}
.ton-hbar.gold i { background: #d97706; }
.ton-hbar.green i { background: #059669; }
.ton-hbar.gray i { background: #64748b; }
.ton-hbar.red i { background: #be123c; }
.ton-bar-row .val {
  white-space: nowrap;
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.wbs-name { font-size: 13px; }
.form-wide {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px;
}
.form-wide label { margin: 0; }
.form-wide .span-2 { grid-column: span 2; }
.form-wide .span-3 { grid-column: 1 / -1; }
.tv-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  display: flex; flex-direction: column; gap: 8px;
}
.tv-card.is-cht { border-color: #fde68a; background: #fffbeb; }
.tv-card.is-out { opacity: .72; }
.tv-top { display: flex; align-items: flex-start; gap: 10px; }
.tv-who { flex: 1; min-width: 0; }
.tv-who h3 { margin: 0; font-size: 14px; }
.tv-ava {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: #1d4ed8; color: #fff; display: grid; place-items: center; font-weight: 700;
}
.tv-ava.cht { background: #b45309; }
.tv-card .da-foot code { font-size: 10px; }
#them-tv, #them-boq { scroll-margin-top: 72px; }
.grid.boq input, .grid.boq select { max-width: none; }
.grid.boq input[name="ma_cong_tac"] { min-width: 88px; max-width: 128px; }
.grid.boq input[name="dvt"] { max-width: 72px; }
.grid.boq input[name="khoi_luong_hop_dong"],
.grid.boq input[name="don_gia_co_so"] { max-width: 128px; text-align: right; }
.boq-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.boq-act .btn { padding: 4px 10px; font-size: 12px; }
.boq-act form { margin: 0; }
.vo-mini { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.vo-mini li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.vo-mini a { color: inherit; text-decoration: none; }
.vo-mini a:hover { color: var(--c-brand); }
.grid tr.is-off, .empty-board.is-off { display: none; }
.boq-toolbar .filter-bar { margin: 0 0 12px; }
.vt-pick { position: relative; }
.vt-pick .vt-results {
  position: absolute; z-index: 8; left: 0; right: 0; top: 100%;
  max-height: 240px; overflow: auto; margin-top: 4px;
  background: #fff; border: 1px solid var(--c-border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}
.vt-pick .vt-results.is-off,
.vt-picked.is-off { display: none; }
.vt-pick .vt-results button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 12px; cursor: pointer; font: inherit; border-bottom: 1px solid #f1f5f9;
}
.vt-pick .vt-results button:hover, .vt-pick .vt-results button.is-on { background: #eff6ff; }
.vt-pick .vt-results .vt-ma { font-family: Consolas, "Courier New", monospace; font-size: 12px; color: var(--c-muted); }
.vt-pick .vt-results .vt-ten { display: block; font-size: 13px; }
.vt-pick .vt-results .vt-meta { font-size: 11px; color: var(--c-muted); }
.vt-picked { font-size: 12px; color: #047857; margin: 6px 0 0; }
.boq-name { display: flex; flex-direction: column; gap: 2px; }
.boq-name .sub { font-size: 11px; color: var(--c-muted); }
.nk-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  display: flex; flex-direction: column; gap: 8px;
  border-top: 3px solid #94a3b8;
}
.nk-card.tone-gold { border-top-color: #d97706; }
.nk-card.tone-blue { border-top-color: #2563eb; }
.nk-card.tone-red { border-top-color: #be123c; }
.nk-card.tone-gray { border-top-color: #64748b; }
.nk-card.tone-green { border-top-color: #059669; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.wf-acts form { margin: 0; }
#otaStatus.is-ok { color: #15803d; }
#otaStatus.is-err { color: #b91c1c; }
.nk-card h3 { margin: 0; font-size: 16px; }
.nk-card h3 a { color: inherit; text-decoration: none; }
.nk-card h3 a:hover { color: var(--c-brand); }
.nk-kpis { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 12px; color: #475569; }
.nk-kpis b { color: var(--c-text); }
.nk-vuong { margin: 0; font-size: 13px; color: #9f1239; line-height: 1.4; }
.nk-body { margin: 0; font-size: 13px; color: #334155; line-height: 1.45; }
.nk-body.pre { white-space: pre-wrap; }
.nk-links { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12px; }
.nk-links li { padding: 4px 0; word-break: break-all; }
.nk-grid .muted { margin: 0; font-size: 12px; }
.nk-detail .muted { margin: 8px 0 0; }
.nk-detail .nk-vuong { margin-top: 8px; white-space: pre-wrap; }
.nk-dual {
  display: grid; grid-template-columns: 42px 1fr; gap: 2px 8px;
  align-items: center; margin-top: 6px; font-size: 10px; color: var(--c-muted);
}
.bar-track.snap i { background: #d97706; }
.nk-snap tr.is-empty { opacity: .62; }
.nk-snap input[type="number"] { width: 88px; padding: 4px 6px; }
.kb-board {
  display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 12px; align-items: stretch; margin-top: 4px;
  overflow-x: auto; padding-bottom: 10px;
}
.kb-col {
  background: #f8fafc; border-radius: 14px; padding: 0;
  min-width: 240px; min-height: 280px; max-height: calc(100vh - 210px);
  border: 1px solid var(--c-border);
  display: flex; flex-direction: column; overflow: hidden;
}
.kb-col.tone-blue { background: #eff6ff; border-color: #bfdbfe; }
.kb-col.tone-gold { background: #fffbeb; border-color: #fde68a; }
.kb-col.tone-green { background: #ecfdf5; border-color: #a7f3d0; }
.kb-col.tone-red { background: #fff1f2; border-color: #fecdd3; }
.kb-col.tone-gray { background: #f8fafc; border-color: #e2e8f0; }
.kb-col header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; padding: 12px 12px 10px;
  border-top: 3px solid #94a3b8;
  border-bottom: 1px solid rgba(15,23,42,.06);
  flex: 0 0 auto;
}
.kb-col.tone-blue header { border-top-color: #2563eb; }
.kb-col.tone-gold header { border-top-color: #d97706; }
.kb-col.tone-green header { border-top-color: #059669; }
.kb-col.tone-red header { border-top-color: #be123c; }
.kb-col.tone-gray header { border-top-color: #64748b; }
.kb-col header b { display: block; font-size: 13px; }
.kb-col header code { font-size: 10px; }
.kb-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: #fff; color: #334155; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.kb-list { padding: 10px; flex: 1; min-height: 0; overflow-y: auto; }
.kb-empty {
  margin: 0; padding: 18px 8px; text-align: center; font-size: 12px;
  color: var(--c-muted); border: 1px dashed #cbd5e1; border-radius: 10px; background: rgba(255,255,255,.45);
}
.kb-card {
  background: #fff; border-radius: 12px; padding: 12px;
  margin-bottom: 8px; border: 1px solid var(--c-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.kb-card:last-child { margin-bottom: 0; }
.kb-card.overdue { border-color: #fda4af; background: #fff7f7; }
.kb-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.kb-card h4 { margin: 0; font-size: 13px; line-height: 1.35; }
.kb-card h4 a { color: inherit; text-decoration: none; }
.kb-card h4 a:hover { color: var(--c-brand); }
.kb-col.tone-green .bar-track i { background: #059669; }
.kb-col.tone-gold .bar-track i { background: #d97706; }
.kb-col.tone-red .bar-track i { background: #be123c; }
.kb-meta { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12px; color: #475569; }
.kb-meta li { padding: 2px 0; }
.kb-move { margin-top: 10px; }
.kb-move label { display: block; margin: 0; font-size: 11px; color: var(--c-muted); }
.kb-move select {
  width: 100%; margin-top: 4px; padding: 6px 8px; font-size: 12px;
  border: 1px solid var(--c-border); border-radius: 8px; background: #f8fafc;
}
.kb-card.is-focus { outline: 2px solid var(--c-brand); outline-offset: 1px; }
.kb-ls { margin: 8px 0 0; font-size: 11px; color: var(--c-muted); line-height: 1.4; }
.kb-ls a { color: inherit; text-decoration: none; font-weight: 600; }
.kb-ls a:hover { color: var(--c-brand); }
.kb-ls span { display: block; }
.kb-timeline { margin-top: 18px; }
.kb-timeline .muted { margin: 0; }
.kb-ls-group { border-bottom: 1px solid #f1f5f9; padding: 8px 0; scroll-margin-top: 72px; }
.kb-ls-group:last-child { border-bottom: none; }
.kb-ls-group summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  cursor: pointer; list-style: none; font-size: 13px;
}
.kb-ls-group summary::-webkit-details-marker { display: none; }
.kb-ls-wbs { margin-left: 8px; font-size: 11px; font-weight: 400; }
.kb-ls-n { color: var(--c-muted); font-size: 12px; flex: 0 0 auto; }
.kb-ls-group ol { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: #334155; }
.kb-ls-group li { padding: 4px 0; }
.kb-ls-group li .tag { margin: 0 4px; }

@media (max-width: 1100px) {
  .stat-grid, .da-grid { grid-template-columns: 1fr 1fr; }
  .split, .gate-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .stat-grid, .da-grid, .split, .gate-steps, .form-wide { grid-template-columns: 1fr; }
  .form-wide .span-2, .form-wide .span-3 { grid-column: auto; }
  .page-head { flex-direction: column; }
  .da-hero-top { flex-direction: column; }
  .da-hero-meta { text-align: left; }
  .tabs.sub { padding: 4px; gap: 2px; }
  .tabs.sub a { padding: 7px 10px; font-size: 12px; }
}
