/* 스마트 ERP 웹 — 기존 프로그램의 남색 헤더와 파란 표 머리를 이어받는다 */
/* 바탕 테마 — 기존 ERP 현황판(일정표) 배경을 본떴다. <html data-theme="…"> 로 바꾼다 (prefs.js) */
:root {
  --navy: #0b3a75;
  --navy-2: #134f9c;
  --blue: #0a6fc4;
  --bg1: #c4daf0; --bg2: #e0edfa; --bg3: #f2f8fe;
  --bg: #f3f7fc;
  --panel: #ffffff;
  --line: #d6dfeb;
  --fg: #16202e;
  --muted: #56657a;
  --head: #e6f0fb;
  --ok: #17803d;
  --bad: #c62828;
  --warn: #a15c00;
  --c1: #1f6fd1;
  --c2: #e07b24;
  --c3: #2f9e74;
  --grey: #b9c3d1;
  --grid: #e8edf3;
  --shadow: 0 1px 3px rgba(16, 42, 80, .07), 0 4px 14px rgba(16, 42, 80, .05);
  --pattern: url(../img/bg-board.svg);
  --font: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Microsoft YaHei", "PingFang SC", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --num: "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="green"]  { --navy: #0e4d3c; --navy-2: #146150; --blue: #12805f; --bg1: #c6e4d6; --bg2: #e2f2ea; --bg3: #f3faf6; --bg: #f3faf6; --head: #e2f2ea; --line: #d3e3db; --c1: #12805f; --c3: #1f6fd1; }
:root[data-theme="purple"] { --navy: #33246e; --navy-2: #45338a; --blue: #5b41bf; --bg1: #d8cff0; --bg2: #ebe6f8; --bg3: #f7f5fd; --bg: #f7f5fd; --head: #ece8f8; --line: #ddd7ee; --c1: #5b41bf; }
:root[data-theme="orange"] { --navy: #6b3410; --navy-2: #84451a; --blue: #b2541a; --bg1: #f2d9c2; --bg2: #f9eadd; --bg3: #fdf7f1; --bg: #fdf7f1; --head: #fbeee2; --line: #ecdccd; --c1: #b2541a; --c2: #1f6fd1; }
:root[data-theme="gray"]   { --navy: #27313d; --navy-2: #36424f; --blue: #46596f; --bg1: #d3d9e0; --bg2: #e7ebef; --bg3: #f6f7f9; --bg: #f6f7f9; --head: #e9edf1; --line: #d9dee4; }
:root[data-theme="dark"] {
  --navy: #081426; --navy-2: #0f223d; --blue: #2a6cbd;
  --bg1: #0b1526; --bg2: #0f1c31; --bg3: #14243b; --bg: #0f1c31;
  --panel: #172338; --line: #2a3a54; --fg: #e6ecf5; --muted: #9aa8bc; --head: #1e2d47;
  --ok: #5cc98a; --bad: #ff7b72; --warn: #e3a63c; --c1: #5aa2ff; --c2: #f0a05a; --c3: #4cc79a; --grey: #48566b; --grid: #253049;
  --shadow: 0 1px 3px rgba(0, 0, 0, .3);
  --pattern: url(../img/bg-board-dark.svg);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg3); color: var(--fg); font-family: var(--font); font-size: 14px; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* 로그인 */
.login { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px max(16px, env(safe-area-inset-left)); background: url(../img/bg-board.svg) center top / cover no-repeat, linear-gradient(150deg, color-mix(in srgb, var(--blue) 80%, #fff) 0%, var(--blue) 40%, var(--navy) 100%); }
.login-card { width: min(380px, 100%); background: var(--panel); border-radius: 12px; padding: 28px; box-shadow: 0 12px 40px rgba(5, 25, 60, .25); display: flex; flex-direction: column; gap: 8px; }
.login-card label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.login-card input { height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: var(--bg); }
.login-card button { height: 46px; margin-top: 8px; border: 0; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 700; }
.login-card button:disabled { opacity: .6; }
.login-company { margin: 6px 0 4px; font-size: 18px; font-weight: 700; }
.login-error { min-height: 1.2em; margin: 4px 0 0; color: var(--bad); font-size: 13px; white-space: pre-line; }
.login-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; letter-spacing: .08em; font-size: 13px; }
.brand span { display: block; font-size: 12px; color: var(--muted); }
.brand.small b { color: #fff; font-size: 11px; }
.brand.small span { color: #c9dbf5; font-size: 12px; }

/* 앱 틀 */
.app { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr; height: 100%; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; background: var(--navy); color: #fff; padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); min-height: 56px; }
.screen-title { margin: 0 0 0 12px; font-size: 18px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.topbar .user { color: #dbe7f8; white-space: nowrap; }
.text-btn { background: transparent; border: 1px solid rgba(255, 255, 255, .4); color: #fff; border-radius: 6px; padding: 5px 10px; }
.icon-btn { background: transparent; border: 0; color: #fff; padding: 6px; border-radius: 6px; display: none; }
.demo-badge { background: #ffd54a; color: #3b2a00; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }

.sidebar { background: var(--panel); border-right: 1px solid var(--line); overflow: auto; padding: 10px 6px 24px; font-size: 13px; }
.sidebar details { margin: 0; }
.sidebar summary { list-style: none; cursor: pointer; padding: 6px 8px; border-radius: 6px; display: flex; align-items: center; gap: 6px; user-select: none; }
.sidebar summary::-webkit-details-marker { display: none; }
.sidebar summary::before { content: "▸"; color: var(--muted); font-size: 11px; width: 10px; transition: transform .15s; }
.sidebar details[open] > summary::before { transform: rotate(90deg); }
.sidebar .top > summary { font-weight: 700; }
.sidebar .grp { margin-left: 12px; }
.sidebar .grp > summary { color: var(--muted); }
.sidebar ul { list-style: none; margin: 0 0 4px 28px; padding: 0; }
.sidebar li a, .sidebar li span, .sidebar .home { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; text-decoration: none; color: inherit; }
.sidebar li span { color: var(--muted); opacity: .7; cursor: default; }
.sidebar li a:hover, .sidebar .home:hover { background: var(--head); }
.sidebar a.active { background: var(--blue); color: #fff; }
.sidebar .home { font-weight: 700; margin-bottom: 4px; }
.tag { font-size: 10px; border-radius: 4px; padding: 0 5px; border: 1px solid currentColor; opacity: .85; white-space: nowrap; }
.sidebar .legend { margin: 14px 8px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.scrim { display: none; }

.content { overflow: auto; background: var(--pattern) center top / cover no-repeat, linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 42%, var(--bg3) 100%); padding: 18px max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); min-width: 0; }

/* 공통 블록 */
.lead { margin: 0 0 14px; line-height: 1.7; max-width: 76ch; }
.lead b { font-weight: 700; }
.asof { color: var(--muted); font-size: 12px; margin: -6px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .lab { color: var(--muted); font-size: 12px; }
.tile .val { font-family: var(--num); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile .sub { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tile.alert { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.up { color: var(--ok); } .down { color: var(--bad); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 12px; margin-bottom: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.card h2 { margin: 0; font-size: 15px; }
.card .note { margin: 0; color: var(--muted); font-size: 12px; }
.chart { position: relative; min-height: 220px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--num); }
.chart .lbl { fill: var(--fg); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); padding: 6px 9px; font-size: 12px; white-space: nowrap; z-index: 5; }
.tip .t { color: var(--muted); margin-bottom: 2px; }

/* 표 — 기존 프로그램처럼 파란 머리줄 */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; max-height: 60vh; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.grid th { position: sticky; top: 0; background: var(--blue); color: #fff; font-weight: 600; text-align: center; padding: 7px 8px; white-space: nowrap; z-index: 1; }
table.grid td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--head) 45%, transparent); }
table.grid tbody tr.click { cursor: pointer; }
table.grid tbody tr.click:hover td, table.grid tbody tr.sel td { background: var(--head); }
table.grid .num { text-align: right; }
table.grid tfoot td { font-weight: 700; background: var(--head); position: sticky; bottom: 0; }
.chip { display: inline-block; border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; font-size: 11px; line-height: 18px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* 조회 조건 */
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.filters input { height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: var(--bg); min-width: 0; }
.btn { height: 34px; border-radius: 6px; border: 1px solid var(--navy); background: var(--navy); color: #fff; padding: 0 14px; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 0 10px; height: 34px; color: var(--fg); }
.seg button.on { background: var(--navy); color: #fff; }
.count { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.detail { margin-top: 12px; }
.msg { padding: 40px 16px; text-align: center; color: var(--muted); }
.msg.err { color: var(--bad); }
.skeleton { background: linear-gradient(90deg, var(--grid), var(--head), var(--grid)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* 휴대폰 */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar { gap: 8px; min-width: 0; }
  .topbar-right { gap: 6px; flex: none; }
  .topbar .text-btn { padding: 5px 8px; white-space: nowrap; }
  .demo-badge { display: none; }
  .icon-btn { display: inline-flex; }
  .brand.small { display: none; }
  .screen-title { margin-left: 0; font-size: 16px; }
  .topbar .user { display: none; }
  .sidebar { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: min(300px, 85vw); transform: translateX(-100%); transition: transform .2s; padding-top: calc(12px + env(safe-area-inset-top)); box-shadow: 0 0 30px rgba(0, 0, 0, .25); }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 15; }
  .hide-m { display: none; }
  .tile .val { font-size: 21px; }
}

/* 대시보드 탭 */
.dash-tabs { display: flex; gap: 6px; overflow-x: auto; margin: -4px 0 14px; padding-bottom: 2px; scrollbar-width: none; }
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tabs a { flex: none; text-decoration: none; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.dash-tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.sidebar ul.flat { margin-left: 18px; }
.buckets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bucket { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.bucket b { font-family: var(--num); font-size: 20px; }
.bucket span { font-size: 12px; color: var(--muted); }
.bucket.bad b { color: var(--bad); } .bucket.warn b { color: var(--warn); } .bucket.ok b { color: var(--ok); }
.chip.warn { color: var(--warn); } .chip.muted { color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-bottom: 12px; }
.card .foot { margin: 0; color: var(--muted); font-size: 12px; }

/* 공통 조회 화면 */
.grid-screen table.grid th:first-child, .grid-screen table.grid td:first-child { position: sticky; left: 0; z-index: 1; }
.grid-screen table.grid th:first-child { z-index: 2; }
.grid-screen table.grid td:first-child { background: var(--panel); }
.grid-screen table.grid tbody tr:nth-child(even) td:first-child { background: color-mix(in srgb, var(--head) 45%, var(--panel)); }
table.grid th { cursor: pointer; user-select: none; }
table.grid th.num { text-align: right; }
table.grid th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
table.grid th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
.sidebar .grp ul li a { font-size: 13px; }

.login-logo { width: min(300px, 70vw); height: auto; filter: drop-shadow(0 6px 14px rgba(0, 20, 60, .35)); }
.login-title { margin: 0 0 6px; font-size: 20px; text-align: center; color: var(--fg); }
.brand.small img { width: auto; height: 22px; }

/* 바탕 위의 판들 — 현황판처럼 흰 판이 떠 보이게 */
.tile, .card, .filters, .table-wrap { box-shadow: var(--shadow); }
.table-wrap { background: var(--panel); }
.dash-tabs a { box-shadow: var(--shadow); }

/* 설정 (언어·바탕색) */
.prefs-wrap { position: relative; }
.prefs-btn { display: inline-flex; align-items: center; gap: 5px; }
.prefs-btn svg { flex: none; }
.prefs { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(320px, calc(100vw - 24px)); background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(5, 25, 60, .25); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.prefs h3 { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.langs button { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--fg); font-size: 13px; }
.langs button.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatches button { border: 2px solid transparent; border-radius: 10px; background: transparent; padding: 0; color: var(--fg); font-size: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.swatches button.on { border-color: var(--blue); box-shadow: none; }
.swatches .sw { display: block; height: 38px; position: relative; }
.swatches .sw::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 9px; background: var(--sw-top); }
.swatches .nm { padding: 4px 0 5px; }
.login-prefs { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.login-prefs .text-btn { background: rgba(255, 255, 255, .12); }
@media (max-width: 860px) { .prefs-btn .lbl { display: none; } }

/* ── 등록·수정 창 ── */
.btn.add { background: var(--blue); border-color: var(--blue); margin-left: auto; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn:disabled, .busy .btn { opacity: .55; pointer-events: none; }
.card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-head h2 { margin-right: auto; }
.card-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tools .btn.add { margin-left: 0; }
.form-dlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg); box-shadow: 0 20px 60px rgba(5, 25, 60, .35); display: flex; flex-direction: column; }
.form-dlg:not([open]) { display: none; }
.form-dlg.wide { width: min(980px, calc(100vw - 24px)); }
.form-dlg::backdrop { background: rgba(8, 20, 40, .45); }
.form-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.form-head h2 { margin: 0; font-size: 16px; flex: 1; }
.form-x { display: inline-flex; color: var(--muted); font-size: 22px; line-height: 1; width: 34px; height: 34px; align-items: center; justify-content: center; }
.form-x:hover { background: var(--head); }
.form-body { padding: 14px 16px; overflow: auto; flex: 1; }
.form-body .note { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.form-msg:empty { display: none; }
.form-msg { margin: 10px 16px 0; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.form-msg.err { background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.form-msg.ok { background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
.form-dlg.wide .form-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld.wide { grid-column: 1 / -1; }
.fld .lab { font-size: 12px; color: var(--muted); font-weight: 600; }
.fld .lab b { color: var(--bad); }
.fld small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.fld input, .fld select, .fld textarea, .lines input, .lines select { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); font: inherit; font-size: 14px; }
.fld textarea { height: auto; padding: 8px 9px; resize: vertical; }
.fld input.num, .lines input.num { text-align: right; font-family: var(--num); }
.fld input:focus, .fld select:focus, .fld textarea:focus, .lines input:focus, .lines select:focus { outline: 2px solid color-mix(in srgb, var(--blue) 45%, transparent); border-color: var(--blue); }
.fld .ro { min-height: 34px; display: flex; align-items: center; padding: 0 9px; border-radius: 6px; background: var(--head); color: var(--muted); font-size: 13.5px; }
.pick-info { font-size: 11.5px; color: var(--ok); margin-top: 2px; min-height: 14px; }
.form-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.form-foot .sp { flex: 1; }
.form-foot .btn { min-width: 84px; }
.lines-head { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lines-head .fld { flex: 1; min-width: 260px; }
.table.lines td, .grid.lines td { padding: 4px 6px; vertical-align: top; }
.grid.lines .icon-btn { display: inline-flex; color: var(--bad); font-size: 18px; }
.grid.lines .pick { min-width: 180px; }
.lines-tools { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.lines-tools small { color: var(--muted); }
/* 전표(수주서·발주서) */
.form-dlg.doc { width: min(1100px, calc(100vw - 24px)); }
.doc-sub { margin: 16px 0 6px; font-size: 15px; }
.grid.lines td.amt { white-space: nowrap; padding-top: 10px; font-variant-numeric: tabular-nums; }
.grid.lines input.num { width: 7.5em; }
.grid.lines input[type=date] { width: 9.5em; }
.doc-total { display: flex; justify-content: flex-end; gap: 22px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--soft, rgba(0,0,0,.04)); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.doc-total b { font-size: 16px; margin-left: 4px; }
/* 사용자 권한 */
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 14px; margin-top: 10px; max-height: 52vh; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.perm-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.perm-item:hover { background: var(--soft, rgba(0,0,0,.04)); }
.perm-item .pid { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); min-width: 64px; }
.perm-item input:disabled + .pid { opacity: .5; }
.muted { color: var(--muted); }
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: opacity .3s, transform .3s; }
.toast.err { background: var(--bad); border-radius: 10px; }
.toast.out { opacity: 0; transform: translateY(6px); }
@media (max-width: 640px) {
  .form-dlg, .form-dlg.wide { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .form-grid, .form-dlg.wide .form-grid { grid-template-columns: 1fr; }
  .btn.add { margin-left: 0; }
}
.demo-badge.test { background: #d9480f; color: #fff; }

/* 접속 기기(라이선스) */
.dev-set { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.dev-grid td { vertical-align: top; }
.dev-grid .small { font-size: 12px; }
.dev-btns { white-space: nowrap; }
.dev-btns .btn { height: 30px; padding: 0 10px; margin: 0 4px 4px 0; }
.chip.dev-ok { background: #e6f4ea; color: #1b5e20; }
.chip.dev-pending { background: #fff4e0; color: #8a5300; }
.chip.dev-blocked { background: #fdecea; color: #b71c1c; }
tr.st-blocked td { color: var(--muted, #888); }
.dev-grid .tag.warn { color: var(--warn, #b26a00); }

/* 생산지시 출고 (스캔) */
.issue-bar { align-items: flex-end; flex-wrap: wrap; }
.issue-bar .scan-lab { flex: 1 1 320px; }
.issue-bar .scan-in { width: 100%; font-size: 1.15rem; padding: .55rem .7rem; border: 2px solid var(--accent, #2b6cb0); border-radius: 8px; }
.issue-mats td.lots { white-space: normal; }
.issue-mats tr.done td { opacity: .6; }
.lotchip { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 7px; border-radius: 10px; font-size: .82rem; border: 1px solid var(--line, #ccd); white-space: nowrap; }
.lotchip.first { border-color: #2f855a; background: rgba(47,133,90,.1); }
.lotchip.bad { border-color: #c53030; color: #c53030; background: rgba(197,48,48,.08); }
.grid.qtylist { width: auto; min-width: 280px; } .grid.qtylist td { padding: 4px 8px; }
/* 실사재고 처리 */
.split2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .split2 { grid-template-columns: minmax(0, 1fr); } }
table.grid tbody tr.clickable { cursor: pointer; }
table.grid tbody tr.clickable:hover td { background: var(--head); }
table.grid td.neg { color: #c62828; }
table.grid tbody tr.forced td { background: rgba(255, 193, 7, .12); }
table.grid tbody tr.carry td { color: var(--muted, #667); }
.mode-tabs { display: inline-flex; gap: 6px; margin-left: auto; }
.route-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
b.judge.neg, table.grid td.neg { color: #c62828; }
b.judge.ok, table.grid td.ok { color: #1565c0; }
table.grid.insp td input, table.grid.insp td select { min-width: 0; }
.btn.sm { padding: 2px 8px; font-size: 12px; }
.btn.ok { background: #1565c0; color: #fff; }
dialog.form-dlg.wide:has(table.insp) { width: 96vw; max-width: 96vw; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #bdbdbd; vertical-align: middle; }
.dot.green { background: #2e7d32; } .dot.orange { background: #ef8f00; } .dot.red { background: #d32f2f; }
.btn.lamp.none { background: transparent; color: inherit; border: 1px solid #cfd8dc; }
.btn.lamp.green { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.btn.lamp.orange { background: #ef8f00; color: #fff; border-color: #ef8f00; }
.btn.lamp.red { background: #d32f2f; color: #fff; border-color: #d32f2f; }
p.legend { font-size: 13px; margin: 6px 0 0; }
input.ok-ng.neg { color: #c62828; font-weight: 600; }
/* 시스템 관리자 · 맞춤 설정 */
.notice-bar { background: #fff4d6; color: #5a4300; border-bottom: 1px solid #f0d58a; padding: 8px 16px; font-size: 14px; }
#sidebar a.sys-link { font-weight: 700; }
#sidebar a.hidden-item { opacity: .55; }
.sys-menu { display: grid; gap: 10px; }
.sys-top > summary { cursor: pointer; padding: 6px 0; }
.sys-grp { margin: 4px 0 10px 22px; }
.sys-grp h4 { margin: 6px 0 4px; font-size: 13px; color: #546e7a; }
.sys-grp ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px; }
.sys-grp li.off { color: #9e9e9e; text-decoration: line-through; }
label.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sys-set h4 { margin: 0 0 8px; }
.sys-rows { display: grid; gap: 10px; }
.sys-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; align-items: center; gap: 8px 12px; }
.sys-row label { display: flex; flex-direction: column; gap: 4px; }
.sys-row .note { grid-column: 1 / -1; margin: -4px 0 0; }
@media (max-width: 700px) { .sys-row { grid-template-columns: 1fr; } }
/* 생산계획 입력 */
.plan-grid td, .plan-grid th { white-space: nowrap; }
.plan-grid th.sun, .plan-grid th.sun small { color: #d32f2f; } .plan-grid th.sat, .plan-grid th.sat small { color: #1565c0; }
.plan-grid th.today, .plan-grid td.today { box-shadow: inset 0 2px 0 #ef8f00; }
.plan-grid td.due { background: rgba(255, 193, 7, .22); }
.plan-grid input.plan-cell { padding: 2px 4px; text-align: right; }
.plan-grid input.plan-cell.edited, .legend .sw.edited { background: #e3f2fd; border-color: #1565c0; }
.legend .sw { display: inline-block; width: 14px; height: 12px; border: 1px solid #b0bec5; vertical-align: middle; }
.legend .sw.due { background: rgba(255, 193, 7, .35); }
.plan-grid tr.grp-first td { border-top: 2px solid #90a4ae; }
.plan-grid tr.plan-sum td, .plan-grid tr.order-sum td { background: rgba(120, 144, 156, .10); font-size: .92em; }
.plan-grid tr.order-sum td { font-weight: 600; }
.plan-grid td.neg { color: #d32f2f; }
/* 품목 조건 줄 */
.filters.item-filters { margin-top: -6px; }
.item-filters .trio { display: inline-flex; gap: 4px; }
.item-filters select { max-width: 170px; min-height: 34px; }
/* 표 칸 구분선 (2026-11-18 요청: 칸 구분이 안 돼 보기 힘듦) — 모든 표에 세로·가로 선 */
table.grid { border: 1px solid color-mix(in srgb, var(--line) 55%, #7f8fa6); }
table.grid td { border: 1px solid color-mix(in srgb, var(--line) 70%, #7f8fa6); }
table.grid th { border-right: 1px solid rgba(255, 255, 255, .35); border-bottom: 1px solid color-mix(in srgb, var(--blue) 70%, #000); }
table.grid th:last-child { border-right: 0; }
:root[data-theme="dark"] table.grid td { border-color: #33476a; }
/* 메뉴 트리: 전체 열기·닫기, 즐겨찾기 ☆ */
.sidebar .menu-tools { display: flex; gap: 6px; margin: 0 6px 8px; }
.sidebar .menu-tools .btn { flex: 1; padding: 4px 6px; font-size: 12px; min-height: 0; }
.sidebar li { display: flex; align-items: center; }
.sidebar li > a { flex: 1; min-width: 0; }
.fav-star { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 2px 6px; opacity: 0; transition: opacity .1s; }
.sidebar li:hover .fav-star, .sidebar li:focus-within .fav-star, .fav-star.on, .fav-star:focus-visible { opacity: 1; }
.fav-star.on { color: #f2a900; }
.fav-star.head { opacity: 1; font-size: 20px; vertical-align: middle; color: rgba(255, 255, 255, .75); }
.fav-star.head.on { color: #ffc93c; }
.sidebar .fav > summary { color: #b07800; }
.sidebar .fav-empty { color: var(--muted); font-size: 11px; padding: 4px 8px; }
@media (hover: none) { .fav-star { opacity: .55; } }
/* 일정표 */
.cal-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 14px; align-items: start; }
.cal-side { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.cal-side-title { background: var(--blue); color: #fff; font-weight: 700; text-align: center; border-radius: 6px; padding: 7px; margin-bottom: 8px; letter-spacing: .3em; }
.cal-box { margin-bottom: 10px; }
.cal-box > label { color: var(--blue); }
.cal-list { margin-top: 4px; max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: var(--bg); font-size: 12px; }
.cal-list p { margin: 4px; }
.cal-line { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 3px 4px; border-radius: 4px; cursor: pointer; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: inherit; }
.cal-line:hover { background: var(--head); }
.cal-line .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-ver ul { margin: 2px 0 6px 16px; padding: 0; }
.cal-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-title { margin: 0 10px; font-size: 26px; color: var(--navy, #0b2f63); }
.cal-head .today-btn { margin-left: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cal-wd { background: var(--blue); color: #fff; text-align: center; font-weight: 700; padding: 6px; border-right: 1px solid rgba(255, 255, 255, .35); }
.cal-cell { min-height: 104px; border: 0; border-right: 1px solid color-mix(in srgb, var(--line) 70%, #7f8fa6); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, #7f8fa6); background: var(--panel); text-align: left; padding: 4px 5px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.cal-cell:hover { background: var(--head); }
.cal-cell.empty { cursor: default; background: color-mix(in srgb, var(--bg) 70%, var(--panel)); }
.cal-cell.today { box-shadow: inset 0 0 0 2px #ef8f00; }
.cal-day { font-weight: 700; color: var(--blue); }
.cal-cell.sun .cal-day, .cal-wd.sun { color: #d32f2f; } .cal-wd.sun { color: #fff; background: #c62828; }
.cal-cell.sat .cal-day { color: #1565c0; }
.cal-item { display: block; font-size: 11.5px; line-height: 1.35; padding: 1px 4px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item.notice { background: rgba(211, 47, 47, .12); color: #b71c1c; }
.cal-item.mine { background: rgba(46, 125, 50, .13); color: #1b5e20; }
.cal-item.ship { background: rgba(21, 101, 192, .10); color: #0d47a1; }
.cal-item.more { color: var(--muted); }
:root[data-theme="dark"] .cal-item.notice { color: #ff9e9e; } :root[data-theme="dark"] .cal-item.mine { color: #9be29f; } :root[data-theme="dark"] .cal-item.ship { color: #9cc4ff; }
@media (max-width: 900px) { .cal-wrap { grid-template-columns: 1fr; } .cal-cell { min-height: 64px; } .cal-item { font-size: 10.5px; } .cal-title { font-size: 20px; } }
/* 표 머리글은 모두 가운데 정렬 (2026-11-18 요청) */
table.grid th, table.grid th.num { text-align: center; }
.cal-head h2.cal-title { font-size: 28px; font-weight: 800; }
/* 줄이 많은 표: 아래 모서리를 끌어 늘리기 */
.table-wrap.resizable { resize: vertical; min-height: 120px; }
.table-wrap.resizable::after { content: ""; }
.popout-btn { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 900px) { .popout-btn { display: none; } }
/* 검색창 (화면 위 조회 조건 줄) — VB 처럼 하늘색 바탕 + 진한 파랑 굵은 글씨 (2026-11-18 요청) */
.filters {
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 9%, #fff) 0%, color-mix(in srgb, var(--blue) 18%, #fff) 100%);
  border: 1px solid color-mix(in srgb, var(--blue) 35%, #fff);
  border-left: 5px solid var(--blue);
}
.filters label { color: color-mix(in srgb, var(--blue) 85%, #000); font-weight: 700; font-size: 12.5px; letter-spacing: .02em; }
.filters input, .filters select { background: #fff; border-color: color-mix(in srgb, var(--blue) 30%, #c9d6e6); color: #1a2433; }
.filters input:focus, .filters select:focus { outline: 2px solid color-mix(in srgb, var(--blue) 55%, #fff); outline-offset: 0; }
.filters .btn.ghost { background: #fff; }
:root[data-theme="dark"] .filters { background: linear-gradient(180deg, #1b2c48 0%, #16243b 100%); border-color: #2f4a74; border-left-color: #5a8de0; }
:root[data-theme="dark"] .filters label { color: #9cc4ff; }
:root[data-theme="dark"] .filters input, :root[data-theme="dark"] .filters select, :root[data-theme="dark"] .filters .btn.ghost { background: #0f1a2b; color: #e6ecf5; border-color: #2f4a74; }
.filters select { height: 34px; border-radius: 6px; padding: 0 6px; border: 1px solid color-mix(in srgb, var(--blue) 30%, #c9d6e6); }
/* 기능키 단추: 모든 화면 같은 키 · 한 가지 색 (2026-11-18). F2 등록 · F3 저장 · F4 삭제 · F6 엑셀 · F7 조회 · F8 출력 · Esc 닫기 · Enter 수정 */
.btn.btn.btn[data-fkey] { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.btn.btn[data-fkey]:hover:not(:disabled) { filter: brightness(1.15); background: var(--navy); }
.btn.btn.btn[data-fkey]:disabled { opacity: .55; }
.btn[data-fkey]::before { content: attr(data-fkey); display: inline-block; font-size: 10.5px; font-weight: 800; line-height: 1; padding: 3px 4px; margin-right: 6px; border-radius: 3px; background: rgba(255, 255, 255, .22); letter-spacing: .02em; }
/* 색은 한 가지로 통일 (2026-11-18: 여러 색은 촌스러움) — 키 이름 표시로 구분 */
/* 메뉴 트리: 윈도우 탐색기처럼 [+]/[−] 상자 + 폴더(닫힘·열림) 아이콘, 화면 항목은 문서 아이콘 (2026-11-18 요청) */
.sidebar summary { gap: 5px; }
.sidebar summary::before { content: "+"; width: 11px; height: 11px; flex: 0 0 11px; border: 1px solid #8fa3b8; border-radius: 2px; background: #fff; color: #33475b; font: 700 10px/9px monospace; text-align: center; transform: none !important; transition: none; }
.sidebar details[open] > summary::before { content: "−"; }
.sidebar summary::after { content: ""; order: -0; width: 17px; height: 15px; flex: 0 0 17px; margin-right: 1px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 15'%3E%3Cpath d='M1 2.5h5.2l1.6 1.6H16v9.4H1z' fill='%23f3c64f' stroke='%23b8860b' stroke-width='.9'/%3E%3Cpath d='M1 5.5h15' stroke='%23d9a520' stroke-width='.8'/%3E%3C/svg%3E"); }
.sidebar details[open] > summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 15'%3E%3Cpath d='M1 2.5h5.2l1.6 1.6H14v2.3H4.2L1 13.5z' fill='%23e0a92c' stroke='%23b8860b' stroke-width='.9'/%3E%3Cpath d='M4.2 6.4H16.4l-2.9 7.1H1z' fill='%23f8d77e' stroke='%23b8860b' stroke-width='.9'/%3E%3C/svg%3E"); }
.sidebar summary { display: flex; }
.sidebar summary::before { order: -2; }
.sidebar summary::after { order: -1; }
.sidebar .fav > summary::after { display: none; }
.sidebar li > a::before { content: ""; width: 15px; height: 16px; flex: 0 0 15px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 16'%3E%3Cpath d='M2.5 1.5h7l3 3v10h-10z' fill='%23fff' stroke='%23607d8b' stroke-width='.9'/%3E%3Cpath d='M9.5 1.5v3h3' fill='none' stroke='%23607d8b' stroke-width='.9'/%3E%3Cpath d='M4.5 8h6M4.5 10.5h6M4.5 13h4' stroke='%2364b5f6' stroke-width='1'/%3E%3C/svg%3E"); }
.sidebar .home::before { content: "🗓"; font-size: 14px; }
.sidebar .home.sys-link::before { content: none; }
:root[data-theme="dark"] .sidebar summary::before { background: #0f1a2b; color: #c9d6e6; border-color: #5b6f88; }
.btn.btn.btn[data-fname="add"] { background: var(--navy); border-color: var(--navy); color: #fff; }
/* 사용자 권한 (보안그룹 × 화면 × 조회·등록·수정·삭제·출력) */
.perm-layout { display: grid; grid-template-columns: 230px 1fr; gap: 14px; align-items: start; }
.perm-side { padding: 10px; }
.perm-side-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.perm-groups { display: flex; flex-direction: column; gap: 4px; max-height: 62vh; overflow: auto; }
.perm-g { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 6px 8px; cursor: pointer; color: inherit; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.perm-g small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perm-g.on { background: var(--blue); color: #fff; border-color: var(--blue); } .perm-g.on small { color: rgba(255, 255, 255, .85); }
.perm-side-tools { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.perm-wrap { max-height: 64vh; }
.perm-grid th.perm-col, .perm-grid td.perm-col { width: 64px; text-align: center; }
.perm-grid input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
.perm-grid td.perm-col.off { background: color-mix(in srgb, #d32f2f 6%, transparent); }
.perm-grid td.na { color: var(--muted); }
.perm-hcb { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: #fff; }
.perm-grid tr.perm-top td { background: color-mix(in srgb, var(--blue) 14%, var(--panel)); font-size: 13.5px; }
.perm-grid tr.perm-grp td { background: color-mix(in srgb, var(--blue) 5%, var(--panel)); color: var(--muted); }
.perm-grid tr.perm-grp td:first-child { padding-left: 30px; }
.perm-grid tr.perm-row td.perm-name { padding-left: 50px; }
.perm-grid tr.locked td { opacity: .6; }
.perm-fold { width: 18px; height: 18px; border: 1px solid #8fa3b8; background: #fff; border-radius: 3px; font: 700 12px/14px monospace; cursor: pointer; padding: 0; color: #33475b; }
.perm-folder { display: inline-block; width: 17px; height: 15px; vertical-align: -2px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 15'%3E%3Cpath d='M1 2.5h5.2l1.6 1.6H16v9.4H1z' fill='%23f3c64f' stroke='%23b8860b' stroke-width='.9'/%3E%3C/svg%3E"); }
.perm-folder.sm { width: 14px; height: 12px; }
.perm-doc { display: inline-block; width: 13px; height: 15px; vertical-align: -2px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 16'%3E%3Cpath d='M2.5 1.5h7l3 3v10h-10z' fill='%23fff' stroke='%23607d8b' stroke-width='.9'/%3E%3Cpath d='M4.5 8h6M4.5 10.5h6M4.5 13h4' stroke='%2364b5f6' stroke-width='1'/%3E%3C/svg%3E"); }
@media (max-width: 900px) { .perm-layout { grid-template-columns: 1fr; } .perm-groups { flex-direction: row; overflow-x: auto; max-height: none; } }
/* 품목 사진 창 */
.img-big { display: flex; align-items: center; justify-content: center; min-height: 300px; max-height: 58vh; background: color-mix(in srgb, var(--line) 35%, var(--panel)); border: 1px dashed var(--line); border-radius: 8px; overflow: hidden; }
.img-big img { max-width: 100%; max-height: 58vh; object-fit: contain; }
.img-big.drop { outline: 3px dashed var(--blue); }
.img-strip { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0; }
.img-thumb { flex: 0 0 auto; width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: var(--panel); cursor: pointer; overflow: hidden; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-thumb.on { border-color: var(--blue); }
.img-meta { margin: 6px 0 0; }
td.dbl-cell { cursor: zoom-in; text-align: center; }
td.dbl-cell:empty::after { content: "＋"; color: var(--muted); opacity: .5; }
/* 표 번호 칸 */
table.grid th.rownum, table.grid td.rownum { width: 1%; min-width: 38px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; padding-left: 6px; padding-right: 6px; }
table.grid th.rownum { color: #fff; cursor: default; }
table.grid tfoot td.rownum { color: inherit; font-weight: 700; }
/* 화면마다 따로 만든 표(처리 화면 등)도 맨 앞에 번호 칸 — CSS 로 자동 (묶음 줄이 섞인 권한·계획·입력 줄 표는 제외) */
table.grid:not(.numbered):not(.perm-grid):not(.lines):not(.plan-grid):not(.qtylist) { counter-reset: rown; }
table.grid:not(.numbered):not(.perm-grid):not(.lines):not(.plan-grid):not(.qtylist) > thead > tr::before { content: "No"; display: table-cell; vertical-align: middle; text-align: center; padding: 7px 6px; font-weight: 600; background: var(--blue); color: #fff; border-right: 1px solid rgba(255, 255, 255, .35); position: sticky; top: 0; z-index: 1; }
table.grid:not(.numbered):not(.perm-grid):not(.lines):not(.plan-grid):not(.qtylist) > tbody > tr { counter-increment: rown; }
table.grid:not(.numbered):not(.perm-grid):not(.lines):not(.plan-grid):not(.qtylist) > tbody > tr::before { content: counter(rown); display: table-cell; vertical-align: middle; text-align: center; padding: 6px; color: var(--muted); font-variant-numeric: tabular-nums; border: 1px solid color-mix(in srgb, var(--line) 70%, #7f8fa6); }
table.grid:not(.numbered):not(.perm-grid):not(.lines):not(.plan-grid):not(.qtylist) > tfoot > tr::before { content: ""; display: table-cell; }
/* 찾기 칸 (품목·거래처 코드는 찾기 창에서 골라서만 넣음) */
.pick-row { display: flex; gap: 4px; align-items: center; }
.pick-row .pick-in { flex: 1; min-width: 0; cursor: pointer; background: var(--panel, #fff); }
.pick-row .pick-in:focus { outline: 2px solid var(--c1); outline-offset: -1px; }
.pick-btn { flex: none; width: 30px; height: 30px; font-size: 14px; line-height: 1; }
.pick-dlg .pick-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.pick-dlg .pick-bar input { flex: 1; min-width: 0; }
.pick-dlg .pick-wrap { max-height: min(55vh, 460px); overflow: auto; }
.pick-dlg .pick-grid tbody tr { cursor: pointer; }
.pick-dlg .pick-grid tbody tr.on td { background: color-mix(in srgb, var(--c1) 22%, var(--panel)); }
.pick-dlg .pick-grid tbody tr:hover td { background: var(--head); }
/* 품목코드를 고르면 따라오는 칸 (품목명·규격) · 수량 칸 단위 */
.grid.lines td.follow { vertical-align: middle; color: var(--fg); background: var(--head); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.grid.lines .pick.item .pick-info { display: none; }
.qty-wrap { display: inline-flex; align-items: center; gap: 4px; width: 100%; }
.qty-wrap input { flex: 1; width: auto !important; min-width: 60px; }
.qty-wrap .unit { flex: none; min-width: 22px; font-size: 12px; color: var(--muted); font-weight: 600; }
.pick-info.warn { color: var(--bad); }
/* 품목BOM 조회 (트리): 단계마다 숫자·줄 색 (--lc) */
.bom-filters .bom-pick { min-width: 280px; }
.bom-filters .bom-pick .pick { min-width: 260px; }
.bt-wrap { max-height: calc(100vh - 330px); overflow: auto; }
table.bom-tree td { vertical-align: middle; }
table.bom-tree tr.bt-row td:first-child + td, table.bom-tree tr.bt-row td.bt-lv { border-left: 0; }
table.bom-tree tr.bt-row td.bt-lv { box-shadow: inset 4px 0 0 var(--lc); text-align: center; width: 48px; }
table.bom-tree tr.bt-row td { background: color-mix(in srgb, var(--lc) 6%, var(--panel)); }
table.bom-tree tr.bt-row.root td { background: color-mix(in srgb, var(--lc) 14%, var(--panel)); font-weight: 600; }
table.bom-tree tr.bt-row.off td { opacity: .55; }
table.bom-tree tr.bt-row:hover td { background: color-mix(in srgb, var(--lc) 16%, var(--panel)); }
.bt-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--lc); color: #fff; font-size: 12px; font-weight: 700; }
.bt-cell { display: flex; align-items: stretch; gap: 0; min-height: 26px; white-space: nowrap; }
.bt-cell > b { align-self: center; margin-left: 4px; color: var(--lc); }
.bt-tree { display: inline-flex; align-self: stretch; margin: -6px 0; }
.bt-g { position: relative; width: 20px; flex: none; }
.bt-g.v::before, .bt-g.t::before, .bt-g.l::before { content: ''; position: absolute; left: 9px; top: 0; border-left: 2px solid var(--lc); }
.bt-g.v::before, .bt-g.t::before { bottom: 0; }
.bt-g.l::before { height: 50%; }
.bt-g.t::after, .bt-g.l::after { content: ''; position: absolute; left: 9px; right: 0; top: 50%; border-top: 2px solid var(--lc); }
.bt-tog { align-self: center; flex: none; width: 18px; height: 18px; padding: 0; margin-left: 2px; border: 1.5px solid var(--lc); border-radius: 3px; background: var(--panel); color: var(--lc); font-size: 13px; line-height: 14px; font-weight: 700; cursor: pointer; }
.bt-tog.none { border: 0; background: none; cursor: default; position: relative; }
.bt-tog.none::before { content: ''; position: absolute; left: 4px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--lc); }
.bt-flag { align-self: center; margin-left: 6px; padding: 0 6px; border-radius: 9px; font-size: 11px; background: var(--head); color: var(--muted); }
.bt-flag.bad { background: color-mix(in srgb, var(--bad) 15%, var(--panel)); color: var(--bad); }
.bt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 8px; font-size: 12.5px; }
.bt-leg { display: inline-flex; align-items: center; gap: 5px; }
/* 날짜 칸: 직접 입력 + 📅 달력 */
.date-wrap { position: relative; display: inline-flex; align-items: center; gap: 4px; width: 100%; min-width: 150px; }
.date-wrap .date-in { flex: 1; width: auto !important; min-width: 104px; font-variant-numeric: tabular-nums; }
.date-wrap .date-in.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); }
.date-wrap .date-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; font-size: 15px; line-height: 1; border: 1px solid var(--line); background: var(--head); color: var(--fg); cursor: pointer; }
.date-wrap .date-nat { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
/* 창(목록)이 열리는 칸은 마우스를 올리지 않아도 미리 보이게 (2026-11-18)
   ▼ 목록 칸(고르거나 직접 입력) · 🔍 찾기 칸(더블클릭) · 📅 날짜 칸 */
input[list]::-webkit-calendar-picker-indicator { display: block !important; opacity: 1 !important; cursor: pointer; }
input[list] { padding-right: 4px; }
.pick-row .pick-in { padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b8794' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px 16px; }
/* 필수 칸 * (모든 입력 화면 통일) */
.req-star { color: var(--bad); font-weight: 800; }
th .req-star { color: #ffd166; }
/* 고르거나 직접 입력하는 칸: ▼ 늘 보임 */
.combo { display: inline-flex; width: 100%; min-width: 120px; }
.combo .combo-in { flex: 1; width: auto !important; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.combo .combo-btn { flex: none; width: 30px; border: 1px solid var(--line); border-left: 0; border-radius: 0 6px 6px 0; background: var(--head); color: var(--fg); cursor: pointer; font-size: 14px; }
.combo .combo-btn:hover { background: color-mix(in srgb, var(--c1) 15%, var(--panel)); }
.combo-menu { position: fixed; z-index: 1000; max-height: 260px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 4px; display: flex; flex-direction: column; }
.combo-opt { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 4px; cursor: pointer; color: var(--fg); font: inherit; white-space: nowrap; }
.combo-opt:hover, .combo-opt.on { background: color-mix(in srgb, var(--c1) 15%, var(--panel)); }
.combo-empty { padding: 8px 10px; font-size: 12px; }
/* [엑셀 ▾] 하나로: 다운로드 · 양식 받기 · 올리기 */
.xl-menu { position: fixed; z-index: 1000; min-width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.2); padding: 4px; display: flex; flex-direction: column; }
.xl-item { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 5px; cursor: pointer; color: var(--fg); font: inherit; white-space: nowrap; }
.xl-item:hover, .xl-item:focus { background: color-mix(in srgb, var(--c1) 14%, var(--panel)); outline: none; }
.xl-ic { width: 18px; text-align: center; }
.auto-prev { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--c1); min-height: 16px; }
.auto-prev.err { color: var(--bad); }
/* 한 품목에 여러 줄: 품목 칸 합침 */
table.grid tbody.row-merged td.merged { vertical-align: middle; background: var(--panel); font-weight: 600; border-right: 1px solid var(--line); }
table.grid tbody.row-merged tr.merge-first td { border-top: 2px solid color-mix(in srgb, var(--c1) 35%, var(--line)); }
/* 품목분류 입력 (트리) */
.ct-card { padding: 10px 14px; }
.ct-tree, .ct-tree ul { list-style: none; margin: 0; padding: 0; }
.ct-tree ul { margin-left: 22px; border-left: 1px dotted var(--line); padding-left: 6px; }
.ct-row { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 2px 6px; border-radius: 6px; }
.ct-row:hover { background: var(--head); }
.ct-tog { flex: none; width: 16px; height: 16px; padding: 0; border: 1px solid var(--muted); border-radius: 2px; background: var(--panel); color: var(--fg); font-size: 12px; line-height: 13px; cursor: pointer; }
.ct-tog.none { border: 0; background: none; cursor: default; }
.ct-ic { width: 18px; height: 14px; flex: none; }
.ct-tree li.lv1 > .ct-row .ct-ic, .ct-tree li.lv2 > .ct-row .ct-ic { background: #e8b84a; border-radius: 2px 4px 3px 3px; box-shadow: inset 0 3px 0 #f5d27a; }
.ct-tree li.lv1.open > .ct-row .ct-ic, .ct-tree li.lv2.open > .ct-row .ct-ic { background: #f5d27a; box-shadow: inset 0 -4px 0 #e8b84a; }
.ct-tree li.lv3 > .ct-row .ct-ic { width: 12px; height: 15px; margin: 0 3px; border: 1.5px solid var(--muted); border-radius: 1px 4px 1px 1px; background: var(--panel); }
.ct-code { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--c1); min-width: 22px; }
.ct-lv { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: var(--head); color: var(--muted); }
.ct-row.lv1 .ct-name { font-weight: 700; }
.ct-name { cursor: default; user-select: none; }
.ct-add { margin-left: auto; padding: 2px 10px; font-size: 12px; }
.ct-none .ct-row { min-height: 28px; font-size: 12.5px; }
table.grid tbody tr.changed td { background: color-mix(in srgb, var(--warn, #e3a63c) 18%, var(--panel)); }
/* ── 비주얼테크 첫 로그인 화면 (VB ERP 로그인 창과 같은 모양, 2026-11-18) ── */
.login { background: radial-gradient(120% 90% at 0% 100%, #0c7a6a 0%, transparent 55%), radial-gradient(90% 80% at 100% 0%, #0d3c8c 0%, transparent 60%), linear-gradient(135deg, #0a3f54 0%, #06264a 60%, #071a3a 100%); }
.vt-login { display: flex; width: min(812px, 100%); min-height: 400px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .25); }
.vt-left { position: relative; flex: 0 0 68%; overflow: hidden; color: #fff; padding: 14px 22px 22px 32px; display: flex; flex-direction: column;
  background: url(../img/login-waves.svg) center / cover no-repeat, linear-gradient(170deg, #4f9cff 0%, #2f6cf0 30%, #1f45c8 65%, #1a2fa8 100%); }
.vt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; letter-spacing: .02em; white-space: pre; }
.vt-top #loginCompany { opacity: .95; overflow: hidden; text-overflow: ellipsis; }
.vt-top b { font-size: 17px; font-weight: 800; letter-spacing: .01em; }
.vt-gears { width: 78px; height: 60px; margin: 26px 0 12px 18px; }
.vt-title { display: flex; flex-direction: column; line-height: 1; margin-left: 18px; }
.vt-title b { font-size: 46px; font-weight: 900; letter-spacing: .01em; }
.vt-title span { font-size: 31px; font-weight: 800; margin-top: 6px; }
.vt-foot { margin-top: auto; display: flex; align-items: center; gap: 26px; padding-left: 14px; }
.vt-logo { width: 74px; height: auto; }
.vt-contact { font-size: 14px; line-height: 1.6; letter-spacing: .04em; }
.vt-right { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 56px 34px 26px; color: #000; background: #fff; }
.vt-welcome { margin: 0 0 40px; font-size: 25px; font-weight: 900; letter-spacing: -.01em; color: #000; }
.vt-sub { margin: 0 0 14px; font-size: 14px; font-weight: 800; color: #000; }
.vt-right label { font-size: 12.5px; color: #000; margin-top: 4px; }
.vt-right input { width: 100%; box-sizing: border-box; height: 30px; border: 0; border-bottom: 1px solid #000; border-radius: 0; background: transparent; padding: 0 2px; margin-bottom: 14px; color: #000; outline: none; }
.vt-right input:focus { border-bottom: 2px solid #2f6cf0; }
.vt-right .login-error { color: #c62828; min-height: 1em; margin: 0 0 6px; }
.vt-enter { height: 27px; border: 0; border-radius: 6px; background: #000; color: #fff; font-size: 12.5px; margin: 6px 4px 0; }
.vt-enter:disabled { opacity: .6; }
.vt-remote { height: 27px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #2f5fc8; border-radius: 6px; background: #fff; color: #1f45a8; font-size: 12.5px; font-weight: 700; margin: 8px 4px 0; }
.vt-remote:hover { background: #eef3ff; }
.vt-remote svg { color: #2a5cc8; }
@media (max-width: 720px) {
  .vt-login { flex-direction: column; }
  .vt-left { flex: none; min-height: 250px; padding: 12px 16px 16px; }
  .vt-gears { width: 56px; height: 44px; margin: 14px 0 6px 6px; }
  .vt-title { margin-left: 6px; } .vt-title b { font-size: 34px; } .vt-title span { font-size: 23px; }
  .vt-top { white-space: normal; font-size: 12px; }
  .vt-foot { gap: 16px; padding-left: 0; margin-top: 18px; } .vt-contact { font-size: 12.5px; }
  .vt-right { padding: 26px 22px 22px; } .vt-welcome { margin-bottom: 20px; }
}
.vt-idrow { display: flex; align-items: baseline; justify-content: space-between; }
.vt-idchg { border: 0; background: none; color: #2f5fc8; font-size: 11.5px; padding: 0; text-decoration: underline; }
.vt-right input[readonly] { color: #333; cursor: default; }
/* 일정표: 화면 아래까지 꽉 채우기 · 년월 가운데 (2026-11-18) */
.cal-wrap { align-items: stretch; height: calc(100vh - var(--cal-top, 96px)); min-height: 560px; }
.cal-side { display: flex; flex-direction: column; overflow: auto; }
.cal-side .cal-box { display: flex; flex-direction: column; flex: 0 0 auto; }
/* 칸마다 자기 영역 안에서만 스크롤 (2026-11-19: 공지가 길면 아래 제목과 겹치던 것 고침) */
.cal-side .cal-box.b-notice, .cal-side .cal-box.b-mine { flex: 1 1 0; min-height: 120px; }
.cal-side .cal-box.b-ver { flex: 1.3 1 0; min-height: 140px; }
.cal-side .cal-box .cal-list { flex: 1 1 0; max-height: none; min-height: 0; overflow: auto; }
.cal-side .cal-box.b-ship .cal-list { flex: 0 0 auto; max-height: 140px; min-height: 40px; }
.cal-side .cal-box > label { flex: none; }
.cal-main { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.cal-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.cal-nav { display: flex; gap: 6px; } .cal-nav.right { justify-content: flex-end; }
.cal-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cal-center .cal-title { margin: 0; }
.cal-today { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cal-grid { flex: 1; min-height: 0; grid-template-rows: auto repeat(var(--weeks, 6), minmax(0, 1fr)); }
.cal-cell { min-height: 0; overflow: hidden; }
@media (max-width: 900px) { .cal-wrap { height: auto; } .cal-grid { grid-template-rows: auto; } .cal-cell { min-height: 64px; } .cal-head { grid-template-columns: 1fr; } .cal-nav, .cal-nav.right { justify-content: center; } }
.perm-notice { display: flex; align-items: center; gap: 4px; margin: 4px 0 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--head); flex-wrap: wrap; }
/* 메뉴 트리 [+]/[−] 상자: 글자 대신 선으로 그려 상자 한가운데 (2026-11-18) */
.sidebar summary::before { content: "" !important; box-sizing: border-box; width: 11px; height: 11px; flex: 0 0 11px;
  background: linear-gradient(#33475b, #33475b) center / 7px 1px no-repeat, linear-gradient(#33475b, #33475b) center / 1px 7px no-repeat, #fff; }
.sidebar details[open] > summary::before { background: linear-gradient(#33475b, #33475b) center / 7px 1px no-repeat, #fff; }
.ct-tog:not(.none) { font-size: 0; box-sizing: border-box; background: linear-gradient(currentColor, currentColor) center / 8px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 8px no-repeat, var(--panel); }
.ct-tog[aria-expanded="true"] { background: linear-gradient(currentColor, currentColor) center / 8px 1.5px no-repeat, var(--panel); }
.cal-head { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-head .cal-title { margin: 0 14px; }
.cal-head .today-btn { margin-left: 10px; }
@media (max-width: 900px) { .cal-head { display: flex; } }
/* 일정표 날짜 색: 평일 검정 · 토 파랑 · 일·공휴일 빨강 */
.cal-cell .cal-day { color: var(--fg); }
.cal-cell.sat .cal-day { color: #1565c0; }
.cal-cell.sun .cal-day, .cal-cell.hol .cal-day { color: #d32f2f; }
.cal-hol { margin-left: 6px; font-size: 11px; font-weight: 600; }
:root[data-theme="dark"] .sidebar summary::before { background: linear-gradient(#c9d6e6, #c9d6e6) center / 7px 1px no-repeat, linear-gradient(#c9d6e6, #c9d6e6) center / 1px 7px no-repeat, #0f1a2b; }
:root[data-theme="dark"] .sidebar details[open] > summary::before { background: linear-gradient(#c9d6e6, #c9d6e6) center / 7px 1px no-repeat, #0f1a2b; }
/* 일정표 머리 (VB 일정표 모양) */
.cal-head { gap: 10px; }
.cal-vbtn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: linear-gradient(#3d5a85, #1f3a63); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.cal-vbtn:hover { background: linear-gradient(#4a6b9c, #27487a); }
.cal-arr { width: 14px; height: 12px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M6 1 1 6l5 5V8h7V4H6z' fill='%23fff'/%3E%3C/svg%3E"); }
.cal-arr.r { transform: scaleX(-1); }
.cal-head .cal-title { margin: 0 18px; font-size: 34px; line-height: 1; color: #0b2f63; font-weight: 400; letter-spacing: .02em; }
.cal-head .cal-title b { font-weight: 900; margin-right: 2px; }
:root[data-theme="dark"] .cal-head .cal-title { color: #cfe0ff; }
.cal-gap { width: 50px; }
.cal-todaytxt { font-size: 12.5px; font-weight: 700; color: #0b2f63; }
:root[data-theme="dark"] .cal-todaytxt { color: #cfe0ff; }
@media (max-width: 900px) { .cal-gap { width: 0; } .cal-head .cal-title { font-size: 26px; margin: 0 8px; } }
/* [설정] 창 */
.settings-dlg .set-sec { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.settings-dlg .set-sec h3 { margin: 0 0 6px; font-size: 15px; color: var(--blue); }
.settings-dlg .set-in { display: flex; align-items: center; gap: 4px; }
.settings-dlg .set-lang.prefs { position: static; box-shadow: none; border: 0; padding: 0; width: auto; background: none; }
/* 타이틀(화면 이름): 아래 내용(카드) 왼쪽 줄에 맞춤, 글자 1.3배 (2026-11-18) */
@media (min-width: 861px) {
  .topbar > .brand.small { flex: 0 0 calc(240px - 16px - 14px); width: calc(240px - 16px - 14px); min-width: 0; overflow: hidden; }
  .topbar > .screen-title { margin-left: 16px; font-size: 23.4px; }
}
/* 일정표: 여러 줄로 쓴 공지·개인 일정은 모든 줄을 보여 줌 (2026-11-18) */
.cal-item.multi { white-space: pre-line; overflow: hidden; text-overflow: clip; flex: none; }
.cal-line.multi { white-space: pre-line; display: flex; gap: 6px; align-items: flex-start; }
.cal-line.multi .d { flex: none; }
/* 위쪽 단추 통일 (새 창 · 매뉴얼 · 설정 · 로그아웃): 같은 높이, 그림과 글자 사이 같은 간격, 세로 가운데 (2026-11-18) */
.topbar .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar .text-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; line-height: 1; white-space: nowrap; box-sizing: border-box; font-size: 13.5px; }
.topbar .text-btn svg { flex: none; width: 16px; height: 16px; display: block; }
.topbar .text-btn .lbl { display: inline-block; line-height: 1; }
.topbar .user { display: inline-flex; align-items: center; height: 32px; padding: 0 4px; line-height: 1; }
.topbar .demo-badge { display: inline-flex; align-items: center; height: 24px; }
@media (max-width: 860px) { .topbar .manual-btn .lbl, .topbar .settings-btn .lbl { display: none; } .topbar .text-btn { padding: 0 8px; } }
/* 삭제 확인 창 */
.confirm-dlg { width: min(440px, calc(100vw - 32px)); }
.confirm-dlg .confirm-msg { font-size: 15px; font-weight: 700; color: var(--bad); margin: 6px 0 10px; }
.topbar .user { font-weight: 700; margin-right: 6px; }
/* 고르는 칸(▼) 모양 통일 (2026-11-18): 모든 select 를 [직접 입력 칸 + ▾ 상자]와 같은 모양으로 */
#app select:not([multiple]), dialog select:not([multiple]) {
  -webkit-appearance: none; appearance: none; padding-right: 38px !important;
  background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%2333475b'/%3E%3C/svg%3E"), linear-gradient(var(--line), var(--line)), linear-gradient(var(--head), var(--head));
  background-repeat: no-repeat; background-position: right 11px center, right 30px top, right 0 top;
  background-size: 9px 6px, 1px 100%, 30px 100%;
  cursor: pointer;
}
:root[data-theme="dark"] #app select:not([multiple]), :root[data-theme="dark"] dialog select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23c9d6e6'/%3E%3C/svg%3E"), linear-gradient(var(--line), var(--line)), linear-gradient(var(--head), var(--head));
}
.filters select { background-color: #fff; }
.combo .combo-btn { width: 30px; font-size: 0; background: var(--head) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%2333475b'/%3E%3C/svg%3E") center / 9px 6px no-repeat; }
:root[data-theme="dark"] .combo .combo-btn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23c9d6e6'/%3E%3C/svg%3E"); }
#app select:disabled { opacity: .55; cursor: not-allowed; }
.grid.lines th.del-col { width: 56px; white-space: nowrap; font-size: 12px; }
.grid.lines td:last-child { text-align: center; }
.grid.lines select { min-width: 100px; }
.grid.lines td input[type="text"]:not(.num):not(.pick-in):not(.date-in) { min-width: 140px; }
.grid.lines td.num { text-align: center; vertical-align: middle; }
.grid.lines .qty-wrap { width: auto; }
.grid.lines .qty-wrap input { width: 100px !important; min-width: 80px; flex: none; }
.grid.lines select { min-width: 92px; }
.grid.lines td input[type="text"]:not(.num):not(.pick-in):not(.date-in) { min-width: 110px; }
/* 표 칸 너비 조절 (제목 칸 오른쪽 끝을 끌기) */
table.grid > thead > tr > th::after { content: ''; position: absolute; top: 0; right: -1px; width: 6px; height: 100%; cursor: col-resize; z-index: 2; }
body.col-resize-hover, body.col-resize-hover table.grid th, body.col-resizing, body.col-resizing * { cursor: col-resize !important; }
body.col-resizing { user-select: none; }
table.grid.col-fixed td { overflow: hidden; text-overflow: ellipsis; }
table.grid td.chip-c { text-align: center; }
/* 엑셀 올리기: 덮어쓰기 / 추가 고르기 */
.mode-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 10px; }
.mode-opt { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px 16px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--fg); cursor: pointer; font: inherit; }
.mode-opt b { font-size: 16px; color: var(--blue); }
.mode-opt span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.mode-opt:hover, .mode-opt:focus { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 6%, var(--panel)); outline: none; }
@media (max-width: 600px) { .mode-opts { grid-template-columns: 1fr; } }
.same-list { margin: 0; padding: 6px 10px 6px 26px; columns: 2; font-size: 13px; }
.same-list li { break-inside: avoid; padding: 2px 0; }
/* [거래품목] 조건 칸: 더블클릭하면 찾기 창 (🔍 표시) */
.item-filters input.pick-like { padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b8794' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 15px 15px; width: 190px !important; }
/* 품목BOM 입력: 순서 칸 좁게, 총소요량 */
.grid.lines td[data-c="BOM_SubSort"] input { width: 54px !important; min-width: 0 !important; text-align: center; }
.grid.lines td[data-c="BOM_RUNNER"] input, .grid.lines td[data-c="BOM_ERR"] input { width: 84px !important; min-width: 0 !important; }
.grid.lines td.calc-total { font-weight: 700; color: var(--blue); background: var(--head); white-space: nowrap; min-width: 90px; vertical-align: middle; text-align: right; }

/* 구분 칸 색 (2026-11-19) */
.chip.gu { color: var(--gc); border-color: color-mix(in srgb, var(--gc) 55%, transparent); background: color-mix(in srgb, var(--gc) 10%, transparent); font-weight: 600; }
/* 원자재 투입 (생산전표 발행) */
.mats-box { margin-top: 12px; } .mats-box h4 { margin: 0 0 4px; font-size: 14px; }
.chip.mat-base { color: #1f6fd1; background: #e8f0fc; } .chip.mat-run { color: #b45309; background: #fdf1e3; }
table.grid.mats td.mat-base-n { color: #1f6fd1; } table.grid.mats td.mat-run-n { color: #b45309; }
.chip.bad { color: #c62828; background: #fdecea; margin-left: 6px; }

/* 모든 표: 단위 가운데 · 고른 줄 색 (2026-11-19) */
table.grid td.c, table.grid th.c { text-align: center; }
table.grid tbody tr.sel > td { background: #d6e6fb !important; }
table.grid tbody tr.sel > td:first-child { box-shadow: inset 3px 0 0 #1f6fd1; }

/* 수주서 입력 — VB 화면 모양 (2026-11-19) */
.oe-bar { gap: 8px; }
.oe-head { padding: 12px 16px; }
.oe-grid { display: grid; grid-template-columns: 72px 250px 72px 440px 1fr; gap: 8px 14px; align-items: center; }
.oe-lab { font-weight: 700; color: var(--navy); white-space: nowrap; }
.oe-ro { min-height: 32px; display: flex; align-items: center; padding: 0 10px; background: #fff8d6; border: 1px solid #eadb9a; border-radius: 4px; font-weight: 600; }
.oe-ro.c { justify-content: center; }
.oe-pair { display: grid; grid-template-columns: 170px 1fr; gap: 6px; align-items: center; }
.oe-pair .pick-info { display: none; }
.oe-prev { justify-self: start; font-size: 13px; }
.oe-memo { grid-column: 2 / 4; } .oe-memo textarea { width: 100%; min-height: 66px; }
.oe-sum { border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; background: #fff; display: grid; gap: 3px; width: 340px; }
.oe-sum > div { display: flex; justify-content: space-between; gap: 16px; } .oe-sum span { font-weight: 700; color: var(--navy); } .oe-sum b { font-variant-numeric: tabular-nums; }
.oe-head .oe-sum.oe-qty { align-self: end; width: 240px; justify-self: start; }
.oe-head .oe-grid > .oe-sum:not(.oe-qty) { justify-self: start; }
.oe-lines { padding: 8px; }
.oe-wrap { max-height: calc(100vh - 380px); min-height: 260px; }
table.oe-table th, table.oe-table td { white-space: nowrap; vertical-align: middle !important; }
/* 입력 칸 크기·모양은 다른 입력 창과 같게 (2026-11-19: 기존 칸 형식 유지) */
table.oe-table td.oe-item .pick-info { display: none; } table.oe-table .oe-qtycell { display: flex; align-items: center; gap: 4px; }
table.oe-table td.oe-item .pick { min-width: 190px; } table.oe-table input.num { min-width: 110px; } table.oe-table .oe-due .date-wrap { min-width: 170px; } table.oe-table select { min-width: 90px; }
.oe-head input:not([type=checkbox]):not([type=date]), .oe-head select, .oe-head textarea { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); font: inherit; font-size: 14px; }
.oe-head textarea { height: auto; min-height: 68px; padding: 6px 9px; }
.oe-head input:focus, .oe-head textarea:focus { outline: 2px solid color-mix(in srgb, var(--blue) 45%, transparent); border-color: var(--blue); }
.oe-head .oe-ro { min-height: 34px; } .oe-head .date-wrap { display: flex; gap: 4px; }
@media (max-width: 1100px) { .oe-grid { grid-template-columns: 72px 1fr; } .oe-memo { grid-column: 2; } }
table.oe-table tbody tr.oe-hit > td { background: #ffe9a8 !important; }
table.oe-table tfoot tr.oe-total td { position: sticky; bottom: 0; background: #eef4fc; border-top: 2px solid #1f6fd1; font-weight: 700; padding: 8px 6px; }
table.oe-table tfoot .oe-grand { color: var(--navy); } table.oe-table tfoot b { font-variant-numeric: tabular-nums; }
.oe-selh { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; line-height: 1.1; } .oe-selh input { margin: 0; width: 16px; height: 16px; }
.pick-dlg { width: min(1280px, 96vw) !important; max-width: 96vw !important; } .pick-dlg table.pick-grid td { white-space: nowrap; }
.ord-f .trio { display: inline-flex; align-items: center; gap: 4px; flex-wrap: nowrap; } .ord-f .date-wrap { width: 160px; display: inline-flex; } .ord-f .date-wrap .date-in { min-width: 0; }
/* 수주서 입력: 화폐 · 납기일자 칸 좁게 (2026-11-19) */
table.oe-table select.oe-cur { min-width: 0; width: 64px; padding-left: 6px; padding-right: 22px; }
table.oe-table .oe-due { width: 1%; } table.oe-table .oe-due .date-wrap { min-width: 0; width: 148px; display: inline-flex; gap: 3px; }
table.oe-table .oe-due .date-in { min-width: 0 !important; width: 108px !important; flex: 0 0 108px; padding: 0 6px; }
.ord-f { align-items: flex-end; } .ord-f > .sp { flex: 1 1 auto; }
.ord-dates { display: flex; flex-direction: column; gap: 6px; } .ord-row { display: flex; align-items: center; gap: 6px; }
.ord-lab { font-size: 12px; font-weight: 700; color: var(--navy); min-width: 52px; }
.ord-keys { display: flex; gap: 8px; margin-left: auto; align-self: flex-end; }
/* 수주정보 조회: 납기 경과 (2026-11-19) */
table.grid tbody tr.late > td { color: #b71c1c; } table.grid tbody tr.late > td.late-due { font-weight: 800; background: #fdecea; }
.late-alarm { position: sticky; bottom: 0; z-index: 5; margin-top: 10px; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 10px;
  background: #fff1f0; border: 2px solid #e53935; box-shadow: 0 -4px 14px rgba(229, 57, 53, .25); color: #7f1d1d; font-size: 14px; }
.late-alarm b { font-size: 16px; color: #c62828; } .late-alarm .btn { margin-left: auto; }
.late-alarm .lamp { width: 22px; height: 22px; border-radius: 50%; background: #e53935; box-shadow: 0 0 0 0 rgba(229, 57, 53, .7); animation: lamp 1s infinite; flex: 0 0 22px; }
@keyframes lamp { 0% { background: #e53935; box-shadow: 0 0 0 0 rgba(229, 57, 53, .7); } 50% { background: #ff8a80; box-shadow: 0 0 0 12px rgba(229, 57, 53, 0); } 100% { background: #e53935; box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); } }
@media (prefers-reduced-motion: reduce) { .late-alarm .lamp { animation: none; } }
.ord-f .ord-cust { width: 170px; position: relative; } .ord-f .ord-cust .pick-info { position: absolute; left: 2px; top: 100%; margin: 1px 0 0; font-size: 11px; line-height: 1.2; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; } .ord-f .ord-cust .pick-info:empty { display: none; }   /* 수주처 칸: 다른 칸과 높이 맞춤 */
/* 영업전표 입력 (2026-11-19) */
.oe-x { display: flex; align-items: center; gap: 8px; } .oe-x .oe-gu { width: 110px; height: 34px; } .oe-x .oe-link { width: 200px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; }
table.oe-table input.oe-po { width: 150px; } table.oe-table input.oe-note { width: 160px; }

/* 발주서 메일 (2026-11-19) */
.oe-mail { display: flex; gap: 6px; align-items: center; }
.oe-mail .oe-mailto { flex: 1; min-width: 200px; }
.oe-mailbtn { white-space: nowrap; }
table.oe-table input.num.oe-edit { background: #fffbe6; border-color: #f59e0b; font-weight: 600; }   /* 주문서연동으로 담은 줄의 납품량: 고칠 수 있음 */
.late-alarm .sp { flex: 1; } .late-alarm .sp ~ .btn { margin-left: 0; }
table.grid td.miss { background: #fdecec; box-shadow: inset 0 0 0 1px #f4a3a3; }   /* 영업전표 조회: 수주번호·생산번호 누락 칸 */
.cal-side .cal-box:not(:has(.cal-list)) { flex: 0 0 auto; min-height: 0; }
.btn.exit-auto { margin-left: auto; }   /* 자동으로 붙인 [Esc 종료]: 줄 오른쪽 끝 */
.exit-bar { display: flex; justify-content: flex-end; padding: 8px 14px; } .exit-bar .sp { flex: 1; }
/* 서버 상태 배지 (2026-11-19): 초록 연결 · 주황 DB 끊김 · 빨강 깜빡임 중단 */
.demo-badge.srv { gap: 5px; background: #e2e8f0; color: #1e293b; }
.demo-badge.srv .srv-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; flex: none; }
.demo-badge.srv-ok { background: #1b7f3b; color: #fff; } .demo-badge.srv-ok .srv-dot { background: #7dff9e; box-shadow: 0 0 6px #7dff9e; }
.demo-badge.srv-db { background: #ef8f00; color: #fff; } .demo-badge.srv-db .srv-dot { background: #fff3c4; }
.demo-badge.srv-down { background: #d32f2f; color: #fff; animation: srvBlink 1s infinite; } .demo-badge.srv-down .srv-dot { background: #fff; }
@keyframes srvBlink { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .demo-badge.srv-down { animation: none; } }
@media (max-width: 860px) { .demo-badge.srv { display: inline-flex; font-size: 0; padding: 0; width: 24px; justify-content: center; } .demo-badge.srv .srv-dot { width: 11px; height: 11px; } }   /* 휴대폰: 상태 점만 */
.srv-down-msg { display: flex; gap: 14px; align-items: flex-start; max-width: 460px; } .srv-down-msg b { color: #c62828; font-size: 16px; } .srv-down-msg p { margin: 6px 0 0; }
.srv-down-msg .lamp { width: 22px; height: 22px; border-radius: 50%; background: #e53935; flex: 0 0 22px; animation: lamp 1s infinite; }
td.oe-plan { color: #1565c0; font-weight: 600; }   /* 납품전표: 저장하면 연결될 수주 */
.oe-x .oe-scan { width: 190px; }
/* 기능키 모음 (2026-11-19): 화면 위 줄 오른쪽 끝, 단축키 순서 */
.has-fkeys > .fkeys { margin-left: auto; display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; justify-content: flex-end; }
.has-fkeys > .fkeys .btn.exit-auto { margin-left: 0; }
table.grid tbody tr.warn-row > td { background: #fdecea; color: #b71c1c; font-weight: 600; }   /* 수주서 납품실적: 덜 나간 줄 */
table.grid tbody tr.warn-row.sel > td { background: #f8c9c4; }
/* 수주서 납품실적 조회 (2026-11-19): 납품량(당일)·차이량(당일) 노란 칸, 마감참고사항 입력 */
table.grid th.dd-hl { background: #f5c518; color: #1a1a1a; }
table.grid td.dd-hl { background: #fff6c2; font-weight: 700; }
table.grid tbody tr.warn-row > td.dd-hl { background: #ffd8a8; color: #b71c1c; }
td.dd-notec { min-width: 180px; padding: 2px 4px; }
input.dd-note { width: 100%; height: 28px; font-size: 13px; }

/* 납품계획 조회 (VB 색: 수주잔량 연두 · 기간합계 노랑 · 일요일 분홍) */
.dp-grid th.dp-left, .dp-grid td.dp-left { background: #c8f5c8; }
.dp-grid th.dp-sum, .dp-grid td.dp-sum { background: #fff6c2; font-weight: 600; }
.dp-grid th.dp-sum { background: #f5e27a; }
.dp-grid th.dp-stk { background: #e8eef7; color: #1f2937; }
.dp-grid td.dp-stk { background: #f6f8fb; }
.dp-grid .dp-sun { background: #fbd3f3; }
.dp-grid th.dp-sat { color: #1d4ed8; }
.dp-grid th.dp-today { outline: 2px solid #2563eb; outline-offset: -2px; }
.dp-grid td.dp-due { box-shadow: inset 0 0 0 2px #f59e0b; }
.dp-grid td.dp-short { color: #dc2626; font-weight: 700; }
.dp-grid tr.sel > td { background-image: linear-gradient(rgba(37,99,235,.14), rgba(37,99,235,.14)); }
.dp-grid td.dp-cell { padding: 1px 2px; }
.dp-grid td.dp-cell input { width: 64px; }
.dp-top { max-height: 46vh; overflow: auto; }
.dp-bottom { max-height: 34vh; overflow: auto; }
.dp-tab { margin: 10px 0 4px; border-bottom: 2px solid #1d4ed8; }
.dp-tab span { display: inline-block; padding: 3px 14px; background: #1d4ed8; color: #fff; border-radius: 6px 6px 0 0; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dp-grid th.dp-left, :root:not([data-theme="light"]) .dp-grid td.dp-left { background: #1f4d2a; }
  :root:not([data-theme="light"]) .dp-grid td.dp-sum { background: #4a4214; } :root:not([data-theme="light"]) .dp-grid th.dp-sum { background: #6b5d12; }
  :root:not([data-theme="light"]) .dp-grid .dp-sun { background: #5b2350; } :root:not([data-theme="light"]) .dp-grid td.dp-stk, :root:not([data-theme="light"]) .dp-grid th.dp-stk { background: #243042; color: inherit; } }
:root[data-theme="dark"] .dp-grid th.dp-left, :root[data-theme="dark"] .dp-grid td.dp-left { background: #1f4d2a; }
:root[data-theme="dark"] .dp-grid td.dp-sum { background: #4a4214; } :root[data-theme="dark"] .dp-grid th.dp-sum { background: #6b5d12; }
:root[data-theme="dark"] .dp-grid .dp-sun { background: #5b2350; } :root[data-theme="dark"] .dp-grid td.dp-stk, :root[data-theme="dark"] .dp-grid th.dp-stk { background: #243042; color: inherit; }
.dp-grid thead th.dp-left, .dp-grid thead th.dp-sum, .dp-grid thead th.dp-sun { color: #111827; }
.dp-grid thead th.dp-sat { color: #bfdbfe; }
.ord-f label.chk { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; align-self: flex-end; padding-bottom: 8px; }
/* 모든 표: 머리줄(칸 이름)은 파란색 하나로 통일, 강조 색은 아래 내용 칸(세로줄)에만 (2026-11-19 요청) */
table.grid thead th, table.grid thead th small { background: var(--blue) !important; color: #fff !important; }
table.grid.dp-grid tbody tr > td.dp-left, table.grid.dp-grid tfoot tr > td.dp-left { background-color: #c8f5c8; }
table.grid.dp-grid tbody tr > td.dp-sum, table.grid.dp-grid tfoot tr > td.dp-sum { background-color: #fff6c2; }
table.grid.dp-grid tbody tr > td.dp-stk, table.grid.dp-grid tfoot tr > td.dp-stk { background-color: #eef3fa; }
table.grid.dp-grid tbody tr > td.dp-sun, table.grid.dp-grid tfoot tr > td.dp-sun { background-color: #fbd3f3; }
table.grid tbody tr > td.dd-hl, table.grid tfoot tr > td.dd-hl { background-color: #fff6c2; }
:root[data-theme="dark"] table.grid.dp-grid tbody tr > td.dp-left, :root[data-theme="dark"] table.grid.dp-grid tfoot tr > td.dp-left { background-color: #1f4d2a; }
:root[data-theme="dark"] table.grid.dp-grid tbody tr > td.dp-sum, :root[data-theme="dark"] table.grid.dp-grid tfoot tr > td.dp-sum, :root[data-theme="dark"] table.grid tbody tr > td.dd-hl { background-color: #4a4214; }
:root[data-theme="dark"] table.grid.dp-grid tbody tr > td.dp-stk { background-color: #243042; }
:root[data-theme="dark"] table.grid.dp-grid tbody tr > td.dp-sun { background-color: #5b2350; }
/* 납품계획 조회: 틀 고정(기간합계까지) · 재고 묶음 칸 */
table.grid.dp-grid .dp-fz { position: sticky; z-index: 2; }
table.grid.dp-grid thead th.dp-fz { z-index: 4; }
table.grid.dp-grid tbody td.dp-fz:not(.dp-left):not(.dp-sum):not(.dp-stk) { background-color: var(--panel); }
table.grid.dp-grid tbody tr:nth-child(even) td.dp-fz:not(.dp-left):not(.dp-sum):not(.dp-stk) { background-color: color-mix(in srgb, var(--head) 45%, var(--panel)); }
table.grid.dp-grid tfoot td.dp-fz:not(.dp-left):not(.dp-sum):not(.dp-stk) { background-color: var(--head); }
table.grid.dp-grid .dp-fz-last { box-shadow: 3px 0 4px -2px rgba(0,0,0,.25); }
table.grid.dp-grid thead th.dp-stk-h { cursor: pointer; text-decoration: underline dotted; }
table.grid.dp-grid thead th.dp-sub { background: color-mix(in srgb, var(--blue) 82%, #fff) !important; }
table.grid.dp-grid tbody tr > td.dp-sub { background-color: #f3f7fc; }
table.grid.dp-grid thead th.dp-fz { border-right: 1px solid #5d8fd6; }
table.grid.dp-grid tbody td.dp-fz, table.grid.dp-grid tfoot td.dp-fz { border-right: 1px solid #d5dde8; }
/* 납품계획 조회 색 통일 (2026-11-19): 색 칸(수주잔량·재고·기간합계·일요일)은 어느 줄이든 같은 색. 고른 줄·마우스 올린 줄은 바탕색을 바꾸지 않고 옅은 파랑을 덧씌움 */
table.grid.dp-grid tbody tr.sel > td, table.grid.dp-grid tbody tr.click:hover > td { background-image: linear-gradient(rgba(31,111,209,.14), rgba(31,111,209,.14)); }
table.grid.dp-grid tbody tr.sel > td { background-color: var(--panel) !important; }
table.grid.dp-grid tbody tr.sel > td.dp-left { background-color: #c8f5c8 !important; }
table.grid.dp-grid tbody tr.sel > td.dp-sum { background-color: #fff6c2 !important; }
table.grid.dp-grid tbody tr.sel > td.dp-stk { background-color: #eef3fa !important; }
table.grid.dp-grid tbody tr.sel > td.dp-sub { background-color: #f3f7fc !important; }
table.grid.dp-grid tbody tr.sel > td.dp-sun { background-color: #fbd3f3 !important; }
table.grid.dp-grid tbody tr.click:hover > td:not(.dp-left):not(.dp-sum):not(.dp-stk):not(.dp-sun) { background-color: var(--panel); }
table.grid.dp-grid tbody tr > td.dp-stk.dp-sub { background-color: #f3f7fc; }
table.grid.dp-grid tbody tr:nth-child(even) > td.dp-left, table.grid.dp-grid tbody tr:nth-child(even) > td.dp-sum, table.grid.dp-grid tbody tr:nth-child(even) > td.dp-stk, table.grid.dp-grid tbody tr:nth-child(even) > td.dp-sun { background-image: none; }
/* 납품계획 조회: 재고 묶음 칸 이름 두 줄로 좁게 · 날짜 입력 칸은 칸에 꽉 차게 가운데 정렬 */
table.grid.dp-grid thead th.dp-stk-h { white-space: normal; line-height: 1.25; min-width: 0; padding: 4px 6px; font-size: 12px; }
table.grid.dp-grid td.dp-stk { padding-left: 6px; padding-right: 6px; }
table.grid.dp-grid td.dp-cell { padding: 2px 4px; text-align: center; vertical-align: middle; }
table.grid.dp-grid td.dp-cell input.plan-cell { display: block; width: 100%; min-width: 56px; box-sizing: border-box; margin: 0 auto; text-align: right; }
table.grid.dp-grid thead th.dp-stk-h:not(.dp-sub) { min-width: 86px; word-break: keep-all; }
/* 식별표 스캔 칸 (바코드 리더기): 모든 화면 같은 모양 — 앞에 바코드 리더 그림 (2026-11-19) */
input.scan-in { padding-left: 38px !important; background: var(--panel) no-repeat 8px center / 22px 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231f2937' stroke-width='1.6'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/g%3E%3Cg fill='%231f2937'%3E%3Crect x='5.5' y='5.5' width='2' height='2'/%3E%3Crect x='16.5' y='5.5' width='2' height='2'/%3E%3Crect x='5.5' y='16.5' width='2' height='2'/%3E%3Crect x='14' y='14' width='2.5' height='2.5'/%3E%3Crect x='18.5' y='14' width='2.5' height='2.5'/%3E%3Crect x='16.25' y='16.25' width='2.5' height='2.5'/%3E%3Crect x='14' y='18.5' width='2.5' height='2.5'/%3E%3Crect x='18.5' y='18.5' width='2.5' height='2.5'/%3E%3C/g%3E%3Cpath d='M1.5 12h21' stroke='%23e11d48' stroke-width='1.4'/%3E%3C/svg%3E") !important; border: 2px solid var(--accent, #2b6cb0) !important; border-radius: 8px; }
input.scan-in:focus { box-shadow: 0 0 0 3px color-mix(in srgb, #1f6fd1 25%, transparent); }
input.scan-in:disabled { opacity: .6; }
.oe-x .oe-prev { white-space: nowrap; flex: none; }
.oe-x .oe-prevs { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
/* 반품전표조회: 반품 수량 입력 칸 (2026-11-19) */
table.grid th.ret-qh { background: var(--blue); }
table.grid td.ret-qc { padding: 2px 4px; background: #fff6c2; }
table.grid td.ret-qc input.ret-q { width: 78px; text-align: right; border: 1px solid #c9a227; border-radius: 4px; padding: 3px 6px; }
.oe-x .oe-prevs.oe-prevs-row { flex-direction: row; gap: 14px; font-size: inherit; }
/* 거래마감 처리: 마감참고사항 입력 칸 (2026-11-19) */
td.cl-notec { padding: 2px 4px; background: #fff6c2; }
td.cl-notec input.cl-note { width: 180px; border: 1px solid #c9a227; border-radius: 4px; padding: 3px 6px; }
td.cl-notec input.cl-note.saved { background: #dcfce7; }
/* 품목별 실사재고: 왼쪽 품목 표를 넓게, 칸은 줄바꿈 없이 (2026-11-19) */
.stk-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
.stk-split table.grid td, .stk-split table.grid th { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.stk-split table.grid { font-size: 12.5px; }
.stk-split table.grid td input.num { width: 80px !important; }
.stk-split table.grid .chip { padding: 0 6px; font-size: 11px; }
/* 사용자 권한: 가로 전체 칸 (2026-11-19) */
.perm-col.c-all { background: color-mix(in srgb, #fff6c2 60%, transparent); border-left: 2px solid #c9a227; }
/* 사용자 권한: 그룹 이름 · 사원 엮기 (2026-11-19) */
.perm-g .perm-gname { font-weight: 600; color: inherit; }
.perm-mem { max-height: 56vh; overflow: auto; display: grid; gap: 8px; }
.perm-mem-dept { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.perm-mem-dept legend { font-weight: 700; padding: 0 4px; }
.perm-mem-p { white-space: nowrap; }
.perm-mem-p .chip { margin-left: 4px; font-size: 11px; padding: 0 5px; }
.perm-groups .perm-dept { font-size: 12px; font-weight: 700; color: var(--blue); margin: 10px 2px 4px; border-bottom: 1px solid var(--line); padding-bottom: 2px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.perm-groups .perm-dept-del { font-size: 11px; padding: 1px 8px; min-height: 0; line-height: 1.6; }

/* 사용자 권한 · 새 보안그룹 작성 (2026-11-19) */
.perm-new { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 6px 0 10px; background: #f6f9ff; }
.perm-new-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.perm-new-row .fld { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.perm-new-row input[type=text] { min-width: 220px; }
.perm-new-who { display: block; margin-top: 6px; font-size: 12px; }
.perm-groups .perm-g-new { border-style: dashed; }
.stk-adj { margin: 10px 0; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stk-adj .note { flex-basis: 100%; margin: 4px 0 0; }
/* 품목별 장부재고 (2026-11-19) */
.ldg td.b { font-weight: 700; }
.ldg tr.ldg-adj td { background: #fff8e6; }
.ldg-wrap { max-height: calc(100vh - 330px); }
/* 창고별 품목재고 조회 (2026-11-19) */
.whs th.whs-wh { min-width: 90px; }
.whs td.whs-cell.clickable { cursor: pointer; }
.whs td.whs-cell.clickable:hover { background: #e8f1ff; text-decoration: underline; }
.whs td.whs-tot { font-weight: 700; background: #fff4b8 !important; color: #5a4300; } :root[data-theme="dark"] .whs td.whs-tot { background: #4a4214 !important; color: #ffe9a3; }   /* 합계: 머리글은 다른 창고 칸과 같은 색, 아래 자료 칸만 노란색 (2026-11-20) */
.whs-pick { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.whs-wrap { max-height: calc(100vh - 330px); }
.whs-pick label.chk { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; margin: 0; }
.menu-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 9px; font-size: 10.5px; font-weight: 700; background: #fde7c7; color: #8a4b00; vertical-align: middle; }

.sidebar details.has-tag > summary { flex-wrap: wrap; row-gap: 2px; }
.sidebar .menu-tag-row { flex-basis: 100%; padding-left: 38px; line-height: 1; }
.sidebar .menu-tag-row .menu-tag { margin-left: 0; white-space: nowrap; }
input.bad { border-color: var(--red, #d33) !important; background: #fff1f1; }
table.oe-table input.oe-po.ro { background: #f1f4f8; color: #334; border-color: transparent; cursor: default; }
.oe-partbtn { padding: 2px 6px; min-height: 0; margin-left: 4px; } .oe-partbtn .bc-printer { display: inline-flex; }
/* 품목검사 방법설정 (2026-11-19) */
.im-grid td.im-ed select { min-width: 110px; }
.im-grid tr.edited td { background: #fff8e6; }
.im-wrap { max-height: calc(100vh - 330px); }
.im-grid td.im-ed select.im-l { max-width: 220px; }
.pl-grid input.pl-d { width: 135px; } .pl-grid input.pl-n { width: 60px; }
/* 부품식별표 발행: 분할 (2026-11-19) */
.pl-grid tr.pl-split > td { background: color-mix(in srgb, var(--accent, #2563eb) 7%, transparent); }
.pl-grid tr.pl-sub > td { background: color-mix(in srgb, var(--accent, #2563eb) 3%, transparent); font-size: .92em; }
.pl-grid input.pl-q { width: 90px; }
.pl-grid td.bad { color: #dc2626; font-weight: 700; }
.im-grid th.im-hd { cursor: pointer; user-select: none; background: color-mix(in srgb, #eab308 18%, transparent); } .im-grid th.im-hd .im-hint { opacity: .6; font-weight: 400; }
/* 품질 기초정보 스프레드 (2026-11-19) */
.qs-grid td.qs-c { padding: 0; } .qs-grid .qs-in { width: 100%; min-width: 50px; border: 0; border-radius: 0; background: transparent; padding: 5px 6px; font: inherit; color: inherit; }
.qs-grid .qs-in:focus { outline: 2px solid var(--accent, #2563eb); outline-offset: -2px; background: var(--card, #fff); }
.qs-grid td.qs-ro { color: var(--muted, #64748b); } .qs-grid tr.qs-spare td { background: color-mix(in srgb, #94a3b8 8%, transparent); }
.qs-grid tr.qs-cur > td, .qs-items tr.qs-cur > td { background: color-mix(in srgb, #eab308 20%, transparent); }
.qs-wrap { max-height: 60vh; } .qs-top { max-height: 38vh; }
.qs-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; } @media (max-width: 900px) { .qs-split { grid-template-columns: 1fr; } }
.qs-sub { display: flex; gap: 8px; align-items: center; padding: 6px 4px; flex-wrap: wrap; } .qs-sub .sp { flex: 1; } .qs-empty { padding: 20px; }
/* 바코드 화면 공통: 오른쪽 위 노란 스캔 칸 (2026-11-19) */
.scan-box { margin-left: auto; background: #fff7c2; border: 2px solid #eab308; border-radius: 10px; padding: 6px 10px; min-width: min(420px, 100%); }
.scan-box label { display: flex; flex-direction: column; gap: 3px; font-weight: 700; color: #854d0e; }
.scan-box .scan-in { width: 100%; font-size: 1.1rem; }
.iq-bar { align-items: flex-end; flex-wrap: wrap; } .iq-bar .sp { flex: 1; }
.iq-grid td.iq-ed { padding: 0; } .iq-grid .iq-d { min-width: 64px; } .iq-grid .iq-n { min-width: 80px; } .iq-grid .iq-memo { min-width: 150px; }
.iq-grid select.iq-v { border: 0; background: transparent; font: inherit; padding: 5px 4px; }
.iq-grid th.iq-h { background: color-mix(in srgb, #eab308 35%, var(--accent, #1d4ed8)); }
.iq-grid tr.v-ok > td { background: color-mix(in srgb, #22c55e 10%, transparent); } .iq-grid tr.v-ng > td { background: color-mix(in srgb, #ef4444 12%, transparent); } .iq-grid tr.v-sp > td { background: color-mix(in srgb, #f59e0b 14%, transparent); }
.iq-grid tr.iq-sel > td:first-child, .iq-grid tr.iq-sel > td:nth-child(2) { background: color-mix(in srgb, #2563eb 25%, transparent); }
.iq-grid td.iq-bad.bad { color: #dc2626; font-weight: 700; } .iq-grid td.iq-empty { text-align: left; padding: 24px; color: var(--muted, #64748b); }
.iq-wrap { max-height: 64vh; }
/* 생산지시 출고 (VB 모양, 2026-11-19) */
.is-grid td.is-ed { padding: 0; } .is-grid .is-q { min-width: 90px; } .is-grid .is-pick { width: 100%; min-width: 220px; border: 0; background: transparent; font: inherit; padding: 5px 4px; }
.is-grid tr.is-m > td { border-top: 2px solid color-mix(in srgb, var(--accent, #1d4ed8) 35%, transparent); }
.iq-grid td.iq-bad.click { cursor: pointer; text-decoration: underline dotted; } .iq-dlg input.num { width: 120px; } .iq-dlg td:first-child { min-width: 180px; }
.is-grid .is-rs { min-width: 200px; background: #fffbe0; } .is-grid .is-split { padding: 1px 8px; min-height: 0; font-size: 12px; }
.is-grid td.is-av { white-space: nowrap; } .is-grid td.is-av.click { cursor: pointer; } .is-grid td.is-av.click:hover { background: color-mix(in srgb, #eab308 18%, transparent); }
.mix-box { border: 3px solid #dc2626; border-radius: 10px; padding: 14px 16px; background: #fef2f2; } .mix-ttl { color: #b91c1c; font-size: 1.35rem; font-weight: 800; margin-bottom: 10px; }
.mix-t th { text-align: left; padding: 4px 10px 4px 0; color: #7f1d1d; white-space: nowrap; } .mix-t td { padding: 4px 0; }
/* 공정 순서 안내 팝업 (2026-11-19) */
.chain-box { border: 3px solid #f59e0b; border-radius: 10px; padding: 14px 16px; background: #fffbeb; max-width: 560px; }
.chain-ttl { color: #b45309; font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; } .chain-msg { color: #7c2d12; }
.chain-step { display: flex; gap: 10px; align-items: center; margin: 10px 0; font-size: 1.1rem; } .chain-step span { color: var(--muted, #64748b); } .chain-step b { color: #b91c1c; }
.appr-box { margin-top: 12px; border: 1px dashed var(--line, #cbd5e1); border-radius: 8px; padding: 8px 12px; } .appr-box > summary { cursor: pointer; font-weight: 600; color: #475569; }
/* 생산지시 출고 상태 (2026-11-19) */
.is-grid td.is-st { min-width: 104px; border-left: 7px solid var(--stc, #94a3b8); vertical-align: middle; }
.is-grid td.st-none { --stc: #dc2626; background: #fef2f2; } .is-grid td.st-short { --stc: #f59e0b; background: #fffbeb; }
.is-grid td.st-done { --stc: #16a34a; background: #f0fdf4; } .is-grid td.st-over { --stc: #2563eb; background: #eff6ff; }
.st-pill { display: block; font-weight: 800; color: var(--stc); white-space: nowrap; }
.st-bar { display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--stc) 18%, #e5e7eb); margin-top: 4px; overflow: hidden; } .st-bar i { display: block; height: 100%; background: var(--stc); }
.st-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.st-chip { border: 2px solid var(--stc, #94a3b8); background: var(--card, #fff); color: inherit; border-radius: 999px; padding: 5px 14px; font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.st-chip b { font-size: 1.1em; } .st-chip.st-none { --stc: #dc2626; } .st-chip.st-short { --stc: #f59e0b; } .st-chip.st-done { --stc: #16a34a; } .st-chip.st-over { --stc: #2563eb; }
.st-chip.on { background: var(--stc, #475569); color: #fff; }
.is-grid .is-rs { background: transparent; border: 1px dashed #cbd5e1; } .is-grid tr.iq-sel .is-rs, .is-grid .is-rs:focus { background: #fff7c2; border: 1px solid #eab308; }

/* 생산지시 입력 스프레드 (2026-11-19) */
.po-grid td { padding: 2px 4px; vertical-align: middle; }
.po-grid select, .po-grid .pick-in { font-size: .9rem; padding: 2px 4px; }
.po-grid .pick { min-width: 150px; }
.po-grid tr.po-new td { background: #fffbea; }
.po-grid tr.po-dirty td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }
.po-grid select.po-st { font-weight: 700; border-radius: 12px; }
.po-grid select.po-진행 { background: #dcfce7; color: #166534; border-color: #22c55e; }
.po-grid select.po-대기 { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.po-grid select.po-예비 { background: #e0e7ff; color: #3730a3; border-color: #818cf8; }
.po-grid select.po-완료 { background: #f1f5f9; color: #475569; }
.po-grid tr.po-r-완료 td { color: #64748b; }

/* 스캔 화면 한 화면 고정 · 틀 고정 (2026-11-19) */
.table-wrap.fit-wrap { overflow: auto; }
.table-wrap.fit-wrap thead th { position: sticky; top: 0; z-index: 3; }
table.fz-grid td.fz { position: sticky; z-index: 2; background-clip: padding-box; }
table.fz-grid > tbody > tr > td.fz:not(.is-st) { background: var(--panel); }
table.fz-grid > tbody > tr:nth-child(even) > td.fz:not(.is-st) { background: color-mix(in srgb, var(--head) 45%, var(--panel)); }
table.fz-grid thead th.fz { z-index: 5; }
table.fz-grid > tbody > tr::before { position: sticky; left: 0; z-index: 2; background: var(--panel); }
table.fz-grid > thead > tr::before { position: sticky; left: 0; top: 0; z-index: 6; }
table.fz-grid .fz-last { box-shadow: inset -2px 0 0 #64748b; }
table.fz-grid > tbody > tr.iq-sel > td.fz:not(.is-st) { background: #fff7c2; }
:root[data-theme="dark"] table.fz-grid > tbody > tr.iq-sel > td.fz:not(.is-st) { background: #4a3f12; }
table.fz-grid > thead > tr::before { z-index: 6 !important; left: 0; }
table.fz-grid > tbody > tr > td.fz.st-none { background: #fef2f2; } table.fz-grid > tbody > tr > td.fz.st-short { background: #fffbeb; }
table.fz-grid > tbody > tr > td.fz.st-done { background: #f0fdf4; } table.fz-grid > tbody > tr > td.fz.st-over { background: #eff6ff; }

/* 생산계획 입력 (VB, 2026-11-20) */
.pp-grid td.pp-k { white-space: nowrap; font-weight: 600; }
.pp-grid tr.pp-b td { border-top-style: dashed; background: color-mix(in srgb, var(--head) 35%, var(--panel)); }
.pp-grid td.pp-diff { color: var(--bad); font-weight: 700; }
.pp-grid tr.pp-a.sel td, .pp-grid tr.pp-b.sel td { background: color-mix(in srgb, #fde68a 45%, var(--panel)); }

/* 생산 진행내역 조회 (2026-11-20) */
.pg-st { display: inline-block; padding: 1px 10px; border-radius: 10px; font-weight: 700; font-size: .85rem; }
.pg-st.pg-none { background: #f1f5f9; color: #475569; } .pg-st.pg-run { background: #dbeafe; color: #1d4ed8; } .pg-st.pg-done { background: #dcfce7; color: #166534; }
.po-st.po-진행 { background: #dcfce7; color: #166534; padding: 1px 8px; border-radius: 10px; font-weight: 700; } .po-st.po-대기 { background: #fef3c7; color: #92400e; padding: 1px 8px; border-radius: 10px; font-weight: 700; }
.po-st.po-예비 { background: #e0e7ff; color: #3730a3; padding: 1px 8px; border-radius: 10px; } .po-st.po-완료 { background: #f1f5f9; color: #475569; padding: 1px 8px; border-radius: 10px; }
.pg-grid tbody tr { cursor: pointer; }

.pd-top { max-height: 52vh; } .pd-bottom { max-height: 26vh; overflow: auto; }
.pd-grid tbody tr { cursor: pointer; }
.pd-v { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 700; font-size: .85rem; }
.pd-v.pd-ok { background: #dcfce7; color: #166534; } .pd-v.pd-ng { background: #fee2e2; color: #b91c1c; } .pd-v.pd-sp { background: #fef3c7; color: #92400e; } .pd-v.pd-wait { background: #f1f5f9; color: #475569; }
.pp-grid > tbody > tr.pp-b > td.fz { background: color-mix(in srgb, var(--head) 35%, var(--panel)); }
.pp-grid > tbody > tr > td.fz.dp-left { background: #c8f7c5; } .pp-grid > tbody > tr > td.fz.dp-sum { background: #fef9c3; }
.pp-grid > tbody > tr.sel > td.fz { background: color-mix(in srgb, #fde68a 45%, var(--panel)); }

/* 작업표준서 열람 (2026-11-20) */
.pg-doc { cursor: zoom-in; color: var(--blue); text-decoration: underline dotted; }
.ws-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } .ws-tabs .on { background: var(--blue); color: #fff; }
.ws-view { max-height: 76vh; overflow: auto; text-align: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.ws-img { max-width: 100%; height: auto; display: block; margin: 0 auto; } .ws-pdf { width: 100%; height: 74vh; border: 0; }

/* 초·중·종물 종합판정: 오른쪽 검사기준서 그림 · 벗어난 값 빨강 (2026-11-20) */
.fi-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 34%); gap: 12px; align-items: start; }
.fi-left { min-width: 0; }
.fi-std { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #f8fafc; max-height: 70vh; overflow: auto; }
.fi-std-h { font-weight: 700; margin-bottom: 6px; } .fi-std-view { text-align: center; }
table.grid.insp td input.in-bad { background: #fee2e2; color: #b91c1c; border-color: #ef4444; font-weight: 700; }
@media (max-width: 900px) { .fi-split { grid-template-columns: 1fr; } }

/* 초·중·종물 신호 범례: 점과 글자를 한 묶음으로 (2026-11-20) */
p.legend.fi-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.fi-legend .lg-it { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fi-legend .lg-note { color: var(--muted); }
td > .dot { display: block; margin: 0 auto; }
.btn.lamp { min-width: 64px; justify-content: center; text-align: center; }

/* 초·중·종물 검사일지 (2026-11-20) */
.fl-grid td.fl-m { white-space: nowrap; } .fl-grid td.fl-ok { color: #166534; background: #f0fdf4; cursor: pointer; } .fl-grid td.fl-ng { color: #b91c1c; background: #fef2f2; cursor: pointer; font-weight: 700; }

/* 계측기 검교정 기일관리 (2026-11-20) */
.gg-grid td { padding: 2px 3px; } .gg-grid input.qs-in { min-width: 0; width: 100%; } .gg-grid input[type=date] { width: 130px; }
.gg-grid td.gg-st { white-space: nowrap; font-weight: 700; border-left: 6px solid #94a3b8; }
.gg-grid td.gg-over { background: #fee2e2; color: #b91c1c; border-left-color: #dc2626; } .gg-grid td.gg-soon { background: #fef3c7; color: #92400e; border-left-color: #f59e0b; }
.gg-grid td.gg-ok { background: #f0fdf4; color: #166534; border-left-color: #16a34a; } .gg-grid td.gg-drop { background: #f1f5f9; color: #475569; border-left-color: #334155; } .gg-grid td.gg-none { color: #64748b; }
.st-chip.gg-over { --stc: #dc2626; } .st-chip.gg-soon { --stc: #f59e0b; } .st-chip.gg-ok { --stc: #16a34a; } .st-chip.gg-drop { --stc: #334155; } .st-chip.gg-none { --stc: #94a3b8; }

/* 시스템 관리자 화면 통제 (2026-11-20) */
.ctl-wrap { max-height: 70vh; } .ctl-grid tr.off td { color: #94a3b8; background: #f8fafc; } .ctl-grid tr.off td b { text-decoration: line-through; }
.ctl-grid td.ctl-rules { white-space: normal; min-width: 280px; } .ctl-rule { display: block; font-size: .88rem; margin: 2px 0; }

/* AI 도우미 (2026-11-20) */
.ai-wrap { max-height: 64vh; } .ai-grid td.ai-why { white-space: normal; min-width: 260px; font-size: .86rem; color: var(--muted); }
.ai-grid td.ai-red { background: #fee2e2; } .ai-grid td.ai-orange { background: #fef3c7; } .ai-grid td.ai-green { background: #f0fdf4; }
.ai-cnt { font-size: .8rem; opacity: .85; }
/* 초·중·종물 검사기준 (2026-11-20) */
td.fi-off { color: var(--muted, #999); background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(128,128,128,.08) 6px 12px); }
.fs-grid td.c input[type=checkbox] { width: 18px; height: 18px; }
.fs-grid th.fs-tg { cursor: pointer; text-decoration: underline dotted; }
.fs-grid tr.fs-dirty td { background: #fff7d6; }
/* 생산 이동 처리 · (소)/(대) 포장 작업 (2026-11-20, VB 51·52·53) */
.pm-bar { flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.pm-dates { display: inline-flex; gap: 4px; align-items: center; }
.pm-opts { display: inline-flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.pm-chk { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; white-space: nowrap; }
.pm-scanbox { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.pm-scanbox > span { font-weight: 700; color: var(--accent, #1d4f91); font-size: 16px; }
.pm-scan { min-width: 260px; background: #fffbd6; }
.pm-wh { background: #fffbd6; padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.pm-split { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 10px; }
.pm-grid td, .pm-grid th { white-space: nowrap; }
.pm-grid .pm-num { width: 80px; text-align: right; }
.pm-grid tr.pm-on > td { background: #eaf3ff; }
.pm-grid tr.pm-focus > td { box-shadow: inset 0 2px 0 #2f6fd0, inset 0 -2px 0 #2f6fd0; }
.pm-grid tr.pm-excl > td { color: #999; text-decoration: line-through; }
.pm-grid td.pm-left-q { color: #c0392b; font-weight: 600; }
.pm-rgrid tr.pm-plan > td { color: #6b7a90; font-style: italic; background: #fafcff; }
.pm-rgrid tr.pm-grp > td { background: #f1f5fb; }
@media (max-width: 1100px) { .pm-split { grid-template-columns: 1fr; } .pm-scanbox { margin-left: 0; } }
.filters label.pm-chk { flex-direction: row; align-items: center; gap: 5px; font-size: 12.5px; }
.filters label.pm-scanbox { flex-direction: row; }
.pm-opts { gap: 4px; }
.pm-scanbox > span { white-space: nowrap; }
.pm-grid td.pm-now { font-weight: 600; }
/* 생산전표 조회 · 생산 완료일지 · 생산번호 이력 (2026-11-20) */
.ps-grid td, .ps-grid th, .pl-grid td, .pl-grid th { white-space: nowrap; }
.ps-grid tbody tr { cursor: default; }
.pl-grid .pl-t { width: 62px; text-align: center; }
.pl-grid .pl-note { width: 180px; }
.pl-grid tr.pl-dirty > td { background: #fff7d6; }
.pl-grid td.pl-link { cursor: pointer; text-decoration: underline dotted; }
.lt-dlg { width: min(1000px, 96vw); }
.lt-sec { margin-bottom: 12px; }
.lt-sec h4 { margin: 6px 0; }
.lt-sec .table-wrap { max-height: 240px; }
/* 첨부파일 · 생산 작업표준 입력 · 생산전표 입력 (2026-11-20) */
.att-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.att-head .sp { flex: 1; }
.att-grid td { vertical-align: middle; }
.att-thumb { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--line, #ccd); border-radius: 4px; vertical-align: middle; background: #fff; }
.att-pdf { display: inline-block; width: 44px; line-height: 44px; text-align: center; background: #c0392b; color: #fff; font-weight: 700; border-radius: 4px; font-size: 12px; }
.att-row { cursor: pointer; }
.ws-top { max-height: 46vh; }
.ws-grid tr { cursor: pointer; }
.se-panel .table-wrap { max-height: 240px; }
/* 기기정보·금형정보·금형생산품 표 입력 (2026-11-20) */
.sh-grid td, .sh-grid th { white-space: nowrap; }
.sh-grid .qs-in { min-width: 60px; }
.sh-grid .qs-in[type=date] { width: 130px; }
.sh-grid td.sh-calc { color: #2f6fd0; font-weight: 600; background: #f6f9ff; }
.sh-grid td.sh-calc.neg { color: #c0392b; }
.sh-grid tr.pm-focus > td { background: #eaf3ff; }
.sh-grid .sh-pick { cursor: pointer; background: #fffbd6; }
/* LOT 추적 (2026-11-20) */
.lt-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.lt-left tbody tr { cursor: pointer; }
.lt-right tr.lt-sub > td { background: #f7f9fc; }
.lt-right td.lt-step { font-weight: 600; white-space: nowrap; }
.lt-right td.lt-c-ship { color: #c0392b; } .lt-right td.lt-c-qc { color: #8e44ad; } .lt-right td.lt-c-raw { color: #1e7b3c; } .lt-right td.lt-c-move { color: #6b7685; }
.lt-right td.lt-c-pack { color: #2f6fd0; } .lt-right td.lt-c-prod { color: #0b3d75; }
.pg-grid td.pg-pop { color: #2f6fd0; font-weight: 600; }
.lt-chain { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; width: 100%; }
.lt-ch { padding: 2px 8px; border-radius: 10px; background: #e7f6ec; color: #1e7b3c; font-size: 12.5px; }
.lt-ch.off { background: #f3f4f6; color: #9aa3ae; }
.lt-right tr.lt-none > td { color: #9aa3ae; font-style: italic; }
