/* NovaPro ERP demo. Palette from the real app: cool gray canvas, white panels, near-black primary, quiet borders, 13px body. */
:root {
  --bg: #f5f6f7;
  --fg: #25272b;
  --card: #fff;
  --muted: #6f747c;
  --border: #e8eaed;
  --hover: #f1f2f4;
  --row: #fafbfb;
  --green: #0f7a50;
  --blue: #1f56c4;
  --amber: #b45309;
  --red: #b42318;
  --violet: #7c3aed;
  --shadow: 0 12px 36px rgb(32 40 48 / 10%), 0 2px 8px rgb(32 40 48 / 5%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Segoe UI Variable Text", Inter, "Geist", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--fg); font: 400 13px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid rgb(37 39 43 / .45); outline-offset: 2px; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- shell */
.app { display: flex; min-height: 100vh; padding-top: var(--demo-bar-h); }
.side { position: sticky; top: var(--demo-bar-h); height: calc(100vh - var(--demo-bar-h)); width: 260px; flex: none; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--border); }
.side-logo { display: flex; align-items: center; justify-content: center; height: 72px; border-bottom: 1px solid var(--border); flex: none; }
.side-logo img { width: 160px; height: auto; }
.side-logo .side-close { display: none; position: absolute; right: 8px; top: 18px; }
.collapse { position: absolute; right: -12px; top: 64px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); z-index: 2; }
.collapse .i { width: 13px; height: 13px; }
.search { display: flex; align-items: center; gap: 8px; margin: 10px 12px 4px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); text-align: left; background: #fff; flex: none; }
.search span { flex: 1; }
kbd { font: 500 10.5px/1 var(--font); padding: 3px 5px; border-radius: 4px; background: var(--hover); color: var(--muted); }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 10px; }
.grp { background: var(--hover); border-radius: 12px; padding: 0 2px 2px; }
.grp-h { padding: 8px 10px 6px; font-size: 12.5px; font-weight: 600; }
.grp .nav-i { background: #fff; border-top: 1px solid var(--border); }
.grp .nav-i:first-of-type { border-top: 0; border-radius: 9px 9px 0 0; }
.grp .nav-i:last-child { border-radius: 0 0 9px 9px; }
.grp .nav-i:only-of-type { border-radius: 9px; }
.nav-i { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; font-size: 14px; color: #41454c; transition: background-color .15s; }
.nav-i span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-i .ch { width: 14px; height: 14px; color: var(--muted); }
.nav-i .cnt { min-width: 20px; height: 20px; border-radius: 6px; background: var(--hover); font-size: 11px; font-weight: 500; display: grid; place-items: center; color: var(--muted); }
.nav-i:not([data-locked]):hover { background: #f8f9fa; }
.nav-i.on, .grp .nav-i.on { background: #eef3ff; color: var(--fg); font-weight: 500; }
.nav-i[data-locked] { color: #8b9098; }
.nav-i[data-locked] .i { opacity: .7; }
.nav-i[data-locked]::after { left: 55%; }
.side-foot { border-top: 1px solid var(--border); padding: 8px 10px; flex: none; }
.side-foot .nav-i { border-radius: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px 4px; }
.me b { display: block; font-size: 13px; font-weight: 600; } .me span { font-size: 11px; color: var(--muted); }
.av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: #fff; font-size: 10.5px; font-weight: 600; }
.main { flex: 1; min-width: 0; }
.view { padding: 24px; outline: 0; max-width: 1400px; }
.topbar { display: none; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.scrim { display: none; }
.assist { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; place-items: center; color: #41454c; }
.assist .i { width: 20px; height: 20px; }
.assist[data-locked]::after { left: auto; right: 0; transform: none; }

@media (max-width: 1023px) {
  .side { position: fixed; z-index: 60; left: 0; top: var(--demo-bar-h); bottom: 0; height: auto; max-width: 85vw; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow); }
  .side-logo { position: relative; }
  .side-logo .side-close { display: grid; }
  .collapse { display: none; }
  html.nav-open .side { transform: none; }
  .scrim { position: fixed; inset: var(--demo-bar-h) 0 0 0; z-index: 55; background: rgb(37 39 43 / .3); }
  html.nav-open .scrim { display: block; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: var(--demo-bar-h); z-index: 20; height: 50px; padding: 0 10px; background: #fff; border-bottom: 1px solid var(--border); }
  .topbar img { width: 96px; height: auto; }
  .topbar-t { margin-left: auto; padding-right: 6px; font-weight: 600; color: var(--muted); }
  .view { padding: 14px 12px 80px; }
}

/* ---------- surfaces */
.box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.box + .box { margin-top: 16px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bar h1 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-right: auto; }
.bar h1 .i { color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.pri { background: var(--fg); border-color: var(--fg); color: #fff; }
.btn.pri:hover { background: #000; }
.btn .i { width: 14px; height: 14px; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.fld { display: grid; gap: 5px; }
.fld > span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #41454c; }
.fld > span .i { width: 13px; height: 13px; color: var(--muted); }
.inp, .sel { height: 34px; width: 100%; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.sel { appearance: none; padding-right: 28px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f747c' stroke-width='2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 14px; }
.inp:focus, .sel:focus { outline: 2px solid rgb(37 39 43 / .15); border-color: #b9bdc4; }
.tog { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; white-space: nowrap; align-self: end; }
.tog input { accent-color: var(--fg); width: 15px; height: 15px; }
.tog.on { background: #fff4ed; border-color: #f5c9a8; }
@media (max-width: 1100px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr 1fr; gap: 10px; } .filters .fld.q { grid-column: 1 / -1; } }

/* ---------- table */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { height: 40px; padding: 0 12px; text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; background: #fcfcfd; }
.tbl th button { display: inline-flex; align-items: center; gap: 4px; letter-spacing: inherit; text-transform: inherit; font-weight: inherit; }
.tbl th button:hover, .tbl th button.on { color: var(--fg); }
.tbl th .i { width: 12px; height: 12px; }
.tbl td { height: 46px; padding: 0 12px; border-bottom: 1px solid #f0f1f3; white-space: nowrap; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:nth-child(even) { background: var(--row); }
.tbl tbody tr:hover { background: #eef0f2; }
.tbl tbody tr.sel { background: #eef3ff; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .b { font-weight: 600; }
.tbl .go { color: var(--blue); }
.tbl .go .i { width: 15px; height: 15px; }
.tfoot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--hover); font-size: 11.5px; color: #41454c; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; border: 1px solid #c9b6f5; color: var(--violet); font-size: 11.5px; background: #faf7ff; }
.ok { color: var(--green); font-weight: 600; }
.low { color: var(--amber); font-weight: 600; }
.out { color: var(--red); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.pill.low { background: #fff4ed; }
.pill.out { background: #fef1f0; }
.mute { color: var(--muted); }
.empty { padding: 36px 12px; text-align: center; color: var(--muted); }
@media (max-width: 700px) { .hide-s { display: none; } }

/* ---------- side panel */
.panel-scrim { position: fixed; inset: 0; z-index: 70; background: rgb(232 236 241 / .5); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.panel-scrim.on { opacity: 1; pointer-events: auto; }
.panel { position: fixed; z-index: 75; top: calc(var(--demo-bar-h) + 10px); right: 10px; bottom: 10px; width: min(480px, calc(100% - 20px)); overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 32px 90px rgb(32 40 48 / 16%), 0 4px 16px rgb(32 40 48 / 5%); transform: translateX(calc(100% + 20px)); transition: transform .25s var(--ease); }
.panel.on { transform: none; }
.p-h { position: sticky; top: 0; z-index: 2; display: flex; gap: 10px; align-items: flex-start; padding: 16px 18px 12px; background: #fff; border-bottom: 1px solid var(--border); }
.p-h > div { flex: 1; min-width: 0; }
.p-h .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.p-h h2 { margin-top: 2px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.p-h .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.p-s { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.p-s:last-child { border-bottom: 0; }
.p-s h3 { margin-bottom: 10px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.kv div { padding: 8px 12px; border-top: 1px solid var(--border); min-width: 0; }
.kv div:nth-child(-n+2) { border-top: 0; }
.kv div:nth-child(even) { border-left: 1px solid var(--border); }
.kv span { display: block; font-size: 11px; color: var(--muted); }
.kv b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; margin: 8px 0 6px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--green); }
.meter.low i { background: #e08a3c; }
.meter.out i { background: var(--red); }
.stock { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stock b { font-size: 22px; color: var(--fg); font-weight: 600; letter-spacing: -0.02em; }
.adj { display: flex; gap: 8px; margin-top: 12px; }
.adj .inp { width: 90px; flex: none; }
.moves { list-style: none; }
.moves li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid #f0f1f3; }
.moves li:first-child { border-top: 0; }
.moves .q { font-weight: 600; font-variant-numeric: tabular-nums; }
.moves .q.minus { color: var(--red); } .moves .q.plus { color: var(--green); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts button { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 12.5px; font-weight: 500; color: #41454c; }
.opts button:hover { background: var(--hover); }
.opts button.on { background: var(--fg); border-color: var(--fg); color: #fff; }
.ops { list-style: none; display: grid; gap: 6px; }
.ops button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; text-align: left; }
.ops button:hover { background: var(--hover); }
.ops .bx { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #b9bdc4; display: grid; place-items: center; color: transparent; flex: none; }
.ops .bx .i { width: 12px; height: 12px; stroke-width: 3; }
.ops .done .bx { background: var(--green); border-color: var(--green); color: #fff; }
.ops .done span { color: var(--muted); text-decoration: line-through; }
.ops em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted); }
.p-text { color: #41454c; }
.p-text + .p-text { margin-top: 8px; }
.tl { list-style: none; }
.tl li { position: relative; padding: 0 0 10px 18px; }
.tl li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #b9bdc4; }
.tl li span { display: block; font-size: 11.5px; color: var(--muted); }

/* ---------- jobs board */
.jb-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--hover); }
.seg button { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: #41454c; display: inline-flex; align-items: center; gap: 6px; }
.seg button b { font-weight: 400; color: var(--muted); font-size: 12px; }
.seg button.on { background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .08); color: var(--fg); }
.jb-top .inp { flex: 1; min-width: 180px; }
.board-wrap { overflow-x: auto; padding: 12px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; min-width: min-content; align-items: start; }
.col { display: flex; flex-direction: column; min-height: 440px; border-radius: 12px; background: #f8f9fa; border: 1px solid var(--border); color: var(--sc); }
.col.is-drop-target { background: #eef3ff; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--fg); border-bottom: 1px solid var(--border); }
.col-h .sw { width: 8px; height: 8px; border-radius: 2px; background: var(--sc); }
.col-h h2 { flex: 1; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.col-h b { font-size: 12px; font-weight: 500; color: var(--muted); }
.col-list { display: flex; flex-direction: column; gap: 8px; padding: 8px; flex: 1; color: var(--fg); }
.jc { display: block; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; text-align: left; cursor: grab; transition: border-color .15s, box-shadow .15s; color: var(--fg); touch-action: manipulation; }
.jc:hover { border-color: #c9cdd3; box-shadow: 0 4px 12px -4px rgb(32 40 48 / .12); }
.jc .t { display: flex; align-items: center; gap: 8px; }
.jc .t b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.jc .held { color: var(--red); font-weight: 600; font-size: 12px; }
.jc .due { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.jc .due.late { color: var(--red); font-weight: 600; }
.jc .c { margin-top: 4px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jc .m { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jc .f { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.jc .prog { flex: 1; height: 4px; border-radius: 2px; background: var(--hover); overflow: hidden; }
.jc .prog i { display: block; height: 100%; background: var(--sc); }
.jc .f span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-empty { padding: 16px 8px; text-align: center; font-size: 12px; color: var(--muted); border: 1px dashed #d5d8dc; border-radius: 10px; }
@media (max-width: 1023px) { .board { grid-auto-columns: 78vw; } }

/* ---------- quality */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats > div { padding: 14px 16px; border-left: 1px solid var(--border); }
.stats > div:first-child { border-left: 0; }
.stats span { display: block; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stats b { display: block; margin-top: 4px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats > div:nth-child(4) { border-left: 0; } .stats > div:nth-child(n+4) { border-top: 1px solid var(--border); } }
.sev-Major { color: var(--amber); } .sev-Minor { color: var(--blue); } .sev-Critical { color: var(--red); font-weight: 600; }
.st { font-weight: 500; }
.st-Open { color: var(--fg); } .st-In-progress { color: var(--blue); } .st-Contained { color: var(--amber); } .st-Verification { color: #0e7490; } .st-Closed { color: var(--green); }
.ncr { color: var(--green); font-weight: 500; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
