/* Shared controls and the final theme layer, after the legacy theme styles. */
.rv-password-toggle {
    color: var(--rv-muted); background: var(--rv-surface); border: 1px solid var(--rv-border);
    min-width: 44px; min-height: 44px;
}
.rv-password-toggle:hover { color: var(--rv-text); background: var(--rv-bg-tertiary); }
.rv-password-toggle:focus-visible, .rv-share :focus-visible { outline: 3px solid var(--rv-accent); outline-offset: 2px; }
.rv-share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rv-share a, .rv-share button {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1px solid var(--rv-border); border-radius: 50%; background: var(--rv-bg-secondary);
    color: var(--rv-text-secondary); font-size: 1.1rem; cursor: pointer;
}
.rv-share a:hover, .rv-share button:hover { background: var(--rv-accent-light); color: var(--rv-accent-dark); }
.rv-share-status { flex-basis: 100%; overflow-wrap: anywhere; }

html[data-theme="dark"] {
    color-scheme: dark;
    --rv-bg: #101214; --rv-bg-secondary: #181b1f; --rv-bg-tertiary: #252a30;
    --rv-surface: #1c2025; --rv-text: #f1f3f5; --rv-text-secondary: #d1d7de;
    --rv-muted: #adb7c2; --rv-border: #424b55; --rv-border-light: #303740; --rv-divider: #424b55;
    --rv-accent-light: #173d2b; --rv-primary-light: #173d2b;
    --rv-primary-dark: #6ee7a0; --rv-accent-dark: #6ee7a0;
    --rv-gradient: linear-gradient(135deg, #086b35, #087f3e);
    --bs-body-color: #f1f3f5; --bs-body-bg: #101214;
    --bs-secondary-color: #adb7c2; --bs-border-color: #424b55;
}
[data-theme="dark"] .text-muted, [data-theme="dark"] .text-secondary { color: var(--rv-muted) !important; }
[data-theme="dark"] .text-dark, [data-theme="dark"] .text-body { color: var(--rv-text) !important; }
[data-theme="dark"] .text-danger { color: #ff9b9b !important; }
[data-theme="dark"] .text-success { color: #6ee7a0 !important; }
[data-theme="dark"] .text-primary { color: #8ab4ff !important; }
[data-theme="dark"] .bg-warning.text-dark { color: #171717 !important; }
[data-theme="dark"] .bg-white, [data-theme="dark"] .bg-light { background-color: var(--rv-surface) !important; }
[data-theme="dark"] .border { border-color: var(--rv-border) !important; }
[data-theme="dark"] .card, [data-theme="dark"] .rv-blog-detail-article,
[data-theme="dark"] .rv-sidebar-card, [data-theme="dark"] .rv-blog-card,
[data-theme="dark"] .rv-auth-card, [data-theme="dark"] .rv-widget,
[data-theme="dark"] .list-group-item, [data-theme="dark"] .accordion-item {
    background-color: var(--rv-surface); color: var(--rv-text); border-color: var(--rv-border);
}
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select,
[data-theme="dark"] .input-group-text, [data-theme="dark"] .rv-field input,
[data-theme="dark"] .rv-field textarea, [data-theme="dark"] .rv-pd__qty,
[data-theme="dark"] .rv-shop-search input, [data-theme="dark"] .rv-shop-sort {
    color: var(--rv-text); background-color: var(--rv-bg-secondary); border-color: var(--rv-border);
}
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: var(--rv-muted); opacity: 1; }
[data-theme="dark"] .form-control:disabled, [data-theme="dark"] .form-control[readonly] { background-color: var(--rv-bg-tertiary); color: var(--rv-muted); }
[data-theme="dark"] .form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23d1d7de' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px 12px; }
[data-theme="dark"] .rv-password-toggle { color: var(--rv-muted); background: var(--rv-bg-secondary); border-color: var(--rv-border); }
[data-theme="dark"] .rv-field label, [data-theme="dark"] .rv-sum-total,
[data-theme="dark"] .rv-pd__title, [data-theme="dark"] .rv-ord__title { color: var(--rv-text); }
[data-theme="dark"] .rv-sum-line, [data-theme="dark"] .rv-prev-desc { color: var(--rv-text-secondary); }
[data-theme="dark"] .rv-btn-ghost, [data-theme="dark"] .rv-pd__btn--ghost { background: var(--rv-bg-tertiary); color: #a7c7ff; border-color: #658bc5; }
[data-theme="dark"] .rv-pay-note { background: #172c46; border-color: #45678d; color: #b5d4ff; }
[data-theme="dark"] .rv-notice { background: #352b16; border-color: #78623b; color: #f6d48a; }
[data-theme="dark"] .table {
    --bs-table-bg: var(--rv-surface); --bs-table-color: var(--rv-text);
    --bs-table-striped-bg: #252a30; --bs-table-striped-color: var(--rv-text);
    --bs-table-hover-bg: #303740; --bs-table-hover-color: var(--rv-text);
    --bs-table-border-color: var(--rv-border);
}
[data-theme="dark"] .accordion-button { background: var(--rv-surface); color: var(--rv-text); }
[data-theme="dark"] .accordion-button:not(.collapsed) { background: var(--rv-accent-light); color: #a0efbe; }
[data-theme="dark"] .ql-toolbar, [data-theme="dark"] .ql-container { border-color: var(--rv-border) !important; background: var(--rv-surface); color: var(--rv-text); }
[data-theme="dark"] .ql-snow .ql-stroke { stroke: var(--rv-text-secondary); }
[data-theme="dark"] .ql-snow .ql-fill { fill: var(--rv-text-secondary); }
[data-theme="dark"] .ql-snow .ql-picker { color: var(--rv-text-secondary); }
[data-theme="dark"] .ql-snow .ql-picker-options, [data-theme="dark"] .ql-snow .ql-tooltip { background: var(--rv-bg-tertiary); color: var(--rv-text); border-color: var(--rv-border); }
[data-theme="dark"] .ql-editor.ql-blank::before { color: var(--rv-muted); }
[data-theme="dark"] .rv-step, [data-theme="dark"] .rv-prev-card { background: var(--rv-surface); }
[data-theme="dark"] .rv-prev-img { background: var(--rv-bg-tertiary); }
[data-theme="dark"] .rv-detail-summary { background: var(--rv-bg-tertiary); color: var(--rv-text-secondary); }
[data-theme="dark"] .rv-share a, [data-theme="dark"] .rv-share button { background: var(--rv-bg-tertiary); color: var(--rv-text-secondary); }
[data-theme="dark"] .rv-share a:hover, [data-theme="dark"] .rv-share button:hover { background: var(--rv-accent-light); color: #a0efbe; }
[data-theme="dark"] .full-desc, [data-theme="dark"] .blog-content { color: var(--rv-text); }
[data-theme="dark"] .full-desc [style], [data-theme="dark"] .blog-content [style] { color: inherit !important; background-color: transparent !important; }
[data-theme="dark"] .full-desc a, [data-theme="dark"] .blog-content a { color: #a7c7ff !important; }
[data-theme="dark"] .swal2-popup { background: var(--rv-surface); color: var(--rv-text); }
[data-theme="dark"] .swal2-title, [data-theme="dark"] .swal2-html-container { color: var(--rv-text); }
[data-theme="dark"] .rv-points-summary { background: #352b16 !important; border-color: #78623b !important; }
[data-theme="dark"] .rv-deal-price { background: #3b2026 !important; border-color: #804550 !important; }
[data-theme="dark"] .rv-header__post-btn { background: #087f3e !important; color: #fff !important; }
[data-theme="dark"] .rv-header__post-btn span { color: #fff !important; }
[data-theme="dark"] .rv-account-nav li a.active { background: #087f3e; color: #fff !important; }
[data-theme="dark"] .rv-footer__bottom, [data-theme="dark"] .rv-footer__bottom span,
[data-theme="dark"] .rv-footer__bottom strong { color: var(--rv-muted); }
[data-theme="dark"] #rvKeyLinks p, [data-theme="dark"] #rvKeyLinks a { color: var(--rv-muted) !important; }
[data-theme="dark"] .rv-drawer { background: var(--rv-surface); }
[data-theme="dark"] .rv-shop-chip, [data-theme="dark"] .rv-shop-pagination a,
[data-theme="dark"] .rv-shop-pagination span { background: var(--rv-bg-tertiary); color: var(--rv-text-secondary); border-color: var(--rv-border); }
[data-theme="dark"] .rv-shop-chip.is-active, [data-theme="dark"] .rv-shop-pagination .is-current { background: #244fbd; color: #fff; }
[data-theme="dark"] .rv-shop-card__media, [data-theme="dark"] .rv-pd__main,
[data-theme="dark"] .rv-od__thumb, [data-theme="dark"] .rv-dl { background: var(--rv-bg-tertiary); }
[data-theme="dark"] .rv-shop-card__cat { color: #a7c7ff; }
[data-theme="dark"] .rv-shop-card__desc, [data-theme="dark"] .rv-shop-empty,
[data-theme="dark"] .rv-ord__date, [data-theme="dark"] .rv-od__sub,
[data-theme="dark"] .rv-dl__meta, [data-theme="dark"] .rv-od__meta dt { color: var(--rv-muted); }
[data-theme="dark"] .rv-shop-empty h3, [data-theme="dark"] .rv-ord__code,
[data-theme="dark"] .rv-od__name, [data-theme="dark"] .rv-dl__name,
[data-theme="dark"] .rv-od__meta dd { color: var(--rv-text); }
[data-theme="dark"] .rv-shop-card__price strong, [data-theme="dark"] .rv-pd__price,
[data-theme="dark"] .rv-ord__amount, [data-theme="dark"] .rv-od__price { color: #ff9b9b; }
[data-theme="dark"] .rv-gate { background: #352b16; border-color: #78623b; color: #f6d48a; }
[data-theme="dark"] .rv-pd__tabs { border-color: var(--rv-border); }
[data-theme="dark"] .rv-pd__tab { color: var(--rv-text-secondary); background: var(--rv-bg-tertiary); }
[data-theme="dark"] .rv-pd__tab.is-active { color: #a7c7ff; background: var(--rv-surface); }
[data-theme="dark"] .rv-img-slot { background: var(--rv-bg-secondary); }
[data-theme="dark"] .rv-section-title[style*="c2185b"] { color: #ff9fca !important; }
[data-theme="dark"] .rv-section-title i[style*="e91e63"] { color: #ff9fca !important; }
[data-theme="dark"] .rv-featured-card, [data-theme="dark"] .rv-featured-body { background: var(--rv-surface); }
[data-theme="dark"] .rv-featured-cat, [data-theme="dark"] .rv-card-cat,
[data-theme="dark"] .rv-step.active { color: #a0efbe; }
[data-theme="dark"] .rv-step-num { color: var(--rv-text); }
[data-theme="dark"] .rv-step.active .rv-step-num { background: #087f3e; color: #fff; }
[data-theme="dark"] a.btn-primary, [data-theme="dark"] a.btn-success,
[data-theme="dark"] a.btn-rv { color: #fff !important; }
[data-theme="dark"] .rv-cart__name, [data-theme="dark"] .rv-cart__total,
[data-theme="dark"] .rv-pd__specs dd { color: var(--rv-text); }
[data-theme="dark"] .rv-cart__sub, [data-theme="dark"] .rv-cart__sum,
[data-theme="dark"] .rv-pd__meta, [data-theme="dark"] .rv-pd__specs dt,
[data-theme="dark"] .rv-files span { color: var(--rv-muted); }
[data-theme="dark"] .rv-cart__thumb, [data-theme="dark"] .rv-cart__qty button,
[data-theme="dark"] .rv-cart__qty input, [data-theme="dark"] .rv-pd__specs,
[data-theme="dark"] .rv-files li { background: var(--rv-bg-tertiary); color: var(--rv-text); border-color: var(--rv-border); }
[data-theme="dark"] .rv-cart__price { color: #ff9b9b; }
[data-theme="dark"] .rv-pd__tabnav button { color: var(--rv-muted); }
[data-theme="dark"] .rv-pd__tabnav button.is-active { color: #a7c7ff; border-color: #658bc5; }
[data-theme="dark"] .rv-files i { color: #a7c7ff; }
[data-theme="dark"] .rv-filter-btn { background: var(--rv-bg-tertiary); color: var(--rv-text-secondary); border-color: var(--rv-border); }
[data-theme="dark"] .rv-filter-btn.active, [data-theme="dark"] .page-item.active .page-link { background: #087f3e; border-color: #087f3e; color: #fff; }
[data-theme="dark"] .rv-widget-border { background: var(--rv-surface); color: var(--rv-text); border-color: var(--rv-border); }
html[data-theme="dark"] .rv-lottery {
    --lt-blue: #2454b9; --lt-blue-dark: #a7c7ff; --lt-text: #f1f3f5; --lt-ink: #f1f3f5; --lt-muted: #adb7c2;
    --lt-blue-soft: #1c2025; --lt-blue-light: #252a30;
    --lt-grad: linear-gradient(135deg, #2454b9, #1f3f8c);
}
[data-theme="dark"] .rv-lottery .sidebar-block .caption { background: #2454b9; color: #fff; }
[data-theme="dark"] .rv-lt-nav-head { color: var(--rv-text); }
[data-theme="dark"] .rv-lottery a { color: #a7c7ff; }
[data-theme="dark"] .rv-lottery .active > a, [data-theme="dark"] .rv-lottery .caption a { color: #fff; }
[data-theme="dark"] .rv-lunar-solar-date, [data-theme="dark"] .rv-lunar-cal-cell .lunar { color: var(--rv-muted); }
[data-theme="dark"] .rv-lunar-sep, [data-theme="dark"] .rv-lunar-month,
[data-theme="dark"] .rv-lunar-cal-cell .solar { color: var(--rv-text); }
[data-theme="dark"] .rv-lunar-year { color: #a7c7ff; }
[data-theme="dark"] .rv-detail-cat { color: #a0efbe; }
[data-theme="dark"] .rv-comments__count, [data-theme="dark"] .rv-comment-form__btn,
[data-theme="dark"] .rv-sidebar-cat-link.active { background: #087f3e; color: #fff; }
[data-theme="dark"] .rv-related-card, [data-theme="dark"] .rv-related-body { background: var(--rv-surface); }
[data-theme="dark"] .rv-blog-related { background: var(--rv-surface); border-color: var(--rv-border); }
[data-theme="dark"] .filter-btn.active { background: #087f3e; border-color: #087f3e; color: #fff; }
[data-theme="dark"] .rv-lt-sidebar--left .rv-lt-nav-head,
[data-theme="dark"] .rv-lt-nav-head span { color: var(--rv-text) !important; }
[data-theme="dark"] .rv-lottery .xsdate { background: var(--rv-surface) !important; color: var(--rv-text); }
[data-theme="dark"] .rv-lottery .xsdate a { color: #a7c7ff !important; }
[data-theme="dark"] .rv-lt-sidebar--left .rv-lt-nav-sub { background: var(--rv-surface) !important; }
[data-theme="dark"] .rv-lt-sidebar--left .rv-lt-nav-sub a { color: #a7c7ff !important; }
[data-theme="dark"] .rv-lottery .sidebar-block ul { background: var(--rv-surface) !important; }

/* So dien thoai tren chi tiet tin dang: mac dinh hien ***, nguoi dung bam vao moi hien so.
   HTML khong chua so that (chi ban ma hoa doi + Base64) de crawler khong quet duoc —
   xem ClassicfiedProject.Infrastructure.PhoneObfuscator + rv-ui.js. */
.rv-phone-mask { letter-spacing: .14em; transition: letter-spacing .15s ease, background .15s ease, border-color .15s ease; }
.rv-phone-mask__text { font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-phone-mask.is-revealed { letter-spacing: normal; }
.rv-phone-mask:focus-visible { outline: 3px solid var(--rv-accent); outline-offset: 2px; }

/* Popup ung ho (nut #asponsor o footer) - xem wwwroot/js/rv-sponsor.js */
.swal2-popup.rv-sponsor-popup {
    width: min(700px, 96vw) !important;
    max-width: 96vw;
    padding: 1.2rem 1.3rem;
    border-radius: 14px;
    background: var(--rv-surface);
    color: var(--rv-text);
    border: 1px solid var(--rv-border);
}
.rv-sponsor-popup .swal2-title { color: var(--rv-text); font-size: 1.2rem; padding-bottom: .4rem; }
.rv-sponsor-popup .swal2-close { color: var(--rv-muted); }
.rv-sponsor-popup .swal2-close:hover { color: var(--rv-text); }
.rv-sponsor-popup .swal2-content, .rv-sponsor-popup .swal2-html-container {
    margin: 0; padding: 0; text-align: left; color: var(--rv-text);
}
.rv-sponsor__lead { margin: 0 0 .9rem; color: var(--rv-text-secondary); font-size: .9rem; line-height: 1.5; }
.rv-sponsor__block { margin-bottom: .85rem; }
.rv-sponsor__label { display: block; font-size: .8rem; font-weight: 700; color: var(--rv-muted); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .03em; }
.rv-sponsor__amts, .rv-sponsor__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-sponsor__amt, .rv-sponsor__chip {
    display: inline-flex; align-items: center; gap: 4px;
    min-height: 40px; padding: 8px 14px;
    border: 1px solid var(--rv-border); border-radius: 999px;
    background: var(--rv-bg-secondary); color: var(--rv-text);
    font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.rv-sponsor__amt i, .rv-sponsor__chip i { font-style: normal; opacity: .75; }
.rv-sponsor__amt:hover, .rv-sponsor__chip:hover { border-color: var(--rv-accent); }
.rv-sponsor__amt.is-active, .rv-sponsor__chip.is-active {
    background: var(--rv-accent); border-color: var(--rv-accent); color: #fff;
}
.rv-sponsor__amt:focus-visible, .rv-sponsor__chip:focus-visible, .rv-sponsor__btn:focus-visible,
.rv-sponsor__copy:focus-visible, .rv-sponsor__custom input:focus-visible {
    outline: 3px solid var(--rv-accent); outline-offset: 2px;
}
.rv-sponsor__custom { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 12px;
    border: 1px dashed var(--rv-border); border-radius: 999px; background: var(--rv-bg); }
.rv-sponsor__custom input {
    width: 90px; border: 0; background: transparent; color: var(--rv-text);
    font: inherit; font-size: .92rem; font-weight: 600; outline: none;
}
.rv-sponsor__custom i { font-style: normal; color: var(--rv-muted); }
.rv-sponsor__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; margin: .6rem 0 .9rem; }
.rv-sponsor__panel { border: 1px solid var(--rv-border); border-radius: 12px; background: var(--rv-bg-secondary); padding: 6px 12px; }
.rv-sponsor__row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rv-divider, var(--rv-border)); }
.rv-sponsor__row:last-child { border-bottom: 0; }
.rv-sponsor__k { flex: 0 0 108px; color: var(--rv-muted); font-size: .82rem; }
.rv-sponsor__v {
    flex: 1 1 auto; min-width: 0; color: var(--rv-text); font-weight: 600; font-size: .95rem;
    word-break: break-word; user-select: all; -webkit-user-select: all;
}
.rv-sponsor__raw { padding: 6px 0 10px; color: var(--rv-text-secondary); font-size: .85rem; white-space: pre-wrap; }
.rv-sponsor__copy {
    flex: 0 0 auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--rv-border); border-radius: 10px; background: var(--rv-bg); color: var(--rv-text-secondary);
    cursor: pointer; font-size: 1rem;
}
.rv-sponsor__copy:hover { color: var(--rv-accent); border-color: var(--rv-accent); }
.rv-sponsor__qrcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rv-phone-image { display:inline-block; max-width:100%; object-fit:contain; vertical-align:middle; border-radius:5px; background:#fff; }
/* Member navigation has its own surface; other widgets retain their styles. */
.rv-member-sidebar .rv-member-sidebar__panel { background:#f0f7f3; border:1px solid #cce2d4; border-top:4px solid #087f3e; border-radius:16px; box-shadow:0 5px 18px rgba(22,70,43,.06); }
.rv-member-sidebar__profile { padding:14px 12px; margin-bottom:8px; background:var(--rv-surface,#fff); border:1px solid var(--rv-border,#dce8e0); border-radius:12px; }
.rv-member-sidebar .rv-account-nav > li > a { display:flex; align-items:center; gap:8px; min-height:44px; padding:10px 12px; margin:3px 0; border-radius:10px; color:var(--rv-text,#24382d); font-size:.9rem; line-height:1.5; text-decoration:none; transition:background .15s,color .15s; }
.rv-member-sidebar .rv-account-nav > li > a > i { flex:0 0 22px; text-align:center; font-size:1.1rem; margin-right:0!important; }
.rv-member-sidebar .rv-account-nav > li > a:hover { background:#dceee3; color:#086533; }
.rv-member-sidebar .rv-account-nav > li > a.active { background:#087f3e; color:#fff!important; box-shadow:0 3px 8px rgba(8,127,62,.15); font-weight:700; }
.rv-member-sidebar .rv-account-nav > li > a.active i { color:inherit!important; }
.rv-member-sidebar .rv-account-nav > li > a:focus-visible { outline:3px solid #489b6b; outline-offset:2px; }
.rv-member-sidebar .rv-account-nav > li.text-uppercase { margin-top:10px; padding:12px 12px 6px!important; border-top:1px solid #cce2d4; font-size:.69rem; letter-spacing:.7px; color:#496354!important; }
[data-theme="dark"] .rv-member-sidebar .rv-member-sidebar__panel { background:#172b22; border-color:#345943; border-top-color:#4cc981; }
[data-theme="dark"] .rv-member-sidebar .rv-account-nav > li > a:hover { background:#254334; color:#bcf0cf; }
[data-theme="dark"] .rv-member-sidebar .rv-account-nav > li.text-uppercase { color:#a7c4b2!important; border-color:#345943; }
.rv-sponsor__qrcol.is-qr-hidden, .rv-sponsor [hidden] { display: none !important; }
.rv-sponsor__qr {
    width: 176px; min-height: 176px; display: flex; align-items: center; justify-content: center;
    padding: 8px; background: #fff; border: 1px solid var(--rv-border); border-radius: 12px;
}
.rv-sponsor__qr.is-loading { opacity: .45; }
.rv-sponsor__qr svg, .rv-sponsor__qr img { display: block; width: 160px; height: auto; }
.rv-sponsor__qrnone { color: var(--rv-muted); font-size: 2rem; }
.rv-sponsor__qrcap { margin: 0; max-width: 200px; color: var(--rv-muted); font-size: .75rem; text-align: center; line-height: 1.4; }
.rv-sponsor__loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 1.4rem .4rem; color: var(--rv-text-secondary); }
.rv-sponsor__spin {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--rv-border); border-top-color: var(--rv-accent);
    animation: rv-sponsor-spin .7s linear infinite;
}
@keyframes rv-sponsor-spin { to { transform: rotate(360deg); } }
.rv-sponsor__err { margin: 0; color: var(--rv-text-secondary); text-align: center; }
.rv-sponsor__err a { color: var(--rv-accent); font-weight: 700; }
.rv-sponsor__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .2rem; }
.rv-sponsor__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 9px 14px;
    border: 1px solid var(--rv-border); border-radius: 10px;
    background: var(--rv-bg-secondary); color: var(--rv-text);
    font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.rv-sponsor__btn:hover { border-color: var(--rv-accent); color: var(--rv-accent); }
.rv-sponsor__btn--main { background: var(--rv-accent); border-color: var(--rv-accent); color: #fff; }
.rv-sponsor__btn--main:hover { filter: brightness(1.06); color: #fff; }
.rv-sponsor__btn.is-done { background: #198754; border-color: #198754; color: #fff; }
.rv-sponsor__status { min-height: 1.1rem; margin: .5rem 0 0; color: var(--rv-accent); font-size: .82rem; word-break: break-word; }
.rv-sponsor__steps {
    margin-top: .6rem; padding: 10px 12px; border-radius: 10px;
    background: var(--rv-bg-tertiary); color: var(--rv-text-secondary); font-size: .84rem; line-height: 1.55;
}
.rv-sponsor__steps b { color: var(--rv-text); }
.rv-sponsor__steps ol { margin: .4rem 0 .2rem; padding-left: 1.2rem; }
.rv-sponsor__steps li { margin-bottom: 2px; }
.rv-sponsor__steplink { margin-top: .3rem; }
.rv-sponsor__steplink a { color: var(--rv-accent); font-weight: 700; }

/* Mobile: khong hien ma QR mac dinh (khach khong quet duoc man hinh cua chinh minh) */
@media (max-width: 768px) {
    .swal2-popup.rv-sponsor-popup { padding: 1rem .9rem; border-radius: 12px; }
    .rv-sponsor__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .rv-sponsor__qrcol.is-qr-hidden { display: none; }
    .rv-sponsor__qr { width: 220px; min-height: 220px; }
    .rv-sponsor__qr svg, .rv-sponsor__qr img { width: 200px; }
    .rv-sponsor__k { flex-basis: 96px; }
    .rv-sponsor__btn { flex: 1 1 calc(50% - 4px); min-height: 46px; }
    .rv-sponsor__btn--main, .rv-sponsor__btn--qr { flex-basis: 100%; }
    .rv-sponsor__amt, .rv-sponsor__chip { min-height: 44px; }
}

/* Dark mode - dat sau cac rule mau sang o tren */
html[data-theme="dark"] .swal2-popup.rv-sponsor-popup { background: var(--rv-surface); border-color: var(--rv-border); }
html[data-theme="dark"] .rv-sponsor__custom { background: var(--rv-bg); }
html[data-theme="dark"] .rv-sponsor__amt.is-active,
html[data-theme="dark"] .rv-sponsor__chip.is-active { color: #fff; }
html[data-theme="dark"] .rv-sponsor__btn.is-done { color: #fff; }

/* =============================================================
   #full-desc - noi dung thanh vien soan (Quill / HTML da sanitize)
   Muc tieu: dep, hien dai, doc duoc tren moi man hinh va KHONG cho
   noi dung thanh vien pha vo cau truc trang (tran ngang, do lon, float...).
   ============================================================= */
.full-desc {
    background: var(--rv-bg-secondary, #f7f7f7);
    border: 1px solid var(--rv-border-light, #f0f0f0);
    border-radius: var(--rv-radius-lg, 14px);
    padding: clamp(14px, 2.2vw, 26px);
    color: var(--rv-text, #111);
    display: flow-root;                 /* chu tri float ben trong, khong lot ra ngoai */
    -webkit-text-size-adjust: 100%;
}

/* ---------- Chu ---------- */
.full-desc .rv-rich {
    font-size: clamp(0.95rem, 0.92rem + 0.16vw, 1.06rem);
    line-height: 1.75;
    color: var(--rv-text, #111);
    overflow-wrap: break-word;          /* URL/tu dai khong tran ngang */
}
.full-desc .rv-rich > :first-child { margin-top: 0; }
.full-desc .rv-rich > :last-child { margin-bottom: 0; }
.full-desc .rv-rich p { margin: 0 0 1rem; }
.full-desc .rv-rich p:last-child { margin-bottom: 0; }
.full-desc .rv-rich * { max-width: 100%; }   /* khong the nao rong hon khung chua */

/* ---------- Tieu de ---------- */
.full-desc .rv-rich h1,
.full-desc .rv-rich h2,
.full-desc .rv-rich h3 {
    margin: 1.7rem 0 0.75rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--rv-text, #111);
}
.full-desc .rv-rich h1 { font-size: clamp(1.3rem, 1.14rem + 0.7vw, 1.65rem); }
.full-desc .rv-rich h2 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); }
.full-desc .rv-rich h3 { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.22rem); }

/* ---------- Kieu chu / dac biet ---------- */
.full-desc .rv-rich strong,
.full-desc .rv-rich b { font-weight: 700; }
.full-desc .rv-rich em,
.full-desc .rv-rich i { font-style: italic; }
.full-desc .rv-rich u { text-decoration: underline; text-underline-offset: 2px; }
.full-desc .rv-rich s,
.full-desc .rv-rich strike { text-decoration: line-through; }
.full-desc .rv-rich hr {
    border: 0;
    border-top: 1px dashed var(--rv-border, #e5e5e5);
    margin: 1.5rem 0;
}

/* ---------- Danh sach ---------- */
.full-desc .rv-rich ul,
.full-desc .rv-rich ol { margin: 0 0 1rem; padding-left: 1.45rem; }
.full-desc .rv-rich li { margin: 0.3rem 0; }
.full-desc .rv-rich li > ul,
.full-desc .rv-rich li > ol { margin-bottom: 0; }
.full-desc .rv-rich ul { list-style: disc; }
.full-desc .rv-rich ul ul { list-style: circle; }
.full-desc .rv-rich ul ul ul { list-style: square; }
.full-desc .rv-rich ol { list-style: decimal; }
.full-desc .rv-rich li::marker { color: var(--rv-accent, #00B14F); font-weight: 600; }

/* ---------- Trich dan ---------- */
.full-desc .rv-rich blockquote {
    margin: 1.25rem 0;
    padding: 0.8rem 1rem;
    border-left: 4px solid var(--rv-accent, #00B14F);
    background: var(--rv-accent-light, #e6f7ee);
    border-radius: 0 10px 10px 0;
    color: var(--rv-text-secondary, #444);
    font-style: italic;
}

/* ---------- Code ---------- */
.full-desc .rv-rich code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
    padding: 0.12em 0.4em;
    border-radius: 6px;
    background: rgba(127, 127, 127, 0.15);
    word-break: break-word;
}
.full-desc .rv-rich pre {
    margin: 1.25rem 0;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    background: #f6f8fa;
    color: #1f2328;
    border: 1px solid var(--rv-border-light, #f0f0f0);
    border-radius: 10px;
    font-size: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
    line-height: 1.6;
    tab-size: 4;
}
.full-desc .rv-rich pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: 0;
    font-size: inherit;
    word-break: normal;
}

/* ---------- Lien ket ---------- */
.full-desc .rv-rich a {
    color: var(--rv-accent-hover, #008c3f);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.full-desc .rv-rich a:hover {
    color: var(--rv-accent, #00B14F);
    text-decoration-thickness: 2px;
}
.full-desc .rv-rich a:focus-visible {
    outline: 3px solid var(--rv-accent, #00B14F);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Cach lop (class cua Quill, CSS Quill khong tai tren trang chi tiet) ---------- */
.full-desc .rv-rich .ql-align-center { text-align: center; }
.full-desc .rv-rich .ql-align-right { text-align: right; }
.full-desc .rv-rich .ql-align-justify { text-align: justify; }

/* ---------- Anh ---------- */
.full-desc .rv-rich img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.1rem auto;
    border-radius: 10px;
}
.full-desc .rv-rich a img { display: inline-block; margin: 0.4rem 0; }

/* ---------- Video / iframe cu (truoc khi co sanitize may chu) ---------- */
.full-desc .rv-rich iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--rv-ar, 16 / 9);
    border: 0;
    border-radius: 12px;
    margin: 1.25rem 0;
    background: #0f172a;
}
.full-desc .rv-rich video {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.25rem 0;
    background: #000;
}
.full-desc .rv-rich audio { width: 100%; margin: 1rem 0; }

/* ---------- Bang: cuộn ngang thay vi keo vamg trang ---------- */
.full-desc .rv-rich table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1.25rem 0;
    -webkit-overflow-scrolling: touch;
}
.full-desc .rv-rich th,
.full-desc .rv-rich td {
    border: 1px solid var(--rv-border, #e5e5e5);
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: top;
}
.full-desc .rv-rich th {
    background: var(--rv-bg-tertiary, #efefef);
    font-weight: 600;
}
.full-desc .rv-rich tr:nth-child(even) td { background: rgba(127, 127, 127, 0.07); }

/* ---------- Dung chia se (nam sau noi dung) ---------- */
.full-desc .rv-rich + .rv-share {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--rv-border-light, #f0f0f0);
}

/* ---------- The tag (#hashtag trong noi dung) ---------- */
.full-desc .rv-rich .rv-tag {
    display: inline-block;
    margin: 0.15em 0.3em 0.15em 0;
    padding: 0.16em 0.62em;
    background: var(--rv-accent-light, #e6f7ee);
    color: var(--rv-accent-hover, #008c3f);
    border: 1px solid rgba(0, 177, 79, 0.28);
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;      /* tag dai (#quan_ly_...) khong tran ngang */
    vertical-align: middle;
}
.full-desc .rv-rich .rv-tag:hover { border-color: var(--rv-accent, #00B14F); }

/* ---------- Di dong ---------- */
@media (max-width: 576px) {
    .full-desc { padding: 14px 12px; border-radius: 10px; }
    .full-desc .rv-rich { line-height: 1.7; }
    .full-desc .rv-rich p { margin-bottom: 0.85rem; }
    .full-desc .rv-rich h1,
    .full-desc .rv-rich h2,
    .full-desc .rv-rich h3 { margin-top: 1.25rem; margin-bottom: 0.55rem; }
    .full-desc .rv-rich ul,
    .full-desc .rv-rich ol { padding-left: 1.25rem; }
    .full-desc .rv-rich blockquote { margin: 1rem 0; padding: 0.65rem 0.8rem; }
    .full-desc .rv-rich pre { padding: 0.75rem 0.8rem; }
    .full-desc .rv-rich img,
    .full-desc .rv-rich iframe,
    .full-desc .rv-rich video { margin-top: 0.9rem; margin-bottom: 0.9rem; }
    .full-desc .rv-rich + .rv-share { margin-top: 0.9rem; padding-top: 0.8rem; }
    .full-desc .rv-rich .rv-tag { font-size: 0.8em; padding: 0.14em 0.55em; margin-bottom: 0.2em; }
}

/* ---------- Dark mode (dat sau cac rule mau sang) ---------- */
html[data-theme="dark"] .full-desc {
    background: var(--rv-bg-secondary, #181818);
    border-color: var(--rv-border, #303030);
}
html[data-theme="dark"] .full-desc .rv-rich blockquote { background: var(--rv-accent-light, #173d2b); }
html[data-theme="dark"] .full-desc .rv-rich pre {
    background: #0d1117;
    color: #e6edf3;
    border-color: #30363d;
}
html[data-theme="dark"] .full-desc .rv-rich code { background: rgba(255, 255, 255, 0.12); color: #a0efbe; }
html[data-theme="dark"] .full-desc .rv-rich pre code { background: none; color: inherit; }
html[data-theme="dark"] .full-desc .rv-rich th { background: var(--rv-bg-tertiary, #1e1e1e); }
html[data-theme="dark"] .full-desc .rv-rich tr:nth-child(even) td { background: rgba(255, 255, 255, 0.04); }
html[data-theme="dark"] .full-desc .rv-rich hr { border-top-color: var(--rv-border, #303030); }
html[data-theme="dark"] .full-desc .rv-rich + .rv-share { border-top-color: var(--rv-border, #303030); }

html[data-theme="dark"] .full-desc .rv-rich .rv-tag {
    background: rgba(0, 177, 79, 0.16);
    color: #7ef0ac;
    border-color: rgba(0, 177, 79, 0.45);
}
