/*
Theme Name: XOSO AZ24
Theme URI: https://rongbk666.net
Author: rongbk666
Author URI: https://rongbk666.net
Description: Theme kết quả xổ số ba miền chuẩn az24.vn - XSMB, XSMN, XSMT, Vietlott
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xoso-az24
Tags: lottery, xoso, vietnam, news
*/

/* ── RESET & BASE ── */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:Arial,sans-serif;font-size:13px;color:#110000;background:#f0f0f0;line-height:1.5}
a{color:#0000FF;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto}

/* ── SITE HEADER ── */
.site-header{background:#fff;border-bottom:1px solid #e0e0e0;padding:8px 0}
.header-inner{max-width:1180px;margin:0 auto;padding:0 8px;display:flex;align-items:center;justify-content:space-between}
.site-logo{display:flex;align-items:center;gap:6px;text-decoration:none}
.logo-circle{width:44px;height:44px;border-radius:50%;background:#c8001e;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.logo-circle span{color:#fff;font-weight:900;font-size:13px;letter-spacing:-0.5px}
.logo-text{font-size:22px;font-weight:700;color:#c8001e;letter-spacing:-0.5px}
.logo-text .vn{color:#110000}
.header-desc{font-size:11px;color:#110000;margin-left:auto}

/* ── TOPNAV ── */
.topnav{background:#c8001e;position:sticky;top:0;z-index:200}
.topnav-inner{max-width:1180px;margin:0 auto;padding:0 8px;display:flex;align-items:stretch}
.topnav ul{display:flex;list-style:none;margin:0;padding:0}
.topnav ul li a,.ni{color:#fff;font-size:13px;font-weight:600;padding:9px 14px;display:flex;align-items:center;gap:5px;white-space:nowrap;border-right:1px solid rgba(255,255,255,0.15);text-decoration:none}
.topnav ul li:first-child a,.ni:first-child{padding:9px 12px}
.topnav ul li a:hover,.ni:hover{background:rgba(0,0,0,0.15)}
.topnav ul li.current-menu-item a,.ni.act{background:rgba(0,0,0,0.2)}
.ni svg{width:16px;height:16px;fill:#fff;flex-shrink:0}

/* ── PAGE LAYOUT ── */
.page-wrap{max-width:1180px;margin:0 auto;padding:6px 8px 20px}
.main-grid{display:grid;grid-template-columns:238px 1fr 238px;gap:6px;align-items:start}

/* ── SIDEBAR TRÁI ── */
.side-left{display:flex;flex-direction:column;position:sticky;top:46px;align-self:start}
.sb-card{background:#fff;border:1px solid #ddd;border-top:none;overflow:hidden}
.sb-card:first-child{border-top:1px solid #ddd}
.sb-head{background:#c8001e;color:#fff;font-size:17px;font-weight:700;padding:8px 10px;display:flex;align-items:center;gap:6px}
.sb-dot{width:13px;height:13px;border-radius:50%;background:#f5a623;border:2px solid #fde68a;flex-shrink:0}
.sb-list{background:#fff}
.sb-link{display:flex;align-items:center;padding:5px 10px;font-size:15px;color:#110000;border-bottom:1px solid #f0f0f0;text-decoration:none;line-height:1.5}
.sb-link:last-child{border-bottom:none}
.sb-link:hover{background:#fef5f5;color:#c8001e}
.sb-link::before{content:"▪";color:#c8001e;font-size:12px;margin-right:6px;flex-shrink:0}
.sb-check{color:#27ae60;font-size:17px;margin-left:4px}

/* ── CỘT GIỮA ── */
.main-col{background:#fff;min-width:0}

/* Padding cho nội dung plugin render trong cột giữa */
.kqxs-result-section{padding:0}
.kqxs-result-section .kqxs-thu-tabs,
.kqxs-result-section .dtabs{margin:0}
/* SEO text, xem thêm trong plugin */
.kqxs-bai-viet-seo,.kqxs-ext-seo-block,.province-seo-block,
.kqxs-xem-them,.xem-them-block{padding:12px 14px}
.kqxs-bai-viet-seo p,.kqxs-ext-seo-block p{margin-bottom:6px}
/* SEO article block từ province-extras */
.kqxs-seo-article{padding:14px 16px !important;font-size:13px;line-height:1.9;color:#444}
.kqxs-seo-article h2{font-size:18px !important;font-weight:bold;color:#110000;margin:12px 0 4px !important}
.kqxs-seo-article h3{font-size:17px !important;font-weight:bold;color:#555;margin:10px 0 4px !important}
.kqxs-seo-article p{margin-bottom:6px !important}
.kqxs-disclaimer{padding:0 16px 14px !important;font-size:12px;color:#999}
/* Link "xem thêm" sau bảng KQ */
.kqxs-xem-them-links,.kqxs-xem-them{padding:8px 14px;border-top:1px solid #eee;font-size:13px}
.kqxs-xem-them-links a,.kqxs-xem-them a{color:#0000FF;margin-right:10px;text-decoration:underline}
/* Đảm bảo bảng KQ không bị sát mép */
.kq-tbl,.mn-tbl,.dd-wrap,.mn-dd-tbl{width:100%}

/* ── NOTICE BAR ── */
.notice-bar{background:#fff9e6;border:1px solid #f5d87a;padding:7px 12px;font-size:13px;color:#7b5800;display:flex;align-items:center;gap:6px}
.notice-bar .arrow{color:#c8001e;font-size:17px}
.notice-bar a{color:#c8001e;font-weight:bold;text-decoration:none}
.notice-bar a:hover{text-decoration:underline}

/* ── DATE TABS ── */
.dtabs{display:flex;background:#fff;border-bottom:1px solid #e0e0e0;overflow-x:auto;scrollbar-width:none}
.dtabs::-webkit-scrollbar{display:none}
.dtab{padding:7px 12px;cursor:pointer;font-size:17px;color:#555;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap;flex-shrink:0;text-decoration:none;display:inline-flex;align-items:center}
.dtab.on,.dtab:hover{color:#e65000;border-bottom-color:#e65000;font-weight:bold}
.dtab:hover:not(.on){font-weight:normal;background:#fafafa}

/* ── KQ HEADER ── */
.kqh{color:#fff;text-align:center;padding:10px 12px 9px}
.kqh.orange{background:#e65000}
.kqh.red{background:#c8001e}
.kqh.purple{background:#4a148c}
.kqh.blue2{background:#1565c0}
.kqh .t1{font-size:15px;font-weight:bold}
.kqh .t2{font-size:12px;margin-top:3px}
.kqh .t2 a{color:#ffd0b0;text-decoration:underline}
.kqh .sep{color:#ffd0b0}

/* ── BẢNG XSMB ── */
.kq-tbl{width:100%;border-collapse:collapse;background:#fff}
.kq-tbl tr{border-bottom:1px solid #ececec}
.kq-tbl tr:last-child{border-bottom:none}
.gl{width:42px;color:#110000;font-size:12px;font-weight:bold;padding:0 4px 0 8px;text-align:left;white-space:nowrap;border-right:1px solid #ececec;vertical-align:middle}
.madb-row td{padding:5px 10px;background:#fff;font-size:12px}
.madb-label{color:#110000}
.madb-nums{text-align:right;color:#0000FF;font-weight:bold}
.db-td{text-align:center;padding:8px 0;font-size:28px;font-weight:bold;color:#c8001e;letter-spacing:3px}
.g1-td{text-align:center;padding:7px 0;font-size:20px;font-weight:bold;color:#110000}
.g2-inner{display:grid;grid-template-columns:1fr 1fr 1fr;width:100%}
.g2-inner .cell{text-align:center;padding:7px 4px;font-size:16px;font-weight:bold;color:#110000;border-left:1px solid #ececec}
.g2-inner .cell:first-child{border-left:none}
.g2-inner .cell.empty{color:transparent}
.gcell{text-align:center;padding:6px 4px;font-size:20px;font-weight:bold;color:#110000;border-left:1px solid #ececec;border-top:1px solid #ececec}
.g3-inner{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
.g3-inner .gcell:nth-child(-n+3){border-top:none}
.g3-inner .gcell:nth-child(3n+1){border-left:none}
.g4-inner{display:grid;grid-template-columns:repeat(4,1fr);width:100%}
.g4-inner .gcell{border-top:none}
.g4-inner .gcell:first-child{border-left:none}
.g5-inner{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
.g5-inner .gcell:nth-child(-n+3){border-top:none}
.g5-inner .gcell:nth-child(3n+1){border-left:none}
.g6-inner{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
.g6-inner .gcell{border-top:none;font-size:14px}
.g6-inner .gcell:first-child{border-left:none}
.g7-inner{display:grid;grid-template-columns:repeat(4,1fr);width:100%}
.g7-inner .gcell{border-top:none;font-size:22px;font-weight:bold;color:#c8001e;padding:6px 4px}
.g7-inner .gcell:first-child{border-left:none}

/* ── KHÁM PHÁ THÊM ── */
.explore-box{border-top:1px solid #e8e8e8}
.explore-head{background:#f2f2f2;padding:9px 14px;font-size:15px;font-weight:bold;color:#110000}
.explore-link{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #f0f0f0;color:#110000;text-decoration:none;font-size:15px}
.explore-link:last-child{border-bottom:none}
.explore-link:hover{background:#fafafa;color:#c8001e}
.explore-arrow{color:#aaa;font-size:16px}

/* ── TAG LINKS ── */
.tag-links{padding:8px 10px;display:flex;flex-wrap:wrap;gap:5px;border-top:1px solid #eee;background:#fff}
.tag-link{padding:4px 10px;background:#e8f0fb;border:1px solid #c5d8f5;border-radius:3px;font-size:15px;color:#0000FF;text-decoration:none;white-space:nowrap}
.tag-link:hover{background:#c5d8f5}

/* ── RADIO + FILTER BAR ── */
.rbar{background:#fffbea;border-top:1px solid #e8d87a;padding:6px 10px;display:flex;align-items:center;gap:8px;font-size:16px;flex-wrap:wrap}
.rb{display:inline-flex;align-items:center;gap:4px;cursor:pointer;color:#444;user-select:none}
.rb input[type=radio]{accent-color:#c8001e;cursor:pointer}
.nfilter{display:flex;gap:3px;margin-left:auto}
.nf{width:24px;height:24px;border-radius:50%;background:#e5e5e5;color:#110000;font-size:11px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-weight:bold;user-select:none}
.nf:hover,.nf.on{background:#c8001e;color:#fff}

/* ── ĐẦU ĐUÔI MB ── */
.dd-wrap{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #ddd}
.dd-tbl{width:100%;border-collapse:collapse}
.dd-tbl:first-child{border-right:2px solid #ddd}
.dd-tbl th{background:#fff;font-size:17px;font-weight:bold;padding:7px 10px;border-bottom:1px solid #ddd;color:#555}
.dd-tbl th.tl{text-align:left}
.dd-tbl th.tr{text-align:right}
.dd-tbl td{border-bottom:1px solid #f2f2f2;padding:5px 10px;font-size:17px}
.dd-tbl tr:last-child td{border-bottom:none}
.dd-tbl.left td.idx{color:#c8001e;font-weight:bold;width:28px;text-align:left}
.dd-tbl.left td.vals{text-align:left;color:#110000}
.dd-tbl.right td.vals{text-align:right;color:#110000}
.dd-tbl.right td.idx{color:#c8001e;font-weight:bold;width:28px;text-align:right}
.hot{color:#c8001e;font-weight:bold}

/* ── BẢNG MN/MT ── */
.mn-outer{background:#fff}
.mn-tbl{width:100%;border-collapse:collapse}
.mn-tbl th{padding:7px 5px;font-size:17px;font-weight:bold;text-align:center;border-bottom:2px solid #e8e8e8;color:#0000FF;text-decoration:underline;cursor:pointer;background:#fff}
.mn-tbl th.glh{color:#110000;font-weight:normal;text-decoration:none;cursor:default}
.mn-tbl td{border-bottom:1px solid #f0f0f0;padding:5px;text-align:center;vertical-align:middle;font-size:18px}
.mn-tbl td.gl2{color:#110000;font-size:17px;font-weight:bold;width:34px;background:#fafafa;border-right:1px solid #ececec}
.mn-tbl tr:last-child td{border-bottom:none}
.n-g8{font-size:22px;font-weight:bold;color:#c8001e}
.n-g7,.n-g5,.n-g2m,.n-g1m{font-size:17px;font-weight:bold;color:#110000}
.n-g1m{font-size:18px}
.n-g6,.n-g4,.n-g3{font-size:17px;color:#110000;line-height:1.9}
.n-db{font-size:20px;font-weight:bold;color:#c8001e;letter-spacing:1px}
.row-db td{background:#fff8f0}
.row-db td.gl2{color:#c8001e}

/* ── ĐẦU ĐUÔI MN/MT ── */
.mn-dd-tbl{width:100%;border-collapse:collapse;background:#fff;border-top:1px solid #ddd}
.mn-dd-tbl th{background:#fff;color:#555;font-size:18px;font-weight:bold;padding:7px 8px;border-bottom:1px solid #ddd;text-align:center}
.mn-dd-tbl th.didx{text-align:left;padding-left:12px}
.mn-dd-tbl td{border-bottom:1px solid #f2f2f2;padding:5px 8px;font-size:17px;text-align:center}
.mn-dd-tbl tr:last-child td{border-bottom:none}
.mn-dd-tbl td.didx{color:#c8001e;font-weight:bold;background:#fafafa;border-right:1px solid #ececec;text-align:center;width:36px}
.mn-dd-tbl td.dnums{text-align:left}

/* ── VIETLOTT ── */
.balls-row{display:flex;gap:8px;justify-content:center;padding:12px 8px;background:#fff}
.ball{width:38px;height:38px;border-radius:50%;background:#c8001e;color:#fff;font-weight:bold;font-size:16px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ball.sp{background:#e65000}
.ball.blue{background:#1565c0}
.jackpot-val{text-align:center;padding:6px;font-size:16px;background:#fff;border-bottom:1px solid #eee}
.jackpot-val strong{color:#c8001e;font-size:15px}
.vl-tbl{width:100%;border-collapse:collapse;background:#fff}
.vl-tbl th{background:#e65000;color:#fff;padding:6px 10px;font-size:12px;text-align:center}
.vl-tbl th.blue-head{background:#1565c0}
.vl-tbl td{border-bottom:1px solid #f0f0f0;padding:6px 10px;font-size:13px;text-align:center}
.vl-tbl tr:last-child td{border-bottom:none}
.jp-label{color:#c8001e;font-weight:bold}
.jp2-label{color:#e65000;font-weight:bold}
.jp-val{color:#c8001e;font-weight:bold}
.jp2-val{color:#e65000;font-weight:bold}

/* ── THỐNG KÊ ── */
.tk-head{background:#455a64;color:#fff;font-size:15px;padding:6px 10px;font-weight:bold}
.tk-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:8px;background:#fff}
.tk-box{text-align:center}
.tk-num{background:#c8001e;color:#fff;font-size:16px;font-weight:bold;padding:5px 3px;border-radius:3px}
.tk-num.gray{background:#110000}
.tk-cnt{font-size:10px;color:#110000;margin-top:2px}

/* ── SEO BLOCK ── */
.seo-block{background:#fff;padding:14px 16px;font-size:16px;line-height:1.9;color:#444;border-top:2px solid #f0f0f0}
.seo-block h2{font-size:16px;font-weight:bold;color:#110000;margin:12px 0 4px}
.seo-block p{margin-bottom:5px}
.seo-block a{color:#0000FF;text-decoration:underline}

/* ── WP CONTENT ── */
.entry-content{padding:16px;font-size:16px;line-height:1.9;color:#444}
.entry-content h1,.entry-content h2{font-size:14px;font-weight:bold;color:#c8001e;margin:12px 0 6px}
.entry-content h3{font-size:13px;font-weight:bold;color:#110000;margin:10px 0 4px}
.entry-content p{margin-bottom:8px}
.entry-content a{color:#0000FF;text-decoration:underline}
.entry-content ul,.entry-content ol{padding-left:18px;margin-bottom:8px}
.entry-content li{margin-bottom:3px}

/* ── SIDEBAR PHẢI ── */
.side-right{display:flex;flex-direction:column;gap:6px;position:sticky;top:46px;align-self:start}
.sr-card{background:#fff;border:1px solid #ddd;overflow:hidden}
.sr-head{background:#c8001e;color:#fff;font-size:15px;font-weight:700;padding:8px 10px;display:flex;align-items:center;gap:6px}
.sr-list{background:#fff}
.sr-link{display:flex;align-items:center;padding:6px 10px;font-size:15px;color:#0000FF;border-bottom:1px solid #f0f0f0;text-decoration:none;line-height:1.5}
.sr-link:last-child{border-bottom:none}
.sr-link:hover{color:#c8001e;background:#fef5f5}
.sr-link::before{content:"▪";color:#c8001e;font-size:15px;margin-right:6px;flex-shrink:0}

/* ── PANE TOGGLE ── */
.pane{display:none}
.pane.on{display:block}
.sec-gap{height:6px;background:#f0f0f0}

/* ── FOOTER ── */
.site-footer{background:#222;color:#aaa;text-align:center;padding:20px 10px;font-size:12px;line-height:1.8;margin-top:10px}
.site-footer a{color:#ccc}
.site-footer a:hover{color:#fff}
.footer-inner{max-width:1180px;margin:0 auto}
.footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-bottom:10px}
.footer-links a{color:#aaa;padding:2px 6px;border:1px solid #444;border-radius:3px;font-size:11px}
.footer-links a:hover{border-color:#c8001e;color:#fff;text-decoration:none}

/* ── WIDGETS ── */
.widget{margin-bottom:12px}
.widget-title{background:#c8001e;color:#fff;font-size:15px;font-weight:700;padding:8px 10px;display:flex;align-items:center;gap:6px;margin:0}
.widget ul{list-style:none;background:#fff;border:1px solid #ddd;border-top:none}
.widget ul li a{display:flex;align-items:center;padding:5px 10px;font-size:12px;color:#110000;border-bottom:1px solid #f0f0f0;text-decoration:none;line-height:1.5}
.widget ul li:last-child a{border-bottom:none}
.widget ul li a:hover{background:#fef5f5;color:#c8001e}
.widget ul li a::before{content:"▪";color:#c8001e;font-size:15px;margin-right:6px;flex-shrink:0}

/* ── RESPONSIVE ── */

/* Xem thêm box */
.kqxs-xem-them-box{padding:8px 14px;border-top:1px solid #eee;font-size:16px;color:#444}
.kqxs-xem-them-box strong{color:#c8001e}
.kqxs-xem-them-box ul{margin:4px 0 0 0;padding-left:0;list-style:none}
.kqxs-xem-them-box li{padding:2px 0}
.kqxs-xem-them-box li::before{content:"▪ ";color:#c8001e}
.kqxs-xem-them-box a{color:#0000FF;text-decoration:underline}
/* Tag links kqxs */
.kqxs-tag-links{padding:8px 10px;display:flex;flex-wrap:wrap;gap:5px;border-top:1px solid #eee}
.kqxs-tag-links a{padding:4px 10px;background:#e8f0fb;border:1px solid #c5d8f5;border-radius:3px;font-size:15px;color:#0000FF;text-decoration:none}
.kqxs-tag-links a:hover{background:#c5d8f5}

/* ── AJAX LOADING ── */
.xs-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#110000;font-size:16px;gap:12px;background:#fff}
.xs-spinner{width:32px;height:32px;border:3px solid #f0f0f0;border-top-color:#c8001e;border-radius:50%;animation:xs-spin .7s linear infinite}
@keyframes xs-spin{to{transform:rotate(360deg)}}

/* ── ACTIVE SIDEBAR LINK ── */
a.sb-link.xs-active{background:#fef0f0;color:#c8001e;font-weight:bold}
a.sb-link.xs-active::before{color:#c8001e}
a.sr-link.xs-active{background:#fef0f0;color:#c8001e;font-weight:bold}

@media(max-width:900px){
  .main-grid{grid-template-columns:200px 1fr}
  .side-right{display:none}
}
@media(max-width:580px){
  /* Mobile: 1 cột, nội dung trước, sidebar trái dọc sau SEO */
  .main-grid{grid-template-columns:1fr}
  .main-col{order:1}
  /* Sidebar phải hiện xuống dưới sidebar trái */
  .side-right{
    order:3;
    display:flex !important;
    flex-direction:column;
    position:static;
    width:100%;
    gap:6px;
    margin-top:6px;
  }
  /* Sidebar trái: xếp DỌC, đủ tất cả link, xuống sau SEO */
  .side-left{
    order:4;
    display:flex;
    flex-direction:column;
    position:static;
    width:100%;
    border-top:4px solid #c8001e;
    margin-top:6px;
  }
  .side-left .sb-card{
    width:100%;
    border-top:none;
    border-bottom:1px solid #ddd;
  }
  .side-left .sb-card:first-child{border-top:1px solid #ddd}
  .side-left .sb-card:last-child{border-bottom:none}
  .side-left .sb-head{font-size:17px;padding:8px 10px}
  .side-left .sb-link{font-size:17px;padding:6px 10px}
  /* Bảng KQ mobile */
  .db-td{font-size:22px}
  .g7-inner .gcell{font-size:18px}
  .mn-outer{overflow-x:auto}
  .mn-tbl{min-width:320px}
  .dd-wrap{display:grid;grid-template-columns:1fr 1fr}
  /* Header mobile: ẩn description, logo gọn lại */
  .site-header{padding:6px 0}
  .header-inner{padding:0 8px;overflow:hidden}
  .header-desc{display:none}
  .site-logo{min-width:0}
  .logo-text{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* Topnav mobile: cuộn ngang */
  .topnav-inner{overflow-x:auto;scrollbar-width:none}
  .topnav-inner::-webkit-scrollbar{display:none}
  .topnav ul{flex-wrap:nowrap}
  .topnav ul li a,.ni{padding:9px 10px;font-size:12px}
  /* Page wrap: không padding thừa */
  .page-wrap{padding:4px 4px 16px}
  .main-grid{gap:4px}
  /* Bảng kết quả mobile */
  .kq-tbl .gl{width:30px;font-size:15px;padding:0 2px 0 4px}
  .g2-inner .cell,.gcell{font-size:16px;padding:5px 2px}
  .g7-inner .gcell{font-size:16px;padding:5px 2px}
}

/* ══════════════════════════════════════════════════════
   THỐNG KÊ — style chuẩn az24.vn
   ══════════════════════════════════════════════════════ */

/* Bảng thống kê chính: kqxs-table */
.kqxs-table-wrapper { margin: 0 0 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kqxs-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 16px;
}
.kqxs-table th {
  background: #e65000;        /* cam đậm az24 */
  color: #fff;
  padding: 9px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #c85000;
}
.kqxs-table th h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.kqxs-table td {
  border: 1px solid #e8e8e8;
  padding: 7px 10px;
  text-align: center;
  vertical-align: middle;
  font-size: 16px;
  color: #110000;
  line-height: 1.5;
}
.kqxs-table tbody tr:nth-child(even) td { background: #fff8f0; }
.kqxs-table tbody tr:nth-child(odd)  td { background: #fff; }
.kqxs-table td strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #c8001e;
  margin-bottom: 2px;
}

/* Tab thống kê: Thống kê ĐB | Bảng ĐB tổng | ĐB tuần... */
.xs-stat-tabs {
  display: flex;
  background: #fff;
  border-bottom: 2px solid #e0e0e0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.xs-stat-tabs::-webkit-scrollbar { display: none; }
.xs-stat-tab {
  padding: 9px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  background: #fff;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.xs-stat-tab.active,
.xs-stat-tab.on {
  color: #e65000;
  border-bottom-color: #e65000;
  background: #fff;
}
.xs-stat-tab:hover:not(.active):not(.on) { color: #c8001e; background: #fafafa; }

/* Header cam section trong thống kê */
.xs-stat-header {
  background: #e65000;
  color: #fff;
  padding: 9px 14px;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 0;
}
.xs-stat-header-red {
  background: #c8001e;
  color: #fff;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
}

/* Tag tỉnh "Xem theo tỉnh:" */
.xs-tinh-tags {
  padding: 8px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  color: #555;
}
.xs-tinh-tag {
  padding: 3px 10px;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 3px;
  font-size: 15px;
  color: #e65000;
  text-decoration: none;
  white-space: nowrap;
}
.xs-tinh-tag:hover { background: #ffcc80; color: #c85000; }

/* Bảng GĐB lịch (calendar grid 7 cột) */
.xs-db-calendar {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: #fff;
}
.xs-db-calendar th {
  background: #ffd5b0;
  color: #c85000;
  padding: 8px 6px;
  text-align: center;
  font-weight: 700;
  border: 1px solid #f0c080;
  font-size: 16px;
}
.xs-db-calendar td {
  border: 1px solid #f0ece8;
  padding: 8px 6px;
  text-align: center;
  vertical-align: top;
  font-size: 16px;
  color: #110000;
  font-weight: 700;
  min-width: 60px;
}
.xs-db-calendar td .db-num {
  font-size: 15px;
  font-weight: 700;
  color: #110000;
}
.xs-db-calendar td .db-num .hi {
  color: #c8001e;   /* 2 số cuối highlight đỏ */
}
.xs-db-calendar td .db-date {
  font-size: 10px;
  color: #999;
  font-weight: normal;
  display: block;
}
.xs-db-calendar tr:nth-child(even) td { background: #fdf8f4; }

/* Dropdown tháng/năm */
.xs-stat-select {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 16px;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}
.xs-stat-select select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 16px;
  color: #110000;
  background: #fff;
}
.xs-stat-select label { color: #555; font-weight: 600; }

/* Toggle Đầu/Đuôi/Loto/Tổng */
.xs-toggle-group {
  display: flex;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}
.xs-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 16px;
  color: #555;
  user-select: none;
}
.xs-toggle-label input[type=radio] { accent-color: #e65000; }

/* Bảng tần suất 5 cột (lô gan, lô kép) */
.xs-tansuat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: #fff;
  margin-bottom: 14px;
}
.xs-tansuat-table th {
  background: #e65000;
  color: #fff;
  padding: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}
.xs-tansuat-table td {
  border: 1px solid #ffe0c0;
  padding: 6px 8px;
  text-align: center;
  font-size: 13px;
}
.xs-tansuat-table tbody tr:nth-child(odd) td  { background: #fff; }
.xs-tansuat-table tbody tr:nth-child(even) td { background: #fff8f0; }
.xs-tansuat-table td strong { color: #c8001e; font-size: 15px; }
.xs-tansuat-table td span   { color: #110000; font-size: 12px; }

/* Bảng chạm đầu/đuôi/tổng (3 cột) */
.xs-cham-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
.xs-cham-table th {
  background: #e65000;
  color: #fff;
  padding: 8px;
  text-align: center;
  font-weight: 700;
}
.xs-cham-table td {
  border: 1px solid #ffe0c0;
  padding: 6px 10px;
  text-align: center;
}
.xs-cham-table tbody tr:nth-child(odd)  td { background: #fff; }
.xs-cham-table tbody tr:nth-child(even) td { background: #fff8f0; }

/* Navigation menu thống kê */
.kqxs-nav-cat-btn.kqxs-nav-active { background: #e65000 !important; color: #fff !important; border-color: #e65000 !important; }
.kqxs-nav-cat-btn:hover { background: #fff3e0 !important; color: #e65000 !important; }
.kqxs-nav-cat-btn { border-radius: 3px !important; font-size: 16px !important; }
.kqxs-nav-province-list a { border-radius: 3px !important; font-size: 12px !important; color: #0000FF !important; }
.kqxs-nav-province-list a:hover { background: #c8001e !important; border-color: #c8001e !important; color: #fff !important; }

/* Nút XEM KẾT QUẢ */
.xs-btn-orange {
  display: inline-block;
  padding: 8px 20px;
  background: #e65000;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
}
.xs-btn-orange:hover { background: #c85000; }

/* "XEM THÊM" button cuối bảng */
.xs-xem-them-btn {
  display: block;
  text-align: center;
  padding: 10px;
  background: #f5f5f5;
  border-top: 1px solid #eee;
  color: #555;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.xs-xem-them-btn:hover { background: #ffe8d0; color: #e65000; }

/* Bảng "Ngày này năm xưa" */
.xs-namxua-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.xs-namxua-table th {
  background: #fff3e0;
  color: #c85000;
  padding: 7px 10px;
  font-weight: 700;
  text-align: center;
  border: 1px solid #ffcc80;
}
.xs-namxua-table td {
  border: 1px solid #eee;
  padding: 6px 10px;
  text-align: center;
}
.xs-namxua-table tbody tr:nth-child(odd)  td { background: #fff; }
.xs-namxua-table tbody tr:nth-child(even) td { background: #fafafa; }
.xs-namxua-table td .hi { color: #c8001e; font-weight: 700; }

/* Số đặc biệt lớn + 2 số cuối đỏ */
.xs-db-big     { font-size: 15px; font-weight: 700; color: #110000; }
.xs-db-big .hi { color: #c8001e; }

/* Responsive mobile */
@media(max-width:580px) {
  .kqxs-table td { padding: 5px 4px; font-size: 12px; }
  .kqxs-table td strong { font-size: 14px; }
  .xs-stat-tab { padding: 8px 10px; font-size: 12px; }
  .xs-db-calendar td { padding: 5px 3px; font-size: 11px; min-width: 40px; }
  .xs-db-calendar td .db-num { font-size: 12px; }
}

/* ══ AZ24 THỐNG KÊ - Lô gan ══ */
.lkh-logan-wrap { background: #fff; }
.lkh-logan-tabs { display: flex; border-bottom: 2px solid #e0e0e0; background: #fff; overflow-x: auto; }
.lkh-logan-tab { padding: 9px 16px; font-size: 13px; font-weight: 600; color: #555; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; text-decoration: none; cursor: pointer; }
.lkh-logan-tab.on, .lkh-logan-tab.active { color: #e65000; border-bottom-color: #e65000; }

/* Bảng lô gan: Bộ số | Ngày ra | Số ngày gan | Gan cực đại */
.lkh-logan-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.lkh-logan-tbl th { background: #e65000; color: #fff; padding: 8px 10px; text-align: center; font-weight: 700; border: 1px solid #c85000; }
.lkh-logan-tbl td { border: 1px solid #eee; padding: 7px 10px; text-align: center; }
.lkh-logan-tbl tbody tr:nth-child(odd) td { background: #fff; }
.lkh-logan-tbl tbody tr:nth-child(even) td { background: #fff8f0; }
.lkh-logan-tbl td:first-child { font-size: 16px; font-weight: 700; color: #c8001e; }
.lkh-logan-tbl td strong { color: #c8001e; font-size: 16px; }

/* Dropdown chọn số ngày */
.lkh-days-select { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #eee; font-size: 13px; flex-wrap: wrap; }
.lkh-days-select select { padding: 4px 8px; border: 1px solid #ddd; border-radius: 3px; font-size: 13px; }
.lkh-days-select button, .lkh-view-btn { padding: 5px 16px; background: #c8001e; color: #fff; border: none; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 3px; font-family: inherit; }
.lkh-days-select button:hover, .lkh-view-btn:hover { background: #a0001a; }

/* Tags tỉnh */
.lkh-tinh-tags { padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 5px; border-bottom: 1px solid #eee; align-items: center; font-size: 13px; color: #666; }
.lkh-tinh-tag { padding: 3px 10px; background: #fff3e0; border: 1px solid #ffcc80; border-radius: 3px; font-size: 12px; color: #e65000; text-decoration: none; }
.lkh-tinh-tag:hover { background: #ffcc80; }

/* Bảng 2 số cuối GĐB */
.lkh-db-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.lkh-db-tbl th { background: #e65000; color: #fff; padding: 8px 10px; text-align: center; font-weight: 700; border: 1px solid #c85000; }
.lkh-db-tbl td { border: 1px solid #eee; padding: 7px 10px; text-align: center; }
.lkh-db-tbl tbody tr:nth-child(odd) td { background: #fff; }
.lkh-db-tbl tbody tr:nth-child(even) td { background: #fff8f0; }
.lkh-db-tbl td .hi { color: #c8001e; font-weight: 700; }
.lkh-db-tbl tfoot td { background: #fff3e0; }

/* Bảng tần suất 5 cột */
.lkh-tansuat-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.lkh-tansuat-tbl th { background: #e65000; color: #fff; padding: 8px; text-align: center; font-weight: 700; border: 1px solid #c85000; }
.lkh-tansuat-tbl td { border: 1px solid #ffe0c0; padding: 6px 8px; text-align: center; }
.lkh-tansuat-tbl tbody tr:nth-child(odd) td { background: #fff; }
.lkh-tansuat-tbl tbody tr:nth-child(even) td { background: #fff8f0; }
.lkh-tansuat-tbl td .num { font-size: 15px; font-weight: 700; color: #c8001e; display: block; }
.lkh-tansuat-tbl td .cnt { font-size: 12px; color: #666; display: block; margin-top: 2px; }

/* Bảng chạm: đầu/đuôi/tổng */
.lkh-cham-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.lkh-cham-tbl th { background: #e65000; color: #fff; padding: 8px 10px; text-align: center; font-weight: 700; border: 1px solid #c85000; }
.lkh-cham-tbl td { border: 1px solid #ffe0c0; padding: 7px 10px; text-align: center; }
.lkh-cham-tbl tbody tr:nth-child(odd) td { background: #fff; }
.lkh-cham-tbl tbody tr:nth-child(even) td { background: #fff8f0; }
.lkh-cham-tbl td strong { color: #c8001e; }

/* Bảng GĐB 100 ngày (lịch 7 cột) */
.lkh-lich-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.lkh-lich-tbl th { background: #ffd5b0; color: #c85000; padding: 7px 4px; text-align: center; font-weight: 700; border: 1px solid #f0c080; }
.lkh-lich-tbl td { border: 1px solid #f0ece8; padding: 7px 4px; text-align: center; vertical-align: top; min-width: 56px; }
.lkh-lich-tbl tr:nth-child(even) td { background: #fdf8f4; }
.lkh-lich-num { font-size: 14px; font-weight: 700; color: #110000; }
.lkh-lich-num .hi { color: #c8001e; }
.lkh-lich-date { font-size: 10px; color: #999; display: block; margin-top: 2px; }
.lkh-lich-extra { font-size: 10px; color: #110000; display: block; line-height: 1.4; }

/* Toggle đầu/đuôi/loto/tổng */
.lkh-toggle { display: flex; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #eee; flex-wrap: wrap; }
.lkh-toggle label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; color: #555; }
.lkh-toggle input[type=radio] { accent-color: #e65000; }

/* Bảng theo tháng: dropdown */
.lkh-thang-sel { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid #eee; font-size: 13px; }
.lkh-thang-sel select { padding: 4px 8px; border: 1px solid #ddd; border-radius: 3px; font-size: 13px; }

/* Bảng năm xưa */
.lkh-namxua-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.lkh-namxua-tbl th { background: #fff3e0; color: #c85000; padding: 7px 10px; font-weight: 700; text-align: center; border: 1px solid #ffcc80; }
.lkh-namxua-tbl td { border: 1px solid #eee; padding: 6px 10px; text-align: center; }
.lkh-namxua-tbl tbody tr:nth-child(odd) td { background: #fff; }
.lkh-namxua-tbl tbody tr:nth-child(even) td { background: #fafafa; }
.lkh-namxua-tbl td .hi { color: #c8001e; font-weight: 700; }

/* Breadcrumb thống kê */
.lkh-breadcrumb { padding: 6px 12px; font-size: 12px; color: #110000; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lkh-breadcrumb a { color: #0000FF; text-decoration: none; }
.lkh-breadcrumb a:hover { text-decoration: underline; }
.lkh-breadcrumb .sep { color: #ccc; }

/* Section header trong thống kê */
.lkh-sec-head { background: #e65000; color: #fff; padding: 9px 14px; font-size: 14px; font-weight: 700; margin: 0; }
.lkh-sec-head.red { background: #c8001e; }
.lkh-sec-head.dark { background: #110000; }

/* Xem thêm 00-99 */
.lkh-so-grid { display: flex; flex-wrap: wrap; gap: 3px; padding: 10px 12px; }
.lkh-so-tag { padding: 3px 8px; background: #fff3e0; border: 1px solid #ffcc80; border-radius: 3px; font-size: 12px; color: #c85000; text-decoration: none; }
.lkh-so-tag:hover { background: #ffcc80; }

/* Responsive */
@media(max-width:580px) {
  .lkh-logan-tbl td, .lkh-db-tbl td { padding: 5px 6px; font-size: 12px; }
  .lkh-lich-tbl td { padding: 5px 2px; min-width: 40px; }
  .lkh-lich-num { font-size: 12px; }
  .lkh-tansuat-tbl td { padding: 4px; }
  .lkh-cham-tbl { display: block; overflow-x: auto; }
}
