     
/* ===== Topic Header ===== */
.topic-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    background-color: white;
  }
  
  .topic-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    cursor: pointer;
  }
  
  .topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-dark);
  }
  
  .topic-meta i {
    margin-right: 0.3rem;
  }
  
  .topic-status {
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
  }
  
  .topic-status.closed {
    background-color: #ffe8e8;
    color: #dc3545;
  }
  
  .topic-status.solved {
    background-color: #e8f5e9;
    color: var(--success-color);
  }
  
  /* ===== Messages Area (WhatsApp Style) ===== */
  .messages-container {
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    background-color: var(--whatsapp-light);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  }
  
  /* ===== Message Styles ===== */
  .message {
    margin-bottom: 8px;
    max-width: 80%;
  }
  
  .message-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    position: relative;
    word-break: break-word;
  }
  
  /* Received Message (Left) */
  .message.received {
    margin-right: auto;
    margin-left: 8px;
  }
  
  .message.received .message-bubble {
    background-color: var(--whatsapp-received);
    border-radius: 0px 8px 8px 8px;
  }
  
  /* Sent Message (Right) */
  .message.sent {
    margin-left: auto;
    margin-right: 8px;
  }
  
  .message.sent .message-bubble {
    background-color: var(--whatsapp-sent);
    border-radius: 8px 0px 8px 8px;
  }
  
  /* Message Header */
  .message-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
  }
  
  .message-sender {
    font-weight: 600;
    font-size: 14px;
    color: #000;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
  }
  
  /* Message Content */
  .message-content {
    font-size: 15px;
    line-height: 1.4;
  }
  
  /* Message Footer */
  .message-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 4px;
    font-size: 0.8rem;
  }
  
  .message-time {
    font-size: 11px;
    color: #667781;
  }
  
  /* Original Topic */
  .topic-original {
    background-color: white;
    padding: 16px;
    margin: 0 auto 16px;
    border-radius: 8px;
    border: 1px solid #e9edef;
    max-width: 80%;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  }
  
  /* Best Answer */
  .best-answer {
    border-left: 4px solid var(--whatsapp-green) !important;
    background-color: rgba(37, 211, 102, 0.1) !important;
    position: relative;
  }
  
  .best-answer-badge {
    position: absolute;
    top: -12px;
    right: 8px;
    background-color: var(--whatsapp-green);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
  }
  
  /* ===== Reply Area ===== */
  .reply-area {
    padding: 16px;
    border-top: 1px solid #e9edef;
    background-color: #f0f2f5;
    position: relative;
  }
  
  .reply-area textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #e9edef;
    border-radius: 8px;
    resize: vertical;
    background-color: white;
    font-size: 15px;
    transition: all 0.3s ease;
  }
  
  .reply-area textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(106, 76, 147, 0.25);
    outline: none;
  }
  
  .reply-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
  }
  
  #reply-to-info {
    transition: all 0.3s ease;
  }
  
  /* ===== Quote Styles ===== */
  .quote {
    border-left: 3px solid #ddd;
    padding-left: 10px;
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 8px;
  }
  
  .quote-author {
    font-weight: bold;
    color: #333;
  }
  
  /* ===== Voting System ===== */
  .vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 14px;
    transition: all 0.2s;
  }
  
  .vote-btn:hover {
    color: var(--primary-color);
  }
  
  .vote-btn.voted {
    color: var(--success-color);
  }
  
  .vote-count {
    font-size: 12px;
    color: #666;
    margin-left: 5px;
  }
  
  /* ===== Message Actions ===== */
  .message-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    justify-content: flex-end;
  }
  
  .message-actions .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  /* ===== Reply To Button ===== */
  .reply-to-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-left: 5px;
    transition: all 0.2s;
  }
  
  .reply-to-btn:hover {
    color: var(--primary-color);
    text-decoration: underline;
  }
  
  /* ===== Selected for Reply ===== */
  .selected-for-reply {
    background-color: rgba(106, 76, 147, 0.1);
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
  }
  
  /* ===== Empty State ===== */
  .empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-dark);
  }
  
  .empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gray-medium);
  }
  
  /* ===== Modals ===== */
  .modal-content {
    border-radius: var(--radius-lg);
    border: none;
  }
  
  .modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
  }
  
  .btn-close-white {
    filter: invert(1) brightness(100%);
  }
  
  /* ===== Animations ===== */
  @keyframes highlight {
    from { background-color: rgba(100, 255, 100, 0.2); }
    to { background-color: transparent; }
  }
  
  .message.new-message {
    animation: highlight 2s ease-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .fade-in {
    animation: fadeIn 0.3s ease-out;
  }
  
  /* ===== Responsive Adjustments ===== */
  @media (max-width: 768px) {
    .messages-container {
      max-height: 55vh;
      padding: 8px;
    }
    
    .message, .topic-original {
      max-width: 90%;
    }
    
    .topic-title {
      font-size: 1.3rem;
    }
  }
  
  @media (max-width: 576px) {
    body {
      padding-top: 60px;
    }
    
    .message, .topic-original {
      max-width: 95%;
    }
    
    .topic-header {
      padding: 1rem;
    }
    
    .topic-meta {
      font-size: 0.75rem;
      gap: 0.5rem;
    }
    
    .reply-area {
      padding: 12px;
    }
  }