:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --surface: #ffffff;
    --bg: #f1f5f9;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary-rgb: 99, 102, 241;
    --surface-rgb: 255, 255, 255;
    --success: #10b981;
    --danger: #ef4444;    /* Red - GUT 100+ */
    --warning: #f59e0b;   /* Amber - GUT 50+ */
    --info: #eab308;      /* Yellow - GUT 20+ */
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
}

[data-bs-theme="dark"] {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --surface: #1e293b;
    --primary-rgb: 129, 140, 248;
    --surface-rgb: 30, 41, 59;
    --bg: #0f172a;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --card-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --glass-bg: rgba(30, 41, 59, 0.8);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.bg-surface {
    background-color: var(--surface) !important;
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--surface);
    border-radius: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.card-dashboard {
    border: none;
    background: linear-gradient(145deg, var(--surface), rgba(var(--primary-rgb), 0.02));
    position: relative;
    overflow: hidden;
}

/* Accent Bars for Dashboard Stats */
.col-md:nth-child(1) .card-dashboard { border-top: 4px solid #10b981; } /* Sucesso */
.col-md:nth-child(2) .card-dashboard { border-top: 4px solid #ef4444; } /* Urgente */
.col-md:nth-child(3) .card-dashboard { border-top: 4px solid #0ea5e9; } /* Info */
.col-md:nth-child(4) .card-dashboard { border-top: 4px solid #25d366; } /* WhatsApp */

.icon-box {
    width: 52px;
    height: 52px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-dashboard:hover .icon-box {
    transform: scale(1.15) rotate(-8deg);
    filter: brightness(1.1);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* FullCalendar Customization */
#calendar {
    min-height: 500px;
}

.fc {
    --fc-border-color: var(--border);
    --fc-button-bg-color: var(--primary);
    --fc-button-border-color: var(--primary);
    --fc-button-hover-bg-color: var(--primary-hover);
    --fc-button-active-bg-color: var(--primary-hover);
}

.fc .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: var(--border);
}

/* Lists */
.list-group-item {
    background-color: transparent;
    border-color: var(--border);
    padding: 1rem;
    color: var(--text);
    transition: background-color 0.2s;
}

.list-group-item:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
}

.bg-indigo-purple {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
    color: white !important;
}

.circle {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.circle:hover {
    transform: scale(1.1);
}

.max-h-400 {
    max-height: 400px;
}

/* GUT Badges */
.gut-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Theme Toggle Button */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text);
}

/* Premium Layout Overhaul */
.navbar {
    background: rgba(var(--surface-rgb), 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.search-box input {
    background-color: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 100px !important;
    padding: 0.6rem 1.5rem 0.6rem 3rem !important;
    transition: all 0.3s ease;
}

.search-box input:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
    border-color: var(--primary) !important;
    width: 105%;
}

/* Modern Tables */
.custom-hub-table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.custom-hub-table thead th {
    background: transparent;
    border: none;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 15px 20px;
}

.custom-hub-table tbody tr {
    background-color: var(--surface);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border-radius: 1rem;
    transition: all 0.2s ease;
}

.custom-hub-table tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.custom-hub-table td {
    border: none;
    padding: 18px 20px;
}

.custom-hub-table td:first-child { border-radius: 12px 0 0 12px; }
.custom-hub-table td:last-child { border-radius: 0 12px 12px 0; }

/* Global Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Restoring Missing UI Components */
.interest-stars {
    color: #fbbf24;
    font-size: 0.8rem;
    cursor: pointer;
}

.interest-star.active { color: #fbbf24; }
.interest-star.inactive { color: var(--border); }
.interest-star:hover {
    transform: scale(1.2);
    transition: transform 0.1s ease;
}

.badge-date {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.5rem;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.funnel-dots {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.funnel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--border);
}

.funnel-dot.active { background-color: var(--primary); }

.stage-badge-interactive { cursor: pointer; transition: filter 0.2s; }
.stage-badge-interactive:hover { filter: brightness(1.1); }

.max-h-400 {
    max-height: 400px;
    overflow-y: auto;
}

/* Funnel Stage Badges - Modern Colors */
.stage-Novo { background-color: #94a3b8 !important; color: white !important; }
.stage-Contatado { background-color: #0ea5e9 !important; color: white !important; }
.stage-Proposta { background-color: #f59e0b !important; color: white !important; }
.stage-Negociação { background-color: #8b5cf6 !important; color: white !important; }
.stage-Fechado { background-color: #10b981 !important; color: white !important; }

/* Enhanced Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 100px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}/* Daily Focus Panel */
.daily-focus-card {
    border-left: 4px solid var(--primary);
    background: linear-gradient(to right, rgba(99, 102, 241, 0.05), transparent);
}

.btn-done-big {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--border);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-done-big:hover {
    border-color: #10b981;
    color: #10b981;
    transform: scale(1.15);
}

/* Mobile Table Optimization */
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--border);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.custom-hub-table {
    min-width: 1000px; /* Forces horizontal scroll room on mobile */
    border-collapse: separate;
    border-spacing: 0;
}

/* Sticky Column Logic */
.custom-hub-table thead th:first-child,
.custom-hub-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: inherit;
    box-shadow: 4px 0 8px -4px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .custom-hub-table thead th:first-child,
[data-bs-theme="dark"] .custom-hub-table tbody td:first-child {
    box-shadow: 4px 0 12px -4px rgba(0,0,0,0.5);
    background-color: var(--surface);
}

.custom-hub-table thead th {
    position: sticky;
    top: 0;
    z-index: 11;
    background-color: var(--surface);
}

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

.hub-tab {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-tab.active {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.search-box input {
    background-color: var(--bg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.search-box input:focus {
    background-color: var(--surface);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

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

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: bold;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Funnel Progress */
.funnel-stage {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.stage-Novo { background-color: #cbd5e1; color: #1e293b; }
.stage-Contatado { background-color: #93c5fd; color: #1e3a8a; }
.stage-Proposta { background-color: #fde047; color: #713f12; }
.stage-Negociação { background-color: #c084fc; color: #4c1d95; }
.stage-Fechado { background-color: #4ade80; color: #064e3b; }

.funnel-dots {
    display: flex;
    gap: 3px;
    margin-top: 4px;
}

.funnel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--border);
}

.funnel-dot.active {
    background-color: var(--primary);
}

.btn-seed {
    background-color: transparent;
    border: 1px dashed var(--text-muted);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-seed:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Floating Action Button */
.fa-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    z-index: 1000;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Campaign Bar - Flutuante e Moderna no Rodapé */
.campaign-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 750px;
    height: 75px;
    background: rgba(15, 23, 42, 0.85); /* Tom escuro profundo */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px; /* Estilo pílula moderna */
    z-index: 2000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0 10px;
}

.campaign-bar.d-none {
    display: none !important;
    transform: translateX(-50%) translateY(100px); /* Animação ao sumir */
    opacity: 0;
}

.campaign-bar .selection-count {
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 20px;
    margin-right: 20px;
    height: 40px;
}

.campaign-bar .form-control-sm {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.campaign-bar .form-control-sm:focus {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: var(--primary) !important;
}

@media (max-width: 600px) {
    .campaign-bar {
        height: auto;
        padding: 15px;
        flex-direction: column;
        border-radius: 20px;
        bottom: 10px;
        gap: 10px;
    }
    .campaign-bar .selection-count {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 10px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Floating Campaign Resume Button - Premium Pill */
#btnResumeCampaign {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 2500 !important;
    padding: 12px 25px !important;
    font-weight: 600 !important;
    font-family: 'Outfit', sans-serif !important;
    color: white !important;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none !important;
    border-radius: 100px !important;
    box-shadow: 0 10px 25px -5px rgba(34, 197, 94, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    animation: pulse-green-glow 2s infinite !important;
    display: flex;
    align-items: center !important;
    gap: 8px;
}

#btnResumeCampaign:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 15px 30px -5px rgba(34, 197, 94, 0.6) !important;
    filter: brightness(1.1) !important;
}

@keyframes pulse-green-glow {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* =========================================
   CENTRAL DE ARQUIVOS - PREMIUM UI
   ========================================= */
.drag-drop-zone {
    border: 2px dashed rgba(var(--primary-rgb), 0.5);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(var(--primary-rgb), 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drag-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    transform: scale(1.02);
}

.drag-drop-zone i.upload-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.file-icon {
    font-size: 1.8rem;
    color: var(--primary);
}

.file-row {
    transition: background 0.2s ease;
}

.file-row:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.progress-bar-animated {
    transition: width 0.3s ease;
}

.file-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

/* Fix for DataTables pagination jumps */
.dataTables_wrapper .row:nth-child(2) {
    min-height: 450px;
}
.situacao-select {
    cursor: pointer;
    font-weight: 600;
}

