/* SocialLens - Main Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    --error: #ef4444;
    --success: #10b981;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--gray-100); color: var(--gray-900); line-height: 1.6; }
a { text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn { padding: 12px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border: none; font-size: 14px; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-secondary { background: var(--secondary); color: white; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* Header */
.header { background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,0.1); position: fixed; width: 100%; top: 0; z-index: 100; }
.header .container { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: var(--primary); }
.logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--gray-700); font-weight: 500; font-size: 14px; }
.nav a:hover { color: var(--primary); }
.nav .btn { margin-left: 10px; }

/* Hero */
.hero { padding: 160px 0 100px; background: linear-gradient(135deg, var(--dark), var(--gray-900)); color: white; text-align: center; }
.hero h1 { font-size: 52px; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.hero h1 span { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: var(--gray-400); max-width: 600px; margin: 0 auto 30px; }
.hero-btns { display: flex; gap: 15px; justify-content: center; margin-bottom: 50px; }
.hero-stats { display: flex; justify-content: center; gap: 60px; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat strong { display: block; font-size: 40px; font-weight: 700; }
.hero-stats .stat span { color: var(--gray-400); font-size: 14px; }

/* Sections */
section { padding: 80px 0; }
.section-title { font-size: 36px; font-weight: 700; text-align: center; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: var(--gray-600); margin-bottom: 50px; }
.features { background: var(--white); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.feature { padding: 25px; border-radius: 12px; background: var(--gray-100); }
.feature-icon { width: 50px; height: 50px; background: rgba(99, 102, 241, 0.1); color: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 15px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--gray-600); font-size: 14px; }

/* Sources */
.sources { background: var(--dark); color: white; text-align: center; }
.sources h2 { margin-bottom: 30px; }
.sources-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.sources-list span { padding: 12px 20px; background: var(--gray-800); border-radius: 8px; font-weight: 500; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 25px; text-align: center; }
.step-num { width: 45px; height: 45px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; margin: 0 auto 15px; }
.step h3 { margin-bottom: 5px; }
.step p { color: var(--gray-600); font-size: 14px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; max-width: 900px; margin: 0 auto; }
.pricing-card { border: 2px solid var(--gray-300); border-radius: 16px; padding: 30px; text-align: center; position: relative; }
.pricing-card.featured { border-color: var(--primary); }
.pricing-card .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pricing-card h3 { font-size: 20px; margin-bottom: 10px; }
.pricing-card .price { font-size: 42px; font-weight: 700; margin: 15px 0; }
.pricing-card .price span { font-size: 16px; color: var(--gray-600); font-weight: 400; }
.pricing-card ul { list-style: none; text-align: left; margin: 20px 0; }
.pricing-card li { padding: 10px 0; border-bottom: 1px solid var(--gray-200); }
.pricing-card li::before { content: '✓'; color: var(--success); margin-right: 10px; }

/* CTA */
.cta { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; text-align: center; }
.cta h2 { font-size: 32px; margin-bottom: 10px; }
.cta p { opacity: 0.9; margin-bottom: 25px; }

/* Footer */
footer { background: var(--dark); color: var(--gray-500); padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px; margin-bottom: 30px; }
footer h4 { color: white; margin-bottom: 15px; }
footer a { display: block; color: var(--gray-500); margin-bottom: 8px; font-size: 14px; }
footer a:hover { color: white; }
.footer-copy { text-align: center; padding-top: 20px; border-top: 1px solid var(--gray-800); font-size: 14px; }

/* ========================================
   DASHBOARD STYLES (Authenticated)
   ======================================== */
body.dashboard { background: var(--gray-200); }

/* Sidebar */
.sidebar { width: 260px; background: var(--dark); min-height: 100vh; position: fixed; left: 0; top: 0; }
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--gray-800); }
.sidebar-header .logo { color: white; font-size: 18px; }
.sidebar-nav { padding: 20px 0; }
.nav-section { padding: 0 15px; margin-bottom: 20px; }
.nav-section-title { font-size: 11px; text-transform: uppercase; color: var(--gray-600); font-weight: 600; padding: 0 10px; margin-bottom: 10px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 15px; color: var(--gray-400); border-radius: 8px; transition: all 0.2s; cursor: pointer; font-size: 14px; }
.nav-item:hover { background: var(--gray-800); color: white; }
.nav-item.active { background: var(--primary); color: white; }

/* Main Content */
.main-content { margin-left: 260px; padding: 20px; }
.top-bar { background: var(--white); padding: 15px 25px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.project-selector { display: flex; align-items: center; gap: 10px; }
.project-dropdown { padding: 10px 15px; background: var(--gray-100); border-radius: 8px; border: none; font-size: 14px; font-weight: 600; }
.period-label { color: var(--gray-500); font-size: 14px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; }
.stat-card { background: var(--white); padding: 20px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.stat-card .stat-value { font-size: 32px; font-weight: 700; }
.stat-card .stat-label { font-size: 14px; color: var(--gray-600); margin-top: 5px; }
.stat-card .stat-change { font-size: 13px; padding: 3px 8px; border-radius: 20px; margin-top: 10px; display: inline-block; }
.stat-card .stat-change.positive { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-card .stat-change.negative { background: rgba(239,68,68,0.1); color: var(--error); }

/* Cards */
.card { background: var(--white); padding: 20px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 20px; }
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; }

/* Charts */
.chart-grid { display: grid; grid-template-columns: 2fr 1fr); gap: 20px; }
.chart-placeholder { height: 300px; display: flex; align-items: center; justify-content: center; background: var(--gray-100); border-radius: 8px; color: var(--gray-500); }
.sentiment-chart { display: flex; gap: 20px; justify-content: center; }
.sentiment-item { text-align: center; padding: 20px; border-radius: 12px; }
.sentiment-item.positive { background: rgba(16,185,129,0.1); }
.sentiment-item.neutral { background: rgba(100,116,139,0.1); }
.sentiment-item.negative { background: rgba(239,68,68,0.1); }

/* Mentions List */
.mentions-list { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.mentions-header { padding: 20px; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.mention-item { padding: 20px; border-bottom: 1px solid var(--gray-100); display: flex; gap: 15px; }
.mention-item:hover { background: var(--gray-100); }
.mention-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; flex-shrink: 0; }
.mention-content { flex: 1; }
.mention-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mention-author { font-weight: 600; }
.mention-source { font-size: 13px; color: var(--gray-600); margin-left: 8px; }
.mention-time { font-size: 13px; color: var(--gray-500); }
.mention-text { color: var(--gray-700); }
.mention-tags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mention-tag { font-size: 12px; padding: 4px 10px; border-radius: 20px; font-weight: 500; }
.mention-tag.hashtag { background: rgba(99,102,241,0.1); color: var(--primary); }
.mention-tag.positive { background: rgba(16,185,129,0.1); color: var(--success); }
.mention-tag.negative { background: rgba(239,68,68,0.1); color: var(--error); }
.mention-tag.neutral { background: rgba(100,116,139,0.1); color: var(--gray-600); }

/* Filters */
.filters-bar { display: flex; gap: 10px; margin: 15px 20px; flex-wrap: wrap; }
.filter-chip { padding: 8px 16px; border-radius: 20px; background: var(--white); border: 1px solid var(--gray-300); font-size: 13px; font-weight: 500; cursor: pointer; }
.filter-chip:hover, .filter-chip.active { border-color: var(--primary); background: rgba(99,102,241,0.1); color: var(--primary); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 20px; }
.page-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--gray-300); background: var(--white); cursor: pointer; }
.page-btn:hover, .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 15px; text-align: left; border-bottom: 1px solid var(--gray-200); }
.data-table th { background: var(--gray-100); font-size: 12px; text-transform: uppercase; color: var(--gray-600); font-weight: 600; }

/* Badge */
.badge-tag { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-tag.positive { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-tag.negative { background: rgba(239,68,68,0.1); color: var(--error); }
.badge-tag.neutral { background: rgba(100,116,139,0.1); color: var(--gray-600); }

/* Influencer Card */
.influencers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.influencer-card { background: var(--white); border-radius: 12px; padding: 20px; display: flex; gap: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.influencer-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; font-weight: 700; }
.influencer-info { flex: 1; }
.influencer-name { font-size: 16px; font-weight: 600; }
.influencer-handle { font-size: 14px; color: var(--gray-600); margin-bottom: 10px; }
.influencer-stats { display: flex; gap: 15px; font-size: 13px; }

/* Form */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }
.form-input, .form-select { width: 100%; padding: 12px 15px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 14px; }
.form-input:focus, .form-select:focus { outline: none; border-color: var(--primary); }

/* Toggle */
.toggle-group { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--gray-200); }
.toggle-label { font-weight: 500; }
.toggle-hint { font-size: 13px; color: var(--gray-600); }
.toggle { position: relative; width: 50px; height: 28px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--gray-300); border-radius: 28px; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; height: 22px; width: 22px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

/* Source Card */
.source-card { border: 2px solid var(--gray-200); border-radius: 10px; padding: 15px; text-align: center; cursor: pointer; transition: all 0.2s; }
.source-card:hover { border-color: var(--primary); }
.source-card.active { border-color: var(--primary); background: rgba(99,102,241,0.05); }

/* Responsive */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 32px; }
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
}