@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #8b5cf6;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --glow-color: rgba(59, 130, 246, 0.2);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Text overrides for light theme */
.text-light, .text-dark { color: var(--text-main) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-dark, .bg-light, .bg-white, .bg-black { background-color: var(--card-bg) !important; }
.bg-dark.bg-opacity-25, .bg-black.bg-opacity-25 { 
    background-color: rgba(255, 255, 255, 0.6) !important; 
    border: 1px solid var(--border-color);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 800;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.nav-link {
    color: var(--text-muted) !important;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Cards (Glassmorphism Tech) */
.card {
    background: var(--card-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color) !important;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 40px var(--glow-color);
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: transparent !important;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    --bs-table-border-color: rgba(0, 0, 0, 0.08); 
}

.table thead th {
    color: #3b82f6 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.03) !important;
    transform: scale(1.002);
}

/* Forms & Inputs */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--text-main) !important;
    border-radius: 10px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3) !important;
    border-color: var(--primary-color) !important;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
    border-radius: 8px;
}
.btn-outline-primary:hover {
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.btn-outline-success {
    border-color: #10b981;
    color: #10b981;
}
.btn-outline-success:hover {
    background-color: #10b981;
    color: #ffffff;
}
.btn-outline-info {
    border-color: #0ea5e9;
    color: #0ea5e9;
}
.btn-outline-info:hover {
    background-color: #0ea5e9;
    color: #ffffff;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
}
.bg-success { background: rgba(16, 185, 129, 0.15) !important; color: #059669 !important; border: 1px solid rgba(16, 185, 129, 0.3); }
.bg-info { background: rgba(14, 165, 233, 0.15) !important; color: #0284c7 !important; border: 1px solid rgba(14, 165, 233, 0.3); }
.bg-secondary { background: rgba(100, 116, 139, 0.15) !important; color: #475569 !important; border: 1px solid rgba(100, 116, 139, 0.3); }
.bg-dark { background: rgba(30, 41, 59, 0.1) !important; color: #0f172a !important; border: 1px solid rgba(30, 41, 59, 0.2); }
.bg-primary { background: rgba(59, 130, 246, 0.15) !important; color: #2563eb !important; border: 1px solid rgba(59, 130, 246, 0.3); }
.bg-warning { background: rgba(245, 158, 11, 0.15) !important; color: #d97706 !important; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================
   KANBAN CRM POR NICHOS
   ========================================= */
.kanban-board-wrapper {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.5rem 0.25rem;
    align-items: flex-start;
    min-height: calc(100vh - 280px);
    -webkit-overflow-scrolling: touch; /* Suave no iOS */
    scrollbar-width: thin;
}

.kanban-column {
    flex: 0 0 350px;
    width: 350px;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 240px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.kanban-column:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.08);
}

.kanban-column-header {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.kanban-column-body {
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-grow: 1;
}

.crm-lead-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 1rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.crm-lead-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color);
}

.crm-lead-card .card-company-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.crm-lead-card .card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.crm-lead-card .status-pill-select {
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.crm-lead-card .action-btn-pill {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.view-toggle-btn.active {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* ==========================================
   ORÁCULO IA - ESTILOS VISUAIS PREMIUM
   ========================================== */
#btnOraculoFlutuante {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#btnOraculoFlutuante:hover {
    transform: translateY(-5px) scale(1.05);
}

.oraculo-fab-glow {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, #a855f7, #ec4899, #3b82f6);
    border-radius: 50px;
    filter: blur(8px);
    opacity: 0.7;
    animation: oraculoPulse 3s infinite;
    z-index: 1;
}

.oraculo-fab-content {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #1e1b4b, #312e81, #0f172a);
    color: #ffffff !important;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(216, 180, 254, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes oraculoPulse {
    0%, 100% { opacity: 0.6; transform: scale(0.98); }
    50% { opacity: 0.95; transform: scale(1.03); }
}

.oraculo-nav-btn {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(99, 102, 241, 0.15)) !important;
    border: 1px solid rgba(168, 85, 247, 0.4) !important;
    border-radius: 20px !important;
    padding: 0.35rem 0.9rem !important;
    color: #d8b4fe !important;
    transition: all 0.2s ease;
}

.oraculo-nav-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(99, 102, 241, 0.3)) !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.oraculo-chip {
    transition: all 0.2s ease;
    background: rgba(30, 41, 59, 0.7) !important;
    color: #cbd5e1 !important;
}

.oraculo-chip:hover {
    background: rgba(168, 85, 247, 0.25) !important;
    border-color: #a855f7 !important;
    color: #ffffff !important;
    transform: translateX(4px);
}

.oraculo-msg-user {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    border-radius: 16px 16px 4px 16px;
    padding: 12px 16px;
    max-width: 85%;
    align-self: flex-end;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    font-size: 0.92rem;
}

.oraculo-msg-model {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
    border-radius: 16px 16px 16px 4px;
    padding: 14px 18px;
    max-width: 95%;
    align-self: flex-start;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 0.92rem;
    line-height: 1.6;
}

.oraculo-msg-model p:last-child {
    margin-bottom: 0;
}

.oraculo-msg-model strong {
    color: #fde047;
}

.oraculo-action-card {
    background: rgba(30, 27, 75, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
}

/* ==========================================
   MOBILE RESPONSIVENESS
   ========================================== */
@media (max-width: 768px) {
    /* Kanban columns - allow them to fit the screen width */
    .kanban-column {
        flex: 0 0 85vw !important;
        width: 85vw !important;
        max-width: 85vw !important;
    }
    
    /* Kanban wrapper - smaller padding on mobile */
    .kanban-board-wrapper {
        padding: 0.25rem 0.25rem 1rem 0.25rem;
        gap: 0.75rem;
    }

    /* Modal Adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }

    /* Banners adjustments */
    .inovador-strip1 {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 10px 5px !important;
    }
    
    .inovador-strip1 > div:nth-child(2) {
        /* Hide divider on mobile */
        display: none !important;
    }

    /* Top banner badges container */
    .inovador-strip1 .d-flex {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Lateral Banner - hide or shrink on small screens */
    #banner-lateral-inovador {
        display: none !important; /* Hide lateral banner to prevent blocking screen */
    }

    /* Oraculo button - smaller and different position */
    #btnOraculoFlutuante {
        bottom: 16px;
        right: 16px;
        transform: scale(0.9);
    }
    
    #btnOraculoFlutuante:hover {
        transform: scale(0.95);
    }

    /* Footer adjustments */
    footer .row {
        text-align: center;
    }
    
    footer .d-flex {
        justify-content: center;
    }
    
    footer .col-lg-4:not(:last-child) {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    /* Even smaller adjustments for tiny phones */
    .kanban-column {
        flex: 0 0 92vw !important;
        width: 92vw !important;
        max-width: 92vw !important;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}


