:root {
    /* Brand */
    --color-primary:       #d32d2d;
    --color-primary-dark:  #d32d2d;
    --color-primary-hover: #ee4b4b;
    --color-accent:        #ffd400;

    /* State */
    --color-success: #16a34a;
    --color-danger:  #dc2626;
    --color-warning: #f59e0b;
    --color-info:    #3b82f6;

    /* Neutral */
    --color-bg:      #f3f4f6;
    --color-surface: #ffffff;
    --color-border:  #e5e7eb;

    /* Text */
    --color-text:         #1f1f23;
    --color-text-muted:   #5c5c66;
    --color-text-inverse: #ffffff;
    --color-link:         var(--color-primary);

    /* Typography */
    --font-family-base:    sans-serif;
    --font-size-base:      14px;
    --font-size-sm:        12px;
    --font-size-md:        15px;
    --font-size-lg:        16px;
    --font-size-xl:        20px;
    --font-size-2xl:       26px;
    --line-height-base:    1.5;
    --font-weight-regular: 400;
    --font-weight-medium:  500;
    --font-weight-bold:    700;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* Layout */
    --container-max: 1200px;
    --header-height: 80px;
    --nav-height:    52px;
    --radius-sm:     3px;
    --radius:        6px;
    --radius-lg:     10px;
    --drawer-width:  310px;

    /* Effects */
    --shadow-sm:       0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow:          0 2px 6px rgba(0, 0, 0, 0.12);
    --shadow-lg:       0 8px 24px rgba(0, 0, 0, 0.14);
    --transition:      0.2s ease;
    --transition-slow: 0.3s ease;

    /* Z-index */
    --z-header:  100;
    --z-overlay: 190;
    --z-drawer:  200;
}

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-family-base);
    font-size:   var(--font-size-base);
    line-height: var(--line-height-base);
    color:       var(--color-text);
    background:  var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a        { color: var(--color-link); text-decoration: none; transition: color var(--transition); }
a:hover  { color: var(--color-primary-dark); }
ul       { list-style: none; margin: 0; padding: 0; }
button   { font-family: inherit; border: 0; background: transparent; cursor: pointer; color: inherit; }

body.is-locked { overflow: hidden; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    background: var(--color-surface);
    box-shadow: 0 1px 0 var(--color-border);
    position: relative;
    z-index: var(--z-header);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: var(--header-height);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-left: auto;
}

.header-date {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    margin-left: var(--space-5);
    padding-left: var(--space-5);
    border-left: 1px solid var(--color-border);
}

/* ---------- Account dropdown ---------- */
.account { position: relative; }

.account-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: var(--color-text);
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}
.account-btn i       { font-size: 18px; }
.account-btn .account-icon  { font-size: 28px; color: var(--color-primary); line-height: 1; }
.account-btn .account-caret { font-size: 11px; color: var(--color-text-muted); margin-left: 2px; transition: transform var(--transition); }
.account.is-open .account-btn .account-caret { transform: rotate(180deg); }
.account-btn:hover   { background: var(--color-bg); color: var(--color-primary); }
.account.is-open .account-btn { background: var(--color-bg); color: var(--color-primary); }

.account-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 60;
}
.account.is-open .account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px var(--space-4);
    color: var(--color-text);
    transition: background var(--transition), color var(--transition);
}
.account-menu-item i     { width: 16px; color: var(--color-text-muted); font-size: 14px; }
.account-menu-item:hover { background: var(--color-bg); color: var(--color-primary); }
.account-menu-item:hover i { color: var(--color-primary); }

/* ---------- Logo ---------- */
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}
.logo-img {
    display: block;
    height: 48px;
    width: auto;
}

/* ---------- Hamburger ---------- */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    padding: 0;
}
.menu-toggle:hover   { background: var(--color-bg); }
.menu-toggle svg     { display: block; }

/* ==========================================================================
   NAVBAR (desktop)
   ========================================================================== */
.navbar {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.navbar-list {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.navbar-item { position: relative; }

.navbar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-inverse);
    padding: 0 var(--space-4);
    height: var(--nav-height);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    transition: background var(--transition);
    position: relative;
}

.navbar-item-home .navbar-link {
    font-size: 16px;
    padding: 0 var(--space-5);
}

.navbar-link:hover,
.navbar-item:hover > .navbar-link,
.navbar-item.is-active > .navbar-link {
    background: var(--color-primary-dark);
    color: var(--color-accent);
}

/* ---------- Dropdown ---------- */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 50;
    padding: 4px 0;
}
.has-dropdown:hover        > .dropdown,
.has-dropdown:focus-within > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 11px var(--space-5);
    color: var(--color-text);
    border-bottom: 1px solid #f0f0f2;
}
.dropdown li:last-child a { border-bottom: 0; }
.dropdown li a:hover      { color: var(--color-primary); background: #fafafa; }

/* ==========================================================================
   DRAWER (mobile)
   ========================================================================== */
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--drawer-width);
    max-width: 85vw;
    background: var(--color-surface);
    z-index: var(--z-drawer);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    background: #f6f8fb;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1;
}

.drawer-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
    color: var(--color-text-muted);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}
.drawer-close:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.logo-drawer { padding: 0; flex: 1; min-width: 0; }
.logo-drawer .logo-img { height: 42px; }

.drawer-nav  { padding: 0; flex: 1; }
.drawer-item { border-bottom: 1px solid var(--color-border); }

.drawer-row {
    display: flex;
    align-items: center;
    transition: background var(--transition);
}
.drawer-row:hover { background: #fafbfc; }

.drawer-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 14px var(--space-4);
    color: var(--color-text);
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    flex: 1;
    min-width: 0;
    transition: color var(--transition);
}

.drawer-label { flex: 1; }

.drawer-expand {
    width: 36px;
    height: 36px;
    color: var(--color-text-muted);
    font-size: 12px;
    transition: transform var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.has-submenu.is-open .drawer-expand { transform: rotate(180deg); }

.drawer-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    background: #fff;
}
.has-submenu.is-open .drawer-sub { max-height: 600px; }

.drawer-sub li a {
    display: block;
    padding: 11px var(--space-6) 11px var(--space-8);
    color: var(--color-text);
    font-size: 14px;
}
.drawer-sub li a:hover {
    color: var(--color-primary);
    background: #fafbfc;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.site-main { padding: var(--space-2) 0; min-height: 50vh; }

/* ---------- 3-column layout ---------- */
.layout-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 260px;
    gap: var(--space-2);
    padding: 0 var(--space-2);
    align-items: start;
}

.main-content { min-width: 0; }

.layout-grid--center { grid-template-columns: minmax(0, 1fr); }
.layout-grid--center > .main-content { grid-column: 1; }

.layout-grid--no-left { grid-template-columns: minmax(0, 1fr) 260px; }

.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--gap, var(--space-3));
}

.sidebar-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    margin: 0 0 var(--space-3);
    color: var(--color-primary);
    font-size: var(--font-size-lg);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-text { margin: 0; color: var(--color-text-muted); font-size: var(--font-size-sm); }

/* ==========================================================================
   RESULT CALENDAR (sidebar widget)
   ========================================================================== */
.result-calendar { padding: 0; overflow: hidden; border: 0; }

.widget-title {
    background: var(--color-primary);
    color: #fff;
    font-size: var(--font-size-md);
    text-transform: uppercase;
    margin: 0;
    padding: 10px 12px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    cursor: pointer;
    user-select: none;
}

.widget-toggle-icon {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.85;
    transition: transform var(--transition), opacity var(--transition);
}

.widget-title:hover .widget-toggle-icon,
.widget-title:focus-visible .widget-toggle-icon { opacity: 1; }

.sidebar-box.is-collapsed .widget-toggle-icon { transform: rotate(180deg); }

.sidebar-box.is-collapsed > *:not(.widget-title) { display: none; }

.result-calendar-body { position: relative; transition: opacity var(--transition); }
.result-calendar-body.is-loading { opacity: 0.55; pointer-events: none; }

.result-calendar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px var(--space-2);
    background: var(--color-surface);
    flex-wrap: nowrap;
}

.result-calendar-arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 28px;
    padding: 0;
    border: none;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.result-calendar-arrow:hover { background: var(--color-bg); color: var(--color-text); }

.result-calendar-select {
    flex: 0 1 auto;
    min-width: 0;
    height: 28px;
    padding: 0 20px 0 8px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%235c5c66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
    font-size: var(--font-size-sm);
    line-height: 1;
    color: var(--color-text);
    cursor: pointer;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.result-calendar-select:hover { border-color: #c9c9d2; }
.result-calendar-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(5, 126, 134, 0.15);
}

.result-calendar-today {
    flex: 0 0 auto;
    height: 28px;
    margin-left: auto;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.result-calendar-today:hover { background: #e9e9ee; border-color: #c9c9d2; }

.result-calendar-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--color-surface);
}

.result-calendar-grid th {
    padding: 6px 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    text-align: center;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.result-calendar-cell {
    padding: 0;
    vertical-align: top;
    border: 1px solid var(--color-border);
}

.result-calendar-day {
    position: relative;
    display: block;
    min-height: 46px;
    padding: 5px 6px 4px;
    color: var(--color-text);
    text-decoration: none;
    transition: background var(--transition);
}
.result-calendar-day:hover { background: var(--color-bg); }

.result-calendar-solar {
    display: block;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1;
}

.result-calendar-lunar {
    position: absolute;
    right: 6px;
    bottom: 4px;
    font-size: 11px;
    color: #9a9aa3;
    line-height: 1;
}

.result-calendar-dot {
    position: absolute;
    top: 8px;
    right: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
}
.result-calendar-dot.is-good { background: var(--color-danger); }
.result-calendar-dot.is-bad  { background: #1f1f23; }

.result-calendar-cell.is-sunday .result-calendar-solar { color: var(--color-danger); }

.result-calendar-cell.is-out .result-calendar-day { opacity: 0.1; }
.result-calendar-cell.is-out .result-calendar-day:hover { opacity: 0.4; }

.result-calendar-cell.is-today .result-calendar-day { background: #d8ecee; }
.result-calendar-cell.is-today .result-calendar-solar { color: var(--color-primary); font-weight: var(--font-weight-bold); }

.result-calendar-cell.is-active .result-calendar-day {
    background: var(--color-primary);
}
.result-calendar-cell.is-active .result-calendar-solar,
.result-calendar-cell.is-active .result-calendar-lunar { color: var(--color-text-inverse); }
.result-calendar-cell.is-active.is-sunday .result-calendar-solar { color: var(--color-text-inverse); }

/* ==========================================================================
   QUICK LINKS (sidebar widget — danh sách liên kết)
   ========================================================================== */
.quick-links { padding: 0; overflow: hidden; border: 0; }

.xoso-tinh-widget { padding: var(--space-1) var(--space-2); }

.xoso-tinh-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.xoso-tinh-list.columns-1 { grid-template-columns: 1fr; }
.xoso-tinh-list.columns-2 { grid-template-columns: 1fr 1fr; }
.xoso-tinh-list.columns-3 { grid-template-columns: 1fr 1fr 1fr; }

.xoso-tinh-list li {
    border-bottom: 1px dashed var(--color-border);
}

.xoso-tinh-list.columns-1 li:last-child,
.xoso-tinh-list.columns-2 li:nth-last-child(-n+2),
.xoso-tinh-list.columns-3 li:nth-last-child(-n+3) {
    border-bottom: none;
}

.xoso-tinh-list li.empty { border-bottom: none; }

.xoso-tinh-list li a {
    display: flex;
    align-items: center;
    position: relative;
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size-md);
    transition: color var(--transition);
}

.xoso-tinh-list li a::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    border-top: 4px dashed;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    color: var(--color-primary);
}

.xoso-tinh-list li a:hover { color: var(--color-primary); }
.xoso-tinh-list li a:hover::before { color: var(--color-primary-hover); }

.xoso-tinh-list li.today > a {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
}

.xoso-tinh-gio {
    margin-left: auto;
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-regular);
}

.xoso-tinh-today-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    margin-left: auto;
    font-size: 7px;
    color: #fff;
    background: var(--color-primary);
    border-radius: 50%;
    vertical-align: middle;
    animation: xoso-pulse 2s ease-in-out infinite;
}

@keyframes xoso-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(5, 126, 134, 0.4); }
    50%      { box-shadow: 0 0 0 4px rgba(5, 126, 134, 0); }
}

/* ==========================================================================
   SIDEBAR ARTICLES (danh sách bài viết theo chuyên mục)
   ========================================================================== */
.sidebar-articles-box { padding: 0; overflow: hidden; border: 0; }

.sidebar-articles-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-articles-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px var(--space-3);
    border-bottom: 1px dashed var(--color-border);
}

.sidebar-articles-item:last-child { border-bottom: none; }

.sidebar-articles-thumb {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--color-surface-alt, #f1f5f9);
    color: var(--color-text-muted);
    text-decoration: none;
}

.sidebar-articles-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-articles-body {
    flex: 1 1 auto;
    min-width: 0;
}

.sidebar-articles-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    text-decoration: none;
    transition: color var(--transition);
}

.sidebar-articles-title:hover { color: var(--color-primary); }

/* Tùy chọn hiển thị theo thiết bị (breakpoint 1024px = ngưỡng ẩn sidebar phải) */
.sidebar-articles-box--mobile { display: none; }
@media (max-width: 1024px) {
    .sidebar-articles-box--desktop { display: none; }
    .sidebar-articles-box--mobile  { display: block; }
}

/* ==========================================================================
   DRAW SCHEDULE (lịch mở thưởng hôm nay)
   ========================================================================== */
.draw-schedule {
    padding: 0;
    overflow: hidden;
    border: 0;
    margin-bottom: var(--gap, var(--space-3));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.draw-schedule-title {
    background: var(--color-primary);
    color: #fff;
    font-size: var(--font-size-md);
    text-align: center;
    margin: 0;
    padding: 10px 12px;
}

.draw-schedule-tabs {
    display: flex;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.draw-schedule-tab {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    border: 0;
    border-right: 1px solid var(--color-border);
    background: transparent;
    cursor: pointer;
}

.draw-schedule-tab:last-child {
    border-right: none;
}

.draw-schedule-tab.is-active {
    background: var(--color-primary);
    color: #fff;
}

.draw-schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}

.draw-schedule-table th {
    padding: 8px 6px;
    background: #e8f5f5;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.draw-schedule-region {
    color: var(--color-primary);
    text-decoration: none;
}

.draw-schedule-region:hover {
    text-decoration: underline;
}

.draw-schedule-time {
    font-weight: 400;
    font-size: 11px;
    color: var(--color-primary);
}

.draw-schedule-table td {
    padding: 6px 8px;
    text-align: center;
    font-size: var(--font-size-sm);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.draw-schedule-table tr > th:last-child,
.draw-schedule-table tr > td:last-child {
    border-right: 0;
}

.draw-schedule-table tbody tr:last-child td {
    border-bottom: 0;
}

.draw-schedule-province {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
}

.draw-schedule-province:hover {
    color: var(--color-primary);
}

.draw-schedule-tab-short {
    display: none;
}

@media (max-width: 768px) {
    .draw-schedule-tab-full {
        display: none;
    }
    .draw-schedule-tab-short {
        display: inline;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: #2b2b33;
    color: #e7e7ea;
    padding: var(--space-6) 0 var(--space-5);
}

.footer-heading {
    margin: 0 0 var(--space-3);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
}

.footer-menu {
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-5);
}
.footer-menu-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
    align-items: center;
}
.footer-menu-list a {
    color: #e7e7ea;
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    transition: color var(--transition);
}
.footer-menu-list a:hover { color: var(--color-accent); }

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    color: #b9b9c0;
    line-height: 1.7;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-5);
}
.footer-col {
    flex: 1;
    min-width: 220px;
}
.footer-text                 { margin: 0; }
.footer-text p               { margin: 0 0 var(--space-2); }
.footer-text p:last-child    { margin-bottom: 0; }
.footer-text ul,
.footer-text ol              { padding-left: 0; list-style: none; margin: 0; }
.footer-text ul li,
.footer-text ol li           { margin-bottom: var(--space-2); }
.footer-text a               { color: #b9b9c0; transition: color var(--transition); }
.footer-text a:hover         { color: var(--color-accent); }
.footer-text h2,
.footer-text h3              { color: #e7e7ea; margin: 0 0 var(--space-2); font-size: var(--font-size-base); }

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--space-4);
    font-size: var(--font-size-sm);
    text-align: center;
    opacity: 0.8;
}
.site-footer-bottom.is-flush {
    border-top: 0;
    padding-top: 0;
}

/* ==========================================================================
   AUTH (login / register / forgot password)
   ========================================================================== */
.auth-container {
    display: flex;
    justify-content: center;
    padding: var(--space-6) var(--space-4);
}

.auth-card {
    width: 100%;
    max-width: 720px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.auth-title {
    margin: 0 0 var(--space-2) 0;
    font-size: var(--font-size-2xl);
    color: var(--color-primary-dark);
}

.auth-subtitle {
    margin: 0 0 var(--space-5) 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

.auth-form { display: flex; flex-direction: column; gap: var(--space-4); }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}
.auth-optional { color: var(--color-text-muted); font-weight: var(--font-weight-regular); font-size: var(--font-size-sm); }
.auth-required { color: #c0392b; margin-left: 4px; font-weight: var(--font-weight-bold); }

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    font-size: var(--font-size-base);
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.auth-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(5, 126, 134, 0.15);
}
.auth-form input.is-invalid { border-color: #c0392b; }
.auth-form input.is-valid { border-color: #16a085; }
.auth-form input[readonly] { background: var(--color-bg); color: var(--color-text-muted); }

.auth-hint { color: var(--color-text-muted); font-size: var(--font-size-sm); }

.auth-strength {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}
.auth-strength-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
.auth-strength-bars span {
    height: 4px;
    border-radius: 2px;
    background: var(--color-border);
    transition: background var(--transition);
}
.auth-strength[data-level="1"] .auth-strength-bars span:nth-child(-n+1) { background: #c0392b; }
.auth-strength[data-level="2"] .auth-strength-bars span:nth-child(-n+2) { background: #e67e22; }
.auth-strength[data-level="3"] .auth-strength-bars span:nth-child(-n+3) { background: #f1c40f; }
.auth-strength[data-level="4"] .auth-strength-bars span                 { background: #16a085; }
.auth-strength-label { font-size: var(--font-size-sm); color: var(--color-text-muted); }
.auth-strength[data-level="1"] .auth-strength-label { color: #c0392b; }
.auth-strength[data-level="2"] .auth-strength-label { color: #d35400; }
.auth-strength[data-level="3"] .auth-strength-label { color: #b7950b; }
.auth-strength[data-level="4"] .auth-strength-label { color: #16a085; }

.auth-error {
    color: #c0392b;
    font-size: var(--font-size-sm);
}
.auth-success {
    color: #16a085;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-alert {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    margin-bottom: var(--space-2);
}
.auth-alert-success { background: #e6f6f1; color: #0f6b4f; border: 1px solid #b7e3d2; }

.auth-password-wrap { position: relative; }
.auth-password-wrap input { padding-right: 44px; }
.auth-password-toggle {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
}
.auth-password-toggle:hover { color: var(--color-primary); background: var(--color-bg); }

.auth-captcha {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 6px;
}
.auth-captcha-img {
    height: 38px;
    width: 120px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: #fff;
    object-fit: cover;
    user-select: none;
}
.auth-captcha-reload {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    border: 0;
    color: var(--color-text-muted);
    background: transparent;
}
.auth-captcha-reload:hover { color: var(--color-primary); background: var(--color-bg); }

.auth-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--color-text);
}
.auth-checkbox input { width: 16px; height: 16px; accent-color: var(--color-primary); }

.auth-link { color: var(--color-primary); font-weight: var(--font-weight-medium); }
.auth-link:hover { color: var(--color-primary-dark); text-decoration: underline; }

.auth-btn {
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    transition: background var(--transition), transform var(--transition);
}
.auth-btn:hover { background: var(--color-primary-dark); }
.auth-btn:active { transform: translateY(1px); }

.auth-btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}
.auth-btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.auth-actions { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-4); }

.flash-message {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
    font-size: var(--font-size-base);
}
.flash-success { background: #e6f6f1; color: #0f6b4f; border: 1px solid #b7e3d2; }

.verify-banner {
    background: #fff7e6;
    border-bottom: 1px solid #ffd591;
    color: #874d00;
    padding: 10px 0;
    font-size: var(--font-size-base);
}
.verify-banner .container {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.verify-banner-form { display: inline; margin: 0; }
.verify-banner-link {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
    text-decoration: underline;
    background: transparent;
    padding: 0;
}
.verify-banner-link:hover { color: var(--color-primary-dark); }

.profile-page { max-width: 1200px; }
.profile-title {
    background: var(--color-primary);
    color: #fff;
    padding: 10px 12px;
    margin: 0;
    max-width: 720px;
    text-align: center;
    text-transform: uppercase;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.profile-grid > .profile-card-avatar {
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.profile-grid {
    display: grid;
    gap: var(--space-3);
    grid-template-columns: 1fr;
    align-items: start;
    max-width: 720px;
}

.profile-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-4) var(--space-5, 24px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.profile-section-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    margin: 0 0 var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.profile-form { display: flex; flex-direction: column; gap: var(--space-3); }
.profile-form .auth-field { gap: 6px; }
.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="tel"],
.profile-form input[type="password"] {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.profile-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(237, 137, 54, 0.12);
}
.profile-form input[readonly] {
    background: var(--color-bg);
    color: var(--color-text-muted);
    cursor: not-allowed;
}
.profile-form input.is-invalid { border-color: #c0392b; }

.profile-form .auth-btn { width: 100%; padding: 12px 24px; font-size: var(--font-size-base); margin-top: var(--space-2); }
.profile-form-inline { display: none; }

/* Tabs */
.profile-card-tabs { padding: 0; overflow: hidden; }
.profile-tabs { display: block; }
.profile-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}
.profile-tab-btn {
    background: transparent;
    border: 0;
    padding: 14px 20px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
}
.profile-tab-btn:hover { color: var(--color-text); }
.profile-tabs[data-active="info"] .profile-tab-btn[data-tab="info"],
.profile-tabs[data-active="follow"] .profile-tab-btn[data-tab="follow"],
.profile-tabs[data-active="wallet"] .profile-tab-btn[data-tab="wallet"],
.profile-tabs[data-active="password"] .profile-tab-btn[data-tab="password"] {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: var(--color-surface);
}
.profile-tab-panel { display: none; padding: var(--space-4) var(--space-5, 24px); }
.profile-tabs[data-active="info"] .profile-tab-panel[data-panel="info"],
.profile-tabs[data-active="follow"] .profile-tab-panel[data-panel="follow"],
.profile-tabs[data-active="wallet"] .profile-tab-panel[data-panel="wallet"],
.profile-tabs[data-active="password"] .profile-tab-panel[data-panel="password"] {
    display: block;
}

/* ===== Wallet tab ===== */
.profile-tab-panel[data-panel="wallet"] { padding: 0; }
.wallet-balance-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.wallet-balance-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.wallet-balance-label::before {
    content: '\f51e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #f59e0b;
    font-size: 16px;
}
.wallet-balance-value {
    font-size: 22px;
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-right: auto;
    line-height: 1;
}
.wallet-balance-value i { display: none; }
.wallet-balance-value small {
    font-size: 13px;
    font-weight: var(--font-weight-regular);
    color: var(--color-text-muted);
}
.wallet-balance-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    transition: background .15s;
}
.wallet-balance-cta:hover { background: var(--color-primary-dark); color: #fff; }

.wallet-empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: 40px 20px;
}
.wallet-empty i { font-size: 36px; opacity: .4; margin-bottom: 8px; display: block; }

.wallet-tx-list { list-style: none; margin: 0; padding: 0; }
.wallet-tx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    border-bottom: 1px solid var(--color-border);
}
.wallet-tx-item:last-child { border-bottom: 0; }
.wallet-tx-icon {
    flex: 0 0 36px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f1f4f7;
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.wallet-tx-bet     .wallet-tx-icon { background: #fff5f5; color: #c81d25; }
.wallet-tx-win     .wallet-tx-icon { background: #fff8e1; color: #f59e0b; }
.wallet-tx-refund  .wallet-tx-icon { background: #e0f2fe; color: #0284c7; }
.wallet-tx-topup   .wallet-tx-icon,
.wallet-tx-bonus   .wallet-tx-icon,
.wallet-tx-transfer-in .wallet-tx-icon { background: #e6f4ea; color: #1a7f37; }
.wallet-tx-withdraw .wallet-tx-icon,
.wallet-tx-transfer-out .wallet-tx-icon { background: #fde7e9; color: #c81d25; }

.wallet-tx-main { flex: 1; min-width: 0; }
.wallet-tx-label {
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.wallet-tx-note {
    font-weight: var(--font-weight-regular);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}
.wallet-tx-time {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.wallet-tx-time i { margin-right: 4px; }

.wallet-tx-amount {
    text-align: right;
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    line-height: 1.2;
}
.wallet-tx-amount.is-pos { color: #1a7f37; }
.wallet-tx-amount.is-neg { color: #c81d25; }
.wallet-tx-amount small { font-weight: var(--font-weight-regular); color: var(--color-text-muted); font-size: 11px; }
.wallet-tx-balance {
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-regular);
    margin-top: 2px;
}

.wallet-pager {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.wallet-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all .15s;
}
.wallet-pager-btn:hover,
.wallet-pager-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ===== Transfer Xu modal ===== */
.transfer-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: transferFadeIn .18s ease-out;
}
.transfer-modal[hidden] { display: none !important; }
@keyframes transferFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes transferSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.transfer-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}
.transfer-dialog {
    position: relative;
    width: 100%; max-width: 440px;
    background: var(--color-surface);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    max-height: calc(100vh - 32px);
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: transferSlideUp .22s cubic-bezier(.2,.8,.2,1);
}
.transfer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    background: var(--color-primary);
    color: #fff;
}
.transfer-head h3 {
    margin: 0;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    display: inline-flex; align-items: center; gap: 8px;
}
.transfer-head h3 i { font-size: 15px; opacity: .95; }
.transfer-close {
    background: rgba(255, 255, 255, .15);
    border: 0; color: #fff;
    font-size: 18px; line-height: 1; cursor: pointer;
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.transfer-close:hover { background: rgba(255, 255, 255, .28); }

.transfer-form {
    padding: 18px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 14px;
}

/* Số dư khả dụng — card nổi bật */
.transfer-balance-line {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: #fef9c3;
    border-left: 3px solid #f59e0b;
    font-size: var(--font-size-sm);
    color: #78350f;
}
.transfer-balance-line::before {
    content: '\f51e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #f59e0b;
    font-size: 16px;
}
.transfer-balance-line b {
    color: var(--color-primary-dark);
    font-size: var(--font-size-md);
    margin-left: auto;
    font-weight: var(--font-weight-bold);
}

/* Label */
.transfer-form .auth-field label {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    font-size: var(--font-size-sm);
}

/* Inputs */
.transfer-form .auth-field input[type="text"],
.transfer-form .auth-field input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    font-size: var(--font-size-base);
    font-family: inherit;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color .15s, box-shadow .15s;
}
.transfer-form .auth-field input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(5, 126, 134, 0.12);
}
.transfer-form .auth-field input::placeholder {
    color: #b0b8c1;
    font-size: 13px;
}
.transfer-form .auth-hint {
    color: var(--color-text-muted);
    font-size: 12px;
    margin-top: 2px;
}

/* Autocomplete dropdown */
.transfer-recipient-field { position: relative; }
.transfer-suggest {
    position: absolute;
    top: 100%; left: 0; right: 0;
    margin-top: 2px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    z-index: 5;
    max-height: 220px;
    overflow-y: auto;
}
.transfer-suggest-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background .12s;
}
.transfer-suggest-item:last-child { border-bottom: 0; }
.transfer-suggest-item:hover { background: var(--color-bg); }
.transfer-suggest-item img {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
    flex: 0 0 34px;
    border: 2px solid var(--color-surface);
    box-shadow: 0 0 0 1px var(--color-border);
}
.transfer-suggest-name {
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    line-height: 1.3;
}
.transfer-suggest-login {
    color: var(--color-text-muted);
    font-size: 12px;
}

/* Error */
.transfer-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 12px;
    font-size: var(--font-size-sm);
    border-left: 3px solid #dc2626;
    display: flex;
    align-items: center;
    gap: 8px;
}
.transfer-error[hidden] { display: none; }
.transfer-error::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #dc2626;
}

/* Actions */
.transfer-actions {
    display: flex; gap: 10px;
    margin-top: 6px;
}
.transfer-actions .auth-btn {
    padding: 11px 16px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: all .15s;
}
.transfer-actions .auth-btn:not(.auth-btn-secondary) {
    flex: 1.4;
    background: var(--color-primary);
    color: #fff;
    border: 0;
}
.transfer-actions .auth-btn:not(.auth-btn-secondary):hover:not(:disabled) {
    background: var(--color-primary-dark);
}
.transfer-actions .auth-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}
.transfer-actions .auth-btn-secondary {
    flex: 1;
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
.transfer-actions .auth-btn-secondary:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

button.wallet-balance-cta {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}
.profile-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text-muted, #6b7280);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}
.profile-tabs[data-active="follow"] .profile-tab-btn[data-tab="follow"] .profile-tab-count {
    background: var(--color-primary);
    color: #fff;
}

/* Theo dõi sub-tabs + list */
.follow-tabs { display: flex; flex-direction: column; gap: 16px; }
.follow-subnav {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    align-self: flex-start;
}
.follow-subnav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--color-text-muted, #6b7280);
    font-size: var(--font-size-sm, 14px);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.follow-subnav-btn:hover { color: var(--color-text); }
.follow-tabs[data-follow-active="following"] .follow-subnav-btn[data-subtab="following"],
.follow-tabs[data-follow-active="followers"] .follow-subnav-btn[data-subtab="followers"],
.follow-tabs[data-follow-active="blocked"] .follow-subnav-btn[data-subtab="blocked"] {
    background: var(--color-surface);
    color: var(--color-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.follow-subnav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 11px;
    font-weight: 600;
}

.follow-subpanel { display: none; flex-direction: column; gap: 8px; }
.follow-tabs[data-follow-active="following"] .follow-subpanel[data-subpanel="following"],
.follow-tabs[data-follow-active="followers"] .follow-subpanel[data-subpanel="followers"],
.follow-tabs[data-follow-active="blocked"] .follow-subpanel[data-subpanel="blocked"] {
    display: flex;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    transition: background 0.15s;
}
.follow-item:hover { background: var(--color-bg); }

.follow-avatar-link { flex-shrink: 0; line-height: 0; }
.follow-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.follow-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.follow-name {
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.follow-name:hover { color: var(--color-primary); }
.follow-username {
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
}

.follow-action-form { margin: 0; }
.follow-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    width: auto;
    flex-shrink: 0;
}
.follow-btn-danger { color: #b91c1c; border-color: rgba(220, 38, 38, 0.3); }
.follow-btn-danger:hover { background: rgba(220, 38, 38, 0.06); }

.follow-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--color-text-muted, #6b7280);
}
.follow-empty i { font-size: 36px; margin-bottom: 10px; opacity: 0.5; }
.follow-empty p { margin: 0; font-size: var(--font-size-sm, 14px); }

@media (max-width: 480px) {
    .follow-item { flex-wrap: wrap; }
    .follow-action-form { width: 100%; }
    .follow-btn-sm { width: 100%; justify-content: center; }
}

/* Avatar card */
.profile-card-avatar { display: flex; flex-direction: column; align-items: center; }
.profile-card-avatar .profile-section-title { width: 100%; text-align: left; }
.profile-avatar-wrap {
    display: flex;
    justify-content: center;
    padding: var(--space-3) 0 var(--space-3);
}
.profile-avatar-box {
    position: relative;
    width: 140px;
    height: 140px;
}
.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-surface);
    box-shadow: 0 0 0 1px var(--color-border), 0 4px 12px rgba(0,0,0,0.08);
    background: var(--color-bg);
    display: block;
}
.profile-avatar-cam {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border: 3px solid var(--color-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    transition: background var(--transition), transform var(--transition);
    padding: 0;
    z-index: 1;
}
.profile-avatar-cam:hover { background: var(--color-primary-dark); transform: scale(1.05); }
.profile-avatar-cam i { font-size: 14px; }
.profile-avatar-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: -40px;
    min-width: 170px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.profile-avatar-menu[hidden] { display: none; }
.profile-avatar-menu-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text);
    font-size: var(--font-size-base);
    width: 100%;
    transition: background var(--transition), color var(--transition);
}
.profile-avatar-menu-item:hover { background: var(--color-bg); color: var(--color-primary); }
.profile-avatar-menu-item i { width: 16px; text-align: center; }
.profile-avatar-menu-danger:hover { color: #c0392b; background: #fdecea; }
.avatar-hint { display: block; text-align: center; color: var(--color-text-muted); }

/* Cropper modal */
.cropper-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cropper-modal[hidden] { display: none; }
.cropper-modal[hidden] { display: none; }
.cropper-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}
.cropper-dialog {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    width: min(440px, 100%);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.cropper-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
}
.cropper-head h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}
.cropper-close {
    background: transparent;
    border: 0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0 6px;
}
.cropper-close:hover { color: var(--color-text); }
.cropper-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #1a1a1a;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    cursor: grab;
}
.cropper-stage.dragging { cursor: grabbing; }
.cropper-stage img {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
    max-width: none;
}
.cropper-mask {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.55);
    border: 2px solid #fff;
    pointer-events: none;
    z-index: 1;
}
.cropper-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
}
.cropper-controls input[type="range"] { flex: 1; accent-color: var(--color-primary); }
.cropper-controls i { color: var(--color-text-muted); }
.cropper-error {
    padding: 10px 18px;
    color: #c0392b;
    font-size: var(--font-size-sm);
    background: #fdecea;
    border-bottom: 1px solid #f5b7b1;
}
.cropper-actions {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
}
.cropper-actions .auth-btn {
    flex: 1;
    width: auto;
    margin: 0;
    padding: 11px 16px;
}

/* Hints + verified states */
.profile-form .auth-hint { font-size: var(--font-size-sm); color: var(--color-text-muted); }
.profile-verified, .profile-unverified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    margin-top: 4px;
}
.profile-verified { color: #16a085; }
.profile-unverified { color: #c0392b; }

.account-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.breadcrumbs {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 10px 0;
    font-size: var(--font-size-sm);
}
.breadcrumbs-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.breadcrumbs-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.breadcrumbs-link {
    color: var(--color-text-muted);
    transition: color var(--transition);
}
.breadcrumbs-link:hover { color: var(--color-primary); }
.breadcrumbs-current {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}
.breadcrumbs-separator {
    color: var(--color-text-muted);
    user-select: none;
}

.auth-footer-text {
    text-align: center;
    margin: var(--space-2) 0 0;
    color: var(--color-text-muted);
}

/* ---------- Logged-in user dropdown ---------- */
.account-user-info { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); }
.account-user-name { font-weight: var(--font-weight-bold); color: var(--color-text); }
.account-user-email { font-size: var(--font-size-sm); color: var(--color-text-muted); word-break: break-all; }
.account-user-balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}
.account-user-balance i { color: #f59e0b; font-size: 13px; }
.account-user-balance small { color: var(--color-text-muted); font-weight: var(--font-weight-regular); font-size: 11px; }
.account-menu-form { margin: 0; }
.account-menu-form button {
    width: 100%;
    text-align: left;
    padding: 10px var(--space-4);
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.account-menu-form button:hover { background: var(--color-bg); color: var(--color-primary); }

@media (max-width: 480px) {
    .auth-card { padding: var(--space-4); }
    .auth-captcha-img { height: 34px; width: 108px; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .navbar-link { padding: 0 var(--space-3); font-size: 12px; }
    .header-date { display: none; }

    .layout-grid { grid-template-columns: 260px minmax(0, 1fr); }
    .layout-grid--center { grid-template-columns: 1fr; }
    .layout-grid--center > .main-content { grid-column: 1; }
    .layout-grid--no-left { grid-template-columns: minmax(0, 1fr); }
    .sidebar-right > *:not(.sidebar-articles-box) { display: none; }
    .sidebar-right { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root { --header-height: 64px; --nav-height: 44px; }

    .site-main { padding: var(--space-2) 0; }
    .layout-grid { grid-template-columns: 1fr; gap: var(--space-2); padding: 0 var(--space-2); }
    .layout-grid--center > .main-content { grid-column: 1; }
    .sidebar-left { display: none; }

    .menu-toggle { display: inline-flex; }

    .header-inner { gap: var(--space-2); }

    .logo      { flex: 1; justify-content: center; }
    .logo-img  { height: 38px; }

    .header-right       { gap: var(--space-2); margin-left: 0; }
    .header-date        { display: none; }
    .account-btn        { padding: 0; width: 40px; height: 40px; justify-content: center; border-radius: 50%; }
    .account-btn span   { display: none; }
    .account-btn i      { font-size: 20px; }
    .account-btn .account-icon  { font-size: 32px; }
    .account-btn .account-caret { display: none; }

    .navbar .container { padding: 0; }
    .navbar-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .navbar-list::-webkit-scrollbar { display: none; }
    .navbar-link { padding: 0 var(--space-3); font-size: 12px; }
    .dropdown    { display: none; }

    .navbar-item              { border-right: 1px solid rgba(255, 255, 255, 0.18); }
    .navbar-item:last-child   { border-right: none; }
}

@media (max-width: 400px) {
    .logo-img    { height: 32px; }
    .navbar-link { font-size: 11px; padding: 0 10px; }
}

/* ===== Public member profile (/thanh-vien/{name}) ===== */
.member-page { max-width: 720px; }

.member-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.member-cover {
    height: 140px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark, #c2410c) 100%);
}

.member-head {
    display: flex;
    align-items: flex-end;
    gap: 16px 20px;
    padding: 12px 24px 18px;
    margin-top: -64px;
    flex-wrap: wrap;
}

.member-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    line-height: 0;
}
.member-avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-surface);
    background: var(--color-surface);
    display: block;
}
.member-status-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 4px solid var(--color-surface);
    background: #9ca3af;
}
.member-status-dot.is-online {
    background: #10b981;
}

.member-identity {
    flex: 1 1 140px;
    min-width: 0;
    padding-bottom: 6px;
}

.member-name {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    margin: 0 0 8px;
    color: var(--color-text);
    word-break: break-word;
    line-height: 1.2;
}

.member-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--color-text-muted, #6b7280);
    font-size: var(--font-size-sm, 14px);
}

.member-username {
    color: var(--color-text-muted, #6b7280);
}

.member-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
}

.member-badge-admin {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.member-badge-user {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.member-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--font-size-sm, 14px);
    transition: background 0.15s;
}

.member-edit-btn:hover {
    background: var(--color-primary-dark, #c2410c);
    color: #fff;
}

.member-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--color-border);
}

.member-stat {
    padding: 14px 18px;
    border-right: 1px solid var(--color-border);
}
.member-stat:last-child { border-right: 0; }

.member-stat dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted, #6b7280);
    margin-bottom: 6px;
    font-weight: 600;
}

.member-stat dd {
    margin: 0;
    color: var(--color-text);
    font-size: var(--font-size-sm, 14px);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.member-stat dd i {
    color: var(--color-text-muted, #6b7280);
    font-size: 12px;
}

.member-stat-online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.member-stat-online {
    color: #047857;
    font-weight: 600;
}

@media (max-width: 720px) {
    .member-stats { grid-template-columns: repeat(2, 1fr); }
    .member-stat:nth-child(2n) { border-right: 0; }
    .member-stat:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
}

.member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
    padding-bottom: 6px;
    margin-left: auto;
}
.member-action-form { margin: 0; }

@media (max-width: 560px) {
    .member-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 0;
    }
    .member-identity { flex: 0 0 auto; padding-bottom: 0; }
    .member-edit-btn { justify-content: center; }
    .member-meta { justify-content: center; }
    .member-actions { width: 100%; justify-content: center; margin-left: 0; padding-bottom: 0; }
}

/* Flash messages on member page */
.member-flash {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: var(--font-size-sm, 14px);
}
.member-flash-success { background: rgba(16, 185, 129, 0.1); color: #047857; border: 1px solid rgba(16, 185, 129, 0.2); }
.member-flash-error { background: rgba(220, 38, 38, 0.08); color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.18); }

/* Action buttons (follow / block / report) */
.member-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: var(--font-size-sm, 14px);
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
    line-height: 1.4;
    background: transparent;
}
.member-btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.member-btn-primary:hover { background: var(--color-primary-dark, #c2410c); border-color: var(--color-primary-dark, #c2410c); color: #fff; }
.member-btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}
.member-btn-secondary:hover { background: rgba(0,0,0,0.04); }
.member-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}
.member-btn-icon:hover { background: rgba(0,0,0,0.04); }

/* More menu */
.member-more { position: relative; }
.member-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 4px;
    z-index: 50;
}
.member-block-form { margin: 0; display: contents; }
.member-more-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
    font-size: var(--font-size-sm, 14px);
    line-height: 1.4;
}
.member-more-item:hover:not(.member-more-disabled) { background: rgba(0,0,0,0.05); }
.member-more-danger { color: #b91c1c; }
.member-more-danger:hover { background: rgba(220, 38, 38, 0.08); }
.member-more-disabled { color: var(--color-text-muted, #6b7280); cursor: not-allowed; }

/* Blocked notices */
.member-blocked-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(220, 38, 38, 0.06);
    color: #b91c1c;
    font-size: var(--font-size-sm, 14px);
    border-top: 1px solid rgba(220, 38, 38, 0.18);
}
.member-blocked-notice {
    text-align: center;
    padding: 40px 24px;
}
.member-blocked-notice i { font-size: 48px; color: #b91c1c; margin-bottom: 12px; }
.member-blocked-notice h1 { margin: 0 0 8px; font-size: var(--font-size-xl); }
.member-blocked-notice p { margin: 0 0 16px; color: var(--color-text-muted, #6b7280); }

/* Discussion history */
.member-discussions { margin-top: 16px; }

.member-discussions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
}
.member-discussions-title {
    margin: 0;
    font-size: var(--font-size-base, 15px);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.member-discussions-title i { color: var(--color-primary); }
.member-discussions-count {
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 10px;
    border-radius: 999px;
}

.member-discussions-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--color-text-muted, #6b7280);
    font-size: var(--font-size-sm, 14px);
}
.member-discussions-empty i { display: block; font-size: 28px; margin-bottom: 8px; opacity: 0.5; }

.member-discussions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.member-discussion-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
}
.member-discussion-item:last-child { border-bottom: 0; }

.member-discussion-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 12px;
}

.member-discussion-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 11px;
}
.member-discussion-tag.is-root {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}
.member-discussion-tag.is-reply {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.member-discussion-context {
    color: var(--color-text-muted, #6b7280);
}
.member-discussion-context a {
    color: var(--color-primary);
    text-decoration: none;
}
.member-discussion-context a:hover { text-decoration: underline; }

.member-discussion-time {
    margin-left: auto;
    color: var(--color-text-muted, #6b7280);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.member-discussion-body {
    color: var(--color-text);
    font-size: var(--font-size-sm, 14px);
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.member-discussion-body img { max-width: 100%; height: auto; vertical-align: middle; }
.member-discussion-body a { color: var(--color-primary); word-break: break-all; }
.member-discussion-body .forum-embed {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    margin: 8px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
}
.member-discussion-body .forum-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.member-discussion-image {
    display: inline-block;
    margin-top: 8px;
    line-height: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    max-width: 240px;
}
.member-discussion-image img { width: 100%; height: auto; display: block; }

.member-discussion-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.member-discussion-stats {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
}
.member-discussion-stats span { display: inline-flex; align-items: center; gap: 4px; }

.member-discussion-link {
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.member-discussion-link:hover { text-decoration: underline; }

.member-discussions-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 20px;
    flex-wrap: wrap;
    border-top: 1px solid var(--color-border);
}
.member-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.member-pager-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}
.member-pager-btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.member-pager-gap {
    color: var(--color-text-muted, #6b7280);
    padding: 0 4px;
}

/* Lightbox for discussion images */
.member-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}
.member-lightbox[hidden] { display: none; }
.member-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.member-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.15s;
}
.member-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

.member-discussion-image { cursor: zoom-in; }

/* Report modal */
.report-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.report-modal[hidden] { display: none; }
.report-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.report-dialog {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    width: min(480px, 92vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 10px;
    border-bottom: 1px solid var(--color-border);
}
.report-head h3 { margin: 0; font-size: var(--font-size-lg); font-weight: var(--font-weight-medium); }
.report-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--color-text-muted, #6b7280);
    padding: 0;
    font-size: 0;
}
.report-close svg { display: block; width: 18px; height: 18px; }
.report-form {
    padding: 16px 10px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.report-field { display: flex; flex-direction: column; gap: 8px; }
.report-field > label { font-weight: 500; font-size: var(--font-size-sm, 14px); }
.report-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm, 14px);
}
.report-radio:hover { background: rgba(0,0,0,0.02); }
.report-radio input { margin: 0; }
.report-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    resize: vertical;
    min-height: 80px;
}
.report-form textarea:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; border-color: transparent; }
.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
}

.terms-body {
    padding: 16px 20px;
    overflow-y: auto;
    color: var(--color-text);
    font-size: var(--font-size-base);
    line-height: 1.6;
}
.terms-body p { margin: 0 0 var(--space-2) 0; }
.terms-body p:last-child { margin-bottom: 0; }
.terms-body ul { margin: 0 0 var(--space-2) 0; padding-left: var(--space-5); list-style: disc; }
.terms-body li { margin-bottom: 4px; }

/* ===== Messaging (/tin-nhan) ===== */
.container-messaging { padding: 0 var(--space-2); }

.msg-page-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    height: calc(100vh - 220px);
    min-height: 480px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.msg-page-grid > .msg-sidebar { border-right: 1px solid var(--color-border); min-width: 0; }
.msg-page-grid > .msg-thread { min-width: 0; }
.msg-thread-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--color-text-muted, #6b7280);
    text-align: center;
    padding: 24px;
}
.msg-thread-placeholder i { font-size: 36px; opacity: 0.5; }
.msg-thread-placeholder p { margin: 0; font-size: var(--font-size-sm, 14px); }

@media (max-width: 768px) {
    .msg-page-grid {
        grid-template-columns: 1fr;
        height: calc(100vh - 160px);
    }
    .msg-page-grid:not(.is-thread) > .msg-thread { display: none; }
    .msg-page-grid.is-thread > .msg-sidebar { display: none; }
}

.msg-thread-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--color-text);
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 4px;
}
.msg-thread-back:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.msg-sidebar {
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}
.msg-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    min-height: 65px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}
.msg-sidebar-head h2 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}
.msg-compose-new-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.15s;
}
.msg-compose-new-btn:hover { background: var(--color-primary-dark, #c2410c); color: #fff; }

.msg-compose-dialog { width: min(520px, 92vw); }
.msg-compose-search-wrap { position: relative; }
.msg-compose-search-wrap input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: var(--font-size-sm, 14px);
}
.msg-compose-search-wrap input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -1px;
    border-color: transparent;
}
.msg-compose-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    max-height: 240px;
    overflow-y: auto;
    z-index: 10;
    padding: 4px;
}
.msg-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
}
.msg-result-item:hover { background: var(--color-bg); }
.msg-result-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.msg-result-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.msg-result-info strong { font-size: var(--font-size-sm, 14px); color: var(--color-text); }
.msg-result-info span { font-size: 12px; color: var(--color-text-muted, #6b7280); }
.msg-result-admin { color: #b91c1c; font-style: normal; font-size: 11px; font-weight: 500; }
.msg-result-empty {
    text-align: center;
    padding: 16px;
    color: var(--color-text-muted, #6b7280);
    font-size: 13px;
}

.msg-compose-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-top: 8px;
}
.msg-compose-selected[hidden] { display: none; }
.msg-compose-results[hidden] { display: none; }
.msg-compose-selected img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.msg-compose-selected-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-compose-selected-info strong { font-size: var(--font-size-sm, 14px); }
.msg-compose-selected-info span { font-size: 12px; color: var(--color-text-muted, #6b7280); }
.msg-compose-clear {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--color-text-muted, #6b7280);
    font-size: 18px;
    padding: 4px 8px;
}
.msg-compose-clear:hover { color: #b91c1c; }
.msg-conv-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.msg-conv-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--color-text);
    border-left: 3px solid transparent;
}
.msg-conv-item:hover { background: rgba(0,0,0,0.03); color: var(--color-text); }
.msg-conv-item.is-active { background: var(--color-surface); border-left-color: var(--color-primary); }
.msg-conv-item.is-unread .msg-conv-name { font-weight: 700; }
.msg-conv-item.is-unread .msg-conv-preview { color: var(--color-text); font-weight: 500; }

.msg-conv-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    line-height: 0;
}
.msg-conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-bg);
}
.msg-conv-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.msg-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
    border: 2px solid var(--color-surface);
}
.msg-online-dot.is-online { background: #10b981; }
.msg-system-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    color: #fff;
    font-size: 18px;
}
.msg-conv-body { flex: 1; min-width: 0; }
.msg-conv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.msg-conv-name {
    font-weight: 500;
    font-size: var(--font-size-sm, 14px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-conv-time { font-size: 11px; color: var(--color-text-muted, #6b7280); flex-shrink: 0; }
.msg-conv-preview {
    font-size: 13px;
    color: var(--color-text-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.msg-conv-prefix { color: var(--color-text-muted, #6b7280); }
.msg-unread-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}
.msg-empty-sidebar { text-align: center; color: var(--color-text-muted, #6b7280); padding: 32px 16px; }
.msg-empty-sidebar i { font-size: 32px; opacity: 0.4; }
.msg-empty-sidebar p { margin: 8px 0 0; font-size: 13px; }

.msg-thread { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.msg-thread-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    min-height: 65px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}
.msg-thread-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    line-height: 0;
}
.msg-thread-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.msg-thread-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-thread-online { color: #047857; font-weight: 500; }
.msg-thread-more { position: relative; flex-shrink: 0; }
.msg-thread-more .member-more-menu { right: 0; left: auto; }
.msg-thread-more .member-btn-icon {
    background: transparent;
    border-color: transparent;
}
.msg-thread-more .member-btn-icon:hover {
    background: var(--color-bg);
}
.msg-thread-system { background: var(--color-primary); color: #fff; }
.msg-thread-info { flex: 1; min-width: 0; }
.msg-thread-name { display: block; font-weight: 600; color: var(--color-text); text-decoration: none; }
.msg-thread-name:hover { color: var(--color-primary); }
.msg-thread-sub { font-size: 12px; color: var(--color-text-muted, #6b7280); }

.msg-thread-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.msg-load-more {
    align-self: center;
    padding: 4px 0 8px;
}
.msg-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text-muted, #6b7280);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.msg-load-more-btn:hover { background: var(--color-bg); color: var(--color-text); }
.msg-load-more-btn:disabled { opacity: 0.5; cursor: wait; }
.msg-thread-empty { background: var(--color-bg); align-items: center; justify-content: center; }
.msg-empty-thread { text-align: center; padding: 40px 20px; color: var(--color-text-muted, #6b7280); margin: auto; }
.msg-empty-thread i { font-size: 56px; opacity: 0.3; margin-bottom: 12px; }
.msg-empty-thread h2 { font-size: var(--font-size-lg); font-weight: 500; margin: 0 0 6px; color: var(--color-text); }
.msg-empty-thread p { margin: 0; font-size: var(--font-size-sm, 14px); }
.msg-empty-inline { padding: 20px; }

.msg-date-divider { text-align: center; margin: 8px 0; }
.msg-date-divider span {
    display: inline-block;
    padding: 2px 12px;
    font-size: 11px;
    color: var(--color-text-muted, #6b7280);
    background: var(--color-surface);
    border-radius: 999px;
    border: 1px solid var(--color-border);
}

.msg-row { display: flex; align-items: flex-end; gap: 6px; max-width: 80%; }
.msg-row.is-mine { align-self: flex-end; flex-direction: row-reverse; }

.msg-row-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-bg);
    flex-shrink: 0;
}

/* System message banner card */
.msg-system {
    align-self: stretch;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: var(--radius-sm);
    color: #92400e;
    margin: 4px 0;
}
.msg-system > i {
    color: #b45309;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}
.msg-system-content { flex: 1; min-width: 0; }
.msg-system-body {
    font-size: var(--font-size-sm, 14px);
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
}
.msg-system-time {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(146, 64, 14, 0.7);
}

.msg-bubble-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg-row.is-mine .msg-bubble-wrap { align-items: flex-end; }
.msg-bubble {
    padding: 8px 12px;
    border-radius: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: var(--font-size-sm, 14px);
    line-height: 1.45;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}
.msg-row.is-mine .msg-bubble {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    border-bottom-right-radius: 4px;
}
.msg-row:not(.is-mine) .msg-bubble { border-bottom-left-radius: 4px; }
.msg-bubble-time { font-size: 10px; color: var(--color-text-muted, #6b7280); padding: 0 8px; }

.msg-compose {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    padding: 10px 14px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}
.msg-compose-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    font: inherit;
    font-size: var(--font-size-sm, 14px);
    resize: none;
    min-height: 40px;
    max-height: 160px;
    line-height: 1.4;
    background: var(--color-bg);
    overflow-y: auto;
    scrollbar-width: none;
    word-break: break-word;
    outline: none;
}
.msg-compose-input::-webkit-scrollbar { display: none; }
.msg-compose-input:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; border-color: transparent; background: var(--color-surface); }
.msg-compose-input[contenteditable]:empty::before {
    content: attr(data-placeholder);
    color: var(--color-text-muted, #6b7280);
    pointer-events: none;
}
.msg-compose-input .msg-emoji { vertical-align: middle; margin: 0 1px; }
.msg-compose-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.msg-compose-send:hover { background: var(--color-primary-dark, #c2410c); }

.msg-compose-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.msg-compose-main .msg-compose-input { flex: 0 0 auto; width: 100%; }
.msg-compose-attach {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 18px;
    transition: background 0.15s, color 0.15s;
}
.msg-compose-attach:hover { background: var(--color-bg); color: var(--color-primary); }

.msg-compose-preview {
    position: relative;
    align-self: flex-start;
    max-width: 180px;
}
.msg-compose-preview img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    display: block;
}
.msg-compose-preview-clear {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.msg-compose-preview-clear:hover { background: rgba(0,0,0,0.9); }

.msg-attachment {
    display: block;
    line-height: 0;
    border-radius: 6px;
    overflow: hidden;
    max-width: 280px;
    cursor: zoom-in;
}
.msg-attachment img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}
.msg-row.is-mine .msg-attachment { align-self: flex-end; }

.msg-emoji {
    display: inline-block;
    vertical-align: middle;
    width: auto;
    height: auto;
    margin: 0 1px;
}

.msg-compose-emoji-wrap { position: relative; flex-shrink: 0; }
.msg-emoji-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    z-index: 20;
}
.msg-emoji-picker[hidden] { display: none; }
.msg-emoji-item {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}
.msg-emoji-item:hover { background: var(--color-bg); }
.msg-emoji-item img { display: block; max-width: 28px; max-height: 28px; }

/* ===== Reply quote inside a bubble ===== */
.msg-reply-quote {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 100%;
    padding: 6px 10px;
    border-left: 3px solid var(--color-primary);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    font-size: 12px;
    line-height: 1.35;
    margin-bottom: 2px;
    transition: background 0.15s;
    cursor: pointer;
    overflow: hidden;
}
.msg-reply-quote:hover { background: var(--color-surface); }
.msg-row.is-mine .msg-reply-quote { align-self: flex-end; }
.msg-reply-quote-name {
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}
.msg-reply-quote-name strong { font-weight: 700; }
.msg-reply-quote-body {
    color: var(--color-text-muted, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}
.msg-reply-quote-body i { margin-right: 4px; }

/* highlight when scrolling to a quoted message via #msg-N anchor */
.msg-row:target .msg-bubble,
.msg-system:target { animation: msg-flash 1.4s ease-out; }
@keyframes msg-flash {
    0%   { box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.45); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

/* ===== Action toolbar (react / reply) — beside the bubble, same row ===== */
.msg-bubble-wrap { position: relative; }
.msg-bubble-row {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
}
.msg-row.is-mine .msg-bubble-row { flex-direction: row-reverse; align-self: flex-end; }
.msg-actions {
    display: none;
    gap: 2px;
    border-radius: 999px;
    padding: 2px;
    flex-shrink: 0;
    z-index: 2;
}
.msg-row:hover .msg-actions,
.msg-row:focus-within .msg-actions { display: inline-flex; }
.msg-action-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.msg-action-btn:hover { background: var(--color-bg); color: var(--color-primary); }
.msg-action-btn.is-active { color: var(--color-primary); }
.msg-action-btn[aria-expanded="true"] { background: var(--color-bg); color: var(--color-primary); }

/* Per-message dropdown menu (hosts pin/unpin) */
.msg-action-more { position: relative; display: inline-flex; }
.msg-action-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 160px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 4px;
    z-index: 30;
}
.msg-row.is-mine .msg-action-menu { right: auto; left: 0; }
.msg-action-menu[hidden] { display: none; }
.msg-action-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: 0;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
    font-size: var(--font-size-sm, 12px);
    line-height: 1.4;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.msg-action-menu-item:hover { background: rgba(0,0,0,0.05); }
.msg-action-menu-item i { width: 14px; text-align: center; color: var(--color-text-muted, #6b7280); }

/* Keep the action toolbar visible while its menu is open */
.msg-row.has-menu-open .msg-actions { display: inline-flex; }

/* ===== Pinned message marker ===== */
.msg-row.is-pinned .msg-bubble {
    box-shadow: inset 3px 0 0 var(--color-primary);
}
.msg-row.is-mine.is-pinned .msg-bubble {
    box-shadow: inset -3px 0 0 var(--color-primary);
}
.msg-pinned-icon {
    color: var(--color-primary);
    font-size: 10px;
    margin-right: 4px;
    transform: rotate(45deg);
    display: inline-block;
}
.msg-pinned-icon[hidden] { display: none; }

/* ===== Sticky pinned bar — lives at top of the scrollable thread body ===== */
.msg-pinned-bar {
    position: sticky;
    top: -16px; /* cancel msg-thread-body padding-top so the bar lands at edge */
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin: -16px -16px 8px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: background 0.15s;
}
.msg-pinned-bar[hidden] { display: none; }
.msg-pinned-bar:hover { background: var(--color-bg); }
.msg-pinned-bar > .fa-thumbtack {
    color: var(--color-primary);
    font-size: 14px;
    transform: rotate(45deg);
    flex-shrink: 0;
}
.msg-pinned-bar-info { flex: 1; min-width: 0; }
.msg-pinned-bar-count {
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}
.msg-pinned-bar-arrow {
    color: var(--color-text-muted, #6b7280);
    font-size: 12px;
    flex-shrink: 0;
}
.msg-pinned-bar-body {
    font-size: 13px;
    color: var(--color-text-muted, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Reaction badge floating at bubble bottom-right ===== */
.msg-bubble-stack { position: relative; max-width: 100%; min-width: 0; }
.msg-row.is-mine .msg-bubble-stack { align-self: flex-end; }
.msg-reactions {
    position: absolute;
    bottom: -10px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    z-index: 2;
    pointer-events: none;
}
.msg-row.is-mine .msg-reactions { right: auto; left: 6px; }
.msg-reactions > * { pointer-events: auto; }
.msg-reaction {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    color: var(--color-text-muted, #6b7280);
    transition: transform 0.12s;
}
.msg-reaction:hover { transform: scale(1.12); }
.msg-reaction.is-mine { color: var(--color-primary); font-weight: 600; }
.msg-reaction img { display: block; width: auto; height: auto; }
.msg-reaction span {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 1px 5px;
    line-height: 1;
}

/* ===== Reaction picker (floating pill above bubble) ===== */
.msg-reaction-picker {
    position: absolute;
    z-index: 1010;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 4px 8px;
}
.msg-reaction-picker[hidden] { display: none; }
.msg-reaction-picker-quick {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.msg-reaction-picker-item {
    background: transparent;
    border: 0;
    padding: 2px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s;
}
.msg-reaction-picker-item:hover { transform: scale(1.25); }
.msg-reaction-picker-item img { display: block; width: auto; height: auto; }

/* ===== Compose: reply preview bar ===== */
.msg-compose-reply {
    position: relative;
    flex-basis: 100%;
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    overflow: hidden;
}
.msg-compose-reply[hidden] { display: none; }
.msg-compose-reply-bar {
    width: 3px;
    flex-shrink: 0;
    background: var(--color-primary);
    border-radius: 999px;
}
.msg-compose-reply-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.msg-compose-reply-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.msg-compose-reply-body {
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.msg-compose-reply-clear {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    align-self: center;
    transition: background 0.12s, color 0.12s;
}
.msg-compose-reply-clear:hover { background: var(--color-border); color: var(--color-primary); }

.msg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}
.msg-lightbox[hidden] { display: none; }
.msg-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.msg-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.msg-lightbox-close svg { width: 18px; height: 18px; display: block; }
.msg-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

.msg-compose-disabled {
    padding: 14px 18px;
    text-align: center;
    color: var(--color-text-muted, #6b7280);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm, 14px);
}

.account-msg-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* --- Advertisement slot --- */
.ad-slot {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.ad-slot-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 1.4;
}
.ad-slot--header {
    background: #f9fafb;
}
.ad-textlink-row {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 0;
    row-gap: 4px;
}
.ad-textlink {
    color: #0e7490;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
}
.ad-textlink:hover .ad-textlink-label { text-decoration: underline; }
.ad-textlink-item {
    white-space: nowrap;
    font-size: xx-small;
}
.ad-textlink-item + .ad-textlink-item::before {
    content: '';
    display: inline-block;
    width: 2px;
    height: 2px;
    background: #9ca3af;
    border-radius: 50%;
    margin: 0 0.5em;
    vertical-align: middle;
}
.ad-textlink-affix {
    color: #6b7280;
}
.ad-textlink-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}
.ad-banner-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    line-height: 0;
}
.ad-banner {
    display: block;
    width: 100%;
}
.ad-banner img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}
.ad-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.15s;
}
.ad-close:hover { background: rgba(0, 0, 0, 0.85); }
.ad-script {
    width: 100%;
    text-align: center;
}
@media (max-width: 768px) {
    .ad-hide-on-mobile { display: none !important; }
}
@media (min-width: 769px) {
    .ad-hide-on-desktop { display: none !important; }
}

.ad-sidebar-slot {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ad-home-slot {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ad-home-slot:empty { display: none; }

.ad-catfish {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: min(500px, calc(100% - 16px));
}
.ad-catfish--bottom { bottom: 8px; }
.ad-catfish--top    { top: 8px; }
.ad-catfish-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ad-catfish-inner .ad-banner-wrap { margin: 0; }
.ad-catfish-inner .ad-banner-wrap .ad-close { display: none; }
.ad-catfish-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.ad-catfish-close:hover { background: #000; }
.ad-catfish--top .ad-catfish-close {
    top: auto;
    bottom: 4px;
    right: 4px;
    left: auto;
    transform: none;
}
@media (max-width: 768px) {
    .ad-catfish { width: calc(100% - 12px); }
    .ad-catfish--bottom { bottom: 6px; }
    .ad-catfish--top    { top: 6px; }
    .ad-catfish-close { width: 18px; height: 18px; font-size: 12px; }
    .ad-catfish--top .ad-catfish-close { bottom: 4px; right: 4px; }
}

.ad-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: ad-popup-fade-in 0.2s ease-out;
}
.ad-popup-overlay[hidden] { display: none; }
body.ad-popup-open { overflow: hidden; }
.ad-popup {
    position: relative;
    width: 360px;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: transparent;
}
.ad-popup-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ad-popup-inner .ad-banner-wrap { margin: 0; }
.ad-popup-inner .ad-banner-wrap .ad-close { display: none; }
.ad-popup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.ad-popup-close:hover { background: #000; }
@keyframes ad-popup-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@media (max-width: 768px) {
    .ad-popup-close { width: 22px; height: 22px; font-size: 14px; }
}

.ad-content-slot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 16px 0;
}
.ad-content-slot:empty { display: none; }

.ad-footer-slot {
    max-width: var(--container-max);
    margin: 12px auto;
    padding: 0 var(--space-4);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ad-footer-slot:empty { display: none; }
.ad-footer-slot .ad-banner-wrap { margin: 0; }

.ad-corner {
    position: fixed;
    bottom: 16px;
    z-index: 9998;
    width: 220px;
}
.ad-corner--left  { left: 8px; }
.ad-corner--right { right: 8px; }
.ad-corner-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.ad-corner-inner .ad-banner-wrap { margin: 0; }
.ad-corner-inner .ad-banner-wrap .ad-close { display: none; }
.ad-corner-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.ad-corner-close:hover { background: #000; }
@media (max-width: 1100px) {
    .ad-corner { display: none; }
}
.ad-sidebar-slot--sticky.is-stuck {
    position: fixed;
    top: 0;
    z-index: 50;
}
.ad-sticky-placeholder { display: block; }
.ad-sidebar-slot .ad-textlink-row {
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}
@media (max-width: 768px) {
    .ad-slot-inner {
        padding: 3px 6px;
        font-size: 12px;
        gap: 4px;
        flex-direction: column;
    }
    .ad-textlink-item + .ad-textlink-item::before { width: 2px; height: 2px; margin: 0 0.4em; }
    .ad-close {
        top: 2px;
        right: 2px;
        width: 12px;
        height: 12px;
        font-size: 9px;
        background: rgba(0, 0, 0, 0.4);
    }
}

/* ================================================
   KQXS Tables - BĂª nguyĂªn tá»« theme tham kháº£o
   Scope CSS variables vĂ o wrapper KQXS Ä‘á»ƒ khĂ´ng áº£nh
   hÆ°á»Ÿng cĂ¡c pháº§n khĂ¡c cá»§a Laravel.
   ================================================ */
.kqxs-wrap,
.kqxs-day-tabs,
.kqxs-page-title,
.kqxs-load-more,
.kqxs-empty,
.skq-section,
.boxResult,
.live-header {
    --color-primary-bg:     #e8f5f5;
    --color-text:           #333;
    --color-text-secondary: #555;
    --color-text-muted:     #888;
    --color-text-hint:      #999;
    --color-text-dark:      #222;
    --color-text-light:     #888;
    --color-white:          #fff;
    --color-bg:             #f5f5f5;
    --color-bg-alt:         #f7f7f7;
    --color-bg-alt-2:       #f0f0f0;
    --color-border:         #eee;
    --color-border-medium:  #ddd;
    --color-border-dark:    #e0e0e0;
    --color-border-light:   #f0f0f0;

    /* Typography */
    --font-family:    sans-serif;
    --font-size-base: 16px;
    --font-size-xs:   13px;
    --font-size-sm:   15px;
    --font-size-md:   17px;
    --font-size-lg:   19px;
    --font-size-xl:   21px;
    --font-size-2xl:  23px;

    /* Spacing & layout */
    --gap:       10px;
    --gap-sm:    20px;
    --padding-x: 15px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.15);

    /* Transition */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;

    /* KQXS-specific */
    --kq-mb:             var(--color-primary);
    --kq-mt:             var(--color-primary);
    --kq-mn:             var(--color-primary);
    --kq-danger:         #dc3545;
    --kq-warning:        #fff3cd;
    --kq-info:           var(--color-primary);
    --kq-dark:           #343a40;
    --kq-border:         #dee2e6;
    --kq-bg:             #f8f9fa;
    --kq-toolbar:        var(--color-primary);
    --kq-toolbar-active: var(--color-primary-dark);
}

/* Wrapper class riĂªng cá»§a Laravel â€” cĂ¡c class .kqxs-day-tab*, .kqxs-page-title,
   .kqxs-load-more, .kqxs-btn-load, .kqxs-empty Ä‘Ă£ cĂ³ sáºµn trong CSS gá»‘c bĂªn dÆ°á»›i. */
.kqxs-wrap    { font-family: var(--font-family); }
.kqxs-results { display: block; }

/* === Box container === */
.boxResult {
    margin-bottom: var(--gap);
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.main_result { background: var(--color-white); }

/* Bá» border ngoĂ i cá»§a table bĂªn trong vĂ¬ boxResult border Ä‘Ă£ thay tháº¿.
   Border giá»¯a cĂ¡c cell váº«n Ä‘Æ°á»£c giá»¯ Ä‘á»ƒ phĂ¢n tĂ¡ch. */
.boxResult .kq-table tr > *:first-child,
.boxResult .kq-loto-table tr > *:first-child { border-left: 0; }
.boxResult .kq-table tr > *:last-child,
.boxResult .kq-loto-table tr > *:last-child { border-right: 0; }
.boxResult .kq-table > thead > tr:first-child > *,
.boxResult .kq-loto-table > thead > tr:first-child > * { border-top: 0; }
.boxResult .kq-table > tbody > tr:last-child > *,
.boxResult .kq-loto-table > tbody > tr:last-child > * { border-bottom: 0; }

/* Loto trá»±c tiáº¿p grid â€” bá» border ngoĂ i Ä‘á»ƒ khĂ´ng double vá»›i boxResult border */
.boxResult .kq-loto-live-section { border-left: 0; border-top: 0; }
.boxResult .kq-loto-live-section > .kq-cell-full {
    border-top: 1px solid var(--kq-border);
    border-right: 0;
}
/* Má»—i hĂ ng káº¿t thĂºc báº±ng <div class="kq-break"> nĂªn :last-child khĂ´ng khá»›p .kq-cell.
   DĂ¹ng :has(+ .kq-break) Ä‘á»ƒ bá» border pháº£i á»Ÿ Ă´ cuá»‘i má»—i hĂ ng. */
.boxResult .kq-loto-live-section > .kq-cell:has(+ .kq-break) {
    border-right: 0;
}

.kq-overflow { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kq-overflow::-webkit-scrollbar { height: 4px; }
.kq-overflow::-webkit-scrollbar-thumb { background: var(--color-text-hint); border-radius: 2px; }

/* === Table === */
.kq-table { width: 100%; border-collapse: collapse; border: 1px solid var(--kq-border); }
.kq-table th, .kq-table td { border: 1px solid var(--kq-border); vertical-align: middle; }

/* === Header === */
.kq-th-header { background: var(--color-primary); color: var(--color-white); text-align: center; padding: 10px 12px; }

.kq-title { font-weight: 700; font-size: var(--font-size-md); margin: 0 0 2px; }
.kq-title a { color: inherit; text-decoration: none; }
.kq-title a:hover { text-decoration: underline; }
.kq-tags { margin: 0; font-size: var(--font-size-xs); font-weight: 400; }
.kq-tags a { color: rgba(255,255,255,0.85); text-decoration: none; }
.kq-tags a + a::before { font-family: sans-serif; padding: 0 3px; color: rgba(255,255,255,0.6); content: "/\00a0"; display: inline-block; }
.kq-tags a:hover { text-decoration: underline; color: var(--color-white); }
.kq-tags-host { color: rgba(255,255,255,0.85); padding-left: 4px; }

/* === TĂªn giáº£i (cá»™t trĂ¡i) === */
.kq-name { text-align: center; font-size: var(--font-size-sm); color: var(--color-text-secondary); white-space: nowrap; width: 85px; min-width: 85px; }
.kq-name-full { display: inline; }
.kq-name-short { display: none; }


/* === Province header === */
.kq-province-row { background: var(--color-primary-dark); }
.kq-province-row th:not(.kq-name) { color: var(--color-white); text-align: center; padding: 8px 6px; font-size: var(--font-size-sm); font-weight: 700; }
.kq-province-row .kq-name { background: var(--color-primary-dark); color: var(--color-text-secondary); font-weight: normal; }
.kq-table-2m .kq-province-row { background: none; }
.kq-table-2m .kq-province-row th:not(.kq-name) { color: #cf0034; }
.kq-table-2m .kq-province-row th:not(.kq-name) a { color: #cf0034; }
.kq-table-2m .kq-province-row .kq-name { background: none; color: var(--color-text-secondary); font-weight: normal; }
.kq-province-th { min-width: 95px; white-space: nowrap; }
.kq-province-th h3,
.kq-province-th h4 { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.kq-province-th a { color: var(--color-white); text-decoration: none; }
.kq-province-th a:hover { text-decoration: underline; }

/* === Ă” sá»‘ - Miá»n Báº¯c (grid) === */
.kq-nums-td { padding: 0 !important; }
.kq-nums { display: flex; flex-wrap: wrap; }
.kq-num { display: flex; align-items: center; justify-content: center; font-family: var(--font-family); font-weight: 700; font-size: var(--font-size-lg); color: var(--color-text-dark); text-align: center; min-height: 38px; box-sizing: border-box; }
.kq-c1 { width: 100%; }
.kq-c2 { width: 50%; }
.kq-c3 { width: 33.333%; }
.kq-c4 { width: 25%; }
.kq-bl { border-left: 1px solid var(--kq-border); }
.kq-bb { border-bottom: 1px solid var(--kq-border); }

/* Äáº·c biá»‡t */
.kq-tr-db .kq-num { font-size: var(--font-size-xl); min-height: 38px; }
.kq-danger { color: var(--kq-danger) !important; }
.kq-bold { font-weight: 700 !important; }

/* === Ă” sá»‘ - 2 miá»n === */
.kq-num-2m { text-align: center; font-family: var(--font-family); font-weight: 700; font-size: var(--font-size-lg); color: var(--color-text-dark); min-height: 38px; box-sizing: border-box; }
.kq-num-db { font-size: var(--font-size-xl) !important; }
.ky-tu-db .kq-num-2m { font-weight: 400; font-size: var(--font-size-md); }



/* KĂ½ tá»± ÄB */
.ky-tu-db { background: var(--kq-bg); }
.ky-tu-db .kq-num { font-size: var(--font-size-md); font-weight: 400; }

/* Zebra + hover */
.kq-table:not(.kq-table-2m) tbody tr:nth-child(odd) { background: var(--kq-bg); }
.kq-table-2m tbody tr.kq-row-odd { background: var(--kq-bg); }


/* Dim + highlight khi cháº¡m â€” opacity Ă¡p lĂªn text wrapper, KHĂ”NG Ă¡p lĂªn cell
   Ä‘á»ƒ khĂ´ng lĂ m fade luĂ´n border. */
.kq-num-text { display: inline-block; transition: opacity var(--transition-fast); }
.kq-dim > .kq-num-text { opacity: 0.22; }
.kq-highlight { background: var(--kq-warning); border-radius: 3px; padding: 0 2px; }

/* === Toolbar === */
.kq-toolbar-td { padding: 0 !important; background: var(--color-white); }
.kq-toolbar { padding: 8px; }
.kq-toolbar-row { display: flex; width: 100%; margin-bottom: 5px; }
.kq-toolbar-row:last-child { margin-bottom: 0; }

.kq-tb-group { display: flex; }
.kq-tb-ktdb { flex: 0 0 25%; }
.kq-tb-len { flex: 1; }
.kq-toolbar-cham { flex-wrap: nowrap; }

.kq-tb-label { display: flex; align-items: center; justify-content: center; padding: 0 8px; font-size: var(--font-size-xs); font-weight: 600; background: var(--color-text-muted); color: var(--color-white); white-space: nowrap; }

.kq-tb-btn { display: flex; flex: 1; align-items: center; justify-content: center; padding: 5px 4px; font-size: var(--font-size-xs); font-weight: 600; background: var(--kq-toolbar); color: var(--color-white); border: 1px solid var(--kq-toolbar); cursor: pointer; text-align: center; margin: 0; transition: background var(--transition-fast); }
.kq-tb-btn input { position: absolute; opacity: 0; width: 0; height: 0; }
.kq-tb-btn:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.kq-tb-btn.active { background: var(--kq-toolbar-active); border-color: var(--kq-toolbar-active); }

.kq-tb-digit { flex: 1; }

/* === Loto Grid === */
.kq-grid { display: flex; flex-wrap: wrap; }
.kq-loto-live-section { border-left: 0.5px solid #e0e4e8; border-top: 0.5px solid #e0e4e8; }
.kq-cell { display: flex; align-items: center; justify-content: center; width: calc(100% / 9); font-family: var(--font-family); font-weight: 600; color: var(--color-text-dark); border: none; border-right: 0.5px solid #e0e4e8; border-bottom: 0.5px solid #e0e4e8; box-sizing: border-box; }
.kq-loto-live-section .kq-cell:not(.kq-cell-full) {
    min-height: 26px;
    padding: 3px 4px;
    font-size: var(--font-size-sm);
}
.kq-loto-live-section .kq-cell-full {
    padding: 4px 8px;
    font-size: var(--font-size-sm);
    min-height: 0;
}
/* Reset margin/font khi tiĂªu Ä‘á» "Loto trá»±c tiáº¿p â€¦" Ä‘Æ°á»£c Ä‘áº·t lĂ m tháº» heading (h3) */
h3.kq-cell-full,
h4.kq-cell-full {
    margin: 0;
    font-size: var(--font-size-sm);
    line-height: 1.4;
}
.kq-cell-full { width: 100%; }
.kq-bg-info { background: var(--kq-info); color: var(--color-white); }
.kq-break { width: 100%; height: 0; }
.kq-muted { color: var(--color-text-hint); }

/* === Loto Links === */
.kq-loto-links { text-align: center; padding: 6px 10px; margin: 0; font-size: var(--font-size-xs); font-weight: 400; }
.kq-loto-links a { color: var(--color-primary); text-decoration: none; }
.kq-loto-links a + a::before { content: "/\00a0"; padding: 0 3px; color: var(--color-text-muted); }
.kq-loto-links a:hover { text-decoration: underline; }

/* === Loto Äáº§u/ÄuĂ´i Table === */
.kq-loto-table { width: 100%; border-collapse: collapse; background: var(--color-white); }
.kq-loto-table th { padding: 6px 8px; background: var(--color-primary-bg); font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text-secondary); border: 1px solid var(--kq-border); text-align: center; }
.kq-loto-table td { padding: 4px 8px; font-size: var(--font-size-md); border: 1px solid var(--kq-border); vertical-align: middle; }
.kq-loto-table tbody tr:nth-child(odd) { background: var(--kq-bg); }
.kq-loto-table .kq-th-header { background: var(--color-primary); padding: 10px 12px; border: 1px solid var(--color-primary); }
.kq-loto-table .kq-th-header .kq-title { color: var(--color-white); }
.kq-loto-table .kq-th-header .kq-tags a { color: rgba(255,255,255,0.85); }
.kq-loto-table .kq-th-header .kq-tags a:hover { color: var(--color-white); }
.kq-loto-col-head { width: 10%; text-align: center; }
.kq-loto-col-nums { width: 40%; text-align: center; }
.kq-loto-province-th { text-align: center; background: var(--color-primary-bg); font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.kq-loto-province-th h3 { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; }
.kq-loto-province-th a { color: var(--color-primary); text-decoration: none; font-weight: 700; }
.kq-loto-province-th a:hover { text-decoration: underline; }
.kq-loto-idx { text-align: center; font-weight: 700; color: var(--kq-danger); width: 10%; }
.kq-loto-dau { text-align: left; font-family: var(--font-family); font-weight: 600; }
.kq-loto-duoi { text-align: right; font-family: var(--font-family); font-weight: 600; }
.kq-sup { vertical-align: super; font-size: smaller; color: var(--kq-danger); }
.kq-bold { font-weight: 700 !important; }
.kq-title-full { display: inline; }

/* === Loto Province Tabs === */
.kq-loto-tabs { display: flex; background: var(--kq-bg); border-bottom: none; }
.kq-loto-tab { flex: 1; text-align: center; padding: 10px 6px; font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text-secondary); cursor: pointer; border-right: 1px solid var(--kq-border); transition: all var(--transition-fast); user-select: none; }
.kq-loto-tab:last-child { border-right: none; }
.kq-loto-tab:hover { background: var(--color-border-dark); }
.kq-loto-tab.active { background: var(--color-primary); color: var(--color-white); }
.kq-loto-pane { display: none; }
.kq-loto-pane.active { display: block; }

/* === Live header (banner "Äang quay thÆ°á»Ÿng xá»• sá»‘ miá»n ...") === */
.live-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-white);
    border: 1px solid var(--kq-border);
    border-bottom: 0;
    padding: 8px 12px 8px 50px;
    margin-bottom: 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #ed1c24;
}

.live-header .live-content { flex: 1 1 auto; }

.live-header .btn-danger {
    display: inline-block;
    background: #ed1c24;
    color: #fff;
    border: 0;
    border-radius: 3px;
    padding: 4px 12px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-fast);
}
.live-header .btn-danger:hover { background: #c0181f; color: #fff; }

.loader12 {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    animation: loader12 1s linear alternate infinite;
    position: absolute;
    top: 22px;
    left: 30px;
}

@keyframes loader12 {
    0%   { box-shadow: -20px 0 0 2px #009444, -10px 0 0 0 rgba(0,82,236,.2), 0 0 0 0 rgba(0,82,236,.2), 10px 0 0 0 rgba(0,82,236,.2); }
    25%  { box-shadow: -20px 0 0 0 rgba(0,82,236,.2), -10px 0 0 2px #009444, 0 0 0 0 rgba(0,82,236,.2), 10px 0 0 0 rgba(0,82,236,.2); }
    50%  { box-shadow: -20px 0 0 0 rgba(0,82,236,.2), -10px 0 0 0 rgba(0,82,236,.2), 0 0 0 2px #ed1c24, 10px 0 0 0 rgba(0,82,236,.2); }
    75%  { box-shadow: -20px 0 0 0 rgba(0,82,236,.2), -10px 0 0 0 rgba(0,82,236,.2), 0 0 0 0 rgba(0,82,236,.2), 10px 0 0 2px #fff200; }
    100% { box-shadow: -20px 0 0 0 rgba(0,82,236,.2), -10px 0 0 0 rgba(0,82,236,.2), 0 0 0 0 rgba(0,82,236,.2), 10px 0 0 0 rgba(0,82,236,.2); }
}

/* === Day Tabs (chá»n thá»©) === */
.kqxs-day-tabs {
    display: flex;
    flex-wrap: wrap;
    background: var(--color-white);
    border: 1px solid var(--kq-border);
    overflow: hidden;
    margin-bottom: 5px;
}

.kqxs-day-tab {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-right: 1px solid var(--kq-border);
    border-bottom: 1px solid var(--kq-border);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.kqxs-day-tab:hover {
    background: var(--color-primary-bg);
    text-decoration: none;
    color: var(--color-primary);
}

.kqxs-day-tab.active {
    background: var(--color-primary);
    color: var(--color-white);
}

.kqxs-day-tab.active:hover {
    color: var(--color-white);
}

/* Khi dĂ¹ng <button> (filter Vietlott) â€” reset default + bá»‘ cá»¥c 4 cá»™t */
.vl-filter-tabs {
    margin-bottom: var(--gap);
}
.vl-filter-tabs .kqxs-day-tab {
    flex: 1 1 25%;
    min-width: 0;
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: 500;
    background: var(--color-white);
    border-top: 0;
    border-left: 0;
    border-right: 1px solid var(--kq-border);
    border-bottom: 1px solid var(--kq-border);
    cursor: pointer;
}
.vl-filter-tabs .kqxs-day-tab:nth-child(4n) {
    border-right: none;
}
.vl-filter-tabs .kqxs-day-tab:nth-last-child(-n+4) {
    border-bottom: none;
}
.vl-filter-tabs .kqxs-day-tab.active {
    background: var(--color-primary);
    color: var(--color-white);
}

@media (max-width: 768px) {
    .vl-filter-tabs .kqxs-day-tab {
        font-size: var(--font-size-xs);
    }
}

/* Desktop: 1 hĂ ng 8 tabs */
@media (min-width: 769px) {
    .kqxs-day-tab {
        border-bottom: none;
    }

    .kqxs-day-tab:last-child {
        border-right: none;
    }
}

/* Mobile: 4 cá»™t trĂªn má»—i dĂ²ng */
@media (max-width: 768px) {
    .kqxs-day-tab {
        flex: 1 1 25%;
        font-size: var(--font-size-xs);
        padding: 8px 4px;
    }

    /* HĂ ng cuá»‘i bá» border-bottom */
    .kqxs-day-tab:nth-last-child(-n+4) {
        border-bottom: none;
    }

    /* Má»—i Ă´ cuá»‘i hĂ ng bá» border-right */
    .kqxs-day-tab:nth-child(4n) {
        border-right: none;
    }

    /* Ă” cuá»‘i cĂ¹ng */
    .kqxs-day-tab:last-child {
        border-right: none;
    }
}

/* === Widget: Day Tabs - Danh sĂ¡ch tá»‰nh === */
.xoso-day-tinh-list {
    padding: 8px 10px;
    background: var(--color-white);
}

.xoso-day-tinh-row {
    padding: 5px 0;
    border-bottom: 1px dashed var(--color-border);
    font-size: var(--font-size-sm);
}

.xoso-day-tinh-row:last-child {
    border-bottom: none;
}

.xoso-day-tinh-row.is-today {
    font-weight: 600;
    color: var(--color-primary);
}

.xoso-day-tinh-label {
    font-weight: 600;
    margin-right: 4px;
}

.xoso-day-tinh-names a {
    color: inherit;
    text-decoration: none;
}

.xoso-day-tinh-names a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* === Live Draw === */
.live-status {
    text-align: center;
    padding: 8px 12px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-white);
    background: var(--kq-danger);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-white);
    border-radius: 50%;
    margin-right: 6px;
    animation: live-blink 1s infinite;
}

@keyframes live-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-revealed {
    animation: live-flash 0.5s ease;
}

@keyframes live-flash {
    0% { background: var(--kq-warning); }
    100% { background: transparent; }
}

[data-status="running"] {
    color: var(--kq-danger) !important;
}

[data-status="pending"] {
    text-align: center;
}

.live-gif {
    vertical-align: middle;
}

.live-loading {
    height: 16px;
    width: auto;
    vertical-align: middle;
}

/* === Draw Status Row === */
.draw-status-row {
    background: #fffbe6;
}

.draw-status-cell {
    text-align: center;
    padding: 6px 10px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-top: 1px dashed #e0c96c;
}

.draw-status-running {
    color: var(--kq-danger);
}

.draw-status-revealed {
    color: #1a7f37;
}

.draw-status-revealed strong {
    font-size: 1.05em;
}

.draw-status-done {
    color: #1a7f37;
}

.draw-status-loading {
    height: 14px;
    width: auto;
    vertical-align: middle;
    margin-left: 4px;
}

/* === Load More Button === */
.kqxs-load-more {
    display: flex;
    justify-content: center;
    padding: var(--gap) 0;
}

.kqxs-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: var(--gap) 0;
}

.kqxs-btn-load {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    font-size: var(--font-size-sm);
    color: var(--color-white);
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.kqxs-btn-load:hover {
    background: var(--color-primary-hover);
}

.kqxs-btn-load:disabled {
    opacity: 0.7;
    cursor: wait;
}

.kqxs-btn-load i {
    font-size: 11px;
    transition: transform 0.4s ease;
}

.kqxs-btn-load:hover:not(:disabled) i {
    transform: rotate(180deg);
}

/* === Page Title === */
.kqxs-page-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: var(--gap);
    padding: 6px 5px;
    background: var(--color-white);
    border-bottom: solid 3px #057e86;
    margin-top: 0;
}

/* === Home posts === */
.kqxs-section { margin-bottom: var(--gap); }
.kqxs-header-posts { background: var(--color-primary); padding: 10px 16px; color: var(--color-white); font-weight: 700; font-size: var(--font-size-md); }
.kqxs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 24px;
    margin-bottom: var(--gap);
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-md);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.kqxs-empty::before {
    content: "\f017";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 36px;
    color: var(--color-primary);
    opacity: .5;
}
.home-posts-list { padding: var(--padding-x); background: var(--color-white); box-shadow: var(--shadow-sm); }
.home-posts-list .post-list-item { margin-bottom: 0; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--color-border); padding: var(--padding-x) 0; }
.home-posts-list .post-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.home-posts-list .post-list-item:first-child { padding-top: 0; }
.home-posts-list .post-list-thumb { width: 200px; }

/* === Responsive === */
@media (max-width: 768px) {
    .kq-name { width: 40px; min-width: 40px; padding: 4px 3px; font-size: var(--font-size-sm); }
    .kq-name-full { display: none; }
    .kq-name-short { display: inline; }
    .kq-num { padding: 4px 2px; min-height: 34px; }
    .kq-tr-db .kq-num { padding: 6px 2px; min-height: 34px; }
    .kq-province-row th:not(.kq-name) { font-size: var(--font-size-sm); }
    .kq-province-th { min-width: 70px; }
    .kq-num-2m { padding: 4px 2px; min-height: 34px; }
    .ky-tu-db .kq-num,
    .ky-tu-db .kq-num-2m { font-size: var(--font-size-md); }
    .kq-cell { padding: 4px 1px; font-size: var(--font-size-md); }
    .kq-title { font-size: var(--font-size-sm); }
    .kq-tags { font-size: var(--font-size-xs); }
    .kq-loto-table th { font-size: var(--font-size-sm); padding: 5px 4px; }
    .kq-loto-table td { padding: 4px 6px; font-size: var(--font-size-md); }
    .kq-loto-tab { font-size: var(--font-size-sm); padding: 8px 3px; }
    .kq-loto-links { font-size: var(--font-size-xs); }
    .kq-title-full { display: none; }
    .kq-tb-btn { font-size: var(--font-size-xs); padding: 4px 2px; }
    .kq-tb-label { font-size: var(--font-size-xs); padding: 0 4px; }
    .home-posts-list .post-list-thumb { width: 120px; }
}

@media (max-width: 480px) {
    .kq-name { width: 36px; min-width: 36px; padding: 3px 2px; font-size: var(--font-size-xs); }
    .kq-num { font-size: var(--font-size-md); min-height: 30px; padding: 3px 1px; }
    .kq-tr-db .kq-num { font-size: var(--font-size-lg); min-height: 32px; padding: 4px 1px; }
    .kq-num-2m { font-size: var(--font-size-md); min-height: 30px; padding: 3px 1px; }
    .kq-num-db { font-size: var(--font-size-lg) !important; }
    .ky-tu-db .kq-num,
    .ky-tu-db .kq-num-2m { font-size: var(--font-size-sm); }
    .kq-cell { font-size: var(--font-size-sm); padding: 3px 1px; }
    .kq-loto-table th { padding: 4px 3px; font-size: var(--font-size-xs); }
    .kq-loto-table td { padding: 3px 4px; font-size: var(--font-size-sm); }
    .kq-loto-tab { font-size: var(--font-size-xs); padding: 7px 2px; }
    .home-posts-list .post-list-item { flex-direction: column; }
    .home-posts-list .post-list-thumb { width: 100%; }
}

/* ================================================
   Sá»• Káº¿t Quáº£ - Form & Layout
   ================================================ */

.skq-section { margin-bottom: var(--gap); }

/* === Bá»‘ cá»¥c 2 cá»™t: báº£ng giáº£i trĂ¡i + Ä‘áº§u/Ä‘uĂ´i pháº£i === */
.skq-two-col {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.skq-col-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.skq-col-left .kq-overflow {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.skq-col-left .kq-table {
    flex: 1;
}

.skq-col-right {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.skq-col-right .skq-loto-table {
    flex: 1;
}

.skq-box { margin-bottom: 0; }
.skq-box .main_result { box-shadow: var(--shadow-sm); }

/* Header trĂ n 2 cá»™t */
.skq-header {
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    padding: 10px 12px;
}

.skq-header .kq-title {
    margin: 0;
    color: var(--color-white);
}

.skq-header .kq-title a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.skq-header .kq-title a:hover {
    text-decoration: underline;
    color: var(--color-white);
}

.skq-header .kq-tags {
    margin: 0;
    font-size: var(--font-size-sm);
}

.kq-tags-inline {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: 400;
}
.kq-tags-inline a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
.kq-tags-inline a:hover {
    text-decoration: underline;
    color: var(--color-white);
}

.skq-header .kq-tags a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

.skq-header .kq-tags a + a::before {
    content: "/\00a0";
    padding: 0 3px;
    color: rgba(255,255,255,0.5);
}

.skq-header .kq-tags a:hover {
    text-decoration: underline;
    color: var(--color-white);
}

.skq-tinh-label {
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

/* Báº£ng giáº£i khĂ´ng cĂ³ header riĂªng */
.skq-table-no-header { border-top: none; }

/* Báº£ng loto Ä‘áº§u/Ä‘uĂ´i bĂªn pháº£i */
.skq-loto-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
}

.skq-loto-table thead th {
    padding: 6px 8px;
    background: #e8f5f5;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-text-secondary);
    border: 1px solid var(--kq-border);
    text-align: center;
}

.skq-loto-th-head { width: 35px; }

.skq-loto-table td {
    padding: 0 8px;
    font-size: var(--font-size-lg);
    font-weight: 600;
    border: 1px solid var(--kq-border);
    vertical-align: middle;
    font-family: var(--font-family);
}

.skq-loto-table tbody tr:nth-child(odd) { background: var(--kq-bg); }
.skq-loto-table tbody tr:hover { background: var(--kq-warning); }

.skq-loto-idx {
    text-align: center;
    font-weight: 700;
    color: var(--kq-danger);
    width: 35px;
}

.skq-loto-nums {
    text-align: left;
}

/* Báº£ng loto giĂ£n Ä‘á»u dĂ²ng theo chiá»u cao báº£ng giáº£i */
.skq-loto-table tbody {
    height: 100%;
}

.skq-loto-table tbody tr {
    height: 10%;
}

/* SKQ Loto header (links trĂ¡i + nĂºt toggle pháº£i) */
.skq-loto-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 10px;
    background: var(--color-primary-bg);
    border: 1px solid var(--kq-border);
    border-top: none;
}

.skq-loto-links-left {
    flex: 1;
    min-width: 0;
}

.skq-loto-links-left .kq-loto-links {
    margin: 0;
    padding: 0;
    background: none;
    text-align: left;
    font-size: var(--font-size-xs);
}

.skq-loto-toggle-btn {
    flex-shrink: 0;
    background: var(--color-white);
    border: 1px solid var(--kq-border);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    white-space: nowrap;
    transition: all .2s;
    line-height: 1.4;
}

.skq-loto-toggle-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.skq-loto-toggle-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.skq-loto-arrow {
    font-size: 9px;
    display: inline-block;
    transition: transform .2s;
    margin-left: 2px;
}

.skq-loto-toggle-btn.active .skq-loto-arrow {
    transform: rotate(180deg);
}

/* Form wrapper */
.skq-form-wrap {
    background: var(--color-white);
    padding: 16px;
    margin-bottom: var(--gap);
    box-shadow: var(--shadow-sm);
}

.skq-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.skq-field label {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.skq-select,
.skq-input {
    width: 100%;
    padding: 8px 10px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
}

.skq-select:focus,
.skq-input:focus {
    border-color: var(--color-primary);
}

/* Date picker wrapper */
.skq-date-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.skq-date-wrap .skq-input {
    flex: 1;
    min-width: 0;
    padding-right: 32px;
}

.skq-date-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skq-date-btn:hover {
    color: var(--color-primary);
}

.skq-date-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

/* Quick daycount buttons */
.skq-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 12px;
}

.skq-quick-btn {
    flex: 1;
    padding: 7px 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-family);
    background: var(--kq-toolbar);
    color: var(--color-white);
    border: 1px solid var(--kq-toolbar);
    cursor: pointer;
    text-align: center;
    transition: background var(--transition-fast);
}

.skq-quick-btn:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.skq-quick-btn.active {
    background: var(--kq-toolbar-active);
    border-color: var(--kq-toolbar-active);
}

.skq-quick-label {
    display: none;
}

/* Submit button */
.skq-submit-row {
    text-align: center;
}

.skq-submit-btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--color-white);
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.skq-submit-btn:hover {
    background: var(--color-primary-hover);
}

.skq-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Summary */
.skq-summary {
    text-align: center;
    padding: 14px 16px;
    background: var(--color-white);
    margin-bottom: var(--gap);
    box-shadow: var(--shadow-sm);
}

.skq-summary-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0 0 4px;
}

.skq-summary-title a {
    color: var(--color-primary);
    text-decoration: none;
}

.skq-summary-title a:hover {
    text-decoration: underline;
}

.skq-summary-info {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

.skq-summary-info a {
    color: var(--color-primary);
    text-decoration: none;
}

.skq-summary-info a:hover {
    text-decoration: underline;
}

/* Results */
.skq-results .boxResult {
    margin-bottom: 0;
}

.skq-separator {
    height: 8px;
    background: var(--color-bg);
}

/* Empty state */
.skq-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-white);
    font-size: var(--font-size-sm);
}

/* Loading */
.skq-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    background: var(--color-white);
}

/* Content */
.skq-content {
    margin-top: var(--gap);
    background: var(--color-white);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

/* === Banner h1 Ä‘áº§u trang sá»• káº¿t quáº£ === */
.skq-page-banner {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
    font-size: var(--font-size-lg);
    text-align: center;
    padding: 10px 12px;
    margin: 0 0 var(--gap);
    border-radius: var(--radius-sm);
}

/* Banner cao báº±ng tiĂªu Ä‘á» widget sidebar (.widget-title): cĂ¹ng padding,
   khá»›p font-size-md Ä‘á»ƒ chiá»u cao trĂ¹ng khĂ­t vá»›i box sidebar bĂªn cáº¡nh. */
.skq-page-banner--sidebar-h { font-size: var(--font-size-md); }

/* === Card bao banner + form + summary === */
.skq-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--gap);
    box-shadow: var(--shadow-sm);
}
.skq-card .skq-page-banner { margin: 0; border-radius: 0; }
.skq-card .skq-form-wrap   { box-shadow: none; margin-bottom: 0; }
.skq-card .skq-summary {
    box-shadow: none;
    margin-bottom: 0;
    border-top: 1px solid var(--color-border-light);
}
.skq-card .skq-view-mode { margin: 0; padding: 10px 12px 12px; }

/* === View mode toggle (Báº£ng full / káº¿t quáº£ / loto) === */
.skq-view-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.skq-view-opt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    background: var(--color-white);
    transition: all .2s;
    user-select: none;
}

.skq-view-opt:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-white);
}

.skq-view-opt.active {
    background: var(--kq-toolbar-active);
    color: var(--color-white);
    border-color: var(--kq-toolbar-active);
}

.skq-view-opt input { display: none; }

/* "Báº£ng káº¿t quáº£": áº©n cá»™t pháº£i (Ä‘áº§u/loto) vĂ  pháº§n loto cá»§a 2m */
.skq-results.view-ketqua .skq-col-right,
.skq-results.view-ketqua .kq-loto-wrap { display: none !important; }

.skq-results.view-ketqua .skq-col-left {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

/* "Báº£ng loto": áº©n cá»™t trĂ¡i (báº£ng giáº£i) + báº£ng 2m káº¿t quáº£, má»Ÿ sáºµn body loto */
.skq-results.view-loto .skq-col-left,
.skq-results.view-loto .kq-table-2m { display: none !important; }

.skq-results.view-loto .skq-col-right {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

.skq-results.view-loto .kq-loto-wrap .skq-loto-body { display: block !important; }
.skq-results.view-loto .skq-loto-toggle-btn { display: none !important; }

/* === Responsive SKQ === */
@media (max-width: 768px) {
    .skq-form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .skq-form-wrap {
        padding: 12px;
    }

    .skq-quick-btn {
        font-size: 11px;
        padding: 6px 2px;
    }

    .skq-col-right {
        width: 150px;
    }

    .skq-loto-table td {
        font-size: var(--font-size-base);
        padding: 4px 6px;
    }

    .skq-loto-header {
        flex-wrap: wrap;
    }

    .skq-loto-links-left {
        width: 100%;
    }

    .skq-loto-toggle-btn {
        width: 100%;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .skq-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .skq-quick-btn {
        font-size: 11px;
        padding: 5px 1px;
    }

    .skq-submit-btn {
        width: 100%;
    }

    .skq-summary-title {
        font-size: var(--font-size-md);
    }

    .skq-col-right {
        width: 120px;
    }

    .skq-loto-table td {
        font-size: var(--font-size-sm);
        padding: 3px 4px;
    }

    .skq-loto-idx {
        width: 25px;
    }
}

/* ================================================
   Xá»” Sá» ÄIá»†N TOĂN (123, 6x36, Tháº§n TĂ i)
   ================================================ */

/* Section */
.dt-section { margin-bottom: var(--gap); }

/* Tabs */
.dt-tabs {
    display: flex;
    flex-wrap: wrap;
    background: var(--color-white);
    border: 1px solid var(--kq-border);
    overflow: hidden;
    margin-bottom: 5px;
}
.dt-tab {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: 500;
    background: var(--color-white);
    color: var(--color-text);
    border: none;
    border-right: 1px solid var(--kq-border);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.dt-tab:last-child { border-right: none; }
.dt-tab:hover {
    background: var(--color-primary-bg);
    color: var(--color-primary);
    text-decoration: none;
}
.dt-tab-active,
.dt-tab-active:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Mobile: dt-tabs (XSÄT + 3 biáº¿n thá»ƒ) â†’ grid 2x2 Ä‘á»ƒ label dĂ i khĂ´ng wrap lá»‡ch */
@media (max-width: 768px) {
    .dt-tab {
        flex: 1 1 50%;
        min-width: 0;
        padding: 8px 4px;
        font-size: var(--font-size-xs);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .dt-tab:nth-child(2n) { border-right: none; }
    .dt-tab:nth-last-child(-n+2) { border-bottom: none; }
    .dt-tab:nth-child(-n+2) { border-bottom: 1px solid var(--kq-border); }
}

/* Mobile: kqxs-day-tabs trong .dt-section (8 items: label + 7 thá»©).
   Tab Ä‘áº§u chiáº¿m cáº£ hĂ ng; 7 tab cĂ²n láº¡i chia 4+3. */
@media (max-width: 768px) {
    .dt-section .kqxs-day-tab:first-child {
        flex: 1 1 100%;
        border-right: none;
        border-bottom: 1px solid var(--kq-border);
    }
    /* KhĂ´i phá»¥c border-right cho Thá»© 4 (nth-child(4n) toĂ n cá»¥c Ä‘Ă£ xoĂ¡ nĂ³) */
    .dt-section .kqxs-day-tab:nth-child(4) {
        border-right: 1px solid var(--kq-border);
    }
    /* Thá»© 5 (cuá»‘i hĂ ng giá»¯a): bá» border-right, giá»¯ border-bottom Ä‘á»ƒ tĂ¡ch hĂ ng cuá»‘i */
    .dt-section .kqxs-day-tab:nth-child(5) {
        border-right: none;
        border-bottom: 1px solid var(--kq-border);
    }
}

/* Pane tiĂªu Ä‘á» (trang tá»•ng há»£p XSÄT) */
.dt-pane + .dt-pane { margin-top: 10px; }
.dt-pane-title {
    margin: 0 0 10px;
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--color-primary);
}

/* Result card */
.dt-result-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0;
}
.dt-vietlott-bg {
    background: var(--color-primary-bg);
    color: var(--color-text);
    border: 1px solid var(--kq-border);
}
.dt-result-inner {
    padding: 20px;
    text-align: center;
}
.dt-result-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 8px;
    color: var(--color-primary);
}
.dt-result-desc {
    margin: 0 0 12px;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}
.dt-result-desc strong { color: var(--color-text); }
.dt-result-date {
    font-weight: 700;
    font-size: var(--font-size-md);
    margin-bottom: 16px;
}
.dt-date-highlight {
    color: var(--color-primary);
}

/* Balls for 6x36 */
.dt-balls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.dt-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    position: relative;
    z-index: 0;
}
.dt-ball::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    height: 30%;
    background: radial-gradient(ellipse at 50% 90%, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.2) 55%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}
.dt-ball::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 30%;
    height: 25%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.5) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}
.dt-ball-mega {
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,0.8) 0%, transparent 35%),
        radial-gradient(circle at 50% 50%, #6ee0e8 0%, #20c5cf 20%, #0a9da6 45%, #057e86 70%, #03585e);
    color: #000;
    box-shadow:
        0 3px 8px rgba(0,0,0,0.3),
        0 1px 3px rgba(5,126,134,0.45),
        inset 0 -6px 12px rgba(0,40,44,0.25),
        inset 0 3px 6px rgba(255,255,255,0.4);
}

/* === Äiá»‡n ToĂ¡n 123 â€“ table-style card === */
.dt123-card {
    background: var(--color-white);
}
.dt123-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-primary-bg);
    padding: 8px 12px;
    border-bottom: 1px solid var(--kq-border);
}
.dt123-title {
    font-weight: 700;
    font-size: var(--font-size-sm);
}
.dt123-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}
.dt123-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    padding: 14px 16px;
}
.dt123-balls-group {
    display: flex;
    gap: 8px;
}
.dt123-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    background: #fff;
    border: 2.5px solid currentColor;
}
.dt123-ball-yellow { color: #0a9da6; }
.dt123-ball-blue   { color: #1e88e5; }
.dt123-ball-green  { color: #388e3c; }
.dt123-ball-purple { color: #ffb300; }
.dt123-ball-rose   { color: #f4511e; }
.dt123-ball-indigo { color: #546e7a; }
.dt123-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* H1 banner cho card Ä‘áº§u tiĂªn (Tháº§n TĂ i) â€” dĂ¹ng style vl-power-h1, bá» negative margin
   vĂ¬ .dt123-card khĂ´ng cĂ³ padding Ä‘á»ƒ escape */
.dt123-card > .dt123-h1 {
    margin: 0;
}
/* Dáº£i date dÆ°á»›i banner: bá» ná»n teal nháº¡t + viá»n dÆ°á»›i Ä‘á»ƒ liá»n máº¡ch vá»›i body */
.dt123-header.dt123-header-center {
    justify-content: center;
    background: transparent;
    border-bottom: 0;
    padding: 10px 12px 0;
}

/* Number for Tháº§n TĂ i */
.dt-thantai-number {
    margin: 16px 0;
}
.dt-thantai-num {
    display: block;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    letter-spacing: 0.1em;
}

/* Notes */
.dt-note {
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: left;
    line-height: 1.5;
}

/* Divider */
.dt-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 15px 0;
}

/* Load more button */
.dt-loadmore-wrap {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}
.dt-btn-loadmore {
    display: inline-block;
    padding: 10px 24px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #fff;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.dt-btn-loadmore:hover { background: var(--color-primary-dark); }
.dt-btn-loadmore:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Widget: Báº£ng KQXS Äiá»‡n ToĂ¡n */
.dt-widget-wrap {
    display: flex;
    flex-direction: column;
}
.dt-widget-wrap .dt-widget-block + .dt-widget-block {
    margin-top: 4px;
}
.dt-widget-wrap .dt-loadmore-wrap {
    margin: 10px 0 0;
}

/* Widget: Báº£ng KQXS Vietlott */
.vl-widget-wrap {
    display: flex;
    flex-direction: column;
}
.vl-widget-wrap .vl-widget-block {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--kq-border, #e5e5e5);
}
.vl-widget-wrap .vl-widget-block + .vl-widget-block {
    padding-top: 14px;
}
.vl-widget-wrap .vl-widget-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
/* Bá» border + radius cá»§a cĂ¡c card bĂªn trong widget */
.vl-widget-wrap .vl-card,
.vl-widget-wrap .kn-main,
.vl-widget-wrap .kn-hist,
.vl-widget-wrap .bn-main,
.vl-widget-wrap .bn-hist {
    border: none;
    border-radius: 0;
}

/* Article content */
.dt-article {
    margin-top: 20px;
    padding: 15px;
    background: var(--color-white);
    border-radius: var(--radius-md);
}

/* Responsive */
@media (max-width: 576px) {
    .dt-result-inner { padding: 15px 12px; }
    .dt-ball { width: 38px; height: 38px; font-size: 1.15rem; }
    .dt-thantai-num { font-size: 2.2rem; }
    .dt-result-title { font-size: var(--font-size-md); }

    /* DT 123 responsive */
    .dt123-header {
        flex-direction: column;
        gap: 2px;
        text-align: center;
        padding: 6px 10px;
    }
    .dt123-body {
        gap: 20px;
        padding: 10px;
    }
    .dt123-balls-group { gap: 5px; }
    .dt123-ball {
        width: 34px;
        height: 34px;
        font-size: 1.05rem;
    }
}

/* ================================================
   VIETLOTT - Xá»• sá»‘ Vietlott
   ================================================ */

/* Section & Layout */
.vl-section { margin-bottom: var(--gap); }
.vl-section .kqxs-day-tabs { margin-bottom: var(--gap); }
.vl-section .vl-date-filter { margin: 0 0 var(--gap); }
.vl-list { display: flex; flex-direction: column; gap: var(--gap); }
.vl-list + .vl-list:not(:empty) { margin-top: var(--gap); }
.vl-section .vl-game-section + .vl-game-section { margin-top: var(--gap); }
.vl-empty {
    background: var(--color-white);
    padding: var(--gap-sm);
    text-align: center;
    color: var(--color-text-hint);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-dark);
}

/* Card */
.vl-card {
    border-radius: var(--radius-md);
    overflow: hidden;
}
.bg-dark-vietlott {
    background: #2c2c2c;
    color: #e0e0e0;
}
.vl-card-body {
    padding: 16px;
    text-align: center;
}
.vl-card-title {
    font-size: var(--font-size-md);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 8px;
    color: #fff;
}
.vl-card-body > p {
    font-size: var(--font-size-xs);
    margin: 0 0 10px;
    color: #ccc;
}

/* Ky quay */
.vl-ky-quay {
    font-weight: 700;
    font-size: var(--font-size-sm);
    margin-bottom: 12px;
}

/* Balls */
.vl-balls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}
.vl-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1;
}
.vl-ball-big {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
}
.vl-ball-power {
    background: radial-gradient(circle at 50% 25%, #fbe6c7, #ff9800);
    color: #000;
}
.vl-ball-green {
    background: radial-gradient(circle at 50% 25%, #c5f7c5, #28a745);
    color: #fff;
}
.vl-ball-mega {
    background: radial-gradient(circle at 50% 20%, #fe7e8a, red);
    color: #fff;
}
.vl-ball-loto {
    background: radial-gradient(circle at 50% 20%, #7eaafe, #1b00ff);
    color: #fff;
}
.vl-ball-purple {
    background: radial-gradient(circle at 50% 20%, #c89afe, #7b2ff2);
    color: #fff;
}
.vl-ball-keno {
    background: radial-gradient(circle at 50% 25%, #ffeae3, #ff4500);
    color: #000;
}

/* ================================================
   KENO - Redesigned layout
   ================================================ */

/* --- Main highlighted result --- */
.kn-main {
    background: var(--color-white);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 0;
}

.kn-logo {
    margin: 0 auto 12px;
    text-align: center;
    line-height: 0;
}
.kn-logo img {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

/* Status header */
.kn-status {
    text-align: center;
    margin-bottom: 14px;
}
.kn-status-title {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: #cf0034;
    margin-bottom: 4px;
}
.kn-status-next,
.kn-status-info {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    line-height: 1.6;
}
.kn-status-info strong {
    color: #333;
}

/* Main colored balls */
.kn-balls-main {
    max-width: 520px;
    margin: 0 auto 14px;
}
.kn-ball-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 5px;
}
.kn-mball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: var(--font-size-md);
    color: #fff;
    background: #cf0034;
}

/* Main stats - button style */
.kn-stats-main {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kn-sm-row {
    display: flex;
    gap: 10px;
}
.kn-sm-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-bg-alt);
}
.kn-sm-label {
    font-weight: 700;
}
.kn-sm-val {
    margin-left: auto;
    font-weight: 700;
    font-size: 1rem;
}
.kn-sm-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
}
.kn-sm-chan .kn-sm-ico { background: #cf0034; }
.kn-sm-le .kn-sm-ico   { background: #f9a825; }
.kn-sm-lon .kn-sm-ico  { background: #ef6c00; }
.kn-sm-nho .kn-sm-ico  { background: #ef6c00; }

/* --- History items --- */
.kn-hist {
    background: var(--color-white);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}
.kn-hist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}
.kn-hist-head strong {
    color: var(--color-text-dark);
}
.kn-hist-date {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}
.kn-date-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}
.kn-date-link:hover {
    color: #cf0034;
    border-bottom-color: #cf0034;
}

/* Date filter (Keno) */
.vl-date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 var(--gap);
    padding: 8px 12px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
}
.vl-date-filter label {
    font-weight: 600;
    color: var(--color-text);
}
.vl-date-input {
    position: relative;
    display: inline-block;
}
.vl-date-filter input[type="date"] {
    padding: 6px 34px 6px 10px;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: var(--font-size-sm);
}
.vl-date-filter input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}
.vl-date-input > .fa-calendar-days {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 0.95rem;
    pointer-events: none;
}
.vl-date-reset {
    padding: 6px 12px;
    background: #cf0034;
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--font-size-xs);
}
.vl-date-reset:hover {
    background: #a50029;
    color: #fff;
}

/* History table grid */
.kn-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.kn-gnum {
    border: 1px solid var(--color-border-medium);
    text-align: center;
    padding: 6px 0;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: #cf0034;
    background: var(--color-white);
}
.kn-gstat-row {
    border-top: 2px solid var(--color-border-medium);
}
.kn-gstat {
    border: 1px solid var(--color-border-medium);
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    color: var(--color-text);
    background: var(--color-bg-alt);
}
.kn-gstat.is-hot {
    color: #cf0034;
    font-weight: 700;
}

/* --- Keno responsive --- */
@media (max-width: 767px) {
    .kn-main { padding: 12px 8px; }

    .kn-mball {
        width: 30px;
        height: 28px;
        font-size: 0.75rem;
    }
    .kn-ball-row { gap: 3px; margin-bottom: 3px; }
    .kn-balls-main { max-width: 100%; }

    .kn-sm-row { gap: 6px; }
    .kn-sm-btn { padding: 6px 10px; font-size: 0.82rem; gap: 6px; }
    .kn-sm-ico { width: 22px; height: 22px; font-size: 0.65rem; }

    /* History grid */
    .kn-hist { padding: 10px; }
    .kn-gnum { padding: 4px 0; font-size: 0.78rem; }
    .kn-gstat { padding: 4px 0; font-size: 0.72rem; }
}
.vl-ball-bingo {
    background: radial-gradient(circle at 50% 25%, #e3fff1, #00ff43);
    color: #000;
}

/* ================================================
   BINGO 18 - Layout (mirrors Keno)
   ================================================ */

/* --- Main highlighted result --- */
.bn-main {
    background: var(--color-white);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 0;
}

.bn-logo {
    margin: 0 auto 12px;
    text-align: center;
    line-height: 0;
}
.bn-logo img {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

.bn-status {
    text-align: center;
    margin-bottom: 14px;
}
.bn-status-title {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: #cf0034;
    margin-bottom: 4px;
}
.bn-status-info {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    line-height: 1.6;
}
.bn-status-info strong {
    color: #333;
}

.bn-balls-main {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 14px;
    flex-wrap: wrap;
}
.bn-mball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.15rem;
    color: #cf0034;
    background: var(--color-white);
    border: 2.5px solid #cf0034;
}

.bn-stats-main {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bn-sm-row {
    display: flex;
    gap: 10px;
}
.bn-sm-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-bg-alt);
}
.bn-sm-label {
    font-weight: 700;
}
.bn-sm-val {
    margin-left: auto;
    font-weight: 700;
    font-size: 1rem;
}
.bn-sm-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
}
.bn-sm-tong .bn-sm-ico { background: #cf0034; }
.bn-sm-loai .bn-sm-ico { background: #ef6c00; }

/* --- History items --- */
.bn-hist {
    background: var(--color-white);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}
.bn-hist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}
.bn-hist-head strong {
    color: var(--color-text-dark);
}
.bn-hist-date {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}
.bn-date-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}
.bn-date-link:hover {
    color: #cf0034;
    border-bottom-color: #cf0034;
}

.bn-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.bn-gnum {
    border: 1px solid var(--color-border-medium);
    text-align: center;
    padding: 8px 0;
    font-size: var(--font-size-md);
    font-weight: 700;
    color: #cf0034;
    background: var(--color-white);
}
.bn-gstat-row {
    border-top: 2px solid var(--color-border-medium);
}
.bn-gstat {
    border: 1px solid var(--color-border-medium);
    text-align: center;
    padding: 6px 0;
    font-size: var(--font-size-xs);
    color: var(--color-text);
    background: var(--color-bg-alt);
}
.bn-type-hoa { color: #5b9bd5; font-weight: 700; }
.bn-type-lon { color: #ff4444; font-weight: 700; }
.bn-type-nho { color: #28a745; font-weight: 700; }

/* --- Bingo 18 responsive --- */
@media (max-width: 767px) {
    .bn-main { padding: 12px 8px; }

    .bn-mball {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
    }
    .bn-balls-main { gap: 8px; }

    .bn-sm-row { gap: 6px; }
    .bn-sm-btn { padding: 6px 10px; font-size: 0.82rem; gap: 6px; }
    .bn-sm-ico { width: 22px; height: 22px; font-size: 0.65rem; }

    .bn-hist { padding: 10px; }
    .bn-gnum { padding: 8px 0; font-size: 0.95rem; }
    .bn-gstat { padding: 5px 0; font-size: 0.78rem; }
}

/* Jackpot */
.vl-jackpot {
    margin-bottom: 12px;
}
.vl-jackpot-label {
    font-size: 0.9rem;
    color: #ccc;
}
.vl-jackpot-value {
    font-weight: 700;
    color: #ff4444;
    font-size: 1.2rem;
}
.vl-jackpot-big {
    font-size: 2rem;
}
.vl-jackpot-diff {
    font-size: 0.8rem;
    color: #0fbb36;
}

/* Table */
.vl-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
}
.vl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #e0e0e0;
}
.vl-table th,
.vl-table td {
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 10px;
    vertical-align: middle;
}
.vl-table thead td,
.vl-table thead th {
    font-weight: 700;
    background: rgba(255,255,255,0.08);
}
.vl-th-max3d {
    text-transform: uppercase;
    font-weight: 700;
    background: #444 !important;
    white-space: nowrap;
}

/* Max3D number grid */
.vl-num-row {
    display: flex;
    flex-wrap: wrap;
}
.vl-num-row-center { justify-content: center; }
.vl-col-3 { width: 25%; text-align: center; font-weight: 700; }
.vl-col-4 { width: 33.333%; text-align: center; font-weight: 700; }
.vl-col-6 { width: 50%; text-align: center; font-weight: 700; }
.vl-num-xl { font-size: 1.6rem; font-weight: 700; }
.vl-num-lg { font-size: 1.2rem; font-weight: 700; }
.vl-giai-name { font-weight: 700; white-space: nowrap; }
.vl-giai-val { font-size: 0.8rem; white-space: nowrap; }
.vl-note-center { font-size: 0.75rem; margin: 0; color: #aaa; }

/* Notes */
.vl-note {
    font-size: 0.75rem;
    margin: 0 0 4px;
    text-align: left;
    color: #aaa;
}

/* Bingo row layout */
.vl-type-hoa { color: #5b9bd5; font-weight: 700; }
.vl-type-lon { color: #ff4444; font-weight: 700; }
.vl-type-nho { color: #28a745; font-weight: 700; }

/* ================================================
   MAX 3D - Light theme layout
   ================================================ */
.vl-m3d {
    background: var(--color-white);
    border: 1px solid var(--color-border-dark);
    color: var(--color-text-dark);
}
.vl-m3d .vl-card-body {
    padding: 14px;
    text-align: center;
}
.vl-m3d .vl-card-title {
    color: #cf0034;
}
.vl-m3d .vl-card-body > p {
    color: var(--color-text-secondary);
}
.vl-m3d .vl-ky-quay {
    margin: 0;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid var(--color-border-medium);
    border-bottom: 0;
    background: var(--color-white);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* Tags (link ngá»¯ cáº£nh) â€” dĂ¹ng chung cho táº¥t cáº£ game Vietlott */
.vl-tags {
    margin: 0 0 8px;
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: 700;
}
.vl-tags a {
    color: #cf0034;
    text-decoration: none;
}
.vl-tags a:hover {
    color: #a50029;
    text-decoration: underline;
}
.vl-tags a + a::before {
    content: "/\00a0";
    padding: 0 3px;
    color: #cf0034;
    font-weight: 400;
    text-decoration: none;
    display: inline-block;
}

.vl-m3d-logo {
    margin: 0 auto 12px;
    text-align: center;
    line-height: 0;
}
.vl-m3d-logo img {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

/* Gá»™p 2 báº£ng Max3D thĂ nh 1 khá»‘i liá»n */
.vl-m3d .vl-table-wrap {
    margin: 0;
}

/* Max 3D main table */
.vl-m3d-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-dark);
}
.vl-m3d-table th,
.vl-m3d-table td {
    border: 1px solid var(--color-border-medium);
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
}
.vl-m3d-table thead th {
    background: var(--color-bg);
    font-weight: 700;
    color: var(--color-text);
}
.vl-m3d-giai {
    color: var(--color-text);
    width: 60px;
}
.vl-m3d-num {
    font-weight: 700;
    font-size: var(--font-size-md);
    color: var(--color-text-dark);
    letter-spacing: 1px;
    padding: 10px 4px;
}
.vl-m3d-num-db {
    color: #cf0034;
    font-size: 1.5rem;
}
.vl-m3d-empty {
    background: #fafafa;
}
.vl-m3d-col-giai { width: 60px; }
.vl-m3d-col-sl   { width: 60px; }
.vl-m3d-col-val  { width: 70px; white-space: nowrap; }

/* Subtitle Max 3D / Max 3D+ - náº±m giá»¯a 2 báº£ng nhÆ° 1 dáº£i liĂªn káº¿t */
.vl-m3d-subtitle {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    margin: 0;
    padding: 8px 10px;
    text-align: center;
    border-left: 1px solid var(--color-border-medium);
    border-right: 1px solid var(--color-border-medium);
}

/* Max 3D+ table variant */
.vl-m3dp-table .vl-m3dp-desc {
    text-align: left;
}

/* Notes */
.vl-m3d-note {
    font-size: 0.78rem;
    margin: 0 0 4px;
    text-align: left;
    color: #666;
}

/* Max 3D responsive */
@media (max-width: 767px) {
    .vl-m3d-table { font-size: 0.78rem; }
    .vl-m3d-table th,
    .vl-m3d-table td { padding: 6px 2px; }
    .vl-m3d-num { font-size: 0.85rem; padding: 6px 2px; letter-spacing: 0; }
    .vl-m3d-num-db { font-size: 1.15rem; }
    .vl-m3d-col-giai, .vl-m3d-giai { width: 44px; }
    .vl-m3d-col-sl { width: 40px; }
    .vl-m3d-col-val { width: 50px; font-size: 0.75rem; }
}

/* Utility text colors (in dark context) */
.vl-card .text-warning { color: #ffc107 !important; }
.vl-card .text-danger  { color: #ff4444 !important; }
.vl-card .text-success { color: #28a745 !important; }
.vl-card .text-right   { text-align: right; }
.vl-card .small        { font-size: 0.8rem; }

/* ================================================
   POWER 6/55 - Light theme layout
   ================================================ */
.vl-power {
    background: var(--color-white);
    border: 1px solid var(--color-border-dark);
    color: var(--color-text-dark);
}
.vl-power .vl-card-body {
    padding: 14px;
    text-align: center;
}
.vl-power-h1,
.vl-power-h2 {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
    text-align: center;
    padding: 10px 12px;
    margin: -14px -14px var(--gap);
}
.vl-power-h1 { font-size: var(--font-size-lg); }
.vl-power-h2 { font-size: var(--font-size-md); }

/* Override negative margins khi banner náº±m trong container khĂ´ng pháº£i .vl-card-body */
.kn-main > .kn-banner-h,
.bn-main > .bn-banner-h {
    margin: -16px -16px var(--gap);
}
.kn-hist > .kn-banner-h,
.bn-hist > .bn-banner-h {
    margin: -12px -14px 10px;
}
.dt-card-wrap {
    margin-bottom: var(--gap);
}
.vl-card-wrap,
.dt-card-wrap {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.dt-card-wrap > .dt-banner-h,
.vl-card-wrap > .vl-banner-h {
    margin: 0;
    border-radius: 0;
}
.dt-card-wrap > .dt-banner-h a,
.vl-card-wrap > .vl-banner-h a {
    color: inherit;
    text-decoration: none;
}
.vl-card-wrap > .vl-card,
.vl-card-wrap > .kn-main,
.vl-card-wrap > .bn-main {
    border: 0;
    border-radius: 0;
}
.dt-card-wrap > .boxResult {
    margin-bottom: 0;
    box-shadow: none;
    border-radius: 0;
}
@media (max-width: 767px) {
    .kn-main > .kn-banner-h,
    .bn-main > .bn-banner-h {
        margin: -12px -8px var(--gap);
    }
    .kn-hist > .kn-banner-h,
    .bn-hist > .bn-banner-h {
        margin: -10px -10px 10px;
    }
}

/* Power logo (only first card) */
.vl-power-logo {
    margin: 0 auto 12px;
    text-align: center;
    line-height: 0;
}
.vl-power-logo img {
    width: 100%;
    max-width: 160px;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

/* Estimated jackpot box */
.vl-jp-est {
    margin: 0 auto 10px;
}
.vl-jp-est-label {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 6px;
}
.vl-jp-est-btn {
    display: inline-block;
    background: #cf0034;
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    max-width: 100%;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}
.vl-jp-est-btn-big {
    /* Kept for backward-compat; same visual size as .vl-jp-est-btn */
    font-size: 1.4rem;
    padding: 10px 24px;
    max-width: 100%;
}
.vl-power .vl-jackpot-diff {
    color: #0fbb36;
    font-size: var(--font-size-xs);
    margin-top: 10px;
}

/* Ky quay thuong (light) */
.vl-ky-quay-light {
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin: 10px 0 12px;
}

/* Outline balls */
.vl-ball-outline {
    background: var(--color-white);
    color: var(--color-text-dark);
    border: 2px solid #cf0034;
    font-weight: 700;
}
.vl-ball-outline-bonus {
    border-color: #f5b301;
    color: #f5b301;
}
.vl-balls-sep {
    display: inline-block;
    width: 2px;
    height: 30px;
    background: var(--color-border-medium);
    margin: 0 4px;
    align-self: center;
}

/* Light table */
.vl-power .vl-table-wrap {
    margin: 0;
}
.vl-table-light {
    color: var(--color-text-dark);
    background: var(--color-white);
    margin: 0 auto;
    font-size: var(--font-size-sm);
}
.vl-table-light th,
.vl-table-light td {
    border: 1px solid var(--color-border-medium);
    padding: 7px 8px;
    text-align: center;
    vertical-align: middle;
}
.vl-table-light thead th {
    background: var(--color-bg);
    color: var(--color-text-dark);
    font-weight: 700;
    text-align: center;
}
.vl-table-light .vl-td-giai { font-weight: 600; text-align: center; }
.vl-table-light .vl-td-match { text-align: center; }
.vl-table-light .vl-td-jp { color: #cf0034; font-weight: 700; }
.vl-table-light .vl-match { justify-content: center; }

/* Match dots */
.vl-match {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.vl-match-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid #cf0034;
    background: var(--color-white);
}
.vl-match-dot-r { border-color: #cf0034; }
.vl-match-dot-y { border-color: #f5b301; }
.vl-match-sep {
    color: #666;
    font-weight: 700;
    margin: 0 1px;
}

/* ================================================
   MEGA 6/45 - Light theme layout (mirrors Power)
   ================================================ */
.vl-mega {
    background: var(--color-white);
    border: 1px solid var(--color-border-dark);
    color: var(--color-text-dark);
}
.vl-mega .vl-card-body {
    padding: 14px;
    text-align: center;
}
.vl-mega-logo {
    margin: 0 auto 12px;
    text-align: center;
    line-height: 0;
}
.vl-mega-logo img {
    width: 100%;
    max-width: 160px;
    height: auto;
    display: inline-block;
    object-fit: contain;
}
.vl-mega .vl-jp-est-btn,
.vl-mega .vl-jp-est-btn-big {
    background: #cf0034;
}
.vl-mega .vl-ball-outline {
    border-color: #cf0034;
    color: #cf0034;
}
.vl-mega .vl-jackpot-diff {
    color: #0fbb36;
    font-size: 0.8rem;
    margin-top: 10px;
}
.vl-mega .vl-table-wrap {
    margin: 0;
}
.vl-mega .vl-table-light .vl-td-jp {
    color: #cf0034;
}
.vl-mega .vl-match-dot {
    border-color: #cf0034;
}

/* ================================================
   LOTO 5/35 - Light theme layout (mirrors Power)
   ================================================ */
.vl-loto {
    background: var(--color-white);
    border: 1px solid var(--color-border-dark);
    color: var(--color-text-dark);
}
.vl-loto .vl-card-body {
    padding: 14px;
    text-align: center;
}
.vl-loto-logo {
    margin: 0 auto 12px;
    text-align: center;
    line-height: 0;
}
.vl-loto-logo img {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: inline-block;
    object-fit: contain;
}
.vl-loto .vl-jp-est-btn,
.vl-loto .vl-jp-est-btn-big {
    background: #00a63f;
}
.vl-loto .vl-ball-outline {
    border-color: #00a63f;
    color: #00a63f;
}
.vl-loto .vl-ball-outline-bonus {
    border-color: #f5b301;
    color: #f5b301;
}
.vl-loto .vl-table-wrap {
    margin: 0;
}
.vl-loto .vl-table-light .vl-td-jp {
    color: #00a63f;
}
.vl-match-dot-g { border-color: #00a63f; }
.vl-match-dot-b { border-color: #f5b301; }

/* Responsive */
@media (max-width: 767px) {
    .vl-card-body { padding: 12px; }
    .vl-ball-big { width: 36px; height: 36px; font-size: 1rem; }
    .vl-jackpot-big { font-size: 1.4rem; }
    .vl-num-xl { font-size: 1.2rem; }
    .vl-num-lg { font-size: 1rem; }

    .vl-power .vl-card-body,
    .vl-mega .vl-card-body,
    .vl-loto .vl-card-body,
    .vl-m3d .vl-card-body { padding: 12px 8px; }
    .vl-power-logo,
    .vl-mega-logo,
    .vl-loto-logo,
    .vl-m3d-logo,
    .kn-logo,
    .bn-logo { margin-bottom: 10px; }
    .vl-power-logo img,
    .vl-mega-logo img { max-width: 130px; }
    .vl-loto-logo img,
    .vl-m3d-logo img,
    .kn-logo img,
    .bn-logo img { max-width: 150px; }
    .vl-jp-est { margin-bottom: 8px; }
    .vl-jp-est-btn,
    .vl-jp-est-btn-big {
        font-size: 1.1rem;
        padding: 9px 14px;
        width: 100%;
        max-width: 300px;
        box-sizing: border-box;
    }
    .vl-jp-est-label { font-size: var(--font-size-xs); }
    .vl-ky-quay-light { font-size: var(--font-size-xs); margin: 8px 0 10px; }
    .vl-balls { gap: 4px; }
    .vl-balls-sep { height: 26px; margin: 0 2px; }
    .vl-table-light { font-size: var(--font-size-xs); }
    .vl-table-light th,
    .vl-table-light td { padding: 6px 4px; }
    .vl-match { gap: 2px; }
    .vl-match-dot { width: 9px; height: 9px; border-width: 1.2px; }
    .vl-match-sep { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .vl-power-logo img,
    .vl-mega-logo img { max-width: 110px; }
    .vl-loto-logo img,
    .vl-m3d-logo img,
    .kn-logo img,
    .bn-logo img { max-width: 130px; }
    .kn-logo,
    .bn-logo,
    .vl-power-logo,
    .vl-mega-logo,
    .vl-loto-logo,
    .vl-m3d-logo { margin-bottom: 8px; }
    .vl-power .vl-ball-big,
    .vl-mega .vl-ball-big,
    .vl-loto .vl-ball-big {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
        border-width: 2px;
    }
    .vl-balls { gap: 3px; }
    .vl-balls-sep { height: 22px; margin: 0 1px; }
    .vl-jp-est-label { font-size: 0.78rem; line-height: 1.3; }
    .vl-jp-est-btn,
    .vl-jp-est-btn-big { font-size: 1rem; padding: 8px 10px; }
    .vl-ky-quay-light { font-size: 0.78rem; }
    .vl-table-light th,
    .vl-table-light td { padding: 5px 2px; font-size: 0.72rem; }
    .vl-match-dot { width: 7px; height: 7px; border-width: 1px; }
    .vl-tags { font-size: 0.72rem; }
}

@media (max-width: 360px) {
    .vl-power-logo img,
    .vl-mega-logo img { max-width: 95px; }
    .vl-loto-logo img,
    .vl-m3d-logo img,
    .kn-logo img,
    .bn-logo img { max-width: 115px; }
    .vl-power .vl-ball-big,
    .vl-mega .vl-ball-big,
    .vl-loto .vl-ball-big {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    .vl-balls-sep { height: 18px; }
    .vl-match-dot { width: 6px; height: 6px; }
    .vl-table-light th,
    .vl-table-light td { padding: 4px 2px; font-size: 0.68rem; }
}

/* === Toolbar custom: radio pill + chip trĂ²n (override theme gá»‘c) === */
.kq-toolbar-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    flex-wrap: wrap;
    background: var(--color-white);
}
/* Chip group sĂ¡t mĂ©p pháº£i dĂ¹ toolbar wrap hay khĂ´ng */
.kq-toolbar-inline .kq-tb-cham-list { margin-left: auto; }

.kq-toolbar-inline .kq-tb-len {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

.kq-tb-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    padding: 0;
    background: transparent;
    border: 0;
    margin: 0;
    flex: 0 0 auto;
}
.kq-tb-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.kq-tb-pill .kq-tb-pill-mark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    background: #fff;
    display: inline-block;
    position: relative;
    flex: 0 0 auto;
    transition: border-color var(--transition-fast);
}
.kq-tb-pill.active .kq-tb-pill-mark::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    transform: translate(-50%, -50%);
}
.kq-tb-pill:hover .kq-tb-pill-mark { border-color: var(--color-primary-hover); }

.kq-tb-cham-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.kq-tb-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: var(--font-size-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    border: 2px solid transparent;
    padding: 0;
    flex: 0 0 auto;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}
.kq-tb-circle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.kq-tb-circle:hover { background: var(--color-primary-hover); }
.kq-tb-circle.active {
    background: var(--color-primary-dark);
    border-color: var(--color-white);
    box-shadow: 0 0 0 2px var(--color-primary-dark);
}

/* Toggle Loto trá»±c tiáº¿p */
.kq-tb-toggle-loto i { transition: transform var(--transition-base); font-size: 11px; }
.kq-tb-toggle-loto.is-expanded i { transform: rotate(180deg); }

/* Máº·c Ä‘á»‹nh áº©n Loto trá»±c tiáº¿p; toggle báº±ng JS */
.kq-loto-live-section.is-hidden { display: none; }

/* Highlight hĂ ng Ä‘áº§u/Ä‘uĂ´i tÆ°Æ¡ng á»©ng vá»›i "cháº¡m" Ä‘Æ°á»£c chá»n */
.kq-loto-table tbody tr.kq-row-active,
.kq-loto-table tbody tr.kq-row-active:nth-child(odd) { background: var(--kq-warning); }
.kq-loto-table tbody tr.kq-row-active td { background: var(--kq-warning); }

/* LĂ m má» cĂ¡c hĂ ng Ä‘áº§u/Ä‘uĂ´i khĂ´ng trĂ¹ng "cháº¡m" â€” opacity Ă¡p lĂªn wrapper trong td
   Ä‘á»ƒ border cá»§a td váº«n giá»¯ nguyĂªn Ä‘á»™ Ä‘áº­m. */
.kq-loto-table .kq-cell-fade { display: inline-block; transition: opacity var(--transition-fast); }
.kq-loto-table tbody tr.kq-row-dim .kq-cell-fade { opacity: 0.22; }

@media (max-width: 640px) {
    .kq-toolbar-inline { gap: 8px; padding: 8px; justify-content: center; }
    .kq-toolbar-inline .kq-tb-len { gap: 10px; }
    /* Bá» auto margin Ä‘á»ƒ khi wrap, chip group cÄƒn giá»¯a thay vĂ¬ dáº¡t pháº£i */
    .kq-toolbar-inline .kq-tb-cham-list { margin-left: 0; justify-content: center; }
    .kq-tb-pill .kq-tb-pill-text { font-size: var(--font-size-xs); }
    .kq-tb-circle { width: 24px; height: 24px; font-size: var(--font-size-xs); }
}

@media (max-width: 480px) {
    .kq-toolbar-inline { gap: 6px; padding: 6px; }
    .kq-toolbar-inline .kq-tb-len { gap: 8px; }
    .kq-tb-cham-list { gap: 4px; }
    .kq-tb-circle { width: 22px; height: 22px; }
}

/* === Realtime: Ă´ chÆ°a quay & Ă´ Ä‘ang quay (kqxs-realtime.js) === */
.kq-num-img { display: inline-block; vertical-align: middle; }
.kq-num-pending .kq-num-text { opacity: 1 !important; }
.kq-num-spinning .kq-num-text {
    opacity: 1 !important;
    transition: none !important;
}
kt-noformat { display: inline; }

/* Badge "Äang quay thÆ°á»Ÿng" trong header báº£ng khi cĂ²n data placeholder/spinning. */
.kq-live-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
    animation: kq-live-flag-glow 1.6s ease-in-out infinite;
}
.kq-live-flag-dot {
    width: 8px;
    height: 8px;
    background: #ff3b30;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    animation: kq-live-dot-pulse 1.1s ease-in-out infinite;
}
@keyframes kq-live-flag-glow {
    0%, 100% { background-color: rgba(255, 255, 255, 0.16); }
    50%      { background-color: rgba(255, 255, 255, 0.32); }
}
@keyframes kq-live-dot-pulse {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70%  { transform: scale(0.9); box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* Subtle shimmer trĂªn header báº£ng khi Ä‘ang quay. */
.kq-live-drawing .kq-th-header { position: relative; overflow: hidden; }
.kq-live-drawing .kq-th-header::after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 60%; height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: kq-live-shimmer 3s linear infinite;
    pointer-events: none;
}
@keyframes kq-live-shimmer {
    0%   { transform: translateX(0); }
    100% { transform: translateX(280%); }
}

/* Variant: Ä‘Ă£ quay xong â€” bá» pulse, dĂ¹ng tick xanh thay dot Ä‘á». */
.kq-live-flag-done {
    animation: none;
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(220, 252, 231, 0.55);
}
.kq-live-flag-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}


/* === Realtime "TRá»°C TIáº¾P" badge (kqxs-realtime.js) === */
.boxResult { position: relative; }
.kqxs-live-badge {
    position: absolute; top: 6px; right: 8px;
    z-index: 5;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    background: #e11d48;
    color: #fff;
    font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.35);
    pointer-events: none;
    user-select: none;
}
.kqxs-live-badge .kqxs-live-dot {
    width: 7px; height: 7px;
    background: #fff; border-radius: 50%;
}

/* ================================================
   Override khi báº£ng KQXS/quay-thá»­ render bĂªn trong
   bĂ i viáº¿t (.article-content). category.css Ä‘Ă¨ h2/h3/a/p
   vĂ  .article-content table/th/td â†’ re-apply kqxs styles
   vá»›i specificity cao hÆ¡n (.article-content .boxResult â€¦).
   ================================================ */
.article-content .boxResult {
    line-height: 1.4;
    color: var(--color-text);
    font-size: var(--font-size-md);
}
.article-content .boxResult h1,
.article-content .boxResult h2,
.article-content .boxResult h3,
.article-content .boxResult h4 {
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}
.article-content .boxResult .kq-title { font-weight: 700; font-size: var(--font-size-md); }
.article-content .boxResult .kq-tags  { font-size: var(--font-size-xs); font-weight: 400; }
.article-content .boxResult a { color: inherit; text-decoration: none; }
.article-content .boxResult a:hover { text-decoration: underline; }
.article-content .boxResult .kq-tags a { color: rgba(255,255,255,0.85); }
.article-content .boxResult .kq-tags a:hover { color: var(--color-white); }
.article-content .boxResult p,
.article-content .boxResult ul,
.article-content .boxResult ol,
.article-content .boxResult li { margin: 0; padding: 0; list-style: none; }

/* === Reset article-content table/th/td trong .boxResult === */
.article-content .boxResult table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: inherit;
}
.article-content .boxResult th,
.article-content .boxResult td {
    padding: 0;
    border: 0;
    text-align: center;
    background: transparent;
    color: inherit;
    font-weight: inherit;
}

/* === Re-apply main kqxs styles vá»›i specificity bump === */
.article-content .boxResult .kq-th-header {
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    padding: 10px 12px;
}
.article-content .boxResult .kq-name {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    background: var(--color-white);
    border: 1px solid var(--kq-border);
    padding: 6px 4px;
    width: 85px; min-width: 85px;
    white-space: nowrap;
}
.article-content .boxResult .kq-nums-td {
    padding: 0;
    border: 1px solid var(--kq-border);
    background: var(--color-white);
}
.article-content .boxResult .kq-num-2m {
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--color-text-dark);
    background: var(--color-white);
    border: 1px solid var(--kq-border);
    padding: 6px 4px;
    min-height: 38px;
}
.article-content .boxResult .kq-num-2m.kq-danger { color: #cf0034; }
.article-content .boxResult .ky-tu-db .kq-num-2m { font-weight: 400; font-size: var(--font-size-md); }

/* Province row trong báº£ng 2m */
.article-content .boxResult .kq-table-2m .kq-province-row > th { background: var(--color-white); }
.article-content .boxResult .kq-table-2m .kq-province-row th:not(.kq-name) {
    color: #cf0034;
    font-weight: 700;
    border: 1px solid var(--kq-border);
    padding: 8px 6px;
}
.article-content .boxResult .kq-table-2m .kq-province-row th:not(.kq-name) a { color: #cf0034; }
.article-content .boxResult .kq-table-2m .kq-province-row .kq-name { background: var(--color-white); color: var(--color-text-secondary); font-weight: normal; }

/* Zebra striping cho table-2m */
.article-content .boxResult .kq-table-2m tbody tr.kq-row-odd > * { background: var(--kq-bg); }
.article-content .boxResult .kq-table-2m tbody tr.kq-row-db > * { background: var(--color-white); }

/* Toolbar row dÆ°á»›i báº£ng */
.article-content .boxResult .kq-toolbar-td { padding: 0; background: var(--color-white); }

/* Loto Äáº§u/ÄuĂ´i table */
.article-content .boxResult .kq-loto-table th,
.article-content .boxResult .kq-loto-table td {
    border: 1px solid var(--kq-border);
    padding: 4px 8px;
    text-align: center;
}
.article-content .boxResult .kq-loto-table th {
    background: var(--color-primary-bg);
    color: var(--color-text-secondary);
    font-weight: 700;
    font-size: var(--font-size-sm);
}
.article-content .boxResult .kq-loto-table tbody tr:nth-child(odd) > * { background: var(--kq-bg); }
.article-content .boxResult .kq-loto-table tbody tr:nth-child(even) > * { background: var(--color-white); }
.article-content .boxResult .kq-loto-idx { color: #cf0034; font-weight: 700; text-align: center; }
.article-content .boxResult .kq-loto-dau { text-align: left; font-weight: 600; }
.article-content .boxResult .kq-loto-duoi { text-align: right; font-weight: 600; }
.article-content .boxResult .kq-muted { color: var(--color-text-hint); }

/* Loto tabs (TP.HCM | Long An | â€¦) */
.article-content .kq-loto-wrap { line-height: 1.4; }
.article-content .kq-loto-wrap .kq-loto-tab { color: var(--color-text-secondary); }
.article-content .kq-loto-wrap .kq-loto-tab.active { color: var(--color-white); }

/* Khi shortcode bá» báº£ng Äáº§u/ÄuĂ´i (showLotoTable=false), tab tá»‰nh áº©n ban Ä‘áº§u.
   Khi user má»Ÿ grid Loto trá»±c tiáº¿p (chevron toolbar gá»¡ is-hidden khá»i
   .kq-loto-live-section), tab hiá»‡n ra. */
.kq-loto-wrap--auto-hide-tabs .kq-loto-tabs { display: none; }

/* ===== Icon "Ä‘ang chá» káº¿t quáº£" â€” trang /xo-so-hom-nay ===== */
/* Thay cho 1 con sá»‘ trong tháº» Vietlott / Äiá»‡n toĂ¡n khi loáº¡i Ä‘Ă³ chÆ°a quay. */
.xs-wait {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1em;
}
.xs-wait img { vertical-align: middle; }
/* Quáº£ bĂ³ng sá»‘ á»Ÿ tráº¡ng thĂ¡i chá» quay (Äiá»‡n toĂ¡n 123 / 6x36 / Tháº§n TĂ i). */
.dt123-ball-wait { border-color: #cbd5e1; background: #f8fafc; }
.kq-loto-wrap--auto-hide-tabs:has(.kq-loto-live-section:not(.is-hidden)) .kq-loto-tabs { display: flex; }

/* Danh sĂ¡ch 6 link ngáº«u nhiĂªn (thá»‘ng kĂª/soi cáº§u) Ä‘áº·t trong box KQXS á»Ÿ trang chá»§. */
.home-tk-links {
    list-style: none;
    margin: 0;
    padding: 8px 14px 12px;
    border-top: 1px solid var(--kq-border);
    column-count: 2;
    column-gap: 24px;
}
.home-tk-links li {
    position: relative;
    padding: 5px 0 5px 18px;
    line-height: 1.5;
    break-inside: avoid;
}
.home-tk-links li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    border-top: 4px dashed;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    color: var(--color-primary);
}
.home-tk-links a:hover { text-decoration: underline; }
@media (max-width: 480px) {
    .home-tk-links {
        column-count: 1;
        padding: 6px 12px 10px;
    }
}
.card{
transition:.3s;
}

.updated{
animation:flash .5s;
}

@keyframes flash{

0%{
background:#ffe082;
}

100%{
background:#fff;
}
}
img {
    width: 100%;
}
/* ==========================================================================
   DÃ² vÃ© sá»‘
   ========================================================================== */
.dvs-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Live banner pháº£i dÃ­nh sÃ¡t vÃ o card phÃ­a dÆ°á»›i (giá»‘ng cÃ¡c trang KQXS khÃ¡c) */
.dvs-section > .live-header { margin-bottom: calc(-1 * var(--space-3)); }

.dvs-card {
    background: var(--color-surface);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dvs-card-head {
    background: var(--color-primary);
    color: #fff;
    padding: 10px 12px;
    text-align: center;
}

.dvs-card-title {
    margin: 0;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    color: #fff;
}

/* ----- Form ----- */
.dvs-form { padding: var(--space-3); }

.dvs-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.dvs-field { display: flex; flex-direction: column; gap: 4px; }
.dvs-field--wide { grid-column: 1 / -1; }

.dvs-field label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

.dvs-hint {
    font-weight: var(--font-weight-regular);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.dvs-input,
.dvs-select,
.dvs-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
}

.dvs-input:focus,
.dvs-select:focus,
.dvs-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(5, 126, 134, 0.15);
}

.dvs-textarea { resize: vertical; min-height: 60px; }

/* Date input + icon */
.dvs-date-wrap { position: relative; }
.dvs-date-wrap .dvs-input { padding-right: 36px; }
.dvs-date-hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    width: 100%;
}
.dvs-date-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.dvs-date-btn:hover { background: var(--color-bg); }

.dvs-submit-row {
    margin-top: var(--space-3);
    text-align: center;
}

.dvs-submit-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background var(--transition);
}
.dvs-submit-btn:hover { background: var(--color-primary-hover); }

/* ----- Empty state ----- */
.dvs-empty {
    padding: var(--space-4);
    text-align: center;
    color: var(--color-text-muted);
}

/* ----- Summary ----- */
.dvs-summary { padding: var(--space-2) var(--space-3); }

.dvs-summary-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: baseline;
    column-gap: var(--space-3);
    padding: 10px 0;
}

.dvs-summary-result {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px var(--space-3);
}

.dvs-summary-status { white-space: nowrap; }
.dvs-summary-row + .dvs-summary-row { border-top: 1px dashed var(--color-border); }

.dvs-summary-ticket {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    font-size: var(--font-size-md);
    font-variant-numeric: tabular-nums;
}

.dvs-summary-status { font-weight: var(--font-weight-medium); }
.dvs-summary-lose   { color: var(--color-text-muted); }
.dvs-summary-win    { color: var(--color-success); }

.dvs-summary-prize {
    padding: 2px 8px;
    background: rgba(22, 163, 74, 0.1);
    border-radius: var(--radius-sm);
    color: var(--color-success);
    font-size: var(--font-size-sm);
}

.dvs-summary-total {
    padding: 10px 0 4px;
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-md);
    color: var(--color-text);
}
.dvs-summary-total strong { color: var(--color-primary); }

@media (max-width: 480px) {
    .dvs-summary-row { grid-template-columns: 80px 1fr; }
}

/* ==========================================================================
   Widget DÃ² vÃ© sá»‘ (sidebar)
   ========================================================================== */
.dvs-widget { padding: 0; overflow: hidden; }

.dvs-widget-form {
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.dvs-widget-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-2);
    align-items: stretch;
}

.dvs-widget-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dvs-widget-field label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}

.dvs-widget-input {
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
}

.dvs-widget-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(5, 126, 134, 0.15);
}

.dvs-widget-submit {
    padding: 6px 16px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: background var(--transition);
}
.dvs-widget-submit:hover { background: var(--color-primary-hover); }

.dvs-widget-hint {
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-top: 4px;
}

/* ----- Highlight sá»‘ trÃºng trÃªn báº£ng KQ (ná»™i suy lÃªn class .kq-num gá»‘c) ----- */
.dvs-kq-wrap .kq-num.dvs-hit {
    background: var(--color-accent);
}

/* ----- Mobile ----- */
@media (max-width: 600px) {
    .dvs-form-grid { grid-template-columns: 1fr; }
}
