/* Sovasta Health — 설치·결제 화면 제거와 요금제 표.
 * 설치는 sova.sovasta.com 하나뿐이므로 Health 자체의 설치 카드·창·PWA 결제 패널은 숨긴다. */
#aeviva-install-card, .aeviva-install-card, #aeviva-uxr1-install-modal,
#btn-pwa-commerce-card, #pwa-commerce-panel, #btn-install-aeviva, #aeviva-account-install,
#aeviva-uxr1-install-inline-state { display: none !important; }

.sovasta-plan-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.sovasta-plan-table th, .sovasta-plan-table td { border-bottom: 1px solid rgba(127,127,127,.25); padding: 8px 6px; text-align: left; vertical-align: top; }
.sovasta-plan-table thead th { font-weight: 600; }
.sovasta-plan-table tr.is-current { background: rgba(59,130,246,.10); }
.sovasta-plan-current { margin: 8px 0; font-weight: 600; }
.sovasta-plan-wrap { overflow-x: auto; }

/* ── Today 지휘소 (js/health-os/command-center.js) ── */
:root { --cc-fg: #0f172a; --cc-mut: #64748b; --cc-line: rgba(100,116,139,.25); --cc-card: #ffffff; --cc-acc: #2563eb; --cc-good: #16a34a; --cc-mid: #d97706; --cc-low: #dc2626; --cc-body-hi: #e2e8f0; --cc-body-lo: #cbd5e1; }
#sovasta-cc { color: var(--cc-fg); }
.cc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cc-head h2 { margin: 0; font-size: 1.25rem; flex: 1; }
.cc-switch { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--cc-mut); }
.cc-k { border: 1px solid var(--cc-line); background: none; border-radius: 8px; padding: 5px 10px; font-size: .85rem; color: inherit; cursor: pointer; }
.cc-banner { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: rgba(217,119,6,.12); color: #92400e; font-weight: 600; font-size: .85rem; }
.cc-rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 14px 0; }
.cc-ring { margin: 0; text-align: center; }
.cc-ring svg { width: 84px; height: 84px; }
.cc-ring-bg { fill: none; stroke: var(--cc-line); stroke-width: 8; }
.cc-ring-fg { fill: none; stroke-width: 8; stroke-linecap: round; stroke: var(--cc-mut); }
.cc-good .cc-ring-fg { stroke: var(--cc-good); } .cc-mid .cc-ring-fg { stroke: var(--cc-mid); } .cc-low .cc-ring-fg { stroke: var(--cc-low); }
.cc-ring-val { font: 600 16px system-ui; fill: var(--cc-fg); }
.cc-ring figcaption { display: grid; font-size: .78rem; } .cc-ring figcaption span { color: var(--cc-mut); }
.cc-dock { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.cc-tile { position: relative; flex: 0 0 auto; min-width: 84px; display: grid; justify-items: center; gap: 2px; padding: 10px 8px; border: 1px solid var(--cc-line); border-radius: 12px; background: var(--cc-card); color: inherit; cursor: pointer; }
.cc-tile:hover, .cc-tile:focus-visible { border-color: var(--cc-acc); }
.cc-tile em { font-style: normal; font-size: 1.3rem; } .cc-tile small { color: var(--cc-mut); font-size: .7rem; }
.cc-tile > span { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--cc-mut); }
.cc-dot-ready { background: var(--cc-good) !important; } .cc-dot-loaded { background: var(--cc-mid) !important; } .cc-dot-failed { background: var(--cc-low) !important; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.cc-card { border: 1px solid var(--cc-line); border-radius: 14px; padding: 12px; background: var(--cc-card); min-width: 0; }
.cc-card h3 { margin: 0 0 8px; font-size: .95rem; }
.cc-wide { grid-column: span 2; }
@media (max-width: 640px) { .cc-wide { grid-column: auto; } }
.cc-empty { color: var(--cc-mut); font-size: .85rem; margin: 6px 0; }
.cc-note { color: var(--cc-mut); font-size: .8rem; margin: 4px 0 0; }
.cc-axis { font: 10px system-ui; fill: var(--cc-mut); }
line.cc-grid, polygon.cc-grid { stroke: var(--cc-line); fill: none; }
.cc-body { width: 100%; max-height: 240px; }
.bm-torso { opacity: .9; }
.bm-arm { stroke: var(--cc-body-lo); stroke-width: 14; stroke-linecap: round; fill: none; }
.bm-region { cursor: pointer; outline: none; }
.bm-region > * { stroke: #fff; stroke-width: 1.5; transition: opacity .15s; }
.bm-region:hover > *, .bm-region:focus-visible > * { opacity: .75; stroke: var(--cc-acc); stroke-width: 2.5; }
.bm-ok > * { fill: var(--cc-good); } .bm-review > * { fill: var(--cc-mid); } .bm-retake > * { fill: var(--cc-low); } .bm-none > * { fill: #94a3b8; }
.cc-legend { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; padding: 0; margin: 4px 0 0; font-size: .75rem; color: var(--cc-mut); }
.cc-legend li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.cc-legend .bm-ok::before { background: var(--cc-good); } .cc-legend .bm-review::before { background: var(--cc-mid); } .cc-legend .bm-retake::before { background: var(--cc-low); } .cc-legend .bm-none::before { background: #94a3b8; }
.cc-hyp, .cc-radar, .cc-graph { width: 100%; }
.cc-hyp-line { fill: none; stroke: var(--cc-acc); stroke-width: 2.5; stroke-linejoin: round; }
.cc-radar-area { fill: rgba(37,99,235,.22); stroke: var(--cc-acc); stroke-width: 2; }
.cc-labs { display: grid; gap: 8px; }
.cc-lab { display: grid; grid-template-columns: 1fr 140px; align-items: center; column-gap: 8px; font-size: .8rem; }
.cc-lab span { grid-column: 1 / -1; color: var(--cc-mut); }
.cc-lab svg { width: 140px; height: 36px; }
.cc-spark { fill: none; stroke: var(--cc-acc); stroke-width: 2; } .cc-dot { fill: var(--cc-acc); }
.cc-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 120px; align-items: end; }
.cc-bars div { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; font-size: .7rem; color: var(--cc-mut); }
.cc-bars i { align-self: end; display: block; background: var(--cc-acc); border-radius: 4px 4px 0 0; min-height: 2px; }
.cc-edge { stroke: var(--cc-line); }
.cc-n-engine circle { fill: var(--cc-acc); } .cc-n-record circle { fill: #94a3b8; } .cc-n-receipt circle { fill: var(--cc-good); }
.cc-rail { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.cc-rail li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .78rem; border-bottom: 1px solid var(--cc-line); padding-bottom: 6px; }
.cc-rail time, .cc-rail code { color: var(--cc-mut); }
.cc-rail button { grid-row: 1 / 3; grid-column: 2; align-self: center; border: 1px solid var(--cc-line); background: none; border-radius: 6px; padding: 3px 8px; color: inherit; cursor: pointer; }
.cc-rail output { grid-column: 1 / -1; font-weight: 600; }
.cc-v-valid { color: var(--cc-good); } .cc-v-changed, .cc-v-record_missing { color: var(--cc-mid); } .cc-v-bad_signature { color: var(--cc-low); }

/* 한 화면만 보기 */
body.sovasta-focus #dashboard > *:not(.sovasta-focused):not(#sovasta-focus-bar) { display: none !important; }
#sovasta-focus-bar { position: sticky; top: 0; z-index: 20; display: flex; gap: 12px; align-items: center; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--cc-card); border: 1px solid var(--cc-line); color: var(--cc-fg); }
#sovasta-focus-bar button { border: 0; background: none; color: var(--cc-acc); font-weight: 600; cursor: pointer; }

/* ⌘K */
#sovasta-palette { position: fixed; inset: 0; z-index: 2147483000; background: rgba(15,23,42,.45); display: grid; place-items: start center; padding: 12vh 16px 0; }
#sovasta-palette .pal-card { width: min(560px, 100%); background: var(--cc-card); color: var(--cc-fg); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; }
#sovasta-palette input { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--cc-line); padding: 14px 16px; font-size: 1rem; background: transparent; color: inherit; outline: none; }
#sovasta-palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
#sovasta-palette li { padding: 9px 12px; border-radius: 8px; cursor: pointer; }
#sovasta-palette li[aria-selected="true"], #sovasta-palette li:hover { background: rgba(37,99,235,.12); }

/* ── 작업 공간: 왼쪽 도크 · 가운데 캔버스 · 오른쪽 근거 띠 (js/health-os/workspace.js) ── */
#sovasta-dock, #sovasta-rail { display: none; }
@media (min-width: 1200px) {
  /* 왼쪽은 원래 있던 서비스 목록(☰, 900px 이상에서 늘 펼쳐진 270px 띠)이 도크다 — 그 안 Measure 에 타일 격자를 넣는다 */
  body.aeviva-uxr2-active.sovasta-ws { padding-right: 312px !important; }
  body.aeviva-uxr2-active #sovasta-rail { display: block; position: fixed; z-index: 30; top: 64px; bottom: 12px; right: 12px; width: 288px; overflow: auto; padding: 12px; border: 1px solid var(--cc-line); border-radius: 14px; background: var(--cc-card); color: var(--cc-fg); }
}
#sovasta-dock summary { font-weight: 600; font-size: .85rem; cursor: pointer; margin: 4px 0; }
.ws-today, .ws-link, .ws-k { display: block; width: 100%; text-align: left; border: 0; background: none; color: inherit; padding: 6px 8px; border-radius: 8px; font-size: .85rem; cursor: pointer; }
.ws-today:hover, .ws-link:hover, .ws-today.on, .ws-link.on { background: rgba(37,99,235,.10); color: var(--cc-acc); }
.ws-k { border: 1px solid var(--cc-line); text-align: center; margin-top: auto; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.ws-tree-grid { padding: 6px 0; }
.ws-tile { position: relative; display: grid; justify-items: center; gap: 1px; padding: 8px 2px 6px; border: 1px solid var(--cc-line); border-radius: 10px; background: none; color: inherit; cursor: pointer; font-size: .72rem; }
.ws-tile em { font-style: normal; font-size: 1.15rem; } .ws-tile small { color: var(--cc-mut); font-size: .62rem; }
.ws-tile.on, .ws-tile:hover { border-color: var(--cc-acc); }
.ws-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.ws-ready { background: var(--cc-good); } .ws-loaded { background: var(--cc-mid); } .ws-failed { background: var(--cc-low); } .ws-missing { background: #94a3b8; }
.ws-canvas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--cc-line); border-radius: 14px; background: var(--cc-card); color: var(--cc-fg); }
.ws-canvas h3 { margin: 0 0 6px; font-size: .9rem; }
.ws-c3d { min-height: 220px; } .ws-c3d canvas, .cc-body3d canvas { display: block; width: 100%; }
.ws-chart { width: 100%; } .ws-bar { fill: var(--cc-acc); }
.ws-proto { margin: 0 0 6px; padding-left: 16px; font-size: .8rem; }
.ws-hidden { display: none !important; }
#sovasta-rail h3 { margin: 0 0 8px; font-size: .95rem; }
.ws-receipts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ws-receipts > li { border: 1px solid var(--cc-line); border-radius: 10px; padding: 8px; font-size: .76rem; }
.ws-r-head { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; } .ws-r-head time { color: var(--cc-mut); margin-left: auto; }
.ws-receipts dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 6px 0; } .ws-receipts dt { color: var(--cc-mut); } .ws-receipts dd { margin: 0; overflow-wrap: anywhere; }
.ws-r-act { display: flex; gap: 6px; align-items: center; } .ws-r-act button { border: 1px solid var(--cc-line); background: none; border-radius: 6px; padding: 2px 8px; color: inherit; cursor: pointer; font-size: .75rem; }
.ws-r-act output { font-weight: 600; }
.ws-trace { border: 1px solid var(--cc-acc); border-radius: 10px; padding: 8px; margin-bottom: 10px; font-size: .78rem; } .ws-trace ol { list-style: none; margin: 6px 0; padding: 0; }
.ws-trace span { display: inline-block; min-width: 54px; color: var(--cc-mut); }
.cc-n { cursor: pointer; } .cc-n-input circle { fill: #7c3aed; } .cc-n-model circle { fill: #0891b2; } .cc-e-signed, .cc-e-from, .cc-e-by { stroke-dasharray: 3 2; }
.cc-skel figure span, .cc-skel > span { display: block; background: linear-gradient(90deg, var(--cc-line), transparent, var(--cc-line)); background-size: 200% 100%; animation: ccSkel 1.2s linear infinite; border-radius: 10px; }
.cc-skel.cc-ring > span { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto; } section.cc-skel > span { height: 120px; }
@keyframes ccSkel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .cc-skel span, .cc-skel > span { animation: none; } }

/* 서비스 목록(어두운 바탕) 안의 Measure 타일 */
#aeviva-uxr2-tree .ws-grid { padding: 4px 6px 8px; }
#aeviva-uxr2-tree .ws-tile { color: #e8f1ff; border-color: #263955; background: #0d1d33; }
#aeviva-uxr2-tree .ws-tile small { color: #8ea3bf; }
#aeviva-uxr2-tree .ws-tile.on, #aeviva-uxr2-tree .ws-tile:hover { border-color: #63e5cf; }
#aeviva-uxr2-tree .ws-current { color: #63e5cf !important; background: #14243b !important; }
#aeviva-uxr2-tree details .ws-tile { display: grid; justify-items: center; text-align: center; padding: 8px 2px 6px; width: auto; border: 1px solid #263955; border-radius: 10px; font: 600 12px system-ui; }
#aeviva-uxr2-tree details .ws-tile b, #aeviva-uxr2-tree details .ws-tile small { display: block; }
