/* ═══════════════════════════════════════════════════════════════════════════
   FunnelBrain - Design Tokens & CSS Variables
   ═══════════════════════════════════════════════════════════════════════════ */

/* Google Fonts Import */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&family=Nanum+Gothic:wght@400;700;800&display=swap");

:root {
  /* ─────────────────────────────────────────────────────────────────────────
     Premium Color Palette - Deep Indigo & Warm Gold
     ───────────────────────────────────────────────────────────────────────── */

  /* Primary - Deep Indigo */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;
  --primary-950: #1e1b4b;

  /* Accent - Warm Gold */
  --accent-50: #fffbeb;
  --accent-100: #fef3c7;
  --accent-200: #fde68a;
  --accent-300: #fcd34d;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-700: #b45309;
  --accent-800: #92400e;
  --accent-900: #78350f;

  /* Neutral - Slate */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  --neutral-950: #020617;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Theme Variables - Light Mode */
  --primary-color: var(--primary-600);
  --secondary-color: var(--success);
  --accent-color: var(--accent-500);
  --background-color: var(--neutral-100);
  --text-color: var(--neutral-700);
  --heading-color: var(--neutral-900);
  --card-background: #ffffff;
  --card-bg: #ffffff;
  --border-color: #d4dae4;
  --text-secondary: var(--neutral-500);
  --text-muted: var(--neutral-400);
  --text-primary: var(--neutral-900);
  --input-bg: var(--neutral-50);
  --hover-bg: var(--primary-50);
  --bg-secondary: var(--neutral-100);
  --accent-bg: var(--primary-50);
  --info-bg: #eff6ff;
  --warning-bg: var(--accent-50);
  --success-bg: #dcfce7;

  /* Dashboard specific */
  --dashboard-bg: #f5f5f7;
  --section-bg: #eaeaec;

  /* Sidebar specific */
  --sidebar-bg: #ffffff;
  --sidebar-border: var(--neutral-200);
  --sidebar-hover: var(--neutral-100);
  --sidebar-active: var(--primary-50);
  --sidebar-active-text: var(--primary-700);
  --sidebar-text: var(--neutral-600);
  --sidebar-text-muted: var(--neutral-400);

  /* Typography */
  --font-display:
    "Noto Sans KR", "Nanum Gothic", -apple-system, BlinkMacSystemFont,
    sans-serif;
  --font-body:
    "Noto Sans KR", "Nanum Gothic", -apple-system, BlinkMacSystemFont,
    sans-serif;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:
    0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 40px -10px var(--primary-500);
  --shadow-gold: 0 0 40px -10px var(--accent-400);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar dimensions */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 64px;
  --header-height: 56px;
}
/* ═══════════════════════════════════════════════════════════════════════════
   Dark Mode Overrides
   ═══════════════════════════════════════════════════════════════════════════ */

.dark {
  --primary-color: var(--primary-400);
  --secondary-color: #4ade80;
  --accent-color: var(--accent-400);
  --background-color: #1a1d24;
  --text-color: #d1d5db;
  --heading-color: #f3f4f6;
  --card-background: #242830;
  --card-bg: #242830;
  --border-color: #3a3f4b;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-primary: #f9fafb;
  --input-bg: #2d323c;
  --hover-bg: #2d323c;
  --bg-secondary: #1f2329;
  --accent-bg: rgba(99, 102, 241, 0.2);
  --info-bg: rgba(59, 130, 246, 0.2);
  --warning-bg: rgba(245, 158, 11, 0.2);
  --success-bg: rgba(16, 185, 129, 0.2);

  /* Dashboard specific */
  --dashboard-bg: linear-gradient(
    135deg,
    #0a0a0f 0%,
    #1a1a2e 50%,
    #0f0f1a 100%
  );
  --section-bg: rgba(30, 30, 45, 0.5);

  /* Sidebar specific */
  --sidebar-bg: #1f2329;
  --sidebar-border: #3a3f4b;
  --sidebar-hover: #2d323c;
  --sidebar-active: rgba(99, 102, 241, 0.2);
  --sidebar-active-text: var(--primary-300);
  --sidebar-text: #d1d5db;
  --sidebar-text-muted: #6b7280;
}
/* ═══════════════════════════════════════════════════════════════════════════
   Global Base Styles & Layout (Sidebar, Main Content)
   ═══════════════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: -0.011em;
}

.dark body {
  background-color: var(--background-color);
  color: var(--text-color);
}

/* Selection */
::selection {
  background: var(--primary-200);
  color: var(--primary-900);
}

.dark ::selection {
  background: var(--primary-700);
  color: white;
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────
   Typography
   ───────────────────────────────────────────────────────────────────────── */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--heading-color);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ─────────────────────────────────────────────────────────────────────────
   Sidebar Layout
   ───────────────────────────────────────────────────────────────────────── */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 40;
  transition:
    width var(--transition-base),
    transform var(--transition-base);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: var(--space-4);
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.sidebar-logo-link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.sidebar-version {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-collapse-btn {
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--sidebar-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}

.sidebar-collapse-btn .expand-icon {
  display: none;
}

.sidebar.collapsed .sidebar-collapse-btn .collapse-icon {
  display: none;
}

.sidebar.collapsed .sidebar-collapse-btn .expand-icon {
  display: block;
}

/* Collapsed state - hide text */
.sidebar.collapsed .sidebar-logo-link {
  justify-content: center;
}

.sidebar.collapsed .sidebar-version,
.sidebar.collapsed .sidebar-menu-button span,
.sidebar.collapsed .sidebar-submenu,
.sidebar.collapsed .sidebar-group-label {
  display: none;
}

.sidebar.collapsed .sidebar-menu-button {
  justify-content: center;
  padding: 0.75rem;
}

.sidebar.collapsed .sidebar-footer-content span,
.sidebar.collapsed .sidebar-footer-btn span {
  display: none;
}

.sidebar.collapsed .sidebar-user-info {
  display: none;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) 0;
}

.sidebar-group {
  margin-bottom: var(--space-4);
}

.sidebar-group-label {
  padding: var(--space-2) var(--space-4);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sidebar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu-item {
  padding: 0 var(--space-2);
}

.sidebar-menu-button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-menu-button:hover {
  background: var(--sidebar-hover);
}

.sidebar-menu-button.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
}

.sidebar-menu-button svg,
.sidebar-menu-button i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Sidebar Submenu - Hierarchical Navigation */
.sidebar-submenu {
  list-style: none;
  padding: 0;
  margin: var(--space-1) 0 0 0;
  margin-left: calc(var(--space-4) + 9px);
  padding-left: var(--space-4);
  border-left: 2px solid var(--border-color);
  position: relative;
}

.sidebar-submenu-item {
  padding: var(--space-1) 0;
  position: relative;
}

.sidebar-submenu-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-4) - 2px);
  top: 50%;
  width: var(--space-3);
  height: 2px;
  background: var(--border-color);
}

.sidebar-submenu-button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: none;
  background: transparent;
  color: var(--sidebar-text-muted);
  font-size: 0.813rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-submenu-button:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}

.sidebar-submenu-button.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
}

.sidebar-submenu-button.active::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-4) - 2px);
  top: 50%;
  width: var(--space-3);
  height: 2px;
  background: var(--primary-400);
}

.sidebar-submenu-button svg,
.sidebar-submenu-button i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

/* Dark mode adjustments for submenu */
.dark .sidebar-submenu {
  border-left-color: var(--sidebar-border);
}

.dark .sidebar-submenu-item::before {
  background: var(--sidebar-border);
}

.dark .sidebar-submenu-button.active::before {
  background: var(--primary-400);
}

.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-version-footer {
  text-align: center;
  font-size: 0.65rem;
  color: var(--sidebar-text-muted);
  padding-bottom: 0.5rem;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.sidebar.collapsed .sidebar-version-footer {
  display: none;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user:hover {
  background: var(--sidebar-hover);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.dark .sidebar-user-avatar {
  background: var(--primary-900);
  color: var(--primary-300);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--dashboard-bg);
  transition: margin-left var(--transition-base);
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: var(--space-4);
}

.main-header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading-color);
}

.main-body {
  padding: var(--space-6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}
/* ═══════════════════════════════════════════════════════════════════════════
   Auth Page Styles (Login/Register)
   ═══════════════════════════════════════════════════════════════════════════ */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: linear-gradient(
    135deg,
    var(--primary-950) 0%,
    var(--primary-900) 50%,
    var(--primary-800) 100%
  );
  position: relative;
  overflow: hidden;
}

.auth-container::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: radial-gradient(
    circle at 1px 1px,
    var(--primary-400) 1px,
    transparent 0
  );
  background-size: 40px 40px;
  pointer-events: none;
}

.auth-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(79, 70, 229, 0.4) 0%,
    transparent 70%
  );
  filter: blur(60px);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 2.5rem;
  box-shadow:
    0 32px 64px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  background: linear-gradient(
    135deg,
    var(--neutral-50) 0%,
    var(--accent-400) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 1.125rem;
  color: var(--neutral-400);
  font-weight: 400;
}

.auth-form-group {
  margin-bottom: 1.25rem;
}

.auth-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-300);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.auth-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  color: var(--neutral-100);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--primary-500);
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.3),
    0 0 20px rgba(99, 102, 241, 0.2);
}

.auth-input::placeholder {
  color: var(--neutral-500);
}

.auth-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-950);
  background: linear-gradient(
    135deg,
    var(--accent-400) 0%,
    var(--accent-500) 100%
  );
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  margin-top: 0.5rem;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.75rem 0;
  gap: 1rem;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider-text {
  font-size: 0.8rem;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--neutral-200);
}

.auth-social-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-social-button svg {
  width: 20px;
  height: 20px;
}

.auth-link {
  color: var(--primary-400);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-link:hover {
  color: var(--primary-300);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--neutral-400);
  font-size: 0.9rem;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  color: #fca5a5;
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 768px) {
  .auth-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
}
/* ═══════════════════════════════════════════════════════════════════════════
   UI Components: Cards, Settings Cards, Glass Card, Buttons
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   Premium Card Styles
   ───────────────────────────────────────────────────────────────────────── */

.card {
  background: var(--card-background);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-color);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--border-color);
}

/* Settings Card */
.settings-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-color);
}

.settings-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-50);
  color: var(--primary-600);
}

.settings-card-icon.accent {
  background: var(--accent-50, #fffbeb);
  color: var(--accent-600, #d97706);
}

.settings-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 0.25rem;
}

.settings-card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.settings-card-body {
  padding: var(--space-6);
}

.settings-card-content {
  padding: var(--space-4) var(--space-6);
}

.settings-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Glass Card */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

.dark .glass-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─────────────────────────────────────────────────────────────────────────
   Buttons
   ───────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-gold {
  background: linear-gradient(
    135deg,
    var(--accent-400) 0%,
    var(--accent-500) 100%
  );
  color: var(--primary-950);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--hover-bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-color);
}

.btn-ghost:hover {
  background: var(--hover-bg);
}

.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: 0.8rem;
}
/* ═══════════════════════════════════════════════════════════════════════════
   Dashboard: Stats Cards, Dropdown Menu, Utility Classes
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   Stats Cards
   ───────────────────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
}

.stat-card {
  background: var(--card-background);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border: 1px solid var(--border-color);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.stat-icon.primary {
  background: var(--primary-100);
  color: var(--primary-600);
}

.stat-icon.success {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading-color);
}

/* ─────────────────────────────────────────────────────────────────────────
   Dropdown Menu
   ───────────────────────────────────────────────────────────────────────── */

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: var(--space-2);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  min-width: 200px;
  z-index: 50;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-color);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--hover-bg);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-2) 0;
}

.dropdown-item-danger {
  color: var(--error);
}

.dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.dropdown-item-danger svg {
  color: var(--error);
}

/* ─────────────────────────────────────────────────────────────────────────
   Utility Classes
   ───────────────────────────────────────────────────────────────────────── */

.text-gradient {
  background: linear-gradient(135deg, #1251C2, #8EC7F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-dashboard {
  background: var(--dashboard-bg);
}

.hidden {
  display: none !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Dashboard Page
   ───────────────────────────────────────────────────────────────────────── */

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--heading-color);
}

.dashboard-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Mobile Responsive - Dashboard */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .dashboard-actions {
    width: 100%;
  }

  .dashboard-actions .btn {
    flex: 1;
    justify-content: center;
  }
}
/* ═══════════════════════════════════════════════════════════════════════════
   Project Cards, Empty State, Inline Dropdown
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   Project Cards Grid
   ───────────────────────────────────────────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.project-card {
  display: block;
  position: relative;
  background: var(--card-background);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-400);
}

.project-card:hover .project-card-gradient {
  opacity: 1;
}

.project-card-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-400));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card-header {
  padding: var(--space-6) var(--space-6) var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0;
}

.project-card-menu {
  position: relative;
}

.project-menu-btn {
  padding: var(--space-2);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.project-menu-btn:hover {
  background: var(--hover-bg);
  color: var(--text-color);
}

.project-card-content {
  padding: 0 var(--space-6) var(--space-4);
}

.project-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

.project-card-stats {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-2);
}

.project-stat {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.project-card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-badge {
  padding: var(--space-1) var(--space-2);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--primary-300);
  background: rgba(99, 102, 241, 0.2);
  border-radius: 4px;
}

.project-select-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.project-select-item:hover {
  border-color: var(--primary-400);
  background: rgba(99, 102, 241, 0.06);
  color: var(--text-primary);
}

.project-select-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-500, #6366f1), var(--primary-400, #818cf8));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   Empty State
   ───────────────────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: var(--card-background);
  border-radius: 24px;
  border: 2px dashed var(--border-color);
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  padding: var(--space-6);
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-100) 0%,
    var(--primary-50) 100%
  );
  color: var(--primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark .empty-state-icon {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.3) 0%,
    rgba(99, 102, 241, 0.1) 100%
  );
  color: var(--primary-400);
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: var(--space-3);
}

.empty-state-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ─────────────────────────────────────────────────────────────────────────
   Inline Dropdown (Project Card Menu)
   ───────────────────────────────────────────────────────────────────────── */

.dropdown-content {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: var(--space-1);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: all 0.15s ease;
}

.project-card-menu.open .dropdown-content,
[data-controller="dropdown"].open .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .empty-state {
    padding: var(--space-8) var(--space-4);
  }
}
/* ═══════════════════════════════════════════════════════════════════════════
   Flash Messages & Form Components
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   Flash Messages
   ───────────────────────────────────────────────────────────────────────── */

.flash-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 400px;
}

.flash-message {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.flash-notice {
  background: var(--success-bg);
  border: 1px solid var(--success);
  color: var(--success);
}

.flash-alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
}

/* ─────────────────────────────────────────────────────────────────────────
   Form Components
   ───────────────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  line-height: 1.5;
}

.form-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  margin-top: var(--space-1);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-hint-inline {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.form-error {
  margin-top: var(--space-1);
  font-size: 0.8rem;
  color: var(--error);
}
/* ═══════════════════════════════════════════════════════════════════════════
   Editor Styles: Quill Dark Mode, Template Selector
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   Quill Editor Dark Mode
   ───────────────────────────────────────────────────────────────────────── */

.dark .ql-toolbar.ql-snow {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.dark .ql-container.ql-snow {
  border-color: var(--border-color);
  background: var(--card-bg);
}

.dark .ql-editor {
  color: var(--text-primary);
  background: var(--card-bg);
}

.dark .ql-editor.ql-blank::before {
  color: var(--text-muted);
}

.dark .ql-snow .ql-stroke {
  stroke: var(--text-secondary);
}

.dark .ql-snow .ql-fill,
.dark .ql-snow .ql-stroke.ql-fill {
  fill: var(--text-secondary);
}

.dark .ql-snow .ql-picker {
  color: var(--text-secondary);
}

.dark .ql-snow .ql-picker-options {
  background: var(--card-bg);
  border-color: var(--border-color);
}

.dark .ql-snow.ql-toolbar button:hover,
.dark .ql-snow .ql-toolbar button:hover,
.dark .ql-snow.ql-toolbar button.ql-active {
  color: var(--primary-400);
}

.dark .ql-snow.ql-toolbar button:hover .ql-stroke,
.dark .ql-snow .ql-toolbar button:hover .ql-stroke,
.dark .ql-snow.ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--primary-400);
}

/* ─────────────────────────────────────────────────────────────────────────
   Speed Landing Page Template Selector
   ───────────────────────────────────────────────────────────────────────── */

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.template-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.template-card:hover {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.template-card.selected {
  border-color: var(--primary-600);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px var(--primary-200);
}

.dark .template-card:hover,
.dark .template-card.selected {
  background: var(--primary-950);
}

.template-icon {
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.template-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
/* ── 챗봇 위젯 ────────────────────────────── */
#chatbot-widget {
  position: fixed;
  bottom: 88px;
  right: 24px;
  z-index: 9999;
  font-family: 'Noto Sans KR', sans-serif;
}

/* 토글 버튼 */
.chatbot-toggle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.chatbot-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}
.chatbot-toggle-btn .hidden { display: none; }

/* 채팅 창 */
.chatbot-window {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 360px;
  height: 520px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatbot-slide-up 0.25s ease;
}
.chatbot-window.hidden { display: none; }

@keyframes chatbot-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 헤더 */
.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  flex-shrink: 0;
}
.chatbot-header-info { display: flex; align-items: center; gap: 10px; }
.chatbot-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.chatbot-title { font-weight: 700; font-size: 14px; }
.chatbot-status { font-size: 11px; opacity: 0.8; }
.chatbot-close-btn {
  background: none; border: none; color: rgba(255,255,255,0.8);
  cursor: pointer; padding: 4px; border-radius: 4px; display: flex;
  transition: color 0.2s;
}
.chatbot-close-btn:hover { color: #fff; }

/* 메시지 영역 */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  background: #ffffff;
  color: #111827;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
.chatbot-messages::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 2px; }

/* 메시지 버블 */
.chatbot-msg { display: flex; flex-direction: column; max-width: 85%; }
.chatbot-msg-user { align-self: flex-end; align-items: flex-end; }
.chatbot-msg-assistant { align-self: flex-start; align-items: flex-start; }

.chatbot-msg-content {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  position: relative;
}
.chatbot-msg-user .chatbot-msg-content {
  background: #2563eb;
  color: #fff;
  border-radius: 12px 12px 2px 12px;
}
.chatbot-msg-assistant .chatbot-msg-content {
  background: #f3f4f6;
  color: #111827;
  border-radius: 2px 12px 12px 12px;
}

/* 메시지 이미지 */
.chatbot-msg-image {
  max-width: 200px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid #e5e7eb;
}

/* 복사 버튼 */
.chatbot-copy-btn {
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: #9ca3af;
  padding: 2px 6px; border-radius: 4px; margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
  transition: color 0.2s;
  align-self: flex-end;
}
.chatbot-copy-btn:hover { color: #4b5563; }

/* 빠른 버튼 */
.chatbot-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chatbot-quick-btn {
  background: #fff; border: 1px solid #dbeafe; color: #2563eb;
  border-radius: 20px; padding: 5px 12px; font-size: 12px;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.chatbot-quick-btn:hover { background: #eff6ff; border-color: #2563eb; }
.chatbot-quick-btn-accent { background: #2563eb; color: #fff; border-color: #2563eb; }
.chatbot-quick-btn-accent:hover { background: #1d4ed8; }

/* 타이핑 인디케이터 */
.chatbot-typing {
  padding: 8px 16px;
  flex-shrink: 0;
  background: #ffffff;
}
.chatbot-typing.hidden { display: none; }
.chatbot-typing-dots {
  display: inline-flex; gap: 4px; align-items: center;
  background: #f3f4f6;
  padding: 8px 14px; border-radius: 12px;
}
.chatbot-typing-dots span {
  width: 7px; height: 7px; background: #9ca3af; border-radius: 50%;
  animation: chatbot-bounce 1.2s infinite;
}
.chatbot-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatbot-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* 이미지 미리보기 */
.chatbot-image-preview {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.chatbot-image-preview.hidden { display: none; }
.chatbot-image-preview img { height: 48px; border-radius: 6px; border: 1px solid #e5e7eb; }
.chatbot-image-remove {
  background: none; border: none; cursor: pointer;
  color: #9ca3af; padding: 4px;
  border-radius: 4px; display: flex; transition: color 0.2s;
}
.chatbot-image-remove:hover { color: #ef4444; }

/* 입력 영역 */
.chatbot-input-area {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #ffffff;
}
.chatbot-attach-btn {
  background: none; border: none; cursor: pointer; padding: 6px;
  color: #9ca3af; border-radius: 6px; flex-shrink: 0;
  display: flex; transition: color 0.2s;
}
.chatbot-attach-btn:hover { color: #2563eb; }
.chatbot-textarea {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  resize: none;
  background: #f9fafb;
  color: #111827;
  line-height: 1.5;
  max-height: 100px;
  overflow-y: auto;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.chatbot-textarea:focus {
  border-color: #2563eb;
  background: #ffffff;
  color: #111827;
}
.chatbot-textarea::placeholder { color: #9ca3af; }

/* 상담 접수 모드 */
.chatbot-textarea.consultation-mode {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #111827;
}
.chatbot-textarea.consultation-mode:focus {
  border-color: #d97706;
  background: #fffbeb;
  color: #111827;
}

.chatbot-send-btn {
  background: #2563eb; color: #fff; border: none; border-radius: 8px;
  padding: 8px 10px; cursor: pointer; display: flex; flex-shrink: 0;
  transition: background 0.2s;
}
.chatbot-send-btn:hover { background: #1d4ed8; }
.chatbot-send-btn:disabled { background: #93c5fd; cursor: not-allowed; }
.chatbot-send-btn.consultation-mode { background: #d97706; }
.chatbot-send-btn.consultation-mode:hover { background: #b45309; }

/* 상담 요청 배너 */
.chatbot-consultation-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: #fffbeb;
  border-top: 1px solid #fde68a;
  font-size: 11.5px;
  color: #92400e;
  flex-shrink: 0;
}
.chatbot-consultation-banner.hidden { display: none; }

/* 요청 중단 버튼 */
.chatbot-cancel-consultation-btn {
  margin-left: auto;
  padding: 3px 10px;
  background: none;
  border: 1px solid #d97706;
  border-radius: 4px;
  color: #92400e;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.chatbot-cancel-consultation-btn:hover { background: #fde68a; }

/* 상담 확인 버튼 */
.chatbot-confirm-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.chatbot-confirm-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.chatbot-confirm-yes {
  background: #2563eb;
  color: #fff;
}
.chatbot-confirm-yes:hover { background: #1d4ed8; }
.chatbot-confirm-no {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.chatbot-confirm-no:hover { background: #e5e7eb; }

/* 미읽은 답변 배지 */
.chatbot-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
  .chatbot-window {
    background: #1f2937;
    border-color: #374151;
  }
  .chatbot-messages {
    background: #1f2937;
    color: #f9fafb;
  }
  .chatbot-msg-assistant .chatbot-msg-content {
    background: #374151;
    color: #f9fafb;
  }
  .chatbot-quick-btn {
    background: #374151;
    border-color: #4b5563;
    color: #93c5fd;
  }
  .chatbot-quick-btn:hover { background: #4b5563; }
  .chatbot-typing { background: #1f2937; }
  .chatbot-typing-dots { background: #374151; }
  .chatbot-input-area { background: #1f2937; border-color: #374151; }
  .chatbot-textarea {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
  }
  .chatbot-textarea:focus {
    background: #1f2937;
    color: #f9fafb;
  }
  .chatbot-textarea::placeholder { color: #6b7280; }
}

/* 모바일 */
@media (max-width: 480px) {
  #chatbot-widget { bottom: 16px; right: 16px; }
  .chatbot-window { width: calc(100vw - 32px); right: -8px; height: 480px; }
}
/* ═══════════════════════════════════════════════════════════
   Speed Landing Pages — 레이아웃 및 UI 컴포넌트
   ═══════════════════════════════════════════════════════════ */

/* ── 2컬럼 레이아웃 ──────────────────────────────────────── */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (max-width: 1024px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }
}

.editor-column {
  min-width: 0;
}

.preview-column {
  position: sticky;
  top: 1rem;
  min-width: 0;
}

/* ── 탭 네비게이션 ──────────────────────────────────────── */
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border-color, #e5e7eb);
  gap: 0.25rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover {
  color: var(--primary-600, #4f46e5);
}

.tab-btn.active {
  color: var(--primary-600, #4f46e5);
  border-bottom-color: var(--primary-600, #4f46e5);
}

.tab-panel {
  display: block;
}

.tab-panel.hidden {
  display: none;
}

/* ── 미리보기 헤더 ──────────────────────────────────────── */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-color, #e5e7eb);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  gap: 0.75rem;
}

.preview-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── 디바이스 토글 ──────────────────────────────────────── */
.device-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-primary, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.375rem;
  padding: 0.125rem;
}

.device-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  border-radius: 0.25rem;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  transition: background 0.15s, color 0.15s;
}

.device-btn:hover {
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-primary, #111827);
}

.device-btn.active {
  background: var(--primary-100, #e0e7ff);
  color: var(--primary-700, #4338ca);
}

/* ── 기획 복사 버튼 ─────────────────────────────────────── */
.btn-copy-brief {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  background: var(--bg-primary, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-copy-brief:hover {
  background: var(--bg-secondary, #f9fafb);
  color: var(--text-primary, #111827);
}

/* ── 랜딩페이지 미리보기 ────────────────────────────────── */
.landing-preview {
  border: 1px solid var(--border-color, #e5e7eb);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  min-height: 400px;
  transition: max-width 0.3s ease, border-radius 0.3s ease;
}

/* ── 인라인 제목 편집 ───────────────────────────────────── */
.page-title-input {
  width: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  margin-left: -0.5rem;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}

.page-title-input:hover {
  border-color: var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
}

.page-title-input:focus {
  border-color: var(--primary-400, #818cf8);
  background: var(--bg-primary, #ffffff);
  box-shadow: 0 0 0 3px var(--primary-100, #e0e7ff);
}

/* ── copy-editor-header 세로 정렬 ───────────────────────── */
.copy-editor-header {
  align-items: center !important;
}

/* ── AI 프롬프트 모달 ───────────────────────────────────── */
.ai-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ai-prompt-modal.hidden {
  display: none;
}

.ai-prompt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.ai-prompt-dialog {
  position: relative;
  z-index: 1;
  background: var(--bg-primary, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.ai-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.ai-prompt-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin: 0;
}

.ai-prompt-desc {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.ai-prompt-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  color: var(--text-secondary, #6b7280);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-modal-close:hover {
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-primary, #111827);
}

/* ── AI 제안 버튼 (필드별) ──────────────────────────────── */
.btn-ai-suggest {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary-700, #4338ca);
  background: var(--primary-50, #eef2ff);
  border: 1px solid var(--primary-200, #c7d2fe);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-ai-suggest:hover {
  background: var(--primary-100, #e0e7ff);
}

.btn-ai-suggest:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── 필드 헤더 (라벨 + 버튼 행) ────────────────────────── */
.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.field-header .form-label {
  margin-bottom: 0;
}

/* ── AI 제안 칩 ─────────────────────────────────────────── */
.suggestions-container {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.suggestions-label {
  font-size: 0.7rem;
  color: var(--text-muted, #9ca3af);
  margin: 0 0 0.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.suggestion-chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-primary, #111827);
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.suggestion-chip:hover {
  background: var(--primary-50, #eef2ff);
  border-color: var(--primary-300, #a5b4fc);
  color: var(--primary-800, #3730a3);
}

/* ── 디자인 패널 ────────────────────────────────────────── */
.design-guide-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--primary-50, #eef2ff);
  border: 1px solid var(--primary-200, #c7d2fe);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--primary-700, #4338ca);
  line-height: 1.5;
}

.design-rationale-box {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, #f9fafb);
  border-left: 3px solid var(--primary-400, #818cf8);
  border-radius: 0 0.375rem 0.375rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary, #6b7280);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.design-rationale-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-500, #6366f1);
  margin-bottom: 0.25rem;
}

/* ── 컬러 피커 그리드 ───────────────────────────────────── */
.color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-input {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.375rem;
  padding: 0.125rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── AI 생성 헤더 버튼 ── */
.btn-ai-generate {
  background: #f5f3ff;
  border: 1.5px solid #a78bfa;
  color: #6d28d9;
  font-weight: 500;
}
.btn-ai-generate:hover {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #5b21b6;
}

/* ── 버튼 변형 ── */
.btn-outline {
  background: transparent;
  border: 1.5px solid #d1d5db;
  color: #374151;
}
.btn-outline:hover { background: #f3f4f6; }

.btn-success {
  background: #16a34a;
  color: white;
  border: none;
  box-shadow: 0 1px 4px rgba(22,163,74,0.3);
}
.btn-success:hover { background: #15803d; }

.btn-danger-outline {
  background: transparent;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
}
.btn-danger-outline:hover { background: #fef2f2; }
/* ═══════════════════════════════════════════════════════════════════════════
   Traffic Engine - Blog Engine & Speed Landing Pages
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Layout ─── */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.page-header-content {
  flex: 1;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 var(--space-1) 0;
}

.page-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.page-header-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ─── Card Grid ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

/* ─── Filter Bar ─── */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.filter-tabs {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.filter-tab {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.filter-tab:hover {
  background: var(--hover-bg);
  color: var(--primary-color);
}

.filter-tab.active {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-200);
}

.dark .filter-tab.active {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-300);
  border-color: rgba(99, 102, 241, 0.3);
}

.filter-categories {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  margin-left: auto;
}

/* ─── Status Badges ─── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-draft {
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.status-scheduled {
  background: #fef3c7;
  color: #92400e;
}

.status-published {
  background: #dcfce7;
  color: #166534;
}

.dark .status-draft {
  background: rgba(100, 116, 139, 0.2);
  color: var(--neutral-400);
}

.dark .status-scheduled {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.dark .status-published {
  background: rgba(16, 185, 129, 0.2);
  color: #4ade80;
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.badge-outline.active {
  border-color: var(--primary-400);
  color: var(--primary-600);
  background: var(--primary-50);
}

.badge-primary-outline {
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  color: var(--primary-700);
}

.badge-low { background: #dcfce7; color: #166534; }
.badge-medium { background: #fef3c7; color: #92400e; }
.badge-high { background: #fee2e2; color: #991b1b; }

/* ─── Buttons: missing variants ─── */
.btn-outline {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--hover-bg);
  border-color: var(--primary-300);
  color: var(--primary-color);
}

.btn-danger-outline {
  background: transparent;
  color: var(--error);
  border: 1px solid #fca5a5;
}

.btn-danger-outline:hover {
  background: #fee2e2;
  border-color: var(--error);
}

/* ─── Alerts ─── */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid #86efac;
  color: #166534;
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid #fcd34d;
  color: #92400e;
}

.alert-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.dark .alert-success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); color: #4ade80; }
.dark .alert-warning { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3); color: #fcd34d; }
.dark .alert-error { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #f87171; }

/* ─── Form Controls ─── */
.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control.font-mono { font-family: ui-monospace, monospace; }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-actions {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-4);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ─── Tab Navigation ─── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: var(--space-4);
  overflow-x: auto;
}

.tab-btn {
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab-btn:hover { color: var(--primary-color); }

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-nav-sm .tab-btn {
  padding: var(--space-1) var(--space-3);
  font-size: 0.8rem;
}

.tab-panel { display: block; }
.tab-panel.hidden { display: none; }

/* ─── Two-column Layout (Landing Page Editor) ─── */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

.editor-column { display: flex; flex-direction: column; gap: var(--space-4); }

.preview-column {
  position: sticky;
  top: var(--space-6);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.device-toggle { display: flex; gap: var(--space-1); }

.device-btn {
  padding: var(--space-1);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition-fast);
}

.device-btn.active, .device-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
}

/* ─── Blog Post Card ─── */
.blog-post-card-image {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.blog-post-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-post-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.blog-post-card-image .status-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
}

.card-title { font-size: 1rem; font-weight: 600; color: var(--heading-color); margin: 0; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; }
.card-actions { display: flex; gap: var(--space-2); }

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.empty-state-icon { font-size: 3rem; margin-bottom: var(--space-4); }
.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}

.empty-state-inline {
  padding: var(--space-6);
  text-align: center;
  color: var(--text-muted);
}

/* ─── SEO Panel ─── */
.seo-preview-box {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-family: Arial, sans-serif;
}

.seo-preview-title {
  color: #1a0dab;
  font-size: 1rem;
  font-weight: normal;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seo-preview-url {
  color: #006621;
  font-size: 0.8rem;
  margin: 0 0 4px;
}

.seo-preview-desc {
  color: #545454;
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.4;
}

.seo-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
}

.seo-field:last-child { border-bottom: none; }
.seo-field-label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.seo-field-value { font-size: 0.875rem; color: var(--text-color); }
.seo-field-count { align-self: flex-end; }

.score-bar {
  height: 6px;
  background: var(--neutral-200);
  border-radius: 3px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: var(--primary-500);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ─── Keyword Analysis ─── */
.keyword-group-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.keyword-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); }

.keyword-tag {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
}

.keyword-tag.primary {
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
}

.keyword-tag.secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ─── Trend Score ─── */
.trend-score-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-50);
  border: 3px solid var(--primary-400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trend-score-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-600);
}

.trend-group-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

/* ─── Image Grid ─── */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
}

.image-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.image-thumbnail {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.image-meta {
  padding: var(--space-2);
  background: var(--card-background);
}

/* ─── Social Adaptations ─── */
.social-adaptation-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.social-text-box {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  min-height: 80px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.social-hashtags { display: flex; flex-wrap: wrap; gap: var(--space-1); }

.social-image { max-height: 200px; object-fit: cover; }

/* ─── Template Selector ─── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}

.template-card {
  background: var(--card-background);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.template-card:hover {
  border-color: var(--primary-400);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.template-card.selected {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.template-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
}

.template-name {
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: var(--space-1);
  font-size: 0.95rem;
}

.template-description {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* ─── Landing Page Preview ─── */
.landing-preview {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 400px;
  background: white;
  font-family: 'Noto Sans KR', sans-serif;
}

.preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin: var(--space-4);
}

/* ─── CTA Preview (Card) ─── */
.cta-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  margin-top: var(--space-2);
}

/* ─── Color Picker ─── */
.color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.color-input {
  width: 40px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  cursor: pointer;
  flex-shrink: 0;
}

/* ─── WordPress Status ─── */
.wordpress-status {
  padding: var(--space-3);
  background: var(--success-bg);
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
}

.schedule-section { }

/* ─── Bullet Input ─── */
.bullet-input { display: flex; align-items: center; gap: var(--space-2); }

/* ─── Table ─── */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 2px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

/* ─── Utility ─── */
.text-inherit { color: inherit; }
.text-muted { color: var(--text-muted); }
.text-green-600 { color: #16a34a; }
.text-blue-600 { color: #2563eb; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.font-mono { font-family: ui-monospace, 'Courier New', monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mx-2 { margin-left: var(--space-2); margin-right: var(--space-2); }
.pt-4 { padding-top: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.border-t { border-top: 1px solid var(--border-color); }
.w-full { width: 100%; }
.max-w-none { max-width: none; }
.max-h-48 { max-height: 12rem; }
.max-h-64 { max-height: 16rem; }
.object-cover { object-fit: cover; }
.rounded-lg { border-radius: var(--radius-lg); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.block { display: block; }
.flex { display: flex; }
.hidden { display: none !important; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }
.text-center { text-align: center; }
.overflow: hidden;
.ml-1 { margin-left: var(--space-1); }
.mr-auto { margin-right: auto; }
.overflow-hidden { overflow: hidden; }

.prose p { margin-bottom: var(--space-4); line-height: 1.8; color: var(--text-color); }
.prose h2 { font-size: 1.25rem; font-weight: 700; color: var(--heading-color); margin: var(--space-6) 0 var(--space-3); }
.prose h3 { font-size: 1.1rem; font-weight: 600; color: var(--heading-color); margin: var(--space-5) 0 var(--space-2); }
.prose ul, .prose ol { padding-left: var(--space-6); margin-bottom: var(--space-4); }
.prose li { margin-bottom: var(--space-1); line-height: 1.7; }
.prose strong { font-weight: 700; color: var(--heading-color); }

/* ─── Generation Status Panel ─── */
.generation-status-panel {
  background: linear-gradient(135deg, var(--primary-50), rgba(139,92,246,0.05));
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.dark .generation-status-panel {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.05));
  border-color: rgba(99,102,241,0.3);
}

.generation-status-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.generation-status-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.gen-spinner { display: inline-block; }

.generation-status-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 var(--space-1);
}

.generation-status-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.generation-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.generation-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--card-background);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.step-icon { font-size: 1rem; width: 1.5rem; text-align: center; flex-shrink: 0; }

.step-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
}

.step-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.step-status.pending { color: var(--text-muted); background: var(--bg-secondary); }
.step-status.loading { color: #92400e; background: #fef3c7; }
.step-status.done { color: #166534; background: #dcfce7; }
.step-status.failed { color: #991b1b; background: #fee2e2; }

.generation-failed-sections {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
}

.dark .generation-failed-sections {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.3);
}

.failed-title {
  font-weight: 600;
  color: #92400e;
  margin: 0 0 var(--space-1);
  font-size: 0.875rem;
}

.dark .failed-title { color: #fcd34d; }

.failed-desc {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0 0 var(--space-2);
}

.failed-list {
  margin: 0;
  padding-left: var(--space-5);
  font-size: 0.8rem;
  color: var(--text-color);
}

.failed-list li { margin-bottom: var(--space-1); }

/* ─── AI Quick Generate Section ─── */
.ai-quick-generate {
  background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(139,92,246,0.05));
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .two-column-layout { grid-template-columns: 1fr; }
  .preview-column { position: static; }
}

@media (max-width: 768px) {
  .page-header { flex-direction: column; align-items: stretch; }
  .card-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: 1fr 1fr; }
  .tab-nav { overflow-x: auto; }
}

@media (max-width: 480px) {
  .page-container { padding: var(--space-4); }
  .template-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Modal & Project Selector (shared across traffic engine pages)
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 90%;
}

.project-select-content {
  width: 600px;
  max-height: 80vh;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading-color);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
}

.modal-close:hover {
  background: var(--hover-bg);
  color: var(--text-color);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-desc {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  text-align: center;
}

.project-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.project-select-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s;
}

.project-select-card:hover {
  background: var(--card-bg);
  border-color: var(--primary-500);
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.project-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  color: var(--primary-500);
  flex-shrink: 0;
}

.project-icon.dashed {
  border: 1px dashed var(--border-color);
  background: transparent;
  color: var(--text-muted);
}

.project-select-card.new-project:hover .project-icon.dashed {
  border-color: var(--primary-400);
  color: var(--primary-500);
}

.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.project-name {
  font-weight: 600;
  color: var(--heading-color);
}

.project-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-arrow {
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.2s;
}

.project-select-card:hover .project-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary-500);
}

/* ============================================================
   Quill WYSIWYG 에디터 스타일 보정
   ============================================================ */
.rich-editor-container {
  background: var(--input-bg, #fff);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.ql-toolbar.ql-snow {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-secondary, #f8fafc);
}

.ql-container.ql-snow {
  border: 1px solid var(--border-color, #e2e8f0);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-family: inherit;
}

.ql-editor {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-color, #1e293b);
}

.ql-editor h1, .ql-editor h2, .ql-editor h3 {
  color: var(--heading-color, #0f172a);
  font-weight: 700;
  margin: 1.5em 0 0.5em;
}

.ql-editor h2 { font-size: 1.4em; }
.ql-editor h3 { font-size: 1.2em; }

.ql-editor p { margin-bottom: 1em; }

.ql-editor blockquote {
  border-left: 4px solid var(--primary-400, #818cf8);
  padding-left: 1em;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.5em 0;
}

.ql-editor ul, .ql-editor ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

/* 블로그 HTML 렌더링 (show 페이지) */
.blog-html-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
}

.blog-html-content h1,
.blog-html-content h2,
.blog-html-content h3 {
  color: var(--heading-color);
  font-weight: 700;
  margin: 1.8em 0 0.6em;
  line-height: 1.3;
}

.blog-html-content h2 { font-size: 1.5em; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3em; }
.blog-html-content h3 { font-size: 1.25em; }

.blog-html-content p { margin-bottom: 1.2em; }

.blog-html-content ul, .blog-html-content ol {
  padding-left: 1.8em;
  margin-bottom: 1.2em;
}

.blog-html-content li { margin-bottom: 0.4em; }

.blog-html-content blockquote {
  border-left: 4px solid var(--primary-400);
  padding: 0.5em 1em;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-muted);
  margin: 1.5em 0;
}

.blog-html-content strong { font-weight: 700; }
.blog-html-content em { font-style: italic; }

.blog-html-content code {
  background: var(--bg-secondary);
  padding: 0.1em 0.4em;
  border-radius: 0.25em;
  font-family: monospace;
  font-size: 0.9em;
}
/*




 */
/*













 */
