:root {
    --simple-page: #071426;
    --simple-sidebar: #08182a;
    --simple-surface: #0b1a2e;
    --simple-panel: #10223a;
    --simple-control: #0a182b;
    --simple-border: #334b68;
    --simple-border-strong: #58718f;
    --simple-text: #f8fafc;
    --simple-muted: #a9b6c8;
    --simple-accent: #22bfe8;
    --simple-accent-hover: #5bd7f4;
    --simple-success: #4ade80;
    --simple-warning: #fbbf24;
    --simple-danger: #fb7185;
}

html:has(body.ui-simple-render) {
    color-scheme: dark;
    background: var(--simple-page) !important;
}

body.ui-simple-render {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--simple-page) !important;
    background-image: none !important;
    color: var(--simple-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    line-height: 1.5;
}

html[data-theme="light"] body.ui-simple-render {
    background: var(--simple-page) !important;
    color: var(--simple-text) !important;
}

/* Loại bỏ các hiệu ứng tốn tài nguyên nhưng giữ nguyên bố cục và hành vi. */
body.ui-simple-render *,
body.ui-simple-render *::before,
body.ui-simple-render *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
    transition: none !important;
}

body.ui-simple-render :is(
    .page-shell,
    .app-shell,
    .main-content,
    .content-wrapper,
    .app-content,
    .admin-modern-page,
    .rent-v1-modern,
    .public-shell,
    .seo-wrap,
    .hero,
    .hero-wrap,
    .premium-card,
    .card,
    .card-body,
    .panel,
    .modal-content,
    .dropdown-menu,
    .toast,
    .popover,
    .alert,
    .stats-row,
    .cta-band,
    .wide-panel,
    .feature-card,
    .faq-answer-card,
    .preview-card,
    .micro-card,
    .stat-card,
    .warning-shell
) {
    background-image: none !important;
}

body.ui-simple-render :is(
    .public-shell,
    .seo-wrap,
    .hero,
    .hero-wrap,
    .premium-card,
    .feature-card,
    .preview-card,
    .cta-band,
    .warning-shell
)::before,
body.ui-simple-render :is(
    .public-shell,
    .seo-wrap,
    .hero,
    .hero-wrap,
    .premium-card,
    .feature-card,
    .preview-card,
    .cta-band,
    .warning-shell
)::after {
    background-image: none !important;
    content: none !important;
}

body.ui-simple-render :is(
    .page-shell,
    .main-content,
    .content-wrapper,
    .app-content,
    .admin-modern-page,
    .rent-v1-modern,
    .public-shell,
    .seo-wrap
) {
    background-color: var(--simple-page) !important;
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(.sidebar, .offcanvas, .mobile-sidebar) {
    background: var(--simple-sidebar) !important;
    background-image: none !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(.topbar, .navbar, .public-nav, .seo-nav, .page-header, .sticky-header) {
    background: var(--simple-surface) !important;
    background-image: none !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(
    .card,
    .modal-content,
    .dropdown-menu,
    .toast,
    .popover,
    .list-group-item,
    .premium-card,
    .wide-panel,
    .feature-card,
    .faq-answer-card,
    .preview-card,
    .micro-card,
    .stat-card,
    .card-seo,
    .warning-shell
) {
    background-color: var(--simple-panel) !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(.card-header, .card-footer, .modal-header, .modal-footer, .table thead th) {
    background: var(--simple-surface) !important;
    background-image: none !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(.table, table) {
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(.table td, .table th, table td, table th) {
    border-color: var(--simple-border) !important;
}

body.ui-simple-render :is(.table-striped tbody tr:nth-of-type(odd), .table-hover tbody tr:hover) {
    background-color: rgba(88, 113, 143, .12) !important;
}

body.ui-simple-render :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea,
    .form-control,
    .custom-select,
    .input-group-text,
    .preview-search,
    .preview-filter
) {
    background: var(--simple-control) !important;
    background-image: none !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(input, select, textarea)::placeholder {
    color: #8da0b8 !important;
    opacity: 1;
}

body.ui-simple-render :is(input, select, textarea, button, a):focus-visible {
    outline: 3px solid rgba(34, 191, 232, .38) !important;
    outline-offset: 2px;
}

body.ui-simple-render :is(a, .btn-link, .text-info, .feature-link) {
    color: var(--simple-accent) !important;
}

body.ui-simple-render :is(a, .btn-link, .text-info, .feature-link):hover {
    color: var(--simple-accent-hover) !important;
}

body.ui-simple-render :is(.btn, button, [role="button"], .public-btn, .btn-seo) {
    background-image: none !important;
    border-radius: 8px !important;
}

body.ui-simple-render :is(
    .btn-primary,
    .btn-success,
    .btn-info,
    .public-btn.primary,
    .btn-seo.primary,
    .warning-button.primary
) {
    background: var(--simple-accent) !important;
    border-color: var(--simple-accent) !important;
    color: #04111f !important;
    font-weight: 700;
}

body.ui-simple-render :is(
    .btn-primary,
    .btn-success,
    .btn-info,
    .public-btn.primary,
    .btn-seo.primary,
    .warning-button.primary
):hover {
    background: var(--simple-accent-hover) !important;
    border-color: var(--simple-accent-hover) !important;
    color: #04111f !important;
}

body.ui-simple-render :is(.btn-secondary, .btn-outline-light, .btn-outline-secondary, .public-btn, .btn-seo) {
    background: var(--simple-surface) !important;
    border-color: var(--simple-border-strong) !important;
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(.badge, .badge-pill, .badge-pill-soft, .keyword-pill, .trust-chip, .preview-pill, .price-tag, .otp-tag) {
    background-image: none !important;
    border: 1px solid var(--simple-border) !important;
}

body.ui-simple-render :is(.text-muted, small, .form-text, .topbar-subtitle, .sidebar-subtitle, .brand-sub, .hero-desc, .panel-sub, .stat-label, .micro-label, .warning-copy, .warning-footnote) {
    color: var(--simple-muted) !important;
}

body.ui-simple-render :is(.text-success, .status-success) {
    color: var(--simple-success) !important;
}

body.ui-simple-render :is(.text-warning, .status-warning) {
    color: var(--simple-warning) !important;
}

body.ui-simple-render :is(.text-danger, .status-danger) {
    color: var(--simple-danger) !important;
}

body.ui-simple-render :is(.alert-success) {
    background: #123326 !important;
    border-color: #276146 !important;
    color: #bbf7d0 !important;
}

body.ui-simple-render :is(.alert-danger) {
    background: #3a1822 !important;
    border-color: #713243 !important;
    color: #fecdd3 !important;
}

body.ui-simple-render :is(.sidebar .nav-link, .navbar .nav-link) {
    background-image: none !important;
    border: 1px solid transparent;
    color: var(--simple-muted) !important;
}

body.ui-simple-render :is(.sidebar .nav-link:hover, .sidebar .nav-link.active, .navbar .nav-link:hover, .navbar .nav-link.active) {
    background: var(--simple-panel) !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

body.ui-simple-render :is(.sidebar-logo, .brand-icon, .panel-icon, .stat-icon, .cta-icon, .warning-icon, .service-logo) {
    background-image: none !important;
    border-color: var(--simple-border) !important;
}

body.ui-simple-render :is(.hero-title span, .eyebrow, .method-text, .brand-name, .sidebar-title) {
    color: var(--simple-accent) !important;
}

body.ui-simple-render .modal-backdrop,
body.ui-simple-render .sidebar-backdrop {
    background: #000 !important;
    opacity: .65 !important;
}

body.ui-simple-render :is(.skeleton, [class*="shimmer"], [class*="glow"], [class*="blur"], [class*="orb"]) {
    animation: none !important;
    background-image: none !important;
}

@media (max-width: 767.98px) {
    body.ui-simple-render :is(.card, .premium-card, .card-seo, .warning-shell) {
        border-radius: 10px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ui-simple-render *,
    body.ui-simple-render *::before,
    body.ui-simple-render *::after {
        scroll-behavior: auto !important;
    }
}

/*
 * Chế độ phẳng toàn cục.
 * ID trên body tạo độ ưu tiên ổn định trước CSS legacy có nhiều !important.
 * Ảnh nội dung dùng thẻ <img> và Bootstrap Icons vẫn được giữ nguyên.
 */
#uiSimpleRoot,
#uiSimpleRoot * {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
    transition: none !important;
}

#uiSimpleRoot *:not(.custom-control-label)::before,
#uiSimpleRoot *:not(.custom-control-label)::after {
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
}

#uiSimpleRoot::before,
#uiSimpleRoot::after {
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
}

#uiSimpleRoot select:not([multiple]):not([size]),
#uiSimpleRoot .custom-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 2.25rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a9b6c8' d='M1.4 1 6 5.6 10.6 1 12 2.4l-6 6-6-6z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right .75rem center !important;
    background-size: 12px 8px !important;
}

#uiSimpleRoot :is(
    .rent-v1-modern,
    .proxy-shell,
    .deposit-shell,
    .tools-dichvu-modern,
    .services-modern-shell,
    .stats-modern-shell,
    .account-settings-modern,
    .change-pass-modern,
    .api-get-shell,
    .contact-modern,
    .policy-modern,
    .ref-modern-shell,
    .admin-glass-shell,
    .sysdash-page
) {
    background-color: var(--simple-page) !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(
    .hero,
    [class$="-hero"],
    [class*="-hero "],
    .rent-hero-v1,
    .simv1-page-top,
    .api-get-top
) {
    background-color: var(--simple-surface) !important;
    border-color: var(--simple-border) !important;
    border-radius: 10px !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(
    .card,
    .premium-card,
    .premium-module-card,
    [class$="-card"],
    [class*="-card "],
    [class$="-panel"],
    [class*="-panel "]
) {
    background-color: var(--simple-panel) !important;
    border-color: var(--simple-border) !important;
    border-radius: 10px !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(
    .card-header,
    .card-footer,
    [class$="-header"],
    [class*="-header "],
    [class$="-toolbar"],
    [class*="-toolbar "]
) {
    background-color: var(--simple-surface) !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(
    [class$="-eyebrow"],
    [class*="-eyebrow "],
    [class$="-kicker"],
    [class*="-kicker "],
    .eyebrow,
    .rent-hero-kicker-row,
    .rent-hero-live,
    [class*="glow"],
    [class*="blur"],
    [class*="orb"],
    [class*="shimmer"],
    [class*="sparkle"],
    [class*="rays"]
) {
    display: none !important;
}

#uiSimpleRoot :is(
    button,
    .btn,
    [role="button"],
    a[class$="-btn"],
    a[class*="-btn "],
    button[class$="-btn"],
    button[class*="-btn "],
    a[class$="-button"],
    a[class*="-button "]
) {
    border-radius: 8px !important;
}

#uiSimpleRoot :is(
    .btn-primary,
    .btn-success,
    .btn-info,
    button.primary,
    a.primary,
    [class$="-btn"].primary,
    [class*="-btn "].primary
) {
    background-color: var(--simple-accent) !important;
    border-color: var(--simple-accent) !important;
    color: #04111f !important;
}

#uiSimpleRoot :is(
    .btn-secondary,
    .btn-outline-light,
    .btn-outline-secondary,
    .btn-outline-primary,
    a[class$="-btn"],
    a[class*="-btn "],
    button[class$="-btn"],
    button[class*="-btn "]
):not(.primary):not(.btn-primary):not(.btn-success):not(.btn-info) {
    background-color: var(--simple-surface) !important;
    border-color: var(--simple-border-strong) !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea,
    .form-control,
    .custom-select,
    .input-group-text
) {
    background-color: var(--simple-control) !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
    border-radius: 8px !important;
}

#uiSimpleRoot :is(.nav-tabs, .nav-pills, .pagination, .dropdown-menu) {
    background-color: var(--simple-surface) !important;
    border-color: var(--simple-border) !important;
}

#uiSimpleRoot :is(.nav-tabs .nav-link, .nav-pills .nav-link, .page-link, .dropdown-item) {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--simple-muted) !important;
}

#uiSimpleRoot :is(.nav-tabs .nav-link.active, .nav-pills .nav-link.active, .page-item.active .page-link, .dropdown-item:hover) {
    background-color: var(--simple-panel) !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(.table, table) {
    background-color: transparent !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(.table thead th, table thead th) {
    background-color: var(--simple-surface) !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(.table tbody td, table tbody td) {
    background-color: var(--simple-panel) !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(
    .badge,
    [class$="-badge"],
    [class*="-badge "],
    [class$="-chip"],
    [class*="-chip "],
    [class$="-pill"],
    [class*="-pill "],
    [class$="-tag"],
    [class*="-tag "]
) {
    background-color: var(--simple-surface) !important;
    border-color: var(--simple-border) !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(.service-logo, .auth-service-icon, .nav-icon, .sidebar-logo, .stat-icon, .panel-icon) {
    background-color: var(--simple-surface) !important;
    border-color: var(--simple-border-strong) !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot :is(h1, h2, h3, h4, h5, h6, .card-title, [class$="-title"], [class*="-title "]) {
    color: var(--simple-text) !important;
    text-wrap: balance;
}

#uiSimpleRoot :is(.text-muted, [class$="-subtitle"], [class*="-subtitle "], [class$="-desc"], [class*="-desc "]) {
    color: var(--simple-muted) !important;
}

#uiSimpleRoot :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgba(34, 191, 232, .38) !important;
    outline-offset: 2px !important;
}

@media (max-width: 767.98px) {
    #uiSimpleRoot :is(
        .hero,
        [class$="-hero"],
        [class*="-hero "],
        .rent-hero-v1,
        .simv1-page-top,
        .card,
        [class$="-card"],
        [class*="-card "],
        [class$="-panel"],
        [class*="-panel "]
    ) {
        border-radius: 8px !important;
    }

    #uiSimpleRoot .hero-title {
        font-size: clamp(2rem, 10vw, 2.35rem) !important;
        line-height: 1.05 !important;
    }
}

@media (max-width: 400px) {
    #uiSimpleRoot .public-nav .brand-icon {
        display: none !important;
    }

    #uiSimpleRoot .public-nav .brand-name {
        font-size: .82rem !important;
    }

    #uiSimpleRoot .public-nav .public-btn {
        min-height: 34px !important;
        padding: .4rem .55rem !important;
        font-size: .75rem !important;
    }
}

/*
 * Thuê Gmail V1/V2/V3: khóa toàn bộ hiệu ứng legacy của nút và badge.
 * Hai ID trong các selector của form/bảng giúp thắng mail-simv1.css,
 * vì stylesheet đó được nạp sau và cũng dùng #serviceSelectionCard.
 */
#uiSimpleRoot .mail-simv1-page :is(
    button,
    .btn,
    [role="button"],
    .filter-service,
    .rent-action-btn,
    .mail-action-btn,
    .rent-submit-btn,
    .rent-btn-info,
    .rent-btn-success,
    .rent-btn-danger,
    .rent-btn-muted,
    .rent-btn-filter,
    .mail-simv1-diamond-toggle,
    .page-link,
    [data-copy-text]
),
#uiSimpleRoot .mail-simv1-page #serviceSelectionCard :is(.mail-glass-badge, .rent-submit-btn),
#uiSimpleRoot .mail-simv1-page #mailRequestsCard :is(button, .btn, [role="button"], .page-link, [data-copy-text]) {
    background-image: none !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
    transition: none !important;
}

#uiSimpleRoot .mail-simv1-page :is(
    button,
    .filter-service,
    .btn,
    .rent-action-btn,
    .rent-submit-btn,
    .mail-action-btn,
    .mail-simv1-diamond-toggle,
    .page-link,
    [data-copy-text]
 )::before,
#uiSimpleRoot .mail-simv1-page :is(
    button,
    .filter-service,
    .btn,
    .rent-action-btn,
    .rent-submit-btn,
    .mail-action-btn,
    .mail-simv1-diamond-toggle,
    .page-link,
    [data-copy-text]
)::after,
#uiSimpleRoot .mail-simv1-page #serviceSelectionCard :is(.mail-glass-badge, .rent-submit-btn)::before,
#uiSimpleRoot .mail-simv1-page #serviceSelectionCard :is(.mail-glass-badge, .rent-submit-btn)::after,
#uiSimpleRoot .mail-simv1-page #mailRequestsCard :is(button, .btn, [role="button"], .page-link, [data-copy-text])::before,
#uiSimpleRoot .mail-simv1-page #mailRequestsCard :is(button, .btn, [role="button"], .page-link, [data-copy-text])::after {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background: none !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
    mix-blend-mode: normal !important;
    animation: none !important;
    transition: none !important;
}

#uiSimpleRoot .mail-simv1-page #serviceSelectionCard .rent-submit-btn,
#uiSimpleRoot .mail-simv1-page #serviceSelectionCard .rent-submit-btn:is(:hover, :active, :focus, :focus-visible) {
    background: var(--simple-accent) !important;
    border-color: var(--simple-accent) !important;
    color: #04111f !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
}

#uiSimpleRoot .mail-simv1-page #serviceSelectionCard .mail-glass-badge,
#uiSimpleRoot .mail-simv1-page #serviceSelectionCard .mail-glass-badge:hover {
    background: #0b1b35 !important;
    border-color: #284866 !important;
    border-radius: 8px !important;
    color: var(--simple-text) !important;
}

#uiSimpleRoot .mail-simv1-page #serviceSelectionCard .mail-glass-badge.green,
#uiSimpleRoot .mail-simv1-page #serviceSelectionCard .mail-glass-badge.green:hover {
    background: #0d2a27 !important;
    border-color: #2b6f55 !important;
    color: #b7f7c8 !important;
}

#uiSimpleRoot .mail-simv1-page #serviceSelectionCard .mail-glass-badge.gold,
#uiSimpleRoot .mail-simv1-page #serviceSelectionCard .mail-glass-badge.gold:hover {
    background: #2a2417 !important;
    border-color: #756330 !important;
    color: #ffe3a0 !important;
}

/* V1-V5: giữ màu trực quan cho tỉ lệ OTP 24H trong giao diện phẳng. */
#uiSimpleRoot .simv1-otp24-ratebar {
    background-color: #283446 !important;
    background-image: none !important;
    box-shadow: none !important;
}

#uiSimpleRoot .simv1-otp24-ratebar > span {
    background-color: #20ed3d !important;
    background-image: linear-gradient(90deg, #20d9ff 0%, #13e692 70%, #20ed3d 100%) !important;
    box-shadow: none !important;
}

#uiSimpleRoot table.simv1-otp24-table tbody td.simv1-otp24-rate-value {
    color: #20ed46 !important;
    -webkit-text-fill-color: #20ed46 !important;
    text-shadow: none !important;
}

/*
 * Carousel hướng dẫn nạp tiền là chuyển động chức năng: thanh tiến trình cho biết
 * thời gian còn lại và hiệu ứng chuyển cảnh giúp người dùng nhận ra bước mới.
 * Khôi phục riêng các hiệu ứng nhẹ này sau quy tắc tắt animation toàn cục.
 */
#uiSimpleRoot .binance-guide-card .guide-progress-bar {
    background-color: var(--simple-accent) !important;
    background-image: linear-gradient(90deg, #35d5ff, #5fffd1) !important;
}

#uiSimpleRoot .binance-guide-card .guide-slide {
    transition: opacity .48s ease, transform .58s cubic-bezier(.2, .8, .2, 1) !important;
}

#uiSimpleRoot .binance-guide-card .guide-copy {
    animation: binanceGuideCopyIn .35s ease both !important;
}

#uiSimpleRoot .binance-guide-card .guide-dot {
    transition: width .25s ease, background-color .25s ease !important;
}

@media (prefers-reduced-motion: reduce) {
    #uiSimpleRoot .binance-guide-card .guide-slide,
    #uiSimpleRoot .binance-guide-card .guide-dot {
        transition: none !important;
    }

    #uiSimpleRoot .binance-guide-card .guide-copy {
        animation: none !important;
    }
}
