/* ── 기본 변수 ── */
:root {
  --bg: #060810;
  --bg-card: #0d1320;
  --bg-card-hover: #121a2e;
  --border: #1a2540;
  --border-hover: #2a3f6a;
  --text: #e8edf5;
  --text-sub: #6b7fa3;
  --text-muted: #3d4f72;
  --accent: #ff6b2b;
  --accent-dim: rgba(255, 107, 43, 0.15);
  --accent-glow: rgba(255, 107, 43, 0.4);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.1);
  --green: #22d3a0;
  --green-dim: rgba(34, 211, 160, 0.1);
  --font: 'Inter', 'Noto Sans KR', -apple-system, sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 리셋 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(6, 8, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(6, 8, 16, 0.97);
}
.nav-inner {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.logo-icon {
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}
.logo-text { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.nav-cta {
  color: var(--accent);
  border: 1px solid rgba(255,107,43,0.4);
  margin-left: 8px;
}
.nav-link.nav-cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  font-family: var(--font);
  transition: all var(--transition);
  margin-left: 8px;
}
.lang-toggle:hover { border-color: var(--border-hover); color: var(--text); }
.lang-sep { opacity: 0.3; }
.lang-option { transition: color var(--transition); }
.lang-option.active { color: var(--accent); font-weight: 700; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #ff7d45;
  box-shadow: 0 0 32px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}
.btn-full { width: 100%; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 32px 80px;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(26, 37, 64, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 37, 64, 0.35) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 30%, black 20%, transparent 80%);
}

.hero-content {
  flex: 1;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 28px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero-title .line { display: block; }
.hero-title .accent { color: var(--accent); }

.hero-sub {
  font-size: 17px;
  color: var(--text-sub);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.stat { text-align: left; }
.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-unit { font-size: 14px; font-weight: 400; color: var(--text-sub); margin-left: 2px; }
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ── TERMINAL ── */
.hero-visual {
  flex: 0 0 440px;
  position: relative;
  z-index: 1;
}

.terminal {
  background: #0a0f1e;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,107,43,0.05),
    0 32px 80px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #0d1424;
  border-bottom: 1px solid var(--border);
}
.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.green { background: #28c840; }
.t-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.terminal-body {
  padding: 24px 20px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 2;
}
.t-line { display: flex; gap: 8px; }
.t-prompt { color: var(--accent); }
.t-cmd { color: #93c5fd; }
.t-out.success { color: var(--green); }
.t-out.info { color: var(--text-sub); }
.t-out.highlight { color: var(--accent); font-weight: 600; }
.t-cursor {
  color: var(--accent);
  animation: blink 1.2s step-end infinite;
  margin-top: 4px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── SECTIONS COMMON ── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-desc {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 48px;
  max-width: 540px;
}

/* ── PROBLEM ── */
.problem {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.problem-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.problem-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.problem-icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}
.problem-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.problem-card p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}

/* ── SERVICES ── */
.services {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.service-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.service-card.featured {
  border-color: rgba(255,107,43,0.3);
  background: linear-gradient(135deg, rgba(255,107,43,0.05), var(--bg-card));
}
.service-card.featured::before {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 1;
}

.service-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.service-icon-wrap {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}
.service-card.featured .service-icon-wrap {
  background: var(--accent-dim);
  border-color: rgba(255,107,43,0.3);
}
.service-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.service-card p {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 20px;
}
.service-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-features li {
  font-size: 12.5px;
  color: var(--text-sub);
  padding-left: 16px;
  position: relative;
}
.service-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
}

/* ── INDUSTRIES ── */
.industries {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(59,130,246,0.02) 0%, transparent 60%);
}
.industries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.industry-card {
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.industry-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.industry-emoji {
  font-size: 36px;
  display: block;
  margin-bottom: 16px;
}
.industry-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.industry-card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.industry-card li {
  font-size: 13px;
  color: var(--text-sub);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.industry-card li::before {
  content: '◦';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.industry-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.25);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
}

/* ── HOW IT WORKS ── */
.how {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 56px;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.step-content p {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.65;
  max-width: 260px;
}
.step-arrow {
  color: var(--text-muted);
  font-size: 20px;
  padding: 0 24px;
  padding-top: 6px;
  flex-shrink: 0;
}

/* ── CTA ── */
.cta {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.cta-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.cta-badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.cta-inner h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cta-inner > p {
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 36px;
}

/* ── FORM ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  position: relative;
}
.form-input {
  width: 100%;
  padding: 18px 16px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  transform: translateY(-8px) scale(0.82);
  color: var(--accent);
}
.form-label {
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform var(--transition), color var(--transition);
}
.form-select {
  cursor: pointer;
}
.form-select option { background: #0d1320; }

.cta-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── FOOTER ── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding-top: 100px;
    text-align: center;
  }
  .hero-content { max-width: 600px; margin: 0 auto; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { flex: none; width: 100%; max-width: 480px; margin: 0 auto; }
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .nav-links .nav-link:not(.nav-cta) { display: none; }
  .hero { padding: 100px 20px 60px; }
  .problem-grid { grid-template-columns: 1fr; }
  .industries-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; gap: 32px; }
  .step-arrow { display: none; }
  .step-content p { max-width: 100%; }
  .footer-inner { justify-content: center; flex-direction: column; text-align: center; }
}

/* ── 언어 전환 애니메이션 ── */
[data-ko], [data-en] {
  transition: opacity 0.15s ease;
}
.lang-transition {
  opacity: 0;
}

/* ── AI CS봇 채팅 위젯 ── */

/* 플로팅 버튼 */
.chat-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 8px 32px var(--accent-glow);
  transition: all var(--transition);
  user-select: none;
  font-weight: 600;
  font-size: 14px;
}
.chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
  background: #ff7d45;
}
.chat-launcher-label { letter-spacing: -0.01em; }
.chat-unread {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}
.chat-unread.hidden { display: none; }

/* 채팅 창 */
.chat-window {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 200;
  width: 360px;
  max-height: 560px;
  background: #0d1320;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
}
.chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* 채팅 헤더 */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #0a0f1e;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 38px;
  height: 38px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 16px;
  overflow: hidden;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.chat-title { font-size: 14px; font-weight: 700; }
.chat-online {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--green);
  margin-top: 2px;
}
.online-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
  font-family: var(--font);
}
.chat-close:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* 로그인 패널 */
.chat-login-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  gap: 24px;
  text-align: center;
}
.chat-login-msg { width: 100%; }
.chat-bot-bubble {
  display: inline-block;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  text-align: left;
}

/* 카카오 버튼 */
.btn-kakao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: #FEE500;
  color: #191919;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-kakao:hover {
  background: #fdd900;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(254,229,0,0.3);
}

/* 채팅 바디 */
.chat-body {
  flex: 1;
  display: none;
  flex-direction: column;
  min-height: 0;
}
.chat-body.active { display: flex; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* 메시지 버블 */
.msg {
  display: flex;
  gap: 8px;
  max-width: 85%;
}
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.bot { align-self: flex-start; }

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }

.msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.6;
}
.msg.bot .msg-bubble {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  color: var(--text);
}
.msg.user .msg-bubble {
  background: var(--accent);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
}

/* 타이핑 인디케이터 */
.chat-typing {
  display: none;
  padding: 4px 16px 8px;
  gap: 4px;
  align-items: center;
}
.chat-typing.active { display: flex; }
.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* 입력창 */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-muted); }
.chat-send {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.chat-send:hover { background: #ff7d45; transform: scale(1.05); }
.chat-send:disabled { background: var(--text-muted); cursor: not-allowed; transform: none; }

/* 날짜 구분선 */
.chat-date-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 0;
  position: relative;
}
.chat-date-divider::before, .chat-date-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--border);
}
.chat-date-divider::before { left: 0; }
.chat-date-divider::after { right: 0; }

@media (max-width: 480px) {
  .chat-window { width: calc(100vw - 32px); right: 16px; bottom: 84px; }
  .chat-launcher { right: 16px; bottom: 16px; }
}

/* ════════════════════════════════════════
   경영 인사이트 대시보드 데모
════════════════════════════════════════ */

.dash-section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

/* 창 */
.dash-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,107,43,0.04),
    0 40px 120px rgba(0,0,0,0.5);
}

.dash-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #090d1a;
  border-bottom: 1px solid var(--border);
}
.dash-dots { display: flex; gap: 6px; }
.dash-titlebar-label {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.dash-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--green);
}

.dash-body { padding: 24px; }

/* 탭 */
.dash-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}
.dash-tab {
  padding: 7px 20px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* 그리드 */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.dash-sales    { grid-column: span 2; }
.dash-return   { grid-column: span 1; }
.dash-services { grid-column: span 2; }
.dash-hours    { grid-column: span 1; }

/* 카드 */
.dash-card {
  background: #090d1a;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.dash-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* KPI 행 */
.dash-kpi-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.dash-kpi-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 4px;
}
.dash-growth {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(34,211,160,0.1);
  border: 1px solid rgba(34,211,160,0.2);
  color: var(--green);
  padding: 5px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}
.dash-growth-arrow { font-size: 10px; }

/* 바 차트 */
.dash-chart { display: flex; flex-direction: column; gap: 6px; }
.dash-bars {
  height: 110px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.dash-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.dash-bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: rgba(255,107,43,0.3);
  transition: height 0.7s cubic-bezier(0.34,1.56,0.64,1);
  min-height: 3px;
  position: relative;
}
.dash-bar-fill.is-peak {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(255,107,43,0.45);
}
.dash-xlabels {
  display: flex;
  gap: 6px;
}
.dash-xlabel {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
}

/* 링 차트 */
.dash-ring-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
}
.dash-ring { width: 100%; height: 100%; }
.dash-ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 9;
}
.dash-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1);
}
.dash-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.dash-ring-pct {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.dash-ring-pct small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
}
.dash-ring-center > span:last-child {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* 재방문 통계 */
.dash-rstat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.dash-rstat-item { text-align: center; }
.dash-rstat-key {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}
.dash-rstat-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.dash-rstat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* 인기 서비스 */
.dash-svc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.dash-svc-row:last-child { margin-bottom: 0; }
.dash-svc-rank {
  width: 18px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  text-align: center;
}
.dash-svc-name {
  width: 64px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.dash-svc-track {
  flex: 1;
  height: 7px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.dash-svc-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
}
.dash-svc-pct {
  width: 34px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  text-align: right;
  flex-shrink: 0;
}

/* 히트맵 */
.dash-hmap-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 4px;
}
.dash-hmap-day {
  text-align: center;
  font-size: 9px;
  color: var(--text-muted);
}
.dash-hmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 14px;
}
.dash-hmap-cell {
  height: 20px;
  border-radius: 3px;
  cursor: default;
  transition: transform 0.15s ease;
}
.dash-hmap-cell:hover { transform: scale(1.12); }

/* 피크 정보 */
.dash-peak {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-peak-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: 100px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dash-peak-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* 대시보드 반응형 */
@media (max-width: 1024px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-sales    { grid-column: span 2; }
  .dash-return   { grid-column: span 1; }
  .dash-services { grid-column: span 1; }
  .dash-hours    { grid-column: span 1; }
}
@media (max-width: 640px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-sales, .dash-return, .dash-services, .dash-hours { grid-column: span 1; }
  .dash-body { padding: 16px; }
  .dash-tabs { width: 100%; }
  .dash-tab { flex: 1; text-align: center; }
}
