@font-face { font-family: 'Plex Mono'; src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(/assets/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --side: #1d2230; --side-2: #262c3c; --side-3: #303749; --side-text: rgba(255,255,255,.72); --side-dim: rgba(255,255,255,.48);
  --bg: #f2f4f7; --card: #fff; --raised: #f6f7f9; --head: #f5f7fa; --line: #e6e9ef; --line-2: #d9dee6;
  --text: #1f2329; --text-2: #4e5969; --text-3: #86909c;
  --blue: #2563d8; --blue-d: #1d4fb0; --blue-bg: #ebf2ff; --blue-line: #b9cff7;
  --green: #12a150; --green-d: #0e8642; --green-bg: #e8f7ee;
  --orange: #e8710a; --orange-bg: #fff3e6; --red: #d93a32; --red-bg: #fdecea; --seal: #c8372d;
  --amber-row: #fdf7e7;
  --mono: 'Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', 'Helvetica Neue', Arial, sans-serif;
  --song: 'SimSun', '宋体', 'Songti SC', 'STSong', 'Noto Serif CJK SC', serif;
  --ease: cubic-bezier(.22,1,.36,1);
  --r: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 13px/1.5 var(--sans); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-d); }
button, input, select, textarea { font: inherit; color: inherit; }
.i { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.i-lg { width: 20px; height: 20px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.num { white-space: nowrap; }
.muted { color: var(--text-3); }
.sec { color: var(--text-2); }
.pos { color: var(--green); } .neg { color: var(--red); } .warn { color: var(--orange); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--blue-line); outline-offset: 1px; }

/* ---------------- shell ---------------- */
.shell { display: grid; grid-template-columns: 112px 1fr; height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 30; }
.side-brand { height: 56px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid rgba(255,255,255,.06); }
.side-brand img { width: 64px; filter: invert(1); opacity: .95; }
.side-brand img.raw, .login-art img.logo.raw { filter: none; background: #fff; border-radius: 6px; padding: 4px; }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 0; scrollbar-width: none; }
.side-item { display: flex; align-items: center; gap: 8px; height: 36px; margin: 2px 8px; padding: 0 10px; border-radius: 6px; color: var(--side-text); cursor: pointer; white-space: nowrap; transition: background-color .15s var(--ease), color .15s var(--ease); }
.side-item:hover, .side-item.hover { background: var(--side-2); color: #fff; }
.side-item.on { background: var(--blue); color: #fff; }
.side-item .i { opacity: .9; }
.side-foot { padding: 8px; border-top: 1px solid rgba(255,255,255,.06); }
.side-foot .side-item { margin: 0; }
.fly { position: absolute; left: 112px; top: 0; bottom: 0; min-width: 520px; background: var(--side-2); box-shadow: 8px 0 24px rgba(0,0,0,.18); padding: 24px 32px; display: none; color: var(--side-text); z-index: 40; }
.fly.on { display: block; animation: flyin .18s var(--ease); }
@keyframes flyin { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.fly-title { color: #fff; font-size: 15px; font-weight: 500; margin-bottom: 20px; }
.fly-cols { display: flex; gap: 48px; }
.fly-col h4 { margin: 0 0 12px; font-size: 13px; font-weight: 500; color: #fff; }
.fly-col a { display: block; color: var(--side-text); padding: 5px 0; font-size: 13px; }
.fly-col a:hover { color: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { height: 40px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: stretch; padding-left: 8px; flex: none; }
.tabs { display: flex; align-items: stretch; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tab { display: flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; position: relative; }
.tab + .tab::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.tab:hover { color: var(--text); }
.tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.tab .x { width: 14px; height: 14px; border-radius: 3px; display: grid; place-items: center; color: var(--text-3); }
.tab .x:hover { background: var(--raised); color: var(--text); }
.tab.home { padding: 0 14px; }
.top-r { display: flex; align-items: center; gap: 4px; padding: 0 12px; }
.gsearch { position: relative; }
.gsearch input { width: 220px; height: 28px; border: 1px solid var(--line); background: var(--raised); border-radius: 14px; padding: 0 12px 0 30px; outline: none; transition: border-color .15s, background-color .15s, width .2s var(--ease); }
.gsearch input:focus { background: #fff; border-color: var(--blue-line); }
.gsearch > .i { position: absolute; left: 10px; top: 6px; color: var(--text-3); }
.gsearch .drop { position: absolute; right: 0; top: 34px; width: 380px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--text-2); cursor: pointer; position: relative; border: 0; background: none; }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 11px; line-height: 16px; text-align: center; font-family: var(--mono); }
.me { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 4px; height: 32px; border-radius: 16px; cursor: pointer; margin-left: 4px; }
.me:hover { background: var(--raised); }
.page-wrap { flex: 1; overflow: auto; min-height: 0; }
.page { padding: 0 16px 24px; max-width: 1680px; }
.page-head { height: 44px; display: flex; align-items: center; gap: 12px; }
.page-head h1 { font-size: 16px; font-weight: 500; margin: 0; }
.page-head .crumb { color: var(--text-3); }
.page-head .r { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.org-switch { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 4px; cursor: default; }

/* avatar */
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; color: #fff; flex: none; }
.av-lg { width: 56px; height: 56px; font-size: 20px; }
.av-md { width: 32px; height: 32px; font-size: 13px; }
.tone0 { background: #5b7bd5; } .tone1 { background: #3e9c8f; } .tone2 { background: #c9824a; } .tone3 { background: #7d6aa8; } .tone4 { background: #5e8fb0; } .tone5 { background: #b4645e; }

/* ---------------- card / panel ---------------- */
.card { background: var(--card); border-radius: 8px; border: 1px solid var(--line); }
.card + .card { margin-top: 12px; }
.card-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px 0; min-height: 44px; }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.card-h h3::before { content: ''; width: 3px; height: 14px; background: var(--blue); border-radius: 2px; }
.card-h .r { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.card-b { padding: 12px 16px 16px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.dash { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 12px; align-items: start; }
.dash-main > * + * { margin-top: 12px; }
.dash-side > * + * { margin-top: 12px; }

/* collapsible section like ERP form */
.sect { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; }
.sect-h { display: flex; align-items: center; gap: 6px; padding: 0 16px; height: 44px; font-weight: 500; font-size: 14px; cursor: pointer; user-select: none; }
.sect-h .i { color: var(--text-3); transition: transform .18s var(--ease); }
.sect.closed .sect-h .i.caret { transform: rotate(-90deg); }
.sect.closed .sect-b { display: none; }
.sect-h .r { margin-left: auto; font-weight: 400; display: flex; gap: 8px; align-items: center; }
.sect-b { padding: 0 16px 16px; }

/* fields grid (read & edit) */
.fields { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px 32px; }
.fields.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.fields.c2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.f { min-width: 0; }
.f .lb { color: var(--text-3); font-size: 12px; line-height: 18px; margin-bottom: 2px; }
.f .lb .req { color: var(--red); margin-right: 2px; }
.f .vl { min-height: 30px; padding: 5px 0; border-bottom: 1px solid var(--line); word-break: break-all; }
.f.span2 { grid-column: span 2; } .f.span4 { grid-column: 1 / -1; }
.inp, .sel, textarea.inp { width: 100%; height: 30px; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 8px; background: #fff; outline: none; transition: border-color .15s; }
textarea.inp { height: auto; min-height: 64px; padding: 6px 8px; resize: vertical; }
.inp:hover, .sel:hover { border-color: #c0c7d2; }
.inp:focus, .sel:focus { border-color: var(--blue); }
.inp[readonly] { background: var(--raised); }
.inp.err { border-color: var(--red); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--line-2); background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; transition: background-color .12s, border-color .12s, color .12s, transform .08s; }
.btn:hover { border-color: var(--blue-line); color: var(--blue); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.pri { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.pri:hover { background: var(--blue-d); border-color: var(--blue-d); color: #fff; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ok:hover { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.btn.danger:hover { border-color: #f1b3ae; color: var(--red); }
.btn.text { border-color: transparent; background: none; color: var(--blue); padding: 0 6px; }
.btn.text:hover { background: var(--blue-bg); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 4px 0 0 4px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 4px 4px 0; }
.btn-group .btn.on { background: var(--blue); border-color: var(--blue); color: #fff; z-index: 1; }

/* list page (ERP style) */
.lp { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.lp-filter { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.lp-filter .search { position: relative; }
.lp-filter .search input { width: 260px; padding-left: 28px; }
.lp-filter .search .i { position: absolute; left: 8px; top: 7px; color: var(--text-3); }
.lp-filter .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 4px; background: var(--blue-bg); color: var(--blue); font-size: 12px; }
.chip .x { cursor: pointer; opacity: .7; } .chip .x:hover { opacity: 1; }
.lp-tools { display: flex; align-items: center; gap: 2px; padding: 8px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.lp-tools .sel-n { margin-right: 12px; color: var(--text-3); }
.tool { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 4px; cursor: pointer; color: var(--text-2); border: 0; background: none; }
.tool:hover { background: var(--raised); color: var(--text); }
.tool .i { width: 14px; height: 14px; }
.tool.blue .i { color: var(--blue); } .tool.red .i { color: var(--red); } .tool.green .i { color: var(--green); }
.lp-tools .r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lp-body { display: flex; min-height: 0; }
.lp-tree { width: 200px; flex: none; border-right: 1px solid var(--line); padding: 12px 8px; }
.lp-tree .tt { display: flex; justify-content: space-between; padding: 0 8px 8px; font-weight: 500; }
.lp-tree a { display: flex; justify-content: space-between; align-items: center; height: 30px; padding: 0 8px; border-radius: 4px; color: var(--text); }
.lp-tree a:hover { background: var(--raised); }
.lp-tree a.on { background: var(--blue-bg); color: var(--blue); }
.lp-tree a .n { color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.lp-main { flex: 1; min-width: 0; }
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { position: sticky; top: 0; background: var(--head); color: var(--text-2); font-weight: 500; text-align: left; height: 36px; padding: 0 10px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; font-size: 12px; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); }
.tbl td { height: 38px; padding: 4px 10px; border-bottom: 1px solid #eef0f4; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.tbl td.wrap { white-space: normal; }
.tbl tbody tr:hover td { background: #f6f9ff; }
.tbl tbody tr.sel td { background: var(--blue-bg); }
.tbl .r, .tbl th.r { text-align: right; }
.tbl .c, .tbl th.c { text-align: center; }
.tbl .idx { width: 44px; color: var(--text-3); text-align: center; font-family: var(--mono); font-size: 12px; }
.tbl .ck { width: 36px; text-align: center; }
.tbl tfoot td { background: var(--amber-row); font-weight: 500; border-bottom: 0; position: sticky; bottom: 0; }
.tbl.dense td { height: 32px; }
.tbl-empty { padding: 48px 0; text-align: center; color: var(--text-3); }
.lp-foot { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--text-2); }
.lp-foot .r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager .pg { min-width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; cursor: pointer; border: 1px solid transparent; font-family: var(--mono); font-size: 12px; background: none; }
.pager .pg:hover { border-color: var(--line-2); }
.pager .pg.on { background: var(--blue); color: #fff; }
.pager .pg[disabled] { opacity: .35; pointer-events: none; }
.cb { width: 14px; height: 14px; accent-color: var(--blue); cursor: pointer; vertical-align: -2px; }

/* status tags */
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 3px; font-size: 12px; border: 1px solid transparent; line-height: 1; white-space: nowrap; }
.tag.blue { background: var(--blue-bg); color: var(--blue); border-color: #d3e1fb; }
.tag.green { background: var(--green-bg); color: var(--green-d); border-color: #c6ebd5; }
.tag.orange { background: var(--orange-bg); color: #c45f08; border-color: #fbd9b6; }
.tag.red { background: var(--red-bg); color: var(--red); border-color: #f6c9c5; }
.tag.gray { background: var(--raised); color: var(--text-2); border-color: var(--line); }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; }

/* doc page (单据) */
.doc-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.doc-bar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.doc-body { position: relative; }
.seal { position: absolute; right: 24px; top: 10px; transform: rotate(-12deg); border: 2px solid var(--seal); color: var(--seal); padding: 2px 10px; border-radius: 4px; font-size: 15px; letter-spacing: 2px; font-weight: 500; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--seal); opacity: .86; pointer-events: none; user-select: none; background: rgba(255,255,255,.4); }
.seal.gray { border-color: #9aa3ae; color: #9aa3ae; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #9aa3ae; }
.sumbar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 32px; padding: 10px 24px; margin: 12px -16px -24px; z-index: 5; }
.sumbar .k { color: var(--text-2); } .sumbar .v { color: var(--orange); font-family: var(--mono); font-size: 16px; font-weight: 500; margin-left: 6px; }

/* timeline (approval steps) */
.flow { display: flex; align-items: flex-start; gap: 0; padding: 8px 0 4px; overflow-x: auto; }
.flow-step { flex: 1; min-width: 150px; position: relative; padding-right: 16px; }
.flow-step::after { content: ''; position: absolute; left: 22px; right: 0; top: 11px; height: 1px; background: var(--line-2); }
.flow-step:last-child::after { display: none; }
.flow-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-2); color: var(--text-3); position: relative; z-index: 1; }
.flow-step.done .flow-ic { background: var(--green); border-color: var(--green); color: #fff; }
.flow-step.now .flow-ic { background: var(--blue); border-color: var(--blue); color: #fff; }
.flow-step.rej .flow-ic { background: var(--red); border-color: var(--red); color: #fff; }
.flow-step .t { margin-top: 8px; font-weight: 500; }
.flow-step .s { color: var(--text-3); font-size: 12px; }
.flow-step .cm { margin-top: 4px; color: var(--text-2); font-size: 12px; background: var(--raised); padding: 4px 8px; border-radius: 4px; display: inline-block; }

/* dashboard */
.notice-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); }
.notice-bar .i { color: var(--blue); }
.notice-bar .x { margin-left: auto; cursor: pointer; color: var(--text-3); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: 8px; cursor: pointer; color: var(--text); }
.qa:hover { background: var(--raised); color: var(--text); }
.qa .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.qa .ic .i { width: 18px; height: 18px; stroke-width: 1.75; }
.c-blue { background: #3b78e7; } .c-teal { background: #15a39a; } .c-orange { background: #ef8a2f; } .c-rose { background: #e2596a; } .c-sky { background: #2f9bd8; } .c-green { background: #2fa866; } .c-amber { background: #d9a21b; } .c-slate { background: #5d6b82; } .c-coral { background: #e06a4e; } .c-indigo { background: #4b63c9; }
.todo-tabs { display: flex; gap: 16px; color: var(--text-2); }
.todo-tabs a { color: var(--text-2); padding-bottom: 2px; border-bottom: 2px solid transparent; cursor: pointer; }
.todo-tabs a.on { color: var(--blue); border-color: var(--blue); }
.todo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.todo { display: flex; gap: 10px; padding: 12px; background: var(--raised); border-radius: 6px; cursor: pointer; transition: background-color .15s; }
.todo:hover { background: #eef2f8; }
.todo .n { font-family: var(--mono); font-size: 22px; line-height: 28px; font-weight: 500; }
.todo .n.zero { color: var(--text-3); }
.todo .l { color: var(--text-2); font-size: 12px; }
.todo .ic { color: var(--blue); margin-top: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 4px 16px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .k { color: var(--text-2); font-size: 12px; }
.stat .v { font-family: var(--mono); font-size: 22px; font-weight: 500; line-height: 32px; white-space: nowrap; }
.stat .v small { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 2px; }
.stat .d { font-size: 12px; color: var(--text-3); }
.side-card .card-b { padding-top: 8px; }
.warn-list a { display: flex; gap: 8px; padding: 7px 0; color: var(--text); border-bottom: 1px dashed var(--line); align-items: flex-start; }
.warn-list a:last-child { border-bottom: 0; }
.warn-list .k { flex: none; font-size: 12px; padding: 0 6px; border-radius: 3px; line-height: 20px; }
.warn-list .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn-list .d { flex: none; color: var(--text-3); font-size: 12px; font-family: var(--mono); line-height: 20px; }
.nlist a { display: block; padding: 6px 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nlist a:hover { color: var(--blue); }
.nlist .d { color: var(--text-3); font-family: var(--mono); font-size: 12px; margin-right: 8px; }
.barlist .row { display: grid; grid-template-columns: 96px 1fr 88px; align-items: center; gap: 10px; height: 28px; }
.barlist .row .nm { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barlist .row .bar { height: 6px; background: var(--raised); border-radius: 3px; overflow: hidden; }
.barlist .row .bar i { display: block; height: 100%; background: #9db6e8; border-radius: 3px; }
.barlist .row.lead .bar i { background: var(--blue); }
.barlist .row .v { text-align: right; font-family: var(--mono); font-size: 12px; }
.year-bars { display: flex; align-items: flex-end; gap: 16px; height: 160px; padding: 8px 0 0; }
.year-bars .yb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.year-bars .col { width: 100%; max-width: 44px; background: #c6d5f2; border-radius: 4px 4px 0 0; }
.year-bars .yb.cur .col { background: var(--blue); }
.year-bars .yb.part .col { background: repeating-linear-gradient(135deg, #c6d5f2 0 4px, #dbe5f7 4px 8px); }
.year-bars .v { font-family: var(--mono); font-size: 12px; }
.year-bars .y { color: var(--text-3); font-size: 12px; font-family: var(--mono); }
.progress { height: 6px; background: var(--raised); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.legend { display: flex; gap: 14px; color: var(--text-2); font-size: 12px; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: 3px; }
.legend i.sq { height: 10px; width: 10px; border-radius: 2px; vertical-align: -1px; }

/* charts */
.chart { width: 100%; display: block; }
.chart .grid line { stroke: #edf0f4; }
.chart .ax text { fill: var(--text-3); font-size: 11px; font-family: var(--mono); }
.chart-tip { position: fixed; pointer-events: none; background: #1f2329; color: #fff; padding: 8px 10px; border-radius: 6px; font-size: 12px; z-index: 100; min-width: 140px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.chart-tip .r { display: flex; justify-content: space-between; gap: 16px; }
.chart-tip .r b { font-family: var(--mono); font-weight: 500; }

/* attendance */
.punch { display: grid; grid-template-columns: 340px 1fr; gap: 12px; }
.punch-card { text-align: center; padding: 28px 16px; }
.punch-btn { width: 148px; height: 148px; border-radius: 50%; border: 0; margin: 20px auto 12px; display: grid; place-items: center; align-content: center; gap: 4px; background: var(--blue); color: #fff; cursor: pointer; box-shadow: 0 0 0 8px var(--blue-bg); transition: transform .1s, background-color .15s; }
.punch-btn:hover { background: var(--blue-d); }
.punch-btn:active { transform: scale(.97); }
.punch-btn.out { background: var(--green); box-shadow: 0 0 0 8px var(--green-bg); }
.punch-btn .t1 { font-size: 18px; font-weight: 500; } .punch-btn .t2 { font-family: var(--mono); font-size: 14px; opacity: .9; }
.punch-meta { color: var(--text-2); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.punch-recs { display: flex; justify-content: center; gap: 32px; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.punch-recs .k { color: var(--text-3); font-size: 12px; } .punch-recs .v { font-family: var(--mono); font-size: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .h { text-align: center; padding: 6px 0; background: var(--head); color: var(--text-2); font-size: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .d { min-height: 72px; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.cal .d.off { background: #fafbfc; }
.cal .d .n { font-family: var(--mono); color: var(--text-2); display: flex; justify-content: space-between; }
.cal .d .n .hn { color: var(--red); font-family: var(--sans); }
.cal .d.today .n b { background: var(--blue); color: #fff; border-radius: 3px; padding: 0 4px; font-weight: 500; }
.cal .d .times { font-family: var(--mono); color: var(--text-2); margin-top: 4px; }
.mtx { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.mtx th, .mtx td { border-bottom: 1px solid #eef0f4; border-right: 1px solid #f2f4f7; padding: 0; height: 30px; text-align: center; min-width: 26px; }
.mtx th { background: var(--head); color: var(--text-2); font-weight: 500; position: sticky; top: 0; z-index: 2; }
.mtx th.we, .mtx td.we { background: #fafbfc; }
.mtx .nm { position: sticky; left: 0; background: #fff; text-align: left; padding: 0 10px; min-width: 120px; z-index: 1; white-space: nowrap; }
.mtx th.nm { z-index: 3; background: var(--head); }
.mk { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 3px; font-size: 11px; cursor: default; }
.mk.ok { color: var(--green); } .mk.late { background: var(--orange-bg); color: #c45f08; } .mk.miss { background: var(--red-bg); color: var(--red); }
.mk.lv { background: var(--blue-bg); color: var(--blue); } .mk.out { background: #eaf6f5; color: #15867e; } .mk.ot { background: #f2eefb; color: #6e55a8; }
.bal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bal .b { padding: 12px; background: var(--raised); border-radius: 6px; }
.bal .b .k { color: var(--text-2); font-size: 12px; } .bal .b .v { font-family: var(--mono); font-size: 18px; margin-top: 2px; }

/* org chart */
.org { display: flex; flex-direction: column; align-items: center; padding: 16px 0 24px; overflow-x: auto; }
.org-top { display: flex; gap: 16px; }
.org-node { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; min-width: 150px; }
.org-node .nm { font-weight: 500; } .org-node .ti { color: var(--text-3); font-size: 12px; }
.org-line { width: 1px; height: 20px; background: var(--line-2); }
.org-depts { display: flex; gap: 12px; position: relative; padding-top: 20px; align-items: flex-start; }
.org-depts::before { content: ''; position: absolute; top: 0; left: 80px; right: 80px; height: 1px; background: var(--line-2); }
.org-dept { width: 172px; position: relative; }
.org-dept::before { content: ''; position: absolute; top: -20px; left: 50%; height: 20px; width: 1px; background: var(--line-2); }
.org-dept .hd { background: var(--side); color: #fff; border-radius: 8px 8px 0 0; padding: 8px 12px; display: flex; justify-content: space-between; }
.org-dept .hd .n { opacity: .6; font-family: var(--mono); }
.org-dept .bd { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; background: #fff; padding: 6px; }
.org-dept .m { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 4px; }
.org-dept .m:hover { background: var(--raised); }
.org-dept .m.lead { background: var(--blue-bg); }
.org-dept .m .ti { color: var(--text-3); font-size: 12px; margin-left: auto; white-space: nowrap; }

/* project */
.ph { display: flex; gap: 16px; align-items: flex-start; }
.ph .cover { width: 72px; height: 72px; border-radius: 8px; flex: none; display: grid; place-items: center; color: rgba(255,255,255,.9); }
.song-tbl td.stg { padding: 4px 2px; width: 30px; }
.stg-dot { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; background: var(--raised); color: var(--text-3); font-size: 11px; cursor: pointer; border: 1px solid transparent; transition: background-color .12s; }
.stg-dot.done { background: var(--green); color: #fff; }
.stg-dot.late { background: var(--red-bg); color: var(--red); border-color: #f6c9c5; }
.stg-dot.next { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-line); }
.stg-dot:hover { border-color: var(--blue); }
.stg-head { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: -1px; font-size: 11px; height: 64px; padding: 4px 0 !important; color: var(--text-3); }
.track { display: flex; align-items: center; gap: 0; margin: 8px 0; }
.track .st { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--text-3); }
.track .st::before { content: ''; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.track .st:first-child::before { display: none; }
.track .st .o { width: 20px; height: 20px; border-radius: 50%; margin: 0 auto 6px; background: #fff; border: 2px solid var(--line-2); position: relative; z-index: 1; display: grid; place-items: center; }
.track .st.done { color: var(--text); } .track .st.done .o { background: var(--green); border-color: var(--green); color: #fff; }
.track .st.done::before { background: var(--green); }
.track .st.now .o { border-color: var(--blue); } .track .st.now { color: var(--blue); }
.song-card { display: grid; grid-template-columns: 240px 1fr; gap: 12px; }
.disc { aspect-ratio: 1; border-radius: 8px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 16px; color: #fff; }
.disc .t { font-size: 20px; font-weight: 500; line-height: 1.2; }
.disc .a { opacity: .8; margin-top: 4px; }
.cv0 { background: #2d3b55; } .cv1 { background: #3d5a4f; } .cv2 { background: #6b4a3a; } .cv3 { background: #4a4560; } .cv4 { background: #2f5468; } .cv5 { background: #5e3f45; }
.disc::before { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: repeating-radial-gradient(circle, rgba(255,255,255,.08) 0 1px, transparent 1px 5px); }
.disc::after { content: ''; position: absolute; right: 30px; top: 30px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.14); box-shadow: 0 0 0 12px rgba(0,0,0,.06); }
.credit { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; }
.credit .k { color: var(--text-3); }

/* contract paper */
.paper-wrap { background: #e9ecf1; padding: 24px; border-radius: 8px; overflow: auto; }
.paper { width: 794px; min-height: 1123px; margin: 0 auto 24px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06); padding: 96px 120px; font-family: var(--song); font-size: 16px; line-height: 2; color: #000; position: relative; }
.paper.cover { display: flex; flex-direction: column; }
.paper .no { text-align: right; font-size: 16px; }
.paper .ctitle { text-align: center; font-size: 34px; font-weight: bold; margin-top: 210px; letter-spacing: 2px; }
.paper .parties { margin-top: auto; font-size: 18px; line-height: 3; }
.paper .parties u { text-decoration: none; border-bottom: 1px solid #000; display: inline-block; min-width: 360px; padding: 0 4px; line-height: 1.6; }
.paper h2 { text-align: center; font-size: 24px; margin: 0 0 16px; }
.paper h4 { font-size: 16px; margin: 8px 0 0; }
.paper p { margin: 0; text-indent: 2em; }
.paper p.pl { text-indent: 0; }
.paper table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; margin: 6px 0 10px; }
.paper table td, .paper table th { border: 1px solid #000; padding: 6px 6px; text-align: center; }
.paper .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 24px; line-height: 2.6; }
.paper .pno { position: absolute; bottom: 40px; left: 0; right: 0; text-align: center; font-size: 12px; }
.paper .stamp { position: absolute; width: 132px; height: 132px; border: 3px solid rgba(200,55,45,.75); border-radius: 50%; color: rgba(200,55,45,.8); display: grid; place-items: center; font-size: 13px; transform: rotate(-8deg); }

/* modal, toast, dropdown */
.mask { position: fixed; inset: 0; background: rgba(15,20,30,.38); z-index: 200; display: grid; place-items: center; animation: fade .16s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 10px; width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 48px); display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.2); animation: rise .22s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.modal.lg { width: 860px; }
.modal-h { display: flex; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.modal-h .x { margin-left: auto; cursor: pointer; color: var(--text-3); }
.modal-b { padding: 16px 20px; overflow: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.toast-host { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.1); display: flex; gap: 8px; align-items: center; animation: rise .2s var(--ease); }
.toast.ok .i { color: var(--green); } .toast.err .i { color: var(--red); }
.drop { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 4px; z-index: 150; animation: rise .16s var(--ease); }
.drop a, .drop .it { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 4px; color: var(--text); cursor: pointer; }
.drop a:hover, .drop .it:hover { background: var(--raised); }
.drop .grp { color: var(--text-3); font-size: 12px; padding: 6px 10px 2px; }
.drop .sub { color: var(--text-3); font-size: 12px; margin-left: auto; white-space: nowrap; }
.menu-pop { position: fixed; min-width: 180px; }

/* misc */
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; }
.kv .k { color: var(--text-3); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.tl { position: relative; padding-left: 18px; }
.tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl .it { position: relative; padding: 0 0 14px; }
.tl .it::before { content: ''; position: absolute; left: -17px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--blue-line); }
.tl .it .d { color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.cmts .c { display: flex; gap: 10px; padding: 8px 0; }
.cmts .c .b { flex: 1; } .cmts .c .m { color: var(--text-3); font-size: 12px; }
.empty { padding: 40px 0; text-align: center; color: var(--text-3); }
.files a, .files .fi { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.files .fi .s { margin-left: auto; color: var(--text-3); font-size: 12px; }
.seg { display: inline-flex; background: var(--raised); border-radius: 6px; padding: 2px; }
.seg a { padding: 3px 10px; border-radius: 4px; color: var(--text-2); cursor: pointer; }
.seg a.on { background: #fff; color: var(--blue); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.steps-wiz { display: flex; gap: 0; justify-content: center; padding: 8px 0; }
.kpi-line { display: flex; gap: 32px; flex-wrap: wrap; }
.kpi-line .x .k { color: var(--text-3); font-size: 12px; } .kpi-line .x .v { font-family: var(--mono); font-size: 20px; }
.items-tbl input { border: 0; height: 30px; width: 100%; padding: 0 6px; outline: none; background: transparent; }
.items-tbl td { padding: 0 4px !important; }
.items-tbl input:focus { background: #f6f9ff; }
.fade-in { animation: rise .3s var(--ease); }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 480px; background: #fff; }
.login-art { background: var(--side); position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 48px 56px; color: rgba(255,255,255,.8); }
.login-art img.logo { width: 120px; filter: invert(1); }
.login-art .slogan { margin-top: auto; font-size: 13px; color: rgba(255,255,255,.5); }
.login-art .name { font-size: 28px; color: #fff; letter-spacing: 4px; margin-top: 8px; }
.login-art svg.wave { position: absolute; left: 0; right: 0; top: 34%; width: 100%; height: 220px; opacity: .55; }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 48px 64px; }
.login-form h2 { font-size: 22px; font-weight: 500; margin: 0 0 4px; }
.login-form .sub { color: var(--text-3); margin-bottom: 32px; }
.login-form .inp { height: 40px; font-size: 14px; padding: 0 12px; }
.login-form .row { margin-bottom: 16px; }
.login-form .btn { height: 40px; width: 100%; font-size: 14px; }
.login-form .err { color: var(--red); min-height: 20px; margin-bottom: 8px; }
.login-form .foot { margin-top: 48px; color: var(--text-3); font-size: 12px; }

@media (max-width: 1200px) { .dash { grid-template-columns: minmax(0, 1fr); } .fields { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .side { min-width: 0; } .page { padding: 0 12px 24px; } .card-h .r { flex-wrap: wrap; } .me span:not(.av) { display: none; }
  .side { flex-direction: row; height: 48px; }
  .side-brand { width: 64px; height: 48px; border: 0; }
  .side-nav { display: flex; padding: 0; overflow-x: auto; }
  .side-item { height: 36px; margin: 6px 2px; }
  .side-foot, .fly { display: none !important; }
  .tabs { display: none; }
  .gsearch input { width: 140px; }
  .fields, .fields.c3 { grid-template-columns: 1fr 1fr; }
  .g2, .g3, .g4, .split, .punch, .song-card, .grid { grid-template-columns: minmax(0, 1fr) !important; }
  .card-b, .sect-b { overflow-x: auto; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { border: 0; padding: 0; }
  .lp-tree { display: none; }
  .login { grid-template-columns: 1fr; } .login-art { min-height: 200px; }
  .paper { transform-origin: top left; }
}
@media print {
  .side, .top, .page-head, .doc-bar, .no-print { display: none !important; }
  .shell { display: block; } .page-wrap { overflow: visible; }
  .paper-wrap { background: none; padding: 0; } .paper { box-shadow: none; margin: 0; page-break-after: always; }
}
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
