/* ====================== FORUM LIST NÂNG CẤP ====================== */
.forum-list .list-group-item {
    padding: 14px 16px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.forum-list .list-group-item:hover {
    background-color: #f8fafc;
    border-left-color: #3b82f6;
    transform: translateX(4px);
}

.forum-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.forum-title {
    font-weight: 600;
    color: #1e2937;
    font-size: 15px;
    flex: 1;
    line-height: 1.4;
}

.forum-title:hover {
    color: #3b82f6;
}

.forum-stats {
    color: #64748b;
    font-size: 13.5px;
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;
}

.forum-info {
    font-size: 13.5px;
    color: #64748b;
}

.forum-info strong {
    color: #334155;
}

/* Responsive */
@media (max-width: 480px) {
    .forum-title {
        font-size: 14.5px;
    }
    .forum-info {
        font-size: 13px;
    }
}

/* ====================== CHAT MESSAGES - TỰ DO ====================== */
.chat-messages {
    background: #f8fafc;
    padding: 12px 0;
    height: auto;
    max-height: none;
    overflow-y: visible;
    border-radius: 0 0 8px 8px;
}

/* Tin nhắn Chat */
.chat-item {
    display: flex;
    padding: 8px 14px;
    gap: 12px;
    margin-bottom: 6px;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
}

.chat-bubble {
    flex: 1;
    background: #ffffff;
    padding: 11px 14px;
    border-radius: 14px 14px 14px 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
}

.chat-header-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.user-name {
    font-weight: 600;
    color: #1e40af;
    text-decoration: none;
}

.user-name:hover {
    text-decoration: underline;
}

.chat-time {
    font-size: 12.5px;
    color: #94a3b8;
    white-space: nowrap;
    margin-left: auto;
    font-weight: 500;
}

.chat_text {
    color: #1f2937;
    line-height: 1.5;
    word-break: break-word;
}

.chat-item:hover .chat-bubble {
    background: #f8fafc;
    border-color: #e0e7ff;
}

/* ====================== CHAT INPUT MODERN ====================== */
.chat-input-modern {
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.chat-toolbar {
    background: #f1f5f9;
    padding: 8px 10px;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.chat-toolbar a {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    min-width: 28px;
    text-align: center;
    transition: all 0.2s;
}

.chat-toolbar a:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.chat-textarea {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}

.chat-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.chat-send-button {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-send-button:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* ====================== HEADER NÂNG CẤP ====================== */
#header {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    margin-bottom: 16px;
}

#header .card-header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    padding: 8px 10px;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

#header .card-header a {
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

#header .card-header a:hover {
    background-color: rgba(255,255,255,0.2);
    color: #bae6fd;
}

#header .card-body {
    padding: 16px;
}

#header .card-body img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

#header .card-body img:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

#header .card-body b {
    font-size: 16px;
    color: #1e2937;
}

/* Khi chưa login */
#header .list-group-item {
    padding: 16px;
    text-align: center;
    background: #fef2f2;
    color: #ef4444;
}

/* Ban notice */
.alarm {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #fecaca;
}

/* ====================== FOOTER NÂNG CẤP ====================== */
#footer {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    margin-top: 20px;
}

#footer .card-header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    padding: 14px 16px;
    font-weight: 600;
}

#footer .footer-body {
    padding: 20px 16px;
    background: #f8fafc;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

#footer .footer-content p {
    margin-bottom: 8px;
    color: #1e2937;
}

#footer .footer-content .text-muted {
    font-size: 13px;
    color: #64748b;
}

#footer .footer-links {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

#footer .footer-links a {
    color: #475569;
    margin: 0 10px;
    font-size: 13.5px;
    transition: all 0.2s;
}

#footer .footer-links a:hover {
    color: #3b82f6;
}

/* Responsive */
@media (max-width: 480px) {
    #footer .footer-links a {
        margin: 0 6px;
        display: inline-block;
        margin-bottom: 4px;
    }
}

/* Phân Trang */
.pagination-wrap{
        padding:15px;
        text-align:center;
    }
    .page-btn{
        display:inline-block;
        padding:6px 12px;
        margin:2px;
        border:1px solid #ddd;
        border-radius:4px;
        text-decoration:none;
    }
    .page-btn.active{
        font-weight:bold;
        background:#007bff;
        color:white;
        border-color:#007bff;
    }