:root {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

.language-switcher {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid #574b2d;
    border-radius: 0.4rem;
    background: rgba(8, 8, 8, 0.95);
    color: #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.language-switcher select,
.theme-toggle {
    border: 0;
    outline: 0;
    background: #080808;
    color: #fff;
    font: inherit;
    font-size: 0.78rem;
}

.theme-toggle {
    width: 2rem;
    height: 1.7rem;
    margin: 0;
    padding: 0;
    border-left: 1px solid #574b2d;
    cursor: pointer;
}

html[dir="rtl"] .language-switcher {
    right: auto;
    left: 0.75rem;
}

.language-switcher--embedded,
html[dir="rtl"] .language-switcher--embedded {
    position: static;
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
    box-shadow: none;
}

.language-switcher--embedded select {
    flex: 1;
}

.language-switcher--nav {
    width: auto;
    min-width: 9rem;
    padding: 0.3rem 0.45rem;
}

.language-switcher--nav select {
    width: 5.4rem;
}

.language-switcher--card {
    margin-top: 1.25rem;
}

html[data-theme="light"] body {
    background-color: #f5f2e9 !important;
    color: #171717 !important;
}

html:not([data-theme="light"]) .gold-accent,
html:not([data-theme="light"]) [class*="text-[#b59b54]"] {
    color: #e0c36f !important;
}

html:not([data-theme="light"]) [class*="border-[#b59b54]"] {
    border-color: #d2b354 !important;
}

html:not([data-theme="light"]) [class*="bg-[#b59b54]"] {
    background-color: #d2b354 !important;
    color: #080808 !important;
}

html:not([data-theme="light"]) .luxury-card {
    border-color: #5f512a !important;
    box-shadow: 0 8px 26px rgba(210, 179, 84, 0.08);
}

html[data-theme="light"] .language-switcher {
    border-color: #b59b54;
    background: rgba(255, 255, 255, 0.96);
    color: #171717;
}

html[data-theme="light"] .language-switcher select,
html[data-theme="light"] .theme-toggle {
    background: #fff;
    color: #171717;
}

html[data-theme="light"] .luxury-card,
html[data-theme="light"] .bg-black,
html[data-theme="light"] .bg-gray-900,
html[data-theme="light"] .bg-gray-900\/80,
html[data-theme="light"] .bg-gray-950,
html[data-theme="light"] [class*="bg-[#050505]"],
html[data-theme="light"] [class*="bg-[#0a0a0a]"] {
    background: #fff !important;
    color: #171717 !important;
}

html[data-theme="light"] .bg-gray-800,
html[data-theme="light"] .bg-gray-800\/50,
html[data-theme="light"] .bg-gray-700 {
    background-color: #e7e2d6 !important;
}

html[data-theme="light"] .text-white,
html[data-theme="light"] .text-gray-100,
html[data-theme="light"] .text-gray-200,
html[data-theme="light"] .text-gray-300 {
    color: #171717 !important;
}

html[data-theme="light"] .text-gray-400,
html[data-theme="light"] .text-gray-500 {
    color: #5d5b55 !important;
}

html[data-theme="light"] .gold-accent,
html[data-theme="light"] [class*="text-[#b59b54]"] {
    color: #754900 !important;
    font-weight: 700;
}

html[data-theme="light"] [class*="border-[#b59b54]"] {
    border-color: #b87300 !important;
    border-width: 2px;
}

html[data-theme="light"] [class*="bg-[#b59b54]"] {
    background-color: #efb82d !important;
    color: #111 !important;
}

html[data-theme="light"] .border-gray-800,
html[data-theme="light"] .border-gray-700,
html[data-theme="light"] .border-gray-600,
html[data-theme="light"] .luxury-card {
    border-color: #a9843d !important;
}

html[data-theme="light"] .luxury-card {
    box-shadow: 0 8px 24px rgba(91, 61, 0, 0.12);
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3 {
    color: #704600;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    border-color: #bdb5a4 !important;
    background-color: #fff !important;
    color: #171717 !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #77736b !important;
}

html[data-theme="light"] .investment-progress,
html[data-theme="light"] .investment-progress::-webkit-progress-bar {
    background: #d9d4c8;
}

html[data-theme="light"] footer,
html[data-theme="light"] nav {
    border-color: #d7cfbc !important;
}

@media (max-width: 480px) {
    .language-switcher {
        top: 0.4rem;
        right: 0.4rem;
    }

    html[dir="rtl"] .language-switcher {
        left: 0.4rem;
    }

    .language-switcher--embedded,
    html[dir="rtl"] .language-switcher--embedded {
        left: auto;
        right: auto;
    }

    .language-switcher--nav {
        width: auto;
        min-width: 0;
        gap: 0.2rem;
        padding: 0.25rem;
    }

    .language-switcher--nav > span {
        display: none;
    }

    .language-switcher--nav select {
        width: 4.2rem;
        font-size: 0.65rem;
    }

    .language-switcher--nav .theme-toggle {
        width: 1.65rem;
    }
}

/* Refined HouseToHome luxury palette. */
:root {
    --hth-bg: #070706;
    --hth-bg-glow: #211b0e;
    --hth-surface: #11110f;
    --hth-surface-raised: #181713;
    --hth-surface-soft: #201d16;
    --hth-text: #f5f0e4;
    --hth-muted: #aaa391;
    --hth-gold: #d8b75b;
    --hth-gold-bright: #efd47f;
    --hth-gold-deep: #806726;
    --hth-line: #403720;
    --hth-success: #49b77a;
    --hth-danger: #b5474e;
    --hth-navy: #09162c;
    --hth-navy-raised: #102544;
    --hth-blue: #5fa8ff;
    --hth-shadow: rgba(0, 0, 0, .48);
}

html[data-theme="light"] {
    --hth-bg: #f0eadc;
    --hth-bg-glow: #dfc98f;
    --hth-surface: #fffdf7;
    --hth-surface-raised: #ffffff;
    --hth-surface-soft: #e8deca;
    --hth-text: #17130d;
    --hth-muted: #4c4438;
    --hth-gold: #835909;
    --hth-gold-bright: #704700;
    --hth-gold-deep: #9b731f;
    --hth-line: #aa8a43;
    --hth-success: #12643f;
    --hth-danger: #942e38;
    --hth-navy: #0b1c35;
    --hth-navy-raised: #153158;
    --hth-blue: #155aa5;
    --hth-shadow: rgba(57, 41, 13, .18);
}

body {
    background:
        radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--hth-bg-glow) 46%, transparent) 0, transparent 34rem),
        var(--hth-bg) !important;
    color: var(--hth-text) !important;
}

.luxury-card {
    background: linear-gradient(145deg, var(--hth-surface-raised), var(--hth-surface)) !important;
    border-color: var(--hth-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 42px var(--hth-shadow), inset 0 1px 0 color-mix(in srgb, var(--hth-gold) 12%, transparent) !important;
}

.gold-accent,
[class*="text-[#b59b54]"] {
    color: var(--hth-gold-bright) !important;
}

[class*="border-[#b59b54]"] {
    border-color: var(--hth-gold-deep) !important;
}

[class*="bg-[#b59b54]"] {
    background: linear-gradient(135deg, var(--hth-gold-bright), var(--hth-gold)) !important;
    color: #151109 !important;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--hth-gold) 18%, transparent);
}

header {
    border-color: var(--hth-line) !important;
}

header button,
.wallet-primary-actions button,
.user-settings-actions button {
    border-radius: 10px !important;
}

input,
textarea,
select {
    background: var(--hth-surface-soft) !important;
    border-color: var(--hth-line) !important;
    color: var(--hth-text) !important;
    border-radius: 9px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--hth-gold) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hth-gold) 16%, transparent);
}

html[data-theme="light"] .text-gray-400,
html[data-theme="light"] .text-gray-500,
.text-gray-400,
.text-gray-500 {
    color: var(--hth-muted) !important;
}

#profile-sidebar {
    background: color-mix(in srgb, var(--hth-surface-raised) 96%, transparent) !important;
    border-color: var(--hth-gold-deep) !important;
    box-shadow: 16px 0 45px var(--hth-shadow), inset -1px 0 0 color-mix(in srgb, var(--hth-gold) 20%, transparent) !important;
    backdrop-filter: blur(18px);
}

.profile-preset-picker button {
    background: var(--hth-surface-soft);
    border-color: var(--hth-line);
    color: var(--hth-muted);
}

.profile-preset-picker button.active {
    background: linear-gradient(135deg, var(--hth-gold-bright), var(--hth-gold));
    border-color: var(--hth-gold-bright);
    color: #151109;
}

.interest-withdrawal-warning {
    background: color-mix(in srgb, var(--hth-danger) 22%, var(--hth-surface)) !important;
    border-color: color-mix(in srgb, var(--hth-danger) 78%, var(--hth-line)) !important;
}

/* High-contrast light mode for readable financial data and controls. */
html[data-theme="light"] body,
html[data-theme="light"] p,
html[data-theme="light"] label,
html[data-theme="light"] td,
html[data-theme="light"] li,
html[data-theme="light"] .text-white,
html[data-theme="light"] .text-gray-100,
html[data-theme="light"] .text-gray-200,
html[data-theme="light"] .text-gray-300 {
    color: var(--hth-text) !important;
}

html[data-theme="light"] .text-gray-400,
html[data-theme="light"] .text-gray-500,
html[data-theme="light"] small,
html[data-theme="light"] .muted {
    color: var(--hth-muted) !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .gold-accent,
html[data-theme="light"] .gold-text,
html[data-theme="light"] [class*="text-[#b59b54]"] {
    color: var(--hth-gold-bright) !important;
}

html[data-theme="light"] .luxury-card,
html[data-theme="light"] header,
html[data-theme="light"] footer,
html[data-theme="light"] nav {
    border-color: var(--hth-line) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background: #fff !important;
    border-color: #9c8554 !important;
    color: #14110c !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #655d50 !important;
    opacity: 1;
}

/* Black, white, gold, and deep-navy financial interface. */
header {
    background: linear-gradient(135deg, #050505 0%, var(--hth-navy) 72%, #0c2240 100%) !important;
    border-bottom-color: var(--hth-gold-deep) !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .24);
}

header h1,
header p,
header .text-gray-400,
header .text-gray-500 {
    color: #fff !important;
}

.money-value,
#main-balance,
#funding-balance,
#investing-balance,
#bonus-balance,
#profit-balance,
#interest-eligible-balance {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-weight: 700 !important;
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: .015em !important;
    text-shadow: none;
}

.money-invested { color: #ffffff !important; }
.money-available { color: #62df9a !important; }
.money-user-investment { color: var(--hth-gold-bright) !important; }

html[data-theme="light"] .money-invested { color: #ffffff !important; }
html[data-theme="light"] .money-available { color: #72efac !important; }
html[data-theme="light"] .money-user-investment { color: #6b4300 !important; }

.property-status-badge {
    opacity: 1 !important;
    color: #ffffff !important;
    border-width: 1px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .22);
}

.status-listing { background: #126b47 !important; border-color: #65d69d !important; }
.status-pending { background: #86630b !important; border-color: #e7c65c !important; }
.status-closed { background: #8f3039 !important; border-color: #e47c84 !important; }

.luxury-card .bg-black\/40,
.luxury-card .bg-gray-900\/80,
.luxury-card .bg-gray-900 {
    background: linear-gradient(135deg, var(--hth-navy), var(--hth-navy-raised)) !important;
    border-color: #365175 !important;
}

.luxury-card .bg-black\/40 .text-gray-400,
.luxury-card .bg-black\/40 .text-gray-500,
.luxury-card .bg-gray-900\/80 .text-gray-400,
.luxury-card .bg-gray-900 .text-gray-400 {
    color: #dbe7f7 !important;
}

.interest-withdrawal-warning,
html[data-theme="light"] .interest-withdrawal-warning {
    background: #f5dddd !important;
    border: 1px solid #9e3038 !important;
    border-left: 5px solid #b42530 !important;
    color: #4b0c11 !important;
    box-shadow: none !important;
}

.interest-withdrawal-warning *,
html[data-theme="light"] .interest-withdrawal-warning * {
    color: #4b0c11 !important;
    font-weight: 600;
}

html:not([data-theme="light"]) .interest-withdrawal-warning,
html:not([data-theme="light"]) .interest-withdrawal-warning {
    background: #3b1117 !important;
}

html:not([data-theme="light"]) .interest-withdrawal-warning,
html:not([data-theme="light"]) .interest-withdrawal-warning * {
    color: #ffe8e9 !important;
}

#main-balance { color: var(--hth-gold-bright) !important; }
#funding-balance { color: #ffffff !important; }
#investing-balance { color: #67adff !important; }
#bonus-balance { color: #65d995 !important; }
#profit-balance { color: #80e9ab !important; }

html[data-theme="light"] #main-balance { color: #704700 !important; }
html[data-theme="light"] #funding-balance { color: #172f55 !important; }
html[data-theme="light"] #investing-balance { color: #0759aa !important; }
html[data-theme="light"] #bonus-balance { color: #08733e !important; }
html[data-theme="light"] #profit-balance { color: #12643f !important; }

/* Balanced themes and high-contrast financial details. */
:root {
    --hth-bg: #0c1119;
    --hth-surface: #141b25;
    --hth-surface-2: #192332;
    --hth-text: #f3f5f8;
    --hth-muted: #b9c3d1;
}

html[data-theme="light"] {
    --hth-bg: #e9e2d4;
    --hth-surface: #f7f3ea;
    --hth-surface-2: #efe8da;
    --hth-text: #171b22;
    --hth-muted: #4b5563;
}

body { background-color: var(--hth-bg) !important; color: var(--hth-text) !important; }
.luxury-card { background-color: var(--hth-surface) !important; }

html[data-theme="light"] header h1 { color: #f2cf70 !important; }
html[data-theme="light"] header p,
html[data-theme="light"] header .text-gray-400,
html[data-theme="light"] header .text-gray-500 { color: #edf4ff !important; }
header button:not(:disabled) { color: #171109 !important; opacity: 1 !important; }

#welcome-bonus-amount { color: #65e39a !important; }
html[data-theme="light"] #welcome-bonus-amount { color: #08733e !important; }
.money-profit { color: #73e5a4 !important; font-weight: 800 !important; }
html[data-theme="light"] .money-profit { color: #08733e !important; }
.money-progress { color: #f0c95f !important; font-weight: 800 !important; }
html[data-theme="light"] .money-progress { color: #704700 !important; }

html[data-theme="light"] #profile-sidebar { background: #f4efe5 !important; color: #1c222b !important; }
html[data-theme="light"] #profile-sidebar .text-white,
html[data-theme="light"] #profile-sidebar .text-gray-400,
html[data-theme="light"] #profile-sidebar .text-gray-500 { color: #313946 !important; }
html[data-theme="light"] #profile-sidebar label,
html[data-theme="light"] #profile-sidebar .profile-photo-action { color: #704700 !important; font-weight: 800 !important; }
html[data-theme="light"] #profile-sidebar .profile-preset-picker button { color: #171109 !important; border-color: #8d6b20 !important; }
html[data-theme="light"] #profile-sidebar .profile-preset-picker button:not(.active) { background: #eee5d3 !important; }

/* Clean exchange-style typography for every financial figure. */
:root { --financial-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
body, button, input, select, textarea { font-variant-numeric: lining-nums tabular-nums; }
.money-value,
.money-profit,
.money-progress,
#main-balance,
#funding-balance,
#investing-balance,
#bonus-balance,
#profit-balance,
#interest-eligible-balance,
#interest-next-amount,
#welcome-bonus-amount,
#sidebar-referral-count,
#referral-earned,
#referral-count,
.investment-progress + *,
.history-list strong,
.benefit-value {
    font-family: var(--financial-font) !important;
    font-weight: 750 !important;
    font-variant-numeric: lining-nums tabular-nums slashed-zero;
    letter-spacing: -.02em !important;
    line-height: 1.08;
}

#main-balance,
#funding-balance,
#investing-balance,
#bonus-balance,
#profit-balance {
    font-weight: 800 !important;
    letter-spacing: -.035em !important;
}

/* Readable light mode and less crowded financial figures. */
.money-value,.money-profit,.money-progress,#main-balance,#funding-balance,#investing-balance,#bonus-balance,#profit-balance,#interest-eligible-balance,#interest-next-amount,#welcome-bonus-amount,.history-list strong,.benefit-value{font-weight:650!important;letter-spacing:0!important;line-height:1.2}
#main-balance,#funding-balance,#investing-balance,#bonus-balance,#profit-balance{font-weight:700!important}
html[data-theme="light"] header button:not(:disabled),html[data-theme="light"] .gold-button,html[data-theme="light"] button.bg-gold{background:linear-gradient(135deg,#f6db79,#d9ad3e)!important;color:#171109!important;border-color:#9b7214!important;opacity:1!important}
html[data-theme="light"] header h1{color:#ffd96a!important;text-shadow:0 1px 0 #2d2105}html[data-theme="light"] .text-gray-400,html[data-theme="light"] .text-gray-500{color:#4a5260!important}html[data-theme="light"] #interest-next-amount,html[data-theme="light"] .money-profit{color:#08733e!important}
