/* ==========================================
   SocialScout Premium Design System (CSS)
   ========================================== */

:root {
  --bg-app: #f4f7fa;
  --bg-sidebar: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.75);
  --card-border: rgba(0, 0, 0, 0.06);
  --border-focus: rgba(114, 191, 68, 0.4);
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --primary: #72bf44;
  --primary-glow: rgba(114, 191, 68, 0.15);
  --secondary: #00aeef;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Input fields background */
  --input-bg: #ffffff;

  /* Social Branding Colors */
  --reddit: #ff4500;
  --linkedin: #0077b5;
  --twitter: #1da1f2;
  --facebook: #1877f2;
  --tiktok: #010101;
  --instagram: #e1306c;
  --youtube: #ff0000;

  --font-main: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-accent: 'Sora', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(114, 191, 68, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(0, 174, 239, 0.05) 0%, transparent 45%);
  background-attachment: fixed;
}

/* App Container Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 32px 8px;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  background: linear-gradient(136deg, #70c276 0%, #72bf44 50%, #00aeef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
  position: relative;
}

.nav-item svg {
  transition: transform 0.25s ease;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.03);
}

.nav-item:hover svg {
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(114, 191, 68, 0.1) 0%, rgba(0, 174, 239, 0.03) 100%);
  border-left: 3px solid var(--primary);
  font-weight: 600;
}

.nav-item .badge {
  position: absolute;
  right: 16px;
  background-color: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 0 10px var(--primary-glow);
}

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

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 13px;
  color: white;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

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

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 40px;
  max-width: calc(100vw - 260px);
}

/* Top Header Bar */
.main-header {
  display: flex;
  justify-content: justify;
  align-items: center;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 20px;
}

.header-title-container h1 {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.header-title-container p {
  color: var(--text-secondary);
  font-size: 14px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px var(--success); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Glassmorphic Cards */
.glass-card {
  background-color: var(--card-glass);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.09);
}

/* Search Panel Styling */
.search-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.search-input-wrapper {
  display: flex;
  gap: 12px;
  position: relative;
}

#search-input {
  flex-grow: 1;
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

#search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  background-color: var(--input-bg);
}

.glow-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 14px;
  padding: 0 28px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.glow-button:active {
  transform: translateY(0);
}

.glow-button.small {
  padding: 10px 20px;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Filters styling */
.search-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--card-border);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: center;
}

.filter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-desc-inline {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

/* Platforms Grid Custom Badges */
.platforms-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background-color: rgba(0, 0, 0, 0.02);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
}

.platform-checkbox input {
  display: none;
}

.platform-checkbox:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

/* Active Badge styling per platform */
.platform-checkbox.checked {
  border-color: var(--border-color);
  background-color: var(--bg-active);
  box-shadow: 0 4px 12px var(--shadow-active);
}

.platform-checkbox.reddit {
  --border-color: rgba(255, 69, 0, 0.3);
  --bg-active: rgba(255, 69, 0, 0.15);
  --shadow-active: rgba(255, 69, 0, 0.1);
}
.platform-checkbox.linkedin {
  --border-color: rgba(0, 119, 181, 0.3);
  --bg-active: rgba(0, 119, 181, 0.15);
  --shadow-active: rgba(0, 119, 181, 0.1);
}
.platform-checkbox.twitter {
  --border-color: rgba(15, 23, 42, 0.2);
  --bg-active: rgba(15, 23, 42, 0.08);
  --shadow-active: rgba(15, 23, 42, 0.04);
}
.platform-checkbox.facebook {
  --border-color: rgba(24, 119, 242, 0.3);
  --bg-active: rgba(24, 119, 242, 0.15);
  --shadow-active: rgba(24, 119, 242, 0.1);
}
.platform-checkbox.tiktok {
  --border-color: rgba(0, 242, 254, 0.3);
  --bg-active: rgba(0, 242, 254, 0.15);
  --shadow-active: rgba(0, 242, 254, 0.1);
}
.platform-checkbox.instagram {
  --border-color: rgba(225, 48, 108, 0.3);
  --bg-active: rgba(225, 48, 108, 0.15);
  --shadow-active: rgba(225, 48, 108, 0.1);
}

/* Switch Slider */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  vertical-align: middle;
}

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

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

#fuzzy-threshold {
  flex-grow: 1;
  accent-color: var(--primary);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 10px;
}

#fuzzy-threshold-value {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 13px;
  background-color: rgba(139, 92, 246, 0.15);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 5px;
  min-width: 38px;
  text-align: center;
}

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

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

input:checked + .slider {
  background-color: var(--primary);
}

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

/* Console logs */
.console-card {
  border-left: 3px solid var(--primary);
  background-color: #1e293b;
  margin-bottom: 24px;
  padding: 16px;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.console-title {
  font-family: var(--font-accent);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.console-close {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.console-body {
  font-family: monospace;
  font-size: 12px;
  color: #38bdf8;
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.6;
}

.console-log-line {
  margin-bottom: 4px;
}

.console-log-line.success { color: var(--success); }
.console-log-line.warn { color: var(--warning); }
.console-log-line.err { color: var(--danger); }

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.results-header h2 {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 18px;
}

.results-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background-color: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.action-btn.text-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.action-btn.secondary {
  background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(244,247,250,0.8) 100%);
  border-color: var(--card-border);
  color: var(--text-primary);
  padding: 8px 16px;
}

.action-btn.secondary:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

/* Results / Card list */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background-color: var(--card-glass);
  border: 1px dashed var(--card-border);
  border-radius: 16px;
  text-align: center;
  width: 100%;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 400px;
}

.empty-state.small {
  padding: 30px 20px;
}

/* Lead/Post Card Design */
.post-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

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

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

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Platform Badge inside Card */
.platform-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.platform-badge.reddit { background-color: rgba(255, 69, 0, 0.15); color: var(--reddit); }
.platform-badge.linkedin { background-color: rgba(0, 119, 181, 0.15); color: var(--linkedin); }
.platform-badge.twitter { background-color: rgba(15, 23, 42, 0.08); color: var(--text-primary); }
.platform-badge.tiktok { background-color: rgba(1, 1, 1, 0.08); color: #010101; }
.platform-badge.instagram { background-color: rgba(225, 48, 108, 0.15); color: var(--instagram); }
.platform-badge.facebook { background-color: rgba(24, 119, 242, 0.12); color: var(--facebook); }
.platform-badge.youtube { background-color: rgba(255, 0, 0, 0.12); color: var(--youtube); }

.author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.post-channel {
  font-size: 11px;
  color: var(--text-muted);
}

.post-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Score / Match rate */
.relevance-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.score-badge {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 5px;
}

.score-badge.high { background-color: rgba(16, 185, 129, 0.15); color: var(--success); }
.score-badge.medium { background-color: rgba(245, 158, 11, 0.15); color: var(--warning); }
.score-badge.low { background-color: rgba(239, 68, 68, 0.15); color: var(--danger); }

.score-bar-bg {
  width: 70px;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.score-bar-fill.high { background-color: var(--success); }
.score-bar-fill.medium { background-color: var(--warning); }
.score-bar-fill.low { background-color: var(--danger); }

/* Card Content */
.post-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  margin-bottom: 16px;
}

.post-text mark {
  background-color: rgba(114, 191, 68, 0.18);
  color: #000;
  border-bottom: 2px solid var(--primary);
  padding: 0 2px;
  border-radius: 2px;
}

/* Card Actions */
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding-top: 12px;
}

.post-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.card-cta-group {
  display: flex;
  gap: 8px;
}

.card-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.card-btn:hover {
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.08);
}

.card-btn.save-btn {
  background-color: rgba(114, 191, 68, 0.08);
  border-color: rgba(114, 191, 68, 0.2);
  color: var(--primary);
}

.card-btn.save-btn:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.card-btn.saved {
  background-color: var(--success);
  color: white;
  border-color: var(--success);
}

.card-btn.saved:hover {
  background-color: rgba(16, 185, 129, 0.8);
}

/* DEEP LINK TAB CARD DESIGN */
.intro-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background-color: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
  margin-bottom: 24px;
}

.intro-icon {
  font-size: 32px;
}

.intro-text h2 {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 4px;
}

.intro-text p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.dorks-header-search {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 600px;
}

.dorks-header-search input {
  flex-grow: 1;
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  outline: none;
}

.dorks-header-search input:focus {
  border-color: var(--primary);
}

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

.dork-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

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

.dork-card-title {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dork-card-title.reddit { color: var(--reddit); }
.dork-card-title.linkedin { color: var(--linkedin); }
.dork-card-title.twitter { color: var(--text-primary); }
.dork-card-title.facebook { color: var(--facebook); }
.dork-card-title.tiktok { color: var(--tiktok); }
.dork-card-title.instagram { color: var(--instagram); }

.dork-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  flex-grow: 1;
}

.dork-link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dork-launch-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dork-launch-link:hover {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  transform: translateX(2px);
}

.dork-launch-link.dork-google {
  border-left: 3px solid var(--secondary);
}

.dork-launch-link.dork-native {
  border-left: 3px solid var(--primary);
}

.link-arrow {
  color: var(--text-muted);
  font-size: 11px;
}

/* PASTED IMPORTER LAYOUT */
.import-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

.import-form-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 8px;
}

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

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-group select,
.form-group input,
.form-group textarea {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.25s ease;
}

.form-group select {
  padding: 10px 12px;
}

.form-group input {
  padding: 10px 12px;
  font-size: 14px;
}

.form-group textarea {
  height: 250px;
  padding: 12px;
  font-size: 13px;
  resize: vertical;
  font-family: monospace;
}

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

.import-results-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.import-preview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

/* LEAD PIPELINE CRM DESIGN */
.leads-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.summary-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--card-border);
  padding-right: 20px;
  min-width: 100px;
}

.summary-metric:last-of-type {
  border-right: none;
}

.metric-val {
  font-family: var(--font-accent);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.metric-lbl {
  font-size: 12px;
  color: var(--text-secondary);
}

.summary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.leads-pipeline-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leads-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.leads-list-header h2 {
  font-family: var(--font-accent);
  font-size: 18px;
}

#leads-search {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  min-width: 240px;
}

#leads-search:focus {
  border-color: var(--primary);
}

.leads-pipeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Leads Cards with CRM notes */
.lead-card-crm {
  border-left: 4px solid var(--primary-color);
}

.lead-card-crm.reddit { --primary-color: var(--reddit); }
.lead-card-crm.linkedin { --primary-color: var(--linkedin); }
.lead-card-crm.twitter { --primary-color: var(--text-primary); }
.lead-card-crm.facebook { --primary-color: var(--facebook); }
.lead-card-crm.tiktok { --primary-color: var(--tiktok); }
.lead-card-crm.instagram { --primary-color: var(--instagram); }
.lead-card-crm.youtube { --primary-color: var(--youtube); }

.crm-notes-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  padding: 12px;
  margin: 4px 0 12px 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.crm-notes-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.crm-notes-textarea {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  resize: none;
  width: 100%;
  height: 50px;
}

.crm-notes-textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.save-status-msg {
  font-size: 10px;
  color: var(--success);
  margin-top: 2px;
  text-align: right;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.save-status-msg.visible {
  opacity: 1;
}

.rich-paste-area {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.25s ease;
  height: 250px;
  padding: 12px;
  font-size: 13px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.rich-paste-area:focus {
  border-color: var(--primary);
}

/* Custom placeholder for contenteditable */
.rich-paste-area:empty:before {
  content: attr(placeholder);
  display: block; /* For standard rendering */
  color: var(--text-muted);
  font-style: italic;
}

/* INTEGRATION SETTINGS PANEL */
.settings-layout {
  max-width: 650px;
  margin: 0 auto;
  animation: slideIn 0.3s ease;
}

.settings-layout h2 {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 6px;
}

.settings-form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 40px; /* Space for the toggle button */
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  outline: none;
  padding: 0;
}

.field-help {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.field-help a {
  color: var(--secondary);
  text-decoration: none;
}

.field-help a:hover {
  text-decoration: underline;
}

.checkbox-group {
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 8px;
}

.checkbox-label-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary) !important;
  font-size: 13px !important;
}

.checkbox-label-wrapper input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.system-status.cloud-active {
  background-color: rgba(0, 174, 239, 0.08);
  border-color: rgba(0, 174, 239, 0.2);
  color: var(--secondary);
}

.status-indicator.cloud {
  background-color: var(--secondary);
  box-shadow: 0 0 8px var(--secondary);
  animation: cloud-pulse 2s infinite;
}

@keyframes cloud-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px var(--secondary); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Post Image Attachments styling */
.post-image-attachment {
  margin-top: 12px;
  margin-bottom: 12px;
  max-height: 250px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background-color: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-image-attachment img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 250px;
}

/* Integration Settings Administrator Lock */
.admin-lock-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
}

.settings-form input:disabled,
.settings-form button:disabled,
.settings-form select:disabled {
  background-color: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed !important;
  border-color: var(--card-border) !important;
  box-shadow: none !important;
}

/* Regional Location Badges */
.location-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.location-badge.au {
  background-color: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.location-badge.row {
  background-color: rgba(100, 116, 139, 0.1);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.18);
}

/* Clickable Post content links */
.content-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
  border-bottom: 1px dashed var(--secondary);
  transition: all 0.2s ease;
}

.content-link:hover {
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
}

/* Clickable Author Name Links */
.author-link-title {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.author-link-title:hover {
  color: var(--primary);
}

.author-link-title:hover .author-name {
  text-decoration: underline;
}

