/* ============================================
   Zito 대시보드 디자인 (site.css 위에 덧입힌다)
   1) 기존 Tailwind 화면을 흑백 톤으로 통일
   2) 새 분석 화면(ins-*) 스타일
   ============================================ */

body.dash { background: #fff; color: #111; }
.dash [data-theme-toggle] { display: none !important; }
.dash-wrap { max-width: 80rem; margin: 0 auto; padding: 28px 20px 96px; }

/* ---------- 1) Tailwind 화면 톤 통일 ---------- */
.dash .rounded-2xl, .dash .rounded-xl, .dash .rounded-lg, .dash .rounded-3xl { border-radius: 2px !important; }
.dash [class*="shadow-sm"], .dash [class*="shadow-lg"], .dash [class*="shadow-md"] { box-shadow: none !important; }
.dash .border-gray-100, .dash .border-gray-200 { border-color: var(--line) !important; }
.dash .bg-gray-50\/50, .dash .bg-gray-50 { background: #fafafa !important; }
.dash .bg-gray-100 { background: #f4f4f5 !important; }
.dash .text-gray-900, .dash .text-gray-800 { color: #111 !important; }
.dash .text-gray-500, .dash .text-gray-600 { color: #6b6b6b !important; }
.dash #personal-plan-card, .dash #enterprise-plan-card, .dash #b2b-company-card { background: #111 !important; border-radius: 0 !important; }
.dash #enterprise-plan-card { background: #3a3a3c !important; }
.dash #b2b-company-card .text-purple-100 { color: #c7c7cc !important; }
.dash .bg-blue-600, .dash .bg-purple-600, .dash .bg-gray-900 { background: #111 !important; color: #fff !important; }
.dash .bg-blue-600:hover, .dash .bg-purple-600:hover { background: #333 !important; }
.dash .text-blue-500, .dash .text-blue-600, .dash .text-purple-600 { color: var(--point) !important; }
.dash .bg-blue-50, .dash .bg-green-50, .dash .bg-purple-50 { background: #f4f4f5 !important; }
.dash .plan-restriction-overlay { border-radius: 0; background: rgba(255,255,255,.86); }
.dash .plan-restriction-content { border: 1px solid #111; border-radius: 0; }
.dash .plan-restriction-icon { background: #111; }
.dash .card-item.selected, .dash .employee-item.selected { border-color: #111 !important; background: #fafafa !important; box-shadow: none !important; }
.dash h1, .dash h2, .dash h3 { letter-spacing: -0.01em; }
.dash input, .dash select, .dash textarea { font-family: inherit; }

/* ---------- 2) 레이아웃 ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 20px 0 26px; border-bottom: 1px solid #111; margin-bottom: 28px; }
.dash-head h1 { font-size: clamp(26px, 4vw, 36px); margin-top: 8px; }
.dash-head .dek { margin-top: 6px; }
.dash-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-nav a { font-size: 12.5px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: 7px 12px; }
.dash-nav a:hover { color: #111; border-color: #111; }
.dash-demo { border: 1px solid var(--point); background: var(--point-soft); color: #111; padding: 12px 16px; font-size: 13px; margin-bottom: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dash-demo b { color: var(--point); letter-spacing: .06em; }
.dash-demo a { margin-left: auto; text-decoration: underline; }
.dash-sec { margin-top: 56px; scroll-margin-top: 80px; }
.dash-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-sec-head h2 { font-size: clamp(20px, 3vw, 26px); margin-top: 8px; }
.dash-sec-head .dek { margin-top: 6px; max-width: 60ch; }
.dash-sec-head .btns { display: flex; gap: 8px; }
.dash-box { border: 1px solid var(--line); background: #fff; position: relative; }

/* ---------- 3) 분석 부품 ---------- */
.ins-an { display: grid; gap: 16px; }
.ins-an-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ins-an-head h4 { font-size: 16px; font-weight: 700; }
.ins-note-l { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); max-width: 70ch; line-height: 1.6; }
.ins-period { display: flex; border: 1px solid var(--line); }
.ins-period button { border: none; background: none; padding: 7px 14px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.ins-period button + button { border-left: 1px solid var(--line); }
.ins-period button.on { background: #111; color: #fff; }

.ins-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ins-kpis-s { margin: 16px 0 22px; }
.ins-kpi { background: #fff; padding: 14px 16px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ins-kpi.main { background: #111; color: #fff; }
.ins-kpi-l { margin: 0; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.ins-kpi.main .ins-kpi-l, .ins-kpi.main .ins-kpi-s { color: #a1a1a6; }
.ins-kpi-v { margin: 4px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ins-sep { color: var(--muted); font-weight: 400; }
.ins-kpi-s { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.ins-kpi-s b.up { color: #0f8a5f; } .ins-kpi-s b.down { color: #c1462f; }

.ins-grid2 { display: grid; gap: 16px; grid-template-columns: 1.4fr 1fr; }
.ins-grid4 { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.ins-grid-s { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .ins-grid-s { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1100px) { .ins-grid4, .ins-grid-s { grid-template-columns: repeat(2, 1fr); } .ins-grid2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ins-grid4, .ins-grid-s { grid-template-columns: 1fr; } }
.ins-card { border: 1px solid var(--line); padding: 16px; background: #fff; min-width: 0; }
.ins-card h5, .ins-bd h5 { margin: 0 0 12px; font-size: 13px; font-weight: 700; }
.ins-card h5 small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 11.5px; }
.ins-card-flush { padding: 0; }
.ins-card-flush .ins-pad { padding: 16px 16px 0; }

.ins-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ins-grid { stroke: #ececec; stroke-width: 1; }
.ins-ax { fill: #9a9a9f; font-size: 10px; font-family: inherit; }
.ins-bar { fill: #2f5bd8; opacity: .8; }
.ins-bar.peak { fill: #111; opacity: 1; }
.ins-bar-hit { fill: transparent; }
.ins-bar-g:hover .ins-bar { opacity: 1; }
.ins-peaklbl { font-size: 11px; font-weight: 700; fill: #111; }
.ins-line { fill: none; stroke: #111; stroke-width: 1.6; }
.ins-area { fill: rgba(47,91,216,.08); }
.ins-dot-hit { fill: transparent; }
.ins-dot-hit:hover { fill: rgba(47,91,216,.35); }

.ins-hm { display: grid; grid-template-columns: 22px repeat(24, 1fr); gap: 2px; }
.ins-hm-c { min-height: 16px; font-size: 9.5px; color: #9a9a9f; text-align: center; line-height: 16px; }
.ins-hm-d { text-align: right; padding-right: 4px; }
.ins-hm-v { background: #f4f4f5; border-radius: 1px; }
.ins-hm-v.l1 { background: #cfdcfb; } .ins-hm-v.l2 { background: #94b0f3; } .ins-hm-v.l3 { background: #5b83e8; } .ins-hm-v.l4 { background: #1f4fc7; }
.ins-hm-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 10px; font-size: 10.5px; color: #9a9a9f; }
.ins-hm-legend i { width: 12px; height: 12px; display: block; background: #f4f4f5; }
.ins-hm-legend i.l1 { background: #cfdcfb; } .ins-hm-legend i.l2 { background: #94b0f3; } .ins-hm-legend i.l3 { background: #5b83e8; } .ins-hm-legend i.l4 { background: #1f4fc7; }

.ins-bd { border: 1px solid var(--line); padding: 16px; min-width: 0; }
.ins-bd ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ins-bd li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12px; }
.ins-bd-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-bd-bar { height: 6px; background: #f1f1f2; display: block; }
.ins-bd-bar i { display: block; height: 100%; background: #111; }
.ins-bd-n { font-variant-numeric: tabular-nums; text-align: right; min-width: 52px; }
.ins-bd-n small { color: var(--muted); margin-left: 4px; font-size: 10.5px; }
.ins-hint { margin: -6px 0 10px; font-size: 11px; color: var(--muted); }
.ins-empty { color: var(--muted); font-size: 12.5px; padding: 18px 4px; text-align: center; }

/* 로그 표 */
.ins-lt-bar { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ins-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ins-chips button { border: 1px solid var(--line); background: #fff; padding: 5px 11px; font-size: 12px; cursor: pointer; color: #444; display: inline-flex; align-items: center; gap: 6px; }
.ins-chips button b { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ins-chips button.on { background: #111; color: #fff; border-color: #111; }
.ins-chips button.on b { color: #c7c7cc; }
.ins-search { border: 1px solid var(--line); padding: 7px 11px; font-size: 12.5px; min-width: 220px; background: #fff; color: #111; }
.ins-search:focus, .ins-emp-search input:focus, .ins-rc-tools input:focus, .ins-rc-tools select:focus { outline: none; border-color: #111; }
.ins-tbl-wrap { overflow-x: auto; max-height: 560px; overflow-y: auto; }
.ins-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 980px; }
.ins-tbl th { position: sticky; top: 0; background: #fafafa; text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); letter-spacing: .04em; white-space: nowrap; z-index: 1; }
.ins-tbl td { padding: 10px 12px; border-bottom: 1px solid #f1f1f2; vertical-align: top; line-height: 1.45; }
.ins-row { cursor: pointer; }
.ins-row:hover td { background: #fafafa; }
.ins-row:focus-visible { outline: 2px solid #111; outline-offset: -2px; }
.ins-row[aria-expanded="true"] td { background: #f6f8ff; }
.ins-c-time span { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins-c-time small, .ins-tbl td small { color: var(--muted); font-size: 10.5px; }
.ins-note { display: block; }
.ins-dev { color: #8a8a8e; margin-right: 6px; width: 14px; text-align: center; }
.ins-model { font-weight: 700; }
.ins-c-env { color: #555; font-size: 11.5px; max-width: 240px; }
.ins-dim { color: var(--muted); }
.ins-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.ins-tag { display: inline-block; font-size: 10.5px; padding: 1px 6px; border: 1px solid var(--line); background: #fff; color: #555; vertical-align: 1px; white-space: nowrap; }
.ins-tag.app { border-color: var(--point); color: var(--point); } .ins-tag.web { color: #555; }
.ins-tag.ret { background: #fff6e0; border-color: #e6c36a; color: #8a6a10; } .ins-tag.first { color: #0f8a5f; border-color: #9fd8c0; }
.ins-tag.inapp { background: #f3efff; border-color: #cbbdf5; color: #5a3fb0; } .ins-tag.own { background: #111; color: #fff; border-color: #111; }
.ins-conf { display: inline-block; font-size: 10px; padding: 0 5px; border-radius: 2px; vertical-align: 1px; white-space: nowrap; }
.ins-conf.ok { background: #e3f4ec; color: #0b6b49; } .ins-conf.est { background: #fff3d6; color: #8a6200; } .ins-conf.unk { background: #f0f0f1; color: #6b6b6b; }
.ins-ch { font-weight: 700; }
.ins-detail-row td { background: #fbfcff !important; padding: 16px 20px; }
.ins-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 22px; margin: 0; }
.ins-dl div { min-width: 0; }
.ins-dl dt { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; margin-bottom: 1px; }
.ins-dl dd { margin: 0; font-size: 12.5px; word-break: break-all; }
.ins-dl a { color: var(--point); text-decoration: underline; }
.ins-ua { font-size: 10.5px; color: #666; background: #f4f4f5; padding: 3px 6px; display: block; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
.ins-lt-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.ins-more { border: 1px solid #111; background: #fff; padding: 6px 16px; cursor: pointer; font-size: 12.5px; }
.ins-more:hover { background: #111; color: #fff; }
.ins-how { border: 1px solid var(--line); padding: 12px 16px; font-size: 12.5px; color: #444; }
.ins-how summary { cursor: pointer; font-weight: 700; }
.ins-how div { margin-top: 10px; display: grid; gap: 6px; line-height: 1.65; }
.ins-how p { margin: 0; }

/* ---------- 4) 사원별 분석 워크스페이스 ---------- */
.ins-ws { display: grid; grid-template-columns: 330px minmax(0, 1fr); border: 1px solid var(--line); min-height: 640px; position: relative; background: linear-gradient(to right, #fafafa 329px, var(--line) 329px 330px, #fff 330px); } /* 오른쪽 분석이 길어져도 왼쪽 회색 면이 끊기지 않게 칸 전체에 깔아 둔다 */
.ins-ws-l { border-right: 1px solid var(--line); background: #fafafa; display: flex; flex-direction: column; max-height: 820px; overflow-y: auto; }
.ins-ws-r { padding: 24px; min-width: 0; }
@media (max-width: 960px) { .ins-ws { grid-template-columns: 1fr; background: #fff; } .ins-ws-l { max-height: 360px; border-right: none; border-bottom: 1px solid var(--line); } .ins-ws-r { padding: 16px; } }
.ins-emp-search { position: sticky; top: 0; z-index: 2; background: #fafafa; padding: 12px; border-bottom: 1px solid var(--line); position: relative; }
.ins-emp-search i { position: absolute; left: 24px; top: 23px; font-size: 12px; color: #9a9a9f; }
.ins-emp-search input { width: 100%; border: 1px solid var(--line); background: #fff; padding: 8px 10px 8px 30px; font-size: 13px; }
.ins-emp-list { list-style: none; margin: 0; padding: 0; }
.ins-emp { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; border-bottom: 1px solid var(--line); background: #fff; }
.ins-emp.active { background: #fff; box-shadow: inset 3px 0 0 #111; }
.ins-emp.active .ins-emp-btn { background: #f6f8ff; }
.ins-emp-btn { display: flex; gap: 12px; align-items: center; padding: 14px 8px 14px 14px; border: none; background: none; text-align: left; cursor: pointer; min-width: 0; width: 100%; }
.ins-emp-btn:hover { background: #fafafa; }
.ins-av { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.ins-av.lg { width: 48px; height: 48px; font-size: 19px; }
.ins-emp-main { display: grid; min-width: 0; gap: 1px; }
.ins-emp-main b { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.ins-emp-main small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-emp-m { font-size: 11px; color: #555; margin-top: 3px; }
.ins-emp-m b { display: inline; font-size: 11px; color: #111; }
.ins-ck { padding: 8px 10px; cursor: pointer; position: relative; display: inline-flex; }
.ins-ck input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.ins-ck-box { width: 16px; height: 16px; border: 1.5px solid #b9b9be; background: #fff; display: block; position: relative; }
.ins-ck input:checked + .ins-ck-box { background: #111; border-color: #111; }
.ins-ck input:checked + .ins-ck-box::after { content: ""; position: absolute; left: 4px; top: 0; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ins-ck input:focus-visible + .ins-ck-box { outline: 2px solid var(--point); outline-offset: 2px; }
.ins-sel-note { margin: 0; padding: 8px 14px; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); background: #fff; line-height: 1.6; }
.ins-sel-note b { color: #111; } .ins-sel-n { margin-left: 6px; background: #111; color: #fff; padding: 0 6px; font-size: 10.5px; }
.ins-gear { border: none; background: none; padding: 8px 12px 8px 4px; color: #9a9a9f; cursor: pointer; }
.ins-gear:hover { color: #111; }
.ins-manage { grid-column: 1 / -1; padding: 10px 14px 14px; background: #fafafa; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.ins-manage[hidden] { display: none; }
.ins-manage label { display: grid; gap: 3px; font-size: 11px; color: var(--muted); }
.ins-manage input { border: 1px solid var(--line); padding: 6px 8px; font-size: 12.5px; background: #fff; width: 100%; }
.ins-btn-s { border: 1px solid #111; background: #fff; color: #111; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.ins-btn-s:hover { background: #111; color: #fff; }
.ins-btn-s.solid { background: #111; color: #fff; } .ins-btn-s.solid:hover { background: #333; }
.ins-loading { padding: 80px 20px; text-align: center; color: var(--muted); font-size: 13px; } .ins-loading.err { color: #c1462f; }
.ins-empty-state { text-align: center; padding: 90px 24px; color: var(--muted); display: grid; gap: 6px; justify-items: center; }
.ins-empty-state i { font-size: 30px; color: #cfcfd4; margin-bottom: 8px; }
.ins-empty-state b { color: #111; font-size: 15px; } .ins-empty-state p { margin: 0; max-width: 46ch; font-size: 13px; line-height: 1.7; }
.ins-empty-state.sm { padding: 40px 20px; border: 1px dashed var(--line); margin-top: 16px; }

.ins-dh { display: flex; gap: 14px; align-items: center; }
.ins-dh h3 { font-size: 22px; } .ins-dh p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.ins-rc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ins-rc-head h4 { font-size: 16px; } .ins-rc-head h4 small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.ins-rc-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.ins-rc-tools input, .ins-rc-tools select { border: 1px solid var(--line); background: #fff; padding: 7px 10px; font-size: 12.5px; color: #111; }
.ins-legend-line { margin: 10px 0 12px; font-size: 12px; color: var(--muted); }
.in { color: var(--point); }
b.in { color: var(--point); }
.ins-rc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 560px; overflow-y: auto; padding-right: 2px; }
.ins-rc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; border: 1px solid var(--line); background: #fff; padding: 12px 14px; text-align: left; cursor: pointer; }
.ins-rc:hover { border-color: #9a9a9f; }
.ins-rc.active { border-color: #111; box-shadow: inset 3px 0 0 #111; background: #fafcff; }
.ins-rc-av { width: 40px; height: 40px; border-radius: 3px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.ins-rc-av.lg { width: 52px; height: 52px; font-size: 20px; }
.ins-rc-main { display: grid; gap: 1px; min-width: 0; }
.ins-rc-main b { font-size: 14px; } .ins-rc-main small { font-size: 11.5px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-rc-side { display: grid; justify-items: end; gap: 4px; }
.ins-rc-side small { font-size: 10.5px; }
.ins-stage { font-size: 10.5px; padding: 2px 8px; border: 1px solid currentColor; white-space: nowrap; }
.ins-stage.s1 { color: #6b6b6b; } .ins-stage.s2 { color: #2f5bd8; } .ins-stage.s3 { color: #7a4fd8; } .ins-stage.s4 { color: #9a6a00; } .ins-stage.s5 { color: #0f8a5f; }
.ins-metric { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; }
.ins-metric i { font-style: normal; font-size: 10.5px; color: var(--muted); } .ins-metric b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ins-metric.in b { color: var(--point); }

.ins-emp-analysis { margin-top: 24px; padding-top: 22px; border-top: 2px solid #111; }
.ins-ca { margin-top: 28px; padding-top: 24px; border-top: 2px solid #111; scroll-margin-top: 84px; }
.ins-ca-head { display: flex; gap: 14px; align-items: flex-start; }
.ins-ca-main { flex: 1; min-width: 0; } .ins-ca-main h4 { font-size: 19px; } .ins-ca-main h4 small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.ins-ca-main p { margin: 3px 0 0; font-size: 12.5px; }
.ins-memo { background: #fffbea; border-left: 3px solid #e6c36a; padding: 6px 10px; color: #5a4a10; display: inline-block; }
.ins-seg { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0; border: 1px solid #111; }
.ins-seg button { border: none; background: #fff; padding: 12px 16px; text-align: left; cursor: pointer; display: grid; gap: 2px; }
.ins-seg button + button { border-left: 1px solid #111; }
.ins-seg button b { font-size: 13.5px; } .ins-seg button small { font-size: 11.5px; color: var(--muted); }
.ins-seg button.on { background: #111; color: #fff; } .ins-seg button.on small { color: #c7c7cc; }
@media (max-width: 640px) { .ins-seg { grid-template-columns: 1fr; } .ins-seg button + button { border-left: none; border-top: 1px solid #111; } .ins-rc { grid-template-columns: auto minmax(0, 1fr); } .ins-rc-side { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; gap: 10px; } }

/* 관점별 지표 (상대 → 우리 / 우리 → 상대 / 상대 명함 전체) */
.ins-persp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
@media (max-width: 760px) { .ins-persp { grid-template-columns: 1fr; } }
.ins-m { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; min-width: 0; align-content: start; }
.ins-m-l { font-size: 11px; font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 6px; }
.ins-m-v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ins-m-d { font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.ins-m em { font-style: normal; font-size: 10px; color: #fff; background: var(--point); padding: 0 6px; justify-self: start; margin-top: 3px; }
.ins-m.in { border-color: #b9c9f5; background: #f3f6ff; }
.ins-m.in .ins-m-l, .ins-m.in .ins-m-v { color: var(--point); }
.ins-m.out { background: #f6f6f7; }
.ins-m.out .ins-m-v { color: #3a3a3c; } .ins-m.out .ins-m-v:is(:empty) { color: var(--muted); }
.ins-m.all { border-style: dashed; border-color: #9a9a9f; } .ins-m.all .ins-m-l::before { content: "Σ"; font-size: 13px; }
.ins-m.all em { background: #111; }

/* ---------- 5) 영업 파이프라인 ---------- */
.ins-lg { border: 1px solid #111; background: #fff; margin-bottom: 16px; }
.ins-lg summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 14px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.ins-lg summary::-webkit-details-marker { display: none; }
.ins-lg summary small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.ins-lg-body { padding: 4px 16px 16px; }
.ins-lg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 860px) { .ins-lg-grid { grid-template-columns: 1fr; } }
.ins-lg-grid > div { border: 1px solid var(--line); padding: 12px 14px; }
.ins-lg-grid > div.in { border-color: #b9c9f5; background: #f3f6ff; } .ins-lg-grid > div.out { background: #f6f6f7; } .ins-lg-grid > div.all { border-style: dashed; border-color: #9a9a9f; }
.ins-lg-grid b { font-size: 13.5px; } .ins-lg-grid p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.65; color: #333; }
.ins-lg-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.ins-funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 16px; }
@media (max-width: 860px) { .ins-funnel { grid-template-columns: 1fr; } }
.ins-fn { background: #fff; padding: 12px 14px; display: grid; gap: 4px; }
.ins-fn-n { width: 20px; height: 20px; border-radius: 50%; background: #111; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.ins-fn b { font-size: 13px; } .ins-fn-c { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ins-fn-bar { height: 4px; background: #f1f1f2; display: block; } .ins-fn-bar i { display: block; height: 100%; background: #111; }
.ins-fn small { font-size: 10.5px; color: var(--muted); }
.ins-board-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.ins-board { display: grid; grid-template-columns: repeat(5, minmax(270px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.ins-col { background: #fafafa; border: 1px solid var(--line); min-width: 270px; }
.ins-col > header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 12px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; }
.ins-col-no { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; background: #6b6b6b; }
.ins-col.s2 .ins-col-no { background: #2f5bd8; } .ins-col.s3 .ins-col-no { background: #7a4fd8; } .ins-col.s4 .ins-col-no { background: #b8860b; } .ins-col.s5 .ins-col-no { background: #0f8a5f; }
.ins-col > header b { font-size: 13.5px; display: block; } .ins-col > header small { font-size: 10.5px; color: var(--muted); line-height: 1.45; display: block; margin-top: 2px; }
.ins-col-n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ins-col-body { padding: 10px; display: grid; gap: 10px; max-height: 760px; overflow-y: auto; }
.ins-pc { background: #fff; border: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; }
.ins-pc:hover { border-color: #9a9a9f; }
.ins-pc > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ins-pc > header b { font-size: 14px; display: block; } .ins-pc > header small { color: var(--muted); font-size: 11.5px; }
.ins-x { border: none; background: none; color: #b9b9be; cursor: pointer; padding: 2px 4px; } .ins-x:hover { color: #c1462f; }
.ins-pc-own { margin: 0; font-size: 11.5px; color: #444; }
.ins-pc .ins-persp { grid-template-columns: 1fr; margin-top: 0; gap: 6px; }
.ins-pc .ins-m { grid-template-columns: auto 1fr; grid-template-areas: "l v" "d d" "e e"; align-items: baseline; padding: 8px 10px; column-gap: 8px; }
.ins-pc .ins-m-l { grid-area: l; } .ins-pc .ins-m-v { grid-area: v; text-align: right; font-size: 16px; } .ins-pc .ins-m-d { grid-area: d; } .ins-pc .ins-m em { grid-area: e; }
.ins-pc-peak, .ins-pc-flag, .ins-pc-next { margin: 0; font-size: 11.5px; color: #444; line-height: 1.55; }
.ins-pc-peak i, .ins-pc-flag i { color: #9a9a9f; margin-right: 4px; } .ins-pc-flag { color: #0b6b49; } .ins-pc-flag i { color: #0b6b49; }
.ins-pc-memo { margin: 0; font-size: 11.5px; color: #5a4a10; background: #fffbea; padding: 5px 8px; border-left: 3px solid #e6c36a; }
.ins-pc-next { padding-top: 8px; border-top: 1px dashed var(--line); color: #111; font-weight: 700; } .ins-pc-next i { margin-right: 4px; color: var(--point); }
.ins-pc > footer { display: flex; justify-content: space-between; gap: 6px; align-items: center; }

/* 기타 */
.ins-fu { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); margin-bottom: 8px; font-size: 13px; }
.ins-fu small { color: var(--muted); } .ins-fu p { margin: 3px 0 0; font-size: 12.5px; color: #444; } .ins-fu > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
#legacy-analytics { display: none; }
#map-container { height: 420px; background: #f4f4f5; }

/* 플랜 페이지 안에 끼워 넣는(embed) 모드: 머리글·바닥글·제목을 숨긴다 */
.embed .site-header, .embed footer.site-footer, .embed .skip-link, .embed .dash-head, .embed #demo-banner { display: none !important; }
.embed .dash-wrap { padding: 16px 16px 48px; }
.embed .dash-sec { scroll-margin-top: 12px; margin-top: 40px; }
.embed #main { min-height: 0; }

/* B2B 플랜 페이지 미리보기: 전사 대시보드부터 끝까지만 보여준다 (개인 구역 숨김) */
.embed-b2b .dash-top, .embed-b2b #sec-mine, .embed-b2b #sec-analytics { display: none !important; }
.embed-b2b .dash-wrap { padding-top: 12px; }
.embed-b2b #sec-team { margin-top: 0; }
/* B2B 데모 새 창(크게 보기): 개인(PRO) 구역과 해당 메뉴 링크 숨김 */
.demo-b2b .dash-top, .demo-b2b #sec-mine, .demo-b2b #sec-analytics { display: none !important; }

/* ---------- 플랜 하강 경고 (앱에서 정리하기 전까지 대시보드 잠금) ---------- */
.dash-lock { max-width: 44rem; margin: 40px auto; padding: 36px 32px; border: 1px solid #111; background: #fff; text-align: left; }
.dash-lock[hidden] { display: none; }
.dash-lock .dl-icon { width: 52px; height: 52px; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 18px; }
.dash-lock h2 { font-size: clamp(22px, 3.4vw, 28px); }
.dl-lead { margin: 12px 0 0; font-size: 14.5px; color: #444; line-height: 1.75; }
.dl-reasons { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }
.dl-reasons li { border: 1px solid #e6c36a; background: #fffbea; padding: 11px 14px; font-size: 13.5px; line-height: 1.6; }
.dl-steps { margin: 20px 0 0; padding-left: 22px; display: grid; gap: 4px; font-size: 13.5px; color: #333; list-style: decimal; }
.dl-steps li::marker { font-weight: 700; color: #111; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.dl-note { margin: 16px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
body.locked .dash-wrap > :not(#dash-lock) { display: none !important; }

/* ---------- 권한 안내 ---------- */
.ins-perm { border: 1px solid var(--line); background: #fff; margin-bottom: 16px; }
.ins-perm summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.ins-perm summary::-webkit-details-marker { display: none; }
.ins-perm-me { font-weight: 400; font-size: 12px; color: var(--muted); } .ins-perm-me b { background: #111; color: #fff; padding: 1px 8px; margin-left: 4px; }
.ins-perm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px 16px; }
@media (max-width: 900px) { .ins-perm-grid { grid-template-columns: 1fr; } }
.ins-perm-grid > div { border: 1px solid var(--line); padding: 12px 14px; }
.ins-perm-grid > div.own { border-color: #111; } .ins-perm-grid > div.note { background: #fafafa; }
.ins-perm-grid b { font-size: 13px; display: block; margin-bottom: 6px; }
.ins-perm-grid ul { margin: 0; padding-left: 16px; display: grid; gap: 4px; font-size: 12.5px; color: #333; line-height: 1.6; }
.ins-perm[data-role="owner"] .own { background: #f6f8ff; } .ins-perm[data-role="member"] .note { background: #fffbea; border-color: #e6c36a; }
.ins-tiny { font-size: 11px; }

/* 주식 차트식 호버: 세로 가이드선 + 맨 위 값 표시 */
.ins-ch { position: relative; cursor: crosshair; touch-action: pan-y; }
.ins-xh { stroke: #111; stroke-opacity: .4; stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.ins-tip { position: absolute; top: -4px; transform: translateX(-50%); display: none; pointer-events: none; background: #111; color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 3; }
.ins-bar.hot { fill: #2f5bff !important; }

/* ===== 대시보드 왼쪽 메뉴 + 구역 단위 보기 (미리보기 embed 제외) ===== */
.dash-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; align-items: start; }
.dash-content { min-width: 0; }
.dash-side { position: sticky; top: 88px; padding-top: 20px; }
.dash-side-title { font-size: 11px; letter-spacing: .14em; color: var(--muted); margin: 0 0 10px 12px; }
.dash-side .dash-nav { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
.dash-side .dash-nav a { border: 0; border-left: 2px solid transparent; padding: 10px 12px; font-size: 14px; }
.dash-side .dash-nav a:hover { background: #f5f5f7; }
.dash-side .dash-nav a.on { color: #111; font-weight: 700; border-left-color: #111; background: #f5f5f7; }
.dash-tabs .dash-sec.is-first { margin-top: 0; }
.dash-tabs .dash-sec:not(.is-active) { display: none; }
.dash-tabs .dash-head { padding-top: 20px; }
@media (max-width: 860px) {
  .dash-layout { grid-template-columns: 1fr; gap: 0; }
  .dash-side { top: 64px; z-index: 30; margin: 0 -20px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); }
  .dash-side-title { display: none; }
  .dash-side .dash-nav { flex-direction: row; overflow-x: auto; gap: 6px; -webkit-overflow-scrolling: touch; }
  .dash-side .dash-nav a { white-space: nowrap; border: 1px solid var(--line); }
  .dash-side .dash-nav a.on { background: #111; color: #fff; border-color: #111; }
}
/* 플랜 페이지 미리보기(embed)는 기존처럼 이어서 보여 준다 */
.embed .dash-layout { display: block; }
.embed .dash-side { display: none; }
.embed-b2b #sec-overview, .demo-b2b #sec-overview { display: none !important; }
.demo-b2b .dash-nav a[data-group="pro"] { display: none !important; }
/* 한 묶음만 쓸 수 있으면 메뉴 없이 한 화면으로 */
.dash-single .dash-layout { display: block; }
.dash-single .dash-side { display: none; }
