/* MesOn 공용 디자인 체계 — 테마 3(기본 base·회색조 hmi·고대비 contrast) × 모드 2(light·dark) 토큰(의미 층만 바뀜) + 고정 컴포넌트(앱 레이아웃·작업 공간 탭·객체 화면·액션 바·마법사·현장 카드·액션 레일·사유 타일·범위 밴드·대시보드 타일·5M). <html data-theme data-scheme> 로 고름. 확정 시안 tracks/platform/ux/mockups/v3(감독님 결정 2026-11-26). 납품본 프론트도 가져다 씀(색·글꼴은 토큰으로 바꿈) */

/* ── 테마 토큰 ── */
:root, [data-theme="base"] {
  --font: "Pretendard Variable", "Pretendard", "Malgun Gothic", system-ui, sans-serif;
  --bg: #F4F7F6; --surface: #FFFFFF; --surface-2: #EEF3F2; --ink: #1B2B33; --ink-2: #5B6B72; --line: #D5DFDD; --line-strong: #A9BBB7; --bw: 1px;
  --accent: #0F766E; --accent-ink: #FFFFFF; --accent-soft: #E3F1EF; --focus: #7FD1C7;
  --rail: #17323A; --rail-ink: #E8F1EF; --rail-ink-2: #9DB3B0; --rail-on: #24525A; --rail-on-ink: #FFFFFF; --rail-line: #2B4A52; --rail-mark: #5FD3C4;
  --pos: #1F7A55; --pos-fg: #1F7A55; --pos-bg: #E4F3EC;
  --warn: #B45309; --warn-fg: #8A3F06; --warn-bg: #FDF1E3;
  --neg: #B91C1C; --neg-fg: #B91C1C; --neg-bg: #FBE9E9;
  --info: #0F766E; --info-fg: #0F766E; --info-bg: #E3F1EF;
  --off-fg: #5B6B72; --off-bg: #EEF2F1;
  --tile-run: #1F7A55; --tile-wait: #3E6A8A; --tile-hold: #B91C1C; --tile-idle: #8A9A9E; --tile-ink: #FFFFFF;
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --shadow: 0 1px 2px rgba(27,43,51,.08);
  --chart-line: #0F766E; --chart-band: #E3F1EF; --chart-2: #7FB8B0;
}
[data-theme="hmi"] {
  --font: "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --bg: #D6D8DA; --surface: #EEEFF0; --surface-2: #E2E4E6; --ink: #1F2124; --ink-2: #555A61; --line: #B9BDC2; --line-strong: #8F949A; --bw: 1px;
  --accent: #1F2124; --accent-ink: #FFFFFF; --accent-soft: #DCE6F1; --focus: #2F6FB0;
  --rail: #C4C7CB; --rail-ink: #1F2124; --rail-ink-2: #555A61; --rail-on: #EEEFF0; --rail-on-ink: #1F2124; --rail-line: #A3A7AC; --rail-mark: #2F6FB0;
  --pos: #555A61; --pos-fg: #1F2124; --pos-bg: transparent;
  --warn: #E8A317; --warn-fg: #6B4600; --warn-bg: #F7E7C4;
  --neg: #C8102E; --neg-fg: #C8102E; --neg-bg: #F6E3E6;
  --info: #555A61; --info-fg: #1F2124; --info-bg: transparent;
  --off-fg: #555A61; --off-bg: transparent;
  --tile-run: #9AA0A6; --tile-wait: #B9BDC2; --tile-hold: #C8102E; --tile-idle: #C9CCCF; --tile-ink: #1F2124;
  --r-s: 0; --r-m: 2px; --r-l: 2px; --shadow: none;
  --chart-line: #555A61; --chart-band: #F4F4F5; --chart-2: #9AA0A6;
}
[data-theme="contrast"] {
  --font: "IBM Plex Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --bg: #ECEEF1; --surface: #FFFFFF; --surface-2: #F3F4F6; --ink: #0E1114; --ink-2: #32383F; --line: #6B7380; --line-strong: #0E1114; --bw: 2px;
  --accent: #005387; --accent-ink: #FFFFFF; --accent-soft: #DCEAF4; --focus: #F9A800;
  --rail: #0E1114; --rail-ink: #FFFFFF; --rail-ink-2: #B8BEC6; --rail-on: #F9A800; --rail-on-ink: #0E1114; --rail-line: #3A4048; --rail-mark: #F9A800;
  --pos: #00843D; --pos-fg: #FFFFFF; --pos-bg: #00843D;
  --warn: #F9A800; --warn-fg: #0E1114; --warn-bg: #F9A800;
  --neg: #C1272D; --neg-fg: #FFFFFF; --neg-bg: #C1272D;
  --info: #005387; --info-fg: #FFFFFF; --info-bg: #005387;
  --off-fg: #0E1114; --off-bg: #FFFFFF;
  --tile-run: #00843D; --tile-wait: #005387; --tile-hold: #C1272D; --tile-idle: #6B7380; --tile-ink: #FFFFFF;
  --r-s: 2px; --r-m: 2px; --r-l: 2px; --shadow: none;
  --chart-line: #0E1114; --chart-band: #F3F4F6; --chart-2: #6B7380;
}

/* ── 다크 모드(data-scheme="dark") — 테마마다 같은 토큰 이름의 다크 값(감독님 결정 2026-11-26 「지금 다크까지」) ── */
[data-scheme="dark"], [data-theme="base"][data-scheme="dark"] {
  --bg: #0F1A1E; --surface: #16242A; --surface-2: #1D2E35; --ink: #E6EFED; --ink-2: #9DB3B0; --line: #2B4049; --line-strong: #4A6870;
  --accent: #2BB3A3; --accent-ink: #06201D; --accent-soft: #143A38; --focus: #5FD3C4;
  --rail: #26393F; --rail-ink: #E6EFED; --rail-ink-2: #A9BDBA; --rail-on: #36545B; --rail-on-ink: #FFFFFF; --rail-line: #3E5860; --rail-mark: #5FD3C4;
  --pos: #4CC38A; --pos-fg: #8BE0B8; --pos-bg: #12352A;
  --warn: #E39A3B; --warn-fg: #F3C27E; --warn-bg: #3A2A12;
  --neg: #F05252; --neg-fg: #FF9A9A; --neg-bg: #3D1618;
  --info: #2BB3A3; --info-fg: #7FDACF; --info-bg: #143A38;
  --off-fg: #9DB3B0; --off-bg: #1D2E35;
  --tile-run: #1F7A55; --tile-wait: #335C78; --tile-hold: #B42323; --tile-idle: #34454B; --tile-ink: #FFFFFF;
  --shadow: none; --chart-line: #5FD3C4; --chart-band: #143A38; --chart-2: #3E7C74;
}
[data-theme="hmi"][data-scheme="dark"] {
  --bg: #2A2D30; --surface: #34383C; --surface-2: #3D4146; --ink: #E4E6E8; --ink-2: #A9AEB4; --line: #50555B; --line-strong: #6E747B;
  --accent: #D9DCDF; --accent-ink: #1F2124; --accent-soft: #2F4A66; --focus: #6FA8E0;
  --rail: #464B51; --rail-ink: #F0F1F2; --rail-ink-2: #C3C7CB; --rail-on: #5E646B; --rail-on-ink: #FFFFFF; --rail-line: #5E646B; --rail-mark: #8DBCEB;
  --pos: #A9AEB4; --pos-fg: #E4E6E8; --pos-bg: transparent;
  --warn: #F0B23A; --warn-fg: #F7D48A; --warn-bg: #4A3A12;
  --neg: #FF4D5E; --neg-fg: #FF9AA4; --neg-bg: #4A1A20;
  --info: #A9AEB4; --info-fg: #E4E6E8; --info-bg: transparent;
  --off-fg: #A9AEB4; --off-bg: transparent;
  --tile-run: #5A6066; --tile-wait: #474C52; --tile-hold: #C8102E; --tile-idle: #3D4146; --tile-ink: #E4E6E8;
  --chart-line: #A9AEB4; --chart-band: #3D4146; --chart-2: #6E747B;
}
[data-theme="contrast"][data-scheme="dark"] {
  --bg: #000000; --surface: #0B0B0B; --surface-2: #171717; --ink: #FFFFFF; --ink-2: #D6D6D6; --line: #8A8A8A; --line-strong: #FFFFFF;
  --accent: #4FB3FF; --accent-ink: #000000; --accent-soft: #0B2A40; --focus: #F9A800;
  --rail: #262626; --rail-ink: #FFFFFF; --rail-ink-2: #D6D6D6; --rail-on: #F9A800; --rail-on-ink: #000000; --rail-line: #FFFFFF; --rail-mark: #F9A800;
  --pos: #00C853; --pos-fg: #000000; --pos-bg: #00C853;
  --warn: #F9A800; --warn-fg: #000000; --warn-bg: #F9A800;
  --neg: #FF3B3B; --neg-fg: #000000; --neg-bg: #FF3B3B;
  --info: #4FB3FF; --info-fg: #000000; --info-bg: #4FB3FF;
  --off-fg: #FFFFFF; --off-bg: #000000;
  --tile-run: #00843D; --tile-wait: #005387; --tile-hold: #C1272D; --tile-idle: #2A2A2A; --tile-ink: #FFFFFF;
  --chart-line: #FFFFFF; --chart-band: #171717; --chart-2: #8A8A8A;
}

/* 트렌드 펜 색(히스토리언, G29) — 판정 색(pos·warn·neg)과 따로, 펜마다 선 모양도 다르게(UI 헌법 2절 1·2) */
:root, [data-theme="base"] { --pen1: #2563EB; --pen2: #7C3AED; --pen3: #0E7490; --pen4: #9A6B1F; }
[data-theme="hmi"] { --pen1: #1F2937; --pen2: #4B5563; --pen3: #374151; --pen4: #6B7280; }
[data-theme="contrast"] { --pen1: #003A75; --pen2: #5B21B6; --pen3: #00596B; --pen4: #6B4200; }
[data-scheme="dark"], [data-theme="base"][data-scheme="dark"] { --pen1: #60A5FA; --pen2: #A78BFA; --pen3: #22D3EE; --pen4: #D4A657; }
[data-theme="hmi"][data-scheme="dark"] { --pen1: #E5E7EB; --pen2: #B0B5BB; --pen3: #9CA3AF; --pen4: #D1D5DB; }
[data-theme="contrast"][data-scheme="dark"] { --pen1: #7CC4FF; --pen2: #C4B5FD; --pen3: #67E8F9; --pen4: #FCD34D; }

/* ── 바탕 ── */
* { box-sizing: border-box; }
html { color-scheme: light; }
html[data-scheme="dark"] { color-scheme: dark; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; font-size: 14px; line-height: 1.5; }
a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── 기본 컴포넌트 ── */
input, select, button { font: inherit; color: inherit; }
input, select { padding: 6px 10px; border: var(--bw) solid var(--line); border-radius: var(--r-s); background: var(--surface); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: var(--bw) solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.neg { color: var(--neg); border-color: transparent; background: transparent; }
.btn .i { width: 16px; height: 16px; }
.i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; border: var(--bw) solid transparent; white-space: nowrap; }
[data-theme="hmi"] .st, [data-theme="contrast"] .st { border-radius: var(--r-s); }
.st::before { font-weight: 800; }
.st.pos { color: var(--pos-fg); background: var(--pos-bg); } .st.pos::before { content: "✓"; }
.st.warn { color: var(--warn-fg); background: var(--warn-bg); } .st.warn::before { content: "!"; }
.st.neg { color: var(--neg-fg); background: var(--neg-bg); } .st.neg::before { content: "✕"; }
.st.info { color: var(--info-fg); background: var(--info-bg); } .st.info::before { content: "▶"; font-size: .7em; }
.st.off { color: var(--off-fg); background: var(--off-bg); border-color: var(--line); } .st.off::before { content: "○"; }
[data-theme="hmi"] .st.pos, [data-theme="hmi"] .st.info { font-weight: 500; padding-left: 0; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--ink-2); border-bottom: var(--bw) solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 8px 12px; border-bottom: 1px solid var(--surface-2); height: 38px; white-space: nowrap; }
[data-theme="contrast"] td { border-bottom-color: #C9CED4; }
td.n, th.n { text-align: right; }
tr.sel td { background: var(--accent-soft); }
tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.card { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
.card > h2, .card > header h2 { margin: 0; font-size: 15px; font-weight: 800; }
.card > h2 { padding: 12px 16px; border-bottom: var(--bw) solid var(--line); display: flex; align-items: center; gap: 8px; }
.card > h2 small { font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.card > h2 .sp { flex: 1; }
.meter { display: inline-block; width: 48px; height: 6px; margin-right: 8px; vertical-align: middle; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
[data-theme="hmi"] .bar i { background: var(--ink-2); }
/* 이행률 열(Ui/Rate.cs) — 바 + % 글 + 표식(▼ 모자람·✕ 0), 계획·이행률·목표(production/plan) */
.rate { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.rate .bar { flex: 1; }
.rate b { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.rate.low .bar i { background: var(--warn); }
.rate.bad .bar i { background: var(--neg); }
.rate.low b::before { content: "▼ "; color: var(--warn-fg); font-size: 11px; }
.rate.bad b::before { content: "✕ "; color: var(--neg-fg); font-size: 11px; }
/* 일정 격자(라인 › 품목 × 일자, 보기 전용) — 셀 = 계획 + 작은 글(실적), 하단 바 = 다 됨(pos)·모자람(warn) */
.cal { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.cal th, .cal td { border: var(--bw) solid var(--line); padding: 4px 6px; text-align: right; font-size: 12.5px; }
.cal th:first-child, .cal td:first-child { text-align: left; white-space: nowrap; }
.cal td.p { background: var(--surface); }
.cal td.p a { color: inherit; text-decoration: none; display: block; }
.cal td.p small { display: block; color: var(--ink-2); font-size: 11px; }
.cal td.p.done { box-shadow: inset 0 -3px 0 var(--pos); }
.cal td.p.short { box-shadow: inset 0 -3px 0 var(--warn); }
.calwrap { overflow-x: auto; padding: 14px 16px; }
/* KPI 줄(히스토리언 상태·대시보드) — 카드마다 이름·큰 수·작은 글, 누를 수 있으면 a.kl */
.kline { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 14px 16px; }
.kline > * { border: var(--bw) solid var(--line); border-radius: var(--r-m); padding: 10px 12px; background: var(--surface); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.kline a:hover { border-color: var(--line-strong); }
.kline b { font-size: 22px; font-variant-numeric: tabular-nums; }
.kline small { color: var(--ink-2); }
/* 트렌드 차트(js/meson-trend.js) — SVG, 펜 선(.p1~.p4 색 + 모양), Bad 회색 밴드, 커서 선, 펜 표 */
.trendbox { display: flex; flex-direction: column; gap: 10px; }
.trend { width: 100%; height: auto; display: block; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-m); touch-action: none; }
.trend .grid line { stroke: var(--line); stroke-width: 1; }
.trend text { fill: var(--ink-2); font-size: 11px; }
.trend polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend .p1 { stroke: var(--pen1); } .trend .p2 { stroke: var(--pen2); stroke-dasharray: 7 4; } .trend .p3 { stroke: var(--pen3); stroke-dasharray: 2 3; } .trend .p4 { stroke: var(--pen4); stroke-dasharray: 10 3 2 3; }
.trend .bad { fill: var(--surface-2); }
.trend .cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.trend .empty { font-size: 14px; }
.pens { width: 100%; border-collapse: collapse; font-size: 13px; }
.pens td, .pens th { padding: 6px 8px; border-bottom: var(--bw) solid var(--line); text-align: left; }
.pens td.n, .pens th.n { text-align: right; font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 24px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 6px; }
.sw.p1 { border-color: var(--pen1); } .sw.p2 { border-color: var(--pen2); border-top-style: dashed; } .sw.p3 { border-color: var(--pen3); border-top-style: dotted; } .sw.p4 { border-color: var(--pen4); border-top-style: double; }
.preset { display: inline-flex; gap: 2px; padding: 2px; border: var(--bw) solid var(--line); border-radius: var(--r-s); }
.preset a { padding: 2px 10px; font-size: 12.5px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; }
.preset a.on { background: var(--surface-2); font-weight: 700; }
.kpi { display: grid; gap: 0; }
.kpi > div { padding: 12px 16px; border-right: var(--bw) solid var(--line); }
.kpi > div:last-child { border-right: 0; }
.kpi small { display: block; color: var(--ink-2); font-size: 12.5px; }
.kpi b { font-size: 26px; font-weight: 800; line-height: 1.2; }
.kpi b em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-left: 4px; }

/* ── 관리자 앱 레이아웃 ── */
.app { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 640px; }
.rail { background: var(--rail); color: var(--rail-ink); border-right: var(--bw) solid var(--rail-line); display: flex; flex-direction: column; padding: 12px 10px; }
.rail .brand { display: flex; align-items: center; gap: 8px; padding: 6px 8px 14px; font-weight: 800; font-size: 17px; }
.rail .brand b { color: var(--rail-mark); }
.rail .grp { display: flex; align-items: center; gap: 10px; padding: 8px; margin-top: 2px; font-weight: 700; }
.rail a { display: block; padding: 6px 8px 6px 36px; border-radius: var(--r-s); color: var(--rail-ink-2); text-decoration: none; }
.rail a.on { background: var(--rail-on); color: var(--rail-on-ink); font-weight: 700; }
.rail .foot { margin-top: auto; padding-top: 12px; border-top: var(--bw) solid var(--rail-line); }
.rail .foot span { display: block; font-size: 12px; color: var(--rail-ink-2); margin: 0 4px 6px; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border: var(--bw) solid var(--rail-line); border-radius: var(--r-s); }
.seg3 button { padding: 5px 0; border: 0; border-radius: var(--r-s); background: transparent; color: var(--rail-ink-2); font-size: 12.5px; cursor: pointer; }
.seg3 button[aria-pressed="true"] { background: var(--rail-on); color: var(--rail-on-ink); font-weight: 700; }
.main { display: flex; flex-direction: column; min-width: 0; }
.top { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px; background: var(--surface); border-bottom: var(--bw) solid var(--line); }
.find { display: flex; align-items: center; gap: 8px; width: 360px; padding: 7px 12px; border: var(--bw) solid var(--line); border-radius: var(--r-s); background: var(--surface-2); color: var(--ink-2); }
.find kbd { margin-left: auto; font-family: inherit; font-size: 11.5px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.top .sp { flex: 1; }
.iconbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: var(--bw) solid var(--line); border-radius: var(--r-s); background: var(--surface); }
.iconbtn b { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--neg); color: #fff; font-size: 12px; text-align: center; }
/* 작업 공간 탭 — 연 화면(CM) */
.ws { display: flex; align-items: flex-end; gap: 2px; padding: 6px 14px 0; background: var(--surface-2); border-bottom: var(--bw) solid var(--line); }
.ws span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: var(--bw) solid transparent; border-bottom: 0; border-radius: var(--r-s) var(--r-s) 0 0; color: var(--ink-2); font-size: 13px; }
.ws span.on { background: var(--bg); border-color: var(--line); color: var(--ink); font-weight: 700; margin-bottom: calc(var(--bw) * -1); }
.ws span i { font-style: normal; color: var(--ink-2); font-size: 12px; }
.chead { display: flex; align-items: flex-end; gap: 10px; padding: 14px 18px 12px; }
.chead small { display: block; color: var(--ink-2); font-size: 12.5px; }
.chead h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.chead .sp { flex: 1; }
.work { margin: 0 18px 18px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow); }
.list { border-right: var(--bw) solid var(--line); }
.filters { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: var(--bw) solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border: var(--bw) solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); }
[data-theme="hmi"] .chip, [data-theme="contrast"] .chip { border-radius: var(--r-s); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip b { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--neg); color: #fff; font-size: 11px; text-align: center; }
.panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.panel h2 { margin: 0; font-size: 17px; font-weight: 800; }
.meta { color: var(--ink-2); font-size: 13px; }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-m); background: var(--surface-2); }
.tabs span { flex: 1; text-align: center; padding: 5px; border-radius: var(--r-s); color: var(--ink-2); font-weight: 600; font-size: 13px; }
.tabs span.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
[data-theme="contrast"] .tabs span.on { outline: 2px solid var(--ink); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.fields .wide { grid-column: 1 / -1; }
.fields input, .fields select { width: 100%; min-width: 0; }
.acts { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; border-top: var(--bw) solid var(--line); }
/* 객체 화면 — 하위 탭 + 묶인 액션 바(CM) */
.obj { margin: 0 18px 18px; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow); }
.subtabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: var(--bw) solid var(--line); }
.subtabs span { padding: 10px 12px; color: var(--ink-2); border-bottom: 3px solid transparent; font-weight: 600; }
.subtabs span.on { color: var(--ink); border-bottom-color: var(--accent); }
.subtabs span b { margin-left: 4px; font-size: 11px; padding: 0 6px; border-radius: 9px; background: var(--neg); color: #fff; }
.actbar { display: flex; align-items: stretch; gap: 0; padding: 6px 8px; border-bottom: var(--bw) solid var(--line); background: var(--surface-2); overflow-x: auto; }
.actgrp { display: flex; flex-direction: column; padding: 0 8px; border-right: 1px solid var(--line); }
.actgrp:last-child { border-right: 0; }
.actgrp div { display: flex; gap: 2px; }
.actgrp small { text-align: center; font-size: 11px; color: var(--ink-2); padding-top: 2px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 6px 6px 4px; border-radius: var(--r-s); font-size: 12px; font-weight: 600; color: var(--ink); }
.act .i { width: 22px; height: 22px; }
.act.dim { color: var(--ink-2); opacity: .45; }
.act.hot { color: var(--neg); }
.objbody { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.objbody > div:first-child { border-right: var(--bw) solid var(--line); }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; padding: 14px 16px; font-size: 13.5px; }
.kv dt { color: var(--ink-2); text-align: right; }
.kv dd { margin: 0; }
.tree { padding: 10px 16px 16px; font-size: 13.5px; }
.tree li { list-style: none; padding: 4px 0; }
.tree ul { margin: 0; padding-left: 18px; border-left: 1px dashed var(--line-strong); }
/* 마법사 — 맥락 경로 + 폼 + 아래 동작(CM) */
.wiz { max-width: 760px; margin: 0 auto; background: var(--surface); border: var(--bw) solid var(--line-strong); border-radius: var(--r-l); box-shadow: 0 12px 40px rgba(0,0,0,.18); overflow: hidden; }
.wiz header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-2); border-bottom: var(--bw) solid var(--line); font-weight: 800; font-size: 16px; }
.crumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; border-bottom: var(--bw) solid var(--line); font-size: 13.5px; }
.crumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
[data-theme="hmi"] .crumb a { color: var(--ink); text-decoration: underline; }
.crumb span { color: var(--ink-2); }
.steps { display: flex; gap: 6px; padding: 10px 16px; border-bottom: var(--bw) solid var(--line); font-size: 13px; color: var(--ink-2); }
.steps b { color: var(--ink); }
.wiz .bodyw { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.wiz footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: var(--bw) solid var(--line); background: var(--surface-2); }

/* ── 현장 앱(큰 밀도) ── */
.floor { font-size: 18px; }
.ftop { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 20px; background: var(--rail); color: var(--rail-ink); border-bottom: var(--bw) solid var(--rail-line); }
.ftop .logo { font-weight: 800; color: var(--rail-mark); margin-right: 6px; }
.pill { padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 16px; }
[data-theme="hmi"] .pill { background: var(--surface); border: 1px solid var(--line); border-radius: 0; }
[data-theme="contrast"] .pill { border: 1px solid #5A6068; border-radius: 2px; background: transparent; }
.ftop .sp { flex: 1; }
/* 상태 카드 + 프로그레스 바(AVEVA·MM) */
.statecard { display: grid; grid-template-columns: 220px minmax(0, 1fr) 160px; gap: 18px; align-items: center; padding: 12px 20px; background: var(--surface); border-bottom: var(--bw) solid var(--line); }
.statebox { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-m); background: var(--warn-bg); color: var(--warn-fg); border-left: 8px solid var(--warn); }
[data-theme="hmi"] .statebox { background: var(--surface-2); color: var(--ink); }
.statebox b { font-size: 20px; display: block; line-height: 1.2; }
.statebox small { font-size: 14px; }
.prog small { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 14px; }
.prog .bar { height: 14px; border-radius: 7px; margin: 6px 0; }
.clock { text-align: right; }
.clock b { display: block; font-size: 26px; }
.clock small { color: var(--ink-2); font-size: 14px; }
.fbody { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 16px; padding: 16px 20px; }
.scan { display: flex; gap: 10px; margin-bottom: 14px; }
.scan input { flex: 1; font-size: 24px; padding: 14px 16px; border-radius: var(--r-m); border-width: 2px; }
.big { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 0 26px; border-radius: var(--r-m); border: 2px solid var(--line-strong); background: var(--surface); font-size: 21px; font-weight: 800; cursor: pointer; }
.big.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.big.neg { border-color: var(--neg); color: var(--neg); }
.big .i { width: 24px; height: 24px; }
/* 세로 액션 레일(현장) */
.vrail { display: flex; flex-direction: column; gap: 8px; }
.vact { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; border-radius: var(--r-m); border: 2px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 700; color: var(--ink); }
.vact .i { width: 28px; height: 28px; }
.vact.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vact.neg { border-color: var(--neg); color: var(--neg); }
.vact.off { opacity: .35; }
/* 확정 전 할 일(Siemens) */
.todo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.todo div, .todo > a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-m); font-size: 16px; text-decoration: none; }
.todo .t-neg { background: var(--neg-bg); color: var(--neg-fg); }
[data-theme="contrast"] .todo .t-neg { background: #FBE3E4; color: var(--ink); box-shadow: inset 8px 0 0 var(--neg); }
.todo .t-warn { background: var(--warn-bg); color: var(--warn-fg); }
[data-theme="hmi"] .todo .t-warn { box-shadow: inset 6px 0 0 var(--warn); background: var(--surface); }
[data-theme="hmi"] .todo .t-neg { box-shadow: inset 6px 0 0 var(--neg); background: var(--surface); }
.todo .t-ok { background: var(--surface); color: var(--ink-2); border: var(--bw) solid var(--line); }
.todo b { flex: 1; }
.rec { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.rec header { display: flex; align-items: baseline; gap: 14px; padding: 12px 18px; border-bottom: var(--bw) solid var(--line); }
.rec header b { font-size: 26px; font-weight: 800; }
.rec header span { color: var(--ink-2); }
.val { display: grid; grid-template-columns: minmax(0, 1fr) 170px 260px 120px; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--surface-2); }
.val small { display: block; color: var(--ink-2); font-size: 14.5px; }
.val .box { font-size: 26px; text-align: right; padding: 8px 12px; border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.val.bad { background: var(--neg-bg); }
[data-theme="contrast"] .val.bad { background: #FBE3E4; box-shadow: inset 8px 0 0 var(--neg); }
[data-theme="hmi"] .val.bad { box-shadow: inset 6px 0 0 var(--neg); }
.val.bad .box { border-color: var(--neg); color: var(--neg); font-weight: 700; }
.floor .st { font-size: 16px; padding: 4px 13px; }
/* 기준 범위 밴드(CM) — 하한~상한 안 값 위치 */
.band { position: relative; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--neg-bg) 0 18%, var(--pos-bg) 18% 82%, var(--neg-bg) 82% 100%); }
[data-theme="hmi"] .band { background: linear-gradient(90deg, #C9CCCF 0 18%, #F4F4F5 18% 82%, #C9CCCF 82% 100%); }
[data-theme="contrast"] .band { background: linear-gradient(90deg, #F3C9CB 0 18%, #CDEBD9 18% 82%, #F3C9CB 82% 100%); outline: 1px solid var(--ink); }
.band i { position: absolute; top: -5px; bottom: -5px; width: 4px; border-radius: 2px; background: var(--ink); }
.band.bad i { background: var(--neg); width: 6px; }
.bandlim { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); padding: 2px 16% 0; }
/* 작업 목록 카드(AVEVA) */
.jobs { display: flex; flex-direction: column; gap: 10px; }
.job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 16px; border: var(--bw) solid var(--line); border-left: 8px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); }
.job.run { border-left-color: var(--info); }
.job.wait { border-left-color: var(--warn); }
.job.hold { border-left-color: var(--neg); }
.job.q { border-left-color: var(--line-strong); }
.job b { font-size: 22px; }
.job small { color: var(--ink-2); font-size: 15px; }
.job .right { text-align: right; grid-row: span 2; align-self: center; }
/* 사유 타일(AVEVA) */
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.reason { padding: 16px; border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-size: 18px; font-weight: 700; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; }
.reason small { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.reason.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.reason.gen small { color: var(--pos); font-weight: 700; }
/* 키패드 */
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys span { display: grid; place-items: center; height: 58px; border-radius: var(--r-m); border: var(--bw) solid var(--line); background: var(--surface-2); font-size: 22px; font-weight: 700; }
.keys span.ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-size: 19px; }

/* ── 대시보드 ── */
.dash { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.dgrid { display: grid; gap: 14px; }
.tiles { display: grid; gap: 10px; }
.tile { border-radius: var(--r-m); padding: 12px 14px; color: var(--tile-ink); background: var(--tile-idle); min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.tile.run { background: var(--tile-run); }
.tile.wait { background: var(--tile-wait); }
.tile.hold { background: var(--tile-hold); color: #fff; }
.tile h3 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.tile .num { font-size: 34px; font-weight: 800; line-height: 1.1; }
.tile small { font-size: 12.5px; opacity: .9; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.timeline { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; align-items: center; font-size: 13px; }
.tl { display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.tl i { display: block; height: 100%; }
/* 설비 상태 바(Ui/StateBar, G5) — 조각 = 상태 색 + (넓으면) 글, 데이터 없음 빗금, 범례 같은 색 */
.tl { height: 26px; outline: var(--bw) solid var(--line); }
.tl.tall { height: 40px; }
.tl > i, .tl > a { display: block; flex: none; height: 100%; min-width: 0; font-style: normal; font-size: 11.5px; font-weight: 700; line-height: 26px; text-indent: 4px; white-space: nowrap; overflow: hidden; color: #fff; text-decoration: none; box-shadow: inset -1px 0 0 var(--surface); }
.tl.tall > i, .tl.tall > a { line-height: 40px; font-size: 13px; }
.tl > a:hover, .tl > a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.tl .s-run, .tl-legend .s-run { background: var(--pos); } .tl .s-idle, .tl-legend .s-idle { background: var(--warn); }
.tl .s-down, .tl-legend .s-down { background: var(--neg); } .tl .s-setup, .tl-legend .s-setup { background: var(--info); }
.tl .s-plan, .tl-legend .s-plan { background: var(--off-fg); } .tl .s-off, .tl-legend .s-off { background: var(--off-bg); color: var(--ink-2); }
.tl .s-unk, .tl-legend .s-unk { background: repeating-linear-gradient(135deg, var(--line-strong) 0 3px, transparent 3px 7px); color: var(--ink-2); }
.tl .s-none { background: transparent; box-shadow: none; }
.tl-legend i { outline: var(--bw) solid var(--line); }
.tlrows { display: flex; flex-direction: column; }
.tlrow { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: var(--bw) solid var(--line); font-size: 13px; }
.tlrow > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.tlaxis { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; gap: 10px; font-size: 11px; color: var(--ink-2); }
.tlaxis > div { display: flex; justify-content: space-between; }
.tlaxis.solo { grid-template-columns: minmax(0, 1fr); }
.pareto { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pareto > div { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; gap: 8px; align-items: center; }
.pareto > div > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pareto b { display: block; height: 14px; background: var(--neg); border-radius: 3px; }
.pareto .none b { background: var(--warn); }
.split2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .split2 { grid-template-columns: minmax(0, 1fr); } .tlrow, .tlaxis { grid-template-columns: 90px minmax(0, 1fr) 52px; } }
.ring { width: 96px; height: 96px; }
.flow { display: flex; align-items: stretch; padding: 14px; gap: 0; }
.node { flex: 1; min-width: 0; padding: 12px 14px; border: var(--bw) solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.node h3 { margin: 0; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.node .num { font-size: 40px; font-weight: 800; line-height: 1.1; margin: 4px 0 2px; }
.node .sub { color: var(--ink-2); font-size: 13px; }
.node.held { border: 3px solid var(--neg); background: var(--neg-bg); }
[data-theme="contrast"] .node.held { background: #FBE3E4; }
.node.watch { border-color: var(--warn); }
.node.sel { box-shadow: inset 0 0 0 3px var(--accent); }
.arrow { flex: 0 0 30px; display: grid; place-items: center; color: var(--line-strong); }
.tags { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.tagv { padding: 12px 14px; border-right: var(--bw) solid var(--line); }
.tagv:last-child { border-right: 0; }
.tagv small { display: block; color: var(--ink-2); font-size: 12.5px; }
.tagv b { font-size: 28px; font-weight: 800; }
.tagv b em { font-style: normal; font-size: 13px; color: var(--ink-2); margin-left: 4px; font-weight: 600; }
.tagv .band { height: 8px; margin-top: 8px; }
.tagv .band i { top: -4px; bottom: -4px; width: 3px; }
/* 5M — 작업자·설비·자재·방법·측정(감독님 지시 2026-11-26) */
.m5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.m5 > div { padding: 12px 14px; border-right: var(--bw) solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.m5 > div:last-child { border-right: 0; }
.m5 h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.m5 h3 .i { width: 20px; height: 20px; color: var(--ink-2); }
.m5 h3 span:first-of-type { flex: 1; }
.m5 h3 em { font-style: normal; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.m5 p { margin: 0; font-size: 13px; color: var(--ink-2); }
.m5 p b { color: var(--ink); }
.m5 .chg { margin-top: auto; font-size: 12px; padding-top: 6px; border-top: 1px dashed var(--line); color: var(--ink-2); }
.m5 .chg b { color: var(--warn-fg); }
[data-theme="contrast"] .m5 .chg b { color: var(--ink); background: var(--warn); padding: 0 4px; }
.m5 > div.m-neg { box-shadow: inset 0 4px 0 var(--neg); }
.m5 > div.m-warn { box-shadow: inset 0 4px 0 var(--warn); }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 54px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .bar { height: 12px; border-radius: 6px; }
.hbar .bar i.warn { background: var(--warn); }
.hbar .bar i.neg { background: var(--neg); }
.hbar b { text-align: right; }

/* ── 실제 앱에 더한 것(시안에 없던 것 — 쪽 높이·스크롤·결과 안내·빈 줄·폼 줄·로그인·좁은 화면) ── */
.app { min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rail summary { list-style: none; cursor: pointer; }
.rail summary::-webkit-details-marker { display: none; }
.rail summary.grp::after { content: "▾"; margin-left: auto; font-size: 11px; color: var(--rail-ink-2); }
.rail details:not([open]) summary.grp::after { content: "▸"; }
.rail a:hover { color: var(--rail-ink); }
.rail a.on:hover { color: var(--rail-on-ink); }
.top form { margin: 0; }
.top .who { color: var(--ink); text-decoration: none; font-weight: 600; }
/* 헤더 공장 고르기(platform/plants) — 공장이 하나면 그리지 않음 */
.plantpick { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border: var(--bw) solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); color: var(--ink); }
.plantpick .i { width: 16px; height: 16px; }
.plantpick select { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; padding: 4px 2px; }
/* 공장 표식 — 「전 공장」 목록의 공장 열 */
.pb { display: inline-block; padding: 0 6px; font-size: 11px; font-weight: 700; border: var(--bw) solid var(--line-strong); border-radius: var(--r-s); background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.pb.common { font-weight: 600; color: var(--ink-2); border-style: dashed; }
.find input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); outline: none; }
.find:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
a.iconbtn, button.iconbtn { color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600; }
.ws:empty { display: none; }
.ws span a { color: inherit; text-decoration: none; }
.ws span button { padding: 0; border: 0; background: transparent; color: var(--ink-2); font-size: 12px; cursor: pointer; }
.page { margin: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.page > .work, .page > .obj { margin: 0; }
.card > .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.card > .body > p { margin: 0; }
.toast { margin: 0 18px 12px; padding: 10px 14px; border-radius: var(--r-m); border: var(--bw) solid transparent; background: var(--pos-bg); color: var(--pos-fg); font-weight: 600; }
.toast::before { content: "✓ "; }
.toast.err { background: var(--neg-bg); color: var(--neg-fg); }
.toast.err::before { content: "✕ "; }
[data-theme="contrast"] .toast { border-color: var(--ink); }
td.empty { height: 64px; color: var(--ink-2); text-align: center; white-space: normal; }
td.wrap, th.wrap { white-space: normal; }
td a.k { color: var(--ink); font-weight: 700; text-decoration: none; }
td a.k:hover { text-decoration: underline; }
tr.off td { color: var(--ink-2); }
.list { min-width: 0; overflow-x: auto; }
.work.solo { grid-template-columns: minmax(0, 1fr); }
.work.solo .list { border-right: 0; }
.panel > form { display: flex; flex-direction: column; gap: 12px; }
.fields label.check, .checks label { flex-direction: row; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.fields input[type="checkbox"], .fields input[type="radio"] { width: auto; flex-shrink: 0; margin: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.inline { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.inline label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.inline input:not([type="checkbox"]), .inline select { min-width: 140px; }
textarea { font: inherit; color: inherit; padding: 6px 10px; border: var(--bw) solid var(--line); border-radius: var(--r-s); background: var(--surface); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
a.btn { color: var(--ink); text-decoration: none; }
a.btn.pri { color: var(--accent-ink); }
.btn.sm { padding: 3px 10px; font-size: 12.5px; }
.btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.tabs a { flex: 1; padding: 5px; border-radius: var(--r-s); color: var(--ink-2); font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
[data-theme="contrast"] .tabs a.on { outline: 2px solid var(--ink); }
.subtabs a { padding: 10px 12px; color: var(--ink-2); border-bottom: 3px solid transparent; font-weight: 600; text-decoration: none; }
.subtabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.subtabs a b { margin-left: 4px; font-size: 11px; padding: 0 6px; border-radius: 9px; background: var(--neg); color: #fff; }
button.act, a.act { border: 0; background: transparent; font-family: inherit; text-decoration: none; cursor: pointer; }
button.act:disabled { cursor: not-allowed; }
a.chip { text-decoration: none; }
.filters { flex-wrap: wrap; }
.filters form { display: contents; }
.filters input, .filters select { padding: 4px 10px; }
code { padding: 1px 6px; border-radius: 4px; background: var(--surface-2); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: normal; word-break: break-all; }
.err-text { color: var(--neg); font-weight: 600; }
.gap { flex: 1; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-wrap .card { width: min(420px, 100%); }
.login-wrap .brandline { font-size: 21px; font-weight: 800; }
.login-wrap .brandline b { color: var(--accent); }
.login-wrap input { width: 100%; }
.login-wrap .btn { width: 100%; justify-content: center; }
@media (max-width: 1100px) {
  .work, .objbody { grid-template-columns: minmax(0, 1fr); }
  .list, .objbody > div:first-child { border-right: 0; border-bottom: var(--bw) solid var(--line); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; }
  .find { width: auto; flex: 1; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .chead { flex-wrap: wrap; align-items: center; }
  .page, .work, .obj { margin-left: 12px; margin-right: 12px; }
}
/* 현장 앱 — 실제 화면 */
.ftop a { color: inherit; text-decoration: none; }
.ftop form { margin: 0; }
.ftop .btn { background: transparent; color: var(--rail-ink); border-color: var(--rail-line); }
.fpage { max-width: 1280px; margin: 0 auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.floor .toast { margin: 12px 20px 0; font-size: 17px; }
.floor input, .floor select, .floor textarea { min-height: 52px; padding: 10px 12px; border-radius: var(--r-m); font-size: 19px; }
.floor .btn { min-height: 52px; padding: 0 20px; border-radius: var(--r-m); font-size: 18px; }
.floor .card > h2 { font-size: 19px; }
.floor td { height: 50px; }
.floor th { font-size: 14px; }
button.vact, a.vact { width: 100%; font-family: inherit; text-decoration: none; cursor: pointer; }
button.vact:disabled { opacity: .35; cursor: not-allowed; }
a.big, button.big { font-family: inherit; text-decoration: none; color: var(--ink); }
a.big.pri { color: var(--accent-ink); }
a.job { color: inherit; text-decoration: none; }
a.job:hover { border-color: var(--line-strong); }
.val .box { width: 100%; min-width: 0; }
.val select.box { text-align: left; font-size: 22px; }
.todo form { display: contents; }
.statebox .i { width: 30px; height: 30px; }
.statebox.info { background: var(--info-bg); color: var(--info-fg); border-left-color: var(--info); }
.statebox.pos { background: var(--pos-bg); color: var(--pos-fg); border-left-color: var(--pos); }
.statebox.neg { background: var(--neg-bg); color: var(--neg-fg); border-left-color: var(--neg); }
.statebox.off { background: var(--surface-2); color: var(--ink); border-left-color: var(--line-strong); }
.res { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.res li { padding: 6px 12px; border: var(--bw) solid var(--line); border-radius: var(--r-m); background: var(--surface); font-size: 16px; }
.floor .login-wrap .card { width: min(520px, 100%); }
@media (max-width: 900px) {
  .statecard { grid-template-columns: minmax(0, 1fr); }
  .fbody { grid-template-columns: minmax(0, 1fr); }
  .vrail { flex-direction: row; flex-wrap: wrap; }
  .vrail > * { flex: 1 1 120px; }
  .val { grid-template-columns: minmax(0, 1fr) 150px; }
}

/* ── 트리 그리드(계층 자료 — 단마다 같은 열, W3C treegrid) · 셀 오류 · 저장 바 · 분할 화면(docs/03_UI_헌법.md 3절 2·4·5) ── */
table.tgrid tr[hidden] { display: none; }
table.tgrid tr[data-tg-level]:focus { outline: none; }
table.tgrid tr[data-tg-level]:focus-visible td { box-shadow: inset 0 2px 0 var(--focus), inset 0 -2px 0 var(--focus); }
table.tgrid tr[data-tg-level]:focus-visible td:first-child { box-shadow: inset 3px 2px 0 var(--focus), inset 0 -2px 0 var(--focus); }
.tg-ind { display: inline-block; width: calc((var(--tg-level, 1) - 1) * 20px); flex-shrink: 0; }
.tg-tog, .tg-leaf { display: inline-grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; margin-right: 4px; vertical-align: middle; }
.tg-tog { padding: 0; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink-2); font-size: 12px; cursor: pointer; }
.tg-tog::before { content: "▾"; }
tr[aria-expanded="false"] .tg-tog::before { content: "▸"; }
.tg-tog:hover { background: var(--surface-2); color: var(--ink); }
td.tg-c { white-space: nowrap; }
td.tg-c > * { vertical-align: middle; }
table.tgrid tr.tg-ro td { color: var(--ink-2); background: var(--surface-2); }
.floor .tg-ind { width: calc((var(--tg-level, 1) - 1) * 28px); }
.floor .tg-tog, .floor .tg-leaf { width: 36px; height: 36px; font-size: 16px; }
/* 셀 오류 — 고칠 셀에 바로(원칙 8) */
td.bad input, td.bad select, td.bad textarea { border-color: var(--neg); box-shadow: inset 0 0 0 1px var(--neg); }
.cell-err { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--neg-fg); white-space: normal; }
.cell-err::before { content: "✕ "; }
[data-theme="contrast"] .cell-err { color: var(--neg); }
/* 저장 바 — 저장·되돌리기가 늘 보임, 저장 안 한 변경 수([data-mx-state], js/meson-data.js) */
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; border-top: var(--bw) solid var(--line); background: var(--surface); }
.savebar .sp { flex: 1; }
.floor .savebar { padding: 12px 20px; }
/* 분할 화면 — 표 + 사이드 패널(패널이 열린 동안 표는 보기만) */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.split > :first-child { min-width: 0; overflow-x: auto; border-right: var(--bw) solid var(--line); }
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > :first-child { border-right: 0; border-bottom: var(--bw) solid var(--line); }
}

/* ── 잠김 바 — 쓰인 버전(고치기 막힘)을 표 위에 먼저 보이고 대신 할 일을 줌(원칙 10) ── */
.lockbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: var(--bw) solid var(--line); background: var(--off-bg); color: var(--ink); font-weight: 600; }
.lockbar .sp { flex: 1; }
[data-theme="contrast"] .lockbar { box-shadow: inset 6px 0 0 var(--ink); }

/* ── 버전 비교 — 더함(+ 녹)·뺌(− 적)·바뀜(~ 황), 기호 + 색 + 글(원칙 1) ── */
.diff { list-style: none; margin: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.diff li { padding: 8px 12px; border-left: 4px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface-2); }
.diff li::before { font-weight: 800; margin-right: 6px; }
.diff li.add { border-left-color: var(--pos); } .diff li.add::before { content: "+"; color: var(--pos); }
.diff li.del { border-left-color: var(--neg); } .diff li.del::before { content: "−"; color: var(--neg); }
.diff li.chg { border-left-color: var(--warn); } .diff li.chg::before { content: "~"; color: var(--warn); }
.diff li > div { margin-top: 2px; color: var(--ink-2); }

/* ── 소요 바 — 채움 = 투입(.ok 맞음·.over 초과), 빗금 = 확정 때 자동 차감 예정, 금 = 소요(바 끝 = 소요의 120% → 금은 83.33%) ── */
.need { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); outline: 1px solid var(--line); }
.need i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ink-2); }
.need i.ok { background: var(--pos); }
.need i.over { background: var(--warn); }
.need s { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--info) 0 3px, transparent 3px 7px); }
.need b { position: absolute; left: 83.33%; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); }
.floor .need { height: 16px; border-radius: 8px; }
.floor .need i { border-radius: 8px; }
.floor .need b { top: -5px; bottom: -5px; width: 4px; }
/* 현장 자재 타일 — 확정 전 할 일 자리, 줄마다 하나(누르면 그 줄로 스캔) */
.mtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.mtile { display: flex; flex-direction: column; gap: 8px; min-height: 140px; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
a.mtile { text-decoration: none; }
a.mtile:hover { border-color: var(--line-strong); }
.mtile.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.mtile header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 17px; font-weight: 700; }
.mtile .q { font-size: 30px; font-weight: 800; line-height: 1.1; }
.mtile .q em { font-style: normal; font-size: 16px; font-weight: 600; color: var(--ink-2); }
.mtile small { color: var(--ink-2); font-size: 14px; }

/* ── 수량 바(공용, production/quantity) — 투입 = 보냄·양품·불량·스크랩·미보고, 색 조각 + 범례 글(.qleg) + 빗금(미보고) ── */
.qbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); outline: 1px solid var(--line); }
.floor .qbar { height: 18px; border-radius: 9px; }
.qbar i { display: block; height: 100%; }
.qbar .g { background: var(--pos); }
.qbar .sent { background: var(--info); }
.qbar .d { background: var(--neg); }
.qbar .s { background: var(--warn); }
.qbar .u { background: repeating-linear-gradient(135deg, var(--line-strong) 0 3px, transparent 3px 7px); }
.qleg { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.floor .qleg { font-size: 16px; }
.qleg b { font-variant-numeric: tabular-nums; }
/* 현장 수량 보고 — 입력 판(.qentry)·결함 유형 타일(.reason 라디오)·떼어 처리 토글(.tgl)·보고 줄(.qlog) */
.qentry { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 2px solid var(--accent); border-radius: var(--r-l); background: var(--surface); }
.qentry .row { display: flex; gap: 10px; align-items: center; font-size: 18px; }
.qentry .row input { font-size: 26px; text-align: right; min-height: 60px; flex: 1; }
label.reason { position: relative; cursor: pointer; }
label.reason input { position: absolute; opacity: 0; pointer-events: none; }
label.reason:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.tgl { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border: 2px solid var(--line); border-radius: var(--r-m); font-size: 18px; font-weight: 700; background: var(--surface); cursor: pointer; }
.tgl input { width: 24px; height: 24px; }
.tgl:has(input:checked) { border-color: var(--neg); box-shadow: inset 0 0 0 2px var(--neg); }
.qlog { width: 100%; border-collapse: collapse; }
.floor .qlog { font-size: 17px; }
.qlog td, .qlog th { padding: 10px 8px; border-bottom: var(--bw) solid var(--line); text-align: left; }
.qlog th { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.qlog td.n, .qlog th.n { text-align: right; font-variant-numeric: tabular-nums; }
.qlog td.n { font-weight: 800; }
.qlog tr.off td { color: var(--ink-2); text-decoration: line-through; }

/* ── 현장 숫자 키패드(js/meson-keypad.js, docs/03_UI_헌법.md 3절 7) — 숫자 필드 옆에 뜨는 패널 ── */
.kpad { position: fixed; z-index: 60; width: 320px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px solid var(--accent); border-radius: var(--r-l); background: var(--surface); box-shadow: 0 12px 40px rgba(0,0,0,.25); font-size: 18px; }
.kpad .kp-label { color: var(--ink-2); font-size: 15px; }
.kpad .kp-disp { min-height: 52px; padding: 6px 12px; border: var(--bw) solid var(--line); border-radius: var(--r-m); background: var(--surface-2); font-size: 30px; font-weight: 800; text-align: right; }
.kpad .keys button { height: 58px; border-radius: var(--r-m); border: var(--bw) solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 22px; font-weight: 700; cursor: pointer; }
.kpad .keys button:disabled { opacity: .35; cursor: not-allowed; }
.kpad .kp-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpad .kp-acts .big { min-height: 56px; }
[data-scheme="dark"] .kpad { box-shadow: 0 12px 40px rgba(0,0,0,.6); }

/* 데이터 무결성(UI 헌법 2절 13~16·3절 8, platform/integrity) — 변경 필드(바 + 전 값 + 되돌리기)·저장 바 상태·대화상자·이력 타임라인 */
.chg input, .chg select, .chg textarea { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
label.check.chg { box-shadow: inset 3px 0 0 var(--warn); padding-left: 8px; }
.was { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.was::before { content: "전 "; font-weight: 700; }
.rev { margin-left: 6px; padding: 0 6px; font-size: 12px; border: var(--bw) solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); color: var(--ink); cursor: pointer; }
.rev::before { content: "↺ "; }
tr.chg td { background: var(--warn-bg); }
[data-theme="contrast"] tr.chg td { box-shadow: inset 4px 0 0 var(--ink); }
[data-mx-state]:empty { display: none; }
form [data-mx-state] { align-self: flex-start; }
.mx-scrim { position: fixed; inset: 0; z-index: 60; padding: 24px 16px; background: rgba(20, 24, 28, .45); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; }
.dlg { width: min(560px, 100%); margin-top: 8vh; background: var(--surface); color: var(--ink); border: var(--bw) solid var(--line-strong); border-radius: var(--r-l); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dlg h3 { margin: 0; padding: 14px 18px; font-size: 16px; border-bottom: var(--bw) solid var(--line); display: flex; gap: 8px; align-items: center; }
.dlg .body { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.dlg .body label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.dlg .body table { width: 100%; }
.dlg .acts { margin: 0; padding: 12px 18px; border-top: var(--bw) solid var(--line); display: flex; gap: 10px; }
.dlg .acts .gap { flex: 1; }
[data-scheme="dark"] .dlg { box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hist li { padding: 10px 2px; border-bottom: var(--bw) solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.hist .who { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-2); }
.hist .who b { color: var(--ink); }
.hist .delta { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hist .delta del { color: var(--neg-fg); }
.hist .delta ins { color: var(--pos-fg); text-decoration: none; font-weight: 700; }
.hist .sign { font-size: 12px; padding: 2px 8px; border-radius: var(--r-s); background: var(--info-bg); color: var(--info-fg); align-self: flex-start; }
.hist .sign::before { content: "✍ "; }
.hist .fill { align-self: flex-start; }
.seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 2px; border: var(--bw) solid var(--line); border-radius: var(--r-s); background: var(--surface-2); }
.seg span { padding: 3px 12px; border-radius: var(--r-s); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg span.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
[data-theme="contrast"] .seg span.on { outline: 2px solid var(--ink); }
.panel > [data-mx-tab="values"] { display: contents; }
.panel > [data-mx-tab][hidden] { display: none; }
.tabs button { flex: 1; padding: 5px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* 다크에서 밝은 색을 직접 쓴 컴포넌트 덮어쓰기 */
[data-theme="contrast"][data-scheme="dark"] .val.bad,
[data-theme="contrast"][data-scheme="dark"] .todo .t-neg,
[data-theme="contrast"][data-scheme="dark"] .node.held { background: #2A0A0B; color: var(--ink); }
[data-theme="hmi"][data-scheme="dark"] .band { background: linear-gradient(90deg, #50555B 0 18%, #2A2D30 18% 82%, #50555B 82% 100%); }
[data-theme="contrast"][data-scheme="dark"] .band { background: linear-gradient(90deg, #5A1215 0 18%, #0E3B22 18% 82%, #5A1215 82% 100%); outline: 1px solid #FFFFFF; }
[data-scheme="dark"] .wiz { box-shadow: 0 12px 40px rgba(0,0,0,.6); }

/* 현황판(G27, monitor/dashboard 확정 시안 board.html) — 라인 타일(.bd-lt)·공정 타일(.bd-wt) 색 = 지금 상태(run·hold·wait·idle, 대시보드 타일 토큰), 5M 점(.bd-m5 > span.neg·warn), 이상 바(.bd-tick), 라인 합계 바(.bd-band), 지시 진행(.bd-prog) */
.bd { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.bd-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.bd-head h1 { margin: 0; font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.bd-k { display: flex; gap: 20px; font-size: 15px; color: var(--ink-2); flex-wrap: wrap; } .bd-k b { font-size: 24px; color: var(--ink); margin-left: 6px; } .bd-k b.neg { color: var(--neg-fg); }
.bd-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.bd-lt, .bd-wt { border-radius: var(--r-l); color: var(--tile-ink); background: var(--tile-idle); display: flex; flex-direction: column; text-decoration: none; }
.bd-lt { padding: 16px; gap: 10px; min-height: 230px; }
.bd-wt { padding: 12px; gap: 6px; min-height: 176px; }
.bd-lt.run, .bd-wt.run { background: var(--tile-run); } .bd-lt.hold, .bd-wt.hold { background: var(--tile-hold); color: #fff; } .bd-lt.wait, .bd-wt.wait { background: var(--tile-wait); }
a.bd-lt:hover, a.bd-wt:hover, a.bd-lt:focus-visible, a.bd-wt:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.bd-lt h3, .bd-wt h3 { margin: 0; display: flex; justify-content: space-between; gap: 6px; }
.bd-lt h3 { font-size: 22px; } .bd-wt h3 { font-size: 18px; }
.bd-num { font-size: 44px; font-weight: 800; line-height: 1; } .bd-wt .bd-num { font-size: 30px; } .bd-num small { font-size: 15px; font-weight: 600; opacity: .85; margin-left: 4px; }
.bd-row { display: flex; gap: 14px; font-size: 16px; font-weight: 700; flex-wrap: wrap; }
.bd-sub { font-size: 13.5px; opacity: .95; }
.bd-job { font-size: 15px; font-weight: 700; line-height: 1.3; } .bd-job small { display: block; font-size: 12.5px; font-weight: 500; opacity: .9; }
.bd-m5 { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; font-size: 12px; font-weight: 700; }
.bd-m5 span { padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.2); }
.bd-m5 span.neg { background: #fff; color: #B91C1C; } .bd-m5 span.warn { background: #FFE7B3; color: #6B3A00; }
.bd-wt.warn { box-shadow: inset 0 0 0 4px #FFE7B3; }
.bd-lrow { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.bd-lname { border-radius: var(--r-m); background: var(--surface); border: var(--bw) solid var(--line); padding: 10px; display: flex; flex-direction: column; justify-content: center; gap: 4px; text-decoration: none; color: var(--ink); }
.bd-lname b { font-size: 18px; } .bd-lname small { color: var(--ink-2); font-size: 12.5px; }
.bd-wcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.bd-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.bd-band > div { border-radius: var(--r-m); background: var(--surface); border: var(--bw) solid var(--line); padding: 10px 14px; }
.bd-band small { display: block; color: var(--ink-2); font-size: 13px; } .bd-band b { font-size: 26px; }
.bd-prog { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 110px; gap: 10px; align-items: center; font-size: 15px; padding: 4px 0; }
.bd-prog .bar { height: 14px; border-radius: 7px; }
.bd-tick { display: flex; gap: 20px; flex-wrap: wrap; font-size: 16px; padding: 10px 14px; border-radius: var(--r-m); background: var(--neg-bg); color: var(--neg-fg); }
.bd-tick.ok { background: var(--surface); color: var(--ink-2); border: var(--bw) solid var(--line); }
.bd-tick a { color: inherit; font-weight: 700; text-decoration: none; }
.mx5 td.m { text-align: center; } .mx5 .st { font-size: 12px; }
/* 흐름 단계(G24 4M 변경점 등 처리 흐름) — 지난 단계 ✓(색 + 기호)·지금 단계 강조(테두리 + 밑줄)·남은 단계 흐림·반려 적 */
.cpflow { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.cpflow span { padding: 2px 8px; border-radius: var(--r-s); border: var(--bw) solid var(--line); color: var(--ink-2); background: var(--surface); }
.cpflow span.done { color: var(--pos-fg); background: var(--pos-bg); }
.cpflow span.done::before { content: "✓ "; }
.cpflow span.now { color: var(--ink); font-weight: 700; border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.cpflow span.bad { color: var(--neg-fg); background: var(--neg-bg); }
.cpflow span.bad::before { content: "✕ "; }
.cpflow i { color: var(--ink-2); font-style: normal; }
/* 태그 — 상태가 아닌 분류 글(예 고용 형태 파견·도급), 색 뜻 없음(G8, master/workers) */
.tag { display: inline-block; padding: 0 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); vertical-align: 1px; white-space: nowrap; }
/* 자격 매트릭스(G8, master/workers) — 작업자 × 자격 종류, 셀 = 공용 상태 표시 .st(색 + 기호 + 글), 위 줄 = 요구하는 곳 */
table.qm th.q { text-align: center; font-size: 12px; white-space: normal; min-width: 96px; }
table.qm td.c { text-align: center; padding: 4px; }
table.qm td.c a { text-decoration: none; }
table.qm td.c.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
table.qm tr.req td { background: var(--surface-2); font-size: 12px; color: var(--ink-2); }
@media (max-width: 760px) { .bd-lrow { grid-template-columns: minmax(0, 1fr); } .bd-prog { grid-template-columns: minmax(0, 1fr) 90px; } .bd-prog > span:first-child { grid-column: 1 / -1; } }
