/* ==========================================================================
   IPDC Blog & Card News Studio - Eye-Comfort Modern Glassmorphism
   Theme: Aligned with IPDC KPI & Budget Management Systems
   ========================================================================== */

:root {
  --bg-main: #070b14;
  --bg-surface: #0e1526;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: #6366f1;

  --accent-primary: #6366f1; /* Modern Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #0ea5e9;    /* Crisp Cyan */
  --accent-emerald: #10b981; /* Fresh Emerald */
  --accent-amber: #f59e0b;   /* Warm Amber */
  --accent-rose: #f43f5e;    /* Soft Rose */
  --accent-indigo: #818cf8;
  --accent-red: #D60026;     /* Official Incheon Brand Red for Logos/Badges only */
  --accent-lime: #6366f1;    /* Map old references to primary indigo */

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --font-display: 'Outfit', 'Pretendard', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.25);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: #4f46e5;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-indigo: #4338ca;
  --accent-red: #D60026;
  --accent-lime: #4f46e5;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="light"] body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(14, 165, 233, 0.04) 0%, transparent 40%);
}

/* Background Atmosphere */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 70%);
  top: -100px;
  left: -100px;
}
.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15), transparent 70%);
  bottom: -150px;
  right: -100px;
}
[data-theme="light"] .bg-orb {
  opacity: 0.12;
}

/* Utility Hidden */
.hidden {
  display: none !important;
}

/* ==========================================================================
   1. Auth Gate Modal
   ========================================================================== */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-gate-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1e293b, var(--accent-red), #334155);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-logo-badge {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: rgba(162, 232, 53, 0.12);
  color: var(--accent-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 0, 38, 0.35);
}
.auth-logo-badge svg {
  width: 34px;
  height: 34px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.auth-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 28px;
}

.auth-input-group {
  position: relative;
  margin-bottom: 16px;
}

.auth-input-group .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.auth-input {
  width: 100%;
  background: rgba(10, 14, 24, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px 14px 44px;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: all 0.25s ease;
}

.auth-input:focus {
  border-color: var(--accent-lime);
  box-shadow: 0 0 0 3px rgba(214, 0, 38, 0.15);
}

.auth-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-bottom: 14px;
  min-height: 20px;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-footer {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
}

/* ==========================================================================
   2. Main Application Shell & Header
   ========================================================================== */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-nav {
  height: 72px;
  background: rgba(14, 21, 37, 0.82);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .top-nav {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: transform 0.2s ease;
}
.brand-link:hover .brand-logo-icon {
  transform: scale(1.05);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}
.brand-title .dot {
  color: var(--accent-primary);
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-status-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot, .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* Theme Toggle Button */
.theme-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.theme-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.08);
}
.theme-btn i { width: 17px; height: 17px; }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.btn-portal-gateway {
  background: rgba(99, 102, 241, 0.1) !important;
  border: 1px solid rgba(99, 102, 241, 0.28) !important;
  color: var(--accent-primary) !important;
  font-weight: 700 !important;
}
.btn-portal-gateway:hover {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: var(--accent-primary) !important;
}

.count-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-active);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-outline-danger {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--accent-rose);
  border-radius: var(--radius-md);
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-outline-danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--accent-rose);
}

.btn-outline-sm {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-outline-sm:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
}

.btn-primary-sm {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.btn-primary-sm:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.btn-xs {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-xs:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* ==========================================================================
   3. Workspace Layout
   ========================================================================== */
.workspace-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 28px;
  padding: 28px 32px;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1200px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
}

/* Left Sidebar: Control Panel */
.control-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow-md);
  height: fit-content;
}

.panel-header .panel-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.panel-icon {
  color: var(--accent-primary);
  width: 22px;
  height: 22px;
}
.panel-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}
.panel-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.form-label svg {
  width: 15px;
  height: 15px;
  color: var(--accent-primary);
}
.form-label .required {
  color: var(--accent-rose);
}

.form-control {
  width: 100%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.94rem;
  outline: none;
  transition: all 0.2s ease;
}
.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
textarea.form-control {
  resize: vertical;
}

/* Theme Picker Radio Cards */
.theme-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.theme-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
}
.theme-card input {
  display: none;
}
.theme-card.active {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}

.theme-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.news-dot { background: #D60026; box-shadow: 0 0 8px rgba(214, 0, 38, 0.5); }
.archive-dot { background: #ffffff; border: 2px solid #D60026; box-shadow: 0 0 8px rgba(214, 0, 38, 0.3); }

.theme-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}
.theme-spec {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-generate-submit {
  width: 100%;
  padding: 16px;
  font-size: 1.02rem;
  justify-content: center;
  margin-top: 10px;
}

/* Progress Stepper Box */
.progress-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
}
.progress-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 14px;
}
.spinner-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.stepper-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.step-item.active {
  color: var(--accent-primary);
  font-weight: 600;
}
.step-item.active .step-num {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}
.step-item.done {
  color: var(--text-primary);
}
.step-item.done .step-num {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}
.step-item.done .step-num {
  background: #2b3654;
  color: #ffffff;
}

/* ==========================================================================
   4. Right Section: Results Viewer
   ========================================================================== */
.results-viewer {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.viewer-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 24px;
}

.viewer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.category-pill {
  background: rgba(214, 0, 38, 0.15);
  color: var(--accent-lime);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
}
.viewer-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}
.timestamp-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.tab-btn svg {
  width: 17px;
  height: 17px;
}
.tab-btn.active {
  background: rgba(162, 232, 53, 0.12);
  color: var(--accent-lime);
}
.tab-btn:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tab 1: Cards Grid */
.cards-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.grid-summary {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}
.grid-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.card-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.card-item:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 0, 38, 0.45);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(214, 0, 38, 0.15);
}

.card-item.drag-over {
  border: 2px dashed #D60026 !important;
  box-shadow: 0 0 25px rgba(214, 0, 38, 0.4) !important;
  transform: scale(1.02);
}

.card-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #090d16;
}

.card-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.card-drop-hint {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 38, 0.9);
  backdrop-filter: blur(4px);
  z-index: 10;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: none;
}
.card-item.drag-over .card-drop-hint {
  display: flex;
}
.card-drop-hint svg {
  width: 36px;
  height: 36px;
  color: #D60026;
  animation: bounce 1s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.card-loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(14, 19, 31, 0.88);
  backdrop-filter: blur(4px);
  z-index: 15;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
}
.card-loading-overlay.active {
  display: flex;
}
.card-loading-overlay .spinner-dot {
  width: 24px;
  height: 24px;
  border-width: 3px;
  border-color: #D60026;
  border-top-color: transparent;
}

.card-overlay-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 5;
}
.card-preview-wrap:hover .card-overlay-actions {
  opacity: 1;
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0,0,0,0.6);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Card Control Toolbar */
.card-toolbar {
  padding: 10px 12px;
  background: rgba(10, 15, 24, 0.95);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title-indicator {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.card-status-badge.has-photo {
  background: rgba(214, 0, 38, 0.15);
  color: #FF4D6D;
  border: 1px solid rgba(214, 0, 38, 0.3);
}
.card-status-badge.text-only {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}

.btn-photo-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-photo-action:hover {
  background: rgba(214, 0, 38, 0.15);
  border-color: #D60026;
  color: #ffffff;
}
.btn-photo-action svg {
  width: 12px;
  height: 12px;
}
.btn-photo-action.btn-remove-photo {
  color: #94a3b8;
}
.btn-photo-action.btn-remove-photo:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Tab 2: Article Editor */
.article-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.article-info-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--accent-lime);
}

.editor-container {
  margin-bottom: 20px;
}
.article-editor {
  width: 100%;
  height: 480px;
  background: rgba(10, 15, 24, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  color: #f1f5f9;
  font-family: var(--font-family);
  font-size: 0.95rem;
  line-height: 1.8;
  outline: none;
  resize: vertical;
}
.article-editor:focus {
  border-color: var(--accent-lime);
}

.hashtag-section {
  background: rgba(14, 19, 31, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.hashtag-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #e2e8f0;
  margin-bottom: 12px;
}
.hashtag-header svg {
  color: var(--accent-lime);
  width: 16px;
  height: 16px;
}
.hashtags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip {
  background: rgba(162, 232, 53, 0.1);
  color: var(--accent-lime);
  border: 1px solid rgba(214, 0, 38, 0.25);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Tab 3: Publish Guide */
.publish-guide-card {
  background: rgba(14, 19, 31, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}
.guide-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.guide-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(214, 0, 38, 0.15);
  color: var(--accent-lime);
  display: flex;
  align-items: center;
  justify-content: center;
}
.guide-title-wrap h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}
.guide-title-wrap p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.steps-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 800px) {
  .steps-flow {
    grid-template-columns: 1fr;
  }
}
.flow-card {
  background: rgba(20, 28, 44, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flow-num {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-lime);
  letter-spacing: 1px;
}
.flow-card h4 {
  font-size: 1rem;
  color: #ffffff;
}
.flow-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

/* ==========================================================================
   5. History Drawer & Lightbox
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  justify-content: flex-end;
}
.drawer-content {
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  height: 100%;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
}
.drawer-title svg {
  color: var(--accent-lime);
}
.drawer-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* History Drawer Controls & Search & Filter */
.history-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
}

.history-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.history-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #64748b;
  pointer-events: none;
}

.history-search-input {
  width: 100%;
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 34px 9px 36px;
  font-size: 0.84rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.history-search-input:focus {
  border-color: #D60026;
  box-shadow: 0 0 0 2px rgba(214, 0, 38, 0.2);
}

.history-search-input::placeholder {
  color: #64748b;
}

.history-search-clear {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.history-search-clear:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.history-search-clear svg {
  width: 14px;
  height: 14px;
}

.history-filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.history-filter-chips::-webkit-scrollbar {
  display: none;
}

.history-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.history-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.history-chip.active {
  background: #D60026;
  border-color: #D60026;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(214, 0, 38, 0.35);
}

.history-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
  font-size: 0.76rem;
}

.history-count-info {
  color: #94a3b8;
  font-weight: 600;
}

.history-storage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 0.72rem;
}
.history-storage-badge svg {
  width: 12px;
  height: 12px;
}

/* History Card & Delete Button */
.history-list-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

.history-item {
  background: rgba(10, 15, 24, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.history-item:hover {
  background: rgba(22, 32, 50, 0.9);
  border-color: rgba(214, 0, 38, 0.4);
  transform: translateX(-2px);
}
.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-item-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.history-cat {
  font-size: 0.75rem;
  color: #FF4D6D;
  font-weight: 700;
  background: rgba(214, 0, 38, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
}
.history-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.btn-job-delete {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  opacity: 0.75;
}
.history-item:hover .btn-job-delete {
  opacity: 1;
}
.btn-job-delete:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}
.btn-job-delete svg {
  width: 13px;
  height: 13px;
}
.history-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}
.history-highlight {
  background: rgba(214, 0, 38, 0.35);
  color: #ffffff;
  padding: 0 2px;
  border-radius: 2px;
}
.history-thumb-row {
  display: flex;
  gap: 6px;
  overflow: hidden;
  height: 48px;
  border-radius: 6px;
}
.history-thumb-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.92);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox-card {
  position: relative;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: zoomIn 0.25s ease;
}
@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lightbox-card img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  border: 1px solid var(--border-subtle);
}
.lightbox-close-btn {
  position: absolute;
  top: -46px;
  right: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
}
.lightbox-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ==========================================================================
   Preset Photo Library Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.88);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.preset-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 960px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
  animation: zoomIn 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preset-category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.preset-cat-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.preset-cat-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.preset-cat-btn.active {
  background: rgba(214, 0, 38, 0.18);
  border-color: #D60026;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(214, 0, 38, 0.3);
}

.preset-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  overflow-y: auto;
  max-height: 480px;
  padding: 4px;
}
@media (max-width: 800px) {
  .preset-photos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.preset-photo-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
  background: #0d1320;
}
.preset-photo-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #D60026;
  box-shadow: 0 10px 24px rgba(214, 0, 38, 0.35);
}
.preset-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preset-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.preset-photo-card:hover .preset-photo-overlay {
  opacity: 1;
}
.preset-photo-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}
.preset-photo-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #D60026;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.preset-photo-card:hover .preset-photo-badge {
  opacity: 1;
}

/* ==========================================================================
   AI 기획 아이디어 발굴기 (Idea Assistant Box)
   ========================================================================== */
.idea-assistant-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(214, 0, 38, 0.35);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.idea-assistant-box:hover {
  border-color: rgba(214, 0, 38, 0.6);
}

.idea-assistant-header {
  padding: 12px 16px;
  background: rgba(214, 0, 38, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.idea-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
}
.idea-icon {
  width: 17px;
  height: 17px;
  color: #FF4D6D;
}
.idea-new-badge {
  background: #D60026;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.btn-icon-xs {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.btn-icon-xs svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.idea-assistant-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.idea-assistant-body.collapsed {
  display: none;
}

.idea-subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.quick-keywords-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chips-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
}
.quick-keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip-item:hover {
  background: rgba(214, 0, 38, 0.2);
  border-color: #D60026;
  color: #ffffff;
  transform: translateY(-1px);
}

.idea-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.idea-input-wrapper {
  position: relative;
  flex: 1;
}
.idea-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #94a3b8;
}
.idea-search-input {
  padding-left: 36px !important;
  font-size: 0.88rem !important;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}
.idea-fetch-btn {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 700;
}
.idea-fetch-btn svg {
  width: 14px;
  height: 14px;
}

/* Results List */
.idea-results-container {
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid rgba(214, 0, 38, 0.3);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.25s ease;
}
.idea-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FF4D6D;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-text-xs {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.74rem;
  cursor: pointer;
}
.btn-text-xs:hover {
  color: #ffffff;
}

.idea-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.idea-card-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.idea-card-item:hover {
  background: rgba(214, 0, 38, 0.12);
  border-color: rgba(214, 0, 38, 0.5);
  transform: translateX(2px);
}

.idea-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.idea-card-category {
  font-size: 0.7rem;
  font-weight: 700;
  color: #FF4D6D;
  background: rgba(214, 0, 38, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}
.idea-apply-btn {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: #D60026;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: opacity 0.2s;
}
.idea-apply-btn:hover {
  opacity: 0.9;
}

.idea-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
}
.idea-card-context {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ==========================================================================
   AI 맞춤 이미지 생성 스튜디오 Modal & Actions
   ========================================================================== */
.btn-ai-image {
  background: linear-gradient(135deg, rgba(214, 0, 38, 0.15), rgba(147, 51, 234, 0.15)) !important;
  border-color: rgba(214, 0, 38, 0.35) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}
.btn-ai-image:hover {
  background: linear-gradient(135deg, rgba(214, 0, 38, 0.3), rgba(147, 51, 234, 0.3)) !important;
  border-color: #D60026 !important;
  box-shadow: 0 0 12px rgba(214, 0, 38, 0.25);
}
.btn-ai-image svg {
  color: #FF4D6D !important;
}

.ai-modal-card {
  max-width: 820px !important;
  width: 95% !important;
}

.ai-modal-section {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.step-circle-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #D60026;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Style Grid */
.ai-style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ai-style-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
}
.ai-style-card:hover {
  background: rgba(214, 0, 38, 0.08);
  border-color: rgba(214, 0, 38, 0.4);
}
.ai-style-card.active {
  background: rgba(214, 0, 38, 0.14);
  border-color: #D60026;
  box-shadow: 0 0 14px rgba(214, 0, 38, 0.2);
}

.style-icon-wrap {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.style-text-wrap {
  flex: 1;
}
.style-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}
.style-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.35;
}
.style-check {
  display: none;
  color: #D60026;
}
.ai-style-card.active .style-check {
  display: flex;
  align-items: center;
  justify-content: center;
}
.style-check svg {
  width: 18px;
  height: 18px;
}

/* Prompt Section */
.ai-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.btn-auto-prompt {
  background: rgba(214, 0, 38, 0.12);
  border: 1px solid rgba(214, 0, 38, 0.35);
  color: #FF4D6D;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-auto-prompt:hover {
  background: #D60026;
  color: #ffffff;
}
.btn-auto-prompt svg {
  width: 13px;
  height: 13px;
}

.prompt-input-wrap {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.ai-prompt-textarea {
  flex: 1;
  background: rgba(12, 17, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 0.88rem;
  line-height: 1.45;
  resize: vertical;
  outline: none;
  min-height: 58px;
}
.ai-prompt-textarea:focus {
  border-color: #D60026;
  box-shadow: 0 0 0 3px rgba(214, 0, 38, 0.15);
}

.btn-generate-ai-action {
  background: linear-gradient(135deg, #D60026 0%, #B3001F 100%);
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(214, 0, 38, 0.35);
  transition: all 0.2s ease;
}
.btn-generate-ai-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(214, 0, 38, 0.45);
}
.btn-generate-ai-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-generate-ai-action svg {
  width: 18px;
  height: 18px;
}

/* Preview Box */
.ai-preview-box {
  background: rgba(10, 15, 26, 0.95);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ai-preview-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}
.ai-loading-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}
.ai-loading-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 4px;
}

.ai-preview-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ai-preview-content img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 10px;
}
.ai-preview-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
}
.ai-preview-tag {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #FF4D6D;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 16px;
}
.ai-safe-notice {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-safe-notice svg {
  color: #D60026;
  width: 16px;
  height: 16px;
}
.ai-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-primary-apply {
  background: #D60026;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(214, 0, 38, 0.35);
  transition: all 0.2s ease;
}
.btn-primary-apply:hover {
  background: #ea123a;
  box-shadow: 0 6px 20px rgba(214, 0, 38, 0.5);
  transform: translateY(-1px);
}
.btn-primary-apply svg {
  width: 16px;
  height: 16px;
}

/* Prompt Studio Enhancements */
.prompt-context-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.prompt-korean-box {
  background: rgba(214, 0, 38, 0.08);
  border-left: 3px solid #D60026;
}
.prompt-output-wrap textarea {
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.prompt-output-wrap textarea:focus {
  border-color: #D60026;
  box-shadow: 0 0 0 3px rgba(214, 0, 38, 0.2);
}

/* Card Text Edit Button */
.btn-edit-text {
  background: rgba(37, 99, 235, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
}
.btn-edit-text:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
}

/* Direct Visual In-Card Editor Styles */
.vcard-editable {
  outline: 1px dashed transparent;
  transition: all 0.15s ease;
  border-radius: 6px;
}
.vcard-editable:hover {
  outline: 1px dashed rgba(56, 189, 248, 0.6) !important;
  background: rgba(56, 189, 248, 0.05);
}
.vcard-editable:focus {
  outline: 2px solid #38bdf8 !important;
  background: rgba(56, 189, 248, 0.1) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   Comprehensive Eye-Comfort Light Theme Overrides (Like KPI & Budget)
   ========================================================================== */
[data-theme="light"] {
  color-scheme: light;
}

[data-theme="light"] .control-panel,
[data-theme="light"] .results-viewer {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .panel-header h2,
[data-theme="light"] .viewer-title,
[data-theme="light"] .brand-title,
[data-theme="light"] .grid-summary,
[data-theme="light"] .guide-title-wrap h3,
[data-theme="light"] .flow-card h4 {
  color: #0f172a;
}

[data-theme="light"] .panel-desc,
[data-theme="light"] .brand-sub,
[data-theme="light"] .timestamp-text,
[data-theme="light"] .drawer-sub,
[data-theme="light"] .grid-hint,
[data-theme="light"] .guide-title-wrap p,
[data-theme="light"] .flow-card p {
  color: #64748b;
}

[data-theme="light"] .form-label {
  color: #1e293b;
}

[data-theme="light"] .form-control {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}
[data-theme="light"] .form-control:focus {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

[data-theme="light"] .theme-card {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .theme-card.active {
  background: rgba(79, 70, 229, 0.06);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}
[data-theme="light"] .theme-name {
  color: #0f172a;
}

[data-theme="light"] .progress-box {
  background: #f8fafc;
  border-color: rgba(79, 70, 229, 0.25);
}

[data-theme="light"] .btn-ghost {
  color: #475569;
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

[data-theme="light"] .btn-secondary {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}
[data-theme="light"] .btn-secondary:hover {
  background: #e2e8f0;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-outline-sm {
  border-color: rgba(0, 0, 0, 0.15);
  color: #334155;
}
[data-theme="light"] .btn-outline-sm:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--accent-primary);
  color: #0f172a;
}

[data-theme="light"] .tab-btn {
  color: #64748b;
}
[data-theme="light"] .tab-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}
[data-theme="light"] .tab-btn.active {
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-primary);
}

[data-theme="light"] .card-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .card-item:hover {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .card-toolbar {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .card-title-indicator {
  color: #0f172a;
}
[data-theme="light"] .btn-photo-action {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #334155;
}
[data-theme="light"] .btn-photo-action:hover {
  background: #f1f5f9;
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

[data-theme="light"] .article-actions-bar {
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .article-info-tag {
  color: #475569;
}
[data-theme="light"] .article-editor {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .hashtag-section {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .hashtag-header {
  color: #0f172a;
}

[data-theme="light"] .publish-guide-card {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .flow-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] #history-drawer .drawer-content {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .drawer-title {
  color: #0f172a;
}
[data-theme="light"] .history-controls {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .history-search-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}
[data-theme="light"] .history-chip {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}
[data-theme="light"] .history-chip:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="light"] .history-item {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .history-item:hover {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .history-item-title {
  color: #0f172a;
}

[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .modal-title {
  color: #0f172a;
}
[data-theme="light"] .auth-gate-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .auth-title {
  color: #0f172a;
}
[data-theme="light"] .auth-input {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

/* ==========================================================================
   IPDC Unified Content Studio - Nav Tabs & Newsletter Builder
   ========================================================================== */
.nav-center-tabs {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 4px;
  gap: 4px;
}
.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 24px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.nav-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.tab-badge-new {
  font-size: 0.68rem;
  padding: 2px 6px;
  background: #10b981;
  color: #ffffff;
  border-radius: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
[data-theme="light"] .nav-center-tabs {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .nav-tab-btn {
  color: #64748b;
}
[data-theme="light"] .nav-tab-btn:hover {
  color: #0f172a;
  background: #ffffff;
}
[data-theme="light"] .nav-tab-btn.active {
  background: #4f46e5;
  color: #ffffff;
}

/* Newsletter Workspace Layout */
.newsletter-workspace-layout {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 28px;
  padding: 24px 32px 60px;
  max-width: 1720px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 1200px) {
  .newsletter-workspace-layout {
    grid-template-columns: 1fr;
  }
}

.newsletter-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.nl-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.nl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.nl-card-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

/* Block Item Manager */
.block-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.block-item-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}
.block-item-bar:hover {
  background: rgba(255, 255, 255, 0.05);
}
.block-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
}
.block-tag.emerald {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}
.block-tag.coral {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}
.block-title-text {
  font-size: 0.92rem;
  font-weight: 600;
  flex: 1;
  margin: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.block-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-action-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.btn-action-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.btn-action-icon.danger:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}
.block-item-body {
  padding: 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .block-item-body {
  background: #f8fafc;
}

/* Stage & Paper */
.newsletter-stage-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.stage-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 85px;
  z-index: 40;
  backdrop-filter: blur(16px);
}
.preview-mode-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}
.preview-mode-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
}
.preview-mode-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}
.stage-export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.newsletter-scroll-canvas {
  width: 100%;
  padding: 24px 24px 80px 24px;
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: visible;
}
[data-theme="light"] .newsletter-scroll-canvas {
  background: #e2e8f0;
}

.newsletter-paper {
  width: 100%;
  max-width: 640px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  overflow: hidden;
  font-family: 'Pretendard', -apple-system, sans-serif;
  transition: max-width 0.3s ease;
}
.newsletter-paper.mobile-view {
  max-width: 380px;
}

/* Paper Components matching V3 */
.nl-paper-header {
  padding: 36px 36px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0f172a;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}
.nl-header-meta-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #0f172a;
  text-transform: uppercase;
}
.nl-header-vol-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 12px;
}
.nl-header-vol-num {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  color: #0f172a;
  font-family: 'Outfit', sans-serif;
}
.nl-header-vol-text {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}
.nl-header-title {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}
.nl-header-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f43f5e;
  color: #ffffff;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.nl-header-intro {
  font-size: 13.5px;
  line-height: 1.65;
  color: #475569;
  max-width: 370px;
  white-space: pre-line;
  word-break: keep-all;
}

/* Upgraded Header Visual: Spacious Modern Rounded Frame (Clouds Removed) */
.nl-header-visual {
  width: 220px;
  height: 185px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nl-header-shape-bubble {
  width: 215px;
  height: 180px;
  position: relative;
  border-radius: 20px; /* 세련된 모던 라운드 프레임 */
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nl-header-shape-bubble:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
}
.nl-header-illust-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  display: block;
  position: relative;
  z-index: 2;
}

/* Header Visual Editor Controls */
.nl-header-customizer-box {
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nl-header-thumb-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nl-header-thumb-preview {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  background: #2563eb;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.nl-header-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.nl-header-thumb-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nl-color-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nl-swatch-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nl-swatch-btn.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--accent-primary);
  transform: scale(1.15);
}
.nl-presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.nl-preset-chip {
  padding: 4px 10px;
  font-size: 0.76rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.nl-preset-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}


/* V3 Sleek Capsule Section Header */
.nl-capsule-bar {
  margin: 28px 24px 18px;
  padding: 10px 20px;
  background: #0f172a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.nl-capsule-bar.dual {
  justify-content: flex-start;
}
.nl-sub-badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
}
.nl-sub-badge.emerald {
  background: #10b981;
}
.nl-sub-badge.coral {
  background: #f43f5e;
}
.nl-sub-badge.indigo {
  background: #6366f1;
}
.nl-capsule-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

/* Blocks Content */
.nl-block-container {
  padding: 0 24px 28px;
}
.nl-photo-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.nl-grid-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.nl-photo-single {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.nl-article-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.45;
  white-space: pre-line;
  word-break: keep-all;
}
.nl-article-lead {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  line-height: 1.5;
  white-space: pre-line;
  word-break: keep-all;
}
.nl-article-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: #475569;
  margin: 0 0 16px;
  white-space: pre-line;
  word-break: keep-all;
}
.nl-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  background: #0f172a;
  color: #ffffff !important;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.nl-btn-link:hover {
  background: #1e293b;
  transform: translateY(-1px);
}
.nl-btn-link.contest {
  background: #0284c7;
}

/* Callout Mint Box */
.nl-callout-mint {
  margin-top: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 14px 18px;
}
.nl-callout-title {
  font-size: 13px;
  font-weight: 800;
  color: #15803d;
  margin-bottom: 4px;
}
.nl-callout-content {
  font-size: 13px;
  line-height: 1.6;
  color: #166534;
  white-space: pre-line;
  word-break: keep-all;
}

/* 3-item list */
.nl-case-item {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.nl-case-thumb {
  width: 120px;
  height: 90px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}
.nl-case-info {
  flex: 1;
}
.nl-case-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.nl-case-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}
.nl-case-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: #64748b;
}

/* Book layout */
.nl-book-layout {
  display: flex;
  gap: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  align-items: center;
}
.nl-book-cover {
  width: 90px;
  height: 125px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.nl-book-info {
  flex: 1;
}
.nl-book-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 4px 0 2px;
}
.nl-book-author {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 8px;
}
.nl-book-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: #334155;
}

/* Footer */
.nl-paper-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 30px 24px;
  text-align: center;
}
.nl-footer-illustration {
  margin: 0 auto 16px;
  max-height: 90px;
  object-fit: contain;
}
.nl-footer-btn {
  display: inline-block;
  padding: 10px 26px;
  background: #10b981;
  color: #ffffff !important;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.nl-footer-btn:hover {
  background: #059669;
}
.nl-footer-info-text {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

/* Global Hidden & Studio Tab Pane Visibility */
.hidden {
  display: none !important;
}
.studio-tab-pane.hidden {
  display: none !important;
}

/* Block Type Selector Modal Card Options */
.nl-block-type-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nl-block-type-option:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: rgba(99, 102, 241, 0.08);
}
.nl-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nl-type-info {
  flex: 1;
}
.nl-type-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.nl-type-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Import Job Item in Blog Import Modal */
.nl-import-job-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s ease;
}
.nl-import-job-item:hover {
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
}
.nl-import-job-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.nl-import-job-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Cardnews Deck Showcase & Compact Presentation (No Image Cutoffs!)
   ========================================================================== */
.nl-cardnews-deck-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .nl-cardnews-deck-card {
    flex-direction: column;
  }
}
.nl-deck-left {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nl-deck-main-cover {
  width: 220px;
  height: 220px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #0f172a;
}
.nl-deck-main-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}
.nl-deck-main-cover:hover img {
  transform: scale(1.03);
}
.nl-deck-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.nl-deck-strip-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nl-deck-strip-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.2px;
}
.nl-deck-strip-list {
  display: flex;
  gap: 6px;
}
.nl-deck-thumb-wrap {
  width: 66px;
  height: 66px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid #cbd5e1;
  background: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.nl-deck-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.nl-deck-thumb-num {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 9px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  padding: 1px 4px;
  border-radius: 3px;
}
.nl-deck-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Unified Image Customizer Tool (Upload, Paste, URL, AI Prompt)
   ========================================================================== */
.nl-image-custom-box {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 6px;
}
[data-theme="light"] .nl-image-custom-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.nl-img-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nl-img-preview-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0f172a;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.nl-img-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nl-img-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.btn-nl-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-nl-tool:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
}
.btn-nl-tool.btn-paste-action {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}
.btn-nl-tool.btn-paste-action:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
}
.btn-nl-tool.highlight {
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
}
.btn-nl-tool.highlight:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: #a855f7;
}

/* ==========================================================================
   AI Smart Article Draft Generator (Button & Modal)
   ========================================================================== */
.btn-ai-article-draft {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px dashed rgba(168, 85, 247, 0.45);
  color: #c084fc;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}
.btn-ai-article-draft:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(168, 85, 247, 0.22));
  border-color: #a855f7;
  transform: translateY(-1px);
}
[data-theme="light"] .btn-ai-article-draft {
  background: linear-gradient(135deg, #f5f3ff, #faf5ff);
  border-color: #c084fc;
  color: #7e22ce;
}

.ai-draft-cat-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.ai-draft-cat-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.ai-draft-cat-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}
.ai-draft-cat-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.ai-draft-facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}
[data-theme="light"] .ai-draft-facts-grid {
  background: #f8fafc;
}
@media (max-width: 640px) {
  .ai-draft-facts-grid {
    grid-template-columns: 1fr;
  }
}
.fact-input-group label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.ai-draft-kw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.ai-draft-chip {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.74rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-draft-chip:hover {
  border-color: #10b981;
  color: var(--text-primary);
}
.ai-draft-chip.selected {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
  font-weight: 700;
}

