/* APS — OpenMES 색 토큰과 같은 값 */
:root {
  --aps-primary: #0F6CBD; --aps-text: #242424; --aps-text2: #616161; --aps-border: #D1D1D1; --aps-divider: #E0E0E0;
  --aps-th: #F4F6F9; --aps-weekend: #F5F5F5; --aps-error: #C50F1F; --aps-warn: #BC4B09; --aps-bg: #FFFFFF;
}
html, body { margin: 0; font-family: "Pretendard", "Malgun Gothic", "Segoe UI", sans-serif; font-size: 14px; color: var(--aps-text); background: var(--aps-bg); }
.aps-page { padding: 16px 20px; }
.aps-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.aps-head h1 { font-size: 20px; margin: 0 0 8px; }
.aps-sub { color: var(--aps-text2); font-size: 13px; }
.aps-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0 12px; border-bottom: 1px solid var(--aps-divider); }
.aps-bar .grow { flex: 1; }
.chk { display: inline-flex; align-items: center; gap: 6px; color: var(--aps-text2); }
.aps-msg { margin: 10px 0; padding: 8px 12px; background: var(--aps-th); border-radius: 4px; }
.aps-msg.err { color: var(--aps-error); }
.aps-confirm { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--aps-warn); border-radius: 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.aps-empty { padding: 48px 0; text-align: center; color: var(--aps-text2); }
.aps-kpi { display: flex; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.aps-kpi div { border: 1px solid var(--aps-divider); border-radius: 6px; padding: 8px 16px; min-width: 110px; }
.aps-kpi b { display: block; font-size: 18px; }
.aps-kpi span { color: var(--aps-text2); font-size: 12px; }
.aps-gantt { overflow-x: auto; border: 1px solid var(--aps-divider); border-radius: 6px; }
.aps-gantt .dy { fill: #fff; stroke: var(--aps-divider); }
.aps-gantt .wk { fill: var(--aps-weekend); stroke: var(--aps-divider); }
.aps-gantt .dl { font-size: 12px; fill: var(--aps-text2); }
.aps-gantt .ln { stroke: var(--aps-divider); }
.aps-gantt .ll { font-size: 12px; fill: var(--aps-text); }
.aps-gantt .lu { font-size: 12px; fill: var(--aps-warn); }
.aps-gantt .bt { font-size: 11px; fill: #fff; pointer-events: none; }
.aps-gantt .bar:hover rect { opacity: .85; }
.aps-table { margin-top: 16px; }
.aps-head .grow { flex: 1; }
.aps-user { color: var(--aps-text2); }
.aps-login { max-width: 360px; margin: 80px auto; }
.aps-login form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.aps-hint { color: var(--aps-text2); font-size: 12px; margin: 0 0 6px; }
.aps-kpi div.bad b { color: var(--aps-error); }
.aps-confirm .warn { color: var(--aps-error); }
.aps-gantt .bar { cursor: grab; }
.aps-gantt .bar.dragging { cursor: grabbing; opacity: .8; }
.aps-gantt .bar.conflict rect { stroke: var(--aps-error); stroke-width: 2; }
.aps-table td.conflict { color: var(--aps-error); }
.aps-bar .fld { flex: none; }
.aps-bar .fld .astral-input-helper-text, .aps-bar .fld .astral-input-helper { display: none; }
.aps-bar .w-mode { width: 170px; }
.w-scale { width: 120px; }
.aps-bar .w-now { width: 190px; }
.aps-bar .lbl { color: var(--aps-text2); font-size: 13px; }
.aps-bar .warn, .warn { color: var(--aps-error); margin-top: 8px; }
/* 간트 모양 */
.aps-gantt { background: #fff; }
.aps-gantt .hd { fill: #F7F8FA; }
.aps-gantt .lane { fill: #fff; } .aps-gantt .lane.alt { fill: #FAFBFC; }
.aps-gantt .brk { fill: #EEF0F3; }
.aps-gantt .vl { stroke: #F0F1F3; } .aps-gantt .vl.day { stroke: #C9CDD3; }
.aps-gantt .dl.strong { font-size: 12px; font-weight: 600; fill: var(--aps-text); }
.aps-gantt .tl { font-size: 11px; fill: #6B7280; }
.aps-gantt .lc { fill: #fff; } .aps-gantt .lc-ln { stroke: var(--aps-border); }
.aps-gantt .bar rect { stroke: #fff; stroke-width: 1; }
.aps-gantt .bar:hover rect { filter: brightness(1.1); stroke: #1B1F24; }
.aps-gantt .gap { stroke-width: 1.5; stroke-dasharray: 2 3; opacity: .7; }
.aps-gantt .bt { font-size: 11px; font-weight: 600; fill: #fff; }
.aps-gantt .now { stroke: var(--aps-error); stroke-width: 1.5; }
.aps-gantt .now-m { fill: var(--aps-error); }
.aps-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 8px; font-size: 12px; color: var(--aps-text2); }
.aps-legend span { display: inline-flex; align-items: center; gap: 6px; }
.aps-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.aps-gantt .vl.sub { stroke: #F4F5F7; } .aps-gantt .tl.sub { fill: #9CA3AF; }
/* 심사 반영 */
.aps-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.aps-kpi div { min-width: 0; padding: 10px 16px; }
.aps-kpi b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aps-kpi div.zero b { color: #9CA3AF; } .aps-kpi div.caution b { color: #C2410C; } .aps-kpi div.bad { border-color: #FCA5A5; background: #FEF2F2; }
@media (max-width: 900px) { .aps-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aps-bar .grp { font-size: 12px; font-weight: 600; color: #6B7280; }
.aps-bar .lbl { font-size: 13px; color: #374151; }
.aps-bar .sep { width: 1px; height: 22px; background: var(--aps-divider); }
.aps-bar .dirty { font-size: 12px; font-weight: 600; color: #B45309; background: #FFFBEB; border: 1px solid #FCD34D; border-radius: 10px; padding: 2px 10px; }
.aps-guide { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin: 4px 0 6px; }
.aps-legend { margin: 0; } .aps-legend em { font-style: normal; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aps-keys { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--aps-text2); }
.aps-keys span { display: inline-flex; align-items: center; gap: 6px; }
.aps-keys .k { display: inline-block; width: 16px; height: 10px; border-radius: 2px; background: #CBD5E1; }
.aps-keys .k.late { background: #fff; outline: 2px solid #DC2626; } .aps-keys .k.moved { background: #CBD5E1; outline: 2px solid #111827; }
.aps-keys .k.pushed { background: #CBD5E1; outline: 2px dashed #111827; } .aps-keys .k.now { width: 2px; height: 14px; background: #DC2626; }
.aps-keys .k.brk { width: 8px; height: 14px; background: #E5E7EB; }
.aps-hint { margin: 0 0 8px; }
.aps-gantt .brk { fill: #E5E7EB; } .aps-gantt .brk-t { font-size: 12px; fill: #6B7280; }
.aps-gantt .ll { font-size: 12px; fill: #374151; } .aps-gantt .lu { fill: #C2410C; font-weight: 600; }
.aps-gantt .ld-bg { fill: #EEF0F3; } .aps-gantt .ld-v { fill: #94A3B8; } .aps-gantt .ld-v.hot { fill: #DC2626; }
.aps-gantt .bn { font-size: 11px; font-weight: 700; fill: #DC2626; }
.aps-gantt .bar.late rect { stroke: #DC2626; stroke-width: 2; }
.aps-gantt .bar.pushed rect { stroke: #111827; stroke-width: 1.5; stroke-dasharray: 3 2; }
.aps-gantt .bar.moved rect { stroke: #111827; stroke-width: 2.5; }
.aps-gantt .bar.conflict rect { stroke: #DC2626; stroke-width: 2.5; stroke-dasharray: none; }
.aps-gantt svg.hl-on .bar { opacity: .25; } .aps-gantt svg.hl-on .bar.hl { opacity: 1; }
.aps-gantt svg.hl-on .bar.hl rect { stroke: #111827; stroke-width: 2; }
.aps-table th:nth-child(2), .aps-table th:nth-child(4), .aps-table th:nth-child(9), .aps-table td:nth-child(2), .aps-table td:nth-child(4), .aps-table td:nth-child(9) { text-align: right; font-variant-numeric: tabular-nums; }
.aps-bar .save-grp { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.w-mode { width: 150px; } .w-scale { width: 110px; }
.aps-kpi > div { display: flex; flex-direction: column; justify-content: center; margin: 0; }
/* 3차 심사 반영 */
.aps-gantt .bar.pushed rect { stroke: #fff; stroke-width: 1; stroke-dasharray: none; opacity: .72; }
.aps-gantt .bar.pushed .bt { opacity: .9; }
.aps-gantt .bar.moved rect { stroke: #1D4ED8; stroke-width: 2.5; filter: drop-shadow(0 1px 4px rgba(0,0,0,.3)); }
.aps-gantt .bar.late rect { stroke: #DC2626; stroke-width: 2.5; }
.aps-gantt .bar.late.pushed rect { stroke-dasharray: 4 2; opacity: .85; }
.aps-gantt .ld-bg { fill: #E5E7EB; } .aps-gantt .ld-t { font-size: 11px; fill: #4B5563; font-variant-numeric: tabular-nums; } .aps-gantt .ld-t.hot { fill: #B91C1C; font-weight: 700; }
.aps-gantt .bn-bg { fill: #FEE2E2; } .aps-gantt .bn { font-size: 10px; font-weight: 700; fill: #B91C1C; }
.aps-gantt .brk { fill: #E5E7EB; } .aps-gantt .brk-t { font-size: 14px; font-weight: 700; fill: #6B7280; }
.aps-warn { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; padding: 6px 10px; background: #FFF7ED; border-left: 3px solid #EA580C; border-radius: 4px; font-size: 13px; color: #9A3412; }
.aps-warn span { flex: 1; } .aps-warn button { border: 0; background: none; font-size: 16px; color: #9A3412; cursor: pointer; line-height: 1; }
.aps-note { font-size: 12px; color: #6B7280; margin: 4px 0 0; }
.aps-kpi { margin: 10px 0 8px; }
.aps-kpi > button, .aps-kpi > div { border: 1px solid var(--aps-divider); border-radius: 6px; padding: 8px 14px; background: #fff; text-align: left; font: inherit; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.aps-kpi > button { cursor: pointer; } .aps-kpi > button:hover { border-color: #93C5FD; } .aps-kpi > button.on { border-color: #2563EB; box-shadow: 0 0 0 2px #BFDBFE; }
.aps-kpi > button.zero b { color: #9CA3AF; } .aps-kpi > button.caution b { color: #C2410C; } .aps-kpi > button.bad { border-color: #FCA5A5; background: #FEF2F2; } .aps-kpi > button.bad b { color: var(--aps-error); }
.aps-kpi span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aps-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 8px; font-size: 12px; color: var(--aps-text2); justify-content: flex-start; }
.aps-guide > span { display: inline-flex; align-items: center; gap: 6px; } .aps-guide > span > i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.aps-guide em { font-style: normal; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aps-guide .div { width: 1px; height: 14px; background: #E5E7EB; }
.aps-guide .k { width: 16px !important; height: 10px !important; border-radius: 2px; background: #CBD5E1; }
.aps-guide .k.late { background: #fff; outline: 2px solid #DC2626; } .aps-guide .k.moved { outline: 2px solid #1D4ED8; } .aps-guide .k.pushed { opacity: .6; }
.aps-guide .k.now { width: 2px !important; height: 14px !important; background: #DC2626; } .aps-guide .k.brk { width: 8px !important; height: 14px !important; background: #E5E7EB; }
.aps-guide .k.load { width: 24px !important; height: 6px !important; background: linear-gradient(90deg, #94A3B8 60%, #E5E7EB 60%); }
.aps-guide .help { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #CBD5E1; justify-content: center; color: #4B5563; cursor: help; font-weight: 700; }
.aps-bar .dirty.none { color: #9CA3AF; background: #F9FAFB; border-color: #E5E7EB; }
.aps-filter { margin: 12px 0 4px; font-size: 13px; color: #1D4ED8; } .aps-filter button { margin-left: 8px; border: 1px solid #BFDBFE; background: #EFF6FF; color: #1D4ED8; border-radius: 4px; padding: 1px 8px; cursor: pointer; }
.aps-table td.nil { color: #9CA3AF; text-align: center; } .aps-table td.late { color: var(--aps-error); } .aps-table td.chg { background: #FFFBEB; }
.aps-table small.was { margin-left: 6px; color: #9CA3AF; }
.aps-table { margin-top: 12px; }
.aps-guide .scale-in { margin-left: auto; } .aps-guide .help { margin-left: 0; }
.aps-gantt .bn { font-size: 11px; }
/* 4차 심사 반영 */
.aps-gantt .bar.pushed rect { opacity: 1; stroke: #fff; stroke-width: 1; stroke-dasharray: none; }
.aps-gantt .bar.late rect, .aps-gantt .bar.late.pushed rect { stroke: #DC2626; stroke-width: 2.5; stroke-dasharray: none; opacity: 1; }
.aps-gantt .ld-t { font-size: 11px; }
.aps-guide .k.pushed { width: 16px !important; height: 12px !important; background: #B45309; opacity: 1; color: #fff; font-size: 10px; font-style: normal; line-height: 12px; text-align: center; }
.aps-guide .k.brk { background: repeating-linear-gradient(45deg, #E5E7EB 0 2px, #F3F4F6 2px 4px); }
.aps-guide em { max-width: 110px; }
.aps-guide + .aps-guide { margin-top: -2px; }
.aps-hint { font-size: 12px; color: #4B5563; margin: 0 0 8px; padding-left: 8px; border-left: 2px solid #93C5FD; }
.aps-bar .clean { font-size: 12px; color: #9CA3AF; }
.aps-note.moved { font-size: 13px; color: #1E3A8A; background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 4px; padding: 6px 10px; margin: 6px 0 0; }
.aps-note button { margin-left: 10px; border: 0; background: none; color: #1D4ED8; font-weight: 600; cursor: pointer; padding: 0; }
.aps-kpi > button:not(.zero)::after { content: '표에서 보기 ›'; font-size: 11px; color: #2563EB; margin-top: 2px; }
.aps-kpi > button.zero::after { content: '표에서 보기 ›'; visibility: hidden; font-size: 11px; margin-top: 2px; }
.aps-kpi > button.on { border-width: 2px; }
.aps-gantt .lane.un { fill: #FFF7ED; }
.aps-table table { table-layout: fixed; }
.aps-table th:nth-child(1) { width: 150px; } .aps-table th:nth-child(2) { width: 56px; } .aps-table th:nth-child(4) { width: 64px; } .aps-table th:nth-child(5) { width: 64px; }
.aps-table th:nth-child(7), .aps-table th:nth-child(8) { width: 150px; } .aps-table th:nth-child(9) { width: 76px; }
.aps-table th:nth-child(6) { width: 190px; } .aps-table th:nth-child(7), .aps-table th:nth-child(8) { width: 140px; } .aps-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aps-gantt .mk-push { fill: #111827; pointer-events: none; }
.aps-guide .k.pushed { background: linear-gradient(135deg, #111827 0 5px, #B45309 5px) !important; }
/* 5차 심사 반영 */
.aps-note, .aps-note.moved { display: flex; align-items: center; gap: 12px; min-height: 26px; margin: 6px 0 0; padding: 2px 10px; font-size: 12px; color: #4B5563; background: #F8FAFC; border: 1px solid #E5E7EB; border-radius: 4px; }
.aps-note.moved { color: #1E3A8A; background: #EFF6FF; border-color: #BFDBFE; }
.aps-note .t { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aps-note .lnk { border: 0; background: none; color: #1D4ED8; font-weight: 600; cursor: pointer; padding: 0; white-space: nowrap; margin: 0; }
.aps-note .chip { margin-left: auto; white-space: nowrap; background: #DBEAFE; color: #1E40AF; border-radius: 10px; padding: 1px 4px 1px 10px; font-weight: 600; }
.aps-note .chip button { border: 0; background: none; color: #1E40AF; cursor: pointer; font-size: 12px; }
.aps-kpi > button, .aps-kpi > div { justify-content: flex-start; padding: 10px 14px; position: relative; min-height: 62px; }
.aps-kpi > button:not(.zero)::after, .aps-kpi > button.zero::after { content: '›'; visibility: visible; position: absolute; top: 6px; right: 10px; font-size: 16px; color: #93A3B8; margin: 0; }
.aps-kpi > button.zero::after { color: #D1D5DB; }
.aps-guide .tip { margin-left: auto; color: #4B5563; }
.aps-gantt { max-height: 50vh; overflow: auto; }
.aps-gantt .lane.un { fill: #fff; }
.aps-gantt .mk-push { fill: #111827; stroke: #fff; stroke-width: 1; }
.aps-gantt .mk-move { fill: none; stroke: #1D4ED8; stroke-width: 2.5; }
.aps-gantt .bar.moved rect { stroke: #fff; stroke-width: 1; filter: none; }
.aps-gantt .bar.late.moved rect:not(.mk-move) { stroke: #DC2626; stroke-width: 2.5; }
.aps-gantt .bar .mk-move { stroke: #1D4ED8 !important; stroke-width: 2.5 !important; fill: none; }
.aps-gantt .ld-t { font-size: 11px; fill: #6B7280; }
.aps-table th:nth-child(1) { width: 150px; } .aps-table th:nth-child(3) { width: auto; } .aps-table th:nth-child(5) { width: 60px; }
.aps-table th:nth-child(7), .aps-table th:nth-child(8) { width: 112px; } .aps-table th:nth-child(6) { width: 170px; } .aps-table th:nth-child(10) { width: 150px; }
.aps-table { margin-top: 10px; }
.aps-table th:nth-child(1) { width: 160px; } .aps-table th:nth-child(2) { width: 50px; } .aps-table th:nth-child(3) { width: 150px; } .aps-table th:nth-child(4) { width: 60px; } .aps-table th:nth-child(10) { width: auto; }
.aps-table th:nth-child(1) { width: 150px; } .aps-table th:nth-child(6) { width: 160px; } .aps-table th:nth-child(7) { width: 140px; } .aps-table th:nth-child(8) { width: 100px; } .aps-table th:nth-child(9) { width: 70px; } .aps-table th:nth-child(5) { width: 56px; }
/* 6차 심사 반영 */
.aps-gantt .mk-push { fill: rgba(255,255,255,.92); stroke: none; }
.aps-gantt .bar rect.mk-push-n { fill: #fff; stroke: none; }
.aps-gantt .ld-t { fill: #6B7280; } .aps-gantt .ld-t.hot { fill: #6B7280; font-weight: 400; } .aps-gantt .pct.hot { fill: #B91C1C; font-weight: 700; }
.aps-kpi > button, .aps-kpi > div { min-height: 0; padding: 9px 14px; }
.aps-kpi > button.zero::after { content: none; }
.aps-kpi > button:not(.zero)::after { content: '보기 ›'; font-size: 11px; font-weight: 600; color: #2563EB; top: 8px; right: 10px; }
.aps-table .was { color: #6B7280; font-size: 12px; margin-right: 6px; }
.aps-table .moved-tag { color: #1D4ED8; margin-right: 6px; }
.aps-table th:nth-child(7) { width: 150px; }
.aps-table th:nth-child(1) { width: 140px; } .aps-table th:nth-child(2) { width: 44px; } .aps-table th:nth-child(3) { width: 120px; } .aps-table th:nth-child(4) { width: 52px; } .aps-table th:nth-child(6) { width: 150px; } .aps-table th:nth-child(8) { width: 96px; } .aps-table th:nth-child(9) { width: 64px; } .aps-table th:nth-child(10) { width: 220px; }
/* 마무리 */
.aps-kpi > button.on { border-width: 1px; border-color: #2563EB; box-shadow: inset 0 0 0 1px #2563EB, 0 0 0 2px #BFDBFE; }
.aps-guide .k.pushed { background: linear-gradient(135deg, #fff 0 5px, #B45309 5px) !important; outline: 1px solid #B45309; }
.aps-table th:nth-child(5) { width: 52px; } .aps-table th:nth-child(6) { width: 180px; } .aps-table th:nth-child(7) { width: 150px; }
/* 좁은 지연 막대: 라벨을 막대 오른쪽에 */
.aps-gantt .bt-out { font-size: 11px; font-weight: 700; fill: #B91C1C; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
