:root {
  color-scheme: light;
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #17201d;
  --ink-2: #34413c;
  --muted: #6e7a75;
  --line: #dce2df;
  --line-strong: #c7d0cc;
  --sidebar: #18221f;
  --sidebar-2: #24312d;
  --green: #287456;
  --green-2: #3e9270;
  --green-soft: #e4f2eb;
  --blue: #356f9a;
  --blue-soft: #e7f0f7;
  --amber: #a86c16;
  --amber-soft: #fff0d7;
  --red: #b3413c;
  --red-soft: #fae7e5;
  --violet: #6f5c8e;
  --shadow: 0 6px 18px rgba(22, 36, 31, .06);
  --font-sans: "Noto Sans KR", "Pretendard", "Malgun Gothic", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --sidebar-w: 236px;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--ink); letter-spacing: 0; font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(53,111,154,.23); outline-offset: 2px; }
.metric-value, .metric-foot, .metric-card, .process-days, .process-cap, .data-table, .sync-line strong, .count-badge, .model-chip, .tag, .status-line b, .workflow-step strong { font-variant-numeric: tabular-nums; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-w); display: flex; flex-direction: column; padding: 24px 16px 18px; color: #eef6f2; background: var(--sidebar); border-right: 1px solid #31413b; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 25px; }
.brand strong { display: block; font-size: 18px; line-height: 1.1; }
.brand small { display: block; margin-top: 4px; color: #9fb2aa; font-size: 10px; text-transform: uppercase; }
.brand-mark { width: 33px; height: 33px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 5px; background: #f4f9f6; border-radius: 6px; }
.brand-mark i { display: block; border-radius: 2px; }
.brand-mark i:nth-child(1) { background: #32936f; }
.brand-mark i:nth-child(2) { background: #efb84d; }
.brand-mark i:nth-child(3) { background: #d7655d; }
.main-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; height: 44px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; color: #b9c8c2; background: transparent; text-align: left; }
.nav-item:hover { color: #fff; background: #202d29; }
.nav-item.active { color: #fff; background: var(--sidebar-2); border-color: #3b4c46; }
.nav-icon { font-size: 10px; color: #7f948c; font-variant-numeric: tabular-nums; }
.nav-item.active .nav-icon { color: #79c5a4; }
.nav-item b { min-width: 22px; padding: 2px 6px; color: #ffd3ce; background: #613632; border-radius: 8px; text-align: center; font-size: 10px; }
.sidebar-status { margin-top: auto; padding: 14px 12px; background: #202d29; border: 1px solid #33443e; border-radius: 6px; }
.status-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.live-dot { width: 7px; height: 7px; background: #57c691; border-radius: 50%; box-shadow: 0 0 0 4px rgba(87,198,145,.12); }
.sidebar-status p { margin: 7px 0 12px; color: #91a59d; font-size: 11px; }
.sync-line { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid #384942; color: #91a59d; font-size: 10px; }
.sync-line strong { color: #dbe8e2; font-weight: 600; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-w); }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 26px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.page-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-identity small { color: var(--muted); font-size: 10px; }
.page-identity h1 { margin: 4px 0 0; font-size: 21px; line-height: 1.2; }
.menu-toggle { display: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.global-search { width: clamp(220px, 29vw, 390px); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface-soft); color: var(--muted); }
.global-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(40,116,86,.09); }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
kbd { padding: 2px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; background: #fff; color: var(--muted); font-size: 10px; }
.button, .icon-button, .text-button { border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); }
.button { min-height: 38px; padding: 0 14px; border-radius: 5px; font-size: 12px; font-weight: 650; }
.button:hover, .icon-button:hover { border-color: #98aaa2; background: #f7f9f8; }
.button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: #205f46; }
.icon-button { width: 38px; height: 38px; border-radius: 5px; font-size: 16px; }
.text-button { padding: 4px; border: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 700; }
.main-content { padding: 18px 24px 40px; }
.attention-strip { min-height: 42px; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 9px 12px; border: 1px solid #e7c48b; border-left: 4px solid var(--amber); border-radius: 5px; background: #fff8ec; color: #70501c; font-size: 12px; }
.attention-strip strong { color: #583b0d; }
.attention-strip button { margin-left: auto; border: 0; background: transparent; color: #795514; font-weight: 700; }
.view { display: none; }
.view.active { display: block; }
.section-head { min-height: 46px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-kicker { color: var(--green); font-size: 9px; font-weight: 800; }
.section-head h2 { margin: 4px 0 0; font-size: 19px; }
.period-switch, .segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #eef2f0; }
.period-switch button, .segmented button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 11px; }
.period-switch button.active, .segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(20,40,32,.09); font-weight: 700; }
.segmented b { margin-left: 5px; font-size: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(128px, 1fr)); gap: 10px; margin-bottom: 12px; }
.metric-grid.compact { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.metric-card { min-width: 0; min-height: 112px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.metric-card .metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.metric-card .metric-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 5px; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 800; }
.metric-card .metric-value { margin-top: 10px; font-size: clamp(20px, 2vw, 28px); font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-card .metric-foot { margin-top: 8px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-card .metric-foot strong { color: var(--green); }
.metric-card.danger { border-top: 3px solid var(--red); }
.metric-card.warn { border-top: 3px solid var(--amber); }
.metric-card.info { border-top: 3px solid var(--blue); }
.layout-main-aside { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: 12px; margin-bottom: 12px; }
.layout-thirds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.span-2 { grid-column: span 2; }
.panel { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.panel-head { min-height: 34px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.panel-head h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.count-badge { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 12px; color: #8d2d29; background: var(--red-soft); font-size: 10px; font-weight: 800; }
.process-board { display: grid; gap: 10px; }
.process-row { display: grid; grid-template-columns: 62px 1fr 68px 54px; align-items: center; gap: 10px; min-height: 30px; }
.process-name { font-size: 11px; font-weight: 700; }
.bar-track { height: 9px; position: relative; overflow: hidden; border-radius: 3px; background: #e9eeeb; }
.bar-fill { height: 100%; min-width: 3px; border-radius: 3px; background: var(--green-2); }
.bar-fill.warn { background: #d39235; }
.bar-fill.danger { background: #c6504a; }
.process-days, .process-cap { text-align: right; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.process-days strong { color: var(--ink); }
.action-queue { display: grid; gap: 8px; }
.action-item { display: grid; grid-template-columns: 8px 1fr auto; align-items: start; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); cursor: pointer; }
.action-item:hover { border-color: #aabbb3; }
.action-marker { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--amber); }
.action-item.high .action-marker { background: var(--red); }
.action-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.action-item p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.action-item time { color: var(--red); font-size: 9px; white-space: nowrap; }
.legend-inline { display: flex; gap: 12px; color: var(--muted); font-size: 9px; }
.legend-inline i { width: 8px; height: 8px; display: inline-block; margin-right: 4px; border-radius: 2px; }
.legend-print { background: var(--green); }
.legend-bind { background: var(--blue); }
.monthly-chart { height: 190px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: clamp(18px, 7vw, 60px); padding: 15px 8% 24px; border-bottom: 1px solid var(--line); }
.month-group { height: 100%; display: flex; align-items: end; justify-content: center; gap: 7px; position: relative; }
.month-bar { width: clamp(20px, 3vw, 36px); min-height: 3px; position: relative; border-radius: 3px 3px 0 0; background: var(--green); }
.month-bar.secondary { background: var(--blue); }
.month-bar span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 8px; white-space: nowrap; }
.month-label { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; }
.donut-wrap { min-height: 190px; display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 14px; }
.donut { width: 126px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; position: relative; }
.donut::after { content: ""; width: 78px; aspect-ratio: 1; border-radius: 50%; background: #fff; position: absolute; }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center strong { display: block; font-size: 22px; }
.donut-center span { color: var(--muted); font-size: 9px; }
.status-list { display: grid; gap: 8px; }
.status-line { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; font-size: 10px; }
.status-line i { width: 7px; height: 7px; border-radius: 2px; }
.workflow-strip { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.workflow-step { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); }
.workflow-step:last-child { border-right: 0; }
.workflow-step small { color: var(--muted); font-size: 9px; }
.workflow-step strong { display: block; margin-top: 4px; font-size: 16px; }
.workflow-step span { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.filter-row { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-chip { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 10px; }
.filter-chip.active { color: #fff; background: var(--green); border-color: var(--green); }
.table-scroller { overflow: auto; max-width: 100%; }
.table-scroller.tall { max-height: 590px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; line-height: 1.45; }
.data-table th { position: sticky; top: 0; z-index: 2; padding: 10px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); background: #f2f5f3; color: var(--muted); text-align: left; font-size: 10px; font-weight: 700; white-space: nowrap; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid #e9edeb; vertical-align: middle; }
.data-table tbody tr:hover { background: #f7faf8; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .strong { font-weight: 700; }
.data-table .muted { color: var(--muted); }
.cell-main { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { max-width: 240px; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.mini-bar { width: 74px; height: 6px; overflow: hidden; border-radius: 2px; background: #e5eae7; }
.mini-bar i { display: block; height: 100%; background: var(--green-2); }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border-radius: 4px; background: #eef2f0; color: var(--ink-2); font-size: 10px; font-weight: 700; white-space: nowrap; }
.tag.high { color: #922f2a; background: var(--red-soft); }
.tag.mid { color: #805215; background: var(--amber-soft); }
.tag.low { color: #226344; background: var(--green-soft); }
.tag.blue { color: #2e5e7e; background: var(--blue-soft); }
.machine-list { max-height: 515px; display: grid; gap: 7px; overflow: auto; }
.machine-card { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.machine-card strong { font-size: 11px; }
.machine-card span { color: var(--muted); font-size: 9px; }
.machine-card .machine-yield { color: var(--green); font-weight: 800; }
.machine-card .machine-yield.bad { color: var(--red); }
.order-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.filter-controls { display: flex; gap: 6px; }
select, input[type="number"], textarea { border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); outline: 0; }
select { min-height: 34px; padding: 0 28px 0 9px; font-size: 10px; }
select:focus, input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(40,116,86,.09); }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .table-scroller { padding: 0 12px; }
.table-summary { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; color: var(--muted); font-size: 9px; }
.table-summary span:first-child { color: var(--ink); font-weight: 700; }
.order-table tbody tr { cursor: pointer; }
.priority-flag { color: var(--red); font-weight: 900; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; border-top: 1px solid var(--line); }
.pagination button { width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.pagination button:disabled { opacity: .35; cursor: default; }
.pagination span { color: var(--muted); font-size: 10px; }
.planner-actions { display: flex; align-items: center; gap: 9px; }
.save-status { color: var(--muted); font-size: 10px; }
.scenario-bar { display: grid; grid-template-columns: 1.35fr .8fr 1fr 1fr; align-items: end; gap: 18px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.scenario-bar label > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 650; }
.range-line { height: 34px; display: flex; align-items: center; gap: 10px; }
input[type="range"] { width: 100%; accent-color: var(--green); }
.range-line output { min-width: 40px; color: var(--green); font-size: 12px; font-weight: 800; }
.stepper { height: 34px; display: grid; grid-template-columns: 30px 1fr 30px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.stepper button { border: 0; background: #f3f6f4; }
.stepper input { width: 100%; border: 0; border-radius: 0; text-align: center; }
.toggle-row { display: grid !important; grid-template-columns: 1fr 36px; align-items: center; gap: 10px; min-height: 34px; }
.toggle-row > span { margin: 0 !important; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row i { width: 36px; height: 20px; position: relative; border-radius: 10px; background: #cbd3cf; transition: .2s; cursor: pointer; }
.toggle-row i::after { content: ""; width: 14px; height: 14px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle-row input:checked + i { background: var(--green); }
.toggle-row input:checked + i::after { transform: translateX(16px); }
.model-chip { padding: 4px 7px; border: 1px solid #b7c9c1; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; }
.scenario-load { display: grid; gap: 8px; }
.load-line { display: grid; grid-template-columns: 58px 1fr 70px 58px; align-items: center; gap: 8px; min-height: 29px; }
.load-line strong { font-size: 10px; }
.load-line .bar-track { height: 12px; }
.load-line span { text-align: right; color: var(--muted); font-size: 9px; }
.load-line b { text-align: right; font-size: 10px; }
.advice-list { display: grid; gap: 8px; }
.advice-item { padding: 10px; border-left: 3px solid var(--green); background: #f5f9f7; }
.advice-item.warn { border-color: var(--amber); background: #fff8eb; }
.advice-item.high { border-color: var(--red); background: #fdf1f0; }
.advice-item strong { display: block; font-size: 10px; }
.advice-item p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.issue-list { display: grid; gap: 8px; }
.issue-item { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; }
.issue-code { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; color: var(--amber); background: var(--amber-soft); font-size: 10px; font-weight: 900; }
.issue-item.high .issue-code { color: var(--red); background: var(--red-soft); }
.issue-item strong { display: block; font-size: 13px; line-height: 1.4; }
.issue-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.issue-item b { color: var(--red); font-size: 14px; }
.assumption-list { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 12px; line-height: 1.7; }
.assumption-list li { padding: 0 0 11px 5px; }
.source-files { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.source-file { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.file-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 900; }
.source-file strong { display: block; font-size: 12px; line-height: 1.4; }
.source-file > span:not(.file-icon) { color: var(--muted); font-size: 11px; }
.source-file b { color: var(--green); font-size: 11px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 70; visibility: hidden; background: rgba(14,25,21,.34); opacity: 0; transition: .2s; }
.drawer-backdrop.open { visibility: visible; opacity: 1; }
.order-drawer { position: fixed; inset: 0 0 0 auto; z-index: 80; width: min(510px, 96vw); display: flex; flex-direction: column; background: #fff; box-shadow: -14px 0 38px rgba(9,25,18,.16); transform: translateX(102%); transition: transform .24s ease; }
.order-drawer.open { transform: translateX(0); }
.order-drawer > header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.order-drawer header small { color: var(--green); font-size: 9px; font-weight: 800; }
.order-drawer header h2 { margin: 5px 0 0; font-size: 17px; }
.drawer-content { overflow: auto; padding: 18px; }
.drawer-customer { margin-bottom: 14px; }
.drawer-customer h3 { margin: 0 0 5px; font-size: 14px; }
.drawer-customer p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.drawer-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 16px; }
.drawer-kpi { padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.drawer-kpi span { display: block; color: var(--muted); font-size: 9px; }
.drawer-kpi strong { display: block; margin-top: 5px; font-size: 12px; }
.drawer-section { padding: 14px 0; border-top: 1px solid var(--line); }
.drawer-section h4 { margin: 0 0 11px; font-size: 11px; }
.route-list { display: grid; gap: 0; }
.route-step { display: grid; grid-template-columns: 24px 1fr auto; gap: 9px; min-height: 49px; position: relative; }
.route-step::before { content: ""; position: absolute; left: 11px; top: 23px; bottom: 0; width: 1px; background: var(--line-strong); }
.route-step:last-child::before { display: none; }
.route-index { width: 23px; height: 23px; z-index: 1; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 8px; font-weight: 800; }
.route-step strong { display: block; font-size: 10px; }
.route-step p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.route-step time { color: var(--ink-2); font-size: 9px; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.edit-grid label, .note-field { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.edit-grid select, .edit-grid input { width: 100%; min-height: 35px; padding: 0 8px; }
.note-field { margin-top: 9px; }
.note-field textarea { min-height: 76px; padding: 8px; resize: vertical; }
.drawer-buttons { display: flex; gap: 7px; margin-top: 12px; }
.drawer-buttons .button { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; min-width: 220px; padding: 10px 14px; border-radius: 5px; color: #fff; background: #1d2c27; box-shadow: 0 8px 28px rgba(0,0,0,.18); text-align: center; font-size: 11px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .scenario-bar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { width: 236px; transform: translateX(-102%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .topbar { padding: 9px 14px; }
  .main-content { padding: 14px; }
  .global-search { width: min(38vw, 320px); }
  .layout-main-aside, .layout-thirds { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .workflow-strip { grid-template-columns: repeat(3, 1fr); }
  .workflow-step:nth-child(3) { border-right: 0; }
  .workflow-step:nth-child(n+4) { border-top: 1px solid var(--line); }
  .process-layout, .planner-layout { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .topbar { align-items: flex-start; }
  .page-identity h1 { font-size: 16px; }
  .global-search { display: none; }
  .top-actions .icon-button { display: none; }
  .button { padding: 0 10px; }
  .main-content { padding: 11px; }
  .attention-strip { align-items: flex-start; }
  .section-head { align-items: flex-start; }
  .period-switch { display: none; }
  .metric-grid, .metric-grid.compact { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-card { min-height: 102px; }
  .metric-card .metric-value { font-size: 20px; }
  .process-row { grid-template-columns: 50px 1fr 52px; }
  .process-cap { display: none; }
  .donut-wrap { grid-template-columns: 110px 1fr; }
  .donut { width: 106px; }
  .donut::after { width: 67px; }
  .workflow-strip { grid-template-columns: 1fr 1fr; }
  .workflow-step, .workflow-step:nth-child(3) { border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .workflow-step:nth-child(1), .workflow-step:nth-child(2) { border-top: 0; }
  .workflow-step:nth-child(2n) { border-right: 0; }
  .order-toolbar { align-items: stretch; flex-direction: column; }
  .segmented { display: grid; grid-template-columns: repeat(4,1fr); }
  .segmented button { padding: 0 3px; }
  .filter-controls { overflow-x: auto; }
  .scenario-bar { grid-template-columns: 1fr; gap: 12px; }
  .source-files { grid-template-columns: 1fr; }
  .drawer-kpis { grid-template-columns: 1fr 1fr; }
  .process-row { gap: 6px; }
}
@media print {
  .sidebar, .topbar, .attention-strip, .section-head button, .order-toolbar, .pagination, .toast { display: none !important; }
  .workspace { margin: 0; }
  .main-content { padding: 0; }
  .panel, .metric-card { box-shadow: none; break-inside: avoid; }
  .view { display: none !important; }
  .view.active { display: block !important; }
}
