/* ==========================================================================
   STYLE SHEET: Road Sixty Geek - InfluFindr Dashboard
   ========================================================================== */

/* --- TOKENS & RESET --- */
:root {
    --bg-main: #060913;
    --bg-card: rgba(20, 24, 45, 0.45);
    --bg-card-hover: rgba(26, 31, 58, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --primary: #8b5cf6; /* RSG Violet brand color */
    --primary-glow: rgba(139, 92, 246, 0.15);
    --primary-hover: #7c3aed;
    
    --instagram-grad: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --tiktok-grad: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #fe0979 100%);
    --snapchat-grad: linear-gradient(135deg, #FFFC00 0%, #fef08a 100%);
    
    --success: #10b981;
    --danger: #ef4444;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --glass-blur: blur(16px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(244, 63, 94, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    transition: opacity 0.5s ease;
}

/* --- APP CONTAINER LAYOUT --- */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- HEADER --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(6, 9, 19, 0.7);
    backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
}

.logo-glow {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--primary);
    filter: blur(20px);
    opacity: 0.4;
    border-radius: 50%;
    z-index: -1;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary) 0%, #ec4899 100%);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.logo-icon i {
    width: 18px;
    height: 18px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-subtext {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.3rem;
}

.logo-highlight {
    background: linear-gradient(135deg, #c084fc 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.stat-bubble {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-bubble .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-bubble .stat-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}

.stat-bubble.highlight .stat-value {
    color: #f472b6;
    text-shadow: 0 0 10px rgba(244, 63, 150, 0.3);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--danger);
}

/* --- MAIN LAYOUT --- */
.main-layout {
    display: grid;
    grid-template-columns: 290px 1fr 280px;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
    padding-bottom: 2rem;
    margin-top: 1rem;
}

/* --- SIDEBAR FILTERS --- */
.sidebar-filters {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.sidebar-header h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h2 i {
    width: 16px;
    color: var(--primary);
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

/* Filter Groups */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

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

.filter-group-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.range-display {
    font-size: 0.85rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
}

/* Platform Selectors */
.platform-selector {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.btn-platform {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    width: 100%;
}

.btn-platform i, .btn-platform svg {
    width: 16px;
    height: 16px;
}

.btn-platform:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
}

.btn-platform.active {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

/* Checkbox Lists */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 0.85rem;
    user-select: none;
    gap: 0.5rem;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 16px;
    width: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-smooth);
    display: inline-block;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--border-hover);
    background-color: rgba(255, 255, 255, 0.08);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    display: none;
    position: relative;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Custom Double Range Sliders */
.range-sliders {
    position: relative;
    height: 10px;
    margin: 10px 0;
}

.range-sliders input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-sliders input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary);
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    border: 2px solid #fff;
    margin-top: -5px;
}

.range-sliders::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    top: 0;
}

.single-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    margin: 10px 0;
}

.single-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    border: 2px solid #fff;
}

.range-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-dark);
}

.custom-select, .custom-select-small {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.6rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
}

.custom-select:hover, .custom-select-small:hover {
    border-color: var(--border-hover);
}

.custom-select option, .custom-select-small option {
    background-color: var(--bg-main);
    color: var(--text-primary);
}

/* --- INDEXER PANEL SIDEBAR --- */
.indexer-panel-sidebar {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.indexer-panel-sidebar h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.indexer-panel-sidebar h3 i {
    color: var(--primary);
}

.indexer-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.indexer-form input[type="text"] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    padding: 0.5rem 0.6rem;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.indexer-form input[type="text"]:focus {
    border-color: var(--primary);
}

.platform-row {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.checkbox-container.inline-check {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-primary-small {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition-smooth);
    width: 100%;
}

.btn-primary-small:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.indexer-logs {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    max-height: 120px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.65rem;
    color: #10b981; /* Green console text */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.log-entry {
    line-height: 1.3;
}

.log-entry.error {
    color: var(--danger);
}

.log-entry.success {
    color: #fff;
    font-weight: bold;
}

/* --- MAIN WORKSPACE --- */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

/* Search and Sort */
.search-sort-bar {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

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

.search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.6rem 0.6rem 2.3rem;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.custom-select-small {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
}

/* --- GRID OF INFLUENCERS & CARDS --- */
.influencers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.influencer-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.influencer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: var(--transition-smooth);
}

.influencer-card.instagram:hover {
    box-shadow: 0 8px 20px rgba(225, 48, 108, 0.1);
    border-color: rgba(225, 48, 108, 0.3);
}
.influencer-card.instagram::before {
    background: var(--instagram-grad);
    opacity: 1;
}

.influencer-card.tiktok:hover {
    box-shadow: 0 8px 20px rgba(0, 242, 254, 0.1);
    border-color: rgba(0, 242, 254, 0.3);
}
.influencer-card.tiktok::before {
    background: var(--tiktok-grad);
    opacity: 1;
}

.influencer-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.avatar-wrapper {
    position: relative;
}

.avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
}

.platform-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.5rem;
    border: 1.5px solid var(--bg-main);
}

.platform-badge.instagram {
    background: var(--instagram-grad);
}
.platform-badge.tiktok {
    background: #000;
    color: #00f2fe;
}
.platform-badge.tiktok svg {
    margin-top: 1px;
}

.card-actions {
    display: flex;
    gap: 0.4rem;
    z-index: 10;
}

.btn-add-campaign, .btn-delete-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-add-campaign:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.1);
}

.btn-add-campaign.added {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.btn-delete-card:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}

.influencer-info {
    margin-bottom: 0.75rem;
}

.influencer-info h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.influencer-handle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.handle-link {
    color: var(--primary-light, #a78bfa);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}
.handle-link:hover {
    color: #fff;
    text-decoration: underline;
}

.drawer-handle-link {
    color: var(--primary-light, #a78bfa);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.drawer-handle-link:hover {
    color: #fff;
    text-decoration: underline;
}

.influencer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.tag.manga { color: #f472b6; border-color: rgba(244, 63, 94, 0.2); }
.tag.disney { color: #60a5fa; border-color: rgba(96, 165, 250, 0.2); }
.tag.cinema-series { color: #34d399; border-color: rgba(52, 211, 153, 0.2); }
.tag.pop-culture { color: #fbbf24; border-color: rgba(251, 191, 36, 0.2); }

.card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

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

.metric-box .metric-label {
    font-size: 0.6rem;
    color: var(--text-dark);
    text-transform: uppercase;
    font-weight: 600;
}

.metric-box .metric-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
}

.metric-box.reach .metric-val {
    color: var(--primary);
}

.metric-box.engagement .metric-val {
    color: var(--success);
}

/* Empty states */
.empty-results-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    padding: 4rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-results-state h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}

/* --- CAMPAIGN PLANNER PANEL --- */
.campaign-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-header h2 i {
    width: 16px;
    color: var(--success);
}

.badge {
    background: var(--success);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* Empty State */
.campaign-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 2rem 0;
    color: var(--text-dark);
}

.empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.campaign-empty-state p {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.campaign-empty-state span {
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

/* Campaign Items List */
.campaign-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    max-height: 250px;
    overflow-y: auto;
}

.campaign-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.item-name-handle {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 0.75rem;
    font-weight: 700;
}

.item-followers {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.btn-remove-item {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-remove-item:hover {
    color: var(--danger);
}

/* Aggregates Box */
.campaign-aggregates {
    background: rgba(139, 92, 246, 0.05);
    border: 1px dashed rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.aggregate-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.aggregate-row span {
    color: var(--text-muted);
}

.aggregate-row strong {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
}

.campaign-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    color: #fff;
}

/* --- DETAIL DRAWER --- */
.detail-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 9, 19, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.detail-drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.detail-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    height: 100vh;
    background: rgba(12, 16, 32, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    z-index: 101;
    transform: translateX(100%);
    transition: var(--transition-smooth);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.detail-drawer.active {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.btn-close-drawer {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.drawer-scroll-content {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-right: 0.5rem;
}

/* Drawer Profile Header */
.drawer-profile-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.drawer-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-glow);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
}

.drawer-name-handle h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
}

.drawer-name-handle span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.drawer-bio {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Detailed Metrics Grid */
.drawer-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
}

.stat-card .sc-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stat-card .sc-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}

.stat-card.followers .sc-val { color: #fff; }
.stat-card.reach .sc-val { color: var(--primary); }
.stat-card.engagement .sc-val { color: var(--success); }

/* Outreach Plan Panel (Progressive Approach) */
.outreach-container {
    background: rgba(139, 92, 246, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    padding: 1.2rem;
}

.outreach-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
}

.outreach-title i {
    color: #f472b6;
    width: 18px;
}

.outreach-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-card {
    display: flex;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.01);
    border-left: 3px solid var(--text-dark);
    padding: 0.5rem 0.75rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.step-card.active-step {
    border-left-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.step-number {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-card.active-step .step-number {
    background: var(--primary);
    color: #fff;
}

.step-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.step-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.step-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.step-template {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.7rem;
    font-family: monospace;
    color: #e2e8f0;
    margin-top: 0.4rem;
    white-space: pre-wrap;
    user-select: all;
    cursor: copy;
    position: relative;
}

.step-template::after {
    content: 'Cliquer pour copier';
    position: absolute;
    right: 4px;
    bottom: 4px;
    font-size: 0.55rem;
    color: var(--text-dark);
    font-family: var(--font-body);
}

.step-template:active::after {
    content: 'Copié !';
    color: var(--success);
}

/* Recent Topics List */
.topics-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.topics-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.topics-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topic-item i {
    width: 14px;
    color: var(--primary);
}

/* --- LOGIN SCREEN DESIGN --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
    min-height: 100vh;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    z-index: -1;
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.login-header .logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.login-header .logo-icon i {
    width: 24px;
    height: 24px;
}

.login-header h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

.password-input-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.7rem 0.7rem 0.7rem 2.5rem;
    color: #fff;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.password-input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.6rem;
    font-size: 0.75rem;
    color: #fca5a5;
}

.error-message i {
    width: 14px;
    height: 14px;
    color: var(--danger);
    flex-shrink: 0;
}

.login-footer {
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-dark);
    margin-top: 0.5rem;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- MOBILE ACTION BAR & RESPONSIVE DESIGN --- */
.mobile-action-bar {
    display: none;
    background: rgba(12, 16, 32, 0.7);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 45;
}

.btn-mobile-action {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-mobile-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}

.btn-mobile-action i {
    width: 16px;
    height: 16px;
}

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

/* Responsive Rules */
@media (max-width: 1200px) {
    /* Prevent vertical height locking and allow page scroll on mobile */
    .app-container {
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
    }

    /* Make the header scroll away so it does not overlap with the sticky action bar */
    .app-header {
        position: relative !important;
        top: auto !important;
        z-index: 40;
        padding: 1rem;
    }

    /* Sticky Action Bar stays at the very top of viewport when scrolling */
    .mobile-action-bar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 90;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        border-bottom: 1px solid var(--border-color);
    }

    .main-layout {
        grid-template-columns: 1fr;
        padding-bottom: 1rem;
        height: auto !important;
        overflow: visible !important;
    }

    .content-area {
        overflow: visible !important;
        height: auto !important;
    }
    
    /* Turn Filters Sidebar into slide-in drawer */
    .sidebar-filters {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        height: 100vh;
        z-index: 110;
        transform: translateX(-100%);
        transition: var(--transition-smooth);
        border-radius: 0 16px 16px 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
        background: rgba(12, 16, 32, 0.98);
        backdrop-filter: blur(20px);
        border: none;
        border-right: 1px solid var(--border-color);
        padding: 2.5rem 1.5rem;
        overflow-y: auto;
    }
    
    .sidebar-filters.active {
        transform: translateX(0);
    }
    
    /* Turn Campaign Panel into slide-in drawer */
    .campaign-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 320px;
        height: 100vh;
        z-index: 110;
        transform: translateX(100%);
        transition: var(--transition-smooth);
        border-radius: 16px 0 0 16px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
        background: rgba(12, 16, 32, 0.98);
        backdrop-filter: blur(20px);
        border: none;
        border-left: 1px solid var(--border-color);
        padding: 2.5rem 1.5rem;
        overflow-y: auto;
    }
    
    .campaign-panel.active {
        transform: translateX(0);
    }
    
    .btn-close-sidebar-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        color: var(--text-muted);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        cursor: pointer;
        position: absolute;
        top: 1rem;
        right: 1rem;
        transition: var(--transition-smooth);
        z-index: 120;
    }
    
    .btn-close-sidebar-mobile:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    
    .logo-area {
        justify-content: center;
    }
    
    .header-stats {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .stat-bubble {
        align-items: center;
        flex: 1;
        min-width: 80px;
    }
}

@media (max-width: 600px) {
    .search-sort-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .sort-wrapper {
        justify-content: space-between;
    }
}

@media (max-width: 550px) {
    /* Prevent detail drawer from overflowing on small screens */
    .detail-drawer {
        width: 100% !important;
        border-left: none;
        padding: 2.5rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .sidebar-filters, .campaign-panel {
        width: 100%;
        border-radius: 0;
    }
    
    .header-stats {
        gap: 0.5rem;
    }
    
    .stat-bubble .stat-value {
        font-size: 0.95rem;
    }
}

/* --- INDEXER STATS PANEL SECTION --- */
.stats-panel-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.stat-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hourly-chart-container {
    margin-top: 1.25rem;
}

.chart-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: block;
}

.hourly-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 80px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    position: relative;
    padding-top: 15px;
}

.hourly-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    margin: 0 2px;
    position: relative;
}

.hourly-bar {
    width: 100%;
    max-width: 12px;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(139, 92, 246, 0.3) 100%);
    border-radius: 3px 3px 0 0;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 2px;
}

.hourly-bar:hover {
    background: linear-gradient(180deg, #a78bfa 0%, var(--primary) 100%);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.hourly-bar-label {
    font-size: 0.6rem;
    color: var(--text-dark);
    margin-top: 4px;
    transform: scale(0.9);
}

/* Tooltip for hourly bar */
.hourly-bar-col::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px) scale(0.85);
    background: #1e1b4b;
    border: 1px solid var(--primary);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.65rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 10;
}

.hourly-bar-col:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px) scale(1);
}

/* --- DETECTED LINKED NETWORKS STYLES --- */
.drawer-networks {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.networks-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.networks-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.network-tag {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.network-tag:hover {
    transform: translateY(-1px);
}

.network-tag.snapchat {
    border-color: #fef08a;
    color: #fef08a;
    background: rgba(254, 240, 138, 0.05);
}
.network-tag.snapchat:hover {
    background: rgba(254, 240, 138, 0.15);
    box-shadow: 0 0 8px rgba(254, 240, 138, 0.25);
}

.network-tag.tiktok {
    border-color: #00f2fe;
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.05);
}
.network-tag.tiktok:hover {
    background: rgba(0, 242, 254, 0.15);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.25);
}

.network-tag.instagram {
    border-color: #f43f5e;
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.05);
}
.network-tag.instagram:hover {
    background: rgba(244, 63, 94, 0.15);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.25);
}

