.chat-container {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
    min-height: calc(100vh - 200px);
}

.chat-main {
    flex: 3;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-sidebar {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
}

.chat-header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    min-height: 500px;
    max-height: 600px;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.4;
}

.user .message-content {
    background: #3498db;
    color: white;
}

.bot .message-content {
    background: white;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.timestamp {
    font-size: 10px;
    color: #888;
    margin-top: 4px;
}

.chat-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
}

.chat-input button {
    padding: 12px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
}

.quick-btn {
    padding: 8px 15px;
    background: #e9ecef;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    margin: 5px;
    font-size: 12px;
}

.quick-btn:hover {
    background: #3498db;
    color: white;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.status-online {
    background: #27ae60;
    color: white;
}

.status-offline {
    background: #e74c3c;
    color: white;
}

.topic-item {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
}

.topic-item:hover {
    background: #e9ecef;
}

.recommendation-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Recommendation card styles */
.rec-card {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.rec-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.rec-title {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.rec-title i {
    color: #f39c12;
    margin-right: 5px;
}

.rec-background {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    text-align: justify;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.rec-background::-webkit-scrollbar {
    width: 4px;
}

.rec-background::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.rec-background::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.rec-background::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.rec-expand-btn {
    margin-top: 8px;
    font-size: 11px;
    color: #3498db;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.rec-expand-btn:hover {
    text-decoration: underline;
}

.rec-footer {
    margin-top: 8px;
    font-size: 10px;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 6px;
}
.notes {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: 10px;
}
/* style_chat.css - Tambahkan */

/* =========================================================
   TOPIC EVOLUTION STYLES
   ========================================================= */
.topic-evolution-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.topic-evolution-item:hover {
    background: #e9ecef;
    border-left-color: #0d6efd;
}

.topic-evolution-item .topic-name {
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-evolution-item .topic-trend {
    font-size: 0.75rem;
    color: #28a745;
}

.topic-evolution-item .topic-trend.down {
    color: #dc3545;
}

.topic-evolution-item .mini-chart {
    height: 30px;
    margin-top: 4px;
}

.evolution-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.evolution-detail-modal.active {
    display: flex;
}

.evolution-detail-modal .modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.evolution-detail-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.evolution-detail-modal .modal-header h5 {
    margin: 0;
    font-weight: 600;
}

.evolution-detail-modal .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.evolution-detail-modal .close-btn:hover {
    color: #dc3545;
}

.evolution-detail-modal .keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.evolution-detail-modal .keyword-tag {
    background: #e9ecef;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #495057;
}
/* Tambahkan di akhir file */

/* =========================================================
   TOPIC EVOLUTION SIDEBAR
   ========================================================= */
#topicEvolutionList {
    max-height: 300px;
    overflow-y: auto;
}

#topicEvolutionList::-webkit-scrollbar {
    width: 4px;
}

#topicEvolutionList::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

/* =========================================================
   MODAL RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .evolution-detail-modal .modal-content {
        width: 95%;
        padding: 16px;
        max-height: 90vh;
    }
    
    .evolution-detail-modal .modal-header h5 {
        font-size: 1rem;
    }
    
    .topic-evolution-item .topic-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .evolution-detail-modal .modal-content {
        padding: 12px;
        border-radius: 12px;
    }
    
    #topicEvolutionList .topic-evolution-item {
        padding: 6px 10px;
    }
}
/* style_chat.css - Tambahkan */
#topicEvolutionList {
    max-height: 350px;
    overflow-y: auto;
}

#topicEvolutionList::-webkit-scrollbar {
    width: 4px;
}

#topicEvolutionList::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

