Files
invyone/frontend/styles/control-mode.css
T
gbpark 5153386fce
Build & Deploy to K8s / build-and-deploy (push) Successful in 3m59s
디자인 수정
2026-04-21 22:59:51 +09:00

431 lines
19 KiB
CSS

/* ═══════════════════════════════════════════════════════════════════════════
Phase 5 — 제어 모드 + 규칙 빌더
mockup css/07-control-mode.css + css/08-rule-builder.css → React 포팅
★ --v5-* / --ctrl-* 변수 사용, 즉흥 hex 금지
═══════════════════════════════════════════════════════════════════════════ */
/* ── 제어 모드 변수 ── */
:root {
--ctrl-cyan: #00cec9;
--ctrl-cyan-glow: rgba(var(--v5-cyan-rgb), .3);
--ctrl-primary: #6c5ce7;
--ctrl-amber: #fdcb6e;
--ctrl-pink: #fd79a8;
--ctrl-green: #55efc4;
--ctrl-red: #ff4757;
--ctrl-glass: rgba(255, 255, 255, .06);
--ctrl-glass-strong: rgba(255, 255, 255, .08);
--ctrl-glass-border: rgba(var(--v5-cyan-rgb), .25);
}
.dark {
--ctrl-glass: rgba(255, 255, 255, .04);
--ctrl-glass-strong: rgba(255, 255, 255, .06);
}
/* ═══ 편집/제어 모드 캔버스 — INVYONE Design System (ui_kits/app) 포팅 ═══
primary/cyan tint + 24px line grid + inset 2px border.
기본 dash-canvas 의 dot grid 를 override. */
.dash-canvas.edit-mode {
background-color: var(--v5-bg);
background-image:
linear-gradient(0deg, rgba(var(--v5-primary-rgb), .035), rgba(var(--v5-primary-rgb), .035));
box-shadow: inset 0 0 0 2px rgba(var(--v5-primary-rgb), .22);
}
.dash-canvas.edit-mode::before {
content: '';
position: absolute; inset: 0;
background-image:
linear-gradient(to right, rgba(var(--v5-primary-rgb), .08) 1px, transparent 1px),
linear-gradient(to bottom, rgba(var(--v5-primary-rgb), .08) 1px, transparent 1px);
background-size: 20px 20px;
pointer-events: none;
z-index: 0;
animation: ud-grid-fade .4s var(--v5-ease-move) both;
}
.dash-canvas.control-mode {
background-color: var(--v5-bg);
background-image:
linear-gradient(0deg, rgba(var(--v5-cyan-rgb), .035), rgba(var(--v5-cyan-rgb), .035));
box-shadow: inset 0 0 0 2px rgba(var(--v5-cyan-rgb), .22);
overflow: auto;
}
.dash-canvas.control-mode::before {
content: '';
position: absolute; inset: 0;
background-image:
linear-gradient(to right, rgba(var(--v5-cyan-rgb), .08) 1px, transparent 1px),
linear-gradient(to bottom, rgba(var(--v5-cyan-rgb), .08) 1px, transparent 1px);
background-size: 24px 24px;
pointer-events: none;
z-index: 0;
animation: ud-grid-fade .4s var(--v5-ease-move) both;
}
/* 다크모드에서는 tint를 조금 강하게 */
.dark .dash-canvas.edit-mode {
background-image:
linear-gradient(0deg, rgba(var(--v5-primary-rgb), .05), rgba(var(--v5-primary-rgb), .05));
box-shadow: inset 0 0 0 2px rgba(var(--v5-primary-rgb), .28);
}
.dark .dash-canvas.control-mode {
background-image:
linear-gradient(0deg, rgba(var(--v5-cyan-rgb), .05), rgba(var(--v5-cyan-rgb), .05));
box-shadow: inset 0 0 0 2px rgba(var(--v5-cyan-rgb), .28);
}
@keyframes ud-grid-fade {
from { opacity: 0; }
to { opacity: 1; }
}
/* 카드 축소 + 클릭 가능 */
.dash-canvas.control-mode .dash-card {
transition: all .5s cubic-bezier(.16,1,.3,1);
opacity: .5; z-index: 25; cursor: pointer;
}
.dash-canvas.control-mode .dash-card:hover { opacity: .8; box-shadow: 0 0 20px var(--ctrl-cyan-glow); }
.dash-canvas.control-mode .dash-card.flow-active {
opacity: 1; border-color: var(--ctrl-cyan);
box-shadow: 0 0 30px rgba(var(--v5-cyan-rgb),.3);
}
/* ── 제어 모드 토글 버튼 활성 ── */
.dash-btn.control-on {
background: linear-gradient(135deg, var(--ctrl-cyan), #55efc4) !important;
color: #06050e !important; border-color: transparent !important;
box-shadow: 0 0 20px rgba(var(--v5-cyan-rgb),.3) !important; font-weight: 700;
}
.dash-btn.control-on:hover { box-shadow: 0 0 30px rgba(var(--v5-cyan-rgb),.45) !important; }
/* ═══ SVG 오버레이 ═══ */
.ctrl-svg {
position: absolute; inset: 0; width: 100%; height: 100%;
pointer-events: none; z-index: 10; overflow: visible;
}
/* ── 연결선 4종 ── */
.ctrl-line { fill: none; stroke: var(--ctrl-cyan); stroke-width: 1.5; opacity: .55;
stroke-dasharray: 6 3; animation: ctrlPulse 1.5s linear infinite; }
.ctrl-line-auto { fill: none; stroke: var(--ctrl-primary); stroke-width: 2.5; opacity: .6;
stroke-dasharray: 6 4; animation: ctrlPulse 1.2s linear infinite; }
.ctrl-line-cond { fill: none; stroke: var(--ctrl-amber); stroke-width: 2; opacity: .55;
stroke-dasharray: 4 4; animation: ctrlPulse 1.8s linear infinite; }
.ctrl-line-tpl { fill: none; stroke: var(--ctrl-pink); stroke-width: 2.5; opacity: .65;
stroke-dasharray: 5 5; animation: ctrlPulse 1.4s linear infinite; }
@keyframes ctrlPulse { to { stroke-dashoffset: -18; } }
/* ★ 라이트 모드 보정 */
html:not(.dark) .ctrl-line { stroke: #00a89e; stroke-width: 2; opacity: .5; }
html:not(.dark) .ctrl-line-auto { stroke: #5b4acf; stroke-width: 3; opacity: .6; }
html:not(.dark) .ctrl-line-cond { stroke: #d4a017; stroke-width: 2.5; opacity: .55; }
html:not(.dark) .ctrl-line-tpl { stroke: #e0559e; stroke-width: 3; opacity: .6; }
/* ═══ 연결선 위 뱃지 ═══ */
.ctrl-badge {
position: absolute; padding: .2rem .6rem; border-radius: 9px;
background: var(--v5-surface-solid);
border: 1px solid rgba(var(--v5-cyan-rgb),.3);
font-size: .55rem; font-weight: 700; color: var(--ctrl-cyan);
white-space: nowrap; z-index: 15; cursor: pointer;
transition: all .25s var(--v5-ease-move);
box-shadow: 0 4px 16px rgba(var(--v5-cyan-rgb),.12), 0 0 12px rgba(var(--v5-cyan-rgb),.1);
pointer-events: auto; transform: translate(-50%, -50%);
}
.ctrl-badge:hover {
border-color: var(--ctrl-cyan);
box-shadow: 0 8px 24px rgba(var(--v5-cyan-rgb),.3); transform: translate(-50%,-50%) scale(1.05);
}
.ctrl-badge.auto { border-color: rgba(var(--v5-primary-rgb),.35); color: var(--ctrl-primary);
box-shadow: 0 4px 16px rgba(var(--v5-primary-rgb),.12); }
.ctrl-badge.tpl-link { border-color: rgba(var(--v5-pink-rgb),.35); color: var(--ctrl-pink);
box-shadow: 0 4px 16px rgba(var(--v5-pink-rgb),.12); font-size: .5rem; }
/* 조건분기 뱃지 */
.ctrl-badge.cond {
border-color: rgba(253,203,110,.4); color: var(--v5-text, #e8e8ee);
box-shadow: 0 6px 20px rgba(253,203,110,.15); padding: .45rem .7rem;
min-width: 120px; text-align: left; white-space: normal; line-height: 1.4;
border-radius: 10px; border-width: 2px;
}
.ctrl-badge.cond .cb-head {
display: flex; align-items: center; gap: .3rem;
font-size: .5rem; font-weight: 700; color: var(--ctrl-amber); margin-bottom: .25rem;
}
.ctrl-badge.cond .cb-icon {
width: 16px; height: 16px; border-radius: 4px;
display: flex; align-items: center; justify-content: center; font-size: .6rem;
background: rgba(253,203,110,.15); border: 1px solid rgba(253,203,110,.3);
}
.ctrl-badge.cond .cb-cond {
font-size: .6rem; font-weight: 600; padding: .2rem .4rem;
border-radius: 6px; background: rgba(253,203,110,.08);
border: 1px dashed rgba(253,203,110,.25); margin-bottom: .25rem;
}
.ctrl-badge.cond .cb-paths { display: flex; gap: .5rem; font-size: .48rem; font-weight: 700; }
.ctrl-badge.cond .cb-yes { color: var(--ctrl-green); }
.ctrl-badge.cond .cb-yes::before { content: '●'; margin-right: .15rem; font-size: .4rem; }
.ctrl-badge.cond .cb-no { color: var(--v5-text-muted, #888); }
.ctrl-badge.cond .cb-no::before { content: '○'; margin-right: .15rem; font-size: .4rem; }
html:not(.dark) .ctrl-badge { background: rgba(255,255,255,.92);
border-color: rgba(0,0,0,.15); box-shadow: 0 2px 12px rgba(0,0,0,.1); }
/* ═══ 테이블 노드 ═══ */
.tbl-node {
position: absolute; width: 200px;
background: var(--v5-surface-solid);
border: 1px solid var(--ctrl-glass-border); border-radius: 12px;
box-shadow: 0 8px 24px rgba(0,0,0,.08), 0 0 20px rgba(var(--v5-cyan-rgb),.12);
z-index: 20; overflow: hidden; transition: border-color .2s var(--v5-ease-move), box-shadow .2s var(--v5-ease-move);
}
.dark .tbl-node { box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 20px rgba(var(--v5-cyan-rgb),.06); }
.tbl-node:hover {
border-color: var(--ctrl-cyan);
box-shadow: 0 12px 32px rgba(0,0,0,.12), 0 0 30px rgba(var(--v5-cyan-rgb),.18);
}
.tbl-node-head {
display: flex; align-items: center; gap: .4rem; padding: .55rem .7rem;
background: linear-gradient(135deg, rgba(var(--v5-cyan-rgb),.12), rgba(var(--v5-cyan-rgb),.04));
border-bottom: 1px solid rgba(var(--v5-cyan-rgb),.15); cursor: grab;
}
.tbl-node-head:active { cursor: grabbing; }
.tbl-icon {
width: 20px; height: 20px; border-radius: 5px;
display: flex; align-items: center; justify-content: center;
font-size: .7rem; background: rgba(var(--v5-cyan-rgb),.12); flex-shrink: 0;
}
.tbl-name { flex: 1; font-size: .65rem; font-weight: 700; color: var(--v5-text, #e8e8ee); letter-spacing: -.01em; }
.tbl-badge {
font-size: .45rem; padding: .1rem .35rem; border-radius: 999px;
background: rgba(var(--v5-cyan-rgb),.1); color: var(--ctrl-cyan); font-weight: 700;
}
.tbl-node-cols { padding: .35rem 0; max-height: 160px; overflow-y: auto; }
.tbl-col {
display: flex; align-items: center; gap: .35rem; padding: .22rem .65rem;
font-size: .58rem; color: var(--v5-text-sec, #aaa); transition: background .1s;
}
.tbl-col:hover { background: var(--v5-surface-hover, rgba(255,255,255,.05)); color: var(--v5-text, #eee); }
.tbl-port {
width: 8px; height: 8px; border-radius: 50%; background: var(--v5-surface, #2a2a36);
border: 2px solid rgba(var(--v5-cyan-rgb),.35); flex-shrink: 0; cursor: crosshair; transition: all .2s;
}
.tbl-port:hover {
background: var(--ctrl-cyan); border-color: var(--ctrl-cyan);
box-shadow: 0 0 8px rgba(var(--v5-cyan-rgb),.5); transform: scale(1.3);
}
.tbl-port.pk { border-color: var(--ctrl-primary); background: rgba(var(--v5-primary-rgb),.15); }
.tbl-port.fk { border-color: var(--ctrl-amber); background: rgba(253,203,110,.15); }
.tbl-col-name { flex: 1; font-weight: 500; }
.tbl-col-type { font-size: .45rem; color: var(--v5-text-muted, #777); font-weight: 600; margin-left: auto; }
.tbl-col-mark { font-size: .42rem; font-weight: 700; padding: .05rem .25rem; border-radius: 4px; margin-left: .2rem; }
.tbl-col-mark.pk { color: var(--ctrl-primary); background: rgba(var(--v5-primary-rgb),.1); }
.tbl-col-mark.fk { color: var(--ctrl-amber); background: rgba(253,203,110,.1); }
/* ═══ 제어 노드 (액션/조건/타이머) ═══ */
.ctrl-action-node {
position: absolute; width: 160px;
background: var(--v5-surface-solid);
border: 1px solid rgba(var(--na-rgb, 0,206,201), .25); border-radius: 12px;
box-shadow: 0 8px 24px rgba(0,0,0,.08), 0 0 16px rgba(var(--na-rgb, 0,206,201), .12);
z-index: 20; overflow: visible; transition: border-color .2s var(--v5-ease-move), box-shadow .2s var(--v5-ease-move);
}
.ctrl-action-node:hover {
border-color: rgba(var(--na-rgb, 0,206,201), .5);
box-shadow: 0 12px 32px rgba(0,0,0,.12), 0 0 24px rgba(var(--na-rgb, 0,206,201), .18);
}
.ctrl-an-head {
display: flex; align-items: center; gap: .4rem; padding: .5rem .65rem;
background: linear-gradient(135deg, rgba(var(--na-rgb, 0,206,201), .1), rgba(var(--na-rgb, 0,206,201), .03));
border-bottom: 1px solid rgba(var(--na-rgb, 0,206,201), .12);
border-radius: 12px 12px 0 0; cursor: grab;
}
.ctrl-an-head:active { cursor: grabbing; }
.ctrl-an-icon {
width: 22px; height: 22px; border-radius: 6px;
display: flex; align-items: center; justify-content: center; font-size: .8rem;
background: linear-gradient(135deg, rgba(var(--na-rgb, 0,206,201), .18), rgba(var(--na-rgb, 0,206,201), .06));
border: 1px solid rgba(var(--na-rgb, 0,206,201), .25);
}
.ctrl-an-name { flex: 1; font-size: .62rem; font-weight: 700; color: var(--v5-text, #e8e8ee); }
.ctrl-an-del {
width: 18px; height: 18px; border-radius: 5px;
border: 1px solid transparent; background: transparent;
color: var(--v5-text-muted, #888); font-size: .55rem; cursor: pointer;
display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.ctrl-an-del:hover {
background: rgba(var(--v5-red-rgb),.1); border-color: rgba(var(--v5-red-rgb),.3); color: var(--ctrl-red);
}
.ctrl-an-body {
padding: .5rem .65rem; cursor: pointer;
border-radius: 0 0 12px 12px; transition: background .15s;
}
.ctrl-an-body:hover { background: rgba(var(--na-rgb, 0,206,201), .06); }
.ctrl-an-summary { font-size: .55rem; color: var(--v5-text-sec, #aaa); line-height: 1.4; }
/* ═══ I/O 포트 ═══ */
.ctrl-io-port {
position: absolute; width: 10px; height: 10px; border-radius: 50%;
border: 2px solid; cursor: crosshair; transition: all .2s; z-index: 25;
}
.ctrl-io-port.port-in {
left: -6px; top: 50%; transform: translateY(-50%);
border-color: var(--ctrl-cyan); background: var(--v5-surface, #2a2a36);
}
.ctrl-io-port.port-in.tbl-io { top: 18px; transform: none; }
.ctrl-io-port.port-out { border-color: var(--ctrl-cyan); background: var(--ctrl-cyan); }
.ctrl-io-port.port-out.tbl-io { position: absolute; right: -6px; top: 18px; }
.ctrl-io-port.port-yes { border-color: var(--ctrl-green); background: var(--ctrl-green); }
.ctrl-io-port.port-no { border-color: var(--v5-text-muted, #888); background: var(--v5-text-muted, #888); opacity: .6; }
.ctrl-an-ports-out {
position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
display: flex; flex-direction: column; gap: 8px;
}
.ctrl-an-ports-out .ctrl-io-port { position: relative; right: auto; top: auto; transform: none; }
.port-label {
position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
font-size: .42rem; font-weight: 700; color: var(--v5-text-muted, #888);
pointer-events: none; white-space: nowrap;
}
.ctrl-io-port:hover { box-shadow: 0 0 10px rgba(var(--v5-cyan-rgb),.5); transform: scale(1.3); }
.ctrl-io-port.port-in:hover { background: var(--ctrl-cyan); transform: translateY(-50%) scale(1.3); }
.ctrl-io-port.port-in.tbl-io:hover { transform: scale(1.3); }
.ctrl-io-port.port-hover {
background: var(--ctrl-cyan) !important;
box-shadow: 0 0 14px rgba(var(--v5-cyan-rgb),.6) !important;
transform: translateY(-50%) scale(1.5) !important;
}
.ctrl-io-port.port-hover.tbl-io { transform: scale(1.5) !important; }
/* 드래그 중 모든 input 포트 pulse */
.dash-canvas.port-dragging .ctrl-io-port.port-in { animation: portPulse 1.2s ease infinite; }
@keyframes portPulse {
0%, 100% { box-shadow: 0 0 4px rgba(var(--v5-cyan-rgb),.3); }
50% { box-shadow: 0 0 14px rgba(var(--v5-cyan-rgb),.6); }
}
/* ═══ 규칙 연결선 ═══ */
.rule-temp-line { fill: none; stroke: var(--ctrl-cyan); stroke-width: 2;
stroke-dasharray: 6 3; opacity: .7; pointer-events: none; }
.rule-conn-path { fill: none; stroke: var(--ctrl-cyan); stroke-width: 2; opacity: .6;
stroke-dasharray: 6 3; animation: ctrlPulse 1.5s linear infinite; }
.rule-conn-path.conn-yes { stroke: var(--ctrl-green); }
.rule-conn-path.conn-no { stroke: var(--v5-text-muted, #888); opacity: .35; }
/* 연결 삭제 버튼 */
.rule-conn-badge {
position: absolute; transform: translate(-50%, -50%);
z-index: 15; pointer-events: auto; padding: 6px;
}
.conn-x {
display: flex; align-items: center; justify-content: center;
width: 20px; height: 20px; border-radius: 50%;
background: var(--v5-surface-solid);
border: 1.5px solid rgba(var(--v5-red-rgb),.15);
color: var(--v5-text-muted, #888); font-size: .55rem; font-weight: 700; cursor: pointer;
opacity: 0; transition: all .2s var(--v5-ease-move); transform: scale(.6);
}
.rule-conn-badge:hover .conn-x {
opacity: 1; transform: scale(1);
background: rgba(var(--v5-red-rgb),.15); border-color: rgba(var(--v5-red-rgb),.5); color: var(--ctrl-red);
box-shadow: 0 2px 12px rgba(var(--v5-red-rgb),.2);
}
/* ═══ 설정 팝오버 ═══ */
.ctrl-cfg-pop {
position: absolute; width: 220px;
background: var(--v5-surface-solid);
border: 1px solid rgba(var(--v5-primary-rgb),.3); border-radius: 12px;
box-shadow: 0 12px 40px rgba(0,0,0,.15), 0 0 24px rgba(var(--v5-primary-rgb),.18);
z-index: 50; padding: .7rem;
opacity: 0; transform: translateX(-8px);
transition: opacity .2s var(--v5-ease-move), transform .2s var(--v5-ease-move);
}
.ctrl-cfg-pop.open { opacity: 1; transform: translateX(0); }
.cfg-hd { font-size: .65rem; font-weight: 700; color: var(--v5-text, #eee);
padding-bottom: .5rem; border-bottom: 1px solid var(--v5-border, #3a3a48); margin-bottom: .5rem; }
.cfg-sec { margin-bottom: .5rem; }
.cfg-lb { display: block; font-size: .48rem; font-weight: 700; color: var(--v5-text-muted, #888);
text-transform: uppercase; letter-spacing: .05em; margin-bottom: .15rem; }
.cfg-sel, .cfg-inp, .cfg-ta {
width: 100%; padding: .3rem .45rem; border-radius: 7px;
border: 1px solid var(--v5-border, #3a3a48); background: var(--v5-surface, #2a2a36);
color: var(--v5-text, #eee); font-size: .55rem; font-family: inherit;
outline: none; transition: border-color .15s; box-sizing: border-box;
}
.cfg-sel:focus, .cfg-inp:focus, .cfg-ta:focus { border-color: var(--ctrl-primary); }
.cfg-add-btn {
width: 100%; padding: .25rem; border-radius: 6px;
border: 1px dashed var(--v5-border, #3a3a48); background: transparent;
color: var(--v5-text-muted, #888); font-size: .5rem; cursor: pointer; margin-top: .3rem;
}
.cfg-add-btn:hover { border-color: var(--ctrl-cyan); color: var(--ctrl-cyan); }
.cfg-ft {
display: flex; gap: .3rem; padding-top: .5rem;
border-top: 1px solid var(--v5-border, #3a3a48); margin-top: .5rem;
}
.cfg-btn {
flex: 1; padding: .3rem; border-radius: 7px;
border: 1px solid var(--v5-border, #3a3a48); background: var(--v5-surface, #2a2a36);
color: var(--v5-text, #eee); font-size: .55rem; font-weight: 600;
cursor: pointer; transition: all .15s;
}
.cfg-btn.save { background: var(--ctrl-primary); border-color: var(--ctrl-primary); color: #fff; }
.cfg-btn:hover { opacity: .85; }
/* ═══ 팔레트 ═══ */
.ctrl-palette-section {
font-size: .52rem; font-weight: 700; color: var(--ctrl-cyan);
text-transform: uppercase; letter-spacing: .08em; padding: .7rem .65rem .3rem;
}
.ctrl-palette-item {
display: flex; align-items: center; gap: .5rem; padding: .45rem .65rem;
border-radius: 8px; font-size: .68rem; font-weight: 500;
color: var(--v5-text-sec, #aaa); cursor: grab; transition: all .2s;
}
.ctrl-palette-item:hover {
background: rgba(var(--v5-cyan-rgb),.08); color: var(--v5-text, #eee); transform: translateX(2px);
}
.ctrl-palette-item .cp-icon { font-size: .8rem; width: 20px; text-align: center; }
.ctrl-palette-item[draggable="true"] { cursor: grab; }
.ctrl-palette-item[draggable="true"]:active { cursor: grabbing; }
/* ═══ 제어 모드 툴바 ═══ */
.ctrl-toolbar {
display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem;
background: var(--ctrl-glass); border-bottom: 1px solid var(--ctrl-glass-border);
font-size: .6rem;
}
.ctrl-toolbar-mode {
display: flex; gap: .25rem;
}
.ctrl-mode-btn {
padding: .25rem .6rem; border-radius: 6px; border: 1px solid var(--v5-border, #3a3a48);
background: transparent; color: var(--v5-text-sec, #aaa); font-size: .55rem;
font-weight: 600; cursor: pointer; transition: all .2s;
}
.ctrl-mode-btn.on {
background: rgba(var(--v5-cyan-rgb),.12); border-color: var(--ctrl-cyan);
color: var(--ctrl-cyan); font-weight: 700;
}
.ctrl-mode-btn:hover:not(.on) { background: var(--v5-surface-hover, rgba(255,255,255,.04)); }
html:not(.dark) .ctrl-action-node {
box-shadow: 0 4px 16px rgba(0,0,0,.06), 0 0 12px rgba(var(--na-rgb, 0,206,201), .06);
}
html:not(.dark) .rule-conn-path { stroke-width: 2.5; opacity: .5; }
html:not(.dark) .ctrl-cfg-pop {
box-shadow: 0 8px 32px rgba(0,0,0,.1); border-color: rgba(var(--v5-primary-rgb),.2);
}