:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --accent: #10B981;
    --accent-light: #ECFDF5;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #0F172A;
    --gray-bg: #F8FAFC;
    --gray-border: #E2E8F0;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --whatsapp: #25D366;
    --whatsapp-dark: #128C7E;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--gray-bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

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

.sidebar {
    width: 260px;
    background: #0f172a;
    color: #f1f5f9;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1e293b;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-badge {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    font-weight: 800;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    padding: 0.5rem 0.75rem 0.25rem;
    font-weight: 700;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.nav-item-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-item-link.active {
    color: #ffffff;
    background: #4f46e5;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--gray-border);
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.content-body {
    padding: 1.75rem;
    flex: 1;
}

/* Metric Cards */
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--gray-border);
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-val {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Cards & Containers */
.custom-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.card-header-clean {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Buttons */
.btn-whatsapp {
    background-color: var(--whatsapp);
    color: white;
    font-weight: 600;
    border: none;
    transition: all 0.2s ease;
}

.btn-whatsapp:hover {
    background-color: var(--whatsapp-dark);
    color: white;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    color: white;
}

/* Prospecting / Scraper cards */
.prospect-card {
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    background: #ffffff;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.prospect-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.rating-stars {
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Pipeline Badges */
.badge-stage-nuevo { background-color: #E2E8F0; color: #334155; }
.badge-stage-contactado { background-color: #DBEAFE; color: #1E40AF; }
.badge-stage-demoagendada { background-color: #FEF3C7; color: #92400E; }
.badge-stage-ennegociacion { background-color: #EDE9FE; color: #5B21B6; }
.badge-stage-cerrado { background-color: #D1FAE5; color: #065F46; }
.badge-stage-descartado { background-color: #FEE2E2; color: #991B1B; }

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        display: none;
    }
}
