/* ─────────────────────────────────────────────────
   SAP Dev Hub – Global Styles
───────────────────────────────────────────────── */

/* 테마별 로고(라이트=원본 PNG / 다크=윤곽 PNG) */
html[data-theme="light"] .brand-logo-dark-only {
  display: none !important;
}
html[data-theme="dark"] .brand-logo-light-only {
  display: none !important;
}
/* 명시 표시(다른 규칙·캐시 이슈 대비) */
html[data-theme="light"] .brand-logo-light-only {
  display: block !important;
}
html[data-theme="dark"] .brand-logo-dark-only {
  display: block !important;
}
.navbar-brand-logo {
  max-height: 29px;
  width: auto;
  vertical-align: middle;
}
.footer-brand-logo {
  max-height: var(--site-footer-logo-max);
  width: auto;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── 다크 테마 (기본) ───────────────────────── */
:root {
  --primary:      #6366f1;
  --primary-dark: #4f46e5;
  --primary-light:#a5b4fc;
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --surface2:     #242736;
  --border:       #2e3147;
  --text:         #e8edf5;
  --muted:        #aeb8c6;
  --label:        #cbd5e1;
  --success:      #22c55e;
  --warning:      #eab308;
  --danger:       #ef4444;
  --info:         #38bdf8;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 24px rgba(0,0,0,.4);
  --navbar-bg:    rgba(15,17,23,.92);
  --site-navbar-padding-y: 0.67rem;
  --site-navbar-logo-height: 1.833rem;
  --site-footer-padding-y: 1rem;
  --site-footer-logo-max: 24px;
  --code-text:    #cdd6f4;
  --code-bg:      #161622;
  --input-bg:     var(--surface2);
  /* 플로팅 ABAP 채팅 — 본문 배경(bg)·카드(surface)와 구분 */
  --abap-float-chat-surface: #232838;
  --abap-float-chat-surface2: #2c3245;
  --abap-float-chat-border: #4a516d;
  /* 스크롤바 — 배경보다 명확한 대비 */
  --scrollbar-track: rgba(255, 255, 255, 0.06);
  --scrollbar-thumb: #505a78;
  --scrollbar-thumb-hover: #7d8aac;
  /* 문의/리뷰 별점 입력 — 미선택 별 윤곽(내부는 비워 보이게) */
  --review-star-outline: rgba(232, 237, 245, 0.55);
  --review-star-outline-strong: rgba(248, 250, 252, 0.88);
  /* 진행 상태 타일(standard_menu_bucket_meta)과 동일 톤 */
  --bucket-proposal-bg: rgba(34, 197, 94, 0.18);
  --bucket-proposal-fg: #22c55e;
  --bucket-analysis-bg: rgba(99, 102, 241, 0.18);
  --bucket-analysis-fg: #6366f1;
  --bucket-in-progress-bg: rgba(234, 179, 8, 0.2);
  --bucket-in-progress-fg: #eab308;
  /* 페이지 배경 텍스처(점 그리드 + 은은한 그라데이션) */
  --page-dot: rgba(255, 255, 255, 0.11);
  --page-dot-size: 20px;
  --page-glow-top: rgba(99, 102, 241, 0.07);
  --page-glow-corner: rgba(56, 189, 248, 0.04);
}

/* ── 라이트 테마 ────────────────────────────── */
html[data-theme="light"] {
  --primary:      #4f46e5;
  --primary-dark: #3730a3;
  --primary-light:#6366f1;
  --bg:           #f1f5f9;
  --surface:      #ffffff;
  --surface2:     #f8fafc;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --muted:        #475569;
  --label:        #334155;
  --success:      #16a34a;
  --warning:      #d97706;
  --danger:       #dc2626;
  --info:         #0284c7;
  --shadow:       0 4px 24px rgba(0,0,0,.1);
  --navbar-bg:    rgba(255,255,255,.92);
  --code-text:    #1e293b;
  --code-bg:      #f8fafc;
  --input-bg:     #ffffff;
  color-scheme:   light;
  --scrollbar-track: #e2e8f0;
  --scrollbar-thumb: #475569;
  --scrollbar-thumb-hover: #334155;
  --abap-float-chat-surface: #e8eef8;
  --abap-float-chat-surface2: #dde7f5;
  --abap-float-chat-border: #b8c5da;
  --review-star-outline: rgba(51, 65, 85, 0.75);
  --review-star-outline-strong: rgba(15, 23, 42, 0.9);
  --page-dot: rgba(51, 65, 85, 0.14);
  --page-dot-size: 20px;
  --page-glow-top: rgba(79, 70, 229, 0.06);
  --page-glow-corner: rgba(2, 132, 199, 0.04);
}

/* ── 라이트 테마 컴포넌트 오버라이드 ─────────── */
html[data-theme="light"] body {
  color: var(--text);
}

/* 보조 텍스트·라벨: 배경과 대비 (Bootstrap .text-muted 포함) */
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .small.text-muted {
  color: #cbd5e1 !important;
}
html[data-theme="light"] .text-muted,
html[data-theme="light"] .small.text-muted {
  color: #475569 !important;
}
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-label.small,
html[data-theme="dark"] label.small {
  color: var(--label) !important;
}
html[data-theme="light"] .form-label,
html[data-theme="light"] .form-label.small,
html[data-theme="light"] label.small {
  color: var(--label) !important;
}
html[data-theme="dark"] .form-label.text-muted,
html[data-theme="dark"] .form-label.small.text-muted {
  color: var(--label) !important;
}
html[data-theme="light"] .form-label.text-muted,
html[data-theme="light"] .form-label.small.text-muted {
  color: var(--label) !important;
}

/* Modals (다크): 본문·닫기(X) — 배경과 대비 */
html[data-theme="dark"] .modal-content { background: var(--surface); color: var(--text); border-color: var(--border); }
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer { border-color: var(--border); }
html[data-theme="dark"] .modal-header .modal-title,
html[data-theme="dark"] .modal-body { color: var(--text); }
html[data-theme="dark"] .btn-close { filter: invert(1) brightness(1.15); opacity: 0.88; }

/* FS·납품 생성 실행 로그 사이드 패널 (허브·관리자 공통) */
.delivery-job-log-sheet {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.delivery-job-log-header {
  background: var(--surface);
  border-color: var(--border) !important;
}
.delivery-job-log-header .modal-title,
.delivery-job-log-sheet > .d-flex.border-bottom .modal-title {
  color: var(--text);
  font-weight: 600;
}
.delivery-job-log-body .hub-job-log-pre,
.hub-job-log-pre {
  background: var(--surface2);
  color: var(--text);
}
html[data-theme="dark"] .delivery-job-log-sheet .nav-tabs {
  border-color: var(--border);
}
html[data-theme="dark"] .delivery-job-log-sheet .nav-tabs .nav-link {
  color: var(--muted);
}
html[data-theme="dark"] .delivery-job-log-sheet .nav-tabs .nav-link.active {
  color: var(--text);
  background: var(--surface2);
  border-color: var(--border);
}
html[data-theme="dark"] .delivery-job-log-sheet .tab-content {
  background: var(--surface);
  border-color: var(--border) !important;
  color: var(--text);
}

html[data-theme="light"] .navbar-custom {
  background: var(--navbar-bg);
  border-bottom-color: var(--border);
}
html[data-theme="light"] .navbar-brand,
html[data-theme="light"] .nav-link { color: var(--text) !important; }
html[data-theme="light"] .nav-link { color: var(--muted) !important; }
html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link.active { color: var(--primary) !important; }
html[data-theme="light"] .navbar-toggler-icon { filter: none; }

html[data-theme="light"] .text-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0284c7 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

html[data-theme="light"] .hero-section {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(79, 70, 229, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% -12%, var(--page-glow-top) 0%, transparent 55%),
    radial-gradient(ellipse 75% 55% at 100% 100%, var(--page-glow-corner) 0%, transparent 50%),
    radial-gradient(circle, var(--page-dot) 1px, transparent 1px);
  background-size: auto, auto, auto, var(--page-dot-size) var(--page-dot-size);
}
html[data-theme="light"] .auth-page {
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(79,70,229,.07) 0%, transparent 60%);
}
html[data-theme="light"] .cta-section {
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(79,70,229,.07) 0%, transparent 70%);
}

html[data-theme="light"] .btn-outline-light {
  border-color: var(--border); color: var(--text);
}
html[data-theme="light"] .btn-outline-light:hover {
  background: var(--surface2); color: var(--text);
}
html[data-theme="light"] .btn-outline-secondary {
  border-color: var(--border); color: var(--muted);
}
html[data-theme="light"] .btn-outline-secondary:hover {
  background: var(--surface2); color: var(--text);
}
html[data-theme="light"] .btn-ghost { color: var(--muted); }
html[data-theme="light"] .btn-ghost:hover { color: var(--text); }

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select {
  background: var(--input-bg); border-color: var(--border); color: var(--text);
}
html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus {
  background: var(--input-bg); color: var(--text);
}
html[data-theme="light"] .form-control::placeholder { color: var(--muted); }
html[data-theme="light"] .input-icon { color: var(--muted); }

html[data-theme="light"] .dropdown-menu {
  background: var(--surface); border-color: var(--border);
}
html[data-theme="light"] .dropdown-item { color: var(--text); }
html[data-theme="light"] .dropdown-item:hover { background: var(--surface2); color: var(--text); }
html[data-theme="light"] .dropdown-divider { border-color: var(--border); }

html[data-theme="light"] .code-body { color: var(--code-text); background: var(--code-bg); }
html[data-theme="light"] .code-body .kw  { color: #4f46e5; }
html[data-theme="light"] .code-body .str { color: #16a34a; }
html[data-theme="light"] .code-body .cm  { color: #94a3b8; }
html[data-theme="light"] .code-header { background: var(--surface2); }

html[data-theme="light"] .free-tag { background: rgba(22,163,74,.1); color: #16a34a; border-color: rgba(22,163,74,.3); }
html[data-theme="light"] .paid-tag { background: rgba(79,70,229,.1); color: #4f46e5; border-color: rgba(79,70,229,.3); }
html[data-theme="light"] .free-badge { background: rgba(22,163,74,.1); color: #16a34a; border-color: rgba(22,163,74,.3); }
html[data-theme="light"] .paid-badge { background: rgba(79,70,229,.1); color: #4f46e5; border-color: rgba(79,70,229,.3); }

html[data-theme="light"] .table { color: var(--text); }
html[data-theme="light"] .table-dark { --bs-table-bg: var(--surface2); --bs-table-color: var(--text); --bs-table-border-color: var(--border); --bs-table-hover-bg: var(--surface); }
html[data-theme="light"] .table-dark thead th { color: var(--muted); border-color: var(--border); }
html[data-theme="light"] .table-dark td { border-color: var(--border); }

html[data-theme="light"] .modal-content { background: var(--surface); color: var(--text); border-color: var(--border); }
html[data-theme="light"] .modal-header { border-color: var(--border); }
html[data-theme="light"] .modal-footer { border-color: var(--border); }
html[data-theme="light"] .btn-close-white { filter: invert(1); }

html[data-theme="light"] .accordion-button { background: var(--surface2); color: var(--text); }
html[data-theme="light"] .accordion-button:not(.collapsed) { background: var(--surface); color: var(--primary); }
html[data-theme="light"] .accordion-button::after { filter: invert(1) hue-rotate(200deg); }
html[data-theme="light"] .accordion-collapse { background: var(--surface); }
html[data-theme="light"] .accordion-item { background: transparent; border-color: var(--border); }

html[data-theme="light"] .alert-success { background: rgba(22,163,74,.1); border-color: rgba(22,163,74,.3); color: #166534; }
html[data-theme="light"] .alert-danger  { background: rgba(220,38,38,.1); border-color: rgba(220,38,38,.3); color: #991b1b; }
html[data-theme="light"] .alert-info    { background: rgba(2,132,199,.1); border-color: rgba(2,132,199,.3); color: #075985; }
html[data-theme="light"] .alert-warning { background: rgba(217,119,6,.1); border-color: rgba(217,119,6,.3); color: #92400e; }

html[data-theme="light"] .badge-module {
  background: rgba(79,70,229,.1); border-color: rgba(79,70,229,.25); color: #4f46e5;
}
html[data-theme="light"] .badge-devtype {
  background: rgba(6,182,212,.1); border-color: rgba(6,182,212,.25); color: #0369a1;
}

html[data-theme="light"] .stat-card { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] .rfp-list-card,
html[data-theme="light"] .rfp-list-card-v2 { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] .rfp-list-card:hover,
html[data-theme="light"] .rfp-list-card-v2:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.08); }

html[data-theme="light"] .answered-round-card { background: var(--surface2); border-color: var(--border); }
html[data-theme="light"] .round-question { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] .round-answer { background: rgba(22,163,74,.06); }
html[data-theme="light"] .round-badge { background: rgba(79,70,229,.1); color: #4f46e5; }

html[data-theme="light"] .proposal-header,
html[data-theme="light"] .proposal-card { background: var(--surface); border-color: var(--border); }

html[data-theme="light"] .interview-summary-toggle summary { color: var(--text); }
html[data-theme="light"] .interview-summary-header { background: var(--surface2); border-color: var(--border); }

html[data-theme="light"] .home-tabs-card { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] .home-nav-tabs .nav-link { color: var(--muted) !important; }
html[data-theme="light"] .home-nav-tabs .nav-link.active { color: var(--primary) !important; background: var(--surface); border-color: var(--border); border-bottom-color: var(--surface); }

html[data-theme="light"] .flow-step.free-step { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] .flow-step.paid-step { background: rgba(79,70,229,.05); border-color: rgba(79,70,229,.2); }
html[data-theme="light"] .highlight-step { background: linear-gradient(135deg, rgba(79,70,229,.08), rgba(124,58,237,.06)) !important; border-color: rgba(79,70,229,.25) !important; }
html[data-theme="light"] .flow-arrow { color: var(--border); }

html[data-theme="light"] .section-light { background: var(--surface2); }
html[data-theme="light"] .section-dark  { background: var(--surface); }

html[data-theme="light"] .codelib-card,
html[data-theme="light"] .admin-content-card,
html[data-theme="light"] .admin-menu-card { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] .admin-menu-card:hover { border-color: var(--primary); }
html[data-theme="light"] .admin-menu-card h5 { color: var(--text); }

html[data-theme="light"] .interview-card,
html[data-theme="light"] .interview-page { /* 배경: page-bg-texture 그룹 */ }

html[data-theme="light"] .generating-card { background: var(--surface); border-color: var(--border); }

html[data-theme="light"] .review-card,
html[data-theme="light"] .review-item-card { background: transparent; border: none; }

html[data-theme="light"] .company-autocomplete-list { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] .company-autocomplete-list li { color: var(--text); }
html[data-theme="light"] .company-autocomplete-list li:hover { background: var(--surface2); }

html[data-theme="light"] .answer-edit-area { background: var(--surface2); color: var(--text); border-color: var(--border); }

html[data-theme="light"] .paid-cta-badge {
  background: rgba(79,70,229,.08); border-color: rgba(79,70,229,.2); color: var(--muted);
}
html[data-theme="light"] .next-step-cta { background: var(--surface2); border-color: var(--border); }
html[data-theme="light"] .rfp-summary-bar { background: var(--surface2); border-color: var(--border); }

html[data-theme="light"] .dashboard-header { background: transparent; }
html[data-theme="light"] .dashboard-search-bar .form-control,
html[data-theme="light"] .dashboard-search-bar .form-select { background: var(--surface); border-color: var(--border); color: var(--text); }

html[data-theme="light"] .analysis-block { background: var(--surface); border-color: var(--border); }
html[data-theme="light"] .analysis-mini-block { background: var(--surface2); border-color: var(--border); }

html[data-theme="light"] .footer { background: var(--surface); border-top-color: var(--border); }

html[data-theme="light"] .chip { background: var(--surface2); border-color: var(--border); color: var(--muted); }
html[data-theme="light"] .chip:hover { border-color: var(--primary); color: var(--text); }
html[data-theme="light"] .chip-input:checked + .chip { background: rgba(79,70,229,.1); border-color: var(--primary); color: var(--primary); }

html[data-theme="light"] .empty-state { color: var(--text); }

html[data-theme="light"] .notice-item { border-bottom-color: var(--border); }

html[data-theme="light"] .lang-btn { color: var(--muted); }
html[data-theme="light"] .lang-btn.active,
html[data-theme="light"] .lang-btn:hover { color: var(--primary); background: rgba(79,70,229,.08); }
html[data-theme="light"] .lang-sep { color: var(--border); }

html[data-theme="light"] .theme-switch:hover .theme-switch-track { border-color: rgba(79,70,229,.35); }

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --bg 페이지 영역: 점 그리드 + 은은한 그라데이션 (히어로·홈·목록 등) */
body,
.hero-section,
#home-features.section-light,
.dashboard-page,
.rfp-page,
.interview-page,
.proposal-page,
.subscription-plans-page {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -12%, var(--page-glow-top) 0%, transparent 55%),
    radial-gradient(ellipse 75% 55% at 100% 100%, var(--page-glow-corner) 0%, transparent 50%),
    radial-gradient(circle, var(--page-dot) 1px, transparent 1px);
  background-size: auto, auto, var(--page-dot-size) var(--page-dot-size);
}

main { flex: 1; }

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); }

/* ── Utilities ─────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #a78bfa 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }
.min-vh-80 { min-height: 80vh; }

/* ── Navbar ────────────────────────────────── */
.navbar-custom {
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--site-navbar-padding-y) 0;
  position: sticky;
  top: 0;
  z-index: 999;
  overflow: visible;
}
.navbar-custom .navbar-nav .nav-link {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text) !important;
  letter-spacing: -.3px;
}
/* 로고 PNG 투명만 보이도록: 정사각형 박스·레터백스 제거, 배경색 없음 */
.navbar-brand-logo {
  display: block;
  height: var(--site-navbar-logo-height);
  width: auto;
  max-height: var(--site-navbar-logo-height);
  object-fit: contain;
  flex-shrink: 0;
  background: none !important;
  border-radius: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
html[data-theme="light"] .navbar-brand-logo {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}
.navbar-brand i { color: var(--primary); }
.nav-link { color: var(--muted) !important; font-weight: 500; transition: color .2s; }
.nav-link:hover { color: var(--text) !important; }
.navbar-toggler { border-color: var(--border); }
.navbar-toggler-icon { filter: invert(1); }

/* Lang Toggle */
.lang-toggle { display: flex; align-items: center; gap: 4px; }
.lang-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: .85rem; font-weight: 600;
  padding: 2px 6px; border-radius: 4px; transition: all .2s;
}
.lang-btn.active, .lang-btn:hover { color: var(--primary-light); background: rgba(99,102,241,.1); }
.lang-sep { color: var(--border); }

/* Theme Toggle — 좌우 슬라이드 (왼쪽=다크, 오른쪽=라이트) */
.theme-switch {
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 8px; line-height: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.theme-switch:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}
.theme-switch:hover { background: rgba(99,102,241,.08); }
.theme-switch-track {
  position: relative;
  width: 3.5rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  box-sizing: border-box;
  transition: border-color .2s, background .2s;
}
.theme-switch-thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 1.375rem;
  height: 1.375rem;
  margin-top: -0.6875rem;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: left .28s ease, background .2s;
  z-index: 2;
}
html[data-theme="light"] .theme-switch-thumb {
  left: calc(100% - 3px - 1.375rem);
  background: #fbbf24;
  box-shadow: 0 1px 3px rgba(251,191,36,.45);
}
.theme-switch-icon-wrap {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--muted);
  pointer-events: none;
  transition: color .2s, opacity .2s;
  font-size: 0.78rem;
  filter: drop-shadow(0 0 0.5px rgba(0,0,0,.35));
}
.theme-switch-icon-wrap--left { left: 6px; }
.theme-switch-icon-wrap--right { right: 6px; }
.theme-sun-icon {
  width: 15px;
  height: 15px;
  display: block;
  filter: drop-shadow(0 0 0.4px rgba(0,0,0,.4));
}
html[data-theme="dark"] .theme-switch-icon-wrap--left { color: #e0e7ff; opacity: 1; }
html[data-theme="dark"] .theme-switch-icon-wrap--right { color: #fde68a; opacity: 0.82; }
html[data-theme="light"] .theme-switch-icon-wrap--left { color: #6366f1; opacity: 0.82; }
html[data-theme="light"] .theme-switch-icon-wrap--right { color: #ea580c; opacity: 1; }

/* Buttons */
.btn-primary {
  background: var(--primary); border-color: var(--primary);
  font-weight: 600; border-radius: var(--radius-sm);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-light { border-color: var(--border); color: var(--text); }
.btn-outline-light:hover { background: var(--surface2); color: var(--text); border-color: var(--border); }
.btn-outline-secondary { border-color: var(--border); color: var(--muted); background: transparent; }
.btn-outline-secondary:hover { background: var(--surface2); color: var(--text); border-color: var(--border); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary-light); background: transparent; }
.btn-outline-primary:hover { background: rgba(99,102,241,.1); color: var(--primary-light); border-color: var(--primary); }
.btn-ghost { background: transparent; border: none; color: var(--muted); padding: 0; font-size: .9rem; }
.btn-ghost:hover { color: var(--text); }

/* ── Footer ────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: var(--site-footer-padding-y);
  padding-bottom: var(--site-footer-padding-y);
}
.footer p {
  margin-bottom: 0.35rem;
}
.footer p:last-child {
  margin-bottom: 0;
}
.footer-legal-link {
  color: var(--primary);
  font-weight: 700;
}
.footer-legal-link:hover {
  color: var(--primary-light, var(--primary));
  text-decoration: underline !important;
}

/* ── Hero ──────────────────────────────────── */
.hero-section {
  padding: 5rem 0 4rem;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% -12%, var(--page-glow-top) 0%, transparent 55%),
    radial-gradient(ellipse 75% 55% at 100% 100%, var(--page-glow-corner) 0%, transparent 50%),
    radial-gradient(circle, var(--page-dot) 1px, transparent 1px);
  background-size: auto, auto, auto, var(--page-dot-size) var(--page-dot-size);
}
.badge-pill {
  display: inline-flex; align-items: center;
  background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.3);
  color: var(--primary-light); padding: .35rem .9rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; letter-spacing: .4px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.5px; margin-bottom: 1.25rem;
}
.hero-power-agents {
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0;
  display: inline-block;
  line-height: 1.25;
}
.hero-sub { font-size: 1.1rem; color: var(--muted); line-height: 1.7; margin-bottom: 2rem; max-width: 500px; }

/* Hero stats */
.hero-stats { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 1.6rem; font-weight: 700; color: var(--primary-light); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Code Card */
.hero-visual { display: flex; justify-content: center; }
.code-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; width: 100%;
  box-shadow: var(--shadow);
}
.code-header {
  background: var(--surface2); padding: .75rem 1rem;
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
}
.dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }
.dot.red    { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #27c93f; }
.code-title { color: var(--muted); font-size: .82rem; font-family: monospace; }
.code-body { margin: 0; padding: 1.25rem; font-size: .82rem; line-height: 1.7; color: var(--code-text, #cdd6f4); overflow-x: auto; }
.code-body .kw  { color: #cba6f7; font-weight: 600; }
.code-body .str { color: #a6e3a1; }
.code-body .cm  { color: #6c7086; }

/* 코드 라이브러리 상세 — 원본 ABAP (라이트 모드 가독성) */
.codelib-source-pre {
  background: var(--surface2);
  margin: 0;
  padding: 1.25rem;
  font-size: .82rem;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid var(--border);
  color: var(--code-text);
}
.codelib-source-pre code {
  color: inherit;
  font-family: ui-monospace, Consolas, "Segoe UI Mono", monospace;
  white-space: inherit;
}
/* 납품 슬롯: Bootstrap .text-wrap(white-space:normal!important) 사용 금지 */
.delivered-slot-source-pre {
  max-height: 28rem;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
}
html[data-theme="light"] .codelib-source-pre {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* 코드 라이브러리 — 분석 결과 접기/펼치기 */
.analysis-fold {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
}
.analysis-fold-summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
.analysis-fold-summary::-webkit-details-marker { display: none; }
.analysis-fold[open] > .analysis-fold-summary {
  border-bottom: 1px solid var(--border);
}
.analysis-fold-body {
  padding: 1rem 1.15rem;
  color: var(--text);
  line-height: 1.65;
}
.analysis-pre-wrap {
  white-space: pre-wrap;
  word-break: break-word;
}
.analysis-mapping-block {
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
}
.analysis-mapping-desc {
  white-space: pre-wrap;
  word-break: break-word;
}
.analysis-mapping-key {
  letter-spacing: 0.02em;
}
.analysis-list li code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--surface2) 85%, var(--border));
}

/* ── Sections ──────────────────────────────── */
.section-light { background: var(--surface); }
.section-dark  { background: var(--surface2); }
/* 홈 타일: .page-bg-texture 그룹(#home-features.section-light)과 동일 배경 */
.section-title { font-size: 2rem; font-weight: 700; }
.section-sub   { font-size: 1.05rem; }

/* Step Cards */
.step-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; height: 100%;
  transition: transform .2s, box-shadow .2s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-card-highlight {
  background: linear-gradient(135deg, rgba(99,102,241,.15) 0%, rgba(167,139,250,.1) 100%);
  border-color: rgba(99,102,241,.4);
}
.step-icon-wrap { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.step-num { font-size: 2.5rem; font-weight: 800; color: var(--border); line-height: 1; }
.step-icon { font-size: 1.8rem; color: var(--primary-light); }
.step-tag {
  display: inline-block; margin-top: 1rem;
  padding: .2rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .5px;
}
.free-tag { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.paid-tag { background: rgba(99,102,241,.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,.3); }

/* Module Badges */
.module-badge {
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.25);
  color: var(--primary-light); padding: .4rem 1rem; border-radius: 999px;
  font-size: .85rem; font-weight: 500;
}

/* CTA */
.cta-section { background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(99,102,241,.12) 0%, transparent 70%); }

/* ── Auth Pages ────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 140px);
  display: flex; align-items: center;
  padding: 3rem 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(99,102,241,.1) 0%, transparent 60%);
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2.5rem;
  box-shadow: var(--shadow);
}
.auth-logo {
  width: 56px; height: 56px; background: var(--primary); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; margin: 0 auto 1.5rem;
}
.auth-logo--cat {
  background: transparent;
  width: auto;
  height: auto;
}
.auth-logo--cat .auth-logo-img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: #ffffff;
  color: #2f3236;
  border: 1px solid rgba(60, 64, 67, 0.18);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}
.auth-google-btn:hover,
.auth-google-btn:focus {
  background: #f8f9fa;
  color: #2f3236;
  border-color: rgba(60, 64, 67, 0.28);
}
.auth-google-btn .ia-google-g {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
html[data-theme="dark"] .auth-google-btn {
  background: #ffffff;
  color: #2f3236;
}
.auth-title { font-weight: 700; text-align: center; margin-bottom: .35rem; }
.auth-sub   { text-align: center; margin-bottom: 1.75rem; }

/* Input with icon */
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); z-index: 5; font-size: .9rem;
}
.input-with-icon { padding-left: 2.5rem !important; }
.form-control {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
}
.form-control:focus {
  background: var(--surface2); border-color: var(--primary);
  color: var(--text); box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
.form-control::placeholder { color: var(--muted); }
.form-label { font-size: .9rem; font-weight: 500; color: var(--label); margin-bottom: .4rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ── RFP Form ──────────────────────────────── */
.rfp-page { /* 배경: page-bg-texture 그룹 */ }
.rfp-title { font-weight: 700; font-size: 1.75rem; }

/* 제목·프로그램 ID: 입력란 오른쪽 끝에 붙는 AI 버튼 (input-group) */
.rfp-field-ai-wrap .rfp-ai-inline-btn {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  letter-spacing: -0.02em;
}
.rfp-field-ai-wrap .rfp-ai-inline-btn--title {
  color: #c7d2fe;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.35), rgba(79, 70, 229, 0.2));
}
.rfp-field-ai-wrap .rfp-ai-inline-btn--title:hover {
  color: #eef2ff;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.5), rgba(79, 70, 229, 0.32));
}
.rfp-field-ai-wrap .rfp-ai-inline-btn--pid {
  color: #99f6e4;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.28), rgba(15, 118, 110, 0.22));
}
.rfp-field-ai-wrap .rfp-ai-inline-btn--pid:hover {
  color: #ccfbf1;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.42), rgba(15, 118, 110, 0.32));
}
html[data-theme="light"] .rfp-field-ai-wrap .rfp-ai-inline-btn--title {
  color: #312e81;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.08));
}
html[data-theme="light"] .rfp-field-ai-wrap .rfp-ai-inline-btn--title:hover {
  color: #1e1b4b;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.32), rgba(99, 102, 241, 0.14));
}
html[data-theme="light"] .rfp-field-ai-wrap .rfp-ai-inline-btn--pid {
  color: #0f766e;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.35), rgba(20, 184, 166, 0.12));
}
html[data-theme="light"] .rfp-field-ai-wrap .rfp-ai-inline-btn--pid:hover {
  color: #134e4a;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.48), rgba(20, 184, 166, 0.2));
}

/* Progress */
.rfp-progress {
  display: flex; align-items: center; gap: 0;
}
.rfp-step { display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 80px; }
.rfp-step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: var(--muted);
  transition: all .3s;
}
.rfp-step.active .rfp-step-circle {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.rfp-step-label { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.rfp-step.active .rfp-step-label { color: var(--primary-light); }
.rfp-step-line { flex: 1; height: 2px; background: var(--border); margin-bottom: 22px; }

/* RFP Sections */
.rfp-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; margin-bottom: 1.5rem;
}
.rfp-section-last { margin-bottom: 0; }
.rfp-section-header { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.75rem; }
.rfp-section-num {
  font-size: 2rem; font-weight: 800; color: var(--border); line-height: 1;
  min-width: 40px;
}

/* Chip Multi-Select */
.chip-group { display: flex; flex-wrap: wrap; gap: .65rem; }
.chip-label { cursor: pointer; }
.chip-input { position: absolute; opacity: 0; pointer-events: none; }
.chip {
  display: inline-flex; align-items: center; padding: .5rem 1rem;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--muted);
  transition: all .2s; user-select: none; flex-direction: column; text-align: center;
}
.chip small { font-size: .7rem; color: var(--muted); line-height: 1.1; }
.chip-input:checked + .chip {
  background: rgba(99,102,241,.15); border-color: var(--primary);
  color: var(--primary-light);
}
.chip-input:checked + .chip small { color: var(--primary-light); opacity: .7; }
.chip:hover { border-color: var(--primary); color: var(--text); }

/* Textarea */
.rfp-textarea {
  min-height: 200px; resize: vertical;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  font-size: .95rem; line-height: 1.7;
}
.rfp-textarea:focus {
  background: var(--surface2); border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.2); color: var(--text);
}

/* 요구사항 캡처 붙여넣기 (분석·개선) */
.req-screenshots-paste-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  text-align: center;
  cursor: pointer;
  background: var(--surface2);
  color: var(--muted);
  font-size: .9rem;
  transition: border-color .2s, background .2s;
}
.req-screenshots-paste-zone:focus,
.req-screenshots-paste-zone:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,.06);
  color: var(--text);
  outline: none;
}
.req-screenshots-list {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.req-screenshots-item {
  position: relative;
  width: 140px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
}
.req-screenshots-item img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  background: #111;
}
.req-screenshots-item-meta {
  padding: .25rem .5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.req-screenshots-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 0 .35rem;
  line-height: 1.2;
}
.req-screenshots-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .5rem;
}
.req-screenshots-gallery-item {
  display: block;
  width: 160px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
}
.req-screenshots-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  background: #111;
}

.req-rich-editor {
  min-height: 200px;
  overflow-y: auto;
  line-height: 1.7;
  color: var(--text);
  caret-color: var(--text);
  -webkit-text-fill-color: var(--text);
}
/* 서식·이미지(contenteditable): 붙여넣기·브라우저 기본 div/p가 검정 글자로 남는 문제(3개 요청 폼·KB 공통) */
.req-rich-field .req-rich-editor :is(p, div, span, li, strong, b, em, i, u, ul, ol) {
  color: var(--text);
}
html[data-theme="dark"] .req-rich-field .req-rich-editor,
html[data-theme="dark"] .req-rich-field .req-rich-editor :not(img) {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}
html[data-theme="dark"] .req-rich-field .req-rich-plain {
  color: var(--text);
  caret-color: var(--text);
}
.req-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
  -webkit-text-fill-color: var(--muted);
}
.req-rich-editor img.req-inline-img,
.req-rich-body img.req-inline-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: .5rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.req-rich-body ul, .req-rich-body ol {
  margin-bottom: .5rem;
  padding-left: 1.25rem;
}

/* Tips */
.rfp-tips {
  background: rgba(234,179,8,.06); border: 1px solid rgba(234,179,8,.2);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
}
.rfp-tip-header { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.rfp-tip-list { margin: 0; padding-left: 1.25rem; }
.rfp-tip-list li { font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }

/* File Drop Zone */
.file-drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 3rem 2rem; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--surface2);
}
.file-drop-zone:hover, .file-drop-zone.dragover {
  border-color: var(--primary); background: rgba(99,102,241,.05);
}
/* 네이티브 파일 input 오버레이(클릭 가능) 레이아웃 — 표시 숨김 대신 레이어링 */
.file-drop-zone:has(.file-drop-hit-target) {
  border: none;
  padding: 0;
  background: transparent;
  cursor: default;
}
.file-drop-hit-target {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, background .2s;
  background: var(--surface2);
}
.file-drop-zone:has(.file-drop-hit-target):hover .file-drop-hit-target,
.file-drop-zone.dragover .file-drop-hit-target {
  border-color: var(--primary);
  background: rgba(99,102,241,.05);
}
.file-drop-native-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 0;
}
.file-drop-content { pointer-events: none; position: relative; z-index: 0; color: inherit; }
/* 네비: 분석·개선 — 홈 타일과 동일 (라이트 solid / 다크 regular) */
.nav-icon-analysis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1.05em;
}
.nav-icon-analysis .nav-icon-analysis-light { display: none; }
.nav-icon-analysis .nav-icon-analysis-dark { display: inline-block; opacity: 0.92; }
html[data-theme="light"] .nav-icon-analysis .nav-icon-analysis-light { display: inline-block; }
html[data-theme="light"] .nav-icon-analysis .nav-icon-analysis-dark { display: none; }
html[data-theme="dark"] .nav-icon-analysis .nav-icon-analysis-light { display: none; }
html[data-theme="dark"] .nav-icon-analysis .nav-icon-analysis-dark { display: inline-block; }
.file-drop-icon { font-size: 2.5rem; color: var(--muted); margin-bottom: .75rem; display: block; }

/* Review Box */
.review-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 1.5rem;
}
.review-row {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--border);
}
.review-row:last-child { border-bottom: none; }
.review-label { font-size: .85rem; color: var(--muted); min-width: 150px; flex-shrink: 0; }
.review-value { font-size: .9rem; flex: 1; display: flex; flex-wrap: wrap; gap: .35rem; }

/* Free Badge Row */
.free-badge-row { margin-bottom: 1rem; }
.free-badge-card {
  background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.25);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  font-size: .9rem; color: var(--text);
}

/* ── Dashboard ─────────────────────────────── */
.dashboard-page { /* 배경: page-bg-texture 그룹 */ }
.dashboard-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* Stat Cards (컴팩트: 패딩·간격 축소) */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 0.85rem;
}
.stat-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.12rem; flex-shrink: 0;
}
.stat-card-num { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-card-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-card-link.stat-card-tile-active {
  border: 2px solid var(--primary-light);
  box-shadow: 0 0 0 1px rgba(129,140,248,.35);
}

/* RFP List Cards (컴팩트: 타일 상하·좌우 여백 축소) */
.rfp-list-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.55rem 0.75rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.65rem; transition: border-color .2s;
}
.rfp-list-card:hover { border-color: var(--primary); }
.rfp-list-left { display: flex; align-items: center; gap: 0.65rem; flex: 1; min-width: 0; }
.rfp-list-right { display: flex; align-items: center; flex-shrink: 0; }
.rfp-list-status {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.status-submitted { background: rgba(234,179,8,.15);  color: #eab308; }
.status-in_review { background: rgba(56,189,248,.15);  color: #38bdf8; }
.status-completed { background: rgba(34,197,94,.15);   color: #22c55e; }
.status-draft     { background: rgba(148,163,184,.15); color: #94a3b8; }

.rfp-list-title { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }
.rfp-list-meta  { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }

.badge-module {
  background: rgba(99,102,241,.12); color: var(--primary-light);
  border: 1px solid rgba(99,102,241,.25);
  padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 500;
}
.badge-devtype {
  background: rgba(56,189,248,.1); color: #7dd3fc;
  border: 1px solid rgba(56,189,248,.2);
  padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 500;
}

.rfp-status-badge {
  padding: .2rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
}
.status-badge-submitted { background: rgba(234,179,8,.15);  color: #eab308; }
.status-badge-in_review { background: rgba(56,189,248,.15);  color: #38bdf8; }
.status-badge-completed { background: rgba(34,197,94,.15);   color: #22c55e; }
.status-badge-draft     { background: rgba(148,163,184,.15); color: #94a3b8; }

/* Empty State */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty-icon { font-size: 3rem; color: var(--border); display: block; margin-bottom: 1rem; }

/* ── Success Page ──────────────────────────── */
.success-page {
  min-height: calc(100vh - 140px);
  background: radial-gradient(ellipse 60% 40% at 50% -10%, rgba(34,197,94,.1) 0%, transparent 60%);
}
.success-icon-wrap { display: flex; justify-content: center; }
.success-icon {
  width: 80px; height: 80px; background: rgba(34,197,94,.15);
  border: 2px solid rgba(34,197,94,.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: #22c55e;
  animation: pop-in .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-align: left;
}
.success-row {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--border);
}
.success-row:last-child { border-bottom: none; }
.success-label { min-width: 130px; font-size: .85rem; color: var(--muted); flex-shrink: 0; }
.success-value { flex: 1; display: flex; flex-wrap: wrap; gap: .35rem; }

.next-steps { text-align: left; }
.next-step-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: .75rem;
}
.next-step-icon {
  width: 40px; height: 40px; background: rgba(99,102,241,.12);
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; color: var(--primary-light); font-size: 1.1rem; flex-shrink: 0;
}

/* 접수 완료 — AI 인터뷰 시작 (분석 단계 타일과 동일한 반투명 인디고) */
.success-page a.btn.btn-success-interview {
  background: var(--bucket-analysis-bg) !important;
  border: 1px solid color-mix(in srgb, var(--bucket-analysis-fg) 38%, transparent) !important;
  color: var(--bucket-analysis-fg) !important;
  box-shadow: none;
}
.success-page a.btn.btn-success-interview:hover,
.success-page a.btn.btn-success-interview:focus {
  background: color-mix(in srgb, var(--bucket-analysis-bg) 70%, var(--bucket-analysis-fg)) !important;
  border-color: color-mix(in srgb, var(--bucket-analysis-fg) 50%, transparent) !important;
  color: var(--bucket-analysis-fg) !important;
  box-shadow: none;
}

/* ── Alerts ────────────────────────────────── */
.alert-danger {
  background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3);
  color: #fca5a5; border-radius: var(--radius-sm);
}
.alert-success {
  background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3);
  color: #86efac; border-radius: var(--radius-sm);
}
/* Bootstrap alert vars follow data-bs-theme=light; dark UI needs explicit warning panel contrast */
html[data-theme="dark"] .alert-warning {
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde68a;
  border-radius: var(--radius-sm);
}
html[data-theme="dark"] .alert-warning .text-muted,
html[data-theme="dark"] .alert-warning .small.text-muted {
  color: #d6d3d1 !important;
}
html[data-theme="dark"] .alert-warning a {
  color: #fef08a;
  font-weight: 600;
}
html[data-theme="dark"] .alert-warning a:hover {
  color: #fffbeb;
}

/* Dropdown */
.dropdown-menu {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.dropdown-item { color: var(--text); font-size: .9rem; }
.dropdown-item:hover { background: var(--surface); color: var(--text); }
.dropdown-divider { border-color: var(--border); }

/* Scrollbar (WebKit/Chromium · Firefox scrollbar-color) */
html {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: auto;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 5px;
  min-height: 40px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* ── Interview Page ────────────────────────── */
.interview-page { /* 배경: page-bg-texture 그룹 */ }

.interview-ai-icon {
  width: 52px; height: 52px; background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; color: #fff; flex-shrink: 0;
}

.rfp-summary-bar {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .6rem 1rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
}

.interview-progress .progress-bar { transition: width .4s ease; }
.text-primary-light { color: var(--primary-light) !important; }

/* Answered rounds */
.answered-round-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin-bottom: .75rem;
  opacity: .85;
}
.round-badge {
  display: inline-block; background: rgba(99,102,241,.12); color: var(--primary-light);
  border: 1px solid rgba(99,102,241,.25); border-radius: 999px;
  font-size: .75rem; font-weight: 600; padding: .15rem .65rem; margin-bottom: .65rem;
}
.round-question {
  font-size: .88rem; color: var(--muted); padding: .3rem 0; border-bottom: 1px solid var(--border);
}
.round-question:last-of-type { border-bottom: none; }
.round-answer {
  background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.2);
  border-radius: var(--radius-sm); padding: .65rem .85rem;
  font-size: .88rem; color: var(--text); margin-top: .65rem; white-space: pre-wrap;
}

/* Current round card */
.current-round-card {
  background: var(--surface); border: 1.5px solid rgba(99,102,241,.4);
  border-radius: var(--radius); padding: 2rem;
  box-shadow: 0 0 30px rgba(99,102,241,.08);
}
.current-round-header {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.ai-avatar {
  width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; flex-shrink: 0;
}
.question-item {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: .85rem 0; border-bottom: 1px solid var(--border);
}
.question-item:last-child { border-bottom: none; }
.question-num {
  background: var(--primary); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}
.question-text { font-size: .95rem; line-height: 1.6; }

.interview-tip {
  background: rgba(234,179,8,.05); border: 1px solid rgba(234,179,8,.15);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
}
.loading-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Proposal Page ─────────────────────────── */
.proposal-page { /* 배경: page-bg-texture 그룹 */ }

.proposal-icon {
  width: 56px; height: 56px; background: rgba(34,197,94,.15);
  border: 2px solid rgba(34,197,94,.3); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #22c55e; flex-shrink: 0;
}

.proposal-header {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem;
}

.paid-cta-badge {
  background: rgba(234,179,8,.1); border: 1px solid rgba(234,179,8,.25);
  color: #eab308; padding: .4rem .9rem; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 500;
}

/* Proposal Card */
.proposal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.proposal-body {
  padding: 2.5rem;
  line-height: 1.8;
  font-size: .95rem;
}
.proposal-body h1 {
  font-size: 1.5rem; font-weight: 700; padding-bottom: .75rem;
  border-bottom: 2px solid var(--primary); margin-bottom: 1.5rem; color: var(--text);
}
.proposal-body h2 {
  font-size: 1.15rem; font-weight: 700; color: var(--primary-light);
  margin-top: 2rem; margin-bottom: .75rem; padding-left: .75rem;
  border-left: 3px solid var(--primary);
}
.proposal-body h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-top: 1rem; }
.proposal-body p { color: var(--text); margin-bottom: .65rem; }
.proposal-body ul, .proposal-body ol { padding-left: 1.5rem; margin-bottom: .75rem; }
.proposal-body li { color: var(--text); margin-bottom: .3rem; }
.proposal-body strong { color: var(--primary-light); }
.proposal-body hr { border-color: var(--border); margin: 1.5rem 0; }
.proposal-body code {
  background: var(--surface2); padding: .1rem .4rem; border-radius: 4px;
  font-size: .85em; color: #7dd3fc;
}
html[data-theme="light"] .proposal-body h2 {
  color: var(--primary-dark);
}
html[data-theme="light"] .proposal-body strong {
  color: var(--text);
  font-weight: 700;
}
html[data-theme="light"] .proposal-body code {
  color: var(--code-text);
}
html[data-theme="dark"] .proposal-body strong {
  color: var(--text);
  font-weight: 700;
}
html[data-theme="dark"] .proposal-body code {
  color: #bae6fd;
}

/* Interview Summary (details toggle) */
.interview-summary-toggle {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.interview-summary-header {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 500;
  color: var(--muted); list-style: none;
}
.interview-summary-header:hover { color: var(--text); }
.interview-summary-body { padding: 0 1.25rem 1.25rem; }

/* ABAP 분석·개선 상세 등 — 단계 본문: summary(.interview-summary-header)와 동일 좌우 여백 */
.proposal-page .interview-summary-toggle.rfp-hub-phase > .rfp-hub-phase-body {
  padding: 0.35rem 1.25rem 0.75rem;
}
.proposal-page .rfp-hub-phase-body > .interview-summary-body {
  padding-left: 0;
  padding-right: 0;
}

/* FS·납품 “생성 진행 중” 모달 — 에이전트 라벨 (max-width:7rem 등으로 한글·「」 라벨이 단어 중간에서 끊기던 문제) */
.delivery-gen-step {
  opacity: 0.35;
  transition: opacity 0.5s;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  padding: 0 0.25rem;
  box-sizing: border-box;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.delivery-gen-step.active { opacity: 1; }

/* Next Step CTA */
.next-step-cta {
  background: linear-gradient(135deg, rgba(99,102,241,.1) 0%, rgba(167,139,250,.08) 100%);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: var(--radius); padding: 1.75rem;
}

/* ── Code Library Upload ───────────────────── */

/* SE80 안내 가이드 */
.se80-guide {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
}
.se80-guide-title { font-weight: 600; font-size: .9rem; margin-bottom: .75rem; }
.se80-guide-items { display: flex; flex-direction: column; gap: .4rem; }
.se80-item {
  display: flex; align-items: center; gap: .75rem;
  font-size: .85rem; padding: .3rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.se80-item:last-child { border-bottom: none; }
.se80-desc { color: var(--muted); font-size: .78rem; margin-left: auto; }
.se80-badge {
  font-size: .7rem; font-weight: 700; padding: .15rem .55rem;
  border-radius: 999px; min-width: 42px; text-align: center;
}
.essential-badge { background: rgba(34,197,94,.15);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.optional-badge  { background: rgba(234,179,8,.12);  color: #eab308; border: 1px solid rgba(234,179,8,.3); }
.skip-badge      { background: rgba(148,163,184,.1); color: #94a3b8; border: 1px solid rgba(148,163,184,.2); }

/* 코드 섹션 블록 */
.code-section {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: .75rem; overflow: hidden;
  transition: border-color .2s;
}
.code-section:focus-within { border-color: var(--primary); }

.code-section-header {
  display: flex; align-items: center;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: .6rem .85rem; gap: .5rem;
}
.section-drag-handle {
  color: var(--border); cursor: grab; padding: 0 .25rem; font-size: .9rem;
}
.section-drag-handle:hover { color: var(--muted); }

.section-type-select, .section-name-input {
  background: var(--surface2) !important; border-color: var(--border) !important;
  color: var(--text) !important; font-size: .82rem !important;
}
.section-type-select:focus, .section-name-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(99,102,241,.15) !important;
}

.section-code {
  background: #0d1117 !important; border: none !important; border-radius: 0 !important;
  color: #c9d1d9 !important; font-family: 'Consolas', 'Monaco', monospace !important;
  font-size: .82rem !important; line-height: 1.6 !important;
  padding: 1rem !important; resize: vertical;
}
.section-code:focus {
  background: #0d1117 !important; box-shadow: none !important;
}
.section-code::placeholder { color: #484f58 !important; }

/* Mobile */
@media (max-width: 576px) {
  .rfp-progress { gap: 0; }
  .rfp-step { min-width: 60px; }
  .rfp-step-label { display: none; }
  .rfp-list-title { max-width: 200px; }
  .review-label { min-width: 100px; }
}

/* ── Hero (compact) ────────────────────────── */
/* 홈 히어로: 사용 안내 패널 높이에 맞춘 컴팩트 레이아웃 */
.hero-section.hero-compact {
  --hero-compact-pad-top: 0.5rem;
  --hero-compact-pad-bottom: 0.35rem;
  --hero-compact-gutter-y: 0;
  --hero-compact-title-gap: 0.28rem;
  --home-guide-card-height: 12.5rem;
  padding: var(--hero-compact-pad-top) 0 var(--hero-compact-pad-bottom) !important;
  min-height: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% -12%, var(--page-glow-top) 0%, transparent 55%),
    radial-gradient(ellipse 75% 55% at 100% 100%, var(--page-glow-corner) 0%, transparent 50%),
    radial-gradient(circle, var(--page-dot) 1px, transparent 1px);
  background-size: auto, auto, auto, var(--page-dot-size) var(--page-dot-size);
}
html[data-theme="light"] .hero-section.hero-compact {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(79, 70, 229, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% -12%, var(--page-glow-top) 0%, transparent 55%),
    radial-gradient(ellipse 75% 55% at 100% 100%, var(--page-glow-corner) 0%, transparent 50%),
    radial-gradient(circle, var(--page-dot) 1px, transparent 1px);
  background-size: auto, auto, auto, var(--page-dot-size) var(--page-dot-size);
}
.hero-compact .hero-title { margin-bottom: var(--hero-compact-title-gap); }
.hero-compact .hero-sub { margin-bottom: 0; line-height: 1.45; font-size: 0.92rem; }
.hero-compact .hero-home-split { --bs-gutter-y: var(--hero-compact-gutter-y); }
.hero-home-split__hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  flex-grow: 0;
  flex-shrink: 0;
  background: transparent;
}
.hero-home-split__guide {
  min-width: 0;
  align-self: flex-start;
  height: auto;
  flex-grow: 0;
}
.hero-compact .hero-home-split {
  align-items: flex-start;
  --bs-gutter-y: 0;
  margin-bottom: 0;
}
.hero-compact .hero-home-split > [class*="col-"] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
@media (min-width: 992px) {
  .hero-compact .hero-home-split.row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
    column-gap: 1rem;
    row-gap: 0;
    align-items: start;
  }
  .hero-compact .hero-home-split > .hero-home-split__hero,
  .hero-compact .hero-home-split > .hero-home-split__guide {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
  }
}

/* 홈 히어로: 마케팅(썸네일) 3 · 사용 안내(동영상) 2 */
@media (min-width: 992px) {
  .hero-home-split > .hero-home-split__hero {
    align-self: flex-start !important;
  }
}

/* 히어로 사용 안내 카드 — 높이 고정(코딩 데모·동영상 내부 스크롤) */
.home-guide-card {
  --home-guide-card-height: 14.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: var(--home-guide-card-height);
  min-height: var(--home-guide-card-height);
  max-height: var(--home-guide-card-height);
}
.home-guide-card-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.home-guide-card-top .home-guide-icon {
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.82rem;
  margin: 0;
}
.home-guide-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}
.home-guide-video-wrap {
  flex: 1 1 0;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* 동영상·데모: 고정 카드 본문 안에서만 표시 */
.home-guide-video-stage {
  position: relative;
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  height: 100%;
  display: block;
  background: #0a0a0f;
  border-radius: 0;
  overflow: hidden;
}
html[data-theme="light"] .home-guide-video-stage {
  background: #111827;
}
.home-guide-video-inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.home-guide-video-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* URL 없을 때: ABAP 터미널 타이핑 데모 */
.home-guide-video-stage--demo {
  background: #0d1117;
}
html[data-theme="light"] .home-guide-video-stage--demo {
  background: #1e293b;
}
.home-guide-code-terminal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.home-guide-code-titlebar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
html[data-theme="light"] .home-guide-code-titlebar {
  background: rgba(0, 0, 0, 0.2);
  border-bottom-color: rgba(0, 0, 0, 0.15);
}
.home-guide-code-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.home-guide-code-dot--r { background: #ff5f57; }
.home-guide-code-dot--y { background: #febc2e; }
.home-guide-code-dot--g { background: #28c840; }
.home-guide-code-titlebar-label {
  margin-left: 0.35rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-guide-code-viewport {
  flex: 1 1 0;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  max-height: 100%;
  padding: 0.3rem 0.45rem 0.35rem;
  scroll-behavior: smooth;
}
.home-guide-code-lines {
  margin: 0;
  font-family: "Cascadia Code", "Consolas", "Monaco", "Courier New", monospace;
  font-size: clamp(0.5rem, 1.1vw, 0.62rem);
  line-height: 1.4;
  color: #e6edf3;
  white-space: pre;
  tab-size: 2;
}
.home-guide-code-lines code {
  display: block;
}
.home-guide-code-kw { color: #79c0ff; }
.home-guide-code-cm { color: #8b949e; }
.home-guide-code-str { color: #7ee787; }
.home-guide-code-cursor {
  display: inline-block;
  width: 0.45em;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: #3fb950;
  animation: home-guide-code-blink 1s step-end infinite;
}
.home-guide-video-stage--text-demo {
  background: var(--code-bg);
}
html[data-theme="light"] .home-guide-video-stage--text-demo {
  background: #eef2ff;
}
html[data-theme="light"] .home-guide-video-stage--text-demo .home-guide-code-titlebar {
  background: rgba(99, 102, 241, 0.1);
  border-bottom-color: rgba(79, 70, 229, 0.18);
}
html[data-theme="light"] .home-guide-video-stage--text-demo .home-guide-code-titlebar-label {
  color: #4f46e5;
}
.home-guide-text-terminal {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.home-guide-text-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  color: #93c5fd;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
/* 다크: 인셋 글로우만(테두리 없음 — 레이아웃·스크롤 튐 방지) */
.home-guide-text-viewport.is-live {
  box-shadow: inset 0 0 22px rgba(99, 102, 241, 0.1);
}
html[data-theme="light"] .home-guide-text-viewport {
  color: #4338ca;
}
html[data-theme="light"] .home-guide-text-viewport.is-live {
  box-shadow: inset 0 0 18px rgba(99, 102, 241, 0.08);
}
/* 단색 텍스트 (background-clip+text-shadow 조합은 라이트에서 글자 덩어리로 깨짐) */
.home-guide-text-lines {
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
  font-weight: 700;
  line-height: 1.35;
  color: #93c5fd;
}
html[data-theme="light"] .home-guide-text-lines {
  color: #4338ca;
}
html:not([data-theme="light"]) [data-home-typing-text].is-typing-active .home-guide-text-lines {
  filter: drop-shadow(0 0 10px rgba(125, 211, 252, 0.22));
}
.home-guide-text-line {
  min-height: 1.2em;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 0.28rem;
  color: inherit;
}
html:not([data-theme="light"]) .home-guide-text-line.is-lead {
  color: #bae6fd;
}
.home-guide-text-line.is-lead {
  font-size: clamp(0.98rem, 2.6vw, 1.12rem);
}
.home-guide-text-char {
  display: inline;
  opacity: 0;
  color: inherit;
}
html[data-theme="light"] .home-guide-text-char.is-visible {
  opacity: 1;
  transition: opacity 0.2s ease-out;
}
html:not([data-theme="light"]) .home-guide-text-char {
  transform: translateY(0.06em);
}
html:not([data-theme="light"]) .home-guide-text-char.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.26s ease-out, transform 0.3s ease-out;
}
.home-guide-text-line.is-typing::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  font-weight: 400;
  color: #60a5fa;
  opacity: 0.85;
  animation: home-guide-cursor-breathe 2.2s ease-in-out infinite;
}
html[data-theme="light"] .home-guide-text-line.is-typing::after {
  color: #6366f1;
  animation: home-guide-cursor-breathe 2.6s ease-in-out infinite;
}
@keyframes home-guide-cursor-breathe {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.92; }
}
@media (prefers-reduced-motion: reduce) {
  .home-guide-text-viewport.is-live {
    animation: none;
  }
  .home-guide-text-char {
    opacity: 1;
    transform: none;
  }
  .home-guide-text-char.is-visible {
    transition: none;
  }
  .home-guide-text-line.is-typing::after {
    animation: none;
    opacity: 0.85;
  }
  html:not([data-theme="light"]) [data-home-typing-text].is-typing-active .home-guide-text-lines {
    filter: none;
  }
}

@keyframes home-guide-code-blink {
  50% { opacity: 0; }
}

/* 홈 히어로 마케팅 — 제목만 입체감(그림자), 서브카피·부제는 평면 텍스트 */
.hero-compact .hero-home-split > .hero-home-split__hero {
  align-self: flex-start !important;
  justify-content: flex-start !important;
}
.home-hero-marketing {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.hero-compact .home-hero-marketing {
  --hero-mkt-title-size: clamp(1.26rem, 2.64vw, 2.4rem);
  --hero-mkt-desc-size: 0.86rem;
  --hero-mkt-title-gap: 0.56rem;
  --hero-mkt-desc-gap: 1.4rem;
  --hero-mkt-title-color: #e8edf5;
  --hero-mkt-desc-color: #aeb8c6;
  --hero-mkt-subcopy-gradient: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 48%, #7dd3fc 100%);
}
html[data-theme="light"] .hero-compact .home-hero-marketing {
  --hero-mkt-title-color: #374151;
  --hero-mkt-title-gradient: linear-gradient(
    118deg,
    #3f3f46 0%,
    #52525b 32%,
    #4b5563 52%,
    #374151 72%,
    #475569 100%
  );
  --hero-mkt-desc-color: #1e293b;
}
.hero-compact .home-hero-marketing .hero-title {
  width: 100%;
  max-width: 100%;
  margin: 0 0 var(--hero-mkt-title-gap);
  padding: 0;
  font-size: var(--hero-mkt-title-size);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.4px;
  color: var(--hero-mkt-title-color);
  text-shadow: none;
}
html[data-theme="light"] .hero-compact .home-hero-marketing .hero-title {
  color: transparent;
  background-image: var(--hero-mkt-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: none;
}
html[data-theme="light"] .hero-compact .home-hero-marketing .hero-desc {
  font-weight: 600;
  color: var(--hero-mkt-desc-color);
}
.hero-compact .home-hero-marketing .hero-subcopy {
  margin: 0 0 var(--hero-mkt-desc-gap);
  padding: 0;
  font-size: calc(var(--hero-mkt-title-size) * 0.8);
  font-weight: 600;
  line-height: 1.12;
  background: var(--hero-mkt-subcopy-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-compact .home-hero-marketing .hero-desc {
  width: 100%;
  max-width: min(100%, 26rem);
  margin: 0;
  padding: 0;
  font-size: var(--hero-mkt-desc-size);
  line-height: 1.38;
  color: var(--hero-mkt-desc-color);
}
.hero-compact .home-hero-marketing .hero-title .hero-title-line {
  display: block;
}

/* 히어로 바로 아래 타일 — 간격 축소 */
.hero-section.hero-compact + #home-features.section-light {
  padding-top: 0.5rem !important;
  padding-bottom: 1rem !important;
}

/* 홈 기능 영역: 3×2 타일 그리드 */
.home-features-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: stretch;
}
@media (min-width: 576px) {
  .home-features-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .home-features-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}
.home-features-tiles > .home-feature-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem 0.75rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.home-features-tiles > .home-feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.home-features-tiles > .home-feature-card:not(.home-feature-card--feed) {
  min-height: 10.5rem;
}
.home-features-tiles > .home-feature-card--feed {
  min-height: 11rem;
  max-height: 16rem;
}

/* 라이트: 홈 3×2 타일 입체감 (다크는 위 기본 스타일 유지) */
html[data-theme="light"] .home-features-tiles > .home-feature-card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 52%, #eef2f7 100%);
  border-color: #dbe3ee;
  border-top-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 4px 10px rgba(15, 23, 42, 0.06),
    0 14px 28px rgba(15, 23, 42, 0.07);
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
html[data-theme="light"] .home-features-tiles > .home-feature-card:hover {
  border-color: rgba(79, 70, 229, 0.32);
  border-top-color: rgba(255, 255, 255, 0.98);
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 2px 6px rgba(79, 70, 229, 0.1),
    0 10px 20px rgba(15, 23, 42, 0.09),
    0 22px 40px rgba(15, 23, 42, 0.11);
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] .home-features-tiles > .home-feature-card:hover {
    transform: none;
  }
}

/* ── Navbar active state ────────────────────── */
.nav-link.active { color: var(--text) !important; position: relative; }
.nav-link.active::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--primary); border-radius: 2px;
}
.nav-link-admin { color: var(--warning) !important; }
.nav-link-admin:hover { color: #fde047 !important; }
.nav-link-admin.active { color: #fde047 !important; }

/* ── Home Tab Panel ─────────────────────────── */
.home-tabs-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.home-nav-tabs {
  background: var(--surface2); border-bottom: 1px solid var(--border);
  padding: 0 .5rem;
}
.home-nav-tabs .nav-link {
  color: var(--muted) !important; font-size: .88rem;
  border: none; border-bottom: 2px solid transparent;
  padding: .75rem .9rem; border-radius: 0;
}
.home-nav-tabs .nav-link:hover { color: var(--text) !important; border-bottom-color: var(--border); }
.home-nav-tabs .nav-link.active {
  color: var(--primary-light) !important; background: transparent;
  border-bottom-color: var(--primary);
}
.home-tab-content { min-height: 200px; max-height: 340px; overflow-y: auto; }
.empty-tab-msg {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 2.5rem 1rem; text-align: center;
}
.notice-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .25rem; border-bottom: none;
  font-size: .88rem;
}
.notice-item:last-child { border-bottom: none; }
.notice-badge {
  background: rgba(99,102,241,.15); color: var(--primary-light);
  border: 1px solid rgba(99,102,241,.3); border-radius: 4px;
  padding: .1rem .45rem; font-size: .72rem; font-weight: 700; white-space: nowrap;
}
.notice-title { flex: 1; color: var(--text); }
.notice-date { white-space: nowrap; font-size: .75rem; }

/* ── Home feature tiles (responsive square grid) ─ */
.home-feature-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 1.25rem;
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 1100px) {
  .home-feature-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.home-feature-tiles .home-feature-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(0.85rem, 2vw, 1.25rem);
  aspect-ratio: 1;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.home-feature-tiles .home-feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.home-feature-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.12rem;
}
.home-features-tiles .home-feature-card-top {
  margin-bottom: 0.28rem;
}
.home-feature-heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
}
.home-features-tiles .home-feature-heading .home-feature-icon {
  font-size: 1.1rem !important;
  line-height: 1;
  flex-shrink: 0;
  margin: 0;
  width: auto;
  display: inline-flex;
  align-items: center;
}
.home-features-tiles .home-feature-heading .home-feature-title {
  margin: 0;
  padding: 0;
  font-size: clamp(0.88rem, 2vw, 1.05rem);
  line-height: 1.2;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-features-tiles .home-feature-detail-link {
  margin-top: 0;
  align-self: center;
}
.home-feature-detail-link {
  font-size: clamp(0.68rem, 1.35vw, 0.8rem);
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.home-feature-detail-link:hover { color: var(--primary); text-decoration: underline; }
.home-feature-icon {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  color: var(--primary-light);
  line-height: 1;
}
/* 테두리만 있는 원 + ? (regular 스타일) */
.home-feature-icon-outline .fa-circle-question { font-weight: 400; }
/* 분석 타일: 라이트 solid / 다크 regular (기본값은 다크와 동일하게 regular만) */
.home-feature-icon-analysis .home-feature-icon-analysis-light { display: none; }
.home-feature-icon-analysis .home-feature-icon-analysis-dark { display: inline-block; }
html[data-theme="light"] .home-feature-icon-analysis .home-feature-icon-analysis-light { display: inline-block; }
html[data-theme="light"] .home-feature-icon-analysis .home-feature-icon-analysis-dark { display: none; }
html[data-theme="dark"] .home-feature-icon-analysis .home-feature-icon-analysis-light { display: none; }
html[data-theme="dark"] .home-feature-icon-analysis .home-feature-icon-analysis-dark { display: inline-block; }
.home-feature-title {
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}
.home-features-tiles .home-feature-title {
  margin-bottom: 0.2rem;
}
.home-feature-desc {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  white-space: pre-line;
  font-size: clamp(0.7rem, 1.8vw, 0.82rem);
  line-height: 1.45;
  margin-bottom: 0;
}
.home-features-tiles .home-feature-desc {
  font-size: clamp(0.68rem, 1.6vw, 0.78rem);
  line-height: 1.35;
  margin-bottom: 0.25rem;
}
.home-feature-desc--reveal {
  --tile-reveal-duration: 11s;
  white-space: normal;
  overflow: hidden;
}
.home-feature-desc--reveal .home-guide-text-viewport {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 7.25rem;
  padding: 0;
  box-shadow: none !important;
  border: none;
  scroll-behavior: smooth;
}
.home-feature-desc--reveal .home-guide-text-lines {
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
  color: inherit;
  filter: none;
}
.home-tile-reveal-line {
  overflow: hidden;
  margin: 0 0 0.15rem;
}
.home-tile-reveal-line-inner {
  display: block;
  white-space: nowrap;
  font-weight: 700;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--tile-reveal-duration, 11s) linear;
  will-change: clip-path;
}
.home-tile-reveal-line.is-revealed .home-tile-reveal-line-inner {
  clip-path: inset(0 0 0 0);
}
@media (prefers-reduced-motion: reduce) {
  .home-tile-reveal-line-inner {
    clip-path: none;
    transition: none;
  }
}
.home-feature-desc--empty {
  min-height: 0;
  margin: 0;
  padding: 0;
}
.home-tile-feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 0.05rem;
}
.home-features-tiles .notice-item {
  padding: 0.32rem 0.1rem;
  font-size: 0.78rem;
  gap: 0.45rem;
}
.home-features-tiles .home-faq-row {
  padding-top: 0.28rem !important;
  padding-bottom: 0.28rem !important;
}
.home-features-tiles .review-item-card--compact {
  padding: 0.32rem 0.1rem;
}
.home-features-tiles .home-tile-stats {
  padding-top: 0.35rem !important;
  margin-top: 0.3rem !important;
  border-top: none !important;
}
.home-features-tiles .home-tile-stat-row {
  gap: 0.28rem;
}
.home-features-tiles .home-tile-stat-chip {
  padding: 0.28rem 0.15rem;
}
.home-features-tiles .home-tile-stat-num {
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
}
.home-features-tiles .home-tile-stat-label {
  font-size: clamp(0.58rem, 1.35vw, 0.65rem);
}
.empty-tab-msg--compact {
  padding: 0.75rem 0.25rem;
  text-align: center;
}

.account-ai-credits-page .account-ai-credits-panel {
  padding: 1rem;
  margin-bottom: 1rem;
}
.account-ai-credits-balance-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}
.account-ai-credits-bank-inline.markdown-body {
  color: var(--text);
}
.account-ai-credits-bank-inline.markdown-body p,
.account-ai-credits-bank-inline.markdown-body li,
.account-ai-credits-bank-inline.markdown-body strong {
  color: inherit;
}
.account-ai-credits-page .account-ai-credits-table {
  --bs-table-bg: var(--surface2);
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-striped-bg: rgba(0, 0, 0, 0.08);
  --bs-table-hover-bg: rgba(99, 102, 241, 0.08);
}
.account-ai-credits-page .account-ai-credits-table > :not(caption) > * > * {
  background-color: var(--bs-table-bg);
  color: var(--bs-table-color);
  border-color: var(--bs-table-border-color);
}
.account-ai-credits-page .account-ai-credits-table thead th {
  color: var(--muted);
  font-weight: 600;
}
.account-ai-credits-stat {
  background: var(--surface2);
  border: 1px solid var(--border);
}
html[data-theme="light"] .account-ai-credits-page .account-ai-credits-table {
  --bs-table-bg: var(--surface);
  --bs-table-striped-bg: rgba(0, 0, 0, 0.03);
}
.account-ai-credits-claim-row .form-label {
  margin-bottom: 0.15rem;
}
.account-ai-credits-claim-row .form-control-sm {
  min-height: 2rem;
}
@media (min-width: 768px) {
  .account-ai-credits-claim-row .col-md-4 {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* 홈 서비스 타일: 단계 건수 — 가로 칩 (메뉴 stat-card와 유사, 아이콘 없음) */
.home-tile-stats {
  flex-shrink: 0;
  border: none !important;
}
.home-tile-stat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.35rem;
}
.home-tile-stat-chip {
  flex: 1 1 0;
  min-width: 2.75rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.32rem 0.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
a.home-tile-stat-chip--link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
a.home-tile-stat-chip--link:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  color: inherit;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}
a.home-tile-stat-chip--link:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}
.home-tile-stat-num {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.home-tile-stat-label {
  font-size: 0.62rem;
  line-height: 1.15;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-tile-stat-chip--offer .home-tile-stat-offer-dot {
  position: absolute;
  top: 0.22rem;
  right: 0.22rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fecaca, #ef4444 52%, #991b1b);
  box-shadow:
    0 0 0 2px color-mix(in srgb, #ef4444 28%, transparent),
    0 2px 8px color-mix(in srgb, #ef4444 45%, transparent);
  animation: stat-card-offer-dot-glow 2.4s ease-in-out infinite;
  pointer-events: none;
}

/* 수신 동의 블록 — 라이트 모드에서 본문 대비 유지 */
.consent-opt-section .consent-opt-heading {
  color: var(--label);
}
.consent-opt-section .form-check-label {
  color: var(--text);
}
.consent-opt-section .form-text {
  color: var(--muted);
}
html[data-theme="light"] .consent-opt-section .form-text {
  color: var(--label);
}

/* 컨설턴트 프로필 드롭존 (회원가입·프로필 수정 공통) */
.consultant-dropzone {
  position: relative;
  border: 1px dashed color-mix(in srgb, var(--border) 85%, var(--muted));
  border-radius: 0.6rem;
  padding: 1rem;
  background: color-mix(in srgb, var(--surface2) 88%, transparent);
  cursor: default;
}
a.consultant-profile-file-preview {
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}
a.consultant-profile-file-preview:hover {
  color: color-mix(in srgb, var(--primary) 88%, var(--text));
}
.consultant-dropzone.is-dragging {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, var(--surface2));
}
.consultant-dropzone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.consultant-dropzone-copy {
  color: var(--text);
}

/* 컨설턴트 프로필 안내 — 다크 모드에서 본문과 구분 */
.consultant-profile-hint {
  color: var(--label);
  line-height: 1.5;
}
html[data-theme="light"] .consultant-profile-hint {
  color: var(--muted);
}

/* 로그인: 계정 찾기 링크 가독성 */
.auth-recovery-links {
  color: var(--muted);
}
.auth-recovery-link {
  color: var(--info);
  text-decoration: none;
}
.auth-recovery-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}
html[data-theme="light"] .auth-recovery-link {
  color: #0369a1;
}
html[data-theme="light"] .auth-recovery-link:hover {
  color: #0c4a6e;
}

/* ── Flow Diagram ───────────────────────────── */
.flow-diagram {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.flow-step {
  flex: 1; min-width: 220px; max-width: 280px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.25rem;
  position: relative;
}
.highlight-step {
  background: linear-gradient(135deg, rgba(99,102,241,.15) 0%, rgba(167,139,250,.08) 100%);
  border-color: rgba(99,102,241,.45);
  box-shadow: 0 0 0 1px rgba(99,102,241,.15);
}
.paid-step { opacity: .85; }
.flow-step-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.flow-step-num { font-size: 2rem; font-weight: 800; color: var(--border); line-height: 1; }
.flow-badge {
  padding: .15rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .4px;
}
.free-badge { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.paid-badge { background: rgba(99,102,241,.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,.3); }
.flow-icon { font-size: 1.7rem; color: var(--primary-light); margin-bottom: .75rem; }
.flow-step h5 { font-weight: 700; font-size: 1rem; margin-bottom: .6rem; }
.flow-list { list-style: none; padding: 0; margin: 0; }
.flow-list li {
  padding: .2rem 0; padding-left: 1rem;
  position: relative; color: var(--muted);
}
.flow-list li::before {
  content: '•'; position: absolute; left: 0; color: var(--primary-light);
}
.flow-arrow {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem .75rem; color: var(--border); font-size: 1.2rem;
}
@media (max-width: 768px) {
  .flow-diagram { flex-direction: column; align-items: center; }
  .flow-arrow { padding: .5rem; transform: rotate(90deg); }
  .flow-step { min-width: 90%; }
}

/* ── Admin styles ───────────────────────────── */
.admin-page-header {
  background: var(--surface2); border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.admin-table .badge { font-size: .75rem; }
.admin-users-table,
.admin-agents-table {
  --bs-table-bg: var(--surface2);
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-striped-bg: rgba(0, 0, 0, .12);
  --bs-table-hover-bg: rgba(99, 102, 241, .08);
}
.admin-users-table > :not(caption) > * > *,
.admin-agents-table > :not(caption) > * > * {
  border-color: var(--border);
  background-color: var(--bs-table-bg);
  color: var(--bs-table-color);
}
.admin-users-table thead th,
.admin-agents-table thead th {
  color: var(--muted);
  background-color: var(--surface2);
}
.admin-users-table tbody tr:hover > *,
.admin-agents-table tbody tr:hover > * {
  background: rgba(99, 102, 241, .08) !important;
  color: var(--text);
}
.admin-users-table .admin-current-user-row > * {
  background: rgba(245, 158, 11, .16) !important;
  color: var(--text);
}
.admin-users-table .admin-consultant-pending-row > * {
  background: rgba(234, 179, 8, .1) !important;
}
.admin-current-user-badge {
  background: rgba(59, 130, 246, .18);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, .35);
}
html[data-theme="light"] .admin-current-user-badge {
  background: rgba(37, 99, 235, .12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, .35);
}
html[data-theme="light"] .admin-users-table tbody tr:hover > *,
html[data-theme="light"] .admin-agents-table tbody tr:hover > * {
  background: rgba(79, 70, 229, .06) !important;
}
html[data-theme="light"] .admin-agents-table > :not(caption) > * > * {
  background-color: var(--surface2);
  color: var(--text);
}
html[data-theme="light"] .admin-users-table .admin-current-user-row > * {
  background: rgba(245, 158, 11, .12) !important;
}

/* Admin 사용자 목록: 가로 스크롤 시에도 삭제·유예 열이 보이도록 */
.admin-users-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-users-table .admin-users-actions-col {
  white-space: nowrap;
  min-width: 7.25rem;
  vertical-align: middle;
}

/* ── Code Analysis blocks ───────────────────── */
.analysis-block {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.analysis-block-title {
  background: rgba(0,0,0,.15); padding: .6rem 1rem;
  font-size: .88rem; font-weight: 600; border-bottom: 1px solid var(--border);
}
.analysis-block-body { padding: .9rem 1rem; font-size: .9rem; line-height: 1.65; }
.analysis-chip {
  display: inline-block; background: rgba(99,102,241,.1);
  border: 1px solid rgba(99,102,241,.25); color: var(--primary-light);
  border-radius: var(--radius-sm); padding: .15rem .55rem; font-size: .82rem;
}
.analysis-mini-block {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .85rem 1rem; height: 100%;
}
.analysis-mini-title { font-size: .85rem; font-weight: 600; margin-bottom: .6rem; }
.analysis-list { padding-left: 1.2rem; margin: 0; font-size: .85rem; line-height: 1.75; }

/* 신규 개발 랜딩 등: Proposal과 동일 규칙의 간단 Markdown 렌더 */
.markdown-body-lite h1 { font-size: 1.15rem; margin: .5rem 0; font-weight: 700; }
.markdown-body-lite h2 { font-size: 1.05rem; margin: .75rem 0 .35rem; font-weight: 600; }
.markdown-body-lite h3 { font-size: .98rem; margin: .65rem 0 .3rem; font-weight: 600; }
.markdown-body-lite p { margin-bottom: .5rem; }
.markdown-body-lite p:last-child { margin-bottom: 0; }
.markdown-body-lite ul, .markdown-body-lite ol { margin-bottom: .65rem; padding-left: 1.25rem; }
.markdown-body-lite hr { opacity: .35; margin: .75rem 0; border: 0; border-top: 1px solid var(--border); }
.service-abap-intro.markdown-body-lite strong,
.service-analysis-intro.markdown-body-lite strong,
.service-integration-intro.markdown-body-lite strong { color: var(--text); }

/* stat-card-sm */
.stat-card-sm .stat-card-num { font-size: 1.45rem; }
.stat-card-sm { padding: 0.45rem 0.65rem !important; }

/* ── Dashboard stat tile link ───────────────── */
.stat-card-link {
  display: flex; text-decoration: none; color: var(--text);
  transition: border-color .2s, transform .2s;
  position: relative;
}
.stat-card-link:hover { border-color: var(--primary); transform: translateY(-2px); color: var(--text); }
.active-tile { border-color: var(--primary) !important; background: rgba(99,102,241,.08); }

/* ── RFP list v2 ────────────────────────────── */
.rfp-list-card-v2 { flex-wrap: wrap; gap: 0.5rem; }
.rfp-list-info { flex: 1; min-width: 0; }
.rfp-list-dates { margin-top: .3rem; }
.rfp-list-actions { flex-direction: column; align-items: flex-end; min-width: 180px; }

/* 신규개발 목록: ABAP 분석·개선 워크플로에서 연결된 RFP — 코너 리본 (타일·리스트 공통, 리스트는 축소) */
.menu-list-card--workflow-from-abap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.menu-list-card--workflow-from-abap > .rfp-list-surface-tile > .rfp-list-card,
.menu-list-card--workflow-from-abap > .rfp-list-surface-list > .rfp-list-card {
  position: relative;
  z-index: 1;
}
.rfp-workflow-abap-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 5.75rem;
  height: 5.75rem;
  overflow: hidden;
  pointer-events: none;
}
.rfp-workflow-abap-ribbon__text {
  position: absolute;
  display: block;
  width: 9rem;
  top: 1rem;
  left: -2.65rem;
  padding: 0.2rem 0;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-align: center;
  color: #f8fafc;
  background: linear-gradient(105deg, #6366f1 0%, #4338ca 92%);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.38);
  transform: rotate(-45deg);
  transform-origin: center;
}
html[data-theme="light"] .rfp-workflow-abap-ribbon__text {
  box-shadow: 0 1px 4px rgba(67, 56, 202, 0.28);
}
.menu-list-root--list .menu-list-card--workflow-from-abap .rfp-workflow-abap-ribbon {
  width: 4.1rem;
  height: 4.1rem;
}
.menu-list-root--list .menu-list-card--workflow-from-abap .rfp-workflow-abap-ribbon__text {
  width: 6.75rem;
  top: 0.72rem;
  left: -2.05rem;
  padding: 0.12rem 0;
  font-size: 0.5rem;
  letter-spacing: 0.02em;
}

/* 통합 허브 — ABAP 미러 단계 summary: 목록과 동일 계열 코너 리본 */
.rfp-unified-hub .wf-abap-mirror-phase > summary.wf-abap-mirror-phase-summary {
  position: relative;
  overflow: hidden;
  padding-left: 2.65rem;
  min-height: 2.35rem;
}
.rfp-unified-hub .wf-abap-mirror-phase .rfp-workflow-abap-ribbon--hub-mirror {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 3.55rem;
  height: 3.55rem;
  overflow: hidden;
  pointer-events: none;
}
.rfp-unified-hub .wf-abap-mirror-phase .rfp-workflow-abap-ribbon__text--hub-mirror {
  width: 6.35rem;
  top: 0.52rem;
  left: -1.78rem;
  padding: 0.1rem 0;
  font-size: 0.48rem;
  letter-spacing: 0.02em;
}
html[data-theme="light"] .rfp-unified-hub .wf-abap-mirror-phase .rfp-workflow-abap-ribbon__text--hub-mirror {
  box-shadow: 0 1px 4px rgba(67, 56, 202, 0.28);
}

/* 통합 허브 — 분석 단계 후속 질의: 플로팅 AI 문의(launcher)와 동일 톤의 summary */
.rfp-unified-hub details.wf-abap-followup-log > summary.wf-abap-followup-log-summary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff !important;
  border: 1px solid rgba(99, 102, 241, 0.45);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 0.55rem 0.85rem !important;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rfp-unified-hub details.wf-abap-followup-log > summary.wf-abap-followup-log-summary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}
.rfp-unified-hub details.wf-abap-followup-log > summary .wf-abap-followup-log-icon {
  color: #fff;
  line-height: 1;
}
.rfp-unified-hub details.wf-abap-followup-log > summary .abap-float-chat-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
  color: #fff !important;
}
.rfp-unified-hub details.wf-abap-followup-log > summary .rfp-hub-phase-chevron {
  margin-left: 0 !important;
  color: #fff !important;
  opacity: 0.92;
}

/* 메뉴 목록: 타일 / 촘촘한 목록 전환 (localStorage 키별) */
.menu-list-root--tile .menu-list-card .rfp-list-surface-list { display: none !important; }
.menu-list-root--list .menu-list-card .rfp-list-surface-tile { display: none !important; }

/* ── 전역 컴팩트 간격: 타일·목록 행(g-3)·허브 단계 ───────────────── */
.row.g-3 {
  --bs-gutter-x: 0.5rem;
  --bs-gutter-y: 0.5rem;
}
.menu-list-root.mb-4 {
  margin-bottom: 0.75rem !important;
}
.rfp-unified-hub .interview-summary-toggle.rfp-hub-phase.mb-3 {
  margin-bottom: 0.6rem !important;
}
/* ABAP 분석 허브 — 단계 chevron (신규/연동 개발 허브와 동일) */
.abap-unified-hub .rfp-hub-phase-body {
  padding: 0.35rem 1rem 0.75rem;
}
.abap-unified-hub .rfp-hub-phase > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.abap-unified-hub .rfp-hub-phase > summary .rfp-hub-phase-chevron {
  margin-left: auto;
  transition: transform 0.15s ease;
  flex-shrink: 0;
  color: var(--muted);
}
.abap-unified-hub .rfp-hub-phase:not([open]) > summary .rfp-hub-phase-chevron {
  transform: rotate(-90deg);
}
.abap-unified-hub .interview-summary-toggle.rfp-hub-phase.mb-3 {
  margin-bottom: 0.6rem !important;
}
.hub-settlement-phase-icon {
  font-size: 1.5em;
  color: var(--primary);
}
html[data-theme="dark"] .hub-settlement-phase-icon {
  color: #c7d2fe;
}
.hub-settlement-process-help-btn {
  line-height: 1;
  vertical-align: -0.12em;
  text-decoration: none !important;
  font-size: 1.08em;
  opacity: 1;
}
html[data-theme="dark"] .hub-settlement-process-help-btn {
  color: #93c5fd !important;
}
html[data-theme="light"] .hub-settlement-process-help-btn {
  color: #2563eb !important;
}
.hub-settlement-process-help-btn:hover,
.hub-settlement-process-help-btn:focus {
  color: var(--primary) !important;
  filter: brightness(1.12);
}
html[data-theme="dark"] .hub-settlement-process-help-btn:hover,
html[data-theme="dark"] .hub-settlement-process-help-btn:focus {
  color: #bfdbfe !important;
}
.popover.hub-settlement-process-popover {
  max-width: min(22rem, calc(100vw - 2rem));
}
.popover.hub-settlement-process-popover .popover-body {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #1e293b;
}
.popover.hub-settlement-process-popover .popover-body ol {
  margin-bottom: 0.5rem;
}
.popover.hub-settlement-process-popover .popover-body .hub-settlement-process-note {
  color: #334155;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* 홈(/) 공지 팝업 — 최대 2건, 130% 스케일 */
body.home-notice-popup-open {
  overflow: hidden;
}
.home-notice-popup-layer {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.home-notice-popup-layer.is-open {
  display: flex;
}
.home-notice-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 0;
}
html[data-theme="dark"] .home-notice-popup-backdrop {
  background: rgba(0, 0, 0, 0.72);
}
.home-notice-popup-stage {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: stretch;
  justify-content: center;
  gap: 1.5rem;
  pointer-events: none;
}
.home-notice-popup-stage--single {
  max-width: 650px;
}
.home-notice-popup-stage--dual {
  max-width: min(calc(100vw - 2rem), calc(650px * 2 + 1.5rem));
  justify-content: space-between;
}
.home-notice-popup-card {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 650px;
  max-height: min(92vh, 48rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.22);
  background: var(--surface);
  color: var(--text);
}
html[data-theme="dark"] .home-notice-popup-card {
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
}
.home-notice-popup-stage--dual .home-notice-popup-card {
  flex: 1 1 0;
  min-width: 0;
}
.home-notice-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.4rem;
  border-bottom: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.24) 0%, rgba(99, 102, 241, 0.08) 100%);
}
html[data-theme="light"] .home-notice-popup-header {
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 52%, #f0f9ff 100%);
}
html[data-theme="dark"] .home-notice-popup-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.38) 0%, rgba(36, 39, 54, 0.98) 100%);
}
.home-notice-popup-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.home-notice-popup-modal .home-notice-popup-body,
.home-notice-popup-card .home-notice-popup-body {
  max-height: min(60vh, 36.5rem);
  overflow-y: auto;
  padding: 1.35rem 1.4rem;
  background: var(--surface2);
}
html[data-theme="light"] .home-notice-popup-card .home-notice-popup-body {
  background: #f8fafc;
}
html[data-theme="dark"] .home-notice-popup-card .home-notice-popup-body {
  background: #1e2130;
}
.home-notice-popup-modal .home-notice-popup-title,
.home-notice-popup-card .home-notice-popup-title {
  margin: 0;
  font-size: 1.37rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
}
.home-notice-popup-modal .home-notice-popup-body,
.home-notice-popup-card .home-notice-popup-body {
  font-size: 1.22rem;
  line-height: 1.55;
}
@media (max-width: 991.98px) {
  .home-notice-popup-stage--dual {
    flex-direction: column;
    align-items: center;
    max-height: 92vh;
    overflow-y: auto;
    pointer-events: auto;
  }
  .home-notice-popup-stage--dual .home-notice-popup-card {
    flex: 0 0 auto;
    max-width: 650px;
  }
}
@media (max-width: 575.98px) {
  .home-notice-popup-layer {
    padding: 0.5rem;
  }
  .home-notice-popup-card {
    max-height: min(94vh, 48rem);
  }
  .home-notice-popup-header,
  .home-notice-popup-footer,
  .home-notice-popup-card .home-notice-popup-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
.home-notice-popup-modal .home-notice-popup-body-plain {
  white-space: pre-wrap;
}
.home-notice-popup-modal .markdown-body h1,
.home-notice-popup-modal .markdown-body h2,
.home-notice-popup-modal .markdown-body h3 {
  margin-top: 1rem;
  margin-bottom: 0.65rem;
  font-weight: 600;
  color: var(--text);
}
.home-notice-popup-modal .markdown-body h1 { font-size: 1.25rem; }
.home-notice-popup-modal .markdown-body h2 { font-size: 1.1rem; }
.home-notice-popup-modal .markdown-body h3 { font-size: 1rem; }
.home-notice-popup-modal .markdown-body p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: var(--text);
}
.home-notice-popup-modal .markdown-body ul,
.home-notice-popup-modal .markdown-body ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.home-notice-popup-modal .markdown-body li {
  margin-bottom: 0.3rem;
}
.home-notice-popup-modal .markdown-body ul.task-list {
  list-style: none;
  padding-left: 0;
}
.home-notice-popup-modal .markdown-body .task-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.home-notice-popup-modal .markdown-body .task-list-item input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  pointer-events: none;
}
.home-notice-popup-modal .markdown-body strong {
  font-weight: 600;
  color: var(--text);
}
.home-notice-popup-modal .markdown-body code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}
.home-notice-popup-modal .markdown-body pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.85rem;
}
.home-notice-popup-modal .markdown-body table {
  width: 100%;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.home-notice-popup-modal .markdown-body th,
.home-notice-popup-modal .markdown-body td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
}
.home-notice-popup-modal .home-notice-popup-title.markdown-body strong {
  font-weight: 700;
}
.proposal-page.py-5 {
  padding-top: 1.75rem !important;
  padding-bottom: 1.75rem !important;
}
.dashboard-page.py-4 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}
.menu-list-view-btns .btn.active {
  background: var(--bucket-analysis-bg);
  border-color: color-mix(in srgb, var(--bucket-analysis-fg) 38%, transparent);
  color: var(--bucket-analysis-fg);
}
html[data-theme="light"] .menu-list-view-btns .btn.active {
  color: var(--bucket-analysis-fg);
}
.rfp-list-card--compact-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.38rem 0.65rem !important;
  flex-wrap: wrap;
}
.rfp-list-card--compact-row .rfp-list-compact-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 14rem;
}
.rfp-list-card--compact-row .rfp-list-compact-pid {
  flex: 0 0 auto;
  min-width: 4.5rem;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rfp-list-card--compact-row .rfp-list-compact-actions {
  flex: 0 1 auto;
  max-width: 100%;
}
@media (max-width: 576px) {
  .rfp-list-card--compact-row .rfp-list-compact-actions {
    width: 100%;
    justify-content: flex-start !important;
  }
}

/* RFP 리스트 타일 단계 버튼: 동일 톤, 데이터 없음은 흐릿 비활성 */
.btn.btn-sm.rfp-phase-btn.btn-outline-secondary {
  --bs-btn-border-color: var(--border);
  --bs-btn-color: var(--muted);
}
.btn.btn-sm.rfp-phase-btn:not(.rfp-phase-btn--muted):hover {
  --bs-btn-color: var(--text);
}
span.btn.btn-sm.rfp-phase-btn.rfp-phase-btn--muted {
  opacity: 0.38;
  filter: saturate(0.65);
  pointer-events: none;
  cursor: not-allowed;
  user-select: none;
}
/* 이어쓰기 — 진행중 타일 아이콘 배경 톤 */
a.btn.rfp-phase-btn.rfp-phase-btn--continue-draft,
button.btn.rfp-phase-btn.rfp-phase-btn--continue-draft {
  background: var(--bucket-in-progress-bg) !important;
  border-color: color-mix(in srgb, var(--bucket-in-progress-fg) 40%, transparent) !important;
  color: var(--bucket-in-progress-fg) !important;
}
a.btn.rfp-phase-btn.rfp-phase-btn--continue-draft:hover,
button.btn.rfp-phase-btn.rfp-phase-btn--continue-draft:hover {
  background: color-mix(in srgb, var(--bucket-in-progress-bg) 75%, var(--bucket-in-progress-fg)) !important;
  border-color: color-mix(in srgb, var(--bucket-in-progress-fg) 55%, transparent) !important;
  color: var(--bucket-in-progress-fg) !important;
}
/* 납품 관리 — 분석 타일 아이콘 배경 톤 */
a.btn.rfp-phase-btn.rfp-phase-btn--delivery-manage,
span.btn.rfp-phase-btn.rfp-phase-btn--delivery-manage {
  background: var(--bucket-analysis-bg) !important;
  border-color: color-mix(in srgb, var(--bucket-analysis-fg) 38%, transparent) !important;
  color: var(--bucket-analysis-fg) !important;
}
a.btn.rfp-phase-btn.rfp-phase-btn--delivery-manage:hover {
  background: color-mix(in srgb, var(--bucket-analysis-bg) 70%, var(--bucket-analysis-fg)) !important;
  border-color: color-mix(in srgb, var(--bucket-analysis-fg) 50%, transparent) !important;
  color: var(--bucket-analysis-fg) !important;
}

/* ── Admin Menu Cards ───────────────────────── */
.admin-menu-card {
  display: block; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; height: 100%;
  transition: border-color .2s, transform .2s;
}
.admin-menu-card:hover {
  border-color: var(--primary); transform: translateY(-3px); color: var(--text);
}
.admin-menu-card-disabled {
  opacity: .5; pointer-events: none;
}
.admin-menu-icon {
  font-size: 1.8rem; color: var(--warning); margin-bottom: .75rem;
}
.admin-menu-card h5 { font-weight: 700; color: var(--text); }

/* ── Admin Content Card ───── */
.admin-content-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.admin-content-card .form-control,
.admin-content-card .form-select {
  background: var(--surface); border-color: var(--border); color: var(--text);
}
.admin-content-card .form-control:focus {
  border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(74,144,217,.25);
}

/* 공지/FAQ 관리: 항목 간격·카드 패딩 축소(기본 vstack gap-4 대비 약 1/2) */
.admin-notice-faq-list-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-notice-faq-list-stack > .admin-content-card {
  padding: 1rem 1.15rem;
}

/* ── Admin page header ────── */
.admin-page-header { background: var(--surface2); border-bottom: 1px solid var(--border); padding: 1rem 0; }

/* ── Dashboard search bar ──── */
.dashboard-search-bar .form-control,
.dashboard-search-bar .form-select {
  background: var(--surface2); border-color: var(--border); color: var(--text);
}
.dashboard-search-bar .form-control:focus,
.dashboard-search-bar .form-select:focus {
  border-color: var(--primary); color: var(--text); background: var(--surface2);
}

/* ── Review Cards (Home) ─────── */
.review-list { max-height: 280px; overflow-y: auto; padding-right: 4px; }
.review-item-card {
  background: transparent;
  border: none;
  border-radius: 0.35rem;
  padding: 0.75rem;
  margin-bottom: 0.35rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.review-item-card--compact {
  padding: 0.35rem 0.35rem;
  margin-bottom: 0.25rem;
  border-radius: 0.3rem;
}
.review-item-card--compact .review-item-name {
  max-width: 28%;
  min-width: 0;
  flex: 0 1 auto;
}
@media (max-width: 576px) {
  .review-item-card--compact .review-item-name { max-width: 36%; }
}
/* 별점 제출 (문의/리뷰 보드·상세): 미선택=윤곽만, 선택 시 1~N번째까지 채움 */
.review-star-rate { display: inline-flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.review-star-rate form { display: inline-block; vertical-align: middle; margin: 0; }
.review-star-submit {
  text-decoration: none !important;
  line-height: 1;
  border: none;
  background: none;
  padding: 0.1rem !important;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.review-star-submit:hover { transform: scale(1.1); }
.review-star-submit:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: 2px;
}
.review-star-submit .review-star-icon {
  font-size: 1.05rem;
  display: block;
  line-height: 1;
}
/* 채워진 별(내가 준 점수 이하 구간) */
.review-star-submit .review-star-icon--filled {
  color: var(--warning) !important;
  -webkit-text-stroke: 0 transparent;
  filter: drop-shadow(0 0 0.5px color-mix(in srgb, var(--warning) 40%, transparent));
}
/* 비어 있는 별: 속 투명 + 굵은 윤곽(노란 채움 없음) */
.review-star-submit .review-star-icon--empty {
  color: transparent !important;
  -webkit-text-stroke: 1.35px var(--review-star-outline-strong);
  opacity: 1;
}
.review-star-submit:hover .review-star-icon--empty {
  -webkit-text-stroke-color: var(--primary-light);
  opacity: 1;
}
a.review-item-card:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-radius: 0.35rem;
}
.home-tab-content .review-item-card .review-item-name {
  color: var(--text);
}

/* 문의/리뷰 보드·상세: Bootstrap 카드 기본(--bs-card-color)이 어두운 색이라
   다크 배경(surface2)에서 글자가 묻혀 보이는 문제 — 테마별로 카드·링크·본문 명시 */
html[data-theme="dark"] .reviews-board-page .review-board-card,
html[data-theme="dark"] .reviews-board-page .collapse .card,
html[data-theme="dark"] .reviews-detail-page article.card {
  --bs-card-color: var(--text);
  --bs-body-color: var(--text);
  color: var(--text);
}
html[data-theme="dark"] .reviews-board-page .review-board-card-link,
html[data-theme="dark"] .reviews-board-page .review-board-card-link:visited,
html[data-theme="dark"] .reviews-board-page .review-board-card-link strong {
  color: var(--text) !important;
}
/* text-reset·.text-muted가 inherit/전역 규칙에 밀리지 않도록 보드 전용으로 상향 */
html[data-theme="dark"] .reviews-board-page .review-board-card-link .text-muted,
html[data-theme="dark"] .reviews-board-page .review-board-aggregate,
html[data-theme="dark"] .reviews-board-page .review-board-aggregate .text-muted {
  color: var(--label) !important;
}
html[data-theme="dark"] .reviews-board-page .review-board-snippet {
  color: color-mix(in srgb, var(--text) 90%, var(--muted)) !important;
}
html[data-theme="light"] .reviews-board-page .review-board-card-link,
html[data-theme="light"] .reviews-board-page .review-board-card-link strong {
  color: var(--text) !important;
}
html[data-theme="light"] .reviews-board-page .review-board-snippet {
  color: color-mix(in srgb, var(--text) 78%, var(--muted)) !important;
}
html[data-theme="dark"] .reviews-detail-page article.card .card-body,
html[data-theme="dark"] .reviews-detail-page .review-body-text,
html[data-theme="dark"] .reviews-detail-page article.card .card-body strong:not(.badge) {
  color: var(--text) !important;
}
html[data-theme="dark"] .reviews-detail-page .review-detail-aggregate,
html[data-theme="dark"] .reviews-detail-page .review-detail-aggregate .text-muted {
  color: var(--label) !important;
}
html[data-theme="dark"] .reviews-detail-page .card-body .text-muted {
  color: var(--label) !important;
}
html[data-theme="light"] .reviews-detail-page article.card .card-body > .review-body-text,
html[data-theme="light"] .reviews-detail-page article.card .card-body strong:not(.badge) {
  color: var(--text) !important;
}
.reviews-detail-page .breadcrumb-item.active {
  color: var(--muted) !important;
}
html[data-theme="dark"] .reviews-detail-page .breadcrumb-item a {
  color: var(--primary-light);
}
html[data-theme="dark"] .reviews-detail-page section.card {
  --bs-card-color: var(--text);
  --bs-body-color: var(--text);
  color: var(--text);
}
html[data-theme="dark"] .reviews-detail-page section.card .text-muted {
  color: var(--label) !important;
}
.review-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.btn-xs { padding: 0.15rem 0.5rem; font-size: 0.75rem; }

/* ── Notice items (Home) ─────── */
.notice-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.15rem; border-bottom: none;
}
.notice-item:last-child { border-bottom: none; }
.notice-badge {
  font-size: 0.65rem; background: var(--primary); color: #fff;
  padding: 0.1rem 0.4rem; border-radius: 3px; flex-shrink: 0;
}
.notice-title { flex: 1; font-size: 0.85rem; }
.notice-date { flex-shrink: 0; }

/* ── Code library: source tabs (dark/light contrast) ───── */
.codelib-source-tabs .nav-link {
  color: var(--muted) !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.codelib-source-tabs .nav-link:hover {
  color: var(--text) !important;
  border-bottom-color: var(--border) !important;
}
.codelib-source-tabs .nav-link.active {
  color: var(--primary-light) !important;
  border-bottom-color: var(--primary) !important;
  font-weight: 600;
}
.codelib-source-tabs .codelib-tab-ic {
  color: inherit;
  opacity: 0.95;
}
.codelib-source-tabs .codelib-tab-meta {
  color: var(--muted);
  font-size: 0.75em;
}
html[data-theme="light"] .codelib-source-tabs .nav-link.active {
  color: var(--primary) !important;
}

/* ── KB admin: AI 초안 키워드/키노트 탭 (다크에서 제목 가독성) ───── */
.kb-ai-source-tabs .nav-link {
  color: var(--label) !important;
  opacity: 1 !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-weight: 500;
}
.kb-ai-source-tabs .nav-link:hover {
  color: var(--text) !important;
  border-bottom-color: var(--border) !important;
}
.kb-ai-source-tabs .nav-link.active {
  color: var(--text) !important;
  border-bottom-color: var(--primary) !important;
  font-weight: 600;
}
html[data-theme="dark"] .kb-ai-source-tabs .nav-link {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .kb-ai-source-tabs .nav-link:hover {
  color: #f8fafc !important;
}
html[data-theme="dark"] .kb-ai-source-tabs .nav-link.active {
  color: var(--primary-light) !important;
  border-bottom-color: var(--primary-light) !important;
}
html[data-theme="light"] .kb-ai-source-tabs .nav-link {
  color: var(--label) !important;
}
html[data-theme="light"] .kb-ai-source-tabs .nav-link.active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
}

/* ── SE38 납품 작업실: 화면 제목 ─────────────────────────────── */
.delivery-workspace-studio-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.18) 0%,
    rgba(245, 158, 11, 0.1) 100%
  );
  border: 1px solid rgba(99, 102, 241, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.delivery-workspace-studio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.delivery-workspace-studio-label {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #e0e7ff;
}
html[data-theme="dark"] .delivery-workspace-studio-heading {
  border-color: rgba(129, 140, 248, 0.55);
}
html[data-theme="dark"] .delivery-workspace-studio-label {
  color: #eef2ff;
  text-shadow: 0 0 24px rgba(99, 102, 241, 0.35);
}
html[data-theme="light"] .delivery-workspace-studio-heading {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.1) 0%,
    rgba(245, 158, 11, 0.08) 100%
  );
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: none;
}
html[data-theme="light"] .delivery-workspace-studio-icon {
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary);
}
html[data-theme="light"] .delivery-workspace-studio-label {
  color: #3730a3;
  text-shadow: none;
}

/* ── SE38 납품 작업실: 카드·폼 (다크에서 라벨·본문 대비) ─────────── */
.delivery-workspace-page .card {
  background: var(--surface);
  border-color: var(--border) !important;
  color: var(--text);
}
.delivery-workspace-page .card-body {
  background: var(--surface);
  color: var(--text);
}
.delivery-workspace-page .form-label,
.delivery-workspace-page .form-label.small,
.delivery-workspace-page label.small.fw-semibold {
  color: var(--text) !important;
}
html[data-theme="dark"] .delivery-workspace-page .form-label,
html[data-theme="dark"] .delivery-workspace-page .form-label.small,
html[data-theme="dark"] .delivery-workspace-page label.small.fw-semibold {
  color: #e2e8f0 !important;
}
html[data-theme="light"] .delivery-workspace-page .form-label,
html[data-theme="light"] .delivery-workspace-page .form-label.small,
html[data-theme="light"] .delivery-workspace-page label.small.fw-semibold {
  color: #1e293b !important;
}
.delivery-workspace-page .form-control {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border);
}
.delivery-workspace-page .form-control::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
html[data-theme="dark"] .delivery-workspace-page .form-control {
  background: var(--surface2);
  color: #f1f5f9;
  border-color: var(--border);
}
html[data-theme="dark"] .delivery-workspace-page .text-muted,
html[data-theme="dark"] .delivery-workspace-page .small.text-muted {
  color: #94a3b8 !important;
}

/* ── SE38 납품 작업실: 슬롯 탭 (다크에서 active 가독성) ───── */
.delivery-workspace-tabs {
  border-bottom: 1px solid var(--border);
  gap: 0.15rem;
}
.delivery-workspace-tabs .nav-link {
  color: var(--label) !important;
  opacity: 1 !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.delivery-workspace-tabs .nav-link:hover {
  color: var(--text) !important;
  border-bottom-color: var(--border) !important;
  background: var(--surface2) !important;
}
.delivery-workspace-tabs .nav-link.active {
  color: var(--primary-light) !important;
  border-bottom-color: var(--primary) !important;
  font-weight: 600;
  background: var(--surface2) !important;
}
html[data-theme="dark"] .delivery-workspace-tabs .nav-link {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .delivery-workspace-tabs .nav-link:hover {
  color: #f8fafc !important;
}
html[data-theme="dark"] .delivery-workspace-tabs .nav-link.active {
  color: #e0e7ff !important;
  border-bottom-color: var(--primary-light) !important;
  background: rgba(99, 102, 241, 0.12) !important;
}
html[data-theme="light"] .delivery-workspace-tabs .nav-link.active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
  background: var(--surface) !important;
}
.delivery-workspace-page .card-header {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border) !important;
}

.dw-source-editor {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface);
  overflow: hidden;
  --dw-source-pane-max-h: 20rem;
  --dw-source-font-size: 0.82rem;
  --dw-source-line-height: 1.65;
  --dw-source-pad-y: 0.375rem;
  --dw-source-pad-x-code: 0.75rem;
  --dw-source-pad-x-nums: 0.5rem;
}
.dw-source-editor .dw-source-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  max-height: var(--dw-source-pane-max-h);
}
.dw-source-editor .dw-source-scroll-inner {
  display: flex;
  align-items: flex-start;
  min-width: min-content;
}
.dw-source-editor .dw-line-nums {
  flex: 0 0 auto;
  margin: 0;
  padding: var(--dw-source-pad-y) var(--dw-source-pad-x-nums);
  min-width: 3rem;
  max-height: var(--dw-source-pane-max-h);
  text-align: right;
  color: var(--text-muted, #6c757d);
  background: var(--surface2);
  border-right: 1px solid var(--border);
  overflow: auto;
  user-select: none;
  font-size: var(--dw-source-font-size);
  line-height: var(--dw-source-line-height);
  font-family: ui-monospace, Consolas, "Segoe UI Mono", monospace;
  white-space: pre;
  scrollbar-width: none;
}
.dw-source-editor .dw-source-scroll .dw-line-nums {
  max-height: none;
  overflow: visible;
}
.dw-source-editor .dw-line-nums::-webkit-scrollbar {
  display: none;
}
.dw-source-editor .dw-source-input {
  flex: 1 1 auto;
  min-width: 0;
  max-height: var(--dw-source-pane-max-h);
  border: 0;
  border-radius: 0;
  resize: none;
  overflow: auto;
  font-size: var(--dw-source-font-size);
  line-height: var(--dw-source-line-height);
  padding: var(--dw-source-pad-y) var(--dw-source-pad-x-code);
  font-family: ui-monospace, Consolas, "Segoe UI Mono", monospace;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  tab-size: 2;
}
.dw-source-editor--expanded {
  --dw-source-pane-max-h: min(36rem, 70vh);
}
.dw-slot-source-panel {
  border-color: var(--border) !important;
  background: var(--surface2);
}
.dw-slot-source-panel > summary {
  cursor: pointer;
  list-style: none;
  color: var(--text);
}
.dw-slot-source-panel > summary::-webkit-details-marker {
  display: none;
}
.dw-slot-source-panel > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.35rem;
  transition: transform 0.15s ease;
  color: var(--muted);
}
.dw-slot-source-panel[open] > summary::before {
  transform: rotate(90deg);
}
.dw-slot-source-panel-body {
  padding: 0 0.75rem 0.75rem;
}
.dw-slot-source-panel:not([open]) .dw-source-summary-open {
  display: none !important;
}
.dw-slot-source-panel[open] .dw-source-summary-closed {
  display: none !important;
}
html[data-theme="dark"] .dw-slot-source-panel > summary {
  color: var(--text);
}
.btn-dw-reset-working {
  background: color-mix(in srgb, var(--primary) 55%, transparent);
  border-color: color-mix(in srgb, var(--primary) 70%, transparent);
  color: var(--text);
}
.btn-dw-reset-working:hover,
.btn-dw-reset-working:focus {
  background: color-mix(in srgb, var(--primary) 72%, transparent);
  border-color: var(--primary);
  color: var(--text);
}
html[data-theme="light"] .btn-dw-reset-working {
  color: #fff;
}
html[data-theme="light"] .btn-dw-reset-working:hover,
html[data-theme="light"] .btn-dw-reset-working:focus {
  color: #fff;
}
.dw-suggestion-source-panel > summary {
  color: var(--primary-light, var(--primary));
}
html[data-theme="light"] .dw-suggestion-source-panel > summary {
  color: var(--primary);
}
.dw-source-editor .dw-source-input:focus {
  box-shadow: none;
}

.dw-source-editor--readonly {
  border: none;
  border-radius: 0;
  background: transparent;
  --dw-source-pad-y: 1.25rem;
}
.dw-source-editor--readonly .dw-source-scroll {
  max-height: var(--dw-source-pane-max-h, 28rem);
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface2);
}
.dw-source-editor--readonly .dw-line-nums {
  padding: var(--dw-source-pad-y) var(--dw-source-pad-x-nums) var(--dw-source-pad-y) 0.75rem;
  background: var(--surface2);
  border-right: 1px solid var(--border);
}
.dw-source-editor--readonly .dw-source-view {
  flex: 1;
  margin: 0;
  padding: var(--dw-source-pad-y) var(--dw-source-pad-x-code) var(--dw-source-pad-y) 0.75rem;
  font-size: var(--dw-source-font-size);
  line-height: var(--dw-source-line-height);
  overflow: visible;
  max-height: none;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--code-text);
  white-space: pre;
}
.dw-source-editor--readonly .codelib-source-pre.dw-source-view {
  max-height: none;
  overflow: visible;
  border: none;
  background: transparent;
}
.dw-source-editor--readonly .dw-source-view code {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: inherit;
}
html[data-theme="light"] .dw-source-editor--readonly .dw-source-scroll {
  background: #f1f5f9;
}
html[data-theme="light"] .dw-source-editor--readonly .dw-source-view {
  color: #0f172a;
}
html[data-theme="light"] .dw-source-editor--readonly .dw-line-nums {
  background: #f1f5f9;
}

.dw-diff-panel .dw-diff-legend-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}
.dw-diff-legend-item {
  display: inline-block;
  min-width: 1.1rem;
  text-align: center;
  font-weight: 600;
  border-radius: 0.2rem;
  padding: 0 0.2rem;
  margin-right: 0.15rem;
}
.dw-diff-view {
  max-height: 18rem;
  overflow: auto;
  margin: 0;
  padding: 0.35rem 0;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface);
  line-height: 1.42857143;
}
.dw-diff-line {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0 0.5rem;
  min-height: 1.42857143em;
}
.dw-diff-gutter {
  flex: 0 0 1rem;
  text-align: center;
  color: var(--text-muted, #6c757d);
  user-select: none;
}
.dw-diff-lnum-old,
.dw-diff-lnum-new {
  flex: 0 0 2.25rem;
  text-align: right;
  color: var(--text-muted, #6c757d);
  user-select: none;
  font-size: 0.85em;
}
.dw-diff-lnum-new {
  flex-basis: 2.25rem;
  margin-right: 0.15rem;
}
.dw-diff-code {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 0;
}
.dw-diff-line--equal .dw-diff-code {
  color: var(--text);
  opacity: 0.82;
}
.dw-diff-line--gap {
  font-style: italic;
  color: var(--text-muted, #6c757d);
}
.dw-diff-line--gap .dw-diff-code {
  opacity: 0.9;
}
html[data-theme="light"] .dw-diff-legend-item--add {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}
html[data-theme="light"] .dw-diff-legend-item--del {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}
html[data-theme="light"] .dw-diff-line--insert {
  background: rgba(16, 185, 129, 0.09);
}
html[data-theme="light"] .dw-diff-line--delete {
  background: rgba(239, 68, 68, 0.08);
}
html[data-theme="dark"] .dw-diff-legend-item--add {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
}
html[data-theme="dark"] .dw-diff-legend-item--del {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}
html[data-theme="dark"] .dw-diff-line--insert {
  background: rgba(52, 211, 153, 0.1);
}
html[data-theme="dark"] .dw-diff-line--delete {
  background: rgba(248, 113, 113, 0.09);
}
html[data-theme="dark"] .dw-diff-line--equal .dw-diff-code {
  opacity: 0.78;
}

/* 스피너 링 중앙 아이콘 (전역 처리 중·생성 진행 모달·인터뷰 로딩 등) */
.busy-spinner-ring {
  position: relative;
  width: 3rem;
  height: 3rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
  flex-shrink: 0;
}
.busy-spinner-ring--sm {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
}
.busy-spinner-ring .spinner-border {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}
.busy-spinner-ring .busy-spinner-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.05rem;
  line-height: 1;
  pointer-events: none;
  color: var(--primary-light, #6ea8fe);
}
/* 제안서 생성 화면과 동일: 스피너 중앙 🤖 */
.busy-spinner-ring span.busy-spinner-icon {
  font-size: 1.35rem;
}
.busy-spinner-ring--sm .busy-spinner-icon {
  font-size: 0.9rem;
}
.busy-spinner-ring--sm span.busy-spinner-icon {
  font-size: 1.15rem;
}
html[data-theme="light"] .busy-spinner-ring .busy-spinner-icon {
  color: var(--primary, #0d6efd);
}
/* 진행 중 링: 에이전트 작업(data-busy-agents 등)일 때 로봇, 그 외 고양이 */
.busy-spinner-ring .busy-spinner-mascot--agent {
  display: none;
}
.busy-spinner-ring--agents-mascot .busy-spinner-mascot--default {
  display: none;
}
.busy-spinner-ring--agents-mascot .busy-spinner-mascot--agent {
  display: block;
}

/* ── 전역 처리 중 오버레이 ─────────────────────────────────── */
.global-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(14vh, 7.5rem);
  background: rgba(15, 17, 23, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.global-busy-overlay[hidden] {
  display: none !important;
}
html[data-theme="light"] .global-busy-overlay {
  background: rgba(241, 245, 249, 0.65);
}
.global-busy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 2.25rem;
  text-align: center;
  min-width: 260px;
  max-width: 90vw;
}
.global-busy-card .busy-spinner-ring--sm .spinner-border {
  color: var(--primary-light) !important;
  border-width: 0.2em;
}
.global-busy-title {
  color: var(--text);
  font-size: 1.05rem;
}
.global-busy-card.has-agent-lines {
  max-width: min(32rem, 92vw);
  text-align: left;
}
.global-busy-card.has-agent-lines > .global-busy-title {
  text-align: center;
}
.global-busy-agent-lines li {
  padding: 0.2rem 0;
  line-height: 1.45;
  border-bottom: 1px solid var(--border);
}
.global-busy-agent-lines li:last-child {
  border-bottom: none;
}

/* SAP 지식갤러리 admin */
.kb-research-notes-pre {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.kb-admin-preview {
  background: var(--surface2);
  border-color: var(--border) !important;
  max-height: 28rem;
  overflow: auto;
}

/* ABAP 후속 질문: 턴(질문+응답) 접기 */
.abap-followup-turn .abap-followup-q,
.abap-followup-turn .abap-followup-a {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.45;
}
.abap-followup-turn .abap-followup-a {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
}
.abap-float-chat-panel .abap-followup-turn .abap-followup-a {
  background: var(--abap-float-chat-surface2);
  border-color: var(--abap-float-chat-border);
}

/* 플로팅 AI 문의·허브 후속 질의 — 메신저형 말풍선 + 마크다운 본문 */
.abap-msg-stream {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.15rem 0;
}
.abap-msg-row {
  display: flex;
  width: 100%;
}
.abap-msg-row--me {
  justify-content: flex-end;
}
.abap-msg-row--them {
  justify-content: flex-start;
}
.abap-msg-stack {
  max-width: min(88%, 26rem);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
/* 인터뷰 요약·제안서 등: 패널 너비의 ~90%까지 말풍선 확장 */
.interview-msg-stream .abap-msg-stack {
  max-width: min(90%, calc(100% - 0.35rem));
}
/* 플로팅 AI 문의 패널: 패널을 키우면 말풍선도 같이 넓어짐 */
.abap-float-chat-panel .abap-msg-stream .abap-msg-stack {
  max-width: min(94%, calc(100% - 0.35rem));
}
.abap-msg-row--me .abap-msg-stack {
  align-items: flex-end;
}
.abap-msg-row--them .abap-msg-stack {
  align-items: flex-start;
}
.abap-msg-meta {
  line-height: 1.2;
}
.abap-msg-bubble {
  border-radius: 1rem;
  padding: 0.55rem 0.75rem;
  line-height: 1.45;
  font-size: 0.9rem;
  word-break: break-word;
}
.abap-msg-bubble--me {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-right-radius: 0.25rem;
}
.abap-msg-bubble--them {
  background: var(--abap-float-chat-surface2);
  border: 1px solid var(--abap-float-chat-border);
  color: var(--text);
  border-bottom-left-radius: 0.25rem;
}
.abap-msg-bubble--muted {
  background: transparent;
  border: 1px dashed var(--abap-float-chat-border);
  color: var(--muted);
}
.abap-msg-stream--float .abap-msg-stack {
  max-width: min(94%, calc(100% - 0.35rem));
}
.interview-msg-stream .abap-msg-bubble--them {
  background: var(--surface2);
  border-color: var(--border);
}
.interview-msg-stream .abap-msg-bubble--me {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
.chat-md-body p {
  margin-bottom: 0.35rem;
}
.chat-md-body p:last-child {
  margin-bottom: 0;
}
.chat-md-body ul,
.chat-md-body ol {
  margin: 0.25rem 0 0.35rem 1.1rem;
  padding-left: 0.2rem;
}
.chat-md-body li {
  margin-bottom: 0.15rem;
}
.chat-md-body pre,
.chat-md-body code {
  font-size: 0.82rem;
}
.abap-msg-bubble--me.chat-md-body a {
  color: #dbeafe;
}
html[data-theme="light"] .abap-msg-bubble--them {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--them {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
/* 라이트 모드: 오른쪽(본인) 말풍선 — 진한 보라 대신 연한 톤 + 진한 글자로 가독성 */
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body {
  background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 55%, #dbeafe 100%);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body p,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body li,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body td,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body th,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body h1,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body h2,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body h3,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body h4 {
  color: #0f172a;
}
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body strong {
  color: #3730a3;
}
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body a {
  color: #1d4ed8;
}
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body code {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body pre {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(99, 102, 241, 0.22);
}
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body {
  background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 55%, #dbeafe 100%);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body p,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body li,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body td,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body th,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body h1,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body h2,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body h3,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body h4 {
  color: #0f172a;
}
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body strong {
  color: #3730a3;
}
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body a,
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body a {
  color: #1d4ed8;
}
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body code {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body pre {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

/* 채팅 말풍선 — fenced/인라인 코드 가독성 (Bootstrap 기본 분홍 code 색 덮어씀) */
.chat-md-body pre.chat-md-pre {
  margin: 0.35rem 0;
  padding: 0.55rem 0.7rem;
  border-radius: 0.45rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-md-body pre.chat-md-pre code.chat-md-code {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  font-size: inherit;
  color: inherit;
}
html[data-theme="dark"] .abap-float-chat-panel .abap-msg-bubble--them.chat-md-body code,
html[data-theme="dark"] .interview-msg-stream .abap-msg-bubble--them.chat-md-body code,
html[data-theme="dark"] .abap-chat-log .abap-msg-bubble--them.chat-md-body code {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.38);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
html[data-theme="dark"] .abap-float-chat-panel .abap-msg-bubble--them.chat-md-body pre,
html[data-theme="dark"] .interview-msg-stream .abap-msg-bubble--them.chat-md-body pre,
html[data-theme="dark"] .abap-chat-log .abap-msg-bubble--them.chat-md-body pre {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.42);
}
html[data-theme="dark"] .abap-float-chat-panel .abap-msg-bubble--them.chat-md-body strong,
html[data-theme="dark"] .interview-msg-stream .abap-msg-bubble--them.chat-md-body strong,
html[data-theme="dark"] .abap-chat-log .abap-msg-bubble--them.chat-md-body strong {
  color: #f1f5f9;
  font-weight: 600;
}
html[data-theme="dark"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body code,
html[data-theme="dark"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body code {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
html[data-theme="dark"] .abap-float-chat-panel .abap-msg-bubble--me.chat-md-body pre,
html[data-theme="dark"] .interview-msg-stream .abap-msg-bubble--me.chat-md-body pre {
  color: #f1f5f9;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--them.chat-md-body code,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--them.chat-md-body code,
html[data-theme="light"] .abap-chat-log .abap-msg-bubble--them.chat-md-body code {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
html[data-theme="light"] .abap-float-chat-panel .abap-msg-bubble--them.chat-md-body pre,
html[data-theme="light"] .interview-msg-stream .abap-msg-bubble--them.chat-md-body pre,
html[data-theme="light"] .abap-chat-log .abap-msg-bubble--them.chat-md-body pre {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

/* 연동 요청 폼 — 작성 가이드 본문(토글과 같은 글자 크기·링크 색, 테두리 없음) */
.int-write-guide-body {
  border: none !important;
  padding: 0.15rem 0 0.65rem 0 !important;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--bs-link-color);
}

/* ── ABAP 분석: 플로팅 후속 질문 패널 ─────────────────────── */
.abap-float-chat {
  position: fixed;
  z-index: 15000;
  bottom: 1.15rem;
  right: 1.15rem;
  left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}
.abap-float-chat > * {
  pointer-events: auto;
}
.abap-float-chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--bucket-analysis-fg) 38%, transparent);
  background: var(--bucket-analysis-bg);
  color: var(--bucket-analysis-fg) !important;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.abap-float-chat-launcher:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--bucket-analysis-bg) 70%, var(--bucket-analysis-fg));
  border-color: color-mix(in srgb, var(--bucket-analysis-fg) 50%, transparent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.abap-float-chat-launcher:focus {
  outline: 2px solid color-mix(in srgb, var(--bucket-analysis-fg) 55%, transparent);
  outline-offset: 2px;
}
.abap-float-chat-launcher .abap-float-chat-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--bucket-analysis-fg) 22%, transparent);
  color: var(--bucket-analysis-fg);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
}
.offer-member-inquiry-launcher {
  border-color: color-mix(in srgb, var(--bucket-proposal-fg) 38%, transparent);
  background: var(--bucket-proposal-bg);
  color: var(--bucket-analysis-fg) !important;
}
.offer-member-inquiry-launcher:hover {
  background: color-mix(in srgb, var(--bucket-proposal-bg) 70%, var(--bucket-proposal-fg));
  border-color: color-mix(in srgb, var(--bucket-proposal-fg) 50%, transparent);
  color: var(--bucket-analysis-fg) !important;
}
.offer-member-inquiry-launcher:focus {
  outline-color: color-mix(in srgb, var(--bucket-analysis-fg) 55%, transparent);
}
.offer-member-inquiry-header {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
}
.offer-member-inquiry-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.offer-member-inquiry-header .offer-member-inquiry-offer-select-wrap {
  width: 100%;
}
.offer-member-inquiry-header .offer-member-inquiry-single-target {
  line-height: 1.35;
}
.offer-member-inquiry-flash-wrap {
  flex-shrink: 0;
  padding: 0 0.75rem;
}
.offer-member-inquiry-flash-wrap .alert:last-child {
  margin-bottom: 0.35rem;
}
.offer-member-inquiry-offer-select-wrap {
  position: relative;
  width: 100%;
}
.offer-member-inquiry-offer-select {
  font-size: 0.8125rem;
  width: 100%;
  padding-right: 2rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
}
.offer-member-inquiry-offer-select-chevron {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.62rem;
  color: var(--muted);
  opacity: 0.9;
}
.offer-member-inquiry-panel .offer-inquiry-privacy-note {
  font-size: 0.75rem;
}
.interview-summary-header:has(.hub-deliverable-visibility-form) .rfp-hub-phase-chevron {
  margin-left: 0.35rem !important;
}
.interview-summary-header .hub-deliverable-visibility-form {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 0;
  min-width: 8.5rem;
  font-size: 0.875rem;
  line-height: 1.2;
}
.interview-summary-header .hub-deliverable-visibility-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}
.interview-summary-header .hub-deliverable-visibility-switch-pad {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  line-height: 1;
}
.interview-summary-header .hub-deliverable-visibility-input {
  cursor: pointer;
  margin: 0;
  float: none;
  width: 2.75em;
  height: 1.4em;
}
.interview-summary-header .hub-deliverable-visibility-locked .hub-deliverable-visibility-label {
  color: var(--muted);
}
.interview-summary-header .hub-deliverable-visibility-switch-faux {
  display: inline-block;
  width: 2.75em;
  height: 1.4em;
  border-radius: 1.4em;
  background: var(--border);
  position: relative;
  vertical-align: middle;
}
.interview-summary-header .hub-deliverable-visibility-switch-faux::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.15em;
  width: calc(1.4em - 0.3em);
  height: calc(1.4em - 0.3em);
  border-radius: 50%;
  background: var(--surface);
  transform: translateY(-50%);
  transition: left 0.15s ease;
}
.interview-summary-header .hub-deliverable-visibility-switch-faux.is-on::after {
  left: calc(100% - (1.4em - 0.3em) - 0.15em);
}
.interview-summary-header .hub-deliverable-visibility-switch-faux.is-locked {
  opacity: 0.72;
  background: color-mix(in srgb, var(--muted) 55%, var(--border));
}
.interview-summary-header .hub-deliverable-visibility-switch-faux.is-locked::after {
  background: color-mix(in srgb, var(--surface) 88%, var(--muted));
}
.abap-float-chat-panel {
  position: relative;
  /* 우하단 고정 스택: 너비·높이 증가 시 왼쪽·위로 확장 (좌상단 드래그로 조절) */
  width: min(520px, calc(100vw - 2rem));
  height: min(520px, 72vh);
  min-width: 280px;
  min-height: 260px;
  max-width: min(96vw, 920px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--abap-float-chat-surface);
  border: 1px solid var(--abap-float-chat-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.abap-float-chat-panel[hidden] {
  display: none !important;
}
.abap-float-chat-resize {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 3.15rem;
  height: 3.15rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: var(--radius) 0 var(--radius-sm) 0;
  background: var(--abap-float-chat-surface2);
  color: var(--text);
  cursor: nwse-resize;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  touch-action: none;
}
.abap-float-chat-resize:hover {
  color: var(--text);
  background: var(--abap-float-chat-surface);
}
.abap-float-chat-resize:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: -2px;
}
/* Floating AI chat: panel top-left (mirrored expand), textarea top-right (expand) */
.abap-resize-fa {
  pointer-events: none;
  line-height: 1;
}
.abap-float-chat-resize .abap-resize-fa--panel {
  font-size: 1.05rem;
  opacity: 0.92;
  /* No fa-up-left-and-down-right-from-center; mirror the expand glyph for the top-left grip */
  transform: scaleX(-1);
}
.abap-followup-ta-resize .abap-resize-fa--ta {
  font-size: 0.9rem;
  opacity: 0.92;
}
.abap-float-chat-resize .abap-resize-fa,
.abap-followup-ta-resize .abap-resize-fa {
  filter: drop-shadow(0 0 0.85px rgba(0, 0, 0, 0.75));
}

.abap-float-chat-header {
  flex-shrink: 0;
  padding: 0.65rem 0.85rem 0.65rem 3.35rem;
  background: var(--abap-float-chat-surface2);
  border-bottom: 1px solid var(--abap-float-chat-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.abap-float-chat-header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.abap-float-chat-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.abap-float-chat-close:hover {
  background: var(--abap-float-chat-surface);
  color: var(--text);
}
.abap-float-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.6rem 0.75rem;
}
.abap-float-chat-footer {
  flex-shrink: 0;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--abap-float-chat-border);
  background: var(--abap-float-chat-surface2);
}
.abap-float-chat .abap-chat-log-panel {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
  border: 1px solid var(--abap-float-chat-border);
  border-radius: var(--radius-sm);
  background: var(--abap-float-chat-surface2);
  padding: 0.45rem;
}
.abap-float-chat-panel .analysis-fold {
  border-color: var(--abap-float-chat-border);
  background: var(--abap-float-chat-surface);
}
.abap-float-chat-panel .analysis-fold[open] > .analysis-fold-summary {
  border-bottom-color: var(--abap-float-chat-border);
}
.abap-followup-ta-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.abap-followup-ta-wrap textarea.abap-followup-msg-input {
  resize: none;
  width: 100%;
  box-sizing: border-box;
  padding-right: 2rem;
  min-height: 3.75rem;
}
.abap-followup-ta-resize {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0 var(--radius-sm) 0 var(--radius-sm);
  background: var(--abap-float-chat-surface2);
  color: var(--text);
  cursor: nwse-resize;
  line-height: 1;
  box-shadow: -1px 1px 0 var(--abap-float-chat-border);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.abap-followup-ta-resize:hover {
  color: var(--text);
  background: var(--abap-float-chat-surface);
}
.abap-followup-ta-resize:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: -1px;
}

/* 라이트: 대화 이력 영역만 살짝 더 밝은 흰색 톤(입력칸 배경은 기본 유지) */
html[data-theme="light"] .abap-float-chat .abap-chat-log-panel {
  background: #f5f8fd;
  border-color: #d2deef;
}
html[data-theme="light"] .abap-float-chat-panel .analysis-fold {
  background: #f7fafe;
  border-color: #d0ddee;
}
html[data-theme="light"] .abap-float-chat-panel .analysis-fold[open] > .analysis-fold-summary {
  border-bottom-color: #d0ddee;
}
html[data-theme="light"] .abap-float-chat-panel .abap-followup-turn .abap-followup-a {
  background: #f9fbfe;
  border-color: #d5e2f2;
}
html[data-theme="light"] .abap-followup-ta-resize {
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  box-shadow: -1px 1px 0 #e2e8f0;
}
html[data-theme="light"] .abap-followup-ta-resize:hover {
  background: #f1f5f9;
  color: #0f172a;
}
html[data-theme="light"] .abap-float-chat-resize .abap-resize-fa,
html[data-theme="light"] .abap-followup-ta-resize .abap-resize-fa {
  filter: drop-shadow(0 0.5px 0 rgba(255, 255, 255, 0.9))
    drop-shadow(0 1px 1px rgba(15, 23, 42, 0.35));
}
html[data-theme="light"] .abap-float-chat-resize {
  color: #0f172a;
}
@media (max-width: 576px) {
  .abap-float-chat {
    bottom: 0.85rem;
    right: 0.85rem;
  }
  .abap-float-chat-launcher .abap-float-chat-launcher-text {
    display: none;
  }
  .abap-float-chat-launcher {
    padding: 0.75rem;
    border-radius: 50%;
  }
  .abap-float-chat-panel {
    width: min(100vw - 1.75rem, 920px);
    height: min(78vh, 620px);
  }
  .abap-float-chat-header {
    padding-left: 0.85rem;
  }
}

@media (min-width: 577px) {
  .abap-float-chat-resize {
    display: flex;
  }
}

/* 플로팅 임시저장 — AI 문의 없을 때만 우하단 고정 (있으면 .abap-float-chat 스택 안, launcher 위) */
.draft-float-launcher {
  position: fixed;
  z-index: 15010;
  bottom: 1.15rem;
  right: 1.15rem;
  left: auto;
  pointer-events: none;
}
/* hoist 전: AI 런처와 같은 좌표 겹침 방지 (JS는 main.js·ai_inquiry 직후 실행) */
body:has(.abap-float-chat) .draft-float-launcher[data-draft-float-root]:not(.draft-float-launcher--in-chat) {
  bottom: calc(1.15rem + 3.35rem);
}
.abap-float-chat > .draft-float-launcher.draft-float-launcher--in-chat,
.draft-float-launcher.draft-float-launcher--in-chat {
  position: static;
  z-index: auto;
  bottom: auto;
  right: auto;
  left: auto;
  margin: 0;
}
.draft-float-launcher .draft-float-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.draft-float-launcher .draft-float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.draft-float-launcher .draft-float-btn:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}
html[data-theme="dark"] .draft-float-launcher .draft-float-btn.btn-outline-secondary {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(30, 33, 45, 0.92);
}
.draft-float-btn-label {
  line-height: 1.15;
}
@media (max-width: 576px) {
  .draft-float-launcher:not(.draft-float-launcher--in-chat) {
    bottom: 0.85rem;
    right: 0.85rem;
  }
  body:has(.abap-float-chat) .draft-float-launcher[data-draft-float-root]:not(.draft-float-launcher--in-chat) {
    bottom: calc(0.85rem + 3.35rem);
  }
  .draft-float-launcher .draft-float-btn-label {
    display: none !important;
  }
  .draft-float-launcher .draft-float-btn {
    padding: 0.75rem;
    border-radius: 50%;
  }
}

/* Development Proposal 생성 대기 — 다크 모드에서 에이전트명·단계 라벨 대비 */
html[data-theme="dark"] .proposal-generating-wait .step-label {
  color: #f3f4f6;
}
html[data-theme="dark"] .proposal-generating-wait .generating-step:not(.active) .step-label {
  color: rgba(243, 244, 246, 0.72);
}
html[data-theme="dark"] .proposal-generating-wait .step-label .text-muted {
  color: rgba(226, 232, 240, 0.78) !important;
}
html[data-theme="dark"] .proposal-generating-wait .proposal-gen-agents-line {
  color: rgba(226, 232, 240, 0.88);
}
html[data-theme="dark"] .proposal-generating-wait .proposal-gen-agents-line strong {
  color: #f9fafb;
  font-weight: 700;
}

/* AI 문의 패널 내부 진행 표시 */
.abap-float-chat-local-busy {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--surface) 50%, rgba(15, 17, 23, 0.58));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.abap-float-chat-local-busy[hidden] {
  display: none !important;
}
.abap-float-chat-local-busy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.6rem;
  max-width: 92%;
}
.abap-float-chat-local-busy-ring {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.abap-float-chat-local-busy-icon {
  position: absolute;
  font-size: 1.15rem;
  color: var(--primary-light);
}

/* ── 회원 정보 (/account) — 카드·라벨 대비 (라이트/다크 공통, Bootstrap 카드 기본색 무시) ── */
.account-profile-container {
  max-width: 40rem;
}
.account-profile-page .account-profile-title {
  color: var(--text);
}
.account-profile-page .account-profile-lead {
  color: var(--muted);
}
.account-profile-card.card {
  background: var(--surface);
  border-color: var(--border) !important;
  color: var(--text);
}
.account-profile-card .card-body {
  color: var(--text);
}
.account-profile-card dt.account-profile-dt {
  color: var(--muted);
  font-weight: 500;
}
.account-profile-card dd.account-profile-dd {
  color: var(--text);
}
.account-profile-card .border-bottom {
  border-color: var(--border) !important;
}
.account-profile-status-active {
  color: var(--success);
  font-weight: 600;
}
.account-profile-status-inactive {
  color: var(--muted);
}
.account-profile-meta-note {
  color: var(--muted);
}
.account-profile-meta-warn {
  color: var(--warning);
}
.account-profile-card .account-profile-form .form-label {
  color: var(--label);
}
.account-profile-card .account-profile-form-hint {
  color: var(--muted);
}

/* 비밀번호 보기/숨기기 (회원가입·비밀번호 변경·탈퇴 확인 공통) */
.input-icon-wrap.position-relative {
  position: relative;
}
.btn-pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  z-index: 10;
  line-height: 1;
}
.btn-pw-toggle:hover {
  color: var(--text);
}

/* 오퍼/매칭 배지·버튼 안 Font Awesome 아이콘 정렬 */
.offer-status-badge-fa .fa-solid {
  font-size: 0.9em;
  vertical-align: -0.12em;
}
.list-group-item .btn .fa-solid {
  font-size: 0.95em;
  vertical-align: -0.1em;
}

/* 오퍼 현황 전체 — 다크에서 허브 배경과 동일 톤(밝은 list-group 기본 제거) */
.request-offers-panel > h6.text-muted {
  color: var(--label) !important;
}
.request-offers-panel .list-group {
  background: transparent;
  border-radius: var(--radius-sm);
}
.request-offers-panel .list-group-item {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text);
}
.request-offers-panel .list-group-item + .list-group-item {
  border-top-color: var(--border);
}
.request-offers-panel .fw-semibold {
  color: var(--text);
}
.request-offers-panel .text-muted,
.request-offers-panel .small.text-muted {
  color: var(--muted) !important;
}
.request-offers-panel .offer-consent-inline .text-muted {
  color: var(--label) !important;
}

/* 오퍼 문의 확장 패널 — 카드보다 한 단계 깊은 면 */
.offer-inquiry-panel-inner {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text);
}
.offer-inquiry-panel-inner .offer-inquiry-label {
  color: var(--label);
  font-weight: 600;
}
.offer-inquiry-panel-inner .form-control {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text);
}
.offer-inquiry-panel-inner .form-control::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, var(--text) 30%);
  opacity: 1;
}
html[data-theme="dark"] .offer-inquiry-panel-inner .form-control::placeholder {
  color: #a8b4c8;
}
html[data-theme="light"] .offer-inquiry-panel-inner .form-control::placeholder {
  color: #64748b;
}
.offer-inquiry-panel-inner .form-control:focus {
  background: var(--input-bg);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 25%, transparent);
}
.offer-inquiry-privacy-note {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--info);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--info);
  background: color-mix(in srgb, var(--info) 14%, var(--surface2));
}
html[data-theme="dark"] .offer-inquiry-privacy-note {
  color: #7dd3fc;
  background: color-mix(in srgb, var(--info) 12%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--info) 22%, transparent);
}
html[data-theme="light"] .offer-inquiry-privacy-note {
  color: #0369a1;
  background: color-mix(in srgb, var(--info) 10%, var(--surface2));
  border-left-color: #0284c7;
}
.offer-inquiry-history .text-uppercase {
  color: var(--label);
}
.offer-inquiry-msg-stream {
  max-height: min(22rem, 52vh);
  overflow-y: auto;
  padding: 0.35rem 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
}
.offer-inquiry-channel-hint {
  font-size: 0.72rem;
  line-height: 1.3;
  margin-top: 0.1rem;
  opacity: 0.85;
}
.offer-inquiry-panel-inner .offer-inquiry-reply-form {
  border-top-color: var(--border) !important;
}
.offer-inquiry-form--submitting .offer-inquiry-submit-btn {
  pointer-events: none;
}
.offer-inquiry-progress .spinner-border {
  vertical-align: -0.15em;
}
.offer-consent-inline {
  max-width: 100%;
}
.offer-consent-inline .badge.rounded-pill {
  font-weight: 600;
  font-size: 0.68rem;
  padding: 0.28em 0.55em;
  vertical-align: middle;
}

.menu-list-card {
  position: relative;
  overflow: hidden;
}

/* 제안 버킷 목록: 미매칭 오퍼 — 실제 보이는 카드(.rfp-list-card) 배경이 불투명이라 여기에 펄스 적용 */
.menu-list-card--proposal-offer-pulse .rfp-list-surface-tile > .rfp-list-card,
.menu-list-card--proposal-offer-pulse .rfp-list-surface-list > .rfp-list-card {
  animation: menu-list-card-proposal-offer-pulse 2.2s ease-in-out infinite;
}

@keyframes menu-list-card-proposal-offer-pulse {
  0%,
  100% {
    background-color: var(--surface);
    box-shadow: none;
  }
  50% {
    background-color: color-mix(in srgb, var(--surface) 78%, var(--bs-warning) 22%);
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--bs-warning) 35%, transparent),
      0 4px 18px color-mix(in srgb, var(--bs-warning) 22%, transparent);
  }
}

html[data-theme="dark"] .menu-list-card--proposal-offer-pulse .rfp-list-surface-tile > .rfp-list-card,
html[data-theme="dark"] .menu-list-card--proposal-offer-pulse .rfp-list-surface-list > .rfp-list-card {
  animation: menu-list-card-proposal-offer-pulse-dark 2.2s ease-in-out infinite;
}

@keyframes menu-list-card-proposal-offer-pulse-dark {
  0%,
  100% {
    background-color: var(--surface);
    box-shadow: none;
  }
  50% {
    background-color: color-mix(in srgb, var(--surface) 72%, #fbbf24 28%);
    box-shadow:
      0 0 0 2px color-mix(in srgb, #fbbf24 30%, transparent),
      0 4px 18px color-mix(in srgb, #f59e0b 18%, transparent);
  }
}

.menu-list-offer-banner {
  font-size: 0.875rem;
  line-height: 1.45;
  padding: 0.5rem 0.85rem;
  border-radius: 0.375rem;
  background: color-mix(in srgb, var(--bs-warning) 11%, var(--surface2, var(--bs-body-bg)));
  border: 1px solid color-mix(in srgb, var(--bs-warning) 28%, var(--border, rgba(0, 0, 0, 0.12)));
}

.menu-list-offer-banner__text {
  color: var(--text, inherit);
}

/* 상단 메뉴: 제안 버킷 미매칭 오퍼 — 타일 점과 동일한 글로우(크기만 약간 작게) */
.navbar-custom .nav-item.position-relative {
  padding-bottom: 0.35rem;
}

.navbar-custom .nav-proposal-offer-dot {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fecaca, #ef4444 52%, #991b1b);
  box-shadow:
    0 0 0 2px color-mix(in srgb, #ef4444 28%, transparent),
    0 2px 8px color-mix(in srgb, #ef4444 45%, transparent);
  animation: nav-proposal-offer-dot-glow 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes nav-proposal-offer-dot-glow {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
    box-shadow:
      0 0 0 2px color-mix(in srgb, #ef4444 28%, transparent),
      0 2px 8px color-mix(in srgb, #ef4444 45%, transparent);
  }
  50% {
    transform: scale(1.08);
    filter: saturate(1.12);
    box-shadow:
      0 0 0 4px color-mix(in srgb, #ef4444 38%, transparent),
      0 3px 12px color-mix(in srgb, #ef4444 55%, transparent);
  }
}

.stat-card--proposal-offer-signal .stat-card-offer-dot {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fecaca, #ef4444 52%, #991b1b);
  box-shadow:
    0 0 0 3px color-mix(in srgb, #ef4444 28%, transparent),
    0 3px 10px color-mix(in srgb, #ef4444 45%, transparent);
  animation: stat-card-offer-dot-glow 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes stat-card-offer-dot-glow {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
    box-shadow:
      0 0 0 3px color-mix(in srgb, #ef4444 28%, transparent),
      0 3px 10px color-mix(in srgb, #ef4444 45%, transparent);
  }
  50% {
    transform: scale(1.06);
    filter: saturate(1.15);
    box-shadow:
      0 0 0 5px color-mix(in srgb, #ef4444 38%, transparent),
      0 4px 14px color-mix(in srgb, #ef4444 55%, transparent);
  }
}

/* 컨설턴트 전용 [요청 Console]: li 너비는 링크만(말풍선은 absolute로 배치해 옆 메뉴 간격이 벌어지지 않음) */
.navbar-custom .nav-item-request-console {
  align-self: center;
}

.navbar-custom .nav-item-request-console .nav-request-console-link-wrap {
  width: max-content;
  max-width: 100%;
  padding-bottom: 0.35rem;
}

/* 말풍선은 문서 흐름에서 제외 → flex 행에서 이 항목 폭이 말풍선에 끌려가지 않음 */
.navbar-custom .nav-item-request-console .nav-request-console-hint {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.12rem;
  width: max-content;
  max-width: min(14rem, calc(100vw - 2rem));
  z-index: 1040;
  line-height: 0;
  pointer-events: none;
}

.navbar-custom .nav-item-request-console .nav-link-request-console {
  font-family: "Noto Sans KR", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* 라이트 네비: 인디고 톤으로 다른 메뉴보다 선명하게 (!important: 전역 .nav-link 색 규칙보다 우선) */
html[data-theme="light"] .navbar-custom .nav-item-request-console .nav-link-request-console:not(.active) {
  color: #4338ca !important;
}

html[data-theme="light"] .navbar-custom .nav-item-request-console .nav-link-request-console:hover {
  color: #3730a3 !important;
}

html[data-theme="light"] .navbar-custom .nav-item-request-console .nav-link-request-console.active {
  color: #312e81 !important;
}

/* 다크 네비: 밝은 바이올렛 */
html[data-theme="dark"] .navbar-custom .nav-item-request-console .nav-link-request-console:not(.active) {
  color: #a5b4fc !important;
}

html[data-theme="dark"] .navbar-custom .nav-item-request-console .nav-link-request-console:hover {
  color: #c7d2fe !important;
}

html[data-theme="dark"] .navbar-custom .nav-item-request-console .nav-link-request-console.active {
  color: #e0e7ff !important;
}

.navbar-custom .nav-request-console-bubble {
  display: inline-block;
  margin-top: 0;
  max-width: 14rem;
  font-family: "Noto Sans KR", ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.68rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #1e1b4b;
  background: linear-gradient(165deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid color-mix(in srgb, #6366f1 32%, transparent);
  border-radius: 10px;
  padding: 0.35rem 0.55rem 0.4rem;
  position: relative;
  box-shadow: 0 2px 12px color-mix(in srgb, #4338ca 22%, transparent);
  animation: nav-request-console-bobble 2.6s ease-in-out 5;
  animation-fill-mode: forwards;
  transform-origin: 50% 100%;
}

.navbar-custom .nav-request-console-bubble.nav-request-console-bubble--settled {
  animation: none !important;
}

.navbar-custom .nav-request-console-bubble::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: -6px;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-left: 1px solid color-mix(in srgb, #6366f1 32%, transparent);
  border-top: 1px solid color-mix(in srgb, #6366f1 32%, transparent);
  transform: rotate(45deg);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

html[data-theme="dark"] .navbar-custom .nav-request-console-bubble {
  color: #e0e7ff;
  background: linear-gradient(165deg, #312e81 0%, #1e1b4b 100%);
  border-color: color-mix(in srgb, #818cf8 35%, transparent);
  box-shadow: 0 2px 16px color-mix(in srgb, #000 45%, #6366f1 25%);
}

html[data-theme="dark"] .navbar-custom .nav-request-console-bubble::before {
  background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
  border-left-color: color-mix(in srgb, #818cf8 35%, transparent);
  border-top-color: color-mix(in srgb, #818cf8 35%, transparent);
}

@keyframes nav-request-console-bobble {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-3px) scale(1.02);
  }
  58% {
    transform: translateY(0) scale(1);
  }
  72% {
    transform: translateY(-2px) scale(1.01);
  }
}

/* 요청 Console 트리·리스트: 미답변 문의 표시 */
.console-tree-pending-dot,
.console-mail-pending-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fecaca, #ef4444 52%, #991b1b);
  box-shadow:
    0 0 0 2px color-mix(in srgb, #ef4444 28%, transparent),
    0 1px 6px color-mix(in srgb, #ef4444 40%, transparent);
  animation: nav-proposal-offer-dot-glow 2.4s ease-in-out infinite;
}

.mail-row.mail-row-pending-inquiry {
  box-shadow: inset 3px 0 0 0 #ef4444;
}

/* ── 공지·FAQ·이용후기 상세 & 홈에서 한 줄 링크 ─────────────────── */
.notice-item-link:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.home-faq-link-list .home-faq-row {
  border-bottom: none !important;
}
.home-faq-link-list .home-faq-row:last-child {
  border-bottom: none !important;
}
.home-faq-row:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.site-content-page {
  background: var(--surface);
  min-height: 50vh;
}
.site-content-page .text-muted strong {
  color: var(--text);
  font-weight: 600;
}
.site-content-page .text-muted a.site-about-kb-link {
  color: var(--primary-light);
}
.site-content-page .text-muted a.site-about-kb-link:hover {
  color: var(--primary);
}
.site-content-container {
  max-width: 820px;
}
.site-content-breadcrumb .breadcrumb {
  background: transparent;
  padding: 0;
}
.site-content-breadcrumb .breadcrumb-item a {
  color: var(--primary-light);
  text-decoration: none;
}
.site-content-breadcrumb .breadcrumb-item a:hover {
  text-decoration: underline;
}
.site-article {
  background: var(--surface2);
  border-color: var(--border) !important;
}
.site-faq-q-icon {
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  color: var(--primary-light);
}
.site-article-body.markdown-body h1,
.site-article-body.markdown-body h2,
.site-article-body.markdown-body h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text);
}
.site-article-body.markdown-body h1 {
  font-size: 1.35rem;
}
.site-article-body.markdown-body h2 {
  font-size: 1.2rem;
}
.site-article-body.markdown-body h3 {
  font-size: 1.05rem;
}
.site-article-body.markdown-body p {
  margin-bottom: 0.85rem;
  line-height: 1.65;
  color: var(--text);
}
.site-article-body.markdown-body ul,
.site-article-body.markdown-body ol {
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
}
.site-article-body.markdown-body li {
  margin-bottom: 0.35rem;
  color: var(--text);
}
.site-article-body.markdown-body ul.task-list {
  list-style: none;
  padding-left: 0;
}
.site-article-body.markdown-body .task-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.site-article-body.markdown-body .task-list-item input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  pointer-events: none;
}
.site-article-body.markdown-body ul,
.site-article-body.markdown-body ol {
  color: var(--text);
}
.site-article-body.markdown-body hr {
  border-color: var(--border);
  opacity: 1;
}
.site-article-body.markdown-body strong {
  font-weight: 600;
  color: var(--text);
}
.site-article-body.markdown-body code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}
.site-article-body.markdown-body table {
  width: 100%;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.site-article-body.markdown-body .proposal-table-wrap .proposal-md-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  color: var(--text);
}
.site-article-body.markdown-body .proposal-md-table th,
.site-article-body.markdown-body .proposal-md-table td {
  color: var(--text);
  border-color: var(--border);
  vertical-align: top;
}
html[data-theme="dark"] .site-article-body.markdown-body .proposal-md-table thead.table-light {
  --bs-table-bg: color-mix(in srgb, var(--surface2) 88%, var(--primary) 12%);
  --bs-table-color: var(--text);
  background-color: var(--bs-table-bg) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .site-article-body.markdown-body .proposal-md-table thead.table-light th {
  color: var(--text) !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .site-article.card .site-article-header h1.h3.fw-semibold {
  color: var(--text) !important;
}
html[data-theme="dark"] .site-content-page .site-content-breadcrumb .breadcrumb-item.active {
  color: var(--muted);
}
html[data-theme="dark"] .site-content-page .btn-outline-secondary {
  color: var(--text);
  border-color: var(--border);
}

/* 공지/FAQ 상세: 헤더 제목 마크다운·본문이 테마 대비 색으로 보이도록 */
.site-article.card .site-article-header .markdown-body,
.site-article.card .site-article-header .markdown-body p,
.site-article.card .site-article-header .markdown-body h1,
.site-article.card .site-article-header .markdown-body h2,
.site-article.card .site-article-header .markdown-body h3,
.site-article.card .site-article-header .markdown-body strong,
.site-article.card .site-article-header .markdown-body li {
  color: var(--text);
}
.site-article.card .site-article-header .markdown-body a {
  color: var(--primary-light);
  text-decoration: underline;
}
html[data-theme="light"] .site-article.card .site-article-header .markdown-body a {
  color: var(--primary-dark);
}
.site-article.card .site-article-header h1.text-reset,
.site-article.card .site-article-header h1.h3,
.site-article.card .site-article-header .h4.site-md-title-inline,
.site-article.card .site-faq-answer .site-article-body.markdown-body,
.site-article.card .site-faq-answer .site-article-body.markdown-body p,
.site-article.card .site-faq-answer .site-article-body.markdown-body li,
.site-article.card .site-faq-answer .site-article-body.markdown-body td,
.site-article.card .site-faq-answer .site-article-body.markdown-body th {
  color: var(--text);
}
/* 다크: Bootstrap heading·text-reset이 카드 배경과 비슷해지는 경우 대비 강화 */
html[data-theme="dark"] .site-article.card .site-article-header .site-md-title-inline,
html[data-theme="dark"] .site-article.card .site-article-header .site-md-title-inline.markdown-body,
html[data-theme="dark"] .site-article.card .site-article-header .site-md-title-inline.markdown-body p,
html[data-theme="dark"] .site-article.card .site-article-header .site-md-title-inline.markdown-body h1,
html[data-theme="dark"] .site-article.card .site-article-header .site-md-title-inline.markdown-body h2,
html[data-theme="dark"] .site-article.card .site-article-header .site-md-title-inline.markdown-body h3,
html[data-theme="dark"] .site-article.card .site-article-header .site-md-title-inline.markdown-body strong,
html[data-theme="dark"] .site-article.card .site-article-header h1.h3.site-md-title-inline {
  color: #f8fafc !important;
}
html[data-theme="dark"] .site-article.card .site-article-header .h4.site-md-title-inline,
html[data-theme="dark"] .site-article.card .site-article-header .h4.site-md-title-inline.markdown-body,
html[data-theme="dark"] .site-article.card .site-article-header .h4.site-md-title-inline.markdown-body p,
html[data-theme="dark"] .site-article.card .site-article-header .h4.site-md-title-inline.markdown-body strong {
  color: #f8fafc !important;
}
html[data-theme="dark"] .site-notice-list-table .site-list-title-link .site-md-title-inline,
html[data-theme="dark"] .site-notice-list-table .site-list-title-link .site-md-title-inline.markdown-body p,
html[data-theme="dark"] .site-notice-list-table .site-list-title-link .site-md-title-inline.markdown-body strong {
  color: #f8fafc !important;
}
html[data-theme="dark"] .site-notice-list-table .site-list-title-link:hover .site-md-title-inline,
html[data-theme="dark"] .site-notice-list-table .site-list-title-link:hover .site-md-title-inline.markdown-body p {
  color: #e0e7ff !important;
}
.site-article.card .site-article-body.markdown-body a {
  color: var(--primary-light);
}
html[data-theme="light"] .site-article.card .site-article-body.markdown-body a {
  color: var(--primary-dark);
}

/* 홈 탭 하단 전체 목록 링크(다크·라이트에서 대비) */
a.site-home-tab-more-link {
  color: var(--primary-light);
  font-weight: 600;
}
a.site-home-tab-more-link:hover {
  filter: brightness(1.12);
  text-decoration: underline !important;
}
html[data-theme="light"] a.site-home-tab-more-link {
  color: var(--primary-dark);
}
html[data-theme="light"] a.site-home-tab-more-link:hover {
  color: var(--primary);
}

/* 공지/FAQ 목록·제목 마크다운(한 줄·짧은 블록) */
.site-content-toolbar {
  gap: 0.5rem;
}
.site-list-page {
  max-width: 960px;
}
.site-list-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  overflow: hidden;
}
.site-notice-list-table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--text);
  margin-bottom: 0;
}
.site-notice-list-table thead th {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.site-notice-list-table td {
  border-color: var(--border);
}
.site-list-title-link:hover {
  color: var(--primary-light) !important;
}
.site-list-page-input {
  width: 4.25rem;
}
.site-list-pagination .page-link {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text);
}
.site-list-pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.site-list-pagination .page-item.disabled .page-link {
  opacity: 0.45;
  pointer-events: none;
}
.site-md-title-inline.markdown-body > p,
.site-md-title-inline.markdown-body > h1,
.site-md-title-inline.markdown-body > h2,
.site-md-title-inline.markdown-body > h3 {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
  padding: 0;
  line-height: inherit;
}
.site-md-title-inline.markdown-body h1,
.site-md-title-inline.markdown-body h2,
.site-md-title-inline.markdown-body h3 {
  font-weight: 600;
}
.notice-title.site-md-title-inline.markdown-body > p {
  display: inline;
  margin: 0;
}
.home-faq-row .site-md-title-inline.markdown-body > p {
  display: inline;
  margin: 0;
}

/* Admin 공지/FAQ: 컴팩트 입력란(고정 높이 + 스크롤) */
.admin-compact-md {
  height: 6.75rem;
  min-height: 6.75rem;
  max-height: 6.75rem;
  overflow-y: auto;
  resize: none;
  box-sizing: border-box;
}
.admin-compact-md--title {
  height: 3.75rem;
  min-height: 3.75rem;
  max-height: 3.75rem;
}

/* 요청 자산: 비허용 사용자는 드래그 선택 억제(JS에서 copy/cut 추가 차단) */
.code-asset-locked,
.code-asset-locked * {
  user-select: none !important;
  -webkit-user-select: none !important;
}
.code-asset-locked input,
.code-asset-locked textarea,
.code-asset-locked select,
.code-asset-locked button {
  user-select: auto !important;
  -webkit-user-select: auto !important;
}

/* 구독 플랜 (/subscription-plans) */
.subscription-plans-page {
  /* 배경: page-bg-texture 그룹 */
}
.subscription-plans-hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, color-mix(in srgb, var(--primary-light) 12%, transparent), transparent 45%),
    var(--bg);
}
.subscription-plans-breadcrumb .breadcrumb {
  --bs-breadcrumb-divider-color: var(--muted);
}
.subscription-plans-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-light);
}
.subscription-plans-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.subscription-plans-lead {
  font-size: 1.02rem;
  line-height: 1.55;
}
.subscription-plans-notice {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  box-shadow: var(--shadow);
}
.subscription-plans-notice.markdown-body {
  margin-bottom: 0;
}
.subscription-plans-notice.markdown-body > p:last-child {
  margin-bottom: 0;
}
.subscription-plans-tabs-wrap {
  max-width: 72rem;
}
.subscription-plans-currency-row {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}
.subscription-plans-currency-toggle .btn {
  min-width: 2.75rem;
}
.subscription-plans-currency-toggle .btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: transparent;
  color: #fff;
}
.subscription-plans-segmented {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
.subscription-plans-segment {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.subscription-plans-segment:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.subscription-plans-segment.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--primary) 45%, transparent);
}
.subscription-plans-tab-panels {
  min-height: 12rem;
}
.subscription-plans-cards {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}
.plan-price-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.plan-price-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.plan-price-card--featured {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 10%, var(--surface)) 0%, var(--surface) 48%);
  box-shadow: 0 8px 32px color-mix(in srgb, var(--primary) 18%, transparent);
}
.plan-price-card--featured:hover {
  border-color: var(--primary-light);
}
.plan-price-badge {
  position: absolute;
  top: -0.5rem;
  right: 0.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--warning), color-mix(in srgb, var(--warning) 70%, #c2410c));
  color: #1a1008;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.plan-price-badge--current {
  text-transform: none;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 75%, #14532d));
  color: #f0fdf4;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--success) 35%, transparent);
}
.plan-price-card-inner {
  padding: 1.15rem 1rem 1rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}
.plan-price-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
}
.plan-price-amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
}
.plan-price-period {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.85;
}
.plan-price-note {
  margin: 0.35rem 0 0.5rem;
  min-height: 2.4em;
}
.plan-price-bullets {
  text-align: left;
  padding-left: 1.1rem;
  margin: 0 0 0.85rem;
  flex-grow: 1;
}
.plan-price-bullets li {
  margin-bottom: 0.2rem;
}
.subscription-plans-compare {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}
.subscription-plans-compare-title {
  color: var(--text);
}
.plan-compare-table {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}
.plan-compare-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1.35fr) repeat(4, 1fr);
  gap: 0;
  align-items: stretch;
  font-size: 0.82rem;
}
@media (min-width: 768px) {
  .plan-compare-row {
    font-size: 0.875rem;
  }
}
.plan-compare-row > div {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.plan-compare-row > div:first-child {
  justify-content: flex-start;
  text-align: left;
  padding-left: 0.75rem;
  background: color-mix(in srgb, var(--surface2) 55%, transparent);
  font-weight: 500;
  color: var(--text);
}
.plan-compare-row--head > div {
  background: var(--surface2);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--label);
  border-bottom: 1px solid var(--border);
}
.plan-compare-row:last-child > div {
  border-bottom: none;
}
.plan-compare-row--head > div:first-child {
  background: var(--surface2);
}
.plan-compare-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.plan-compare-val--ok {
  color: var(--success);
  font-size: 1rem;
}
.plan-compare-val--na {
  color: var(--muted);
  opacity: 0.65;
  font-size: 0.95rem;
}
.plan-compare-val--txt {
  color: var(--text);
  font-weight: 500;
  line-height: 1.25;
}
@media (max-width: 575.98px) {
  .plan-compare-row {
    grid-template-columns: minmax(5.5rem, 1fr) repeat(4, minmax(0, 1fr));
  }
  .plan-compare-row > div {
    padding: 0.45rem 0.25rem;
  }
  .plan-compare-row--head > div {
    font-size: 0.65rem;
  }
}
.subscription-plans-footnote {
  opacity: 0.92;
}

/* 구독 플랜 비교 표 — 기능 설명 툴팁 */
.subscription-plans-page .tooltip-inner {
  max-width: min(22rem, 90vw);
  text-align: left;
  white-space: normal;
}
.subscription-plans-page .plan-feature-help-btn {
  flex-shrink: 0;
  --plan-help-red: #c41e3a;
  width: 1.28rem;
  height: 1.28rem;
  min-width: 1.28rem;
  padding: 0;
  margin: 0;
  line-height: 1;
  border-radius: 50%;
  border: 1.5px solid var(--plan-help-red) !important;
  border-color: var(--plan-help-red) !important;
  background: transparent !important;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--plan-help-red);
}
.subscription-plans-page .plan-feature-help-btn:hover,
.subscription-plans-page .plan-feature-help-btn:focus {
  color: var(--plan-help-red);
  border-color: var(--plan-help-red);
  background: transparent !important;
  opacity: 0.92;
}
.subscription-plans-page .plan-feature-help-btn .plan-feature-help-q {
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  color: var(--plan-help-red);
}
.subscription-plans-page .plan-feature-help-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--plan-help-red) 45%, transparent);
  outline-offset: 2px;
}

/* Floating action (홈 비로그인 · 로그인 충전) */
.fab-action {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: #fff;
  background: var(--primary, #0d6efd);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fab-action:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.fab-action--start {
  background: linear-gradient(135deg, var(--primary, #0d6efd), #6366f1);
}
.fab-action--topup {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border: 1px solid rgba(99, 102, 241, 0.45);
}
/* AI 에게 문의 플로팅과 겹침 방지 — 신규/분석/연동 상세·작성 폼 */
body:has(.abap-float-chat) .fab-action--topup {
  display: none !important;
}
@media (max-width: 575.98px) {
  .fab-action {
    right: 0.85rem;
    bottom: 0.85rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
  }
  .fab-action__label {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

