/* ==========================================================================
   SocialBoost AI - Design System & Styles
   Ultra-modern Glassmorphism Dark UI with Vibrant Neon Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #0a0d14;
  --bg-secondary: #111726;
  --bg-card: rgba(23, 31, 48, 0.7);
  --bg-card-hover: rgba(30, 41, 64, 0.85);
  --bg-glass: rgba(18, 24, 38, 0.65);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.4);
  --border-glow: rgba(129, 140, 248, 0.3);

  /* Brand / Accent Colors */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);

  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.35);

  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.35);

  --accent-purple: #a855f7;

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-white: #ffffff;

  /* Social Network Colors */
  --fb-blue: #1877f2;
  --ig-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);

  /* Layout & Geometry */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* App Shell Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar Navigation */
.app-sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 20;
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-glow);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-dot 2s infinite;
}

/* User Session Card */
.user-session-card {
  margin: 12px 14px 4px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary);
  flex-shrink: 0;
}

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

.user-session-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-session-email {
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout-mini {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition-fast);
  opacity: 0.7;
}

.btn-logout-mini:hover {
  opacity: 1;
  transform: scale(1.15);
}

.btn-logout-topbar {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-logout-topbar:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
  border-color: rgba(244, 63, 94, 0.6);
}

/* Sidebar Assistant Card (Left Side Section) */
.sidebar-assistant-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.12) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 12px 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25), 0 0 15px rgba(99, 102, 241, 0.1);
}

.sidebar-assistant-card:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(6, 182, 212, 0.2) 100%);
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
}

.sidebar-assistant-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sidebar-assistant-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.sidebar-assistant-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-assistant-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-assistant-pill {
  font-size: 0.62rem;
  font-weight: 800;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.2);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.sidebar-assistant-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-sidebar-assistant {
  width: 100%;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.35);
}

.btn-sidebar-assistant:hover {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  transform: scale(1.02);
}

.sidebar-score-guide-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  transition: all var(--transition-fast);
}

.sidebar-score-guide-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.sidebar-nav {
  padding: 12px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 12px 4px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
  text-align: left;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
  border-color: var(--border-active);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.nav-btn .icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.nav-badge.fire {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

.sidebar-footer {
  padding: 18px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.autopilot-widget {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.autopilot-info {
  display: flex;
  flex-direction: column;
}

.autopilot-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.autopilot-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Custom Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 12px var(--accent-emerald-glow);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Top Navigation Bar */
.app-topbar {
  height: 70px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 10;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.platform-pill-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.platform-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.platform-pill:hover {
  color: var(--text-main);
}

.platform-pill.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.platform-pill.ig-active.active {
  background: var(--ig-gradient);
  box-shadow: 0 2px 10px rgba(220, 39, 67, 0.4);
}

.platform-pill.fb-active.active {
  background: var(--fb-blue);
  box-shadow: 0 2px 10px rgba(24, 119, 242, 0.4);
}

.topbar-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stat-pill.leads .dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.stat-pill.urgent .dot {
  background: var(--accent-rose);
  box-shadow: 0 0 8px var(--accent-rose);
}

.stat-pill.score .dot {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.btn-primary-action {
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

/* Main Feed Workspace */
.view-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  justify-content: center;
}

/* Stream List Column (Full Width Clean Layout) */
.feed-column {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-right: none;
  background: rgba(13, 18, 28, 0.4);
  overflow: hidden;
}

.feed-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(17, 24, 39, 0.4);
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.95rem;
}

.filter-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-tag.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
}

/* Feed Toolbar Controls & Density Switcher */
.feed-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.feed-counter-text {
  font-size: 0.74rem;
  color: var(--text-dim);
  font-weight: 600;
}

.density-toggle-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.btn-density-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-density-toggle.active {
  background: var(--primary);
  color: #fff;
}

.feed-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-toolbar-assistant {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.btn-toolbar-assistant:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Quick Action button in comment cards (Image 2 style) */
.btn-card-assistant {
  background: rgba(99, 102, 241, 0.2);
  border: 1.5px solid rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  white-space: nowrap;
}

.btn-card-assistant .assistant-btn-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.btn-card-assistant:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
}

.comment-card.is-spam {
  border-color: rgba(244, 63, 94, 0.4) !important;
  background: linear-gradient(170deg, rgba(30, 10, 20, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
}

/* ==========================================================================
   Detailed Comment Card: Prominent Post Context Header
   ========================================================================== */
.card-origin-post {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.25s ease;
  position: relative;
  overflow: visible;
  min-height: fit-content;
}

.card-origin-post:hover {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.card-origin-post-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.card-origin-post-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}

.card-origin-post-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  display: block;
}

.card-origin-platform-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.card-origin-platform-badge.instagram {
  background: var(--ig-gradient);
  color: #fff;
}

.card-origin-platform-badge.facebook {
  background: var(--fb-blue);
  color: #fff;
}

.card-origin-post-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.card-origin-post-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-origin-post-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #67e8f9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-origin-post-stats {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}

.card-origin-post-caption {
  font-size: 0.85rem;
  color: #f1f5f9;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  padding-bottom: 2px;
}

.card-follower-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.author-meta-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 1px;
}

.detailed-body {
  font-size: 0.92rem;
  color: #f8fafc;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-cyan);
  word-break: break-word;
}

.card-replied-preview {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
}

.replied-label {
  font-weight: 700;
  flex-shrink: 0;
}

.replied-text {
  color: #d1fae5;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pagination Bar at the Bottom of Comments Feed */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 8px;
  margin-bottom: 16px;
  gap: 12px;
  flex-shrink: 0;
}

.pagination-pages-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-pages-info strong {
  color: #fff;
}

.pagination-count-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.btn-pagination {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-pagination:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-pagination:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Active Post Context Banner */
.active-post-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--border-active);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  animation: slide-in 0.25s ease;
}

.active-post-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.active-post-banner-thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.active-post-banner-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.active-post-banner-caption {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.active-post-banner-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-clear-post-filter {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-clear-post-filter:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #fff;
}

/* Comment Stream */
.comments-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Compact Streamlined Mode */
.comments-scroll-area.compact-mode {
  gap: 6px;
  padding: 10px;
}

.comments-scroll-area.compact-mode .comment-card {
  padding: 10px 12px;
}

.comments-scroll-area.compact-mode .comment-card .card-top {
  margin-bottom: 4px;
}

.comments-scroll-area.compact-mode .comment-card .author-avatar {
  width: 24px;
  height: 24px;
}

.comments-scroll-area.compact-mode .comment-card .author-name {
  font-size: 0.8rem;
}

.comments-scroll-area.compact-mode .comment-card .author-handle {
  display: none;
}

.comments-scroll-area.compact-mode .comment-card .comment-body {
  font-size: 0.8rem;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comments-scroll-area.compact-mode .comment-card .highlight-reason-banner {
  display: none;
}

.comments-scroll-area.compact-mode .comment-card .card-footer {
  padding-top: 4px;
  font-size: 0.7rem;
}

/* Comment Card */
.comment-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.comment-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.comment-card.selected {
  border-color: var(--primary);
  background: rgba(30, 39, 64, 0.95);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.comment-card.is-highlight {
  border-left: 4px solid var(--accent-amber);
}

.comment-card.is-lead {
  border-left: 4px solid var(--accent-emerald);
}

.comment-card.is-urgent {
  border-left: 4px solid var(--accent-rose);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.author-names {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.platform-badge-mini {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.platform-badge-mini.instagram {
  background: var(--ig-gradient);
  color: #fff;
}

.platform-badge-mini.facebook {
  background: var(--fb-blue);
  color: #fff;
}

.author-handle {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

.score-badge.high {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.score-badge.lead {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.score-badge.urgent {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.sentiment-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.comment-body {
  font-size: 0.88rem;
  color: #e2e8f0;
  margin-bottom: 12px;
  line-height: 1.45;
}

.highlight-reason-banner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}

.post-preview-ref {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-thumb {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
}

.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.status-pill.replied {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* Right Column: Interactive Copilot Workspace */
.copilot-column {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  overflow-y: auto;
  position: relative;
}

.copilot-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(23, 31, 48, 0.4);
}

.copilot-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copilot-title-box h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.copilot-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Active Context Card */
.active-context-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.post-context-header {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.post-context-image {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.post-context-details {
  flex: 1;
}

.post-caption-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.user-comment-quote {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px;
  font-size: 0.92rem;
  color: #fff;
  font-weight: 500;
}

/* AI Suggestions Section */
.ai-suggestions-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title-bar h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tone-selector {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
}

.suggestion-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.suggestion-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.suggestion-card.active {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.15);
}

.suggestion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.suggestion-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.suggestion-tag.engagement {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.suggestion-tag.conversion {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.suggestion-tag.support {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

.suggestion-text {
  font-size: 0.88rem;
  color: #f8fafc;
  line-height: 1.45;
}

.suggestion-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.btn-suggestion-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-suggestion-action:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.suggestion-tip {
  font-size: 0.72rem;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Conversation Thread Timeline in Copilot */
.thread-timeline-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.thread-timeline-header {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-event {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 14px;
}

.timeline-event:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.75rem;
}

.timeline-author {
  font-weight: 700;
  color: #fff;
}

.timeline-time {
  color: var(--text-dim);
}

.timeline-text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.45;
}

/* Reply Editor Box */
.reply-editor-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-textarea {
  width: 100%;
  min-height: 90px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  transition: var(--transition-fast);
}

.reply-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.emoji-quick-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.emoji-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.emoji-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1);
}

.btn-send-reply {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
  transition: var(--transition-fast);
}

.btn-send-reply:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  transform: translateY(20px) scale(0.96);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
}

.btn-close-modal:hover {
  color: #fff;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Modal: Asistente de Respuestas & Conexión
   ========================================================================== */
.modal-assistant-box {
  max-width: 860px;
  width: 95%;
  max-height: 92vh;
  padding: 24px;
  background: linear-gradient(170deg, #111827 0%, #0d121f 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 40px rgba(99, 102, 241, 0.15);
  display: flex;
  flex-direction: column;
}

.modal-assistant-header {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-assistant-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-assistant-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.modal-assistant-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.modal-assistant-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modal Tab Switcher */
.modal-assistant-tab-switcher {
  display: flex;
  gap: 8px;
  padding: 0 0 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.modal-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.modal-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.modal-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.pulse-live-indicator {
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(244, 63, 94, 0.9);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  animation: pulse-live 1.6s infinite;
}

@keyframes pulse-live {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-assistant-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding-right: 4px;
}

.modal-assistant-controls-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.modal-control-item-comment {
  flex: 1.4;
}

.modal-control-item-tone {
  flex: 1;
}

.modal-control-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-control-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.modal-control-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-control-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.btn-modal-refresh-suggestions {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
  white-space: nowrap;
  height: 38px;
}

.btn-modal-refresh-suggestions:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
}

/* Follower Context Card in Modal */
.modal-follower-context-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.modal-follower-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-follower-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-follower-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.modal-follower-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #fff;
}

.modal-follower-handle {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.modal-post-ref {
  font-size: 0.74rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 450px;
  margin-top: 2px;
}

.modal-comment-quote-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  margin-bottom: 8px;
  position: relative;
}

.modal-comment-quote-box .quote-icon {
  font-size: 1.4rem;
  color: rgba(99, 102, 241, 0.4);
  font-family: Georgia, serif;
  line-height: 0;
  vertical-align: -0.2em;
  margin-right: 4px;
}

.modal-comment-quote-box p {
  display: inline;
  font-size: 0.88rem;
  color: #f1f5f9;
  font-style: italic;
  line-height: 1.5;
}

.modal-reason-banner {
  font-size: 0.75rem;
  color: var(--accent-amber);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Modal Suggestions Section */
.modal-suggestions-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-section-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.modal-suggestion-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all var(--transition-fast);
  position: relative;
}

.modal-suggestion-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.modal-suggestion-card.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.modal-suggestion-card.card-reflection {
  border-left: 3px solid var(--accent-cyan);
}
.modal-suggestion-card.card-motivation {
  border-left: 3px solid var(--accent-emerald);
}
.modal-suggestion-card.card-community {
  border-left: 3px solid var(--accent-purple);
}

.modal-suggestion-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-suggestion-tag {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.modal-suggestion-tag.reflection { color: #67e8f9; }
.modal-suggestion-tag.motivation { color: #6ee7b7; }
.modal-suggestion-tag.community { color: #d8b4fe; }

.modal-suggestion-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.modal-suggestion-text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.45;
  flex: 1;
}

.modal-suggestion-actions {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-modal-sugg-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.btn-modal-sugg-action:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Modal Reply Editor */
.modal-reply-editor-section {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-reply-textarea {
  min-height: 80px;
  font-size: 0.88rem;
}

.modal-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-modal-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Responsive adjustments for Modal */
@media (max-width: 900px) {
  .modal-suggestions-grid {
    grid-template-columns: 1fr;
  }
  .modal-assistant-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  .assistant-banner-trigger {
    flex-direction: column;
    align-items: flex-start;
  }
  .assistant-banner-right {
    width: 100%;
  }
  .btn-open-assistant-popup {
    width: 100%;
    justify-content: center;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--primary);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slide-in 0.3s ease;
}

.toast.success {
  border-left-color: var(--accent-emerald);
}

.toast.error {
  border-left-color: var(--accent-rose);
}

/* ==========================================================================
   Autopilot Live Monitor Styles
   ========================================================================== */
.autopilot-monitor-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.autopilot-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.autopilot-status-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.autopilot-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.autopilot-status-box h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.autopilot-status-box p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-run-autopilot-live {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: all var(--transition-fast);
}

.btn-run-autopilot-live:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.6);
}

.btn-run-autopilot-live:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.autopilot-progress-container {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.autopilot-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.autopilot-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.autopilot-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981);
  border-radius: var(--radius-full);
  transition: width 0.35s ease;
}

.autopilot-live-stream-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.autopilot-stream-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.autopilot-stream-title-row h5 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.autopilot-stream-badge {
  font-size: 0.7rem;
  color: #67e8f9;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.autopilot-stream-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.autopilot-live-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 3px solid #10b981;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.autopilot-live-card.spam {
  border-color: rgba(244, 63, 94, 0.35);
  border-left-color: #f43f5e;
  background: rgba(30, 10, 20, 0.65);
}

.autopilot-live-card.sticker {
  border-color: rgba(148, 163, 184, 0.25);
  border-left-color: #94a3b8;
  background: rgba(15, 23, 42, 0.45);
}

.autopilot-live-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.autopilot-live-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #fff;
}

.autopilot-variant-tag {
  font-size: 0.64rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.autopilot-variant-tag.spam {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.2);
}

.autopilot-variant-tag.sticker {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.2);
}

.autopilot-status-success {
  font-size: 0.72rem;
  font-weight: 700;
  color: #34d399;
}

.autopilot-status-spam {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fb7185;
}

.autopilot-status-ignored {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.autopilot-live-reply-quote {
  font-size: 0.82rem;
  color: #d1fae5;
  font-style: italic;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 4px;
}

.autopilot-live-reply-quote.spam {
  color: #fecdd3;
  border-left: 2px solid #f43f5e;
}

.autopilot-live-reply-quote.sticker {
  color: #94a3b8;
  border-left: 2px solid #64748b;
}

.autopilot-empty-state {
  text-align: center;
  padding: 30px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   Score Guide Modal Styles
   ========================================================================== */
.modal-score-guide-box {
  max-width: 780px;
  width: 95%;
  max-height: 90vh;
  padding: 24px;
  background: linear-gradient(170deg, #111827 0%, #0b0f19 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  overflow-y: auto;
}

.modal-score-guide-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.score-guide-intro p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.score-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.score-guide-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition-fast);
}

.score-guide-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.score-card-95 { border-left: 4px solid var(--accent-rose); }
.score-card-92 { border-left: 4px solid var(--accent-cyan); }
.score-card-88 { border-left: 4px solid var(--accent-emerald); }
.score-card-80 { border-left: 4px solid var(--accent-amber); }

.score-guide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.score-guide-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.badge-rose { background: rgba(244, 63, 94, 0.2); color: #fb7185; }
.badge-cyan { background: rgba(6, 182, 212, 0.2); color: #67e8f9; }
.badge-emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.score-guide-tag {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.score-guide-card h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}

.score-guide-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.score-guide-aim {
  font-size: 0.74rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.score-multipliers-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.score-multipliers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.multiplier-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.multiplier-pill {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.score-autopilot-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.78rem;
  color: #d1fae5;
  line-height: 1.45;
}

/* ==========================================================================
   Modal: Seguimiento & Detalle de Comentario (Post + Comentario + Respuesta)
   ========================================================================== */
.modal-comment-detail-box {
  max-width: 780px;
  width: 95%;
  max-height: 92vh;
  padding: 24px;
  background: linear-gradient(170deg, #111827 0%, #0c101a 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 40px rgba(99, 102, 241, 0.15);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-comment-detail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 4px;
}

.detail-section-block {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.detail-platform-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.detail-platform-badge.instagram {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.detail-platform-badge.facebook {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.detail-post-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.detail-post-thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.detail-post-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.detail-post-meta {
  font-size: 0.74rem;
  color: #67e8f9;
  font-weight: 700;
}

.detail-post-caption-box {
  background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid #6366f1;
  padding: 8px 12px;
  border-radius: 4px;
}

.detail-post-caption-box p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  font-style: italic;
}

.detail-sentiment-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.detail-sentiment-badge.urgent { background: rgba(244, 63, 94, 0.2); color: #fb7185; }
.detail-sentiment-badge.lead { background: rgba(6, 182, 212, 0.2); color: #67e8f9; }
.detail-sentiment-badge.high { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.detail-follower-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-follower-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.detail-author-names {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.detail-author-names strong {
  font-size: 0.88rem;
  color: #fff;
}

.detail-author-handle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.detail-comment-time {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.detail-comment-quote-box {
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid #06b6d4;
  padding: 10px 14px;
  border-radius: 4px;
}

.detail-comment-quote-box p {
  font-size: 0.88rem;
  color: #f1f5f9;
  line-height: 1.45;
  font-weight: 500;
}

.detail-status-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.detail-status-badge.replied {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.detail-status-badge.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.detail-reply-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left: 3px solid #10b981;
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-brand-avatar {
  font-size: 1.1rem;
}

.detail-variant-pill {
  font-size: 0.65rem;
  font-weight: 700;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
}

.detail-reply-time {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.detail-reply-text-box {
  font-size: 0.86rem;
  color: #e6fffa;
  line-height: 1.5;
  font-style: italic;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.detail-reply-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-detail-reopen-assistant {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-detail-reopen-assistant:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

.detail-pending-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  flex-wrap: wrap;
}

.detail-pending-icon {
  font-size: 1.8rem;
}

.detail-pending-info {
  flex: 1;
  min-width: 200px;
}

.detail-pending-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fef3c7;
}

.detail-pending-info p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-detail-respond-now {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: all var(--transition-fast);
}

.btn-detail-respond-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.6);
}

/* Analytics Sub-navigation Tabs */
.analytics-subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

.subtab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.subtab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.subtab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Post Filter Toolbar */
.post-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sort-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.sort-select:focus {
  border-color: var(--primary);
}

/* Post Cards Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.post-analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.post-analytics-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.post-card-media-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  background: #000;
  overflow: hidden;
}

.post-card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-analytics-card:hover .post-card-media {
  transform: scale(1.03);
}

.media-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.post-platform-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: #fff;
}

.post-platform-badge.instagram {
  background: var(--ig-gradient);
}

.post-platform-badge.facebook {
  background: var(--fb-blue);
}

.post-card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.post-card-date {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.post-card-caption {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #f1f5f9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

/* Meta Insights Metric Chips */
.post-metrics-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.metric-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-chip-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.metric-chip-value {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}

.metric-chip-value.reach { color: var(--accent-cyan); }
.metric-chip-value.engagement { color: var(--accent-emerald); }
.metric-chip-value.saved { color: var(--accent-amber); }

/* Post Sentiment Meter Bar */
.post-sentiment-wrapper {
  margin-bottom: 16px;
}

.sentiment-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.sentiment-stacked-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.sentiment-segment {
  height: 100%;
}
.sentiment-segment.leads { background: var(--accent-emerald); }
.sentiment-segment.positive { background: var(--accent-cyan); }
.sentiment-segment.questions { background: var(--accent-amber); }
.sentiment-segment.urgent { background: var(--accent-rose); }

/* Post Card Action Buttons */
.post-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.btn-post-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-post-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-post-action.primary {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.btn-post-action.primary:hover {
  background: var(--primary);
  color: #fff;
}

/* Meta Diagnostics UI */
.meta-diagnostic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 20px;
}

.diagnostic-header-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.status-indicator-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.status-indicator-icon.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indicator-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-indicator-icon.error {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.permissions-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.permission-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.perm-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.perm-pill.granted {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

.perm-pill.missing {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}

.detected-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.detected-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.account-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-use-account {
  background: var(--primary);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-use-account:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   AI Brand Voice Studio & Identity Calibrator Styles
   ========================================================================== */

.studio-grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1200px) {
  .studio-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Identity Calibration Sliders */
.tuning-slider-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.tuning-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tuning-slider-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tuning-slider-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.tuning-slider-badge.cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.4);
}

.tuning-slider-badge.emerald {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.tuning-slider-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.range-slider-input {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.range-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  cursor: pointer;
  border: 2px solid #fff;
  transition: transform 0.1s ease;
}

.range-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* Tag Chips Manager */
.tag-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 48px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tag-chip.key {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.35);
}

.tag-chip.forbidden {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.35);
}

.tag-chip-remove {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.7;
}

.tag-chip-remove:hover {
  opacity: 1;
}

.tag-chip-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  flex: 1;
  min-width: 140px;
}

.tag-chip-input::placeholder {
  color: var(--text-dim);
}

/* Few-Shot Training Cards */
.few-shot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.few-shot-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.few-shot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.few-shot-tag-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.few-shot-comment-preview {
  font-size: 0.82rem;
  color: #e2e8f0;
  margin-bottom: 6px;
  font-style: italic;
}

.few-shot-reply-preview {
  font-size: 0.82rem;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 2px solid var(--accent-emerald);
}

/* Live Voice Playground */
.playground-sticky-box {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

.playground-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.quick-scenarios-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.quick-scenario-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-scenario-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  border-color: var(--border-active);
}

.playground-results-container {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.playground-variant-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #f1f5f9;
}

.playground-variant-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* Animations */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Mobile Responsive Navigation, Bottom Bar & Touch Ergonomics
   ========================================================================== */

.btn-mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.btn-close-sidebar-mobile {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.btn-back-feed-mobile {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  align-items: center;
  gap: 4px;
}

.btn-back-feed-mobile:hover {
  background: var(--primary);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(13, 18, 28, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.bottom-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  flex: 1;
}

.bottom-nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.bottom-nav-btn.active {
  color: #a5b4fc;
}

.bottom-nav-btn.active .bottom-nav-icon {
  transform: scale(1.15);
  transition: transform 0.2s ease;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .btn-mobile-menu {
    display: flex;
  }

  .btn-close-sidebar-mobile {
    display: block;
  }

  .btn-back-feed-mobile {
    display: flex;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .app-container {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 290px;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
  }

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

  .app-main {
    height: 100vh;
    padding-bottom: 62px;
    overflow: hidden;
  }

  .app-topbar {
    height: 58px;
    padding: 0 14px;
  }

  .topbar-left {
    gap: 10px;
  }

  .page-title {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }

  .topbar-stats {
    display: none;
  }

  .platform-pill-group {
    padding: 2px;
  }

  .platform-pill {
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  /* Workspace on Mobile */
  .view-container {
    flex-direction: column;
    height: calc(100vh - 120px);
    overflow: hidden;
    position: relative;
  }

  .feed-column {
    width: 100%;
    height: 100%;
    flex: 1;
    border-right: none;
  }

  .feed-header {
    padding: 10px 12px;
    gap: 8px;
  }

  /* Views padding on mobile */
  #view-analytics, #view-settings, #view-meta {
    padding: 14px !important;
    height: calc(100vh - 120px) !important;
    padding-bottom: 80px !important;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .studio-grid-layout {
    grid-template-columns: 1fr;
  }

  .playground-sticky-box {
    position: static;
  }

  .active-post-banner {
    padding: 8px 12px;
  }

  .active-post-banner-caption {
    max-width: 160px;
  }

  /* Forms Touch Usability */
  input[type="text"], input[type="password"], textarea, select {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
  }

  .modal-box {
    width: 94% !important;
    max-height: 88vh !important;
    padding: 18px 14px !important;
  }
}

@media (max-width: 500px) {
  .page-title {
    display: none;
  }
  .density-toggle-group {
    display: none;
  }
  .analytics-kpis-grid {
    grid-template-columns: 1fr;
  }
}
