/* ==========================================================================
   RAO VẶT 49 - Modern theme (Bootstrap 5)
   Kiến trúc: trắng sạch + cam/đỏ accent, mobile-first
   ========================================================================== */
:root {
    --rv-primary: #00B14F;
    --rv-primary-dark: #008c3f;
    --rv-primary-light: #e6f7ee;
    --rv-gradient: linear-gradient(135deg, #00c960 0%, #00B14F 55%, #009a44 100%);
    --rv-success: #00B14F;
    --rv-text: #111111;
    --rv-muted: #666666;
    --rv-border: #E5E5E5;
    --rv-bg: #F7F7F7;
    --rv-radius: 12px;
    --rv-radius-sm: 8px;
    --rv-shadow: 0 1px 3px rgba(0,0,0,.06);
    --rv-shadow-lg: 0 8px 24px rgba(0,0,0,.10);
    --rv-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--rv-font);
    color: var(--rv-text);
    background: var(--rv-bg);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--rv-primary); }
a:hover { color: var(--rv-primary-dark); }

img { max-width: 100%; }

#wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#content {
    flex: 1;
}

/* ============ HERO / SEARCH ============ */
.rv-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 48px 0;
}

.rv-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.55) 100%);
}

.rv-hero .rv-hero-inner {
    position: relative;
    z-index: 1;
}

.rv-hero h1, .rv-hero h2 {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.rv-hero .rv-hero-sub {
    color: rgba(255,255,255,.92);
    font-size: 1.05rem;
}

.rv-search {
    background: #fff;
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.22);
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 720px;
    margin: 0 auto;
}

.rv-search input[type="text"],
.rv-search input[type="search"] {
    border: 0;
    outline: 0;
    box-shadow: none !important;
    font-size: 1.05rem;
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
}

.rv-search .btn {
    background: var(--rv-gradient);
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 999px;
    padding: .65rem 1.6rem;
    flex-shrink: 0;
}

.rv-search .btn:hover { color: #fff; }

@media (max-width: 575.98px) {
    .rv-hero { padding: 32px 0; }
    .rv-search { border-radius: var(--rv-radius); flex-direction: column; padding: 12px; }
    .rv-search input[type="text"], .rv-search input[type="search"] { width: 100%; flex: none; padding: .5rem 0; border-bottom: 1px solid var(--rv-border); border-radius: 0; }
    .rv-search .btn { width: 100%; }
}

/* ============ SECTION TITLES ============ */
.rv-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin: 0 0 14px;
}

.rv-section-title::before {
    content: "";
    width: 5px;
    height: 20px;
    border-radius: 4px;
    background: var(--rv-gradient);
}

/* ============ CATEGORY TILES ============ */
.rv-cat-tile {
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    padding: 14px 8px;
    text-align: center;
    transition: box-shadow .2s ease, transform .2s ease;
    height: 100%;
    display: block;
    color: var(--rv-text);
}

.rv-cat-tile:hover {
    box-shadow: var(--rv-shadow-lg);
    transform: translateY(-3px);
    color: var(--rv-primary);
}

.rv-cat-tile .rv-cat-img {
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: var(--rv-radius-sm);
    margin-bottom: 8px;
    background: var(--rv-bg);
}

.rv-cat-tile .rv-cat-name {
    font-size: .9rem;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ AD CARDS ============ */
.rv-card {
    background: var(--rv-surface, #fff);
    border: 1px solid var(--rv-border-light, #f0f0f0);
    border-radius: var(--rv-radius-lg, 14px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow .2s ease, transform .2s ease;
}

.rv-card:hover {
    box-shadow: var(--rv-shadow-md, 0 4px 6px rgba(0,0,0,.05));
    transform: translateY(-2px);
}

.rv-card .rv-card-img {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--rv-bg, #f7f7f7);
    overflow: hidden;
}

.rv-card .rv-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.rv-card:hover .rv-card-img img {
    transform: scale(1.03);
}

.rv-card .rv-img-count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: .75rem;
    padding: 2px 10px;
    border-radius: 999px;
}

.rv-card .rv-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.rv-card .rv-card-title {
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: var(--rv-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rv-card .rv-card-title a { color: inherit; text-decoration: none; transition: color .15s ease; }
.rv-card .rv-card-title a:hover { color: var(--rv-primary); }

.rv-card .rv-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rv-primary);
}

.rv-card .rv-card-meta {
    font-size: .8rem;
    color: var(--rv-muted);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============ WIDGETS / SIDEBAR ============ */
.rv-widget {
    background: var(--rv-surface, #fff);
    border: 1px solid var(--rv-border-light, #f0f0f0);
    border-radius: var(--rv-radius-lg, 14px);
    padding: 16px;
    margin-bottom: 16px;
}

.rv-widget .rv-widget-title {
    font-size: .9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--rv-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rv-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rv-link-list li a {
    display: block;
    padding: 6px 4px;
    color: #444;
    text-decoration: none;
    border-radius: 6px;
    font-size: .95rem;
}

.rv-link-list li a:hover {
    color: var(--rv-primary);
    background: var(--rv-primary-light);
}

.rv-widget ul.list-unstyled { list-style: none; margin: 0; padding: 0; }

.rv-widget ul.list-unstyled li a {
    display: block;
    padding: 6px 4px;
    color: #444;
    text-decoration: none;
    border-radius: 6px;
    font-size: .9rem;
}

.rv-widget ul.list-unstyled li a:hover {
    color: var(--rv-primary);
    background: var(--rv-primary-light);
}

.maxlist-more {
    text-align: center;
    margin: 8px 0 0;
}

.maxlist-more a {
    display: inline-block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--rv-primary);
    text-decoration: none;
}

.maxlist-more a:hover { text-decoration: underline; }

/* ============ ACCOUNT NAV (Customer pages) ============ */
.rv-account-nav li a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: var(--rv-radius-sm);
    color: var(--rv-text);
    font-size: 0.95rem;
    transition: all .15s;
}

.rv-account-nav li a:hover { background: var(--rv-primary-light); color: var(--rv-primary); }
.rv-account-nav li a.active { background: var(--rv-primary); color: #fff !important; font-weight: 600; }

/* ============ BUTTONS ============ */
.btn-rv {
    background: var(--rv-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: .6rem 1.5rem;
}

.btn-rv:hover, .btn-rv:focus { color: #fff; filter: brightness(1.05); }

.btn-outline-rv {
    border: 1.5px solid var(--rv-primary);
    color: var(--rv-primary);
    font-weight: 600;
    border-radius: 999px;
    background: transparent;
}

.btn-outline-rv:hover { background: var(--rv-primary); color: #fff; }

/* ============ AUTH PAGES ============ */
.rv-auth-wrap {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.rv-auth-card {
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: 16px;
    box-shadow: var(--rv-shadow-lg);
    padding: 32px;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
}

.rv-auth-card .form-control {
    border-radius: 10px;
    padding: .65rem 1rem;
}

.rv-auth-card .form-control:focus {
    border-color: var(--rv-primary);
    box-shadow: 0 0 0 .2rem rgba(238,77,45,.12);
}

.rv-auth-title {
    font-weight: 700;
    color: var(--rv-text);
}

/* ============ DETAIL PAGE ============ */
.rv-detail-title { font-weight: 700; }

.rv-price-box {
    background: var(--rv-primary-light);
    border: 1px solid #ffd9cc;
    color: var(--rv-primary);
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: var(--rv-radius);
    padding: 10px 16px;
    display: inline-block;
}

.rv-gallery-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--rv-radius);
    background: var(--rv-bg);
}

.rv-thumb-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--rv-radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
}

.rv-thumb-img.active { border-color: var(--rv-primary); }

.rv-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--rv-border);
    font-size: .95rem;
}

.rv-info-row dt { color: var(--rv-muted); font-weight: 500; flex-shrink: 0; }
.rv-info-row dd { margin: 0; font-weight: 600; text-align: right; }

/* ============ LOTTERY (KQXS) ============ */
.rv-kqxs-table { font-size: .9rem; }

.rv-kqxs-table th {
    background: var(--rv-primary);
    color: #fff;
    font-weight: 600;
    padding: .5rem;
    text-align: center;
    white-space: nowrap;
}

.rv-kqxs-table td {
    padding: .4rem .5rem;
    text-align: center;
    vertical-align: middle;
}

.rv-kqxs-num {
    display: inline-block;
    font-weight: 700;
    color: var(--rv-primary);
}

/* ============ FORMS ============ */
.form-control, .form-select {
    border-radius: 10px;
    padding: .55rem .9rem;
    font-size:13px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--rv-primary);
    box-shadow: 0 0 0 .2rem rgba(238,77,45,.12);
}

/* ============ FOOTER ============ */
.rv-footer {
    background: #111111;
    color: #999;
    padding-top: 48px;
    padding-bottom: 24px;
    margin-top: 48px;
}

.rv-footer h6, .rv-footer .rv-footer__heading {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 16px;
    font-size: .8125rem;
}

.rv-footer a {
    color: #999;
    text-decoration: none;
    transition: color .15s ease;
}

.rv-footer a:hover { color: var(--rv-primary); }

.rv-footer .rv-foot-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.rv-footer .rv-foot-list li { margin-bottom: 10px; font-size: .875rem; }

.rv-foot-bottom {
    border-top: 1px solid #333;
    padding: 16px 0;
    margin-top: 12px;
    font-size: .8125rem;
}

.rv-foot-links-copy {
    font-size: .75rem;
    color: #555;
    line-height: 1.8;
}

/* ============ MISC ============ */
.rv-main { min-height: 60vh; }

.rv-breadcrumb {
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    padding: 10px 14px;
    font-size: .85rem;
    margin-bottom: 16px;
}

.rv-alert-box {
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    padding: 16px;
}

/* Phải nằm dưới cả header lẫn thanh ngày, nếu không sidebar sẽ bị thanh ngày che. */
.sticky-top-2 { position: sticky; top: calc(var(--rv-header-h, 72px) + var(--rv-marquee-h, 48px) + 12px); }

.rv-card-title-a { text-decoration: none; }
.rv-card-title-a:hover { color: var(--rv-primary); }

.rv-thumb-mini {
    width: 74px;
    height: 56px;
    border-radius: var(--rv-radius-sm);
    overflow: hidden;
    background: var(--rv-bg);
    border: 1px solid var(--rv-border);
    flex-shrink: 0;
}

.rv-thumb-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.min-w-0 { min-width: 0; }

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ GOOGLE CSE fallback (unused, keep small) ============ */
.gsc-control-cse {
    border: 0 !important;
    background: transparent !important;
    font-family: var(--rv-font) !important;
}

@media print {
    .rv-header, .rv-footer, .rv-hero { display: none !important; }
}

/* ============ LEGACY FORM HELPERS (kept for ProductAdd) ============ */
.form-group { margin-bottom: 1rem; }
.form-control.input-md { border-radius: 10px; }

.rv-subheading {
    font-weight: 600;
    color: var(--rv-text);
    margin: 20px 0 16px;
    padding: 10px 14px;
    background: var(--rv-primary-light);
    border-left: 4px solid var(--rv-primary);
    border-radius: var(--rv-radius-sm);
    font-size: 1.02rem;
}

.thumbnail {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--rv-border);
    padding: 4px;
    background: #fff;
}

/* ============ CUSTOMER / PAYMENT / DONATE ============ */
.rv-info-field {
    background: var(--rv-bg);
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius-sm);
    padding: 10px 14px;
    min-height: 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rv-info-field span { font-size: .8rem; }

.rv-payment-option {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--rv-border);
    border-radius: var(--rv-radius-sm);
    padding: 12px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .15s;
}

.rv-payment-option > input { margin-right: 12px; }

.rv-payment-option > span {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.rv-payment-option > span > i {
    font-size: 1.4rem;
    color: var(--rv-primary);
}

.rv-payment-option:hover { border-color: var(--rv-primary); background: var(--rv-primary-light); }
.rv-payment-option:has(> input:checked) { border-color: var(--rv-primary); background: var(--rv-primary-light); }

.rv-donate-box {
    background: var(--rv-bg);
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius-sm);
    padding: 10px 14px;
    font-size: .95rem;
}

.rv-donate-letter p { line-height: 1.7; }
.rv-donate-letter h4 { margin: 1rem 0; }

/* ============ STATIC PAGES (Privacy / Term) ============ */
.rv-static-page h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rv-text);
    margin: 1.4rem 0 .6rem;
    padding-left: 12px;
    border-left: 4px solid var(--rv-primary);
}

.rv-static-page p { line-height: 1.7; margin-bottom: .4rem; }

/* ============ MISC ============ */
.rv-widget-border {
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius-sm);
    background: #fff;
}

.rv-img-rounded { border-radius: var(--rv-radius-sm); }

.rv-related-link { color: inherit; text-decoration: none; }
.rv-related-link:hover { color: var(--rv-primary); }
.rv-related-link .rv-card:hover { border-color: var(--rv-primary); }

/* ============ LOADING OVERLAY (spinner + iosOverlay) ============ */
.popupBG {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.45);
    z-index: 2000000000;
}

.ui-ios-overlay {
    z-index: 2000000001;
    border-radius: 16px;
    width: 180px;
    padding: 28px 12px;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-left: -90px;
    margin-top: -90px;
    background: rgba(238,77,45,.92);
    background: linear-gradient(180deg, #ff6a3d 0%, #ee4d2d 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    color: #fff;
    text-align: center;
}

.ui-ios-overlay .title {
    display: block;
    font-weight: 600;
    letter-spacing: .3px;
    margin-top: 8px;
    font-size: 15px;
}

.ui-ios-overlay hr {
    border-color: rgba(255,255,255,.35);
    margin: 8px 0;
}

.ui-ios-overlay .spinner-wrap { min-height: 48px; }

/* ============ HOME BLOG (content-sharing style) ============ */
.rv-about-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--rv-gradient);
    color: #fff;
    border-radius: var(--rv-radius);
    padding: 20px 24px;
    box-shadow: var(--rv-shadow-lg);
}
.rv-about-strip h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}
.rv-about-strip p {
    margin: 0;
    font-size: .95rem;
    color: rgba(255,255,255,.9);
}
.rv-about-strip .btn-rv {
    background: #fff;
    color: var(--rv-primary);
    font-weight: 600;
    white-space: nowrap;
}
.rv-about-strip .btn-rv:hover {
    background: #fff3ef;
    color: var(--rv-primary-dark);
}

.rv-explore-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    height: 100%;
    border-radius: var(--rv-radius);
    padding: 18px 16px;
    background: #fff;
    border: 1px solid var(--rv-border);
    color: var(--rv-text);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rv-explore-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--rv-shadow-lg);
    border-color: var(--rv-primary);
    color: var(--rv-text);
    text-decoration: none;
}
.rv-explore-card .rv-explore-icon {
    font-size: 2rem;
    line-height: 1;
    color: var(--rv-primary);
}
.rv-explore-card h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.rv-explore-card p {
    font-size: .85rem;
    color: #6c757d;
    margin: 0;
}

/* ============ BLOG ============ */
.rv-blog-hero {
    background: var(--rv-gradient);
    border-radius: var(--rv-radius);
    padding: 32px 28px;
    margin-bottom: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.rv-blog-hero::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
}
.rv-blog-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}
.rv-blog-hero p {
    margin: 0;
    font-size: .95rem;
    color: rgba(255,255,255,.88);
}

.rv-blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.rv-blog-filter .rv-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--rv-text);
    background: #fff;
    border: 1px solid var(--rv-border);
    text-decoration: none;
    transition: all .15s;
}
.rv-blog-filter .rv-filter-btn:hover {
    border-color: var(--rv-primary);
    color: var(--rv-primary);
    background: var(--rv-primary-light);
}
.rv-blog-filter .rv-filter-btn.active {
    background: var(--rv-primary);
    color: #fff;
    border-color: var(--rv-primary);
}
.rv-blog-filter .rv-filter-count {
    background: rgba(0,0,0,.08);
    border-radius: 999px;
    padding: 1px 7px;
    font-size: .75rem;
    font-weight: 600;
}
.rv-blog-filter .rv-filter-btn.active .rv-filter-count {
    background: rgba(255,255,255,.25);
}

.rv-blog-featured {
    display: block;
    text-decoration: none;
    border-radius: var(--rv-radius);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--rv-border);
    margin-bottom: 24px;
    transition: box-shadow .2s, transform .2s;
}
.rv-blog-featured:hover {
    box-shadow: var(--rv-shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
}
.rv-blog-featured .rv-featured-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}
.rv-blog-featured .rv-featured-placeholder {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #f0f2f5 0%, #e4e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-blog-featured .rv-featured-placeholder i {
    font-size: 3rem;
    color: #c8ccd2;
}
.rv-blog-featured .rv-featured-body {
    padding: 20px 24px;
}
.rv-blog-featured .rv-featured-cat {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--rv-primary);
    background: var(--rv-primary-light);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.rv-blog-featured .rv-featured-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rv-text);
    margin: 0 0 8px;
    line-height: 1.35;
}
.rv-blog-featured .rv-featured-summary {
    font-size: .92rem;
    color: var(--rv-muted);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rv-blog-featured .rv-featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: .8rem;
    color: var(--rv-muted);
}
.rv-blog-featured .rv-featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rv-blog-card {
    display: block;
    text-decoration: none;
    border-radius: var(--rv-radius);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--rv-border);
    height: 100%;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.rv-blog-card:hover {
    box-shadow: var(--rv-shadow-lg);
    transform: translateY(-3px);
    border-color: var(--rv-primary);
    text-decoration: none;
}
.rv-blog-card .rv-card-img-wrap {
    position: relative;
    overflow: hidden;
}
.rv-blog-card .rv-card-img-wrap img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.rv-blog-card:hover .rv-card-img-wrap img {
    transform: scale(1.04);
}
.rv-blog-card .rv-card-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #f0f2f5 0%, #e4e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-blog-card .rv-card-placeholder i {
    font-size: 2rem;
    color: #c8ccd2;
}
.rv-blog-card .rv-card-body {
    padding: 14px 16px 16px;
}
.rv-blog-card .rv-card-cat {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    color: var(--rv-primary);
    background: var(--rv-primary-light);
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.rv-blog-card .rv-card-title {
    font-size: .92rem;
    font-weight: 600;
    color: var(--rv-text);
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rv-blog-card:hover .rv-card-title { color: var(--rv-primary); }
.rv-blog-card .rv-card-summary {
    font-size: .82rem;
    color: var(--rv-muted);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.rv-blog-card .rv-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .75rem;
    color: #aaa;
    padding-top: 10px;
    border-top: 1px solid var(--rv-bg);
}
.rv-blog-card .rv-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.rv-blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--rv-muted);
}
.rv-blog-empty i { font-size: 3rem; color: #ddd; display: block; margin-bottom: 12px; }
.rv-blog-empty p { margin: 0; font-size: 1rem; }

/* Blog Detail */
.rv-blog-detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--rv-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.rv-blog-detail-breadcrumb a {
    color: var(--rv-muted);
    text-decoration: none;
}
.rv-blog-detail-breadcrumb a:hover { color: var(--rv-primary); }
.rv-blog-detail-breadcrumb .sep { color: #ccc; }

.rv-blog-detail-article {
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    padding: 28px;
}
.rv-blog-detail-article .rv-detail-cat {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--rv-primary);
    background: var(--rv-primary-light);
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    text-decoration: none;
}
.rv-blog-detail-article .rv-detail-cat:hover {
    background: var(--rv-primary);
    color: #fff;
}
.rv-blog-detail-article h1 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 14px;
    color: var(--rv-text);
}
.rv-blog-detail-article .rv-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: .85rem;
    color: var(--rv-muted);
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rv-border);
}
.rv-blog-detail-article .rv-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.rv-blog-detail-article .rv-detail-hero-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--rv-radius-sm);
    margin-bottom: 20px;
}
.rv-blog-detail-article .rv-detail-summary {
    font-style: italic;
    color: var(--rv-muted);
    padding: 14px 18px;
    margin-bottom: 24px;
    border-left: 3px solid var(--rv-primary);
    background: var(--rv-primary-light);
    border-radius: 0 var(--rv-radius-sm) var(--rv-radius-sm) 0;
    font-size: .95rem;
    line-height: 1.6;
}

.rv-blog-sidebar .rv-sidebar-card {
    background: #fff;
    border: 1px solid var(--rv-border);
    border-radius: var(--rv-radius);
    padding: 18px;
    margin-bottom: 16px;
}
.rv-blog-sidebar .rv-sidebar-title {
    font-size: .92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--rv-bg);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rv-blog-sidebar .rv-sidebar-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: var(--rv-radius-sm);
    color: var(--rv-text);
    font-size: .88rem;
    text-decoration: none;
    transition: all .15s;
    margin-bottom: 2px;
}
.rv-blog-sidebar .rv-sidebar-cat-link:hover {
    background: var(--rv-primary-light);
    color: var(--rv-primary);
}
.rv-blog-sidebar .rv-sidebar-cat-link.active {
    background: var(--rv-primary);
    color: #fff;
}
.rv-blog-sidebar .rv-sidebar-cat-count {
    font-size: .75rem;
    font-weight: 600;
    background: rgba(0,0,0,.06);
    border-radius: 999px;
    padding: 2px 8px;
}
.rv-blog-sidebar .rv-sidebar-cat-link.active .rv-sidebar-cat-count {
    background: rgba(255,255,255,.25);
}

.rv-blog-sidebar .rv-sidebar-post {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rv-bg);
    text-decoration: none;
    color: var(--rv-text);
    transition: color .15s;
}
.rv-blog-sidebar .rv-sidebar-post:last-child { border-bottom: 0; }
.rv-blog-sidebar .rv-sidebar-post:hover { color: var(--rv-primary); }
.rv-blog-sidebar .rv-sidebar-post-img {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--rv-bg);
}
.rv-blog-sidebar .rv-sidebar-post-placeholder {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    background: var(--rv-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rv-blog-sidebar .rv-sidebar-post-placeholder i { font-size: .9rem; color: #ccc; }
.rv-blog-sidebar .rv-sidebar-post-info { min-width: 0; }
.rv-blog-sidebar .rv-sidebar-post-title {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}
.rv-blog-sidebar .rv-sidebar-post-date {
    font-size: .72rem;
    color: var(--rv-muted);
}

.rv-blog-related {
    display: block;
    text-decoration: none;
    border-radius: var(--rv-radius-sm);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--rv-border);
    transition: box-shadow .2s, transform .2s;
}
.rv-blog-related:hover {
    box-shadow: var(--rv-shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
}
.rv-blog-related img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}
.rv-blog-related .rv-related-placeholder {
    width: 100%;
    height: 90px;
    background: var(--rv-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-blog-related .rv-related-placeholder i { font-size: 1.2rem; color: #ccc; }
.rv-blog-related .rv-related-body { padding: 10px 12px; }
.rv-blog-related .rv-related-title {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--rv-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.rv-blog-related:hover .rv-related-title { color: var(--rv-primary); }
.rv-blog-related .rv-related-date {
    font-size: .72rem;
    color: var(--rv-muted);
}

.rv-blog-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--rv-border);
}
.rv-blog-share span { font-size: .85rem; color: var(--rv-muted); font-weight: 500; }
.rv-blog-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rv-bg);
    color: var(--rv-text);
    text-decoration: none;
    transition: all .15s;
    font-size: .95rem;
}
.rv-blog-share a:hover {
    background: var(--rv-primary);
    color: #fff;
}

@media (max-width: 767.98px) {
    .rv-blog-hero { padding: 24px 18px; }
    .rv-blog-hero h1 { font-size: 1.25rem; }
    .rv-blog-featured .rv-featured-img,
    .rv-blog-featured .rv-featured-placeholder { height: 200px; }
    .rv-blog-featured .rv-featured-body { padding: 16px 18px; }
    .rv-blog-featured .rv-featured-title { font-size: 1.1rem; }
    .rv-blog-detail-article { padding: 18px; }
    .rv-blog-detail-article h1 { font-size: 1.3rem; }
}

/* ============ INFINITE SCROLL ============ */
.rv-loadmore-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem 0;
}
.rv-loadmore-spinner .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}
#loadMoreEnd {
    padding: 1rem 0;
    font-size: .9rem;
}
#listhomepost .col-6,
#listhomepost .col-md-4,
#listhomepost .col-lg-3 {
    animation: rvFadeIn .3s ease;
}
@@keyframes rvFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Points & Check-in */
.points-display {
    cursor: default;
    white-space: nowrap;
}
#btn-checkin {
    transition: all .2s;
    border-color: #28a745;
    color: #28a745;
}
#btn-checkin:hover:not(:disabled) {
    background: #28a745;
    color: #fff;
}
#btn-checkin:disabled {
    opacity: .7;
    cursor: default;
    border-color: #6c757d;
    color: #6c757d;
}
.rv-points-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #ffc107;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: .85rem;
}
.rv-points-badge .rv-points-num {
    font-weight: 700;
    color: #e67e00;
}
.rv-checkin-success {
    color: #28a745;
    font-weight: 600;
}

/* ============ VIP CARD STYLES ============ */
.rv-card-vip {
    border: 2px solid #ff9800 !important;
    box-shadow: 0 0 12px rgba(255, 152, 0, .25) !important;
    position: relative;
    overflow: hidden;
}
.rv-card-vip::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff9800, #ffc107, #ff9800);
    z-index: 1;
}
.rv-card-vip::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(255,152,0,.06), transparent);
    pointer-events: none;
}
.rv-card-vip:hover {
    box-shadow: 0 6px 24px rgba(255, 152, 0, .45) !important;
    transform: translateY(-4px);
}
/* Diamond — Kim Cương */
.rv-card-vip-diamond {
    border: 2px solid #e91e63 !important;
    box-shadow: 0 0 20px rgba(233, 30, 99, .35) !important;
}
.rv-card-vip-diamond::before {
    height: 5px;
    background: linear-gradient(90deg, #e91e63, #f48fb1, #e91e63);
    animation: diamondPulse 2s ease-in-out infinite;
}
.rv-card-vip-diamond::after {
    background: linear-gradient(to top, rgba(233,30,99,.08), transparent);
}
.rv-card-vip-diamond:hover {
    box-shadow: 0 6px 30px rgba(233, 30, 99, .5) !important;
    transform: translateY(-6px);
}
@keyframes diamondPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}
/* Gold — Vàng */
.rv-card-vip-gold {
    border: 2px solid #ff9800 !important;
    box-shadow: 0 0 16px rgba(255, 152, 0, .3) !important;
}
.rv-card-vip-gold::before {
    height: 4px;
    background: linear-gradient(90deg, #ff9800, #ffc107, #ff9800);
}
.rv-card-vip-gold::after {
    background: linear-gradient(to top, rgba(255,152,0,.07), transparent);
}
.rv-card-vip-gold:hover {
    box-shadow: 0 6px 28px rgba(255, 152, 0, .45) !important;
    transform: translateY(-5px);
}
/* Silver — Bạc */
.rv-card-vip-silver {
    border: 2px solid #9e9e9e !important;
    box-shadow: 0 0 10px rgba(158, 158, 158, .2) !important;
}
.rv-card-vip-silver::before {
    background: linear-gradient(90deg, #9e9e9e, #bdbdbd, #9e9e9e);
}
.rv-card-vip-silver::after {
    background: linear-gradient(to top, rgba(158,158,158,.05), transparent);
}
.rv-card-vip-silver:hover {
    box-shadow: 0 4px 20px rgba(158, 158, 158, .35) !important;
    transform: translateY(-3px);
}

/* VIP Label ribbon — top left corner */
.rv-vip-label {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    padding: 5px 14px 5px 8px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    border-radius: 0 0 10px 0;
    letter-spacing: .5px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.rv-vip-label-diamond {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    box-shadow: 0 2px 8px rgba(233,30,99,.3);
}
.rv-vip-label-gold {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    box-shadow: 0 2px 8px rgba(255,152,0,.3);
}
.rv-vip-label-silver {
    background: linear-gradient(135deg, #9e9e9e, #757575);
}

/* VIP Badge inline — below title */
.rv-vip-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
}
.rv-vip-badge-inline-diamond {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    box-shadow: 0 1px 4px rgba(233,30,99,.25);
}
.rv-vip-badge-inline-gold {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    box-shadow: 0 1px 4px rgba(255,152,0,.25);
}
.rv-vip-badge-inline-silver {
    background: linear-gradient(135deg, #9e9e9e, #757575);
}

/* VIP in list view */
.ctAdListingWrapper.vip-highlight {
    border-left: 4px solid #ff9800;
    background: linear-gradient(90deg, rgba(255,152,0,.06) 0%, transparent 60%);
    border-radius: 4px;
    margin-bottom: 2px;
}
.ctAdListingWrapper.vip-highlight-diamond {
    border-left: 5px solid #e91e63;
    background: linear-gradient(90deg, rgba(233,30,99,.08) 0%, transparent 60%);
    box-shadow: 0 0 10px rgba(233,30,99,.1);
}
.ctAdListingWrapper.vip-highlight-gold {
    border-left: 4px solid #ff9800;
    background: linear-gradient(90deg, rgba(255,152,0,.06) 0%, transparent 60%);
}
.ctAdListingWrapper.vip-highlight-silver {
    border-left: 3px solid #9e9e9e;
    background: linear-gradient(90deg, rgba(158,158,158,.04) 0%, transparent 60%);
}

/* ============ HEADER NAVIGATION ============ */
.header .link_inactive_1 {
    color: var(--rv-primary);
    text-decoration: none;
    font-weight: 500;
}
.header .link_inactive_1:hover {
    color: var(--rv-primary-dark);
}
.header .UL_inactive_1 {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    position: absolute;
    min-width: 180px;
    z-index: 100;
}
.header .LI1_inactive_1:hover .UL_inactive_1 {
    display: block;
}
.header .start_inactive_1,
.header .end_inactive_1 {
    border-left: none;
}
.header .btn-menu-tooggle {
    display: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
}
.header .btn-menu-tooggle .lines {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--rv-primary);
    margin: 5px 0;
    transition: transform 0.3s ease;
}
.header .btn-menu-tooggle .lines.active {
    transform: rotate(45deg) translate(5px, 5px);
}
.header .btn-menu-tooggle .lines.second {
    opacity: 0;
}
.header .btn-menu-tooggle .lines.third {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile menu overlay */
.header .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 99;
}
.header .mobile-menu.open .mobile-menu-overlay {
    display: block;
}
/* ============ END HEADER NAVIGATION ============ */

/* ============ DARK MODE OVERRIDES ============ */
[data-theme="dark"] body {
    background: #0F0F0F;
    color: #E0E0E0;
}

[data-theme="dark"] .rv-main {
    color: #E0E0E0;
}

/* Cards */
[data-theme="dark"] .rv-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

[data-theme="dark"] .rv-card .card-body,
[data-theme="dark"] .rv-card .rv-card__body {
    color: #E0E0E0;
}

/* Category tiles */
[data-theme="dark"] .rv-cat-tile {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #E0E0E0;
}

[data-theme="dark"] .rv-cat-tile:hover {
    color: var(--rv-accent);
}

/* Widgets / Sidebar */
[data-theme="dark"] .rv-widget {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

[data-theme="dark"] .rv-widget .rv-widget-title {
    color: #E0E0E0;
    border-bottom-color: #333;
}

[data-theme="dark"] .rv-link-list li a,
[data-theme="dark"] .rv-widget ul.list-unstyled li a {
    color: #bbb;
}

[data-theme="dark"] .rv-link-list li a:hover,
[data-theme="dark"] .rv-widget ul.list-unstyled li a:hover {
    color: var(--rv-accent);
    background: rgba(0,177,79,.1);
}

/* Auth pages */
[data-theme="dark"] .rv-auth-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

[data-theme="dark"] .rv-auth-card .form-control {
    background: #111;
    border-color: #333;
    color: #E0E0E0;
}

[data-theme="dark"] .rv-auth-card .form-control:focus {
    border-color: var(--rv-accent);
    background: #1a1a1a;
    color: #fff;
}

/* Breadcrumb */
[data-theme="dark"] .rv-breadcrumb {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #bbb;
}

[data-theme="dark"] .rv-breadcrumb a {
    color: #bbb;
}

[data-theme="dark"] .rv-breadcrumb a:hover {
    color: var(--rv-accent);
}

/* Detail page */
[data-theme="dark"] .rv-price-box {
    background: rgba(0,177,79,.1);
    border-color: rgba(0,177,79,.2);
}

/* Alerts / Info boxes */
[data-theme="dark"] .rv-alert-box {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #bbb;
}

[data-theme="dark"] .rv-info-box {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #bbb;
}

/* Section titles */
[data-theme="dark"] .rv-section-title {
    color: #E0E0E0;
}

/* Hero overlay text */
[data-theme="dark"] .rv-hero h1,
[data-theme="dark"] .rv-hero h2 {
    color: #fff;
}

/* Forms */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #111;
    border-color: #333;
    color: #E0E0E0;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background: #1a1a1a;
    border-color: var(--rv-accent);
    color: #fff;
}

[data-theme="dark"] .form-label,
[data-theme="dark"] label {
    color: #ccc;
}

/* Buttons */
[data-theme="dark"] .btn-outline-secondary {
    color: #bbb;
    border-color: #444;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: #333;
    color: #fff;
    border-color: #555;
}

[data-theme="dark"] .btn-light {
    background: #222;
    color: #E0E0E0;
    border-color: #333;
}

[data-theme="dark"] .btn-light:hover {
    background: #333;
    color: #fff;
}

[data-theme="dark"] .btn-dark {
    background: #E0E0E0;
    color: #111;
}

/* Bootstrap form controls */
[data-theme="dark"] .input-group-text {
    background: #1a1a1a;
    border-color: #333;
    color: #bbb;
}

/* Pagination */
[data-theme="dark"] .page-link {
    background: #1a1a1a;
    border-color: #333;
    color: #bbb;
}

[data-theme="dark"] .page-link:hover {
    background: #2a2a2a;
    color: var(--rv-accent);
}

[data-theme="dark"] .page-item.active .page-link {
    background: var(--rv-accent);
    border-color: var(--rv-accent);
    color: #fff;
}

/* Table */
[data-theme="dark"] .table {
    color: #E0E0E0;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-color: #2a2a2a;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background: #151515;
}

[data-theme="dark"] .table-hover > tbody > tr:hover > td {
    background: #1a1a1a;
}

/* Modals */
[data-theme="dark"] .modal-content {
    background: #1a1a1a;
    border-color: #333;
    color: #E0E0E0;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #333;
}

[data-theme="dark"] .modal-footer {
    border-top-color: #333;
}

[data-theme="dark"] .btn-close {
    filter: invert(1);
}

/* Dropdowns */
[data-theme="dark"] .dropdown-menu {
    background: #1a1a1a;
    border-color: #333;
}

[data-theme="dark"] .dropdown-item {
    color: #ccc;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #2a2a2a;
    color: #fff;
}

[data-theme="dark"] .dropdown-divider {
    border-color: #333;
}

/* Offcanvas / Drawer */
[data-theme="dark"] .offcanvas {
    background: #1a1a1a;
    color: #E0E0E0;
}

/* Loading overlay */
[data-theme="dark"] .popupBG {
    background: rgba(0,0,0,.65);
}

/* Blog / Content */
[data-theme="dark"] .rv-blog-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #E0E0E0;
}

[data-theme="dark"] .rv-blog-card h5,
[data-theme="dark"] .rv-blog-card h6 {
    color: #E0E0E0;
}

[data-theme="dark"] .rv-blog-card p {
    color: #bbb;
}

/* VIP Cards */
[data-theme="dark"] .rv-card-vip-gold,
[data-theme="dark"] .rv-card-vip-diamond,
[data-theme="dark"] .rv-card-vip-silver {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #E0E0E0;
}

/* Misc text colors */
[data-theme="dark"] .text-muted {
    color: #888 !important;
}

[data-theme="dark"] .text-dark {
    color: #E0E0E0 !important;
}

[data-theme="dark"] .text-body {
    color: #E0E0E0 !important;
}

[data-theme="dark"] .text-secondary {
    color: #aaa !important;
}

/* Utility */
[data-theme="dark"] .bg-white {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] .bg-light {
    background-color: #151515 !important;
}

[data-theme="dark"] .bg-body-secondary {
    background-color: #0F0F0F !important;
}

[data-theme="dark"] .border {
    border-color: #2a2a2a !important;
}

[data-theme="dark"] .border-bottom {
    border-color: #2a2a2a !important;
}

[data-theme="dark"] .border-top {
    border-color: #2a2a2a !important;
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #111;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============ CARD TITLES & TEXT FIX ============ */
[data-theme="dark"] .card {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #E0E0E0;
}

[data-theme="dark"] .card-title,
[data-theme="dark"] .card-text,
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4,
[data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #E0E0E0;
}

[data-theme="dark"] .text-dark {
    color: #E0E0E0 !important;
}

[data-theme="dark"] p {
    color: #ccc;
}

[data-theme="dark"] a {
    color: #8ab4f8;
}

[data-theme="dark"] a:hover {
    color: var(--rv-accent);
}

[data-theme="dark"] .rv-cate-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #E0E0E0;
}

[data-theme="dark"] .rv-cate-card:hover {
    background: rgba(0,177,79,.1);
    border-color: var(--rv-accent);
    color: var(--rv-accent);
}

[data-theme="dark"] .rv-cate-card h6 {
    color: #E0E0E0;
}

[data-theme="dark"] .rv-cate-card small {
    color: #888;
}

[data-theme="dark"] .rv-card .rv-card-title {
    color: #E0E0E0;
}

[data-theme="dark"] .rv-card .rv-card-title a {
    color: #E0E0E0;
}

[data-theme="dark"] .rv-card .rv-card-title a:hover {
    color: var(--rv-accent);
}

[data-theme="dark"] .rv-card .rv-card-desc,
[data-theme="dark"] .rv-card .card-text {
    color: #bbb;
}

[data-theme="dark"] .small, [data-theme="dark"] small {
    color: #888 !important;
}

[data-theme="dark"] .text-muted {
    color: #888 !important;
}

[data-theme="dark"] .fw-semibold, [data-theme="dark"] .fw-bold {
    color: #E0E0E0;
}

/* ============ MEMBER/CUSTOMER DARK MODE ============ */
[data-theme="dark"] .rv-account-nav li a {
    color: #ccc;
    background: transparent;
}

[data-theme="dark"] .rv-account-nav li a:hover {
    background: rgba(0,177,79,.1);
    color: var(--rv-accent);
}

[data-theme="dark"] .rv-account-nav li a.active {
    background: var(--rv-accent);
    color: #fff !important;
}

[data-theme="dark"] .rv-info-field {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #E0E0E0;
}

[data-theme="dark"] .rv-info-field span {
    color: #bbb;
}

[data-theme="dark"] .rv-payment-option {
    border-color: #2a2a2a;
    background: #1a1a1a;
    color: #E0E0E0;
}

[data-theme="dark"] .rv-payment-option:hover {
    border-color: var(--rv-accent);
    background: rgba(0,177,79,.1);
}

[data-theme="dark"] .rv-payment-option > input {
    accent-color: var(--rv-accent);
}

/* List ads table */
[data-theme="dark"] .table td, [data-theme="dark"] .table th {
    color: #E0E0E0;
}

[data-theme="dark"] .table thead th {
    background: #1a1a1a;
    color: #bbb;
    border-color: #2a2a2a;
}

[data-theme="dark"] .table tbody tr {
    border-color: #2a2a2a;
}

[data-theme="dark"] .table tbody tr:nth-child(odd) td {
    background: #151515;
}

[data-theme="dark"] .table tbody td {
    background: #111;
    color: #E0E0E0;
    border-color: #222;
}

/* Filter buttons */
[data-theme="dark"] .filter-btn {
    border-color: #333;
    background: #1a1a1a;
    color: #ccc;
}

[data-theme="dark"] .filter-btn:hover {
    background: #2a2a2a;
    color: #fff;
}

[data-theme="dark"] .filter-btn.active {
    background: var(--rv-accent);
    color: #fff;
    border-color: var(--rv-accent);
}

/* Account page headings */
[data-theme="dark"] .h3, [data-theme="dark"] .h4, [data-theme="dark"] .h5 {
    color: #E0E0E0;
}

/* ============ LIST ADS DARK MODE ============ */
/* Widget container */
[data-theme="dark"] .add-manage-table {
    color: #E0E0E0;
}

/* Table striped override — Bootstrap uses rgba(0,0,0,.05) hardcoded */
[data-theme="dark"] .add-manage-table tbody tr:nth-child(odd) td {
    background: #151515 !important;
}

[data-theme="dark"] .add-manage-table tbody tr:nth-child(even) td {
    background: #111 !important;
}

/* Table hover */
[data-theme="dark"] .add-manage-table tbody tr:hover td {
    background: rgba(0,177,79,.08) !important;
}

/* All rows uniform dark bg, let VIP highlight override via specificity */
[data-theme="dark"] .add-manage-table tbody tr td {
    background: transparent;
    color: #E0E0E0;
    border-color: #222 !important;
}

/* VIP active row */
[data-theme="dark"] tr.vip-active td {
    background: rgba(255,152,0,.06) !important;
    color: #E0E0E0;
}

[data-theme="dark"] tr.vip-active {
    border-color: #ff9800 !important;
}

/* VIP expired row */
[data-theme="dark"] tr.vip-expired td {
    background: rgba(220,53,69,.04) !important;
    color: #ccc;
    opacity: .7;
}

/* Post title link */
[data-theme="dark"] .add-manage-table a[href] {
    color: #8ab4f8;
}

[data-theme="dark"] .add-manage-table a[href]:hover {
    color: var(--rv-accent);
}

[data-theme="dark"] .add-manage-table strong a {
    color: #8ab4f8;
}

/* Text details */
[data-theme="dark"] .add-manage-table .text-muted {
    color: #888 !important;
}

/* Thumbnail image border */
[data-theme="dark"] .add-img-td img {
    border: 1px solid #333;
}

/* Badges in dark mode */
[data-theme="dark"] .badge.bg-light {
    background: #2a2a2a !important;
    color: #ccc !important;
}

[data-theme="dark"] .badge.bg-secondary {
    background: #333 !important;
    color: #bbb !important;
}

[data-theme="dark"] .badge.bg-warning {
    background: #e67e00 !important;
    color: #fff !important;
}

[data-theme="dark"] .badge.bg-danger {
    background: #c0392b !important;
    color: #fff !important;
}

[data-theme="dark"] .badge.bg-success {
    background: #00B14F !important;
    color: #fff !important;
}

/* Outline buttons dark mode */
[data-theme="dark"] .btn-outline-primary {
    color: #8ab4f8;
    border-color: #3a5a8c;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: #8ab4f8;
    color: #111;
    border-color: #8ab4f8;
}

[data-theme="dark"] .btn-outline-info {
    color: #6ec1e4;
    border-color: #3a7a8c;
}

[data-theme="dark"] .btn-outline-info:hover {
    background: #6ec1e4;
    color: #111;
    border-color: #6ec1e4;
}

[data-theme="dark"] .btn-outline-warning {
    color: #ffb74d;
    border-color: #7a5a1a;
}

[data-theme="dark"] .btn-outline-warning:hover {
    background: #ffb74d;
    color: #111;
    border-color: #ffb74d;
}

[data-theme="dark"] .btn-outline-danger {
    color: #ef5350;
    border-color: #7a2a2a;
}

[data-theme="dark"] .btn-outline-danger:hover {
    background: #ef5350;
    color: #fff;
    border-color: #ef5350;
}

[data-theme="dark"] .btn-outline-rv {
    color: var(--rv-accent);
    border-color: var(--rv-accent);
}

[data-theme="dark"] .btn-outline-rv:hover {
    background: var(--rv-accent);
    color: #fff;
}

/* Disabled VIP button */
[data-theme="dark"] .btn-success.disabled,
[data-theme="dark"] .btn-success:disabled {
    background: rgba(0,177,79,.3) !important;
    color: rgba(255,255,255,.5) !important;
    border-color: rgba(0,177,79,.3) !important;
}

/* Table responsive wrapper */
[data-theme="dark"] .table-responsive {
    background: transparent;
}

/* Mobile card borders */
@media (max-width: 991.98px) {
    [data-theme="dark"] .add-manage-table tr {
        background: #1a1a1a !important;
        border-color: #2a2a2a !important;
        box-shadow: 0 1px 6px rgba(0,0,0,.3);
    }

    [data-theme="dark"] .add-manage-table td {
        background: transparent !important;
        color: #E0E0E0;
    }

    [data-theme="dark"] .add-manage-table tr > td:nth-child(3) {
        border-top-color: #2a2a2a !important;
    }

    [data-theme="dark"] .add-manage-table tr > td:last-child {
        border-top-color: #2a2a2a !important;
    }

    [data-theme="dark"] tr.vip-active {
        border-color: #ff9800 !important;
        background: rgba(255,152,0,.08) !important;
        box-shadow: 0 2px 10px rgba(255,152,0,.15);
    }

    [data-theme="dark"] tr.vip-expired {
        border-color: #dc3545 !important;
        background: rgba(220,53,69,.05) !important;
    }

    [data-theme="dark"] .add-manage-table .btn {
        border-color: #333;
        color: #ccc;
    }

    [data-theme="dark"] .add-manage-table .btn-outline-primary { color: #8ab4f8; border-color: #3a5a8c; }
    [data-theme="dark"] .add-manage-table .btn-outline-info { color: #6ec1e4; border-color: #3a7a8c; }
    [data-theme="dark"] .add-manage-table .btn-outline-warning { color: #ffb74d; border-color: #7a5a1a; }
    [data-theme="dark"] .add-manage-table .btn-outline-danger { color: #ef5350; border-color: #7a2a2a; }
}

/* Footer dark mode (for pages using design system footer) */
[data-theme="dark"] .rv-footer {
    background: #0a0a0a;
}

[data-theme="dark"] .rv-footer__brand {
    color: #fff;
}

[data-theme="dark"] .rv-footer__heading {
    color: #fff;
}

[data-theme="dark"] .rv-footer__link {
    color: #888;
}

[data-theme="dark"] .rv-footer__link:hover {
    color: var(--rv-accent);
}

[data-theme="dark"] .rv-footer__bottom {
    border-top-color: #222;
    color: #666;
}
/* Registration: spacious fields and clear feedback on all screen sizes. */
.rv-register-card { max-width: 620px; }
.rv-register-card form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.rv-register-card form > :first-child,
.rv-register-card form > :nth-child(5),
.rv-register-card form > .d-flex,
.rv-register-card form > button { grid-column: 1 / -1; }
.rv-register-card .form-label { font-weight: 600; }
.rv-register-card .field-error { font-size: .8rem; }
.rv-register-card .form-control.is-invalid { border-color: #dc3545; }
.rv-register-card .form-control.is-valid { border-color: #198754; }
@media (max-width: 575px) {
    .rv-register-card { padding: 24px 20px; }
    .rv-register-card form { display: block; }
}
