/* =====================================================================
 * 아라봇 관리자 — 공통 스타일 (REVEHIT 브랜드)
 * ---------------------------------------------------------------------
 * revehit.com 의 결을 따른다.
 *   · 먹색(#0c0e13) · 흰색 바탕에 로열 블루(#2b63dc) 포인트
 *   · 제목 · 숫자는 Paperlogy, 본문은 Pretendard
 *   · 큰 둥근 모서리(카드 20px · 버튼 알약), 옅은 하늘색 그라데이션
 * 화면마다 따로 CSS 를 두지 않는다. 필요한 모양은 여기 부품으로 만든다.
 * ⚠️ 클래스 이름은 화면 JSP 들이 쓰고 있다 — 이름을 바꾸지 말고 모양만 바꾼다.
 * ===================================================================== */

@font-face { font-family: "Pretendard"; font-weight: 400; font-display: swap; src: url("../fonts/Pretendard-Regular.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 600; font-display: swap; src: url("../fonts/Pretendard-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 700; font-display: swap; src: url("../fonts/Pretendard-Bold.woff2") format("woff2"); }
@font-face { font-family: "Paperlogy"; font-weight: 400; font-display: swap; src: url("../fonts/Paperlogy-4Regular.woff2") format("woff2"); }
@font-face { font-family: "Paperlogy"; font-weight: 600; font-display: swap; src: url("../fonts/Paperlogy-6SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Paperlogy"; font-weight: 700; font-display: swap; src: url("../fonts/Paperlogy-7Bold.woff2") format("woff2"); }

:root {
  --brand: #2b63dc;
  --brand-600: #2352c2;
  --brand-700: #1d3f95;
  --brand-50: #eef4ff;
  --brand-100: #deeaff;
  --brand-200: #bcd3ff;
  --indigo: #3e54d3;

  --ink: #0e1117;
  --ink-2: #353b45;
  --ink-3: #646b76;
  --ink-4: #9aa1ab;
  --line: #e4e8ee;
  --line-2: #eff2f6;
  --bg: #f4f6fa;
  --card: #ffffff;
  --dark: #0c0e13;
  --dark-2: #161a22;

  --green: #1f7a45;
  --green-500: #22a35a;
  --green-50: #e9f8ef;
  --red: #d62b23;
  --red-50: #fff2f1;
  --red-200: #ffc7c3;
  --amber: #b7791f;
  --amber-50: #fff7e6;
  --amber-500: #e2ab22;
  --violet: #6246ea;
  --violet-50: #f2efff;
  --teal: #0b7f8f;
  --teal-50: #e4f8fa;

  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-xs: 0 1px 2px rgba(14, 17, 23, .04);
  --shadow-sm: 0 1px 2px rgba(14, 17, 23, .04), 0 6px 18px rgba(14, 17, 23, .05);
  --shadow-lg: 0 24px 60px rgba(14, 17, 23, .18);
  --shadow-brand: 0 10px 24px rgba(43, 99, 220, .28);
  --sidebar-w: 256px;
  --topbar-h: 76px;
  --focus: 0 0 0 4px rgba(43, 99, 220, .18);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  --font-display: "Paperlogy", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "D2Coding", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 420px at 78% -220px, rgba(188, 211, 255, .55) 0%, transparent 70%),
    radial-gradient(900px 380px at 12% -260px, rgba(222, 234, 255, .7) 0%, transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: var(--brand-100); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico-sm { width: 15px; height: 15px; }
.ico-lg { width: 22px; height: 22px; }
.ico-xl { width: 30px; height: 30px; stroke-width: 1.5; }

/* ---------------------------------------------------------------- 틀 */
.app { display: flex; min-height: 100vh; }

/* 떠 있는 먹색 LNB */
.sidebar {
  position: fixed; top: 12px; bottom: 12px; left: 12px; z-index: 40;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(43, 99, 220, .22) 0%, transparent 70%),
    var(--dark);
  color: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(12, 14, 19, .22);
  overflow: hidden;
}
.main { flex: 1; min-width: 0; margin-left: calc(var(--sidebar-w) + 24px); display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1600px; padding: 6px 36px 72px 20px; }
.content.is-wide { max-width: none; }

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 16px;
  color: #fff; flex: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, #3f78f0 0%, #2b63dc 45%, #3e54d3 100%);
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 17px;
  box-shadow: 0 8px 20px rgba(43, 99, 220, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-mark .ico { width: 21px; height: 21px; stroke-width: 2; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.brand-by { margin-top: 3px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; color: rgba(255, 255, 255, .45); }

.bot-picker { margin: 4px 14px 6px; }
.bot-picker-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 16px;
  background: rgba(255, 255, 255, .06); color: #fff; text-align: left;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.bot-picker-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); }
.bot-picker-btn .ico { color: rgba(255, 255, 255, .55); }
.bot-picker-text { display: flex; flex-direction: column; min-width: 0; }
.bot-picker-label { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: rgba(255, 255, 255, .45); }
.bot-picker-name { margin-top: 1px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-picker-menu { left: 0; right: 0; min-width: 228px; max-height: 360px; overflow: auto; color: var(--ink); }

.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }
.nav-group { margin: 18px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: rgba(255, 255, 255, .36); }
.nav-divider { height: 1px; margin: 14px 10px; background: rgba(255, 255, 255, .08); }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; margin: 2px 0; border-radius: 12px;
  color: rgba(255, 255, 255, .68); font-size: 13.5px; font-weight: 400;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-item .ico { color: rgba(255, 255, 255, .45); width: 18px; height: 18px; transition: color .15s var(--ease); }
.nav-item span:first-of-type { flex: 1; min-width: 0; }
.nav-item:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.nav-item:hover .ico { color: rgba(255, 255, 255, .8); }
.nav-item.is-active {
  background: linear-gradient(135deg, #2f6ae6 0%, #2b63dc 50%, #3e54d3 100%);
  color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px rgba(43, 99, 220, .38), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.nav-item.is-active .ico { color: #fff; }
.nav-badge { font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; flex: none; }
.badge-red-line { color: #ff9b94; background: rgba(214, 43, 35, .16); border: 1px solid rgba(255, 155, 148, .28); }
.nav-count { min-width: 20px; padding: 0 6px; height: 19px; line-height: 19px; border-radius: 10px; background: #ef4136; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.sidebar-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sidebar-credit { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 0; font-size: 11px; color: rgba(255, 255, 255, .38); }
.sidebar-credit a { color: rgba(255, 255, 255, .55); }
.sidebar-credit a:hover { color: #fff; text-decoration: none; }
.sidebar-backdrop { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  min-height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 12px 36px 12px 20px;
  background: rgba(244, 246, 250, .78);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.topbar-menu { display: none; }
.page-head { min-width: 0; flex: 1; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-4); white-space: nowrap; overflow: hidden; }
.crumbs-sep { color: #cdd3dc; }
.crumbs-current { color: var(--ink-3); }
.page-title { margin-top: 2px; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.user-chip {
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 12px 0 5px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.user-chip:hover { border-color: #d3d9e2; box-shadow: var(--shadow-sm); }
.user-chip .ico { color: var(--ink-4); }
.avatar {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--dark); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.user-chip-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.user-chip-name { font-size: 13px; font-weight: 700; color: var(--ink); max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-role { font-size: 11px; color: var(--ink-4); max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: #fff; color: var(--ink-2);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(43, 99, 220, .24); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); box-shadow: var(--shadow-brand); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; }
.btn-outline { border-color: var(--line); background: #fff; color: var(--ink-2); font-weight: 500; }
.btn-outline:hover:not(:disabled) { border-color: #cfd6e0; background: #fafbfd; color: var(--ink); }
.btn-soft { background: var(--brand-50); color: var(--brand); border-color: transparent; }
.btn-soft:hover:not(:disabled) { background: var(--brand-100); }
.btn-ghost { background: transparent; color: var(--ink-2); font-weight: 500; }
.btn-ghost:hover:not(:disabled) { background: rgba(14, 17, 23, .05); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b8231c; }
.btn-danger-line { border-color: var(--red-200); color: var(--red); background: #fff; font-weight: 500; }
.btn-danger-line:hover:not(:disabled) { background: var(--red-50); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; gap: 4px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; }
.icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid transparent; background: transparent; color: var(--ink-2);
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.icon-btn:hover { background: rgba(14, 17, 23, .05); text-decoration: none; }
.topbar .icon-btn { background: #fff; border-color: var(--line); box-shadow: var(--shadow-xs); }
.topbar .icon-btn:hover { border-color: #d3d9e2; }
.topbar .topbar-menu { background: transparent; border-color: transparent; box-shadow: none; }
.icon-btn-dot {
  position: absolute; top: -2px; right: -3px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: #ef4136; color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; text-align: center;
  border: 2px solid #fff;
}
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); font-size: 13px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- 칩 · 배지 */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.chip:hover { text-decoration: none; }
.chip-brand { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand); }
.chip-brand::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 3px rgba(34, 163, 90, .18); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: #f0f2f5; color: var(--ink-2);
}
.badge .ico { width: 13px; height: 13px; stroke-width: 2; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-blue { background: var(--brand-50); color: var(--brand); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-violet { background: var(--violet-50); color: var(--violet); }
.badge-teal { background: var(--teal-50); color: var(--teal); }
.badge-gray { background: #f0f2f5; color: var(--ink-3); }
.badge-dark { background: var(--ink); color: #fff; }
.badge-new { background: var(--ink); color: #fff; font-size: 10px; height: 20px; letter-spacing: .08em; }
.badge-status { min-width: 128px; justify-content: flex-start; }
.badge-lg { height: 28px; padding: 0 12px; font-size: 12.5px; }

.tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; color: var(--ink-2); background: #fff; white-space: nowrap;
}
.tags { display: flex; flex-wrap: wrap; gap: 5px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.dot-green { background: var(--green-500); }
.dot-red { background: var(--red); }
.dot-amber { background: var(--amber-500); }
.dot-blue { background: var(--brand); }

/* ---------------------------------------------------------------- 카드 */
.card {
  background: var(--card);
  border: 1px solid rgba(14, 17, 23, .06);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 24px 26px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 26px 0; }
.card-head.with-line { padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.card-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.card-desc { margin-top: 5px; font-size: 13px; color: var(--ink-3); }
.card-meta { font-size: 12px; color: var(--ink-4); white-space: nowrap; }
.card-foot { padding: 16px 26px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
.card + .card, .card + .section, .section + .section, .section + .card { margin-top: 20px; }
.card.is-flat { box-shadow: none; }
.card.is-dashed { border: 1.5px dashed #d5dbe4; box-shadow: none; background: rgba(255, 255, 255, .6); }

.section-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 14px; }

/* ---------------------------------------------------------------- 그리드 */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1fr) 360px; }
.grid-side-main { grid-template-columns: 320px minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.text-right { text-align: right; } .text-center { text-align: center; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; } .text-lg { font-size: 16px; }
.text-muted { color: var(--ink-3); } .text-faint { color: var(--ink-4); }
.text-brand { color: var(--brand); } .text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.pre-wrap { white-space: pre-wrap; }
.display { font-family: var(--font-display); }

/* ---------------------------------------------------------------- 입력 */
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.label .req { color: var(--red); margin-left: 2px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.label-row .label { margin: 0; }
.help { margin-top: 7px; font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.help b { color: var(--ink-2); font-weight: 600; }
.error-text { margin-top: 6px; font-size: 12.5px; color: var(--red); }
.input, .select, .textarea {
  display: block; width: 100%;
  height: 46px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink);
  font-size: 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #a8afb9; }
.input:hover, .select:hover, .textarea:hover { border-color: #d0d6df; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input:disabled, .select:disabled, .textarea:disabled { background: #f6f8fb; color: var(--ink-3); }
.input-sm, .select-sm { height: 36px; font-size: 13px; padding: 0 12px; border-radius: 10px; }
.textarea { height: auto; min-height: 120px; padding: 12px 15px; line-height: 1.65; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23646b76' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 15px;
}
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group > .input, .input-group > .select { flex: 1; min-width: 0; }
.input-icon { position: relative; }
.input-icon .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; }
.input-icon .input { padding-left: 42px; }
.input-color { display: flex; align-items: center; gap: 8px; }
.input-color input[type=color] { width: 46px; height: 46px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.char-count { font-size: 12px; color: var(--ink-4); }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13.5px; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; width: 42px; height: 24px; border-radius: 12px; background: #d6dbe3; transition: background .2s var(--ease); flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .22); transition: transform .2s var(--ease); }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--focus); }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: #e9edf3; gap: 2px; flex-wrap: wrap; }
.seg button, .seg label { border: 0; background: transparent; padding: 7px 15px; border-radius: 999px; font-size: 13px; color: var(--ink-3); cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease); }
.seg button:hover, .seg label:hover { color: var(--ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg button.is-active, .seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(14, 17, 23, .1); }
.seg label span { display: block; padding: 0; }
.seg label:has(input:checked) { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(14, 17, 23, .1); }

/* 고르는 카드 — 「AI 자동 설정 / 직접 입력」 */
.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.choice-card {
  position: relative; display: block; padding: 24px 24px 22px; overflow: hidden;
  border: 1.5px solid var(--line); border-radius: 20px; background: #fff;
  text-align: left; cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.choice-card:hover { border-color: #cfd6e0; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 14px; background: var(--brand-50); color: var(--brand); font-size: 20px; line-height: 1; }
.choice-card-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.choice-card-desc { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.choice-card.is-active {
  border-color: var(--dark); color: #fff;
  background: radial-gradient(380px 200px at 100% 0%, rgba(43, 99, 220, .45) 0%, transparent 70%), var(--dark);
  box-shadow: 0 16px 36px rgba(12, 14, 19, .22);
}
.choice-card.is-active .choice-card-icon { background: rgba(255, 255, 255, .12); color: #fff; }
.choice-card.is-active .choice-card-desc { color: rgba(255, 255, 255, .7); }

.radio-list { display: flex; flex-direction: column; gap: 10px; }
.radio-row { display: flex; gap: 12px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; transition: border-color .15s var(--ease), background .15s var(--ease); }
.radio-row:hover { border-color: #d0d6df; }
.radio-row input { margin: 3px 0 0; accent-color: var(--brand); }
.radio-row.is-active, .radio-row:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(43, 99, 220, .08); }
.radio-row-title { font-weight: 600; font-size: 13.5px; }
.radio-row-desc { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* 낱말 알약 입력 */
.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: text; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.tag-input:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.tag-input input { flex: 1; min-width: 120px; border: 0; outline: 0; height: 30px; padding: 0 4px; background: transparent; }
.tag-pill { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; }
.tag-pill button { display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: inherit; padding: 0; }
.tag-pill button:hover { background: rgba(255, 255, 255, .3); }

/* ---------------------------------------------------------------- 탭 — 알약 */
.tabs { display: inline-flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; background: #e7ebf2; overflow-x: auto; max-width: 100%; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border: 0; border-radius: 999px; background: none; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--ink-3);
  transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 2px 8px rgba(14, 17, 23, .08); }
.tab-count { font-weight: inherit; color: var(--brand); }
.tabs-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs-bar .tabs { border-bottom: 0; }
.tabs-bar-actions { display: flex; gap: 8px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade .2s var(--ease); }

/* ---------------------------------------------------------------- 표 */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  padding: 13px 16px; text-align: left; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  background: transparent; border-bottom: 1px solid var(--line);
}
.table td { padding: 17px 16px; vertical-align: top; border-bottom: 1px solid var(--line-2); transition: background .12s var(--ease); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f7faff; }
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr.is-selected td { background: var(--brand-50); }
.table .col-check { width: 48px; padding-right: 0; }
.table .col-date { width: 90px; color: var(--ink-3); white-space: nowrap; }
.table td.middle, .table th.middle { vertical-align: middle; }
.table-compact td { padding: 12px 16px; }
.table-title { font-weight: 700; color: var(--ink); }
.table-preview { margin-top: 5px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.table-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.list-toolbar .check { font-weight: 600; }
.selection-bar { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border-radius: 999px; background: var(--ink); color: #fff; animation: pop .15s var(--ease); }
.selection-bar .count { font-size: 13px; color: #fff; font-weight: 600; margin-right: 6px; }
.selection-bar .btn-outline, .selection-bar .btn-ghost { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.selection-bar .btn-outline:hover:not(:disabled), .selection-bar .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .2); color: #fff; }
.selection-bar .btn-danger-line { background: rgba(214, 43, 35, .9); border-color: transparent; color: #fff; }

.pager { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 20px; }
.pager button { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 13px; }
.pager button:hover:not(:disabled) { background: #edf1f6; }
.pager button.is-active { background: var(--ink); color: #fff; font-weight: 600; }
.pager button:disabled { color: #c9ced6; cursor: default; }

/* ---------------------------------------------------------------- 필터 막대 */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 22px; }
.filter-bar .filter-label { font-size: 13.5px; font-weight: 600; margin-right: 4px; }
.filter-bar .input, .filter-bar .select { width: auto; height: 40px; border-radius: 999px; padding-left: 16px; }
.filter-bar input[type=date] { width: 160px; }
.filter-bar .tilde { color: var(--ink-4); }

.search-box { position: relative; }
.search-box .ico { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-4); }
.search-box .input { height: 50px; padding-left: 48px; border-radius: 999px; border-color: rgba(14, 17, 23, .06); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- 지표 카드 */
.kpi { position: relative; padding: 24px 26px; min-height: 140px; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(43, 99, 220, .07) 0%, transparent 70%); pointer-events: none; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.kpi-value { margin-top: 26px; font-family: var(--font-display); font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.kpi-value small { font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.kpi-sub { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.kpi-icon { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; }
.kpi-icon .ico { width: 21px; height: 21px; }
.kpi-icon.blue { background: var(--brand-50); color: var(--brand); }
.kpi-icon.green { background: var(--green-50); color: var(--green); }
.kpi-icon.violet { background: var(--violet-50); color: var(--violet); }
.kpi-icon.amber { background: var(--amber-50); color: var(--amber); }
.kpi-icon.red { background: var(--red-50); color: var(--red); }
.kpi-icon.teal { background: var(--teal-50); color: var(--teal); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); }

.progress { height: 8px; border-radius: 4px; background: #e9edf3; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4b83f0, var(--brand)); transition: width .5s var(--ease); }
.progress-bar.green { background: var(--green-500); } .progress-bar.amber { background: var(--amber-500); } .progress-bar.red { background: var(--red); }

.rank-list { display: flex; flex-direction: column; gap: 16px; }
.rank-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.rank-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--ink); color: #fff; font-family: var(--font-display); font-size: 12px; font-weight: 700; }
.rank-row:first-child .rank-no { background: var(--brand); }
.rank-row .progress { grid-column: 2 / 4; height: 6px; margin-top: -6px; }

.feed { display: flex; flex-direction: column; }
.feed-item { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.feed-item:first-child { padding-top: 4px; }
.feed-item:last-child { border-bottom: 0; }
.feed-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-4); }
.feed-title { margin-top: 4px; font-size: 14px; color: var(--ink); }

.chart-box { position: relative; width: 100%; height: 280px; }
.chart-box.sm { height: 220px; } .chart-box.lg { height: 340px; }

/* ---------------------------------------------------------------- 큰 선택 카드 (지식등록) */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  min-height: 228px; padding: 30px 28px; text-align: left; overflow: hidden;
  background: #fff; border: 1px solid rgba(14, 17, 23, .06); border-radius: 24px; box-shadow: var(--shadow-sm);
  color: var(--ink); cursor: pointer;
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.feature-card::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(43, 99, 220, .1) 0%, transparent 70%); opacity: 0; transition: opacity .25s var(--ease); }
.feature-card:hover { text-decoration: none; border-color: var(--brand-200); box-shadow: 0 18px 40px rgba(43, 99, 220, .14); transform: translateY(-4px); }
.feature-card:hover::after { opacity: 1; }
.feature-card .ico { width: 30px; height: 30px; stroke-width: 1.6; color: var(--brand); padding: 13px; box-sizing: content-box; border-radius: 16px; background: linear-gradient(160deg, #f6faff 0%, #deeaff 100%); }
.feature-card-title { margin-top: 22px; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.feature-card-desc { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }
.feature-card .badge-new { position: absolute; top: 18px; right: 18px; }

/* ---------------------------------------------------------------- 알림 · 안내 */
.alert { display: flex; gap: 10px; padding: 14px 18px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; border: 1px solid transparent; }
.alert .ico { margin-top: 1px; }
.alert-info { background: var(--brand-50); color: #1f47a6; border-color: var(--brand-100); }
.alert-warn { background: var(--amber-50); color: #8a5a10; border-color: #f7e0ad; }
.alert-danger { background: var(--red-50); color: #a8211b; border-color: var(--red-200); }
.alert-success { background: var(--green-50); color: #1c6b3d; border-color: #bfe8cf; }
.alert-muted { background: #f6f8fb; color: var(--ink-2); border-color: var(--line); }
.alert b { font-weight: 700; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 64px 20px; text-align: center; color: var(--ink-3); }
.empty .ico { width: 30px; height: 30px; padding: 16px; box-sizing: content-box; stroke-width: 1.5; color: var(--brand); border-radius: 20px; background: linear-gradient(160deg, #f6faff 0%, #deeaff 100%); margin-bottom: 6px; }
.empty-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--ink); }
.empty-desc { font-size: 13px; }
.empty .btn { margin-top: 10px; }

.code-block { position: relative; margin: 0; padding: 18px 20px; border-radius: 16px; background: var(--dark); color: #dbe4f5; font-family: var(--mono); font-size: 12.8px; line-height: 1.75; overflow-x: auto; white-space: pre; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.code-block .copy-btn { position: absolute; top: 12px; right: 12px; }
.code-inline { padding: 2px 7px; border-radius: 6px; background: #eef1f6; font-family: var(--mono); font-size: 12.5px; color: var(--brand-700); }

.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 11px 16px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; color: var(--ink); min-width: 0; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step-card { position: relative; padding: 24px 24px 22px; border: 1px solid rgba(14, 17, 23, .06); border-radius: 20px; background: #fff; box-shadow: var(--shadow-xs); }
.step-no { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--brand-200); line-height: 1; letter-spacing: -.02em; }
.step-title { margin-top: 12px; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.step-desc { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.step-card.is-done { border-color: #bfe8cf; background: linear-gradient(160deg, #ffffff 0%, var(--green-50) 100%); }
.step-card.is-done .step-no { color: var(--green-500); }

/* ---------------------------------------------------------------- 드롭다운 */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  display: none; min-width: 210px; padding: 8px;
  background: #fff; border: 1px solid rgba(14, 17, 23, .08); border-radius: 18px; box-shadow: var(--shadow-lg);
}
.dropdown.is-open > .dropdown-menu { display: block; animation: pop .14s var(--ease); }
.dropdown-right { left: auto; right: 0; }
.dropdown-label { padding: 6px 12px 4px; font-size: 11.5px; color: var(--ink-4); font-weight: 600; }
.dropdown-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 12px; border: 0; border-radius: 11px; background: none;
  color: var(--ink-2); font-size: 13.5px; text-align: left;
}
.dropdown-item .ico { color: var(--ink-4); }
.dropdown-item:hover { background: #f3f6fb; text-decoration: none; color: var(--ink); }
.dropdown-item.is-active { color: var(--brand); background: var(--brand-50); }
.dropdown-item.danger, .dropdown-item.danger .ico { color: var(--red); }
.dropdown-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dropdown-item-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown-item-sub { font-size: 11.5px; color: var(--ink-4); }
.dropdown-divider { height: 1px; margin: 6px 4px; background: var(--line-2); }

.noti-menu { width: 380px; padding: 0; overflow: hidden; }
.noti-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.noti-head strong { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.noti-list { max-height: 420px; overflow-y: auto; }
.noti-item { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.noti-item:hover { background: #f7faff; text-decoration: none; }
.noti-item.is-unread { background: #f5f9ff; }
.noti-item.is-unread .noti-title { font-weight: 600; }
.noti-item .ico { margin-top: 2px; }
.noti-title { font-size: 13px; line-height: 1.5; }
.noti-time { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }
.noti-empty { padding: 36px 16px; text-align: center; color: var(--ink-4); font-size: 13px; }

/* ---------------------------------------------------------------- 모달 · 서랍 */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 24px; background: rgba(12, 14, 19, .5); backdrop-filter: blur(4px); overflow-y: auto; animation: fade .15s var(--ease); }
.modal-panel { width: 100%; max-width: 640px; background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); }
.modal-sm { max-width: 460px; }
.modal-lg { max-width: 880px; }
.modal-xl { max-width: 1120px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 26px 14px; }
.modal-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.modal-desc { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.modal-body { padding: 10px 26px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 26px; border-top: 1px solid var(--line-2); background: #fafbfd; border-radius: 0 0 24px 24px; }
.modal-foot .left { margin-right: auto; }

.drawer { position: fixed; inset: 0; z-index: 90; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(12, 14, 19, .38); backdrop-filter: blur(3px); animation: fade .15s var(--ease); }
.drawer-panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(580px, calc(100% - 24px)); display: flex; flex-direction: column; background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; animation: slideIn .24s var(--ease); }
.drawer-panel.drawer-wide { width: min(860px, calc(100% - 24px)); }
.drawer-chat { width: min(430px, calc(100% - 24px)); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line-2); }
.drawer-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.drawer-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--line-2); }
.drawer-iframe { flex: 1; width: 100%; border: 0; background: #f4f6fa; }

/* ---------------------------------------------------------------- 토스트 */
.toast-stack { position: fixed; left: 50%; bottom: 30px; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(580px, calc(100vw - 32px)); padding: 13px 20px; border-radius: 999px; background: var(--dark); color: #fff; font-size: 13.5px; box-shadow: var(--shadow-lg); pointer-events: auto; animation: toastIn .22s var(--ease); }
.toast.success .ico { color: #5fd38d; } .toast.error .ico { color: #ff8a80; } .toast.info .ico { color: #8fb3ff; }
.toast.is-leaving { animation: toastOut .2s ease-in forwards; }

/* ---------------------------------------------------------------- 불러오기 */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; opacity: .8; }
.skeleton { position: relative; overflow: hidden; background: #e9edf3; border-radius: 8px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: shimmer 1.2s infinite; }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 52px; color: var(--ink-3); font-size: 13.5px; }

/* ---------------------------------------------------------------- 파일 올리기 */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 42px 20px; border: 2px dashed #cfd7e3; border-radius: 22px; background: linear-gradient(160deg, #fbfcff 0%, #f1f6ff 100%); text-align: center; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: linear-gradient(160deg, #f6faff 0%, #deeaff 100%); }
.dropzone.is-over { transform: scale(1.01); }
.dropzone .ico { width: 30px; height: 30px; padding: 14px; box-sizing: content-box; stroke-width: 1.6; color: #fff; border-radius: 18px; background: var(--brand); box-shadow: var(--shadow-brand); margin-bottom: 6px; }
.dropzone-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.dropzone-desc { font-size: 13px; color: var(--ink-3); }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 13px; }
.file-row .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .size { color: var(--ink-4); font-size: 12px; }
.file-ext { display: inline-grid; place-items: center; min-width: 40px; height: 24px; padding: 0 6px; border-radius: 7px; font-size: 10.5px; font-weight: 700; color: #fff; background: #7b838f; text-transform: uppercase; letter-spacing: .02em; }
.file-ext.pdf { background: #e5483f; } .file-ext.hwp, .file-ext.hwpx { background: #2b8bd9; } .file-ext.docx, .file-ext.doc { background: #2b63dc; }
.file-ext.xlsx, .file-ext.xls, .file-ext.csv { background: #1f9254; } .file-ext.pptx { background: #e8742f; } .file-ext.txt, .file-ext.md { background: #444b55; }
.file-ext.web { background: #0b7f8f; } .file-ext.text { background: #6246ea; } .file-ext.law { background: #0e1117; } .file-ext.api { background: #c2255c; }

/* ---------------------------------------------------------------- 채팅 말풍선 (대화 테스트 · 대화관리) */
.chat-log { display: flex; flex-direction: column; gap: 16px; }
.bubble-row { display: flex; gap: 10px; align-items: flex-start; }
.bubble-row.user { flex-direction: row-reverse; }
.bubble-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 11px; background: var(--dark); color: #fff; font-family: var(--font-display); font-size: 13px; font-weight: 700; }
.bubble { max-width: min(78%, 660px); padding: 12px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); font-size: 14px; line-height: 1.7; white-space: normal; box-shadow: var(--shadow-xs); }
.bubble-row.user .bubble { background: var(--brand); border-color: var(--brand); color: #fff; border-top-right-radius: 6px; box-shadow: 0 6px 16px rgba(43, 99, 220, .2); }
.bubble-row.bot .bubble { border-top-left-radius: 6px; }
.bubble p { margin: 0 0 6px; } .bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 4px 0 6px 18px; }
.bubble-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--ink-4); }
.source-list { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.source-item { display: flex; gap: 7px; align-items: baseline; font-size: 12.5px; color: var(--ink-3); }
.source-no { display: inline-grid; place-items: center; min-width: 19px; height: 19px; border-radius: 6px; background: var(--brand-50); font-size: 11px; font-weight: 700; color: var(--brand); }

/* 판단 과정 */
.pipeline { display: flex; flex-direction: column; gap: 8px; }
.pipe-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pipe-step-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #eef1f6; color: var(--ink-3); }
.pipe-step-icon .ico { width: 14px; height: 14px; stroke-width: 2.2; }
.pipe-step.hit { border-color: #bfe8cf; background: #f5fcf8; } .pipe-step.hit .pipe-step-icon { background: var(--green-500); color: #fff; }
.pipe-step.stop { border-color: #f3dca8; background: #fffbf2; } .pipe-step.stop .pipe-step-icon { background: var(--amber-500); color: #fff; }
.pipe-step.warn { border-color: var(--red-200); background: #fff7f6; } .pipe-step.warn .pipe-step-icon { background: var(--red); color: #fff; }
.pipe-step-label { font-size: 13px; font-weight: 700; }
.pipe-step-detail { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }

/* ---------------------------------------------------------------- 로그인 · 시작 */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: #fff; }
.auth-brand {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  margin: 14px; padding: 44px 52px; border-radius: 30px; overflow: hidden; color: #fff;
  background:
    radial-gradient(620px 420px at 100% 0%, rgba(62, 84, 211, .55) 0%, transparent 65%),
    radial-gradient(560px 460px at 0% 100%, rgba(43, 99, 220, .45) 0%, transparent 65%),
    var(--dark);
}
.auth-brand::after { content: ""; position: absolute; right: -140px; bottom: -140px; width: 460px; height: 460px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 60px rgba(255, 255, 255, .02), 0 0 0 120px rgba(255, 255, 255, .015); pointer-events: none; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 21px; font-weight: 700; }
.auth-logo small { display: block; font-family: var(--font); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; color: rgba(255, 255, 255, .5); }
.auth-headline { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1.3; letter-spacing: -.03em; }
.auth-headline em { font-style: normal; background: linear-gradient(90deg, #8fb3ff, #c7d7ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { margin-top: 18px; font-size: 16px; line-height: 1.75; color: rgba(255, 255, 255, .7); }
.auth-points { margin-top: 38px; display: grid; gap: 10px; }
.auth-point { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); font-size: 14.5px; color: rgba(255, 255, 255, .9); }
.auth-point .ico { color: #8fb3ff; }
.auth-copy { position: relative; z-index: 1; font-size: 12px; letter-spacing: .08em; color: rgba(255, 255, 255, .45); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form { width: 100%; max-width: 390px; }
.auth-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.auth-desc { margin-top: 8px; font-size: 14.5px; color: var(--ink-3); }

.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }

/* ---------------------------------------------------------------- 움직임 */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(28px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- 좁은 화면 */
@media (max-width: 1380px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .grid-main-side, .grid-side-main { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-md { display: none !important; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(calc(-100% - 24px)); transition: transform .25s var(--ease); }
  .app.sidebar-open .sidebar { transform: none; }
  .app.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(12, 14, 19, .4); backdrop-filter: blur(2px); }
  .main { margin-left: 0; }
  .topbar-menu { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 4px 16px 56px; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .feature-grid, .choice-cards, .steps { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .hide-sm { display: none !important; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .topbar { gap: 8px; }
  .page-title { font-size: 20px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dt { margin-top: 8px; }
  .noti-menu { width: calc(100vw - 24px); right: -60px; }
  .user-chip { padding-right: 5px; }
  .drawer-panel, .drawer-panel.drawer-wide, .drawer-chat { top: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; }
}

/* ---------------------------------------------------------------- 보정 (화면 캡처로 확인한 것)
 * ⚠️ 이 블록은 파일 맨 끝에 둔다 — 앞의 규칙을 덮어쓰는 자리다. */

/* 격자 안의 카드는 「카드 다음 카드」 위 여백을 받지 않는다 — 받으면 같은 줄 카드의 윗선이 어긋난다 */
.grid > .card + .card, .grid > .card + .section, .grid > .section + .card, .grid > .section + .section { margin-top: 0; }

/* 메뉴 열기 단추는 서랍이 되는 폭에서만 — .icon-btn 의 display 가 뒤에서 덮어쓰지 않게 */
.topbar .topbar-menu { display: none; }
@media (max-width: 1024px) { .topbar .topbar-menu { display: inline-grid; } }

/* 900px 높이 화면에서도 운영·분석 묶음까지 보이게 LNB 간격을 조금 줄인다 */
.nav-item { padding: 8px 12px; margin: 1px 0; }
.nav-group { margin: 14px 10px 5px; }
.brand { padding: 20px 20px 14px; }
.tt-grid > .card + .card, .ag-grid > .card + .card, .feature-grid > .card + .card, .feature-grid > .feature-card + .feature-card { margin-top: 0; }
.nav { min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.field .seg { display: flex; flex-wrap: nowrap; width: 100%; }
.field .seg button, .field .seg label { flex: 1; padding-left: 8px; padding-right: 8px; text-align: center; }
.empty .btn .ico { width: 16px; height: 16px; padding: 0; margin: 0; border-radius: 0; background: none; color: inherit; stroke-width: 2; }
