:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #e2e8f0;
  --line-strong: #d4dce7;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff6ff;
  --primary-line: #bfdbfe;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --sidebar-w: 244px;
  --sidebar-w-collapsed: 67px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family:
    "Segoe UI",
    "Malgun Gothic",
    system-ui,
    sans-serif;
  /* 전체 ~90% 느낌: 실제 사이즈 기준 베이스 폰트 축소 (zoom 미사용) */
  font-size: 14.5px;
  background: var(--bg);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: 100%;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  overflow-y: auto;
  padding: 16px 12px 12px;
  color: #334155;
  background: #fff;
  border-right: 1px solid #dbe3ee;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -18px -12px 0;
  padding: 16px 12px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  color: #475569;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
}

/* ── 사이드바 접힘 상태 ───────────────────────────── */
.app-shell.collapsed {
  --sidebar-w: var(--sidebar-w-collapsed);
}

.app-shell.collapsed .brand {
  flex-direction: column;
  gap: 10px;
}

/* 접힘 상태에서는 햄버거를 숨기고 AI Connect 아이콘이 토글 역할 */
.app-shell.collapsed .sidebar-toggle {
  display: none;
}

.app-shell.collapsed .brand > div:not(.brand-mark),
.app-shell.collapsed .nav-section p,
.app-shell.collapsed .nav-item span:not(.nav-icon),
.app-shell.collapsed .nav-item em,
.app-shell.collapsed .sidebar-footer {
  display: none;
}

.app-shell.collapsed .nav-item {
  grid-template-columns: 1fr;
  justify-items: center;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  cursor: pointer;
  background: var(--primary);
  border-radius: 10px;
}

.brand-mark:hover {
  background: var(--primary-strong);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.1;
}

/* 접힘 상태에서 로고에 호버 시 펼침(») 아이콘으로 전환 */
.brand-mark .bm-expand {
  display: none;
}
.app-shell.collapsed .brand-mark:hover .bm-logo {
  display: none;
}
.app-shell.collapsed .brand-mark:hover .bm-expand {
  display: block;
}

/* ── 커스텀 툴팁(검정 배경·흰 글씨, 사이드바 오른쪽에 표시) ───────── */
.ui-tip {
  position: fixed;
  z-index: 1000;
  transform: translateY(-50%);
  padding: 7px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: #111418;
  border-radius: 7px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
}
.ui-tip.show {
  opacity: 1;
  visibility: visible;
}
.ui-tip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 9px;
  height: 9px;
  background: inherit;
  border-radius: 1px;
  transform: translateY(-50%) rotate(45deg);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #0b1220;
  font-size: 20px;
  line-height: 1.15;
}

.brand span,
.nav-section p,
.nav-item em {
  color: #8090a3;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.nav-section {
  display: grid;
  gap: 6px;
}
.nav-section[hidden] {
  display: none !important;
}

.nav-section p {
  margin: 4px 3px 6px;
}

.nav-section p.active-section {
  color: var(--primary);
}

/* ── Connect Service · 접이식 섹션 ─────────────────────────── */
.nav-section-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 4px 0 2px;
  padding: 4px 3px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: #8090a3;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.nav-section-toggle:hover {
  background: var(--surface-soft);
  color: var(--muted-strong);
}
.cs-soon {
  font-size: 9.5px;
  font-weight: 700;
  font-style: normal;
  color: #9aa6b5;
  background: #eef2f7;
  border-radius: 999px;
  padding: 1px 7px;
}
.cs-caret {
  width: 15px;
  height: 15px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s;
}
.nav-section.connect.is-collapsed .cs-caret {
  transform: rotate(-90deg);
}
.connect-items {
  display: grid;
  gap: 6px;
}
.nav-section.connect.is-collapsed .connect-items {
  display: none;
}
/* 사이드바 아이콘(접힘) 모드: Workflow Designer 아이콘만 노출 */
.app-shell.collapsed .nav-section.connect .nav-section-toggle {
  display: none;
}
.app-shell.collapsed .nav-section.connect .connect-items {
  display: grid !important;
}
.app-shell.collapsed .nav-section.connect .connect-items .nav-item.soon {
  display: none;
}

.nav-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  width: 100%;
  padding: 4px 2px;
  color: #334155;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.nav-item span:nth-child(2) {
  overflow: hidden;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-item.sub {
  margin-left: 0;
  width: 100%;
}

.nav-item.active-sub {
  color: var(--primary);
  font-weight: 700;
}

.nav-item.active-sub .nav-icon {
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
}

.nav-item.soon {
  cursor: not-allowed;
  opacity: 0.78;
}

.nav-item.soon span:nth-child(2),
.nav-item.soon em {
  color: #64748b;
}

.nav-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 9px;
}

.nav-item.active .nav-icon {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.sidebar-footer {
  position: relative;
  margin: auto -12px -12px;
  padding: 8px 10px;
  color: #8390a3;
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* 사용자 칩(하단) */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  background: none;
  border: none;
  border-radius: 10px;
  text-align: left;
}
.user-chip:hover {
  background: var(--surface-soft);
}
.user-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: var(--primary);
  border-radius: 9px;
}
.user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
}
.user-caret {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.user-menu {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% + 4px);
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 30;
}
.user-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  background: none;
  border: none;
  border-radius: 7px;
}
.user-menu button:hover {
  background: var(--red-soft);
}
.user-menu button svg {
  width: 16px;
  height: 16px;
}

/* 로그인 게이트 */
.login-gate[hidden] {
  display: none !important; /* display:grid 가 [hidden] 을 덮어쓰지 않도록 */
}
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eaf0fa 0%, #f6f8fc 100%);
}
.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(380px, 100%);
  padding: 40px 32px 30px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.login-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  color: #fff;
  background: var(--primary);
  border-radius: 16px;
}
.login-mark svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.1;
}
.login-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
}
.login-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13.5px;
}
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.login-btn:hover {
  background: var(--surface-soft);
}
.login-btn svg {
  width: 18px;
  height: 18px;
}
.login-hint {
  min-height: 14px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 24px 34px 40px;
}

.topbar,
.panel-header,
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  margin: 0 0 14px;
  padding: 0 13px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  text-transform: none;
  background: var(--primary-soft);
  border-radius: 4px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 25px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.25;
}

.panel-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.topbar-actions,
.form-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: #fff;
  font-weight: 700;
  background: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.primary-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.primary-button:hover {
  background: var(--primary-strong);
}

/* 비활성(필수 미입력 등): 회색톤 */
.primary-button:disabled,
.primary-button:disabled:hover {
  color: #f1f5f9;
  background: #cbd5e1;
  border-color: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}

.ghost-button {
  padding: 0 14px;
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
}

.icon-button {
  display: grid;
  width: 40px;
  place-items: center;
  color: #475569;
  background: var(--surface);
  border: 1px solid var(--line);
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(190px, 1.4fr);
  gap: 12px;
  margin: 0 0 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.toolbar > * {
  min-width: 0;
}

.view {
  display: none;
}

.view.active-view {
  display: block;
}

.is-hidden {
  display: none !important;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input,
textarea {
  min-width: 0;
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--primary-line);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.search-box {
  display: flex;
  align-items: end;
  position: relative;
}

.search-box span {
  position: absolute;
  left: 13px;
  bottom: 11px;
  color: var(--muted);
}

.search-box input {
  padding-left: 36px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0 34px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.metric-card {
  display: grid;
  min-height: 132px;
  gap: 6px;
  padding: 22px 22px;
}

.metric-card:first-child {
  background: var(--primary-soft);
  border-color: var(--primary-line);
}

.metric-card span,
.metric-card em {
  color: #748196;
  font-size: 14px;
  font-style: normal;
}

.metric-card span {
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 800;
}

.metric-card strong {
  color: #111827;
  font-size: 34px;
  line-height: 1;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
}

.panel {
  min-width: 0;
  padding: 24px;
}

.matrix-scroll,
.project-table-wrap {
  overflow: auto;
  margin: 22px -24px -24px;
}

.matrix-scroll {
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
  white-space: nowrap;
}

th {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  background: #fbfcfe;
}

.matrix-table th:not(:first-child),
.matrix-table td:not(:first-child) {
  text-align: center;
}

.matrix-table th,
.matrix-table td {
  border-right: 1px solid #eef2f7;
}

.matrix-table th:last-child,
.matrix-table td:last-child {
  border-right: 0;
}

.matrix-table thead th {
  padding: 13px 14px;
  font-size: 13px;
  text-align: center;
}

.matrix-table thead th:first-child {
  min-width: 190px;
  text-align: left;
}

.matrix-table tbody th {
  padding: 11px 16px;
  background: #fbfcfe;
}

.matrix-table tbody td {
  min-width: 72px;
  padding: 0;
  background: #fff;
}

.process-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #111827;
  font-weight: 800;
}

.process-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 8px;
}

.process-icon svg {
  width: 18px;
  height: 18px;
}

.matrix-cell {
  display: grid;
  min-width: 100%;
  min-height: 50px;
  place-items: center;
  color: #cbd5e1;
  font-weight: 800;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.matrix-cell.has-value {
  color: var(--primary);
  background: #e8f2ff;
}

.matrix-cell.is-empty {
  cursor: default;
}

.matrix-cell:hover,
.matrix-cell.selected {
  color: #fff;
  background: var(--primary);
}

.matrix-table td.total-cell {
  background: #edf0f5;
  font-weight: 900;
  color: var(--muted-strong);
}

.matrix-table tfoot th,
.matrix-table tfoot td {
  padding: 14px 16px;
  background: #edf0f5;
  font-weight: 900;
}

.matrix-table tfoot td:last-child,
.matrix-table td.total-cell.grand {
  background: #dde3ec;
  color: var(--ink);
}

.side-panel {
  align-self: start;
}

.stage-bars {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.stage-row {
  display: grid;
  gap: 7px;
}

.stage-row div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  background: #e8edf4;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  background: var(--primary);
}

.list-panel {
  margin-top: 0;
}

/* ── 목록 + 슬라이드 상세 분할 뷰 ───────────────────────── */
.list-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0fr;
  gap: 0;
  align-items: start;
  transition:
    grid-template-columns 0.32s ease,
    gap 0.32s ease;
}

.list-split.detail-open {
  grid-template-columns: minmax(360px, 450px) minmax(0, 1fr);
  gap: 20px;
}

/* 상세 패널: 닫힘 시 0폭으로 접힘, 열림 시 우측에서 펼쳐짐 */
.detail-panel {
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  /* 닫힘: padding/border 제거로 0px까지 접힘 (목록이 우측 끝까지 차도록) */
  padding: 0;
  border-width: 0;
  transition: opacity 0.2s ease;
}

.list-split.detail-open .detail-panel {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100vh - 40px);
  padding: 0; /* 내부 영역이 패딩 담당 */
  border-width: 1px;
  overflow: hidden; /* 패널 자체는 스크롤 안 함 (내부 detail-scroll만 스크롤) */
  opacity: 1;
  display: flex;
  flex-direction: column;
}

/* 고정 타이틀 바: 패널 padding 0 이므로 음수마진 불필요 */
.detail-panel .detail-titlebar {
  flex: none;
  margin: 0;
  border-radius: 0;
}
/* 스크롤 영역: 타이틀과 푸터 사이 내부 상세내용만 스크롤 */
.detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
}
/* 하단 고정 버튼 영역 */
.detail-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 13px 24px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.detail-footer .ds-approve-actions {
  margin-left: auto;
}
.detail-footer.is-empty {
  display: none;
}

/* 상세 열림 시 목록은 '프로젝트명'만 노출 */
.list-split.detail-open .list-actions,
.list-split.detail-open .file-status {
  display: none;
}

.list-split.detail-open .project-table th:not(:first-child),
.list-split.detail-open .project-table td:not(:first-child) {
  display: none;
}

.project-table tbody tr.is-selected {
  background: var(--primary-soft);
}

.project-table tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--primary);
}

.file-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.file-status:empty {
  display: none;
}

.file-status.is-error {
  color: var(--amber);
}

#excelBtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#excelBtn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.danger-action {
  color: var(--red);
  background: var(--red-soft);
  border-color: #fecaca;
}

.segmented-control {
  display: flex;
  padding: 4px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 13px;
  color: var(--muted);
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.segmented-control button.active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
}

.project-table tbody tr {
  cursor: pointer;
}

.project-table tbody tr:hover {
  background: #f8fbff;
}

/* AI Project 목록: 고정 레이아웃 + 말줄임(가로 스크롤 방지, 1366px 대응) */
.project-table {
  table-layout: fixed;
}

.project-table th,
.project-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-table th:nth-child(1),
.project-table td:nth-child(1) {
  width: 27%;
}
.project-table th:nth-child(2),
.project-table td:nth-child(2) {
  width: 12%;
}
.project-table th:nth-child(3),
.project-table td:nth-child(3) {
  width: 9%;
}
.project-table th:nth-child(4),
.project-table td:nth-child(4) {
  width: 14%;
}
.project-table th:nth-child(5),
.project-table td:nth-child(5) {
  width: 9%;
}
.project-table th:nth-child(6),
.project-table td:nth-child(6) {
  width: 8%;
}
.project-table th:nth-child(7),
.project-table td:nth-child(7) {
  width: 10%;
}
.project-table th:nth-child(8),
.project-table td:nth-child(8) {
  width: 11%;
}

.pj-title {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pj-desc {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 상세 열림(좁은 목록): 과제명만 → 첫 열이 전체 폭 차지(고정 레이아웃 유지해 말줄임) */
.list-split.detail-open .project-table th:first-child,
.list-split.detail-open .project-table td:first-child {
  width: 100%;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  background: var(--primary-soft);
  border-radius: 7px;
}

.badge.warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.badge.success {
  color: var(--green);
  background: var(--green-soft);
}

.badge.danger {
  color: var(--red);
  background: var(--red-soft);
}

.badge.info {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.project-dialog {
  width: min(900px, calc(100vw - 32px));
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.project-dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

/* 상세 패널: 파란 타이틀 바 (테두리 없는 X) */
.detail-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -24px -24px 16px;
  padding: 12px 14px 12px 18px;
  color: #fff;
  background: var(--primary);
  border-radius: 17px 17px 0 0;
}
.detail-titlebar-text {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.detail-x {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  font-size: 21px;
  line-height: 1;
  background: none;
  border: none;
  border-radius: 6px;
  opacity: 0.9;
}
.detail-x:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
}

/* 상세 헤더: Agent명 · 설명 · 기본정보(텍스트) */
.detail-head {
  margin-bottom: 16px;
}
.detail-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-name-row h2 {
  margin: 0;
  font-size: 19px;
}
.detail-desc {
  margin: 9px 0 0;
  color: var(--muted-strong);
  font-size: 13.5px;
  line-height: 1.55;
}
.detail-basic {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 18px;
  margin-top: 14px;
}
.detail-basic .db {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.detail-basic .db i {
  margin-right: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}
/* 기본정보 수정: 작게 + 메가프로세스 라인 오른쪽 끝 */
.detail-edit-basic {
  margin-left: auto;
  min-height: 26px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 700;
}

/* ── 설계 탭 폼 + 단계 플레이스홀더 ───────────────────────── */
.primary-button.sm,
.ghost-button.sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}
#detailBody [hidden] {
  display: none !important;
}
.reg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.reg-grid > .wide {
  grid-column: 1 / -1;
}
.reg-grid label > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.reg-grid .req {
  color: var(--red);
  font-style: normal;
  font-weight: 800;
}
.reg-grid small {
  color: var(--muted);
  font-weight: 600;
}
.reg-grid input[readonly] {
  color: var(--muted-strong);
  background: var(--surface-soft);
  cursor: default;
}
.suffixed {
  display: flex;
  align-items: center;
  gap: 8px;
}
.suffixed input {
  flex: 1;
}
.suffixed i {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.cycle-row {
  display: flex;
  gap: 10px;
}
.cycle-row select,
.cycle-row .suffixed {
  flex: 1;
}
.reg-wf-field,
.reg-part-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reg-wf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.reg-wf-head > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.reg-wf-actions {
  display: flex;
  gap: 8px;
}
.reg-wf-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}
.wf-arrow {
  color: var(--muted);
  font-weight: 800;
}
.wf-node.wf-sm {
  width: auto;
  min-width: 120px;
  padding: 7px 11px;
}
.reg-part-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reg-part-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto;
  gap: 10px;
  align-items: center;
}
/* 문서첨부(다중) */
.ds-file-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.ds-file-input {
  display: none;
}
.reg-attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reg-attach-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.reg-attach-row .att-icon {
  flex: none;
  font-size: 14px;
  line-height: 1;
}
.reg-attach-row .att-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.reg-attach-row .att-del {
  flex: none;
  width: 26px;
  height: 26px;
  min-height: 26px;
  font-size: 16px;
}
.reg-approve-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.reg-approve-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}
.reg-hint {
  color: var(--muted);
  font-weight: 600;
}
.ds-approve-actions {
  display: flex;
  gap: 8px;
}
.ea-badge {
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
}
.ea-badge.wait {
  color: var(--amber);
  background: var(--amber-soft);
}
.ea-badge.ok {
  color: var(--green);
  background: var(--green-soft);
}
.ea-doc-id {
  color: var(--muted-strong);
  font-weight: 600;
}
.ea-doc-id b {
  color: var(--ink);
}
.reg-placeholder {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 32px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

/* 워크플로우 작화 팝업 */
.wf-dialog .form-footer {
  justify-content: flex-start;
}
.wf-dialog-hint {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.wf-dialog-body {
  display: grid;
  grid-template-columns: 188px 1fr;
  gap: 14px;
  height: 380px;
}
.wf-dlg-pal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  overflow-y: auto;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.wf-dlg-canvas-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.wf-dlg-canvas {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 10px;
  min-height: 100%;
  padding: 16px;
}
.wf-dlg-canvas.drag-over {
  background: var(--primary-soft);
  outline: 2px dashed var(--primary-line);
  outline-offset: -6px;
}
.wf-dlg-empty {
  margin: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* 전자결재 팝업 */
.ea-hint {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.ea-doc {
  max-height: 420px;
  overflow-y: auto;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ea-doc h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.ea-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ea-table th,
.ea-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--line);
}
.ea-table th {
  width: 180px;
  color: var(--muted-strong);
  font-weight: 700;
  background: #fff;
}

.meta-pill {
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* 단계 탭: 심플 밑줄형 */
.lifecycle-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none; /* Firefox: 스크롤바 숨김 */
  -ms-overflow-style: none; /* IE/legacy Edge */
}
.lifecycle-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Edge/Safari: 스크롤바 숨김 */
}

.lifecycle-tabs button {
  flex: none;
  min-width: 84px;
  padding: 10px 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.lifecycle-tabs button.done {
  color: var(--muted-strong);
}

.lifecycle-tabs button.current {
  color: var(--primary-strong);
  border-bottom-color: var(--primary);
}

.lifecycle-tabs button.locked {
  color: #c2cad6;
  cursor: not-allowed;
}

.lifecycle-tabs button:hover:not(.locked):not(.current) {
  color: var(--ink);
}

.detail-body {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.catalog-search {
  width: min(280px, 100%);
}

.catalog-search input {
  padding-left: 36px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

/* Data Service — 외부 화면 연동 전 플레이스홀더 */
.ds-placeholder {
  margin-top: 22px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border: 1.5px dashed #d9d2c7;
  border-radius: 14px;
  background: #fbf9f5;
  color: #8c857a;
  padding: 40px 24px;
}
.ds-placeholder .ds-ph-icon svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: #b9b1a4;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ds-placeholder strong {
  font-size: 16px;
  font-weight: 700;
  color: #5f594f;
}
.ds-placeholder span:last-child {
  font-size: 13px;
  max-width: 360px;
  line-height: 1.5;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-icon,
.service-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 10px;
}

.service-avatar {
  font-size: 17px;
  font-weight: 800;
}

.service-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.service-desc {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.service-actions .primary-button,
.service-actions .ghost-button {
  min-height: 36px;
  text-decoration: none;
}

.service-tag {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.drilldown-dialog {
  width: min(720px, calc(100vw - 32px));
}

.drilldown-table-wrap {
  overflow: auto;
  margin: 14px -24px -24px;
  border-top: 1px solid var(--line);
}

.drilldown-table tbody tr {
  cursor: pointer;
}

.register-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.register-form label span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.register-form .req {
  color: var(--red);
  font-style: normal;
  font-weight: 800;
}

.register-form .auto-tag {
  padding: 1px 7px;
  color: var(--muted-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.register-form small {
  color: var(--muted);
  font-weight: 600;
}

.register-form input[readonly] {
  color: var(--muted-strong);
  background: var(--surface-soft);
  cursor: default;
}

.register-form input[type="file"] {
  padding: 9px 12px;
}

.register-form .wide,
.form-footer {
  grid-column: 1 / -1;
}

.form-footer {
  justify-content: end;
  padding-top: 4px;
}

/* ════ AI Agent 등록 모달 ══════════════════════════════════ */
.agent-register-dialog {
  width: min(680px, calc(100vw - 32px));
}
.ar-hint {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.ar-footer {
  margin-top: 4px;
}

/* 사용자 검색(담당자 등) 입력 + 버튼 */
.user-pick {
  display: flex;
  gap: 8px;
}
.user-pick input {
  flex: 1;
}
.user-pick-btn {
  white-space: nowrap;
}
.footer-spacer {
  flex: 1;
}

/* 사용자 검색 팝업 */
.user-picker-dialog {
  width: min(460px, calc(100vw - 32px));
}
.up-search {
  margin: 6px 0 12px;
}
.up-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}
.up-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.up-item:hover {
  background: var(--primary-soft);
  border-color: var(--primary-line);
}
.up-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
}
.up-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 999px;
  padding: 1px 8px;
}
.up-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.up-stat {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 2px 6px;
}
.reg-wf-empty {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ── 사이드바 하위 메뉴(평가) 들여쓰기 ──────────────── */
.nav-item.nav-child {
  padding-left: 16px;
}

.app-shell.collapsed .nav-item.nav-child {
  padding-left: 2px;
}

/* ── 평가(산포도) 뷰 ──────────────────────────────── */
#evalView.active-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  gap: 12px;
}

.eval-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.eval-head h2 {
  margin: 0;
}

.eval-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.eval-year {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eval-year span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.eval-year select {
  width: auto;
  min-height: 38px;
  padding: 0 12px;
}

.eval-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.eval-litem {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.eval-litem .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.eval-litem.dim {
  opacity: 0.3;
}

.eval-main {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.eval-chart {
  position: relative;
  flex: 1;
  min-width: 0;
}

.eval-chart canvas {
  display: block;
}

.eval-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* hidden 속성이 있으면 확실히 숨김 (display:grid 가 hidden 을 덮어쓰는 문제 방지) */
.eval-empty[hidden] {
  display: none;
}

.eval-side {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 300px;
  min-height: 0;
  background: var(--surface-soft);
  border-left: 1px solid var(--line);
}

.eval-side-head {
  flex-shrink: 0;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.eval-side-title {
  font-size: 13px;
  font-weight: 700;
}

.eval-side-count {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

.eval-filter {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.eval-fbtn {
  flex: 1;
  min-height: 30px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.eval-fbtn.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.eval-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.eval-group-h {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--surface-soft);
}

.eval-group-h .bar {
  width: 3px;
  height: 11px;
  border-radius: 2px;
}

.eval-group-h .cnt {
  margin-left: auto;
  color: #bbb;
  font-weight: 600;
}

.eval-pitem {
  display: flex;
  gap: 9px;
  padding: 7px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}

.eval-pitem:hover {
  background: #f2efe9;
}

.eval-pitem.selected {
  padding-left: 11px;
  background: #fff8e6;
  border-left: 3px solid var(--amber);
}

.eval-pdot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
}

.eval-ptask {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.eval-pmeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.eval-tier {
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
}

.eval-tier.t1 {
  color: #5b45cc;
  background: #ede9fc;
}

.eval-tier.t2 {
  color: #1862a8;
  background: #e3f0fd;
}

.eval-tier.t3 {
  color: #666;
  background: #eee;
}

.eval-tooltip {
  position: fixed;
  z-index: 200;
  display: none;
  max-width: 250px;
  padding: 10px 13px;
  color: #f0f0f0;
  font-size: 12px;
  line-height: 1.55;
  background: #1c1c1e;
  border-radius: 8px;
  pointer-events: none;
}

.eval-tooltip .c {
  margin-bottom: 2px;
  font-weight: 700;
}

.eval-tooltip .t {
  margin-bottom: 5px;
  color: #e8e8e8;
  line-height: 1.4;
}

.eval-tooltip .r {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 3px;
  padding-top: 5px;
  color: #aaa;
  border-top: 1px solid #333;
}

.eval-tooltip .v {
  color: #fff;
}

/* ── AAO (L1~L4 탐색) ──────────────────────────────── */
#workflowView.active-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  gap: 12px;
}

/* AAO: L1~L3는 고정(8행), 워크플로우는 가변. 너무 짧으면 페이지 세로 스크롤 */
#aaoView.active-view {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 12px;
}

.aao-head h2,
.wf-head h2 {
  margin: 0;
}

.aao-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.aao-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 14px;
  flex: 0 0 auto; /* L1 8개 행 높이로 고정 (늘어나지 않음) */
  height: 498px;
  min-height: 0;
}

.aao-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.aao-col-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 11px 14px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.aao-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
}

.aao-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
}

.aao-item:hover {
  background: var(--surface-soft);
}

.aao-item.selected {
  background: var(--primary-soft);
  border-color: var(--primary-line);
}

.aao-item .ai {
  display: grid;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 8px;
}

.aao-item .ai svg {
  width: 18px;
  height: 18px;
}

.aao-item .it {
  min-width: 0;
  flex: 1;
}

.aao-item .nm {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aao-item .sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.aao-item .cnt {
  flex-shrink: 0;
  padding: 1px 8px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.aao-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
}

/* AAO 하단: 워크플로우(L1~L2 폭) + AI Project(L3 폭). 가변 높이 */
.aao-bottom {
  display: grid;
  /* 상단 aao-body 와 동일한 3칸 그리드 → 라인 정확히 정렬 */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 14px;
  flex: 1 1 auto; /* 남는 높이를 모두 차지 (가변) */
  min-height: 240px; /* 이보다 좁아지면 페이지 세로 스크롤 */
}

.aao-flow {
  grid-column: 1 / 3; /* L1 + L2 영역 (오른쪽 라인 = L2 오른쪽 라인) */
}

.aao-proj {
  grid-column: 3 / 4; /* L3 영역 (시작점 = L3 시작점) */
}

.aao-flow,
.aao-proj {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.aao-proj-cnt {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 700;
}

.aao-proj-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
}

/* AI 사원 프로필 카드 */
.aiemp-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 8px;
}
.aiemp-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.aiemp-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  background: var(--primary);
  border-radius: 12px;
}
.aiemp-id {
  min-width: 0;
}
.aiemp-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}
.aiemp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}
.aiemp-no {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}
.aiemp-fields {
  margin: 0;
}
.aiemp-fields > div {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 10px;
  padding: 9px 4px;
  border-top: 1px solid var(--line);
}
.aiemp-fields dt {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}
.aiemp-fields dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.aao-proj-item {
  padding: 8px 10px;
  border-radius: 9px;
}

.aao-proj-item:hover {
  background: var(--surface-soft);
}

.pr-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pr-co {
  flex-shrink: 0;
  padding: 1px 6px;
  color: var(--muted-strong);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.pr-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pr-top .badge {
  flex-shrink: 0;
}

.pr-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.pr-lv {
  flex-shrink: 0;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
}

.pr-lv-L3 {
  color: #5b45cc;
  background: #ede9fc;
}

.pr-lv-L4 {
  color: #1862a8;
  background: #e3f0fd;
}

.pr-res {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aao-flow-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

/* 프로세스 맵 노드 + 화살표 (AAO flow / WF canvas 공용) */
.flow-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.flow-node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 124px;
  max-width: 168px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.flow-node .cat {
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.flow-node .nm {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

.flow-arrow {
  flex-shrink: 0;
  width: 26px;
  text-align: center;
  color: var(--line-strong);
  font-size: 18px;
}

.aao-flow-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ── Agent Workflow (작화) ─────────────────────── */
.wf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.wf-emp {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wf-emp span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.wf-emp select {
  width: auto;
  min-width: 220px;
  min-height: 38px;
  padding: 0 12px;
}

.wf-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.wf-desc {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.wf-desc span {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.wf-desc input {
  min-height: 38px;
}

/* Workflow Designer — 상단 액션 바 */
.wf-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.wf-name-field {
  flex: 0 1 340px;
  display: flex;
}
.wf-name-field input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
}
.wf-cur {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.wf-cur.editing {
  color: var(--primary);
}
.wf-cur.saved {
  color: #16a34a;
}

/* Workflow Designer — 불러오기(라이브러리) 모달 */
.wf-library-dialog {
  width: min(560px, 94vw);
}
.wf-lib-search {
  margin: 4px 2px 12px;
}
.wf-lib-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
}
.wf-lib-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.wf-lib-main {
  flex: 1;
  min-width: 0;
}
.wf-lib-name {
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-lib-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.wf-lib-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.wf-subcat {
  padding: 5px 6px 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.wf-agent {
  border-left-width: 3px;
}

.wf-pal-trigger {
  border-left-color: #16a34a;
}
.wf-pal-human {
  border-left-color: #d97706;
}
.wf-pal-system {
  border-left-color: var(--primary);
}
.wf-pal-condition {
  border-left-color: #a855f7;
}
.wf-pal-tool {
  border-left-color: var(--primary);
}
.wf-pal-task {
  border-left-color: var(--line-strong);
}

.wf-body {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.wf-palette,
.wf-canvas-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.wf-search {
  flex-shrink: 0;
  margin: 8px;
}

.wf-search input {
  padding-left: 34px;
}

.wf-palette-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 8px;
}

.wf-cat-h {
  position: sticky;
  top: 0;
  padding: 7px 6px 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fff;
}

.wf-agent {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  padding: 8px 10px;
  cursor: grab;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.wf-agent:hover {
  border-color: var(--primary-line);
}

.wf-agent:active {
  cursor: grabbing;
}

.wf-agent .nm {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.wf-agent .role {
  color: var(--muted);
  font-size: 11px;
}

.wf-hint {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.wf-clear {
  margin-left: auto;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.wf-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background:
    radial-gradient(circle, var(--line) 1px, transparent 1px) 0 0 / 20px 20px;
}

/* 캔버스 플로우 (세로 + 조건 분기) */
.wf-flow {
  display: flex;
  justify-content: center;
  min-width: 100%;
  padding: 6px 0 24px;
}

.wf-lane {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wf-conn {
  width: 2px;
  height: 16px;
  background: var(--line-strong);
}

.wf-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 200px;
  padding: 9px 12px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-left-width: 4px;
  border-radius: 10px;
}

.wf-type-tag {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.wf-label {
  min-height: 17px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  outline: none;
}

.wf-label:focus {
  box-shadow: 0 1.5px 0 var(--primary);
}

.wf-node.wf-type-trigger {
  background: #f0fdf4;
  border-color: #16a34a;
}
.wf-node.wf-type-trigger .wf-type-tag {
  color: #15803d;
}
.wf-node.wf-type-human {
  background: #fffbeb;
  border-color: #d97706;
}
.wf-node.wf-type-human .wf-type-tag {
  color: #b45309;
}
.wf-node.wf-type-system {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.wf-node.wf-type-system .wf-type-tag {
  color: var(--primary-strong);
}
.wf-node.wf-type-tool {
  background: var(--primary-soft);
  border-color: var(--primary-line);
  border-left-color: var(--primary);
}
.wf-node.wf-type-tool .wf-type-tag {
  color: var(--primary);
}
.wf-node.wf-type-task {
  background: #fff;
  border-left-color: var(--muted);
}

/* 조건 분기 (마름모) */
.wf-condwrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wf-cond {
  position: relative;
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
}

.wf-cond-box {
  position: absolute;
  inset: 16px;
  background: #faf5ff;
  border: 1.5px solid #a855f7;
  border-radius: 8px;
  transform: rotate(45deg);
}

.wf-cond .wf-label {
  position: relative;
  max-width: 88px;
  color: #7c3aed;
  text-align: center;
}

.wf-branches {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.wf-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wf-branch-h {
  margin-bottom: 6px;
  padding: 1px 11px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
}

.wf-branch-h.yes {
  color: #16a34a;
  background: #dcfce7;
}

.wf-branch-h.no {
  color: #dc2626;
  background: #fee2e2;
}

/* 노드 삭제 버튼 */
.del {
  position: absolute;
  top: -8px;
  right: -8px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  background: var(--red);
  border: 0;
  border-radius: 50%;
}

.wf-node:hover .del,
.wf-cond:hover .del {
  display: inline-flex;
}

.wf-cond .del {
  top: 10px;
  right: 10px;
}

/* 드롭 존 */
.wf-drop {
  display: grid;
  place-items: center;
  min-width: 150px;
  min-height: 40px;
  color: var(--muted);
  font-size: 11.5px;
  background: transparent;
  border: 1.5px dashed var(--line-strong);
  border-radius: 9px;
}

.wf-drop.over {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* ── 대시보드 (AI Project 현황 + AAO 현황) ───────────────── */
.dash-sec {
  margin-bottom: 30px;
}

.dash-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.dash-h h2 {
  margin: 0;
  font-size: 18px;
}

.dash-h h3 {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
}

.dash-sub {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.dash-year {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.dash-filter {
  display: inline-flex;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 999px;
}

.dash-chip span {
  color: var(--muted-strong);
  font-weight: 800;
}

.dash-chip:hover {
  background: #e3edfd;
}

.dash-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.dash-chart {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.dc-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 13px 16px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.dc-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.dc-body {
  position: relative;
  height: 232px;
  padding: 12px;
}

.dash-year span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dash-year select {
  width: auto;
  min-height: 36px;
  padding: 0 12px;
}

.dash-effect {
  display: flex;
  align-items: stretch;
  margin-top: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.de-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px 26px;
  background: linear-gradient(90deg, #ecfdf5, #ffffff 70%);
}

.de-main span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #047857;
  font-size: 15px;
  font-weight: 800;
}

.de-main span em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.de-main strong {
  color: #065f46;
  font-size: 34px;
  line-height: 1;
}

.de-sub {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 190px;
  padding: 22px 26px;
  border-left: 1px solid var(--line);
}

.de-sub span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.de-sub strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.dash-aao {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.metric-card-aao {
  background: var(--primary-soft);
  border-color: var(--primary-line);
}

.dash-matrix {
  padding: 0;
  overflow: hidden;
}

.dash-matrix .panel-header {
  padding: 14px 18px;
}

.dash-matrix .matrix-scroll {
  margin: 0;
  border-top: 1px solid var(--line);
}

.mx-cell {
  display: inline-grid;
  min-width: 30px;
  place-items: center;
  padding: 4px 8px;
  color: #cbd5e1;
  font-weight: 800;
}

.mx-cell.has {
  color: var(--primary);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.mx-cell.has:hover {
  color: #fff;
  background: var(--primary);
}

/* AAO 셀 클릭 → 과제 리스트 팝업 */
.aao-cell-dialog {
  width: min(560px, calc(100vw - 32px));
}

.aao-cell-list {
  margin-top: 14px;
  max-height: min(60vh, 460px);
  overflow-y: auto;
}

.aao-cell-item {
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}

.aci-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aci-top .pr-title {
  flex: 1;
}

.aci-top .badge {
  flex-shrink: 0;
}

.aci-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

@media (max-width: 1100px) {
  /* 사이드바는 JS가 .collapsed 강제 적용(접힘 상태) — 별도 축소 규칙 불필요 */
  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar .search-box {
    grid-column: 1 / -1;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-direction: row;
    height: auto;
    overflow-x: auto;
    padding: 12px;
  }

  .brand,
  .nav-section.muted {
    display: none;
  }

  .nav-section {
    display: flex;
  }

  .workspace {
    padding: 22px 14px 32px;
  }

  .topbar,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar,
  .summary-grid,
  .content-grid,
  .register-form,
  .lifecycle-tabs {
    grid-template-columns: 1fr;
  }
}

/* ── 사용자 관리(권한관리) ───────────────────────────────── */
.users-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.users-head h2 {
  margin: 0;
  font-size: 1.18rem;
  color: var(--ink);
}
.users-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.users-search {
  min-width: 280px;
}
.users-summary {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.users-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: auto;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.users-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-weight: 600;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.users-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.users-table tbody tr:last-child td {
  border-bottom: none;
}
.users-table tbody tr:hover {
  background: var(--surface-soft);
}
.users-table .u-name {
  font-weight: 600;
}
.users-table .u-date {
  color: var(--muted);
  white-space: nowrap;
}
.users-table .me-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 999px;
}
.role-select {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
}
.role-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.role-select:disabled {
  opacity: 0.5;
  cursor: progress;
}
.users-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 14px;
}

/* ── Agent Workflow · React Flow 캔버스 ───────────────────── */
.wf-rf-root {
  height: calc(100vh - 230px);
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wf-rf-loading,
.wf-rf-error {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.6;
}
.wf-rf-error {
  color: var(--red);
}
.wf-rf-error small {
  color: var(--muted);
  font-weight: 500;
}
.rf-editor {
  display: flex;
  height: 100%;
}
.rf-palette {
  width: 232px;
  flex: 0 0 232px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 14px 12px;
  overflow-y: auto;
}
.rf-palette-h {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.rf-palette-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 12px;
}
.rf-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-strong);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 12px 0 6px;
}
.rf-pal-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  cursor: grab;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.rf-pal-item:hover {
  border-color: var(--primary-line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.rf-pal-item:active {
  cursor: grabbing;
}
.rf-pal-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}
.rf-pal-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.rf-canvas {
  flex: 1;
  position: relative;
  min-width: 0;
  background: #fff; /* 도트 배경 제거 → 단색 */
}
.react-flow {
  background: #fff;
}
/* 노드 유형별 좌측 색상 — 팔레트와 캔버스 노드 동일.
   (.rf-node/.rf-pal-item 의 border 단축속성보다 우선하도록 복합선택자로 특이도 ↑) */
.rf-pal-item.rf-trigger,
.rf-node.rf-trigger {
  border-left-color: #16a34a;
}
.rf-pal-item.rf-human,
.rf-node.rf-human {
  border-left-color: #d97706;
}
.rf-pal-item.rf-system,
.rf-node.rf-system {
  border-left-color: #2563eb;
}
.rf-pal-item.rf-tool,
.rf-node.rf-tool {
  border-left-color: #8b5cf6;
}
.rf-pal-item.rf-task,
.rf-node.rf-task {
  border-left-color: #64748b;
}
.rf-pal-item.rf-condition,
.rf-node.rf-condition {
  border-left-color: #db2777;
}
/* 캔버스 노드 (컴팩트) */
.rf-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 150px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-left-width: 4px; /* 색은 .rf-node.rf-{kind} 에서 지정(팔레트와 동일) */
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
}
.rf-node-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}
.rf-node-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.rf-node.rf-condition {
  background: #fdf2f8;
}
/* 조건 분기 Yes/No 텍스트 (하단 핸들 옆, 클릭 편집) */
.rf-branch {
  position: absolute;
  bottom: -16px;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 800;
  color: var(--muted-strong);
  background: #fff;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: text;
  z-index: 6;
}
.rf-branch:hover {
  color: var(--primary-strong);
  border-color: var(--primary-line);
}
.rf-branch-yes {
  left: 28%;
}
.rf-branch-no {
  left: 72%;
}
/* 방향 드롭 가이드(+) — 노드 호버 또는 팔레트 드래그 중 표시 */
.rf-guide {
  position: absolute;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s, background 0.12s, border-color 0.12s;
  z-index: 5;
}
.rf-node:hover .rf-guide,
body.rf-dragging .rf-guide {
  opacity: 0.65;
  pointer-events: auto;
}
.rf-guide.over {
  opacity: 1;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-color: var(--primary);
  border-style: solid;
}
.rf-guide-r {
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
}
.rf-guide-b {
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
}
.rf-guide-l {
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
}
/* 조건 노드 Yes/No 분기 가이드 */
.rf-guide-yes {
  bottom: -30px;
  left: 28%;
  transform: translateX(-50%);
}
.rf-guide-no {
  bottom: -30px;
  left: 72%;
  transform: translateX(-50%);
}
.react-flow__handle {
  width: 9px;
  height: 9px;
  background: var(--primary);
  border: 2px solid #fff;
}
.react-flow__edge-text {
  font-size: 11px;
  font-weight: 700;
}

/* ── 업무 워크플로우 작화 팝업 (React Flow 편집기) ───────────── */
.ds-wf-dialog {
  width: min(1200px, calc(100vw - 32px));
}
.ds-wf-rf {
  height: 56vh;
  min-height: 420px;
  max-height: 620px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.ds-wf-rf .rf-editor {
  height: 100%;
}

/* ── 업무 워크플로우 미리보기 · 분기 흐름 ───────────────────── */
.reg-wf-preview {
  overflow-x: auto;
}
.pv-seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pv-branches {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
}
.pv-branch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pv-blabel {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted-strong);
  white-space: nowrap;
}
.pv-blabel.pv-yes {
  color: #15803d;
  background: var(--green-soft);
  border-color: #bbf7d0;
}
.pv-blabel.pv-no {
  color: #b91c1c;
  background: var(--red-soft);
  border-color: #fecaca;
}
.pv-end {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.pv-merge {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-strong);
  padding: 5px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fff;
  white-space: nowrap;
}
.pv-orphans {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.pv-orphan-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}

/* ── 구축 단계 (진행사항 게시판) ─────────────────────────── */
.bd-tab {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bd-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bd-progress {
  flex: 1;
}
.bd-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-strong);
  margin-bottom: 6px;
}
.bd-progress-top b {
  font-size: 18px;
  color: var(--primary-strong);
}
.bd-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.bd-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  border-radius: 999px;
  transition: width 0.25s ease;
}
.bd-writer {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bd-writer-h {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.bd-status-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
/* 진행중/진행완료 세그먼트 토글 */
.bd-toggle {
  display: inline-flex;
  padding: 3px;
  background: #eef2f7;
  border-radius: 999px;
}
.bd-toggle-btn {
  border: none;
  background: transparent;
  padding: 5px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-strong);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.bd-toggle-btn.active {
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}
.bd-toggle-btn:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}
.bd-toggle-btn:not(.active):not(:disabled):hover {
  color: var(--ink);
}
.bd-prate {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-strong);
}
.bd-prate input {
  width: 64px;
  margin: 0 4px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  text-align: right;
}
.bd-writer textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}
.bd-writer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.bd-completion {
  border: 1px solid var(--primary-line);
  border-radius: 10px;
  padding: 12px;
  background: var(--primary-soft);
}
.bd-completion-h {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-strong);
  margin-bottom: 10px;
}
.bd-completion-h small {
  font-weight: 500;
  color: var(--muted-strong);
}
.bd-logs-h {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.bd-cnt {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  margin-left: 4px;
  font-size: 11px;
  text-align: center;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 999px;
}
.bd-logs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bd-log {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.bd-log.is-complete {
  border-color: var(--green-soft);
  background: #f6fef9;
}
.bd-log-main {
  flex: 1;
  min-width: 0;
}
.bd-log-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.bd-log-status {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 9px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
}
.bd-log-status.done {
  color: #15803d;
  background: var(--green-soft);
  border-color: #bbf7d0;
}
.bd-log-rate {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-strong);
}
.bd-log-content {
  font-size: 13.5px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.bd-log-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  text-align: right;
}
.bd-log-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.bd-log-author {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.bd-log-date {
  font-size: 11px;
  color: var(--muted);
}
.bd-log-actions {
  display: flex;
  gap: 6px;
}
.bd-mini {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--muted-strong);
  cursor: pointer;
}
.bd-mini:hover {
  border-color: var(--primary-line);
  color: var(--primary-strong);
}
.bd-mini.danger:hover {
  border-color: #fecaca;
  color: var(--red);
}
.bd-readonly {
  margin: 0;
}
.reg-attach-row.is-locked {
  opacity: 0.8;
}
.att-lock {
  margin-left: auto;
  font-size: 12px;
}

/* ── 개발완료 정보 (읽기전용 카드) ─────────────────────────── */
.bd-done-info {
  border: 1px solid var(--green-soft);
  border-radius: 12px;
  padding: 14px 16px;
  background: #f6fef9;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bd-done-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #15803d;
}
.bd-done-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted-strong);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 1px 8px;
}
.bd-done-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 18px;
}
.bd-done-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bd-done-item i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.bd-done-item b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.bd-done-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bd-done-block > i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.bd-done-text {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  white-space: pre-wrap;
}
.bd-done-wf {
  background: #fff;
}
.bd-done-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bd-done-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.bd-done-empty {
  font-size: 12px;
  color: var(--muted);
}

/* ── 운영중 잠금 ───────────────────────────────────────────── */
.lock-banner {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--amber-soft);
  border: 1px solid #fcd9a8;
  border-radius: 10px;
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
}
.is-locked input,
.is-locked select,
.is-locked textarea,
.is-locked button,
.is-locked .user-pick-btn,
.is-locked label.ds-file-btn {
  pointer-events: none;
  opacity: 0.6;
}

/* ── AI Agent 관리 (Admin) ─────────────────────────────────── */
.mgmt-head h2 {
  margin: 0 0 14px;
  font-size: 1.18rem;
  color: var(--ink);
}
.mgmt-body {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.mgmt-subnav {
  flex: 0 0 178px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.mgmt-subnav button {
  text-align: left;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted-strong);
  cursor: pointer;
}
.mgmt-subnav button:hover {
  background: var(--surface-soft);
}
.mgmt-subnav button.active {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: var(--primary-line);
}
/* 내용 영역: 페이지 배경과 구분되는 옅은 트레이 */
.mgmt-content {
  flex: 1;
  min-width: 0;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
/* 폐기 사유 다이얼로그 */
.retire-dialog {
  width: min(560px, calc(100vw - 32px));
}
.retire-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 14px;
}
.retire-field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.retire-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

/* ── 운영전환 프로필 팝업 ──────────────────────────────────── */
.agent-profile-dialog {
  width: min(720px, calc(100vw - 32px));
}
.ops-row {
  cursor: pointer;
}
.ops-row:hover {
  background: var(--primary-soft);
}
.pf-photo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pf-photo-box {
  width: 60px;
  height: 80px; /* 3:4 비율 */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}
.pf-photo-name {
  font-size: 10px;
  padding: 2px;
  word-break: break-all;
}

/* ── AAO 관리 (2-pane: 메가프로세스 → L2 그룹) ──────────────── */
.aaomgmt-body {
  display: flex;
  gap: 14px;
  align-items: stretch;
  min-height: 420px;
}
/* L1 메가프로세스 패널 + 그룹 패널 = 흰 카드(트레이 위에 떠 보이게) */
.aaomgmt-l1 {
  flex: 0 0 232px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.aaomgmt-groups {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
/* 패널 헤더 — AAO 메뉴(.aao-col-h)와 동일 톤 */
.aaomgmt-col-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.aaomgmt-l1-list {
  padding: 6px;
  overflow-y: auto;
}
.grp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  overflow-y: auto;
}
/* 그룹 카드(레벨3) — 옅은 회색으로 흰 패널 위에서 구분 */
.grp-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.grp-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.grp-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.grp-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.grp-emps {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.group-dialog {
  width: min(520px, calc(100vw - 32px));
}
.group-dialog .retire-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
}

/* ── AI Service 카드 로고 (카탈로그) ───────────────────────── */
.service-logo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.service-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── AI Service 관리 (Admin) ───────────────────────────────── */
.svc-mgmt {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.svc-mgmt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.svc-mgmt-bar .aao-sub {
  margin: 0;
}
.svc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.svc-row.dragging {
  opacity: 0.55;
  border-color: var(--primary-line);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}
.svc-row.is-off {
  background: #fbfcfe;
  border-style: dashed;
}
.svc-row.is-off .svc-name,
.svc-row.is-off .svc-sub {
  color: var(--muted);
}
.svc-drag {
  cursor: grab;
  color: #b6bfcc;
  font-size: 18px;
  line-height: 1;
  user-select: none;
}
.svc-drag:active {
  cursor: grabbing;
}
.svc-thumb {
  flex: 0 0 auto;
}
.svc-thumb .service-logo,
.svc-thumb .service-avatar {
  width: 44px;
  height: 44px;
}
.svc-info {
  flex: 1 1 auto;
  min-width: 0;
}
.svc-name {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--ink);
}
.svc-sub {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svc-link {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 노출 토글 스위치 */
.svc-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 0 0 auto;
}
.svc-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.svc-switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.16s;
}
.svc-switch-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s;
}
.svc-switch input:checked + .svc-switch-track {
  background: var(--primary);
}
.svc-switch input:checked + .svc-switch-track .svc-switch-dot {
  transform: translateX(16px);
}
.svc-switch-text {
  font-size: 0.8rem;
  color: var(--muted-strong);
  flex: 0 0 auto;
  min-width: 44px;
  white-space: nowrap;
}
.svc-row-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

/* ── AI Service 등록/수정 다이얼로그 ───────────────────────── */
.svc-dialog {
  width: min(560px, 94vw);
}
.svc-form {
  padding: 4px 2px 2px;
}
.svc-form-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.svc-img-field {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.svc-img-label {
  font-size: 0.8rem;
  color: var(--muted-strong);
  font-weight: 600;
}
.svc-img-box {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}
.svc-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.svc-img-empty {
  font-size: 0.72rem;
  color: #9aa6b4;
  text-align: center;
  line-height: 1.25;
}
.svc-img-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  width: 92px;
}
.svc-img-actions .ghost-button {
  justify-content: center;
}
.svc-fields {
  flex: 1 1 auto;
  min-width: 0;
}
.svc-fields .retire-field {
  display: block;
  margin-bottom: 12px;
}
.svc-fields .retire-field > span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted-strong);
  margin-bottom: 5px;
}
.svc-fields .retire-field input,
.svc-fields .retire-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
}
.svc-visible {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
}
.svc-visible input {
  width: 16px;
  height: 16px;
}

/* ── 운영 탭 (샘플) ─────────────────────────────────────────── */
.op-tab {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.op-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.op-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.op-card i {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.op-card b {
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.2;
}
.op-card small {
  font-size: 11px;
  color: var(--muted);
}
.op-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 14px;
}
.op-hero-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.op-hero-main i {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-strong);
}
.op-hero-main b {
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--primary-strong);
}
.op-hero-sub {
  font-size: 12.5px;
  color: var(--muted-strong);
}
.op-note {
  margin: 4px 2px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.op-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}
