/**
 * NDTC.CSS — Giao diện Cổng KMS dạng sidebar + module Kế hoạch NĐTC 2026–2027
 * Mọi lớp mới đều có tiền tố nd- để không đụng các lớp kst và dms đang chạy.
 * Sáng/tối theo thuộc tính data-theme trên <html> (dùng chung với KMS).
 */
.nd-root, .nd-shell {
  --nd-surface: #ffffff;
  --nd-surface-2: #f8fafc;
  --nd-border: #e2e8f0;
  --nd-grid: #e8ecf1;
  --nd-text: #0f172a;
  --nd-dim: #475569;
  --nd-faint: #64748b;
  --nd-brand: #b91c1c;
  --nd-brand-2: #8c0b20;
  --nd-brand-soft: #fef2f2;
  --nd-blue: #2a78d6;
  --nd-good: #0ca30c;
  --nd-good-text: #006300;
  --nd-warn: #fab219;
  --nd-warn-text: #8a5a00;
  --nd-serious: #ec835a;
  --nd-serious-text: #a2410f;
  --nd-crit: #d03b3b;
  --nd-crit-text: #b42323;
  --nd-neutral: #9aa3b2;
  --nd-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 18px rgba(15, 23, 42, .05);
  --nd-input: #ffffff;
}
[data-theme="dark"] .nd-root, [data-theme="dark"] .nd-shell {
  --nd-surface: #132038;
  --nd-surface-2: #0f1b2f;
  --nd-border: rgba(255, 255, 255, .10);
  --nd-grid: #2c3a52;
  --nd-text: #eaf1fc;
  --nd-dim: #b6c4da;
  --nd-faint: #8da0bd;
  --nd-brand: #f87171;
  --nd-brand-2: #dc2626;
  --nd-brand-soft: rgba(248, 113, 113, .12);
  --nd-blue: #3987e5;
  --nd-good-text: #4ade80;
  --nd-warn-text: #fbbf24;
  --nd-serious-text: #fb9a73;
  --nd-crit-text: #fca5a5;
  --nd-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --nd-input: #0f1b2f;
}

/* ---------- Khung: sidebar + nội dung ---------- */
#dmsKstWorkContainer.nd-shell {
  display: grid !important;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 22px;
  min-height: calc(100vh - var(--nd-top, 124px));
  padding: 0 !important;
  background: transparent !important;
  align-items: start;
}
.nd-shell .kms-sub-nav { display: none !important; }
.nd-main { min-width: 0; }

.nd-side {
  position: sticky; top: var(--nd-top, 124px);
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 20px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .07);
  padding: 10px 10px 8px;
  max-height: calc(100vh - var(--nd-top, 124px) - 16px);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #d6dbe4 transparent;
}
.nd-side::-webkit-scrollbar { width: 5px; }
.nd-side::-webkit-scrollbar-thumb { background: #d6dbe4; border-radius: 4px; }
.nd-side-grp {
  display: flex; align-items: center; gap: 8px;
  font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  color: #8a94a6; padding: 14px 10px 6px;
}
.nd-side-grp::before { content: ""; width: 14px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #c8102e, #f2b705); }
.nd-side-grp:first-child { padding-top: 6px; }
.nd-nav {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 0; background: transparent; color: #334155;
  font-family: inherit; font-size: .9rem; font-weight: 700; line-height: 1.2;
  padding: 6px 10px; border-radius: 14px; cursor: pointer; text-align: left;
  transition: background .15s, color .15s, transform .15s;
}
.nd-ico {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  font-style: normal; font-size: 1.05rem; line-height: 1;
  background: color-mix(in srgb, var(--ic, #94a3b8) 14%, #ffffff);
  transition: background .15s;
}
.nd-nav span { flex: 1; min-width: 0; }
.nd-nav:hover { background: #f4f6fa; color: #0f172a; }
.nd-nav:hover .nd-ico { transform: scale(1.06); }
.nd-nav.active {
  background: linear-gradient(135deg, #a50e24, #d9122f);
  color: #fff; box-shadow: 0 8px 18px rgba(165, 14, 36, .30);
}
.nd-nav.active .nd-ico { background: rgba(255, 255, 255, .22); }
.nd-nav-count {
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--nd-crit); color: #fff; font-size: .7rem; font-weight: 800;
  display: none; align-items: center; justify-content: center; font-style: normal;
}
.nd-nav-count.on { display: inline-flex; }
.nd-nav.active .nd-nav-count { background: #fff; color: #a50e24; }
.nd-side-foot { margin-top: 8px; padding: 10px 10px 4px; border-top: 1px solid #eef1f6; font-size: .74rem; color: #8a94a6; display: flex; flex-direction: column; gap: 3px; }
.nd-burger {
  display: none; align-items: center; gap: 8px; margin: 0 0 14px;
  background: var(--nd-surface); border: 1px solid var(--nd-border); color: var(--nd-text);
  font-family: inherit; font-weight: 700; font-size: .88rem; line-height: 1; padding: 10px 14px; border-radius: 12px; cursor: pointer;
}
.nd-burger svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ---------- Tiêu đề trang ---------- */
.nd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.nd-head h2 { margin: 0; font-size: 1.45rem; font-weight: 800; color: #0f172a; letter-spacing: -.01em; } /* nền trang KMS luôn sáng, kể cả khi bật giao diện tối */
.nd-head p { margin: 4px 0 0; color: #64748b; font-size: .84rem; }
.nd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nd-btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--nd-border);
  background: var(--nd-surface); color: var(--nd-text); font-family: inherit; font-weight: 700; font-size: .84rem; line-height: 1;
  padding: 10px 14px; border-radius: 11px; cursor: pointer; transition: border-color .15s, transform .1s;
}
.nd-btn:hover { border-color: var(--nd-brand); color: var(--nd-brand); }
.nd-btn:disabled { opacity: .55; cursor: not-allowed; }
.nd-btn.primary { background: linear-gradient(135deg, var(--nd-brand-2), #c8102e); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(140, 11, 32, .25); }
.nd-btn.primary:hover { color: #fff; transform: translateY(-1px); }
.nd-btn.sm { padding: 7px 11px; font-size: .78rem; border-radius: 9px; }
.nd-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Thẻ số liệu ---------- */
.nd-sec-title { margin: 22px 0 10px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.nd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.nd-kpi {
  position: relative; background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: 16px;
  padding: 14px 16px 13px 19px; box-shadow: var(--nd-shadow); overflow: hidden;
}
.nd-kpi::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--kc, var(--nd-neutral)); }
.nd-kpi-label { font-size: .74rem; font-weight: 700; color: var(--nd-faint); }
.nd-kpi-val { font-size: 1.85rem; font-weight: 800; line-height: 1.15; margin-top: 3px; color: var(--nd-text); font-variant-numeric: tabular-nums; }
.nd-kpi-val small { font-size: .95rem; font-weight: 700; color: var(--nd-faint); margin-left: 2px; }
.nd-kpi-note { font-size: .74rem; color: var(--nd-faint); margin-top: 2px; }
.nd-kpi.crit .nd-kpi-val { color: var(--nd-crit-text); }
.nd-kpi.warn .nd-kpi-val { color: var(--nd-warn-text); }
.nd-kpi.good .nd-kpi-val { color: var(--nd-good-text); }

/* ---------- Thẻ biểu đồ ---------- */
.nd-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nd-card { background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: 16px; box-shadow: var(--nd-shadow); padding: 16px 18px 14px; min-width: 0; }
.nd-card.flush { padding: 0; overflow: hidden; }
.nd-card-h { margin: 0; font-size: .98rem; font-weight: 800; color: var(--nd-text); }
.nd-card-s { margin: 3px 0 10px; font-size: .78rem; color: var(--nd-faint); }
.nd-chart { position: relative; height: 230px; }
.nd-chart.tall { height: 290px; }
.nd-figs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--nd-border); }
.nd-fig { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--nd-dim); }
.nd-fig i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: 0 0 10px; }
.nd-fig b { color: var(--nd-text); font-variant-numeric: tabular-nums; }
.nd-empty { padding: 26px 12px; text-align: center; color: var(--nd-faint); font-size: .86rem; }

/* ---------- Bảng ---------- */
.nd-table-wrap { overflow-x: auto; }
.nd-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.nd-table th {
  text-align: left; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--nd-faint); background: var(--nd-surface-2); padding: 10px 12px; border-bottom: 1px solid var(--nd-border); white-space: nowrap;
}
.nd-table td { padding: 11px 12px; border-bottom: 1px solid var(--nd-border); color: var(--nd-text); vertical-align: top; }
.nd-table tr:last-child td { border-bottom: 0; }
.nd-table tbody tr.click { cursor: pointer; }
.nd-table tbody tr.click:hover td { background: var(--nd-surface-2); }
.nd-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nd-table .ctr { text-align: center; white-space: nowrap; }
.nd-code { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nd-sub { display: block; margin-top: 2px; font-size: .74rem; color: var(--nd-faint); font-weight: 500; }
.nd-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nd-group-row td { background: var(--nd-surface-2); font-weight: 800; font-size: .8rem; color: var(--nd-text); padding: 9px 12px; }
.nd-group-row td span { font-weight: 600; color: var(--nd-faint); margin-left: 8px; }
.nd-warn-txt { color: var(--nd-crit-text); font-weight: 700; font-size: .76rem; display: block; margin-top: 3px; }

/* ---------- Nhãn trạng thái (có chữ, không chỉ màu) ---------- */
.nd-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; white-space: nowrap; background: var(--pb); color: var(--pt);
}
.nd-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pc); }
.nd-p-good { --pb: rgba(12, 163, 12, .12); --pt: var(--nd-good-text); --pc: var(--nd-good); }
.nd-p-blue { --pb: rgba(42, 120, 214, .12); --pt: var(--nd-blue); --pc: var(--nd-blue); }
.nd-p-warn { --pb: rgba(250, 178, 25, .18); --pt: var(--nd-warn-text); --pc: var(--nd-warn); }
.nd-p-serious { --pb: rgba(236, 131, 90, .16); --pt: var(--nd-serious-text); --pc: var(--nd-serious); }
.nd-p-crit { --pb: rgba(208, 59, 59, .12); --pt: var(--nd-crit-text); --pc: var(--nd-crit); }
.nd-p-grey { --pb: rgba(154, 163, 178, .18); --pt: var(--nd-dim); --pc: var(--nd-neutral); }

.nd-prog { display: flex; align-items: center; gap: 8px; min-width: 96px; }
.nd-prog-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--nd-grid); overflow: hidden; }
.nd-prog-bar i { display: block; height: 100%; border-radius: 3px; background: var(--nd-blue); }
.nd-prog b { font-size: .76rem; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; color: var(--nd-dim); }

/* ---------- Bộ lọc ---------- */
.nd-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.nd-input, .nd-select, .nd-textarea {
  width: 100%; background: var(--nd-input); color: var(--nd-text); border: 1px solid var(--nd-border);
  border-radius: 10px; padding: 9px 12px; font-family: inherit; font-weight: 600; font-size: .86rem; line-height: 1.3; outline: none;
}
.nd-filters .nd-input, .nd-filters .nd-select { width: auto; min-width: 150px; }
.nd-filters .nd-input.search { flex: 1 1 220px; }
.nd-input:focus, .nd-select:focus, .nd-textarea:focus { border-color: var(--nd-brand); box-shadow: 0 0 0 3px rgba(185, 28, 28, .12); }
.nd-textarea { resize: vertical; min-height: 64px; }

/* ---------- Thanh lọc dạng sổ xuống ---------- */
.nd-fbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px;
  background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: 18px;
  padding: 14px 16px; margin: 0 0 14px; box-shadow: var(--nd-shadow);
}
.nd-fs { display: flex; flex-direction: column; gap: 5px; flex: 0 1 160px; min-width: 132px; margin: 0; }
.nd-fs > span { font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--nd-faint); }
.nd-fs-q { flex: 1 1 200px; min-width: 180px; }
.nd-fs .nd-input, .nd-fs .nd-select { width: 100%; height: 42px; padding-top: 0; padding-bottom: 0; border-radius: 12px; font-weight: 600; }
.nd-fs-q .nd-input {
  padding-left: 38px;
  background: var(--nd-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px 50% / 17px;
}
.nd-fact { display: flex; gap: 8px; margin-left: auto; }
.nd-fact .nd-btn { height: 42px; border-radius: 12px; }
.nd-select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 14px;
}
.nd-fs .nd-select:hover { border-color: var(--nd-brand); }
.nd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.nd-chip {
  border: 1px solid var(--nd-border); background: var(--nd-surface); color: var(--nd-dim);
  padding: 7px 12px; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: .8rem; line-height: 1; cursor: pointer;
}
.nd-chip:hover { border-color: var(--nd-brand); }
.nd-chip.on { background: var(--nd-brand-soft); border-color: var(--nd-brand); color: var(--nd-brand); }
.nd-chip em { font-style: normal; margin-left: 5px; opacity: .75; font-weight: 800; }
.nd-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--nd-border); margin: 0 0 16px; overflow-x: auto; }
.nd-tab { border: 0; background: transparent; color: var(--nd-faint); font-family: inherit; font-weight: 800; font-size: .86rem; line-height: 1; padding: 11px 14px; cursor: pointer; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.nd-tab.on { color: var(--nd-brand); border-bottom-color: var(--nd-brand); }

/* ---------- Danh sách nhập liệu (dạng thẻ, dễ chạm) ---------- */
.nd-list { display: flex; flex-direction: column; gap: 10px; }
.nd-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--nd-surface); border: 1px solid var(--nd-border); border-left: 4px solid var(--rc, var(--nd-border));
  border-radius: 14px; padding: 12px 14px; box-shadow: var(--nd-shadow);
}
.nd-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.nd-row-t { font-weight: 700; font-size: .9rem; color: var(--nd-text); line-height: 1.35; }
.nd-row-m { margin-top: 5px; font-size: .76rem; color: var(--nd-faint); display: flex; gap: 4px 14px; flex-wrap: wrap; }
.nd-row-m b { color: var(--nd-dim); }
.nd-row.saved { animation: ndflash 1.4s ease; }
@keyframes ndflash { 0% { background: rgba(12, 163, 12, .18); } 100% { background: var(--nd-surface); } }

/* hàng chấm rủi ro cửa hàng */
.nd-rrow { display: grid; grid-template-columns: minmax(0, 1.5fr) 150px 90px minmax(0, 1.2fr) auto; gap: 10px; align-items: center; }
.nd-rrow .nd-input, .nd-rrow .nd-select { padding: 8px 10px; }
.nd-rrow .nd-select { padding-right: 30px; }
.nd-meter { height: 8px; border-radius: 4px; background: var(--nd-grid); overflow: hidden; margin: 6px 0 4px; }
.nd-meter i { display: block; height: 100%; background: var(--nd-good); border-radius: 4px; }

/* ---------- Ngăn kéo cập nhật ---------- */
.nd-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); z-index: 1000010; opacity: 0; pointer-events: none; transition: opacity .2s; }
.nd-scrim.open { opacity: 1; pointer-events: auto; }
.nd-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100vw; z-index: 1000011;
  background: var(--nd-surface); color: var(--nd-text); border-left: 1px solid var(--nd-border);
  box-shadow: -20px 0 50px rgba(0, 0, 0, .25); transform: translateX(104%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.nd-drawer.open { transform: none; }
.nd-dr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--nd-border); }
.nd-dr-head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.35; }
.nd-dr-head .nd-sub { margin-top: 4px; }
.nd-x { border: 0; background: var(--nd-surface-2); color: var(--nd-dim); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 1.1rem; line-height: 1; flex: 0 0 34px; }
.nd-x:hover { color: var(--nd-text); }
.nd-dr-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.nd-dr-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--nd-border); background: var(--nd-surface); }
.nd-ctx { background: var(--nd-surface-2); border: 1px solid var(--nd-border); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; display: grid; gap: 7px; font-size: .8rem; color: var(--nd-dim); }
.nd-ctx div b { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--nd-faint); font-weight: 800; margin-bottom: 1px; }
.nd-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nd-fgrid .full { grid-column: 1 / -1; }
.nd-field label { display: block; font-size: .76rem; font-weight: 800; color: var(--nd-dim); margin-bottom: 5px; }
.nd-field label .req { color: var(--nd-crit-text); margin-left: 3px; }
.nd-field .hint { font-size: .72rem; color: var(--nd-faint); margin-top: 4px; }
.nd-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.nd-seg button {
  border: 1px solid var(--nd-border); background: var(--nd-input); color: var(--nd-dim); border-radius: 10px;
  padding: 8px 11px; font-family: inherit; font-weight: 700; font-size: .8rem; line-height: 1; cursor: pointer;
}
.nd-seg button.on { background: var(--nd-brand-soft); border-color: var(--nd-brand); color: var(--nd-brand); }
.nd-range { display: flex; align-items: center; gap: 12px; }
.nd-range input[type=range] { flex: 1; accent-color: var(--nd-brand); }
.nd-range output { min-width: 46px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.nd-fsec { grid-column: 1 / -1; margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--nd-border); font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--nd-faint); }
.nd-err { background: rgba(208, 59, 59, .1); border: 1px solid rgba(208, 59, 59, .35); color: var(--nd-crit-text); border-radius: 10px; padding: 10px 12px; font-size: .82rem; font-weight: 700; margin-bottom: 12px; display: none; }
.nd-err.on { display: block; }
.nd-note { font-size: .78rem; color: var(--nd-faint); background: var(--nd-surface-2); border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; }
.nd-state { padding: 44px 16px; text-align: center; color: var(--nd-faint); }
.nd-state h4 { margin: 0 0 6px; color: var(--nd-text); font-size: 1rem; }
.nd-spin { width: 26px; height: 26px; border: 3px solid var(--nd-grid); border-top-color: var(--nd-brand); border-radius: 50%; animation: ndspin .8s linear infinite; margin: 0 auto 10px; }
@keyframes ndspin { to { transform: rotate(360deg); } }

/* ---------- Điều kiện cảnh báo ---------- */
.nd-warnrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 150px 120px; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--nd-border); }
.nd-warnrow:last-child { border-bottom: 0; }
.nd-warnrow .n { font-weight: 800; color: var(--nd-faint); }
.nd-warnrow .t { font-weight: 700; font-size: .88rem; }
.nd-warnrow .d { font-size: .76rem; color: var(--nd-faint); margin-top: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nd-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  #dmsKstWorkContainer.nd-shell { grid-template-columns: 1fr; gap: 0; }
  .nd-burger { display: inline-flex; }
  .nd-side {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 86vw; max-height: none; border-radius: 0 18px 18px 0;
    z-index: 1000012; transform: translateX(-104%); transition: transform .25s ease;
  }
  .nd-side.open { transform: none; }
  .nd-rrow { grid-template-columns: 1fr 1fr; }
  .nd-rrow > :first-child { grid-column: 1 / -1; }
  .nd-rrow > :nth-child(4) { grid-column: 1 / -1; }
  .nd-warnrow { grid-template-columns: 24px minmax(0, 1fr); }
  .nd-warnrow > :nth-child(3), .nd-warnrow > :nth-child(4) { grid-column: 2; }
}
@media (max-width: 560px) {
  .nd-fs, .nd-fs-q { flex: 1 1 100%; }
  .nd-fact { width: 100%; margin-left: 0; }
  .nd-fact .nd-btn { flex: 1; justify-content: center; }
  .nd-fgrid { grid-template-columns: 1fr; }
  .nd-row { grid-template-columns: 1fr; }
  .nd-row .nd-btn { width: 100%; justify-content: center; }
  .nd-head h2 { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nd-drawer, .nd-side, .nd-scrim { transition: none; }
  .nd-row.saved { animation: none; }
}
