/* =========================================================
 * JDC 데모 — 공통 셸 스타일
 * 토큰: IBM Carbon Design System의 Gray 스케일을 정적 사이트에 이식
 *       (공식 @carbon/react 미사용 — 빌드체인 없는 정적 사이트이므로
 *        그레이스케일 토큰 언어만 손으로 이식했음을 명시)
 * 폰트: Pretendard (한글 웹 UI 표준, 웨이트별 최적화)
 * ========================================================= */
@font-face {
  font-family: "Pretendard";
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
  src: url('../fonts/PretendardVariable.woff2') format('woff2');
}
@font-face {
  font-family: "Pretendard Variable";
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
  src: url('../fonts/PretendardVariable.woff2') format('woff2');
}

:root {
  /* Carbon Gray 스케일 (Gray 10 → Gray 100) */
  --g10: #f4f4f4;
  --g20: #e0e0e0;
  --g30: #c6c6c6;
  --g40: #a8a8a8;
  --g50: #8d8d8d;
  --g60: #6f6f6f;
  --g70: #525252;
  --g80: #393939;
  --g90: #262626;
  --g100: #161616;

  --ink: var(--g100);          /* 본문 텍스트, near-black */
  --ink-soft: var(--g70);      /* 보조 텍스트 */
  --muted: var(--g60);         /* 캡션/메타 */
  --muted-2: var(--g50);

  --bg: var(--g10);            /* 페이지 배경 */
  --card: #ffffff;             /* 카드/사이드/헤더 표면 */
  --line: var(--g20);          /* 기본 보더 */
  --line-strong: var(--g30);

  --shell: var(--g100);        /* 헤더/GNB 다크 셸 */
  --shell-2: var(--g90);
  --shell-line: rgba(255,255,255,.12);
  --shell-text: var(--g10);
  --shell-muted: var(--g40);

  --accent: var(--g100);       /* 유일한 액센트 = 블랙 */
  --accent-soft: var(--g10);

  --red: #da1e28;               /* Carbon Red 60 — 위험/경보 전용 시맨틱 컬러 */
  --red-soft: #fff1f1;
  --red-line: #ffb3b8;

  --radius: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(22,22,22,.04), 0 1px 1px rgba(22,22,22,.03);
  --shadow-md: 0 4px 16px rgba(22,22,22,.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; }
body {
  font-family: "Pretendard Variable", "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: margin-right .25s ease; /* AI Drawer가 넓은 화면에서 본문을 밀 때 사용 (drawer와 동일 타이밍) */
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.jdc-header { background: var(--shell); color: var(--shell-text); position: sticky; top: 0; z-index: 50; }
.jdc-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 20px; height: 56px; max-width: 1480px; margin: 0 auto;
}
.jdc-header-left { display: flex; align-items: center; gap: 22px; min-width: 0; }
.jdc-logo { font-weight: 800; font-size: 1.1rem; letter-spacing: -.2px; white-space: nowrap; color: #fff; }
.jdc-logo span {
  color: var(--shell-muted); font-weight: 500; font-size: .74rem; margin-left: 6px;
  letter-spacing: .3px; border-left: 1px solid var(--shell-line); padding-left: 8px;
}
.jdc-sys-switch { display: flex; gap: 2px; }
.jdc-sys-tab {
  padding: 6px 14px; border-radius: var(--radius-pill); font-size: .86rem; color: var(--shell-muted);
  border: 1px solid transparent; white-space: nowrap; font-weight: 500;
}
.jdc-sys-tab:hover { color: #fff; }
.jdc-sys-tab.active { background: rgba(255,255,255,.14); color: #fff; border-color: var(--shell-line); font-weight: 700; }
.jdc-sys-tab.admin { position: relative; margin-left: 6px; padding-left: 16px; }
.jdc-sys-tab.admin::before {
  content: ""; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: var(--shell-muted);
}
.jdc-sys-tab.admin.active { background: #fff; color: var(--g100); font-weight: 800; }
.jdc-sys-tab.admin.active::before { background: var(--g100); }
.jdc-sys-tab.disabled { opacity: .32; cursor: default; }

.jdc-header-right { display: flex; align-items: center; gap: 10px; }
.jdc-search { display: flex; position: relative; }
.jdc-util { position: relative; display: flex; align-items: center; }
.jdc-search input {
  width: 190px; height: 32px; border: 1px solid transparent; border-radius: 6px 0 0 6px;
  padding: 0 10px; font-size: .85rem; background: rgba(255,255,255,.10); color: #fff;
}
.jdc-search input::placeholder { color: var(--shell-muted); }
.jdc-search input:focus { outline: none; background: rgba(255,255,255,.16); }
.jdc-search button {
  height: 32px; border: none; border-radius: 0 6px 6px 0; padding: 0 14px;
  background: #fff; color: var(--g100); font-size: .82rem; font-weight: 700;
}
.jdc-icon-btn {
  position: relative; background: none; border: none; font-size: 1.02rem; padding: 4px;
  color: var(--g10); line-height: 1; opacity: .92;
}
.jdc-icon-btn:hover { opacity: 1; }
.jdc-icon-btn.active { opacity: 1; }
.jdc-badge {
  position: absolute; top: -4px; right: -6px; background: var(--red); color: #fff;
  font-size: .6rem; font-weight: 700; border-radius: var(--radius-pill); padding: 1px 5px;
  border: 1.5px solid var(--shell);
}
.jdc-badge.light { background: #fff; color: var(--g100); }

/* 헤더 팝오버 — 검색 · 알림 · 즐겨찾기 공용 */
.jdc-pop {
  display: none; position: absolute; top: calc(100% + 9px); right: 0; z-index: 60;
  width: 328px; max-height: min(70vh, 460px); overflow-y: auto;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(22,22,22,.18);
}
.jdc-pop.open { display: block; }
.jdc-pop-search { width: 372px; left: 0; right: auto; }
.jdc-pop-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--g10);
  position: sticky; top: 0;
}
.jdc-pop-head strong { font-size: .84rem; font-weight: 700; }
.jdc-pop-head span { font-size: .71rem; color: var(--muted); }
.jdc-pop-row {
  display: block; padding: 9px 14px; border-bottom: 1px solid var(--g10);
  position: relative; padding-right: 34px;
}
.jdc-pop-row:hover { background: #fafafa; }
.jdc-pop-row-main { display: block; font-size: .855rem; color: var(--ink); font-weight: 600; }
.jdc-pop-row-sub { display: block; font-size: .715rem; color: var(--muted); margin-top: 2px; }
.jdc-pop-tag {
  display: inline-block; margin-top: 5px; font-size: .655rem; color: var(--g70);
  border: 1px solid var(--g20); background: var(--g10); padding: 1px 5px; border-radius: 3px;
}
.jdc-pop-due {
  position: absolute; right: 12px; top: 9px; font-size: .7rem; font-weight: 700;
  color: var(--g70); font-variant-numeric: tabular-nums;
}
.jdc-pop-due.red { color: var(--red); }
.jdc-pop-rowwrap { position: relative; }
.jdc-pop-rowwrap .jdc-pop-row { padding-right: 38px; }
.jdc-pop-x {
  position: absolute; right: 8px; top: 8px; width: 22px; height: 22px;
  border: 1px solid transparent; background: none; color: var(--g50);
  font-size: .95rem; line-height: 1; border-radius: 3px;
}
.jdc-pop-x:hover { border-color: var(--line); color: var(--red); background: #fff; }
.jdc-pop-empty { padding: 20px 14px; font-size: .8rem; color: var(--muted); text-align: center; }
.jdc-pop-foot {
  padding: 9px 14px; font-size: .705rem; color: var(--muted-2);
  border-top: 1px solid var(--line); background: var(--g10); line-height: 1.5;
}
.jdc-pop-action {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.jdc-pop-action span {
  font-size: .78rem; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
/* 좁은 화면에서는 우측 정렬 드롭다운이 왼쪽으로 잘리므로 헤더 아래 전폭 시트로 전환한다 */
@media (max-width: 640px) {
  .jdc-pop { position: fixed; top: 56px; left: 12px; right: 12px; width: auto; max-height: 62vh; }
  .jdc-pop-search { left: 12px; right: 12px; width: auto; }
}
.jdc-role { display: flex; align-items: center; gap: 7px; margin-left: 4px; }
.jdc-role-label { font-size: .72rem; color: var(--shell-muted); }
.jdc-role select {
  height: 32px; border-radius: 6px; border: 1px solid rgba(255,255,255,.22);
  background: var(--shell-2); color: #fff; font-size: .84rem; padding: 0 8px; font-weight: 600;
}

/* GNB */
.jdc-gnb { background: var(--shell-2); border-top: 1px solid var(--shell-line); }
.jdc-gnb-inner { max-width: 1480px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; overflow-x: auto; }
.jdc-gnb-item {
  padding: 10px 14px; font-size: .89rem; color: var(--g40); white-space: nowrap;
  border-bottom: 2px solid transparent; font-weight: 500;
}
.jdc-gnb-item:hover { color: #fff; }
.jdc-gnb-item.active { color: #fff; font-weight: 700; border-bottom-color: #fff; }

/* ---------- Layout ---------- */
.jdc-body {
  display: flex; max-width: 1480px; margin: 0 auto; padding: 24px 20px;
  gap: 20px; align-items: flex-start;
}

/* Sidebar */
.jdc-side {
  width: 224px; flex-shrink: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 0; position: sticky; top: 120px;
  box-shadow: var(--shadow-sm);
}
.jdc-side-group {
  padding: 14px 16px 6px; font-size: .7rem; font-weight: 700; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: .6px;
}
.jdc-side-item {
  display: block; padding: 8px 16px; font-size: .89rem; color: var(--ink-soft);
  border-left: 3px solid transparent; font-weight: 500;
}
.jdc-side-item:hover { background: var(--bg); color: var(--ink); }
.jdc-side-item.active {
  background: var(--g10); border-left-color: var(--g100);
  color: var(--g100); font-weight: 700;
}
.jdc-chip {
  display: inline-block; font-size: .64rem; font-weight: 700; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 0 6px; vertical-align: middle;
}
.jdc-side-item.active .jdc-chip { color: var(--g100); border-color: var(--g100); background: #fff; }

/* ---------- Content ---------- */
.jdc-content { flex: 1; min-width: 0; }
.jdc-breadcrumb { font-size: .79rem; color: var(--muted); margin-bottom: 12px; }
.jdc-breadcrumb span { margin: 0 5px; color: var(--g30); }
.jdc-page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.jdc-page-head h1 { font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.jdc-page-meta { display: flex; gap: 6px; }
.jdc-tag {
  font-size: .7rem; font-weight: 700; border-radius: 5px; padding: 3px 9px;
  letter-spacing: .2px;
}
.jdc-tag.id { background: var(--g100); color: #fff; }
.jdc-tag.rfp { background: #fff; color: var(--g70); border: 1px solid var(--line-strong); }
.jdc-page-desc { color: var(--ink-soft); font-size: .93rem; margin-bottom: 20px; max-width: 760px; }

/* Wireframe placeholder */
.jdc-wire { display: flex; flex-direction: column; gap: 12px; }
.jdc-wire-box {
  border: 1.5px dashed var(--g30); border-radius: var(--radius); background: var(--card);
  min-height: 92px; display: flex; align-items: center; justify-content: center;
}
.jdc-wire-box.tall { min-height: 220px; }
.jdc-wire-box span { color: var(--muted); font-size: .87rem; font-weight: 600; }
.jdc-note { margin-top: 16px; font-size: .78rem; color: var(--muted); }

/* ---------- Widgets ---------- */
.jdc-widget-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px; margin-top: 6px;
}
.jdc-widget {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow-sm);
}
.jdc-widget.wide { grid-column: 1 / -1; }
.jdc-widget-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.jdc-widget-head h3 { font-size: .96rem; font-weight: 700; color: var(--ink); }
.jdc-rfp-mini { font-size: .67rem; color: var(--g40); white-space: nowrap; }
.jdc-widget-body { display: flex; flex-direction: column; gap: 8px; }
.jdc-widget.wide .jdc-widget-body { flex-direction: row; flex-wrap: wrap; gap: 10px 32px; align-items: center; }
.jdc-line { font-size: .87rem; }
.jdc-text { color: var(--ink-soft); }
.jdc-pill {
  display: inline-block; font-size: .79rem; font-weight: 600; background: var(--bg);
  border: 1px solid var(--line); color: var(--ink-soft); border-radius: var(--radius-pill); padding: 2px 10px;
}
.jdc-pill.red { background: var(--red-soft); border-color: var(--red-line); color: var(--red); }
.jdc-link { color: var(--g100); font-size: .84rem; font-weight: 700; }
.jdc-progress-label { font-size: .84rem; margin-bottom: 4px; color: var(--ink-soft); }
.jdc-progress { height: 7px; background: var(--g20); border-radius: var(--radius-pill); overflow: hidden; }
.jdc-progress-bar { height: 100%; background: var(--g100); border-radius: var(--radius-pill); }
.jdc-stat { display: flex; flex-direction: column; }
.jdc-stat-label { font-size: .74rem; color: var(--muted); }
.jdc-stat-value { font-size: 1.55rem; font-weight: 800; color: var(--ink); letter-spacing: -.4px; }
.jdc-stat.red .jdc-stat-value { color: var(--red); }

/* ---------- AI Copilot ----------
 * 우측에서 슬라이드되는 Drawer + 반투명 백드롭.
 * (구버전은 fixed 소형 패널이 본문 위젯 위에 그대로 얹혀 가리는 문제가 있었다.
 *  Drawer + 백드롭 방식은 열렸을 때 명확히 모달처럼 동작하고, 닫히면 흔적 없이 사라진다.) */
.jdc-ai-fab {
  position: fixed; right: 22px; bottom: 26px; z-index: 70;
  width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  background: var(--g100); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .92rem; box-shadow: var(--shadow-md); transition: transform .15s, background .15s;
}
.jdc-ai-fab:hover { transform: translateY(-1px); }
.jdc-ai-fab.active { background: var(--g80); }

.jdc-ai-backdrop {
  position: fixed; inset: 0; background: rgba(22,22,22,.44); z-index: 65;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.jdc-ai-backdrop.open { opacity: 1; pointer-events: auto; }

.jdc-ai-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 392px; max-width: 92vw;
  background: var(--card); border-left: 1px solid var(--line); box-shadow: -10px 0 32px rgba(22,22,22,.18);
  z-index: 66; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
}
.jdc-ai-drawer.open { transform: translateX(0); }

/* 1200px 이상: 본문을 드로어 폭만큼 왼쪽으로 밀어 공존시킨다(덮지 않는다).
 * body에 margin-right를 주면 header/gnb/jdc-body/footer가 모두 body의 자식이라
 * 한 번에 같이 밀리고, max-width:auto margin 센터링 요소들도 좁아진 폭에 맞춰
 * 자연스럽게 재중앙정렬/재배치된다(위젯 그리드는 auto-fill이라 컬럼 수도 자동 조정).
 * 1200px 미만에서는 이 규칙이 적용되지 않아 기존 오버레이+백드롭 방식이 유지된다. */
@media (min-width: 1200px) {
  body.jdc-ai-open { margin-right: 392px; }
}

.jdc-ai-head { background: var(--g100); color: #fff; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.jdc-ai-head-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jdc-ai-title { font-weight: 800; font-size: 1rem; }
.jdc-ai-close { background: none; border: none; color: #fff; font-size: 1.3rem; line-height: 1; opacity: .8; padding: 2px 6px; }
.jdc-ai-close:hover { opacity: 1; }
.jdc-ai-badge-rfp {
  align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .2px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); color: #fff;
  border-radius: var(--radius-pill); padding: 3px 10px;
}
.jdc-ai-context { font-size: .74rem; color: var(--g30); }

.jdc-ai-body { flex: 1; overflow-y: auto; padding: 6px 0; }
.jdc-ai-empty { padding: 20px 16px; font-size: .84rem; color: var(--muted); }
.jdc-ai-q { width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; gap: 8px; }
.jdc-ai-q:hover { background: var(--bg); }
.jdc-ai-q strong { font-size: .87rem; color: var(--ink); font-weight: 600; flex: 1; }
.jdc-ai-q .car { color: var(--muted-2); transition: transform .15s; flex-shrink: 0; }
.jdc-ai-q.expanded .car { transform: rotate(90deg); }

.jdc-ai-answer { padding: 2px 16px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.jdc-ai-answer-summary { font-size: .85rem; color: var(--ink); line-height: 1.55; margin: 10px 0; }
.jdc-ai-answer-label { font-size: .68rem; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: .4px; margin: 8px 0 4px; }
.jdc-ai-evidence { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.jdc-ai-evidence li { font-size: .74rem; color: var(--ink-soft); padding-left: 12px; position: relative; }
.jdc-ai-evidence li::before { content: "·"; position: absolute; left: 0; color: var(--g40); }
.jdc-ai-next { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--g100); background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 10px; }
.jdc-ai-next:hover { background: var(--g10); }
.jdc-ai-human { font-size: .72rem; color: var(--muted); margin-top: 8px; }

.jdc-ai-foot { flex-shrink: 0; padding: 11px 16px 12px; background: var(--g10); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.jdc-ai-principles { display: flex; flex-wrap: wrap; gap: 6px; }
.jdc-ai-principle { font-size: .66rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 8px; }

/* 추가제안 5대 UX 패턴 칩 (ASK·EXPLAIN·DRAFT·CHECK·NEXT) */
.jdc-ai-pat {
  flex-shrink: 0; font-size: .58rem; font-weight: 800; letter-spacing: .5px;
  color: var(--g70); background: var(--g10); border: 1px solid var(--g30);
  border-radius: 3px; padding: 2px 5px; min-width: 44px; text-align: center;
}
.jdc-ai-q.expanded .jdc-ai-pat { background: var(--g100); color: #fff; border-color: var(--g100); }

/* 하이브리드 3계층 처리 경로 (답변 내부 · 한 줄 압축) */
.jdc-ai-route { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px; }
.jdc-ai-route span {
  font-size: .64rem; font-weight: 700; color: var(--g80);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 6px;
}
.jdc-ai-route i { font-style: normal; color: var(--g40); font-size: .66rem; }
.jdc-ai-route-note { font-style: normal; font-size: .64rem; color: var(--muted-2); margin-left: 2px; }

/* ---------- AI 탭 (구축 화면 4종) ---------- */
.jdc-ai-tabs { flex-shrink: 0; display: flex; background: var(--g100); padding: 0 10px; gap: 2px; }
.jdc-ai-tab {
  background: none; border: none; color: var(--g40); font-size: .78rem; font-weight: 600;
  padding: 9px 10px 11px; border-bottom: 2px solid transparent;
}
.jdc-ai-tab b { font-weight: 700; font-size: .66rem; background: rgba(255,255,255,.16); border-radius: var(--radius-pill); padding: 1px 6px; margin-left: 2px; }
.jdc-ai-tab:hover { color: #fff; }
.jdc-ai-tab.active { color: #fff; border-bottom-color: #fff; font-weight: 800; }

.jdc-ai-panel { padding: 10px 12px; }
.jdc-ai-panelbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .7rem; color: var(--muted); padding: 2px 2px 10px;
}
.jdc-ai-mini {
  flex-shrink: 0; background: #fff; border: 1px solid var(--line-strong); border-radius: 6px;
  font-size: .72rem; font-weight: 700; color: var(--ink); padding: 5px 9px;
}
.jdc-ai-mini:hover { background: var(--g10); }
.jdc-ai-mini.dark { background: var(--g100); color: #fff; border-color: var(--g100); }
.jdc-ai-mini.dark:hover { background: var(--g80); }
.jdc-ai-panelnote {
  font-size: .7rem; color: var(--ink-soft); background: var(--g10); border: 1px dashed var(--g30);
  border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.5;
}

/* 업무 봇 카드 */
.jdc-ai-bot { border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 8px; overflow: hidden; }
.jdc-ai-bot.open { border-color: var(--g100); }
.jdc-ai-bot-head {
  width: 100%; display: flex; align-items: center; gap: 9px; text-align: left;
  background: none; border: none; padding: 10px 11px 6px;
}
.jdc-ai-bot-tile {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; background: var(--g100); color: #fff;
  font-size: .85rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.jdc-ai-bot-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.jdc-ai-bot-main b { font-size: .84rem; color: var(--ink); }
.jdc-ai-bot-main em { font-style: normal; font-size: .7rem; color: var(--muted); }
.jdc-ai-bot-stats { font-size: .66rem; color: var(--muted-2); padding: 0 11px 9px 50px; }
.jdc-ai-bot-stats i { font-style: normal; color: var(--g60); border: 1px solid var(--g20); background: var(--g10); border-radius: 3px; padding: 0 4px; }
.jdc-ai-bot-sample { border-top: 1px solid var(--line); background: var(--bg); padding: 10px 11px; }
.jdc-ai-bubble { font-size: .78rem; line-height: 1.5; border-radius: 9px; padding: 7px 10px; margin-bottom: 6px; max-width: 92%; }
.jdc-ai-bubble.q { background: var(--g100); color: #fff; margin-left: auto; border-bottom-right-radius: 3px; }
.jdc-ai-bubble.a { background: #fff; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 3px; }
.jdc-ai-refs { display: flex; flex-wrap: wrap; gap: 4px; }
.jdc-ai-refs span { font-size: .64rem; color: var(--g70); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px 7px; }

/* 자동화(예약 실행) 행 */
.jdc-ai-job {
  display: flex; align-items: flex-start; gap: 9px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-bottom: 7px;
}
.jdc-ai-pill {
  flex-shrink: 0; font-size: .6rem; font-weight: 800; border-radius: var(--radius-pill);
  padding: 2px 7px; margin-top: 2px; letter-spacing: .4px;
}
.jdc-ai-pill.on { background: var(--g100); color: #fff; }
.jdc-ai-pill.off { background: var(--g10); color: var(--g50); border: 1px solid var(--g30); }
.jdc-ai-job-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.jdc-ai-job-main b { font-size: .8rem; color: var(--ink); }
.jdc-ai-job-main b i { font-style: normal; font-size: .62rem; font-weight: 600; color: var(--g60); border: 1px solid var(--g20); background: var(--g10); border-radius: 3px; padding: 0 4px; margin-left: 3px; }
.jdc-ai-job-main em { font-style: normal; font-size: .69rem; color: var(--muted); }
.jdc-ai-job-main em.last { color: var(--g70); font-weight: 600; }

/* 품질 평가 대시보드 */
.jdc-ai-eval-stats { display: flex; gap: 6px; margin-bottom: 10px; }
.jdc-ai-eval-stats .s {
  flex: 1; display: flex; flex-direction: column; gap: 1px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
}
.jdc-ai-eval-stats .s b { font-size: 1.05rem; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.jdc-ai-eval-stats .s em { font-style: normal; font-size: .62rem; color: var(--muted); }
.jdc-ai-eval-row {
  display: flex; align-items: center; gap: 7px; background: #fff;
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; margin-bottom: 6px;
}
.jdc-ai-eval-row b { flex: 1; font-size: .78rem; color: var(--ink); }
.jdc-ai-eval-row i { font-style: normal; font-size: .66rem; color: var(--muted-2); }
.jdc-ai-eval-row .score { font-size: .82rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.jdc-ai-eval-row .trend { font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.jdc-ai-eval-row.warn { border-color: var(--red-line); }
.jdc-ai-eval-row .flag { font-size: .62rem; font-weight: 700; color: var(--red); background: var(--red-soft); border-radius: 3px; padding: 1px 6px; }
.jdc-ai-eval-btns { display: flex; gap: 6px; margin: 10px 0 6px; }
.jdc-ai-eval-last { font-size: .66rem; color: var(--muted-2); }

/* Drawer 하단 3계층 범례 */
.jdc-ai-tiers-label { font-size: .64rem; font-weight: 800; color: var(--g70); letter-spacing: .2px; }
.jdc-ai-tiers { display: flex; align-items: stretch; gap: 4px; }
.jdc-ai-tiers .t {
  flex: 1; display: flex; flex-direction: column; gap: 1px;
  background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px;
}
.jdc-ai-tiers .t b { font-size: .64rem; color: var(--ink); }
.jdc-ai-tiers .t em { font-style: normal; font-size: .58rem; color: var(--muted-2); }
.jdc-ai-tiers i { font-style: normal; align-self: center; color: var(--g40); font-size: .7rem; }

/* 자유 질문 입력 바 (Drawer 하단 고정) */
.jdc-ai-askbar {
  flex-shrink: 0; display: flex; gap: 6px; padding: 10px 12px;
  background: #fff; border-top: 1px solid var(--line);
}
.jdc-ai-askbar input {
  flex: 1; height: 36px; border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 0 11px; font-size: .84rem; font-family: inherit; color: var(--ink); min-width: 0;
}
.jdc-ai-askbar input:focus { outline: 2px solid var(--g100); outline-offset: -2px; }
.jdc-ai-askbar input::placeholder { color: var(--g50); }
.jdc-ai-askbar button {
  height: 36px; padding: 0 14px; border: none; border-radius: 7px;
  background: var(--g100); color: #fff; font-size: .82rem; font-weight: 700; flex-shrink: 0;
}
.jdc-ai-askbar button:hover { background: var(--g80); }

/* 자유 질문 결과 카드 */
.jdc-ai-userq { padding: 12px 16px 16px; border-bottom: 2px solid var(--g100); background: var(--bg); }
.jdc-ai-userq-q { font-size: .88rem; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.jdc-ai-userq-tag { display: flex; align-items: center; gap: 6px; font-size: .7rem; color: var(--muted); margin-bottom: 2px; }
.jdc-ai-sugs { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.jdc-ai-sug {
  text-align: left; background: #fff; border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 7px 10px; font-size: .8rem; font-weight: 600; color: var(--ink);
}
.jdc-ai-sug:hover { background: var(--g100); color: #fff; border-color: var(--g100); }

/* 화면 내 인라인 AI 진입 버튼 */
.jdc-btn.ai { border-style: dashed; border-color: var(--g40); font-weight: 700; }
.jdc-btn.ai::before { content: "✦ "; color: var(--g60); }
.jdc-btn.ai:hover { background: var(--g100); color: #fff; border-color: var(--g100); border-style: solid; }
.jdc-btn.ai:hover::before { color: #fff; }

/* ---------- Footer ---------- */
.jdc-footer {
  border-top: 1px solid var(--line); background: var(--card);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 13px 20px; font-size: .74rem; color: var(--muted);
  max-width: 1480px; margin: 24px auto 0;
}

/* ---------- Landing ---------- */
.jdc-landing {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; background: var(--g100);
  color: #fff; padding: 40px 20px; text-align: center;
}
.jdc-landing h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -.4px; }
.jdc-landing h1 em { font-style: normal; border-bottom: 3px solid #fff; padding-bottom: 1px; }
.jdc-landing p.sub { color: var(--g50); margin-bottom: 36px; font-size: .95rem; }
.jdc-role-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; width: 100%; max-width: 760px;
}
.jdc-role-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: 22px 14px; color: #fff; transition: .15s;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.jdc-role-card:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.4); transform: translateY(-2px); }
.jdc-role-card .icon { font-size: 1.6rem; }
.jdc-role-card strong { font-size: 1rem; }
.jdc-role-card span { font-size: .74rem; color: var(--g50); }
.jdc-landing .foot { margin-top: 40px; font-size: .74rem; color: var(--g60); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .jdc-search { display: none; }
  .jdc-body { flex-direction: column; }
  .jdc-side { width: 100%; position: static; }
  .jdc-ai-drawer { width: 100vw; max-width: 100vw; }
  .jdc-ai-fab { right: 16px; bottom: 16px; }
}

