
/* Modern Chat Design */
.chat-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 25px;
    margin-bottom: 12px;
    border-bottom: 2px solid #D92332;
    padding-bottom: 8px;
}
.chat-title-main {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: #D92332;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-title-main svg {
    width: 20px;
    height: 20px;
    fill: #D92332;
}
.chat-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.chat-online-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    box-shadow: 0 0 8px #28a745;
    animation: pulseChat 2s infinite;
}
@keyframes pulseChat {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.box-comment-modern {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    margin-bottom: 25px;
}
.box-comment-modern:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
}

.ajax-content-modern {
    min-height: 400px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px 16px !important;
    background: #fbfbfb;
    scroll-behavior: smooth;
}
@media (max-width: 767px) {
    .ajax-content-modern {
        max-height: 450px;
    }
}
/* Scrollbar */
.ajax-content-modern::-webkit-scrollbar {
    width: 6px;
}
.ajax-content-modern::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
.ajax-content-modern::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
.ajax-content-modern::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Messages */
.ajax-content-modern .commented {
    display: flex;
    gap: 12px;
    margin: 16px 0 !important;
    align-items: flex-start;
}
.ajax-content-modern .cmt-avata {
    flex-shrink: 0;
    width: 36px !important;
    max-width: none !important;
    height: 36px !important;
    border-radius: 50%;
    overflow: hidden;
    /* border: 2px solid #ffffff; */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.ajax-content-modern .cmt-avata img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ajax-content-modern .commented > div {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ajax-content-modern .cmt-tag {
    font-size: 13px;
    font-weight: 600;
    color: #1d4e63;
    display: inline-flex;
    align-items: center;
}
.ajax-content-modern .cmt-tag.is-admin {
    color: #D92332 !important;
}
.badge-admin {
    background: #D92332;
    color: #ffffff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: bold;
    text-transform: uppercase;
}
.cmt-avata.border-admin {
    border: 2px solid #D92332 !important;
}
.ajax-content-modern .chat-content {
    background: #e9ecef;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 4px 14px 14px 14px;
    padding: 8px 14px !important;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    display: inline-block;
    width: fit-content;
    max-width: 90%;
    word-break: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.ajax-content-modern .chat-content.content-admin {
    background: #fff5f5 !important;
    border: 1px solid rgba(229, 25, 25, 0.15) !important;
}
.ajax-content-modern .text-gray1 {
    font-size: 11px;
    color: #8c8c8c !important;
    margin-top: 2px;
}
.ajax-content-modern .text-gray1 i {
    font-style: normal;
}

/* User bar logged in */
.chat-user-bar-modern {
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 10px 16px;
    font-size: 13px;
    display: none;
    align-items: center;
    justify-content: space-between;
}
.chat-user-bar-modern.d-flex {
    display: flex !important;
}
.chat-user-avatar-modern {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1.5px solid #D92332;
    object-fit: cover;
}
.chat-user-name-modern {
    font-weight: 600;
    color: #333333;
}
.chat-logout-btn-modern {
    font-size: 12px;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}
.chat-logout-btn-modern:hover {
    background: #dc3545;
    color: #ffffff;
    text-decoration: none;
}

/* Input area */
.box-comment-modern .comment-modern {
    background: #ffffff !important;
    padding: 12px 16px !important;
    border-top: none !important;
    display: block !important;
    width: 100% !important;
}
.comment-modern .chat-input-wrapper {
    position: relative;
    display: flex !important;
    align-items: center !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 24px !important;
    padding: 4px 6px 4px 16px !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.comment-modern .chat-input-wrapper:focus-within {
    border-color: #D92332 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(229, 25, 25, 0.12) !important;
}
.comment-modern .chat-input-field {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 8px 0 !important;
    font-size: 14px !important;
    color: #333333 !important;
    flex: 1 !important;
    width: 100% !important;
    outline: none !important;
}
.comment-modern .chat-send-btn-modern {
    background: #D92332 !important;
    color: #ffffff !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    max-width: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 10px rgba(229, 25, 25, 0.2) !important;
    outline: none !important;
    margin-left: 8px !important;
}
.comment-modern .chat-send-btn-modern:hover {
    background: #cc1414 !important;
    transform: scale(1.05) !important;
}
.comment-modern .chat-send-btn-modern:disabled {
    background: #cbd5e1 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}
.comment-modern .chat-send-btn-modern svg {
    width: 16px !important;
    height: 16px !important;
    fill: #ffffff !important;
    transition: transform 0.2s ease !important;
}
.comment-modern .chat-send-btn-modern:hover:not(:disabled) svg {
    transform: translateX(2px) translateY(-2px) !important;
}

/* Modal Modern Overrides */
.modal-content {
    border-radius: 18px !important;
    border: none !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
}
.modal-header {
    background: linear-gradient(135deg, #1d4e63 0%, #113444 100%);
    color: #ffffff;
    border-bottom: none !important;
    padding: 16px 20px !important;
}
.modal-header .modal-title,
.modal-header {
    font-size: 16px !important;
    font-weight: 600 !important;
}
.modal-header .close {
    color: #ffffff !important;
    opacity: 0.8;
    text-shadow: none;
    outline: none;
    font-size: 24px;
    padding: 12px 16px;
    margin: -16px -20px -16px auto;
}
.modal-header .close:hover {
    opacity: 1;
}
.modal-body {
    padding: 24px 20px !important;
}
.modal-body label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
    display: block;
}
.modal-body .form-control {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    margin-bottom: 16px;
}
.modal-body .form-control:focus {
    border-color: #1d4e63 !important;
    box-shadow: 0 0 0 3px rgba(29, 78, 99, 0.15) !important;
}
.modal-footer {
    border-top: 1px solid #f1f5f9 !important;
    padding: 16px 20px !important;
}
.modal-footer .btn-primary.chat_login,
.modal-footer .btn-primary.chat_signup {
    background: #D92332 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    box-shadow: 0 4px 12px rgba(229, 25, 25, 0.2) !important;
    transition: all 0.2s ease;
}
.modal-footer .btn-primary.chat_login:hover,
.modal-footer .btn-primary.chat_signup:hover {
    background: #cc1414 !important;
    box-shadow: 0 6px 16px rgba(229, 25, 25, 0.3) !important;
}
.modal-footer .btn-default {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}
.modal-footer .btn-default:hover {
    background: #e2e8f0 !important;
}
.button_link {
    color: #D92332 !important;
}
.button_link:hover {
    text-decoration: underline !important;
}

/* Tấn Bình overrides: only where the markup differs from the reference template */
.box-comment .chat-loading{min-height:80px}
.form-search .btn-minus,.form-search .btn-plus{min-width:32px}
.js-date-form input[type=date]{max-width:170px}
.table-tansuat th,.table-tansuat td{padding:.2rem .3rem;font-size:12px}
.pagination .page-link{color:#124B82}.pagination .active .page-link{background:#D92332;border-color:#D92332;color:#fff}
/* footer height parity with reference layout (content differs: own brand text instead of contact/social/DMCA) */

/* empty chat state: keep the panel's fixed height, text centred */
.ajax-content-modern > .text-muted.py-4 { padding: 170px 0 !important; }

/* soi cầu tools (bạch thủ / nhiều nháy / lật / MT / MN) */
.sc-explain{margin:10px 12px;padding:10px 12px;border:1px solid #e6c200;background:#fffbe6;border-radius:4px;font-size:14px;line-height:1.5}
.sc-explain ul{list-style:disc}
#sc-results .soicau_mb_selected{color:#0000ff;font-size:inherit;line-height:inherit;font-weight:700;background:#fff3b0;border-radius:3px;box-shadow:0 0 0 2px #ffe066}
#sc-results .sc-out{opacity:.72}
.item-tk-cau-icon{display:inline-block;margin:2px 8px 2px 0;text-decoration:none}
.item-tk-cau-icon .soicau_mb{display:inline-block;min-width:34px;padding:2px 6px;text-align:center;border:1px solid #ffbf00;border-radius:4px;font-weight:700;color:#b36b00;background:#fff;cursor:pointer}
.item-tk-cau-icon .soicau_mb.active{background:#ffbf00;color:#fff}
.block-number.active{outline:2px solid #00f}
@media (max-width:767px){.item-tk-cau-icon .soicau_mb{min-width:40px;padding:6px 8px}}
.soi-cau .logan-result .title-blue{line-height:1.45;padding-bottom:6px}
/* H1 refactor: the topbar brand line is a <div> now; keep the look it had as an <h1> */
div.hlm-title{font-weight:500;line-height:1.2;margin-bottom:.5rem}
h1.h1p.aside-title-red{font-size:16px;line-height:1.2}

/* quay thử */
.qt-wrap{margin-bottom:12px}
.qt-banner{background:#fff4e5;border:1px solid #ffb74d;border-radius:4px;padding:8px 12px;font-size:14px;margin-bottom:10px}
.qt-badge{display:inline-block;background:#D92332;color:#fff;font-weight:700;font-size:12px;letter-spacing:.5px;padding:2px 8px;border-radius:3px;margin-right:4px}
.qt-panel{background:#fff;border:1px solid #D8E0E8;border-radius:4px;padding:12px;margin-bottom:10px}
.qt-buttons .btn{white-space:nowrap}
.qt-progress{height:6px;background:#e9ecef;border-radius:3px;overflow:hidden}.qt-bar{height:100%;width:0;background:#D92332;transition:width .2s}
.qt-board{border:2px dashed #D92332;border-radius:4px;background:#fff;overflow:hidden}
.qt-title{background:#ff8f00;color:#fff;font-weight:700;padding:8px 12px;text-transform:uppercase;font-size:15px}
.qt-sub{background:#fff4e5;padding:4px 12px;font-size:13px}.qt-sub2{background:#e3f2fd;padding:6px 12px;font-weight:600;text-align:center}
.qt-table{margin:0;font-size:16px}.qt-table th{background:#f1f3f5;font-weight:500}.qt-lab{width:64px;white-space:nowrap;font-size:13px;color:#555;background:#fafafa}
.qt-num{display:inline-block;min-width:3.2em;margin:2px 6px;font-variant-numeric:tabular-nums;letter-spacing:.5px;color:#999;font-weight:600}
.qt-num.qt-spin{color:#0d47a1;background:#e3f2fd;border-radius:3px}
.qt-num.qt-done{color:#222}.qt-num.qt-special.qt-done{color:#D92332;font-size:1.25em}
.qt-complete .qt-title{background:#2e7d32}
.qt-loto .table{margin:0}.qt-h{color:#D92332;font-weight:700;width:36px}
@media (max-width:767px){.qt-num{min-width:2.8em;margin:2px 3px;font-size:15px}.qt-buttons{flex-wrap:wrap}.qt-buttons .btn{margin:2px 0 !important;width:100%}#qt-stop{width:100%}}

/* retagged headings keep their previous look */
.tb-h14{font-size:14px!important}.tb-h16{font-size:16px!important}.tb-h18{font-size:18px!important}
.col-xl-610 h2.title-bg-blue,.col-xl-610 h3.title-bg-blue{font-size:14px}

.tb-kw-list{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.tb-kw-list li{margin:0;padding:0;max-width:100%}
.tb-kw-list a{display:inline-block;max-width:100%;padding:5px 12px;border:1px solid #124B82;border-radius:4px;color:#124B82;background:#fff;font-size:14px;line-height:20px;text-decoration:none;overflow-wrap:anywhere}
.tb-kw-list a:hover,.tb-kw-list a:focus{background:#124B82;color:#fff}

/* ---- palette v2 + footer ---- */
:root{--tb-blue:#124B82;--tb-navy:#103252;--tb-red:#D92332;--tb-bg:#F4F6F8;--tb-white:#fff;--tb-text:#202B36;--tb-line:#D8E0E8}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--tb-red)!important;outline-offset:2px}
.tb-kw-list a{border-color:var(--tb-blue);color:var(--tb-blue)}.tb-kw-list a:hover,.tb-kw-list a:focus-visible{background:var(--tb-blue);color:#fff}
footer.tb-ft{margin-top:1.5rem;background:var(--tb-navy);color:#E8EEF4;font-size:14px;line-height:1.5}
.tb-ft-top{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:32px;padding:32px 0 24px}
.tb-ft-logo{display:inline-block;margin-bottom:12px}.tb-ft-logo img{display:block;width:200px;max-width:100%;height:auto}
.tb-ft-name{margin:0 0 6px;font-weight:700;font-size:16px;color:#fff}
.tb-ft-desc{margin:0 0 8px;color:#E8EEF4}.tb-ft-note{margin:0;color:#BFD0E0;font-size:13px}
.tb-ft-title{margin:0 0 10px;padding-bottom:8px;border-bottom:2px solid var(--tb-red);display:inline-block;font-weight:700;font-size:15px;color:#fff;text-transform:uppercase;letter-spacing:.3px}
.tb-ft-list{list-style:none;margin:0;padding:0}.tb-ft-list li{margin:0}
.tb-ft-list a{display:block;padding:6px 0;color:#E8EEF4;text-decoration:none}
.tb-ft a:hover{color:#fff;text-decoration:underline}.tb-ft a:focus-visible{outline-color:#fff!important;color:#fff}
.tb-ft-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 24px;padding:14px 0 18px;border-top:1px solid rgba(255,255,255,.22)}
.tb-ft-copy{margin:0;color:#BFD0E0}
.tb-ft-legal{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:0 20px}.tb-ft-legal a{display:block;padding:6px 0;color:#E8EEF4;text-decoration:none}
@media (max-width:991.98px){.tb-ft-top{grid-template-columns:1fr 1fr;gap:24px}.tb-ft-brand{grid-column:1/-1}}
@media (max-width:575.98px){.tb-ft-title{font-size:13px;letter-spacing:0}.tb-ft-top{grid-template-columns:1fr 1fr;gap:20px 16px;padding:24px 0 16px}.tb-ft-bottom{flex-direction:column;align-items:flex-start}}
.tb-kw-wrap{margin-top:16px}.tb-kw-wrap .tb-kw{margin:0 0 16px;padding:16px;background:#fff;border:1px solid var(--tb-line)}
