/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* Cores do WhatsApp */
:root {
    --whatsapp-green: #25D366;
    --whatsapp-green-dark: #128C7E;
    --whatsapp-green-light: #DCF8C6;
    --whatsapp-blue: #34B7F1;
    --whatsapp-gray: #ECE5DD;
    --whatsapp-dark-gray: #4A4A4A;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #e0e0e0;
    --text-dark: #333333;
    --text-light: #666666;
    --danger: #dc3545;
    --warning: #ffc107;
    --success: #28a745;
}

/* Layout Principal */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(135deg, var(--whatsapp-green-dark), var(--whatsapp-green));
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.logo h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: white;
}

.nav-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Conteúdo Principal */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    background-color: var(--light-gray);
}

.header {
    background: var(--white);
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    margin-right: 15px;
    cursor: pointer;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 1.2rem;
    color: var(--text-light);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--whatsapp-green);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Conteúdo das Páginas */
.page-content {
    padding: 30px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
}

/* Botões */
.btn-primary {
    background: var(--whatsapp-green);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--whatsapp-green-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-whatsapp {
    background: var(--whatsapp-green);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: var(--whatsapp-green-dark);
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--light-gray);
    color: var(--text-dark);
}

.btn-icon.delete:hover {
    background: var(--danger);
    color: white;
}

.btn-icon.whatsapp:hover {
    background: var(--whatsapp-green);
    color: white;
}

/* Cards de Estatísticas Aprimorados */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Ícones específicos por tipo */
.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.stat-icon.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Seção de Gráficos */
/* Seção de Gráficos Aprimorada */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.chart-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 450px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.chart-card:hover::before {
    opacity: 1;
}

.chart-card h3 {
    margin-bottom: 24px;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.chart-container {
    height: 360px;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chart-container canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
}

/* Atividades Recentes Aprimoradas */
.recent-activity {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recent-activity:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.recent-activity h3 {
    margin-bottom: 24px;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-activity h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    border-radius: 2px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.activity-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.activity-item:hover::before {
    transform: scaleY(1);
}

.activity-item i {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Ícones coloridos por tipo de atividade */
.activity-item:nth-child(1) i {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.activity-item:nth-child(2) i {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.activity-item:nth-child(3) i {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

.activity-item:hover i {
    transform: scale(1.1);
}

.activity-item span {
    flex: 1;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.4;
}

.activity-item small {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

/* Seção de Busca */
.search-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--white);
}

.search-box input:focus {
    outline: none;
    border-color: var(--whatsapp-green);
}

.filters select {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Tabelas */
.table-container {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--light-gray);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background: var(--light-gray);
}

/* Status Tags */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.active {
    background: var(--whatsapp-green-light);
    color: var(--whatsapp-green-dark);
}

.status.pending {
    background: #fff3cd;
    color: #856404;
}

.status.paid {
    background: #d4edda;
    color: #155724;
}

/* WhatsApp Stats */
.whatsapp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Templates de Mensagem */
.message-templates {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-templates h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.template-card {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--whatsapp-green);
}

.template-card h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.template-card p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 5px;
}

.modal-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--whatsapp-green);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Dashboard Widgets Aprimorados */
.dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.widget-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f093fb, #f5576c);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.widget-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.widget-card:hover::before {
    opacity: 1;
}

.widget-card h3 {
    margin-bottom: 24px;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-card h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 2px;
}

/* Financial Summary */
.financial-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.summary-item .value {
    font-weight: 600;
    font-size: 1rem;
}

.summary-item .value.pending {
    color: var(--warning);
}

.summary-item .value.success {
    color: var(--success);
}

.summary-item .value.info {
    color: var(--whatsapp-blue);
}

/* Quick Actions Aprimoradas */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.action-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.action-btn:hover::before {
    transform: scaleY(1);
}

.action-btn i {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.action-btn:nth-child(1) i {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.action-btn:nth-child(2) i {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.action-btn:nth-child(3) i {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.action-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

.action-btn span {
    color: var(--text-dark);
    font-weight: 500;
    flex: 1;
}

/* Página de Relatórios Reorganizada */
.reports-header {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.reports-title h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.reports-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.reports-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.period-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.period-selector label {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.period-selector select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 120px;
}

.btn-export {
    background: var(--whatsapp-green);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-export:hover {
    background: var(--whatsapp-green-dark);
    transform: translateY(-1px);
}

/* Resumo Executivo */
.executive-overview {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.executive-overview h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.executive-overview h3::before {
    content: '📈';
    font-size: 1.2rem;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.overview-card {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--whatsapp-green);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
}

.overview-card.highlight {
    background: linear-gradient(135deg, var(--whatsapp-green-light), #f8fff8);
    border-left-color: var(--whatsapp-green-dark);
}

.overview-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: var(--whatsapp-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.overview-content h4 {
    margin: 0 0 5px 0;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
}

.overview-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}

.overview-trend {
    font-size: 0.8rem;
    font-weight: 500;
}

.overview-trend.positive {
    color: var(--success);
}

.overview-trend.negative {
    color: var(--danger);
}

.overview-trend.neutral {
    color: var(--text-light);
}

/* KPIs Section */
.kpi-section {
    margin-bottom: 30px;
}

.kpi-section h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.kpi-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.kpi-icon.revenue {
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
}

.kpi-icon.conversion {
    background: linear-gradient(135deg, var(--whatsapp-blue), #1e88e5);
}

.kpi-icon.time {
    background: linear-gradient(135deg, var(--warning), #f57c00);
}

.kpi-icon.growth {
    background: linear-gradient(135deg, var(--success), #2e7d32);
}

.kpi-content h4 {
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.kpi-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.kpi-change.positive {
    color: var(--success);
}

.kpi-change.negative {
    color: var(--danger);
}

/* Reports Charts */
.reports-charts {
    margin-bottom: 30px;
}

.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-row:last-child {
    margin-bottom: 0;
}

.report-chart-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 380px;
}

.report-chart-card.full-width {
    grid-column: 1 / -1;
}

.report-chart-card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* Reports Tables */
.reports-tables {
    margin-bottom: 30px;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.report-table-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-table-card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.report-table th {
    background: var(--light-gray);
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.report-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.report-table tr:hover {
    background: var(--light-gray);
}

/* Executive Summary */
.executive-summary {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.executive-summary h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.summary-card {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--whatsapp-green);
}

.summary-card h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 1rem;
}

.summary-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Estilos da Página WhatsApp */
.whatsapp-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.whatsapp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.whatsapp-stats-grid .stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid;
}

.whatsapp-stats-grid .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.whatsapp-stats-grid .stat-card.primary {
    border-left-color: #25D366;
}

.whatsapp-stats-grid .stat-card.success {
    border-left-color: #28a745;
}

.whatsapp-stats-grid .stat-card.info {
    border-left-color: #17a2b8;
}

.whatsapp-stats-grid .stat-card.warning {
    border-left-color: #ffc107;
}

.whatsapp-stats-grid .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: #25D366;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.stat-change.positive {
    color: #28a745;
}

.whatsapp-main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.whatsapp-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.section-header h3 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 0.9rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

.template-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.template-header h4 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.template-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.template-tag.urgent {
    background: #dc3545;
    color: white;
}

.template-tag.friendly {
    background: #17a2b8;
    color: white;
}

.template-tag.success {
    background: #28a745;
    color: white;
}

.template-tag.promo {
    background: #ffc107;
    color: #333;
}

.template-preview {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid #25D366;
}

.template-preview p {
    margin: 0;
    color: #333;
    line-height: 1.5;
    font-size: 0.9rem;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.messages-history {
    padding: 1.5rem;
}

.message-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.message-item:hover {
    background: #f8f9fa;
}

.message-item:last-child {
    border-bottom: none;
}

.message-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.client-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.message-details {
    flex: 1;
}

.client-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.message-preview {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.message-time {
    color: #999;
    font-size: 0.8rem;
}

.message-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: column;
    text-align: center;
}

.message-status i {
    font-size: 1.2rem;
}

.message-status i.read {
    color: #25D366;
}

.message-status i.delivered {
    color: #666;
}

.message-status i.reply {
    color: #17a2b8;
}

.status-text {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.message-item.sent {
    border-left: 3px solid #25D366;
}

.message-item.received {
    border-left: 3px solid #17a2b8;
}

.btn-outline {
    background: transparent;
    border: 2px solid #25D366;
    color: #25D366;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: #25D366;
    color: white;
}

/* Estilos da Página de Assinatura */
.subscription-header {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.subscription-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.subscription-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.subscription-status.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
    animation: pulse-active 2s infinite;
}

.subscription-status.active:hover {
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.5);
}

.subscription-status.active i {
    font-size: 1.3rem;
    animation: check-bounce 1.5s ease-in-out infinite;
}

@keyframes pulse-active {
    0% {
        box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(40, 167, 69, 0.6);
    }
    100% {
        box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
    }
}

@keyframes check-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.current-plan-section {
    margin-bottom: 2rem;
}

.plan-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.plan-card.current {
    border-color: #FFD700;
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.2);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.plan-info h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.5rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.plan-price .currency {
    font-size: 1rem;
    color: #666;
}

.plan-price .amount {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.plan-price .period {
    font-size: 1rem;
    color: #666;
}

.plan-badge {
    background: #FFD700;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-badge.popular {
    background: #ff6b35;
    color: white;
}

.plan-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: #666;
    font-weight: 500;
}

.detail-row .value {
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status.active {
    color: #28a745;
}

.status.active i {
    color: #28a745;
}

.plan-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.usage-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.usage-section h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.usage-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #25D366;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.usage-header h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

.usage-count {
    font-weight: bold;
    color: #666;
    font-size: 0.9rem;
}

.usage-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, #25D366 0%, #128C7E 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-percentage {
    font-size: 0.8rem;
    color: #666;
}

.plans-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.plans-section .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plans-section .section-header h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.plans-section .section-header p {
    margin: 0;
    color: #666;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.plan-card.basic {
    border-color: #6c757d;
}

.plan-card.premium {
    border-color: #ff6b35;
    transform: scale(1.05);
    position: relative;
}

.plan-card.enterprise {
    border-color: #6f42c1;
}

.plan-features {
    margin-bottom: 1.5rem;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #333;
}

.plan-features i {
    color: #28a745;
    font-size: 0.9rem;
}

.plan-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.billing-history-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.billing-table {
    overflow-x: auto;
}

.billing-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.billing-table th,
.billing-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.billing-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.billing-table .status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.billing-table .status.paid {
    background: #d4edda;
    color: #155724;
}

.btn-sm {
    padding: 0.5rem;
    border: none;
    background: #f8f9fa;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    background: #25D366;
    color: white;
}

.account-actions-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.account-actions-section h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.action-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #f8f9fa;
    color: #666;
}

.action-content {
    flex: 1;
}

.action-content h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.action-content p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.btn-warning {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #c82333;
}

/* Estilos da Página de Configurações */
.config-header {
    background: linear-gradient(135deg, #6f42c1 0%, #495057 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(111, 66, 193, 0.3);
}

.config-section {
    background: white;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.config-section .section-header {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.config-section .section-header h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

.config-section .section-header p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.config-form {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.form-group input[readonly] {
    background: #f8f9fa;
    color: #666;
}

.form-help {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    margin: 0 0 1rem 0;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.client-type-fields {
    margin-bottom: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    margin-top: 1.5rem;
}

.api-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.api-warning i {
    color: #856404;
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

.api-warning div {
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.4;
}

.input-with-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-toggle input {
    flex: 1;
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #25D366;
}

.api-test-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.test-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.test-result {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 200px;
}

.test-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.test-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.test-result.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.checkbox-group:hover {
    background: #f8f9fa;
    border-color: #25D366;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #25D366;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.config-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Estilos da Página de Clientes */
.clients-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: auto;
}

.clients-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: #6c757d;
}

.stat-icon.active { background: #25D366; }
.stat-icon.inactive { background: #dc3545; }
.stat-icon.new { background: #007bff; }

.stat-info h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.stat-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.clients-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box-advanced {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-advanced i {
    position: absolute;
    left: 1rem;
    color: #6c757d;
    z-index: 1;
}

.search-box-advanced input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-box-advanced input:focus {
    border-color: #25D366;
    outline: none;
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    min-width: 150px;
}

.clients-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.clients-table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clients-table-header h3 {
    margin: 0;
    color: #2c3e50;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    align-items: center;
}

.table-container.enhanced {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}

.clients-table {
    width: 100%;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.client-avatar.company {
    background: #007bff;
}

.client-details strong {
    display: block;
    color: #2c3e50;
    font-size: 1rem;
}

.client-details small {
    color: #6c757d;
    font-size: 0.85rem;
}

.contact-info div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-info i {
    width: 16px;
    color: #6c757d;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.type-badge.pessoa-fisica {
    background: #e3f2fd;
    color: #1976d2;
}

.type-badge.pessoa-juridica {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-badge i {
    font-size: 0.6rem;
}

.date-info strong {
    display: block;
    color: #2c3e50;
    font-size: 0.9rem;
}

.date-info small {
    color: #6c757d;
    font-size: 0.8rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-action.view {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-action.edit {
    background: #fff3e0;
    color: #f57c00;
}

.btn-action.whatsapp {
    background: #e8f5e8;
    color: #25D366;
}

.btn-action.activate {
    background: #e8f5e8;
    color: #28a745;
}

.btn-action.delete {
    background: #ffebee;
    color: #d32f2f;
}

.btn-action:hover {
    transform: scale(1.1);
}

.bulk-actions {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bulk-info {
    font-weight: 500;
    color: #495057;
}

.bulk-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-bulk {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: #6c757d;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.btn-bulk:hover {
    background: #5a6268;
}

.btn-bulk.danger {
    background: #dc3545;
}

.btn-bulk.danger:hover {
    background: #c82333;
}

.pagination {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-page {
    width: 36px;
    height: 36px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-page:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #25D366;
}

.btn-page.active {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Estilos da Página de Cobranças */
.billing-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.billing-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.billing-stats .stat-icon.total { background: #6c757d; }
.billing-stats .stat-icon.pending { background: #ffc107; }
.billing-stats .stat-icon.paid { background: #28a745; }
.billing-stats .stat-icon.overdue { background: #dc3545; }

.billing-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.billing-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.billing-table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.billing-table-header h3 {
    margin: 0;
    color: #2c3e50;
}

.billing-table {
    width: 100%;
}

.billing-description strong {
    display: block;
    color: #2c3e50;
    font-size: 1rem;
}

.billing-description small {
    color: #6c757d;
    font-size: 0.85rem;
}

.billing-value {
    text-align: right;
}

.billing-value strong {
    display: block;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.billing-value.overdue strong {
    color: #dc3545;
}

.billing-value small {
    color: #dc3545;
    font-size: 0.8rem;
    font-style: italic;
}

.due-date {
    text-align: center;
}

.due-date strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
}

.due-date small {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.due-date.pending {
    color: #ffc107;
}

.due-date.paid {
    color: #28a745;
}

.due-date.overdue {
    color: #dc3545;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.paid {
    background: #d4edda;
    color: #155724;
}

.status-badge.overdue {
    background: #f8d7da;
    color: #721c24;
}

.payment-info {
    text-align: center;
}

.payment-info small {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
}

.payment-date {
    color: #28a745 !important;
    font-weight: 500;
}

.btn-action.paid {
    background: #d4edda;
    color: #28a745;
}

.btn-action.receipt {
    background: #e2e3e5;
    color: #495057;
}

.btn-action.duplicate {
    background: #cce5ff;
    color: #004085;
}

.btn-action.negotiate {
    background: #fff3e0;
    color: #e65100;
}

.btn-action.urgent {
    background: #ffebee;
    color: #c62828;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Header dos Relatórios */
.reports-header {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.reports-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.reports-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, 50%);
}

.reports-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.reports-header .header-info {
    flex: 1;
}

.reports-header .header-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



.reports-header .header-info p {
    margin: 0;
    opacity: 0.95;
    font-size: 1.1rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.reports-header .header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    justify-self: flex-end;
}

.reports-header .header-actions select {
    padding: 0.75rem 1.25rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.reports-header .header-actions select:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.reports-header .header-actions select option {
    background: #2c3e50;
    color: white;
    padding: 0.5rem;
}

.reports-header .header-actions .btn-secondary {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reports-header .header-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.reports-header .header-actions .btn-primary {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.reports-header .header-actions .btn-primary:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Estilos do Painel de Análises Avançado */
.analytics-dashboard {
    margin-bottom: 2rem;
}

.dashboard-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.tab-btn.active {
    background: #f8f9fa;
    color: #25D366;
    border-bottom-color: #25D366;
}

.tab-content {
    margin-top: 2rem;
}

/* Métricas Financeiras */
.financial-metrics,
.operational-metrics,
.client-metrics,
.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.metric-icon.revenue { background: #28a745; }
.metric-icon.profit { background: #17a2b8; }
.metric-icon.pending { background: #ffc107; }
.metric-icon.overdue { background: #dc3545; }
.metric-icon.efficiency { background: #6f42c1; }
.metric-icon.automation { background: #fd7e14; }
.metric-icon.response { background: #20c997; }
.metric-icon.time { background: #6c757d; }
.metric-icon.total { background: #007bff; }
.metric-icon.active { background: #25D366; }
.metric-icon.retention { background: #e83e8c; }
.metric-icon.ltv { background: #6f42c1; }
.metric-icon.conversion { background: #17a2b8; }
.metric-icon.growth { background: #28a745; }
.metric-icon.ticket { background: #fd7e14; }
.metric-icon.satisfaction { background: #ffc107; }

.metric-info h4 {
    margin: 0 0 0.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.metric-value {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.metric-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.metric-change.positive {
    color: #28a745;
}

.metric-change.negative {
    color: #dc3545;
}

.metric-change.neutral {
    color: #6c757d;
}

/* Gráficos */
.financial-charts,
.operational-charts,
.performance-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-card h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* Segmentação de Clientes */
.client-segmentation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.segment-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid;
}

.segment-card.premium {
    border-left-color: #ffc107;
}

.segment-card.regular {
    border-left-color: #17a2b8;
}

.segment-card.new {
    border-left-color: #28a745;
}

.segment-card h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.segment-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .table-container {
        overflow-x: auto;
        grid-template-columns: 1fr;
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .chart-row {
        grid-template-columns: 1fr;
    }

    .table-row {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .report-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 15px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

/* Remove o sublinhado de todos os links */
a {
    text-decoration: none;
}

/* Opcional: garante que mesmo no hover ou visitado continue sem sublinhado */
a:hover,
a:visited,
a:active {
    text-decoration: none;
}

.subscription-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}
