/* ==========================================================================
   Gasimus Automation Suite - Clean, Bright, Modern SaaS Design System
   Aesthetic: Light, Crisp, High-Contrast, Professional SaaS (Stripe/Linear style)
   Zero AI-Slop: No tacky neon cyan/magenta glows, no generic dark blur slop
   ========================================================================== */

:root {
  /* Surface & Background Palette (Crisp Clean Light) */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  
  /* Borders */
  --border-light: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-strong: #94a3b8;
  --border-focus: #2563eb;

  /* Typography Colors */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  /* Brand Accents */
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --primary-light: #f8fafc;
  
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-light: #eff6ff;
  --accent-blue-border: #bfdbfe;

  --accent-indigo: #4f46e5;
  --accent-indigo-light: #eef2ff;

  /* Status Colors */
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;

  --danger: #e11d48;
  --danger-bg: #fff1f2;
  --danger-border: #fecdd3;

  /* Instagram Brand Accents (Authentic, not tacky) */
  --ig-gradient: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --ig-dm-bubble: linear-gradient(135deg, #3772ff 0%, #6366f1 100%);
  --ig-blue: #0095f6;
  --ig-verified: #0095f6;

  /* Shadows (Layered & Soft, Modern SaaS) */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 25px -5px rgba(15, 23, 42, 0.04);
  --shadow-phone: 0 20px 40px -10px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-phone: 36px;

  /* Font */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(at 15% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 50%),
    radial-gradient(at 85% 0%, rgba(220, 39, 67, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
}

/* ==========================================================================
   Header Bar
   ========================================================================== */
.app-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
  flex-shrink: 0;
}

.brand-badge-mini {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: #ffffff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

.brand-badge-mini svg {
  color: var(--accent-blue);
}

.brand-titles h1 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-titles h1 span.highlight {
  color: var(--accent-blue);
}

.brand-titles p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.status-badge.live {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.4);
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.account-badge {
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.account-badge .verified-tick {
  color: var(--ig-verified);
  font-size: 0.85rem;
}

.vps-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

/* ==========================================================================
   Layout Container
   ========================================================================== */
.main-container {
  max-width: 1240px;
  margin: 24px auto 60px;
  padding: 0 24px;
}

/* ==========================================================================
   KPI Summary Stat Cards (Top Overview)
   ========================================================================== */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 960px) {
  .stats-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .stats-overview-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

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

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-subtext {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-subtext.positive {
  color: var(--success);
  font-weight: 600;
}

.stat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap.blue {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

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

.stat-icon-wrap.purple {
  background: #f5f3ff;
  color: #7c3aed;
}

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

/* ==========================================================================
   Navigation Tabs (Pill Segmented Controls)
   ========================================================================== */
.tabs-nav-wrapper {
  background: #f1f5f9;
  padding: 5px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-nav-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.6);
}

.nav-tab-btn.active {
  color: var(--text-primary);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.nav-tab-badge {
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  transition: var(--transition);
}

.nav-tab-btn.active .nav-tab-badge {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

/* ==========================================================================
   Content Sections
   ========================================================================== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title-group h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ==========================================================================
   Cards & Surfaces
   ========================================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-medium);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-xs);
}

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

.btn-primary:active {
  transform: translateY(0);
}

.btn-accent {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.btn-accent:hover {
  background: var(--accent-blue-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--border-medium);
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-danger-subtle {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.btn-danger-subtle:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

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

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-control::placeholder {
  color: var(--text-subtle);
}

.input-with-prefix {
  display: flex;
  align-items: center;
}

.input-prefix {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: 9px 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.input-with-prefix .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.45;
}

.form-hint strong {
  color: var(--text-secondary);
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
}

/* Sample Quick Chips */
.sample-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

.chip-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 2px;
}

.sample-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.sample-chip:hover {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border-color: var(--accent-blue-border);
  transform: translateY(-1px);
}

/* Tag Insertion Buttons */
.tag-shortcuts {
  display: flex;
  gap: 6px;
}

.btn-tag {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-family: monospace;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-tag:hover {
  background: var(--accent-blue-light);
  border-color: var(--accent-blue);
}

/* ==========================================================================
   Simulator & Live Preview Grid
   ========================================================================== */
.playground-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 990px) {
  .playground-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Realistic Instagram Smartphone & Feed Preview Mockup
   ========================================================================== */
.phone-mockup-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-phone);
}

.phone-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.phone-time {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.phone-notch {
  width: 90px;
  height: 18px;
  background: #0f172a;
  border-radius: 999px;
}

.phone-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

/* Instagram Post Component */
.ig-post-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}

.ig-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
}

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

.ig-avatar-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 2px;
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ig-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #d92662;
}

.ig-author-meta {
  display: flex;
  flex-direction: column;
}

.ig-username-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ig-verified-badge {
  display: inline-flex;
  color: var(--ig-verified);
}

.ig-post-subline {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Media Mockup */
.ig-post-media {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.media-reel-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.media-center-label {
  text-align: center;
}

.media-center-label p.bold {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.media-center-label p.sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Action Bar */
.ig-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-light);
}

.ig-action-left {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-primary);
}

.ig-action-icon {
  cursor: pointer;
  transition: transform 0.1s;
}

.ig-action-icon:hover {
  transform: scale(1.1);
}

.ig-action-icon.liked {
  color: #ef4444;
  fill: #ef4444;
}

/* Public Comments Thread */
.ig-comments-box {
  padding: 12px 14px;
  background: #fafafa;
}

.ig-comment-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.ig-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ig-comment-content {
  flex: 1;
}

.ig-comment-user {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 5px;
}

.ig-comment-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: inline;
  word-break: break-word;
}

.ig-comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 3px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Indented Bot Public Reply */
.ig-reply-row {
  margin-left: 36px;
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--success);
}

.ig-reply-row .ig-avatar-brand {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ig-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ig-author-tag {
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

.ig-reply-text {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
  display: inline;
}

/* Instagram Direct Message (DM) Preview Section */
.ig-dm-mockup {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.ig-dm-header {
  background: #ffffff;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ig-dm-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ig-dm-user .meta {
  display: flex;
  flex-direction: column;
}

.ig-dm-user .name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ig-dm-user .status {
  font-size: 0.68rem;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot-mini {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}

.ig-dm-body {
  padding: 14px;
  background: #fdfdfd;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dm-time-divider {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.dm-bubble-sent {
  align-self: flex-end;
  max-width: 85%;
  background: var(--ig-dm-bubble);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 2px 6px rgba(55, 114, 255, 0.2);
}

.dm-link-card-preview {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.link-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.link-card-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.link-card-text .title {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card-text .url {
  font-size: 0.65rem;
  opacity: 0.85;
}

/* ==========================================================================
   Activity Stream (Live Logs Feed)
   ========================================================================== */
.feed-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.feed-item:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.feed-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.feed-user-meta {
  display: flex;
  flex-direction: column;
}

.feed-username {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.feed-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.feed-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

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

.feed-badge.simulation {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue-border);
}

.feed-badge.skipped {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.feed-comment-bubble {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-blue);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.bubble-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
  font-weight: 700;
  margin-bottom: 2px;
  display: block;
}

.bubble-text {
  font-size: 0.86rem;
  color: var(--text-primary);
}

.feed-responses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.response-card {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}

.response-card.public {
  border-left: 3px solid var(--success);
  background: #fcfdfd;
}

.response-card.dm {
  border-left: 3px solid var(--accent-indigo);
  background: #fafafd;
}

.res-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.response-card.public .res-label { color: var(--success); }
.response-card.dm .res-label { color: var(--accent-indigo); }

.res-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.45;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

/* ==========================================================================
   Campaigns & Post Rules Tab
   ========================================================================== */
.campaign-form-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.campaign-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .campaign-form-grid {
    grid-template-columns: 1fr;
  }
}

.camp-preview-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}

.preview-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}

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

@media (max-width: 600px) {
  .campaigns-grid {
    grid-template-columns: 1fr;
  }
}

.campaign-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.campaign-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.camp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.camp-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.camp-media-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  font-family: monospace;
}

.camp-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.camp-meta-row {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
}

.camp-meta-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.camp-meta-val {
  color: var(--text-primary);
  word-break: break-all;
}

.camp-meta-val a {
  color: var(--accent-blue);
  text-decoration: none;
}

.camp-meta-val a:hover {
  text-decoration: underline;
}

.camp-keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.camp-keyword-pill {
  font-size: 0.72rem;
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue-border);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}

.camp-dm-preview-snippet {
  font-size: 0.8rem;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.4;
}

.camp-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   Configuration Tab
   ========================================================================== */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Setup & Documentation Cards
   ========================================================================== */
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setup-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  gap: 18px;
  box-shadow: var(--shadow-xs);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-content p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.code-box {
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.82rem;
  margin: 10px 0;
  overflow-x: auto;
}

.code-box code, .code-box pre {
  font-family: inherit;
  color: #38bdf8;
}

.setup-list {
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.setup-list strong {
  color: var(--text-primary);
}

.meta-status-box {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-status-result {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Toast Notification & Spinner Utilities
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1000;
  animation: slideUp 0.2s ease-out;
}

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

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

.spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

.hide {
  display: none !important;
}

/* ==========================================================================
   Dashboard Auth Screen (Lock Screen)
   ========================================================================== */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-app);
  background-image: 
    radial-gradient(at 20% 20%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
    radial-gradient(at 80% 80%, rgba(220, 39, 67, 0.05) 0px, transparent 50%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card), 0 20px 40px -15px rgba(15, 23, 42, 0.08);
  padding: 36px 32px;
  text-align: center;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-brand-badge {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin: 0 auto 18px;
  box-shadow: 0 8px 20px rgba(220, 39, 67, 0.3);
}

.auth-header-text h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-header-text p {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 14px 0 22px;
  background: var(--bg-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

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

.input-password-wrap input {
  padding-right: 44px;
}

.btn-pwd-eye {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.btn-pwd-eye:hover {
  color: var(--text-primary);
}

.auth-error-box {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 12px;
  animation: shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* ==========================================================================
   Multi-Account Styles
   ========================================================================== */
.account-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.2s ease-out;
}

.account-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .account-form-grid {
    grid-template-columns: 1fr;
  }
}

.token-test-box {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acc-token-test-result {
  font-size: 0.8rem;
  min-height: 20px;
}

.acc-token-test-result.success {
  color: var(--success);
  font-weight: 600;
}

.acc-token-test-result.error {
  color: var(--danger);
  font-weight: 600;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.account-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
}

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

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-card-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(220, 39, 67, 0.2);
  flex-shrink: 0;
}

.account-card-info h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.account-card-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.account-card-body {
  background: var(--bg-subtle);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
}

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

.account-card-label {
  color: var(--text-muted);
  font-weight: 500;
}

.account-card-val {
  font-family: monospace;
  font-weight: 600;
  color: var(--text-secondary);
}

.account-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.camp-account-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue-border);
}

.camp-account-pill.all {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}
