feat(stmate-test): implement full STMATE w 8.0 UI, COSTN.SMT binary parser, and 100% lossless DBF/STC engine

This commit is contained in:
2026-11-04 23:45:20 +09:00
parent 1cc9dca9fc
commit 267b5a693f
12 changed files with 4341 additions and 2469 deletions
+555 -378
View File
@@ -1,419 +1,596 @@
/* -*- coding: utf-8 -*- */
/* STMATE w 8.0 Classic Desktop UI & Real DBGrid Layout (style.css) */
:root {
--win-bg: #d4d8df;
--win-panel: #eceff4;
--win-surface: #ffffff;
--win-navy: #14325c;
--win-navy-light: #204982;
--win-border: #8c96a6;
--win-border-light: #ffffff;
--win-border-dark: #5a6475;
--grid-head: #dfe5ef;
--grid-line: #c5cdd9;
--row-t-bg: #e7f0fd;
--row-e-bg: #f4f6fa;
--row-c-bg: #fff4e5;
--row-sel: #cfe3ff;
--accent-blue: #0050b3;
--accent-green: #137333;
--accent-amber: #b06000;
--accent-red: #c5221f;
--text-main: #111827;
--text-sub: #4b5563;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background: #f1f5f9;
color: #0f172a;
font:
14px/1.5 system-ui,
-apple-system,
"Malgun Gothic",
sans-serif;
}
.topbar {
background: #0f172a;
color: #f8fafc;
padding: 24px max(20px, calc((100% - 1440px) / 2));
display: flex;
justify-content: space-between;
align-items: center;
gap: 20px;
border-bottom: 3px solid #0284c7;
}
.badges {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 8px;
}
.badge {
display: inline-block;
padding: 3px 9px;
border-radius: 4px;
font-size: 11px;
font-weight: 700;
background: #1e293b;
color: #cbd5e1;
border: 1px solid #334155;
}
.badge.accent {
background: #0284c7;
color: #ffffff;
border-color: #0369a1;
}
.topbar h1 {
margin: 0 0 6px;
font-size: 22px;
letter-spacing: -0.02em;
}
.topbar p {
margin: 0;
color: #94a3b8;
font-size: 13px;
}
.top-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.btn {
border: 1px solid transparent;
border-radius: 6px;
padding: 9px 14px;
font: inherit;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
display: inline-flex;
align-items: center;
justify-content: center;
}
.btn.primary {
background: #0284c7;
color: #ffffff;
}
.btn.primary:hover {
background: #0369a1;
}
.btn.secondary {
background: #1e293b;
color: #e2e8f0;
border-color: #475569;
}
.btn.secondary:hover {
background: #334155;
}
.panel-card .btn.secondary {
background: #e2e8f0;
color: #1e293b;
border-color: #cbd5e1;
}
.btn-del {
border: 1px solid #fecaca;
background: #fef2f2;
color: #b91c1c;
border-radius: 5px;
padding: 5px 9px;
padding: 0;
font-family: "Malgun Gothic", "굴림", Gulim, sans-serif;
font-size: 12px;
font-weight: 600;
cursor: pointer;
}
.btn-del:hover {
background: #fee2e2;
}
.container {
max-width: 1440px;
margin: 0 auto;
padding: 20px;
}
.alert-banner {
background: #fffbeb;
border: 1px solid #fde68a;
color: #92400e;
border-radius: 8px;
padding: 12px 16px;
display: flex;
gap: 10px;
align-items: baseline;
flex-wrap: wrap;
margin-bottom: 16px;
}
.kpi-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
margin-bottom: 18px;
}
.kpi-card {
background: #ffffff;
border: 1px solid #cbd5e1;
border-radius: 8px;
padding: 14px 16px;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.kpi-label {
display: block;
font-size: 12px;
color: #64748b;
font-weight: 600;
}
.kpi-value {
display: block;
font-size: 20px;
color: #0f172a;
margin: 4px 0;
font-variant-numeric: tabular-nums;
}
.kpi-sub {
display: block;
font-size: 11px;
color: #475569;
}
.tab-nav {
display: flex;
gap: 4px;
border-bottom: 2px solid #cbd5e1;
overflow-x: auto;
margin-bottom: 16px;
}
.tab-nav button {
border: 0;
background: transparent;
color: #475569;
font: inherit;
font-weight: 700;
padding: 12px 16px;
cursor: pointer;
border-bottom: 3px solid transparent;
margin-bottom: -2px;
white-space: nowrap;
}
.tab-nav button:hover {
color: #0f172a;
background: #e2e8f0;
}
.tab-nav button.active {
color: #0284c7;
border-bottom-color: #0284c7;
background: #ffffff;
}
.panel-card {
background: #ffffff;
border: 1px solid #cbd5e1;
border-radius: 8px;
margin-bottom: 18px;
color: var(--text-main);
background: var(--win-bg);
height: 100vh;
overflow: hidden;
}
.card-header {
padding: 16px 20px;
border-bottom: 1px solid #e2e8f0;
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
flex-wrap: wrap;
background: #f8fafc;
}
.card-header h2 {
margin: 0;
font-size: 16px;
color: #0f172a;
}
.card-header p {
margin: 4px 0 0;
font-size: 12.5px;
color: #475569;
}
.control-grid {
padding: 16px 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 14px;
background: #ffffff;
border-bottom: 1px solid #e2e8f0;
}
.ctrl-item {
.stmate-shell {
display: flex;
flex-direction: column;
gap: 5px;
font-size: 12.5px;
font-weight: 600;
color: #334155;
height: 100vh;
width: 100vw;
}
.ctrl-item.checkbox-row {
flex-direction: row;
/* 1. TWM_STMATE_START_8X 상단 메뉴바 */
.win-menubar {
display: flex;
align-items: center;
background: linear-gradient(90deg, #0f294d 0%, #1d4378 100%);
color: #fff;
height: 30px;
padding: 0 8px;
gap: 4px;
user-select: none;
border-bottom: 1px solid #091a33;
z-index: 100;
}
.win-brand {
font-weight: 800;
font-size: 12px;
letter-spacing: 0.4px;
background: #ffcc00;
color: #0f294d;
padding: 2px 8px;
border-radius: 2px;
margin-right: 6px;
}
.menu-item {
position: relative;
padding: 4px 10px;
cursor: pointer;
border-radius: 2px;
font-size: 12px;
}
.menu-item:hover {
background: rgba(255, 255, 255, 0.16);
}
.menu-dropdown {
display: none;
position: absolute;
top: 100%;
left: 0;
min-width: 270px;
background: var(--win-panel);
color: var(--text-main);
border: 1px solid var(--win-border-dark);
box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.28);
padding: 4px 0;
z-index: 200;
}
.menu-item:hover .menu-dropdown {
display: block;
}
.menu-dropdown button,
.menu-file-label {
display: block;
width: 100%;
text-align: left;
background: none;
border: none;
padding: 6px 14px;
font-size: 12px;
font-family: inherit;
color: var(--text-main);
cursor: pointer;
}
.menu-dropdown button:hover,
.menu-file-label:hover {
background: var(--accent-blue);
color: #fff;
}
.menu-dropdown hr {
margin: 3px 0;
border: none;
border-top: 1px solid var(--win-border);
}
.menubar-right {
margin-left: auto;
display: flex;
align-items: center;
gap: 8px;
padding-top: 20px;
}
.ctrl-item.checkbox-row input {
width: auto;
.conn-badge {
font-size: 11px;
padding: 2px 8px;
border-radius: 3px;
background: #0d652d;
color: #e6f4ea;
font-weight: 700;
}
.sub-toolbar {
padding: 12px 20px;
background: #f0f9ff;
border-bottom: 1px solid #bae6fd;
.top-project-select {
height: 23px;
font-size: 11.5px;
font-family: inherit;
min-width: 310px;
background: #fff;
color: #111;
border: 1px solid #999;
padding: 0 4px;
}
/* 2. 상단 8버튼 메인 툴바 */
.win-toolbar {
display: flex;
align-items: center;
gap: 4px;
background: linear-gradient(180deg, #f5f7fa 0%, #dce1eb 100%);
padding: 4px 8px;
border-bottom: 1px solid var(--win-border);
height: 46px;
}
.tb-btn {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-width: 78px;
height: 38px;
background: #eceff4;
border: 1px solid var(--win-border);
border-top-color: var(--win-border-light);
border-left-color: var(--win-border-light);
border-radius: 2px;
cursor: pointer;
padding: 2px 6px;
font-family: inherit;
color: #1f2937;
}
.tb-btn:hover {
background: #e0ebff;
border-color: #3b82f6;
}
.tb-btn.active {
background: #cfe3ff;
border: 1px solid #0050b3;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
font-weight: 700;
color: #003a8c;
}
.tb-ico {
font-size: 14px;
line-height: 1;
}
.tb-txt {
font-size: 11px;
margin-top: 2px;
white-space: nowrap;
}
.tb-sep {
width: 1px;
height: 30px;
background: var(--win-border);
margin: 0 4px;
}
.tb-calc {
background: #fff3cd;
border-color: #d97706;
color: #92400e;
font-weight: 700;
}
.tb-calc:hover {
background: #fde68a;
}
/* 3. 프로젝트 컨텍스트 바 */
.prj-context-bar {
display: flex;
align-items: center;
justify-content: space-between;
background: #233858;
color: #f8fafc;
padding: 4px 12px;
font-size: 11.5px;
border-bottom: 1px solid #0f172a;
height: 28px;
}
.prj-context-left,
.prj-context-right {
display: flex;
align-items: center;
gap: 12px;
}
.prj-tag {
background: #38bdf8;
color: #0f172a;
font-weight: 800;
padding: 1px 6px;
border-radius: 2px;
font-size: 11px;
}
/* 4. MDI 작업 영역 */
.mdi-workspace {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
padding: 6px;
background: #c8cfda;
}
.win-form {
display: flex;
flex-direction: column;
flex: 1;
background: var(--win-panel);
border: 1px solid var(--win-border-dark);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
overflow: hidden;
}
.win-form-header {
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(90deg, #1b3b6f 0%, #2e5c9a 100%);
color: #ffffff;
padding: 4px 10px;
font-weight: 700;
font-size: 12px;
height: 27px;
}
.win-subbar {
display: flex;
align-items: center;
flex-wrap: wrap;
font-size: 13px;
color: #0369a1;
gap: 6px;
padding: 5px 8px;
background: #e3e8f0;
border-bottom: 1px solid var(--win-border);
}
.table-scroll {
overflow-x: auto;
.win-btn {
height: 24px;
padding: 0 9px;
font-size: 11.5px;
font-family: inherit;
background: #f8fafc;
border: 1px solid #7c8798;
border-radius: 2px;
cursor: pointer;
color: #111827;
}
.data-table {
.win-btn:hover {
background: #dbeafe;
border-color: #2563eb;
}
.win-btn.primary {
background: #1d4ed8;
color: #fff;
border-color: #1e40af;
font-weight: 700;
}
.win-btn.primary:hover {
background: #1e40af;
}
.win-btn.active {
background: #0f294d;
color: #fff;
font-weight: 700;
}
.win-input,
.win-select {
height: 23px;
padding: 0 6px;
font-size: 11.5px;
font-family: inherit;
border: 1px solid #8c96a6;
background: #fff;
}
/* 분할 레이아웃 */
.split-vert {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
gap: 6px;
padding: 6px;
}
.split-horiz {
display: flex;
flex-direction: row;
flex: 1;
overflow: hidden;
gap: 6px;
padding: 6px;
}
.pane-box {
display: flex;
flex-direction: column;
background: var(--win-surface);
border: 1px solid var(--win-border);
overflow: hidden;
}
.pane-title {
display: flex;
align-items: center;
justify-content: space-between;
background: #eef2f8;
padding: 4px 8px;
font-weight: 700;
font-size: 11.5px;
border-bottom: 1px solid var(--win-border);
color: #1e3a8a;
}
.grid-scroll {
flex: 1;
overflow: auto;
background: #fff;
}
/* STMATE DBGrid 테이블 */
table.dbgrid {
width: 100%;
border-collapse: collapse;
min-width: 920px;
}
.data-table th,
.data-table td {
padding: 8px 10px;
border-bottom: 1px solid #e2e8f0;
text-align: left;
vertical-align: middle;
font-size: 13px;
}
.data-table th {
background: #f1f5f9;
color: #334155;
font-weight: 700;
font-size: 12px;
white-space: nowrap;
}
.data-table td.money-col {
text-align: right;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.data-table td.num-col {
width: 105px;
}
.data-table td.center-col {
text-align: center;
white-space: nowrap;
}
.data-table td.highlight-col {
background: #f8fafc;
}
.data-table tr.sub-row {
background: #f8fafc;
}
.data-table tr.total-row {
background: #e0f2fe;
font-weight: 700;
}
.data-table tr.excl-row {
background: #fffbeb;
}
input[type="text"],
input[type="number"],
select {
width: 100%;
padding: 6px 8px;
border: 1px solid #cbd5e1;
border-radius: 5px;
font: inherit;
font-size: 13px;
color: #0f172a;
background: #ffffff;
}
input[type="number"] {
text-align: right;
font-variant-numeric: tabular-nums;
}
input.code-input {
width: 86px;
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
input.short-input {
width: 72px;
}
.sub-hint {
font-size: 11px;
color: #475569;
margin-top: 3px;
}
.tiny-tag {
font-size: 11px;
color: #64748b;
font-weight: 500;
}
.diff-warn {
color: #dc2626;
font-weight: 700;
font-size: 11px;
}
.formula-tag {
display: inline-block;
padding: 2px 6px;
background: #f1f5f9;
border: 1px solid #cbd5e1;
border-radius: 4px;
font-size: 11.5px;
color: #334155;
}
.empty-box {
padding: 24px;
table.dbgrid th {
position: sticky;
top: 0;
background: var(--grid-head);
color: #111827;
font-weight: 700;
border: 1px solid var(--win-border);
padding: 4px 6px;
text-align: center;
color: #64748b;
white-space: nowrap;
z-index: 5;
}
.footer-note {
margin-top: 16px;
padding: 12px 4px;
table.dbgrid td {
border: 1px solid var(--grid-line);
padding: 3px 6px;
white-space: nowrap;
}
table.dbgrid tr:hover td {
background: #f0f6ff;
}
table.dbgrid tr.selected td {
background: var(--row-sel) !important;
}
/* BOQ 계층 구조 행 스타일 (T1~T6, E1~E6, C*) */
tr.boq-row-T td {
background: var(--row-t-bg);
font-weight: 700;
color: #0b3b8c;
}
tr.boq-row-E td {
background: var(--row-e-bg);
font-weight: 700;
color: #1f2937;
border-top: 1.5px solid #64748b;
}
tr.boq-row-C td {
background: var(--row-c-bg);
font-weight: 700;
color: #9a3412;
}
tr.boq-row-excl td {
background: #fffaf0;
color: #7c2d12;
}
.num {
text-align: right !important;
font-variant-numeric: tabular-nums;
font-family: Consolas, "Malgun Gothic", monospace;
}
.center {
text-align: center !important;
}
.cell-input {
width: 100%;
border: 1px solid transparent;
background: transparent;
font-family: inherit;
font-size: 11.5px;
padding: 1px 3px;
}
.cell-input:focus {
background: #fef9c3;
border-color: #2563eb;
outline: none;
}
/* COSTN.SMT 수식 편집기 */
.smt-editor-area {
width: 100%;
flex: 1;
resize: none;
border: none;
padding: 8px;
font-family: Consolas, "굴림체", monospace;
font-size: 12px;
color: #64748b;
text-align: center;
line-height: 1.45;
background: #1e293b;
color: #f8fafc;
}
@media (max-width: 900px) {
.topbar {
flex-direction: column;
align-items: flex-start;
}
.kpi-grid {
grid-template-columns: repeat(2, 1fr);
}
/* TWM_KANJUB 16콤보 입력 그리드 */
.kanjub-16grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 5px 10px;
padding: 8px;
background: #f1f5f9;
border-bottom: 1px solid var(--win-border);
}
.kanjub-field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
font-size: 11px;
}
.kanjub-field label {
font-weight: 700;
color: #334155;
white-space: nowrap;
}
.kanjub-field select,
.kanjub-field input {
flex: 1;
min-width: 0;
height: 22px;
font-size: 11px;
}
/* 하단 고정 원가 상태표시줄 (St_Bar) */
.stmate-statusbar {
display: flex;
align-items: center;
justify-content: space-between;
background: #111827;
color: #e5e7eb;
height: 28px;
padding: 0 10px;
font-size: 11.5px;
border-top: 1px solid #374151;
}
.st-metrics {
display: flex;
align-items: center;
gap: 14px;
}
.st-kv strong {
color: #93c5fd;
margin-left: 4px;
font-family: Consolas, monospace;
}
.st-kv.total strong {
color: #fde047;
font-size: 12.5px;
}
/* 모달 */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.55);
display: flex;
align-items: center;
justify-content: center;
z-index: 500;
}
.modal-backdrop.hidden {
display: none;
}
.modal-window {
background: var(--win-panel);
border: 2px solid var(--win-navy);
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
min-width: 680px;
max-width: 92vw;
max-height: 86vh;
display: flex;
flex-direction: column;
}
.modal-titlebar {
display: flex;
align-items: center;
justify-content: space-between;
background: var(--win-navy);
color: #fff;
padding: 5px 10px;
font-weight: 700;
}
.modal-close-btn {
background: #dc2626;
color: #fff;
border: none;
width: 20px;
height: 20px;
cursor: pointer;
font-weight: 700;
}
.modal-body {
padding: 12px;
overflow: auto;
flex: 1;
}