 :root {
            --primary: #1e5631; /* Verde escuro principal */
            --primary-light: #4c9566;
            --primary-dark: #164326;
            --secondary: #6c757d;
            --dark: #212529;
            --light: #f8f9fa;
            --white: #ffffff;
        }

        /* ========== TOPBAR VERDE ========== */
        .topbar {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            height: 80px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: fixed;
            top: 0;
            right: 0;
            left: 0;
            z-index: 1030;
            display: flex;
            align-items: center;
            padding: 0 2rem;
            color: var(--white);
        }

        .brand-title {
            color: var(--white) !important;
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }

        .brand-subtitle {
            color: rgba(255,255,255,0.8) !important;
        }

        /* Barra de Pesquisa no Topo Verde */
        .search-container .input-group-text {
            background-color: rgba(255,255,255,0.15);
            border: none;
            color: var(--white);
        }

        .search-input {
            background-color: rgba(255,255,255,0.15) !important;
            color: var(--white) !important;
            border: none !important;
        }

        .search-input::placeholder {
            color: rgba(255,255,255,0.7) !important;
        }

        .search-input:focus {
            background-color: rgba(255,255,255,0.25) !important;
            box-shadow: 0 0 0 2px rgba(255,255,255,0.3) !important;
        }

        /* Ícones no Topo */
        .topbar .btn-link {
            color: var(--white) !important;
            opacity: 0.8;
            transition: all 0.2s;
        }

        .topbar .btn-link:hover {
            opacity: 1;
            transform: translateY(-1px);
        }

        /* Dropdown no Topo */
        .dropdown-menu {
            border: none;
            box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
            border-radius: 0.5rem;
            margin-top: 0.5rem;
        }
        .brand {
            display: flex;
            align-items: center;
            margin-right: 2rem;
        }

        .brand-logo {
            height: 38px;
            margin-right: 12px;
        }

        .brand-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 0;
            letter-spacing: -0.5px;
        }

        .brand-subtitle {
            font-size: 0.75rem;
            color: var(--secondary);
            font-weight: 500;
            opacity: 0.8;
            margin-top: -4px;
        }

        /* ========== SIDEBAR ========== */
        .sidebar {
            width: 280px;
            height: 100vh;
            background: var(--white);
            position: fixed;
            top: 80px;
            left: 0;
            box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
            transition: all 0.3s;
            z-index: 1020;
            overflow-y: auto;
        }

        .sidebar-collapsed {
            left: -280px;
        }

        .sidebar-header {
            padding: 1.5rem 1.5rem 0.5rem;
            margin-bottom: 1rem;
        }

        .sidebar-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-weight: 700;
            color: var(--secondary);
            opacity: 0.6;
        }

        .nav-item {
            position: relative;
            margin-bottom: 0.25rem;
        }

        .nav-link {
            display: flex;
            align-items: center;
            padding: 0.75rem 1.5rem;
            color: var(--dark);
            font-weight: 500;
            border-radius: 0.375rem;
            margin: 0 0.5rem;
            transition: all 0.2s;
        }

        .nav-link:hover, .nav-link.active {
            background-color: rgba(30, 86, 49, 0.1);
            color: var(--primary);
        }

        .nav-link.active {
            font-weight: 600;
        }

        .nav-link i {
            width: 24px;
            text-align: center;
            margin-right: 12px;
            font-size: 1rem;
            opacity: 0.8;
        }

        .nav-link .badge {
            margin-left: auto;
        }

        /* ========== MAIN CONTENT ========== */
        .main-content {
            margin-left: 280px;
            margin-top: 80px;
            padding: 2rem;
            transition: all 0.3s;
        }

        .main-content-expanded {
            margin-left: 0;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .page-title {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--dark);
        }

        .page-subtitle {
            color: var(--secondary);
            font-size: 0.875rem;
        }

        /* ========== CARDS ========== */
        .card {
            border: none;
            border-radius: 0.5rem;
            box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.05);
            margin-bottom: 1.5rem;
            transition: all 0.3s;
        }

        .card:hover {
            box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
            transform: translateY(-2px);
        }

        .card-header {
            background-color: transparent;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            padding: 1.25rem 1.5rem;
            position: relative;
        }

        .card-title {
            font-weight: 600;
            margin-bottom: 0;
            font-size: 1rem;
        }

        .card-body {
            padding: 1.5rem;
        }

        /* ========== METRIC CARDS ========== */
        .metric-card {
            position: relative;
            overflow: hidden;
            border-left: 4px solid;
        }

        .metric-card.primary {
            border-left-color: var(--primary);
        }

        .metric-card.success {
            border-left-color: var(--success);
        }

        .metric-card.warning {
            border-left-color: var(--warning);
        }

        .metric-card.danger {
            border-left-color: var(--danger);
        }

        .metric-value {
            font-size: 1.75rem;
            font-weight: 600;
            margin-bottom: 0.25rem;
        }

        .metric-label {
            font-size: 0.875rem;
            color: var(--secondary);
            margin-bottom: 0.5rem;
        }

        .metric-change {
            display: flex;
            align-items: center;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .metric-change.positive {
            color: var(--success);
        }

        .metric-change.negative {
            color: var(--danger);
        }

        .metric-icon {
            position: absolute;
            right: 1.5rem;
            top: 1.5rem;
            opacity: 0.2;
            font-size: 3rem;
        }

        /* ========== CHARTS ========== */
        .chart-container {
            position: relative;
            height: 300px;
        }

        /* ========== FOOTER ========== */
        .footer {
            background-color: var(--white);
            padding: 1.5rem 2rem;
            text-align: center;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
            position: fixed;
            bottom: 0;
            left: 280px;
            right: 0;
            transition: all 0.3s;
            z-index: 1010;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .footer-expanded {
            left: 0;
        }

        .system-status {
            display: inline-flex;
            align-items: center;
        }

        .status-badge {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 8px;
        }

        .status-online {
            background-color: var(--success);
        }

        /* ========== SEARCH ========== */
        .search-container {
            flex-grow: 1;
            max-width: 500px;
            margin: 0 2rem;
        }

        .search-input {
            background-color: var(--gray-100);
            border: none;
            color: var(--dark);
            border-radius: 0.375rem;
            padding: 0.5rem 1.25rem;
            width: 100%;
            transition: all 0.3s;
            font-size: 0.875rem;
            height: 40px;
        }

        .search-input::placeholder {
            color: var(--secondary);
            opacity: 0.6;
        }

        .search-input:focus {
            background-color: var(--white);
            box-shadow: 0 0 0 2px rgba(30, 86, 49, 0.2);
            outline: none;
        }

        /* ========== USER DROPDOWN ========== */
        .user-dropdown .dropdown-toggle {
            display: flex;
            align-items: center;
            padding: 0;
            background: none;
            border: none;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            margin-left: 1rem;
        }

        /* ========== RESPONSIVE ========== */
        @media (max-width: 992px) {
            .sidebar {
                left: -280px;
            }
            .sidebar-collapsed {
                left: 0;
            }
            .main-content {
                margin-left: 0;
            }
            .footer {
                left: 0;
            }
        }

 /* Adicionar apenas os estilos específicos desta tela abaixo */
        
        /* Badges de Status */
        .badge-pago {
            background-color: rgba(40, 167, 69, 0.1);
            color: var(--success);
        }
        .badge-aberto {
            background-color: rgba(255, 193, 7, 0.1);
            color: var(--warning);
        }
        .badge-inadimplente {
            background-color: rgba(220, 53, 69, 0.1);
            color: var(--danger);
        }

        /* Linhas da tabela */
        .table tr.inadimplente {
            background-color: rgba(220, 53, 69, 0.03);
        }
        .table tr.inadimplente:hover {
            background-color: rgba(220, 53, 69, 0.05) !important;
        }

        /* Estilos para timeline de notificações */
        .timeline {
            position: relative;
            padding-left: 1.5rem;
        }
        .timeline-item {
            position: relative;
            padding-bottom: 1.5rem;
            border-left: 1px solid #dee2e6;
        }
        .timeline-item:last-child {
            padding-bottom: 0;
            border-left: 0;
        }
        .timeline-item::before {
            content: '';
            position: absolute;
            left: -1.5rem;
            top: 0;
            width: 1rem;
            height: 1rem;
            border-radius: 50%;
            background: var(--secondary);
            transform: translateX(-50%);
        }
        .timeline-item.email::before { background: var(--primary); }
        .timeline-item.sms::before { background: #17a2b8; }
        .timeline-item.visualizacao::before { background: var(--success); }
        .timeline-item.negociacao::before { background: var(--warning); }
        .timeline-item.serasa::before { background: var(--danger); }

        /* Modal Específico */
        .modal-negociacao .modal-header {
            background-color: var(--light);
            border-bottom: 1px solid rgba(0,0,0,0.1);
        }


         .badge-pago {
            background-color: rgba(40, 167, 69, 0.1);
            color: var(--success);
        }
        .badge-aberto {
            background-color: rgba(255, 193, 7, 0.1);
            color: var(--warning);
        }
        .badge-inadimplente {
            background-color: rgba(220, 53, 69, 0.1);
            color: var(--danger);
        }

        .table tr.inadimplente {
            background-color: rgba(220, 53, 69, 0.03);
        }

        .invoice-header {
            background-color: #f8f9fa;
            padding: 1.5rem;
            border-bottom: 1px solid #dee2e6;
        }
        
        .payment-methods {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
        }
        .payment-method {
            flex: 1;
            border: 1px solid #dee2e6;
            border-radius: 0.5rem;
            padding: 1rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        .payment-method:hover {
            border-color: var(--primary);
        }
        .payment-method.active {
            border-color: var(--primary);
            background-color: rgba(30, 86, 49, 0.05);
        }


      