/* ==========================================
   ValenteRocha LeadFinder - Style Sheet
   Estilo: Clean Slate Corporate Theme
   Alinhado com ValenteRocha Market Intel
   ========================================== */

:root {
    /* ValenteRocha Corporate Palette */
    --brand-dark: #0f172a; /* Slate 900 */
    --brand-primary: #1e293b; /* Slate 800 */
    --brand-accent: #3b82f6; /* Blue 500 */
    --brand-accent-hover: #2563eb;
    --brand-gold: #d4af37; /* Gold accent */
    
    --bg-color: #f1f5f9; /* Slate 100 */
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', 'Space Mono', 'Courier New', monospace;
    
    /* Status Colors */
    --color-pending: #f59e0b;
    --color-scanning: #3b82f6;
    --color-success: #10b981;
    --color-failed: #64748b;
    --color-error: #ef4444;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden; /* O layout controla a rolagem */
}

/* Scrollbars Customizados (Tema Claro Slate) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 3-Column Layout */
.app-layout {
    display: grid;
    grid-template-columns: 320px minmax(450px, 1fr) 360px;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    background: var(--bg-color);
}

/* ========== LEFT SIDEBAR ========== */
.sidebar-left {
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    height: 100%;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0 12px;
}

.brand-image {
    max-width: 100%;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: var(--bg-color);
    color: var(--brand-dark);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-accent);
}

.sidebar-section {
    margin-top: 16px;
}

.sidebar-section h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 0 16px;
    font-weight: 700;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-pill-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.category-pill-stat:hover {
    background: var(--bg-color);
    color: var(--brand-dark);
}

.badge-stat {
    background: #e2e8f0;
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-stat.enriched {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.nav-item-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item-mini:hover {
    background: var(--bg-color);
    color: var(--brand-dark);
}

.nav-item-mini i {
    width: 14px;
    height: 14px;
}

/* ========== FEED CENTER & HEADER ========== */
.feed-center {
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    overflow: hidden;
    position: relative;
    height: 100%;
}

.feed-header {
    background: var(--surface-color);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.header-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-title-group h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.5px;
}

.sync-status-v2 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sync-status-v2::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.weather-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.weather-mini-icon {
    width: 14px;
    height: 14px;
    color: var(--brand-accent);
}

/* ========== POST CREATOR / UPLOAD ========== */
.post-creator-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.creator-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.upload-trigger-area {
    flex: 1;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.upload-trigger-area:hover, .upload-trigger-area.dragover {
    border-color: var(--brand-accent);
    background: rgba(59, 130, 246, 0.02);
}

.upload-icon {
    font-size: 1.5rem;
    color: var(--brand-accent);
    margin-bottom: 4px;
}

.upload-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.upload-subtext {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.post-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.file-info-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--color-success);
    font-weight: 600;
}

.update-btn-premium {
    background: var(--brand-dark);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.update-btn-premium:hover:not(:disabled) {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.update-btn-premium:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.update-btn-premium .btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ========== FILTERS & SEARCH ========== */
.search-filters-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.search-input-wrapper input {
    width: 100%;
    padding: 8px 16px 8px 36px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    background: var(--surface-color);
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.search-input-wrapper input:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.date-filter-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-select {
    padding: 8px 32px 8px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.date-select:hover {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
    background: rgba(59, 130, 246, 0.04);
}

.date-select:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.date-filter-wrapper::after {
    content: '\25BC';
    font-size: 8px;
    color: var(--text-secondary);
    position: absolute;
    right: 16px;
    pointer-events: none;
}

.date-filter-wrapper:hover::after {
    color: var(--brand-accent);
}

.quick-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Reutilizando .chip do clipping com visual otimizado e premium */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

/* Efeito de Hover Geral */
.chip:hover {
    transform: translateY(-1px) scale(1.02);
    color: var(--brand-dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Hover específico por status para dar dica de cor */
.chip[data-filter="all"]:hover { border-color: var(--brand-accent); background: rgba(59, 130, 246, 0.03); }
.chip[data-filter="pending"]:hover { border-color: var(--color-pending); background: rgba(245, 158, 11, 0.03); }
.chip[data-filter="scanning"]:hover { border-color: var(--color-scanning); background: rgba(59, 130, 246, 0.03); }
.chip[data-filter="success"]:hover { border-color: var(--color-success); background: rgba(16, 185, 129, 0.03); }
.chip[data-filter="failed"]:hover { border-color: var(--color-failed); background: rgba(100, 116, 139, 0.03); }
.chip[data-filter="error"]:hover { border-color: var(--color-error); background: rgba(239, 68, 68, 0.03); }
.chip[data-filter="liked"]:hover { border-color: var(--brand-gold); background: rgba(212, 175, 55, 0.03); }

/* Estados Ativos Premium com Gradientes Dedicados */
.chip.active {
    color: white !important;
    border-color: transparent;
}

.chip.active[data-filter="all"] {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.chip.active[data-filter="pending"] {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.chip.active[data-filter="scanning"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.chip.active[data-filter="success"] {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.chip.active[data-filter="failed"] {
    background: linear-gradient(135deg, #64748b, #475569);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25);
}

.chip.active[data-filter="error"] {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.chip.active[data-filter="liked"] {
    background: linear-gradient(135deg, #f59e0b, #d4af37);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

/* Modificações dos itens internos quando ativos */
.chip.active .dot {
    background: white !important;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.chip.active[data-filter="liked"] i {
    color: white !important;
    fill: white !important;
}

/* Botões Utilitários (Recolher/Expandir) */
.chip-utility {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

.chip-utility:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    color: var(--brand-dark);
    background: #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.chip-utility:active {
    transform: translateY(0);
}

.chip-utility i, .chip-utility svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.chip-utility:hover i, .chip-utility:hover svg {
    transform: scale(1.1);
}

/* Dot Base */
.chip .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.2s ease;
}

.chip .dot.pending { background: var(--color-pending); }
.chip .dot.scanning { background: var(--color-scanning); }
.chip .dot.success { background: var(--color-success); }
.chip .dot.failed { background: var(--color-failed); }
.chip .dot.error { background: var(--color-error); }

/* ========== FEED POSTS ========== */
.feed-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Feed Card (Empresas) */
.feed-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    
    /* Borda lateral por status padrão */
    border-left: 5px solid #cbd5e1;
}

.feed-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.feed-card.collapsed {
    padding: 12px 20px;
    gap: 0;
}

.feed-card.collapsed .card-header {
    align-items: center;
}

.feed-card.collapsed .card-content,
.feed-card.collapsed .card-actions-footer {
    display: none;
}

/* Border States via :has or direct classes */
.feed-card.pending, .feed-card:has(.status-badge.pending) {
    border-left-color: var(--color-pending);
}
.feed-card.scanning, .feed-card:has(.status-badge.scanning) {
    border-left-color: var(--color-scanning);
}
.feed-card.success, .feed-card:has(.status-badge.success) {
    border-left-color: var(--color-success);
}
.feed-card.failed, .feed-card:has(.status-badge.failed) {
    border-left-color: var(--color-failed);
}
.feed-card.error, .feed-card:has(.status-badge.error) {
    border-left-color: var(--color-error);
}

/* Scanner Effect (CRT Scanline) */
.scanner-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.scanner-bar {
    position: absolute;
    width: 100%;
    height: 6px;
    background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.3) 50%, transparent 100%);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
    animation: scan 2.5s linear infinite;
    opacity: 0.7;
}

@keyframes scan {
    0% { top: -6px; }
    100% { top: 100%; }
}

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

.card-author-info {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.company-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.company-avatar.success {
    background: rgba(16, 185, 129, 0.08);
    color: var(--color-success);
    border-color: rgba(16, 185, 129, 0.2);
}

.company-avatar.running {
    background: rgba(59, 130, 246, 0.08);
    color: var(--color-scanning);
    border-color: rgba(59, 130, 246, 0.2);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

.company-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.company-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--brand-dark);
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
}

.contract-date {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-top: 2px;
}

/* Badge de Status */
.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--color-pending);
}

.status-badge.scanning {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--color-scanning);
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.status-badge.failed {
    background: rgba(100, 116, 139, 0.08);
    border-color: rgba(100, 116, 139, 0.2);
    color: var(--color-failed);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

/* Badge de Lead Score */
.score-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.score-badge.score-high {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.score-badge.score-mid {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.score-badge.score-low {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* Badge de Segmento */
.segment-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.segment-badge.servico, .segment-badge.serviço {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--brand-accent);
}

.segment-badge.comercio, .segment-badge.comércio {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

.segment-badge.industria, .segment-badge.indústria {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--color-pending);
}

.segment-badge.ong {
    background: rgba(236, 72, 153, 0.08);
    border-color: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}

.segment-badge.oscip {
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.2);
    color: #14b8a6;
}

.segment-badge.unclassified {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

/* Contract details */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contract-details-box {
    background: #f8fafc;
    border-left: 3px solid var(--brand-accent);
    padding: 10px 14px;
    border-radius: 4px var(--radius-md) var(--radius-md) 4px;
    font-size: 0.85rem;
}

.contract-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.contract-val {
    font-weight: 600;
    color: var(--brand-dark);
    margin-top: 4px;
    line-height: 1.4;
}

.cnpj-row {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cnpj-row span.verified {
    color: var(--color-success);
    font-weight: bold;
}

/* Enriched Contacts Layout */
.enriched-contacts-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.contact-row:hover {
    background: white;
    border-color: var(--brand-accent);
    box-shadow: var(--shadow-sm);
}

.contact-label-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.contact-label-group i, .contact-label-group svg {
    width: 14px;
    height: 14px;
    color: var(--brand-accent);
}

.contact-value {
    font-weight: 600;
    color: var(--brand-dark);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    flex: 1;
    padding: 0 12px;
}

.contact-value.placeholder {
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 400;
    font-size: 0.8rem;
}

.contact-value.loading {
    color: var(--color-pending);
    font-family: var(--font-mono);
    animation: textPulse 1.5s infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.contact-actions {
    display: flex;
    gap: 4px;
}

.btn-contact-action {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-contact-action:hover:not(:disabled) {
    color: var(--brand-dark);
    border-color: #cbd5e1;
    background: var(--bg-color);
}

.btn-contact-action:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-contact-action.success {
    color: var(--color-success) !important;
    border-color: var(--color-success) !important;
    background: rgba(16, 185, 129, 0.05);
}

/* Card Actions Footer */
.card-actions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 4px;
}

.footer-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    text-decoration: none;
}

.footer-btn:hover {
    color: var(--brand-dark);
    background: var(--bg-color);
}

.footer-btn:hover.btn-like, .footer-btn.liked {
    color: var(--brand-gold);
    background: rgba(212, 175, 55, 0.08);
}

.footer-btn:hover.btn-crm, .footer-btn.crm-sent {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.08);
}

.footer-btn:hover.btn-osint {
    color: var(--brand-accent);
    background: rgba(59, 130, 246, 0.08);
}

.footer-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========== RIGHT SIDEBAR (ACCORDIONS) ========== */
.sidebar-right {
    background: var(--surface-color);
    border-left: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-widget {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    background: var(--surface-color);
    user-select: none;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--bg-color);
}

.accordion-header h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.accordion-header h3 i, .accordion-header h3 svg {
    color: var(--brand-accent);
    width: 16px;
    height: 16px;
}

.accordion-icon {
    color: var(--text-secondary);
    transition: transform 0.3s;
    width: 16px;
    height: 16px;
}

.accordion-widget.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    background: var(--surface-color);
}

.accordion-widget.open .accordion-content {
    max-height: 480px;
    padding: 0 16px 16px 16px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
}

/* WIDGET 1: TELEMETRIA */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.stat-box {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.stat-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--brand-dark);
    font-family: var(--font-mono);
}

.stat-num.success { color: var(--color-success); }
.stat-num.pending { color: var(--color-pending); }
.stat-num.failed { color: var(--color-failed); }

.stat-lbl {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 4px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 12px;
    margin-bottom: 4px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-accent);
    transition: width 0.3s ease;
}

/* WIDGET 2: CONSOLE OSINT */
.console-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 8px;
}

.console-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.console-actions button:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.console-body {
    background: #0f172a; /* Console escuro de alta performance */
    color: #38bdf8; /* Texto ciano estilo hacker */
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 12px;
    border-radius: var(--radius-md);
    height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.log-entry {
    line-height: 1.4;
    word-break: break-all;
}

.log-time {
    color: #64748b;
    margin-right: 6px;
}

.log-entry.success { color: #34d399; }
.log-entry.warning { color: #fbbf24; }
.log-entry.error { color: #f87171; }

/* WIDGET 3: CONSULTAS ESTRATEGICAS */
.susep-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.susep-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.susep-link:hover {
    background: white;
    border-color: var(--brand-accent);
    color: var(--brand-accent);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.susep-link i, .susep-link svg {
    color: var(--brand-accent);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ========== MODALS ========== */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.2s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    width: 90%;
    box-shadow: var(--shadow-glass);
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.btn-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-close:hover {
    color: var(--brand-dark);
    background: var(--bg-color);
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.comment-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: var(--font-main);
    color: var(--text-primary);
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.comment-input:focus {
    border-color: var(--brand-accent);
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-cancel {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--bg-color);
    color: var(--brand-dark);
}

.btn-primary {
    background: var(--brand-dark);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #000000;
}

/* ========== TOASTS ========== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-item {
    background: var(--brand-dark);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    font-weight: 600;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-item.success {
    background: var(--color-success);
}

.toast-item.error {
    background: var(--color-failed);
}

.toast-item.warning {
    background: var(--color-pending);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== PLACEHOLDERS ========== */
.empty-feed-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-feed-placeholder i, .empty-feed-placeholder svg {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 16px;
    width: 48px;
    height: 48px;
}

.empty-feed-placeholder h3 {
    font-size: 1.1rem;
    color: var(--brand-dark);
    margin-bottom: 6px;
    font-weight: 700;
}

.empty-feed-placeholder p {
    font-size: 0.85rem;
    max-width: 320px;
    line-height: 1.5;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 260px 1fr;
    }
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-left {
        display: none;
    }
}

/* ==========================================
   MELHORIAS DE LAYOUT E NOVOS ELEMENTOS
   ========================================== */

/* Prevenir compressão do card */
.feed-card {
    min-height: max-content;
}

/* Forçar avatar a não cortar */
.company-avatar {
    margin-left: 0 !important;
}

/* Dot para status de Erro nos Filtros */
.chip .dot.error {
    background: var(--color-error);
}

/* Estilo do Botão Secundário (Exportar CSV) */
.update-btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.update-btn-secondary:hover {
    color: var(--brand-dark);
    border-color: #cbd5e1;
    background: var(--bg-color);
}

.update-btn-secondary .btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Botões Administrativos na Sidebar */
.btn-sidebar-action {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    background: white;
    color: var(--text-primary);
    text-align: left;
    transition: all 0.2s ease;
}

.btn-sidebar-action:hover {
    background: var(--bg-color);
    border-color: #cbd5e1;
}

.btn-sidebar-action i, .btn-sidebar-action svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.btn-sidebar-action.danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--color-failed);
}

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

.btn-sidebar-action.danger i, .btn-sidebar-action.danger svg {
    color: var(--color-error);
}

/* Banner de Filtro de Histórico Ativo */
.active-filter-banner {
    transition: all 0.2s ease;
}

.active-filter-banner.hidden {
    display: none !important;
}

#btn-clear-history-filter:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* Itens de Histórico de Varreduras */
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    gap: 8px;
}

.history-item:hover {
    background: var(--bg-color);
    color: var(--brand-dark);
}

.history-item.active {
    background: rgba(59, 130, 246, 0.08);
    color: var(--brand-accent);
    border-left: 3px solid var(--brand-accent);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.history-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.history-item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.history-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.history-item-badge {
    background: #e2e8f0;
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.history-item.active .history-item-badge {
    background: var(--brand-accent);
    color: white;
}

.btn-history-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-history-delete:hover {
    color: var(--color-error);
    background: rgba(239, 68, 68, 0.1);
}

.btn-history-delete i, .btn-history-delete svg {
    width: 12px;
    height: 12px;
}

/* Custom layout rules for the Native OSINT Profiler Widget */
#widget-osint-profiler.open .accordion-content {
    max-height: 650px;
    overflow-y: hidden;
}

/* Adaptações do Painel de Upload para a Barra Lateral Direita */
.sidebar-right .post-creator-box {
    margin-bottom: 8px;
}

.sidebar-right .post-creator-box .creator-avatar {
    display: none; /* Esconder avatar LF para economizar espaço lateral */
}

.sidebar-right .post-creator-box .creator-row {
    display: block;
}

.sidebar-right .post-creator-box .upload-trigger-area {
    width: 100%;
    padding: 14px 10px;
}

.sidebar-right .post-creator-box .upload-text {
    font-size: 0.8rem;
}

.sidebar-right .post-creator-box .upload-subtext {
    font-size: 0.7rem;
}

.sidebar-right .post-creator-box .post-action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.sidebar-right .post-creator-box #active-file-info {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ==========================================
   Estilos Adicionais - Checkboxes e Barra de Lote
   ========================================== */

/* Checkbox do card de feed */
.feed-card-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--brand-accent);
    border-radius: 4px;
    border: 1.5px solid var(--border-color);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.feed-card.selected {
    background: rgba(59, 130, 246, 0.02);
    border-color: rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.05);
}

/* Switch / Toggle styling */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 22px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--brand-accent);
}
input:focus + .slider {
    box-shadow: 0 0 1px var(--brand-accent);
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* Floating Bulk Actions Bar (Glassmorphic) */
.bulk-actions-bar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 100;
    background: rgba(15, 23, 42, 0.9); /* Slate 900 semi-transparente */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    padding: 10px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    width: max-content;
    max-width: 95%;
}

.bulk-actions-bar.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.bulk-actions-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bulk-actions-count {
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.bulk-actions-count strong {
    color: var(--brand-accent);
    font-weight: 700;
}

.bulk-actions-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

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

.bulk-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bulk-action-btn:hover {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: white;
}

.bulk-action-btn.danger:hover {
    background: var(--color-error);
    border-color: var(--color-error);
}

.bulk-action-btn i, .bulk-action-btn svg {
    width: 12px;
    height: 12px;
}

.bulk-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.bulk-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.bulk-close-btn i, .bulk-close-btn svg {
    width: 14px;
    height: 14px;
}

/* Notes Box Styling inside Card */
.notes-box {
    margin-top: 12px;
    background: rgba(100, 116, 139, 0.05); /* Slate 500 suave */
    border-left: 3px solid #64748b;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
    max-height: 100px;
    overflow-y: auto;
}

.notes-box strong {
    color: var(--brand-dark);
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 700;
}



#history-runs-list { max-height: 195px; overflow-y: auto; padding-right: 4px; }
#history-runs-list::-webkit-scrollbar { width: 4px; }
#history-runs-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Layout Compacto de Cards */
.enriched-contacts-area { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; }
.contact-row { padding: 4px 8px; margin: 0; min-height: 28px; }
.contact-label-group i { width: 14px; height: 14px; }
.contact-label-group span { font-size: 0.75rem; }
.contact-value { font-size: 0.8rem; }
.btn-contact-action { width: 24px; height: 24px; padding: 4px; }
@media (max-width: 600px) { .enriched-contacts-area { grid-template-columns: 1fr; } }
.user-notes-input { width: 100%; min-height: 40px; border: 1px solid var(--border-light); background: rgba(0,0,0,0.02); border-radius: var(--radius-sm); padding: 8px; font-size: 0.8rem; color: var(--text-primary); resize: vertical; margin-top: 8px; font-family: inherit; }
.dark-theme .user-notes-input { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.1); }
.user-notes-input:focus { border-color: var(--color-primary); outline: none; }
.segment-select-inline { background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 2px 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; cursor: pointer; text-align: center; font-family: inherit; margin-left: 4px; }
.segment-select-inline:hover { border-color: rgba(0,0,0,0.1); }
.dark-theme .segment-select-inline:hover { border-color: rgba(255,255,255,0.1); }
.segment-select-inline:focus { outline: none; border-color: var(--color-primary); }

/* Accordion Styles */
.sidebar-section-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; padding: 4px 0; }
.sidebar-section-header:hover h3 { color: var(--color-primary); }
.sidebar-section-header i { transition: transform 0.3s ease; width: 16px; height: 16px; color: var(--text-secondary); }
.sidebar-accordion.closed .sidebar-section-header i { transform: rotate(-90deg); }
.sidebar-accordion.closed .sidebar-accordion-content { display: none; }
.sidebar-accordion-content { margin-top: 8px; }

/* ==========================================
   RESPONSIVIDADE MOBILE E TABLET (MEDIA QUERIES)
   ========================================== */
@media (max-width: 1024px) {
    body {
        height: auto;
        overflow-y: auto;
    }
    
    .app-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .sidebar-left, .feed-center, .sidebar-right {
        width: 100%;
        height: auto;
        overflow: visible;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .feed-center {
        border-bottom: none;
    }

    .feed-container {
        height: auto;
        overflow-y: visible;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .search-filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .segment-filter-wrapper, .date-filter-wrapper, .date-select {
        width: 100%;
    }
    
    .date-select {
        width: 100%;
    }

    .quick-filter-bar-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .quick-filter-bar {
        justify-content: flex-start;
    }

    .feed-utils-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        width: 100%;
    }

    .chip-utility {
        justify-content: center;
        font-size: 0.72rem;
        padding: 6px 8px;
    }

    .bulk-actions-bar {
        width: 95%;
        border-radius: var(--radius-md);
        bottom: 16px;
        padding: 12px;
    }
    
    .bulk-actions-content {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .bulk-actions-divider {
        display: none;
    }
    
    .bulk-actions-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .bulk-action-btn {
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        max-width: 100%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .header-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .weather-mini {
        align-self: flex-start;
    }

    .feed-card {
        padding: 16px;
    }

    .bulk-actions-buttons {
        grid-template-columns: 1fr;
    }
}
