/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-primary {
    background: #667eea;
}

.btn-success {
    background: #28a745;
}

.btn-danger {
    background: #dc3545;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.card-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:invalid {
    border-color: #ef4444;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    text-transform: capitalize;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fecaca;
    color: #991b1b;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #22c55e;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #ef4444;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #f59e0b;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #3b82f6;
}

/* Grid System */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation */
.nav-tabs {
    display: flex;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.nav-tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #6b7280;
}

.nav-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-tab:hover:not(.active) {
    background: #e5e7eb;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .grid {
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .card {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print Styles */
@media print {
    .btn,
    .nav-tabs,
    .alert {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* BOTÕES CLICÁVEIS NAS MENSAGENS DA IA */
.service-click-btn {
    background: linear-gradient(135deg, #25d366 0%, #20c55a 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin: 0 5px;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(37, 211, 102, 0.3);
}

.service-click-btn:hover {
    background: linear-gradient(135deg, #20c55a 0%, #1ea952 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.4);
}

.service-click-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3);
}

.click-hint {
    font-size: 11px;
    color: #25d366;
    font-style: italic;
    margin: 5px 0;
    text-align: center;
    opacity: 0.8;
}

.message.assistant .click-hint {
    margin-top: 8px;
    padding: 5px;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 10px;
    border: 1px dashed #25d366;
}

/* Animação de pulse para chamar atenção */
.service-click-btn {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 2px 5px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 2px 5px rgba(37, 211, 102, 0.6); }
    100% { box-shadow: 0 2px 5px rgba(37, 211, 102, 0.3); }
}

/* Responsivo */
@media (max-width: 768px) {
    .service-click-btn {
        display: block;
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    
    .click-hint {
        font-size: 10px;
    }
}